vendor: 5,694 bytes, lines 1-9
1var Xf=t=>{throw TypeError(t)};var Ku=(t,e,r)=>e.has(t)||Xf("Cannot "+r);var R=(t,e,r)=>(Ku(t,e,"read from private field"),r?r.call(t):e.get(t)),fe=(t,e,r)=>e.has(t)?Xf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ne=(t,e,r,n)=>(Ku(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),tt=(t,e,r)=>(Ku(t,e,"access private method"),r);var ya=(t,e,r,n)=>({set _(s){ne(t,e,s,r)},get _(){return R(t,e,n)}});function U_(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function iv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ov={exports:{}},lu={},av={exports:{}},ae={};/** 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 aa=Symbol.for("react.element"),F_=Symbol.for("react.portal"),z_=Symbol.for("react.fragment"),B_=Symbol.for("react.strict_mode"),V_=Symbol.for("react.profiler"),H_=Symbol.for("react.provider"),W_=Symbol.for("react.context"),q_=Symbol.for("react.forward_ref"),K_=Symbol.for("react.suspense"),G_=Symbol.for("react.memo"),Q_=Symbol.for("react.lazy"),ep=Symbol.iterator;function J_(t){return t===null||typeof t!="object"?null:(t=ep&&t[ep]||t["@@iterator"],typeof t=="function"?t:null)}var lv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uv=Object.assign,cv={};function Ii(t,e,r){this.props=t,this.context=e,this.refs=cv,this.updater=r||lv}Ii.prototype.isReactComponent={};Ii.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Ii.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function dv(){}dv.prototype=Ii.prototype;function kh(t,e,r){this.props=t,this.context=e,this.refs=cv,this.updater=r||lv}var Eh=kh.prototype=new dv;Eh.constructor=kh;uv(Eh,Ii.prototype);Eh.isPureReactComponent=!0;var tp=Array.isArray,hv=Object.prototype.hasOwnProperty,Ch={current:null},fv={key:!0,ref:!0,__self:!0,__source:!0};function pv(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)hv.call(e,n)&&!fv.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:aa,type:t,key:i,ref:o,props:s,_owner:Ch.current}}function Z_(t,e){return{$$typeof:aa,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Th(t){return typeof t=="object"&&t!==null&&t.$$typeof===aa}function Y_(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var rp=/\/+/g;function Gu(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Y_(""+t.key):e.toString(36)}function Xa(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case aa:case F_:o=!0}}if(o)return o=t,s=s(o),t=n===""?"."+Gu(o,0):n,tp(s)?(r="",t!=null&&(r=t.replace(rp,"$&/")+"/"),Xa(s,e,r,"",function(u){return u})):s!=null&&(Th(s)&&(s=Z_(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(rp,"$&/")+"/")+t)),e.push(s)),1;if(o=0,n=n===""?".":n+":",tp(t))for(var a=0;a<t.length;a++){i=t[a];var l=n+Gu(i,a);o+=Xa(i,e,r,l,s)}else if(l=J_(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=n+Gu(i,a++),o+=Xa(i,e,r,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function wa(t,e,r){if(t==null)return t;var n=[],s=0;return Xa(t,n,"","",function(i){return e.call(r,i,s++)}),n}function X_(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var dt={current:null},el={transition:null},ex={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:el,ReactCurrentOwner:Ch};function mv(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,487 bytes, lines 9-25
9ae.Children={map:wa,forEach:function(t,e,r){wa(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return wa(t,function(){e++}),e},toArray:function(t){return wa(t,function(e){return e})||[]},only:function(t){if(!Th(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ae.Component=Ii;ae.Fragment=z_;ae.Profiler=V_;ae.PureComponent=kh;ae.StrictMode=B_;ae.Suspense=K_;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ex;ae.act=mv;ae.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=uv({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Ch.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)hv.call(e,l)&&!fv.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:aa,type:t.type,key:s,ref:i,props:n,_owner:o}};ae.createContext=function(t){return t={$$typeof:W_,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:H_,_context:t},t.Consumer=t};ae.createElement=pv;ae.createFactory=function(t){var e=pv.bind(null,t);return e.type=t,e};ae.createRef=function(){return{current:null}};ae.forwardRef=function(t){return{$$typeof:q_,render:t}};ae.isValidElement=Th;ae.lazy=function(t){return{$$typeof:Q_,_payload:{_status:-1,_result:t},_init:X_}};ae.memo=function(t,e){return{$$typeof:G_,type:t,compare:e===void 0?null:e}};ae.startTransition=function(t){var e=el.transition;el.transition={};try{t()}finally{el.transition=e}};ae.unstable_act=mv;ae.useCallback=function(t,e){return dt.current.useCallback(t,e)};ae.useContext=function(t){return dt.current.useContext(t)};ae.useDebugValue=function(){};ae.useDeferredValue=function(t){return dt.current.useDeferredValue(t)};ae.useEffect=function(t,e){return dt.current.useEffect(t,e)};ae.useId=function(){return dt.current.useId()};ae.useImperativeHandle=function(t,e,r){return dt.current.useImperativeHandle(t,e,r)};ae.useInsertionEffect=function(t,e){return dt.current.useInsertionEffect(t,e)};ae.useLayoutEffect=function(t,e){return dt.current.useLayoutEffect(t,e)};ae.useMemo=function(t,e){return dt.current.useMemo(t,e)};ae.useReducer=function(t,e,r){return dt.current.useReducer(t,e,r)};ae.useRef=function(t){return dt.current.useRef(t)};ae.useState=function(t){return dt.current.useState(t)};ae.useSyncExternalStore=function(t,e,r){return dt.current.useSyncExternalStore(t,e,r)};ae.useTransition=function(){return dt.current.useTransition()};ae.version="18.3.1";av.exports=ae;var y=av.exports;const I=iv(y),Rh=U_({__proto__:null,default:I},[y]);/** 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 tx=y,rx=Symbol.for("react.element"),nx=Symbol.for("react.fragment"),sx=Object.prototype.hasOwnProperty,ix=tx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ox={key:!0,ref:!0,__self:!0,__source:!0};function gv(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)sx.call(e,n)&&!ox.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:rx,type:t,key:i,ref:o,props:s,_owner:ix.current}}lu.Fragment=nx;lu.jsx=gv;lu.jsxs=gv;ov.exports=lu;var _=ov.exports,vv={exports:{}},Rt={},yv={exports:{}},wv={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(C,P){var M=C.length;C.push(P);e:for(;0<M;){var Z=M-1>>>1,K=C[Z];if(0<s(K,P))C[Z]=P,C[M]=K,M=Z;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var P=C[0],M=C.pop();if(M!==P){C[0]=M;e:for(var Z=0,K=C.length,se=K>>>1;Z<se;){var te=2*(Z+1)-1,Se=C[te],Ne=te+1,U=C[Ne];if(0>s(Se,M))Ne<K&&0>s(U,Se)?(C[Z]=U,C[Ne]=M,Z=Ne):(C[Z]=Se,C[te]=M,Z=te);else if(Ne<K&&0>s(U,M))C[Z]=U,C[Ne]=M,Z=Ne;else break e}}return P}function s(C,P){var M=C.sortIndex-P.sortIndex;return M!==0?M:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,b=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(C){for(var P=r(u);P!==null;){if(P.callback===null)n(u);else if(P.startTime<=C)n(u),P.sortIndex=P.expirationTime,e(l,P);else break;P=r(u)}}function x(C){if(p=!1,v(C),!b)if(r(l)!==null)b=!0,H(S);else{var P=r(u);P!==null&&G(x,P.startTime-C)}}function S(C,P){b=!1,p&&(p=!1,g(T),T=-1),h=!0;var M=f;try{for(v(P),d=r(l);d!==null&&(!(d.expirationTime>P)||C&&!q());){var Z=d.callback;
vendor: 9,158 bytes, lines 25-34
25if(typeof Z=="function"){d.callback=null,f=d.priorityLevel;var K=Z(d.expirationTime<=P);P=t.unstable_now(),typeof K=="function"?d.callback=K:d===r(l)&&n(l),v(P)}else n(l);d=r(l)}if(d!==null)var se=!0;else{var te=r(u);te!==null&&G(x,te.startTime-P),se=!1}return se}finally{d=null,f=M,h=!1}}var k=!1,E=null,T=-1,A=5,O=-1;function q(){return!(t.unstable_now()-O<A)}function D(){if(E!==null){var C=t.unstable_now();O=C;var P=!0;try{P=E(!0,C)}finally{P?J():(k=!1,E=null)}}else k=!1}var J;if(typeof m=="function")J=function(){m(D)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,Y=L.port2;L.port1.onmessage=D,J=function(){Y.postMessage(null)}}else J=function(){w(D,0)};function H(C){E=C,k||(k=!0,J())}function G(C,P){T=w(function(){C(t.unstable_now())},P)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(C){C.callback=null},t.unstable_continueExecution=function(){b||h||(b=!0,H(S))},t.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<C?Math.floor(1e3/C):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(C){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var M=f;f=P;try{return C()}finally{f=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=f;f=C;try{return P()}finally{f=M}},t.unstable_scheduleCallback=function(C,P,M){var Z=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?Z+M:Z):M=Z,C){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=M+K,C={id:c++,callback:P,priorityLevel:C,startTime:M,expirationTime:K,sortIndex:-1},M>Z?(C.sortIndex=M,e(u,C),r(l)===null&&C===r(u)&&(p?(g(T),T=-1):p=!0,G(x,M-Z))):(C.sortIndex=K,e(l,C),b||h||(b=!0,H(S))),C},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(C){var P=f;return function(){var M=f;f=P;try{return C.apply(this,arguments)}finally{f=M}}}})(wv);yv.exports=wv;var ax=yv.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 lx=y,Ct=ax;function N(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var bv=new Set,Eo={};function _s(t,e){_i(t,e),_i(t+"Capture",e)}function _i(t,e){for(Eo[t]=e,t=0;t<e.length;t++)bv.add(e[t])}var $r=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bc=Object.prototype.hasOwnProperty,ux=/^[: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]*$/,np={},sp={};function cx(t){return Bc.call(sp,t)?!0:Bc.call(np,t)?!1:ux.test(t)?sp[t]=!0:(np[t]=!0,!1)}function dx(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function hx(t,e,r,n){if(e===null||typeof e>"u"||dx(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ht(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ye[t]=new ht(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ye[e]=new ht(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ye[t]=new ht(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ye[t]=new ht(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ye[t]=new ht(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ye[t]=new ht(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ye[t]=new ht(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ye[t]=new ht(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ye[t]=new ht(t,5,!1,t.toLowerCase(),null,!1,!1)});var Ph=/[\-:]([a-z])/g;function Ah(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Ph,Ah);Ye[e]=new ht(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Ph,Ah);Ye[e]=new ht(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Ph,Ah);Ye[e]=new ht(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ye[t]=new ht(t,1,!1,t.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ye[t]=new ht(t,1,!1,t.toLowerCase(),null,!0,!0)});function Oh(t,e,r,n){var s=Ye.hasOwnProperty(e)?Ye[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(hx(e,r,s,n)&&(r=null),n||s===null?cx(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Vr=lx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ba=Symbol.for("react.element"),Hs=Symbol.for("react.portal"),Ws=Symbol.for("react.fragment"),Nh=Symbol.for("react.strict_mode"),Vc=Symbol.for("react.profiler"),_v=Symbol.for("react.provider"),xv=Symbol.for("react.context"),jh=Symbol.for("react.forward_ref"),Hc=Symbol.for("react.suspense"),Wc=Symbol.for("react.suspense_list"),Ih=Symbol.for("react.memo"),en=Symbol.for("react.lazy"),Sv=Symbol.for("react.offscreen"),ip=Symbol.iterator;function qi(t){return t===null||typeof t!="object"?null:(t=ip&&t[ip]||t["@@iterator"],typeof t=="function"?t:null)}var Oe=Object.assign,Qu;function no(t){if(Qu===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Qu=e&&e[1]||""}return` 34`+Qu+t}var Ju=!1;function Zu(t,e){if(!t||Ju)return"";Ju=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}
vendor: 5,219 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 t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Ju=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?no(t):""}function fx(t){switch(t.tag){case 5:return no(t.type);case 16:return no("Lazy");case 13:return no("Suspense");case 19:return no("SuspenseList");case 0:case 2:case 15:return t=Zu(t.type,!1),t;case 11:return t=Zu(t.type.render,!1),t;case 1:return t=Zu(t.type,!0),t;default:return""}}function qc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ws:return"Fragment";case Hs:return"Portal";case Vc:return"Profiler";case Nh:return"StrictMode";case Hc:return"Suspense";case Wc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case xv:return(t.displayName||"Context")+".Consumer";case _v:return(t._context.displayName||"Context")+".Provider";case jh:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ih:return e=t.displayName||null,e!==null?e:qc(t.type)||"Memo";case en:e=t._payload,t=t._init;try{return qc(t(e))}catch{}}return null}function px(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qc(e);case 8:return e===Nh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Pn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function kv(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function mx(t){var e=kv(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function _a(t){t._valueTracker||(t._valueTracker=mx(t))}function Ev(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=kv(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function yl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Kc(t,e){var r=e.checked;return Oe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function op(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Pn(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Cv(t,e){e=e.checked,e!=null&&Oh(t,"checked",e,!1)}function Gc(t,e){Cv(t,e);var r=Pn(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Qc(t,e.type,r):e.hasOwnProperty("defaultValue")&&Qc(t,e.type,Pn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ap(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Qc(t,e,r){(e!=="number"||yl(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var so=Array.isArray;function ni(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Pn(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}
vendor: 9,459 bytes, line 37
37function Jc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(N(91));return Oe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function lp(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(N(92));if(so(r)){if(1<r.length)throw Error(N(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Pn(r)}}function Tv(t,e){var r=Pn(e.value),n=Pn(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function up(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Rv(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Zc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Rv(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var xa,Pv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(xa=xa||document.createElement("div"),xa.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=xa.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Co(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var ho={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},gx=["Webkit","ms","Moz","O"];Object.keys(ho).forEach(function(t){gx.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ho[e]=ho[t]})});function Av(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||ho.hasOwnProperty(t)&&ho[t]?(""+e).trim():e+"px"}function Ov(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Av(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var vx=Oe({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 Yc(t,e){if(e){if(vx[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(N(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(N(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(N(61))}if(e.style!=null&&typeof e.style!="object")throw Error(N(62))}}function Xc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ed=null;function Lh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var td=null,si=null,ii=null;function cp(t){if(t=ca(t)){if(typeof td!="function")throw Error(N(280));var e=t.stateNode;e&&(e=fu(e),td(t.stateNode,t.type,e))}}function Nv(t){si?ii?ii.push(t):ii=[t]:si=t}function jv(){if(si){var t=si,e=ii;if(ii=si=null,cp(t),e)for(t=0;t<e.length;t++)cp(e[t])}}function Iv(t,e){return t(e)}function Lv(){}var Yu=!1;function $v(t,e,r){if(Yu)return t(e,r);Yu=!0;try{return Iv(t,e,r)}finally{Yu=!1,(si!==null||ii!==null)&&(Lv(),jv())}}function To(t,e){var r=t.stateNode;if(r===null)return null;var n=fu(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(N(231,e,typeof r));return r}var rd=!1;if($r)try{var Ki={};Object.defineProperty(Ki,"passive",{get:function(){rd=!0}}),window.addEventListener("test",Ki,Ki),window.removeEventListener("test",Ki,Ki)}catch{rd=!1}function yx(t,e,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(c){this.onError(c)}}var fo=!1,wl=null,bl=!1,nd=null,wx={onError:function(t){fo=!0,wl=t}};function bx(t,e,r,n,s,i,o,a,l){fo=!1,wl=null,yx.apply(wx,arguments)}function _x(t,e,r,n,s,i,o,a,l){if(bx.apply(this,arguments),fo){if(fo){var u=wl;fo=!1,wl=null}else throw Error(N(198));bl||(bl=!0,nd=u)}}function xs(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function Dv(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function dp(t){if(xs(t)!==t)throw Error(N(188))}function xx(t){var e=t.alternate;if(!e){if(e=xs(t),e===null)throw Error(N(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return dp(s),t;if(i===n)return dp(s),e;i=i.sibling}throw Error(N(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(N(189))}}if(r.alternate!==n)throw Error(N(190))}if(r.tag!==3)throw Error(N(188));return r.stateNode.current===r?t:e}function Mv(t){return t=xx(t),t!==null?Uv(t):null}function Uv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Uv(t);if(e!==null)return e;t=t.sibling}return null}var Fv=Ct.unstable_scheduleCallback,hp=Ct.unstable_cancelCallback,Sx=Ct.unstable_shouldYield,kx=Ct.unstable_requestPaint,Ue=Ct.unstable_now,Ex=Ct.unstable_getCurrentPriorityLevel,$h=Ct.unstable_ImmediatePriority,zv=Ct.unstable_UserBlockingPriority,_l=Ct.unstable_NormalPriority,Cx=Ct.unstable_LowPriority,Bv=Ct.unstable_IdlePriority,uu=null,wr=null;function Tx(t){if(wr&&typeof wr.onCommitFiberRoot=="function")try{wr.onCommitFiberRoot(uu,t,void 0,(t.current.flags&128)===128)}catch{}}var rr=Math.clz32?Math.clz32:Ax,Rx=Math.log,Px=Math.LN2;function Ax(t){return t>>>=0,t===0?32:31-(Rx(t)/Px|0)|0}var Sa=64,ka=4194304;function io(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function xl(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=io(a):(i&=o,i!==0&&(n=io(i)))}else o=r&~s,o!==0?n=io(o):i!==0&&(n=io(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-rr(e),s=1<<r,n|=t[r],e&=~s;return n}function Ox(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nx(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-rr(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Ox(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function sd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Vv(){var t=Sa;return Sa<<=1,!(Sa&4194240)&&(Sa=64),t}function Xu(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function la(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-rr(e),t[e]=r}function jx(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-rr(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function Dh(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-rr(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var ye=0;function Hv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}
vendor: 5,042 bytes, line 37
37var Wv,Mh,qv,Kv,Gv,id=!1,Ea=[],wn=null,bn=null,_n=null,Ro=new Map,Po=new Map,nn=[],Ix="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 fp(t,e){switch(t){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":_n=null;break;case"pointerover":case"pointerout":Ro.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Po.delete(e.pointerId)}}function Gi(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=ca(e),e!==null&&Mh(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function Lx(t,e,r,n,s){switch(e){case"focusin":return wn=Gi(wn,t,e,r,n,s),!0;case"dragenter":return bn=Gi(bn,t,e,r,n,s),!0;case"mouseover":return _n=Gi(_n,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return Ro.set(i,Gi(Ro.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Po.set(i,Gi(Po.get(i)||null,t,e,r,n,s)),!0}return!1}function Qv(t){var e=Xn(t.target);if(e!==null){var r=xs(e);if(r!==null){if(e=r.tag,e===13){if(e=Dv(r),e!==null){t.blockedOn=e,Gv(t.priority,function(){qv(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function tl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=od(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);ed=n,r.target.dispatchEvent(n),ed=null}else return e=ca(r),e!==null&&Mh(e),t.blockedOn=r,!1;e.shift()}return!0}function pp(t,e,r){tl(t)&&r.delete(e)}function $x(){id=!1,wn!==null&&tl(wn)&&(wn=null),bn!==null&&tl(bn)&&(bn=null),_n!==null&&tl(_n)&&(_n=null),Ro.forEach(pp),Po.forEach(pp)}function Qi(t,e){t.blockedOn===e&&(t.blockedOn=null,id||(id=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,$x)))}function Ao(t){function e(s){return Qi(s,t)}if(0<Ea.length){Qi(Ea[0],t);for(var r=1;r<Ea.length;r++){var n=Ea[r];n.blockedOn===t&&(n.blockedOn=null)}}for(wn!==null&&Qi(wn,t),bn!==null&&Qi(bn,t),_n!==null&&Qi(_n,t),Ro.forEach(e),Po.forEach(e),r=0;r<nn.length;r++)n=nn[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<nn.length&&(r=nn[0],r.blockedOn===null);)Qv(r),r.blockedOn===null&&nn.shift()}var oi=Vr.ReactCurrentBatchConfig,Sl=!0;function Dx(t,e,r,n){var s=ye,i=oi.transition;oi.transition=null;try{ye=1,Uh(t,e,r,n)}finally{ye=s,oi.transition=i}}function Mx(t,e,r,n){var s=ye,i=oi.transition;oi.transition=null;try{ye=4,Uh(t,e,r,n)}finally{ye=s,oi.transition=i}}function Uh(t,e,r,n){if(Sl){var s=od(t,e,r,n);if(s===null)uc(t,e,n,kl,r),fp(t,n);else if(Lx(s,t,e,r,n))n.stopPropagation();else if(fp(t,n),e&4&&-1<Ix.indexOf(t)){for(;s!==null;){var i=ca(s);if(i!==null&&Wv(i),i=od(t,e,r,n),i===null&&uc(t,e,n,kl,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else uc(t,e,n,null,r)}}var kl=null;function od(t,e,r,n){if(kl=null,t=Lh(n),t=Xn(t),t!==null)if(e=xs(t),e===null)t=null;else if(r=e.tag,r===13){if(t=Dv(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return kl=t,null}function Jv(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ex()){case $h:return 1;case zv:return 4;case _l:case Cx:return 16;case Bv:return 536870912;default:return 16}default:return 16}}var pn=null,Fh=null,rl=null;function Zv(){if(rl)return rl;var t,e=Fh,r=e.length,n,s="value"in pn?pn.value:pn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===s[i-n];n++);return rl=s.slice(t,1<n?1-n:void 0)}function nl(t){var e=t.keyCode;
vendor: 5,482 bytes, line 37
37return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ca(){return!0}function mp(){return!1}function Pt(t){function e(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ca:mp,this.isPropagationStopped=mp,this}return Oe(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ca)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ca)},persist:function(){},isPersistent:Ca}),e}var Li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zh=Pt(Li),ua=Oe({},Li,{view:0,detail:0}),Ux=Pt(ua),ec,tc,Ji,cu=Oe({},ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bh,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ji&&(Ji&&t.type==="mousemove"?(ec=t.screenX-Ji.screenX,tc=t.screenY-Ji.screenY):tc=ec=0,Ji=t),ec)},movementY:function(t){return"movementY"in t?t.movementY:tc}}),gp=Pt(cu),Fx=Oe({},cu,{dataTransfer:0}),zx=Pt(Fx),Bx=Oe({},ua,{relatedTarget:0}),rc=Pt(Bx),Vx=Oe({},Li,{animationName:0,elapsedTime:0,pseudoElement:0}),Hx=Pt(Vx),Wx=Oe({},Li,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),qx=Pt(Wx),Kx=Oe({},Li,{data:0}),vp=Pt(Kx),Gx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qx={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"},Jx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zx(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Jx[t])?!!e[t]:!1}function Bh(){return Zx}var Yx=Oe({},ua,{key:function(t){if(t.key){var e=Gx[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=nl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Qx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bh,charCode:function(t){return t.type==="keypress"?nl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?nl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Xx=Pt(Yx),eS=Oe({},cu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yp=Pt(eS),tS=Oe({},ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bh}),rS=Pt(tS),nS=Oe({},Li,{propertyName:0,elapsedTime:0,pseudoElement:0}),sS=Pt(nS),iS=Oe({},cu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),oS=Pt(iS),aS=[9,13,27,32],Vh=$r&&"CompositionEvent"in window,po=null;$r&&"documentMode"in document&&(po=document.documentMode);var lS=$r&&"TextEvent"in window&&!po,Yv=$r&&(!Vh||po&&8<po&&11>=po),wp=" ",bp=!1;function Xv(t,e){switch(t){case"keyup":return aS.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ey(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var qs=!1;function uS(t,e){switch(t){case"compositionend":return ey(e);case"keypress":return e.which!==32?null:(bp=!0,wp);case"textInput":return t=e.data,t===wp&&bp?null:t;default:return null}}function cS(t,e){if(qs)return t==="compositionend"||!Vh&&Xv(t,e)?(t=Zv(),rl=Fh=pn=null,qs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Yv&&e.locale!=="ko"?null:e.data;default:return null}}var dS={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 _p(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!dS[t.type]:e==="textarea"}function ty(t,e,r,n){Nv(n),e=El(e,"onChange"),0<e.length&&(r=new zh("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var mo=null,Oo=null;function hS(t){hy(t,0)}function du(t){var e=Qs(t);if(Ev(e))return t}function fS(t,e){if(t==="change")return e}var ry=!1;if($r){var nc;
vendor: 5,634 bytes, line 37
37if($r){var sc="oninput"in document;if(!sc){var xp=document.createElement("div");xp.setAttribute("oninput","return;"),sc=typeof xp.oninput=="function"}nc=sc}else nc=!1;ry=nc&&(!document.documentMode||9<document.documentMode)}function Sp(){mo&&(mo.detachEvent("onpropertychange",ny),Oo=mo=null)}function ny(t){if(t.propertyName==="value"&&du(Oo)){var e=[];ty(e,Oo,t,Lh(t)),$v(hS,e)}}function pS(t,e,r){t==="focusin"?(Sp(),mo=e,Oo=r,mo.attachEvent("onpropertychange",ny)):t==="focusout"&&Sp()}function mS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return du(Oo)}function gS(t,e){if(t==="click")return du(e)}function vS(t,e){if(t==="input"||t==="change")return du(e)}function yS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var sr=typeof Object.is=="function"?Object.is:yS;function No(t,e){if(sr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Bc.call(e,s)||!sr(t[s],e[s]))return!1}return!0}function kp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ep(t,e){var r=kp(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kp(r)}}function sy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?sy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function iy(){for(var t=window,e=yl();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=yl(t.document)}return e}function Hh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function wS(t){var e=iy(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&sy(r.ownerDocument.documentElement,r)){if(n!==null&&Hh(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=Ep(r,i);var o=Ep(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var bS=$r&&"documentMode"in document&&11>=document.documentMode,Ks=null,ad=null,go=null,ld=!1;function Cp(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ld||Ks==null||Ks!==yl(n)||(n=Ks,"selectionStart"in n&&Hh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),go&&No(go,n)||(go=n,n=El(ad,"onSelect"),0<n.length&&(e=new zh("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Ks)))}function Ta(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Gs={animationend:Ta("Animation","AnimationEnd"),animationiteration:Ta("Animation","AnimationIteration"),animationstart:Ta("Animation","AnimationStart"),transitionend:Ta("Transition","TransitionEnd")},ic={},oy={};$r&&(oy=document.createElement("div").style,"AnimationEvent"in window||(delete Gs.animationend.animation,delete Gs.animationiteration.animation,delete Gs.animationstart.animation),"TransitionEvent"in window||delete Gs.transitionend.transition);function hu(t){if(ic[t])return ic[t];if(!Gs[t])return t;var e=Gs[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in oy)return ic[t]=e[r];return t}var ay=hu("animationend"),ly=hu("animationiteration"),uy=hu("animationstart"),cy=hu("transitionend"),dy=new Map,Tp="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 Mn(t,e){dy.set(t,e),_s(e,[t])}for(var oc=0;oc<Tp.length;oc++){var ac=Tp[oc],_S=ac.toLowerCase(),xS=ac[0].toUpperCase()+ac.slice(1);Mn(_S,"on"+xS)}Mn(ay,"onAnimationEnd");Mn(ly,"onAnimationIteration");Mn(uy,"onAnimationStart");Mn("dblclick","onDoubleClick");Mn("focusin","onFocus");Mn("focusout","onBlur");Mn(cy,"onTransitionEnd");_i("onMouseEnter",["mouseout","mouseover"]);_i("onMouseLeave",["mouseout","mouseover"]);_i("onPointerEnter",["pointerout","pointerover"]);_i("onPointerLeave",["pointerout","pointerover"]);_s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,227 bytes, line 37
37_s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_s("onBeforeInput",["compositionend","keypress","textInput","paste"]);_s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oo="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(" "),SS=new Set("cancel close invalid load scroll toggle".split(" ").concat(oo));function Rp(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,_x(n,e,void 0,t),t.currentTarget=null}function hy(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Rp(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;Rp(s,a,u),i=l}}}if(bl)throw t=nd,bl=!1,nd=null,t}function Ee(t,e){var r=e[fd];r===void 0&&(r=e[fd]=new Set);var n=t+"__bubble";r.has(n)||(fy(e,t,2,!1),r.add(n))}function lc(t,e,r){var n=0;e&&(n|=4),fy(r,t,n,e)}var Ra="_reactListening"+Math.random().toString(36).slice(2);function jo(t){if(!t[Ra]){t[Ra]=!0,bv.forEach(function(r){r!=="selectionchange"&&(SS.has(r)||lc(r,!1,t),lc(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ra]||(e[Ra]=!0,lc("selectionchange",!1,e))}}function fy(t,e,r,n){switch(Jv(e)){case 1:var s=Dx;break;case 4:s=Mx;break;default:s=Uh}r=s.bind(null,e,r,t),s=void 0,!rd||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function uc(t,e,r,n,s){var i=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Xn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}$v(function(){var u=i,c=Lh(r),d=[];e:{var f=dy.get(t);if(f!==void 0){var h=zh,b=t;switch(t){case"keypress":if(nl(r)===0)break e;case"keydown":case"keyup":h=Xx;break;case"focusin":b="focus",h=rc;break;case"focusout":b="blur",h=rc;break;case"beforeblur":case"afterblur":h=rc;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=gp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=zx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rS;break;case ay:case ly:case uy:h=Hx;break;case cy:h=sS;break;case"scroll":h=Ux;break;case"wheel":h=oS;break;case"copy":case"cut":case"paste":h=qx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=yp}var p=(e&4)!==0,w=!p&&t==="scroll",g=p?f!==null?f+"Capture":null:f;p=[];for(var m=u,v;m!==null;){v=m;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,g!==null&&(x=To(m,g),x!=null&&p.push(Io(m,x,v)))),w)break;m=m.return}0<p.length&&(f=new h(f,b,null,r,c),d.push({event:f,listeners:p}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&r!==ed&&(b=r.relatedTarget||r.fromElement)&&(Xn(b)||b[Dr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(b=r.relatedTarget||r.toElement,h=u,b=b?Xn(b):null,b!==null&&(w=xs(b),b!==w||b.tag!==5&&b.tag!==6)&&(b=null)):(h=null,b=u),h!==b)){if(p=gp,x="onMouseLeave",g="onMouseEnter",m="mou
37se",(t==="pointerout"||t==="pointerover")&&(p=yp,x="onPointerLeave",g="onPointerEnter",m="pointer"),w=h==null?f:Qs(h),v=b==null?f:Qs(b),f=new p(x,m+"leave",h,r,c),f.target=w,f.relatedTarget=v,x=null,Xn(c)===u&&(p=new p(g,m+"enter",b,r,c),p.target=v,p.relatedTarget=w,x=p),w=x,h&&b)t:{for(p=h,g=b,m=0,v=p;v;v=Ps(v))m++;for(v=0,x=g;x;x=Ps(x))v++;for(;0<m-v;)p=Ps(p),m--;for(;0<v-m;)g=Ps(g),v--;for(;m--;){if(p===g||g!==null&&p===g.alternate)break t;p=Ps(p),g=Ps(g)}p=null}else p=null;h!==null&&Pp(d,f,h,p,!1),b!==null&&w!==null&&Pp(d,w,b,p,!0)}}e:{if(f=u?Qs(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=fS;else if(_p(f))if(ry)S=vS;else{S=mS;var k=pS}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=gS);if(S&&(S=S(t,u))){ty(d,S,r,c);break e}k&&k(t,f,u),t==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Qc(f,"number",f.value)}switch(k=u?Qs(u):window,t){case"focusin":(_p(k)||k.contentEditable==="true")&&(Ks=k,ad=u,go=null);break;case"focusout":go=ad=Ks=null;break;case"mousedown":ld=!0;break;case"contextmenu":case"mouseup":case"dragend":ld=!1,Cp(d,r,c);break;case"selectionchange":if(bS)break;case"keydown":case"keyup":Cp(d,r,c)}var E;if(Vh)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else qs?Xv(t,r)&&(T="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(Yv&&r.locale!=="ko"&&(qs||T!=="onCompositionStart"?T==="onCompositionEnd"&&qs&&(E=Zv()):(pn=c,Fh="value"in pn?pn.value:pn.textContent,qs=!0)),k=El(u,T),0<k.length&&(T=new vp(T,t,null,r,c),d.push({event:T,listeners:k}),E?T.data=E:(E=ey(r),E!==null&&(T.data=E)))),(E=lS?uS(t,r):cS(t,r))&&(u=El(u,"onBeforeInput"),0<u.length&&(c=new vp("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=E))}hy(d,e)})}function Io(t,e,r){return{instance:t,listener:e,currentTarget:r}}function El(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=To(t,r),i!=null&&n.unshift(Io(t,i,s)),i=To(t,e),i!=null&&n.push(Io(t,i,s))),t=t.return}return n}function Ps(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Pp(t,e,r,n,s){for(var i=e._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=To(r,i),l!=null&&o.unshift(Io(r,l,a))):s||(l=To(r,i),l!=null&&o.push(Io(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var kS=/\r\n?/g,ES=/\u0000|\uFFFD/g;function Ap(t){return(typeof t=="string"?t:""+t).replace(kS,` 38`).replace(ES,"")}function Pa(t,e,r){if(e=Ap(e),Ap(t)!==e&&r)throw Error(N(425))}function Cl(){}var ud=null,cd=null;function dd(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var hd=typeof setTimeout=="function"?setTimeout:void 0,CS=typeof clearTimeout=="function"?clearTimeout:void 0,Op=typeof Promise=="function"?Promise:void 0,TS=typeof queueMicrotask=="function"?queueMicrotask:typeof Op<"u"?function(t){return Op.resolve(null).then(t).catch(RS)}:hd;function RS(t){setTimeout(function(){throw t})}function cc(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),Ao(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ao(e)}function xn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Np(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var $i=Math.random().toString(36).slice(2),vr="__reactFiber$"+$i,Lo="__reactProps$"+$i,Dr="__reactContainer$"+$i,fd="__reactEvents$"+$i,PS="__reactListeners$"+$i,AS="__reactHandles$"+$i;function Xn(t){var e=t[vr];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Dr]||r[vr]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Np(t);t!==null;){if(r=t[vr])return r;t=Np(t)}return e}t=r,r=t.parentNode}return null}function ca(t){return t=t[vr]||t[Dr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Qs(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(N(33))}function fu(t){return t[Lo]||null}var pd=[],Js=-1;function Un(t){return{current:t}}function Ce(t){0>Js||(t.current=pd[Js],pd[Js]=null,Js--)}function _e(t,e){Js++,pd[Js]=t.current,t.current=e}var An={},ot=Un(An),vt=Un(!1),hs=An;function xi(t,e){var r=t.type.contextTypes;if(!r)return An;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function yt(t){return t=t.childContextTypes,t!=null}function Tl(){Ce(vt),Ce(ot)}function jp(t,e,r){if(ot.current!==An)throw Error(N(168));_e(ot,e),_e(vt,r)}function py(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(N(108,px(t)||"Unknown",s));return Oe({},r,n)}function Rl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||An,hs=ot.current,_e(ot,t),_e(vt,vt.current),!0}function Ip(t,e,r){var n=t.stateNode;if(!n)throw Error(N(169));r?(t=py(t,e,hs),n.__reactInternalMemoizedMergedChildContext=t,Ce(vt),Ce(ot),_e(ot,t)):Ce(vt),_e(vt,r)}var Or=null,pu=!1,dc=!1;function my(t){Or===null?Or=[t]:Or.push(t)}function OS(t){pu=!0,my(t)}function Fn(){if(!dc&&Or!==null){dc=!0;var t=0,e=ye;try{var r=Or;for(ye=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}
vendor: 5,212 bytes, line 38
38Or=null,pu=!1}catch(s){throw Or!==null&&(Or=Or.slice(t+1)),Fv($h,Fn),s}finally{ye=e,dc=!1}}return null}var Zs=[],Ys=0,Pl=null,Al=0,It=[],Lt=0,fs=null,jr=1,Ir="";function Jn(t,e){Zs[Ys++]=Al,Zs[Ys++]=Pl,Pl=t,Al=e}function gy(t,e,r){It[Lt++]=jr,It[Lt++]=Ir,It[Lt++]=fs,fs=t;var n=jr;t=Ir;var s=32-rr(n)-1;n&=~(1<<s),r+=1;var i=32-rr(e)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,jr=1<<32-rr(e)+s|r<<s|n,Ir=i+t}else jr=1<<i|r<<s|n,Ir=t}function Wh(t){t.return!==null&&(Jn(t,1),gy(t,1,0))}function qh(t){for(;t===Pl;)Pl=Zs[--Ys],Zs[Ys]=null,Al=Zs[--Ys],Zs[Ys]=null;for(;t===fs;)fs=It[--Lt],It[Lt]=null,Ir=It[--Lt],It[Lt]=null,jr=It[--Lt],It[Lt]=null}var kt=null,St=null,Re=!1,er=null;function vy(t,e){var r=$t(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Lp(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,kt=t,St=xn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,kt=t,St=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=fs!==null?{id:jr,overflow:Ir}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=$t(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,kt=t,St=null,!0):!1;default:return!1}}function md(t){return(t.mode&1)!==0&&(t.flags&128)===0}function gd(t){if(Re){var e=St;if(e){var r=e;if(!Lp(t,e)){if(md(t))throw Error(N(418));e=xn(r.nextSibling);var n=kt;e&&Lp(t,e)?vy(n,r):(t.flags=t.flags&-4097|2,Re=!1,kt=t)}}else{if(md(t))throw Error(N(418));t.flags=t.flags&-4097|2,Re=!1,kt=t}}}function $p(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;kt=t}function Aa(t){if(t!==kt)return!1;if(!Re)return $p(t),Re=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!dd(t.type,t.memoizedProps)),e&&(e=St)){if(md(t))throw yy(),Error(N(418));for(;e;)vy(t,e),e=xn(e.nextSibling)}if($p(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(N(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){St=xn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}St=null}}else St=kt?xn(t.stateNode.nextSibling):null;return!0}function yy(){for(var t=St;t;)t=xn(t.nextSibling)}function Si(){St=kt=null,Re=!1}function Kh(t){er===null?er=[t]:er.push(t)}var NS=Vr.ReactCurrentBatchConfig;function Zi(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(N(309));var n=r.stateNode}if(!n)throw Error(N(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(N(284));if(!r._owner)throw Error(N(290,t))}return t}function Oa(t,e){throw t=Object.prototype.toString.call(e),Error(N(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Dp(t){var e=t._init;return e(t._payload)}function wy(t){function e(g,m){if(t){var v=g.deletions;v===null?(g.deletions=[m],g.flags|=16):v.push(m)}}function r(g,m){if(!t)return null;for(;m!==null;)e(g,m),m=m.sibling;return null}function n(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=Cn(g,m),g.index=0,g.sibling=null,g}function i(g,m,v){return g.index=v,t?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags|=2,m):v):(g.flags|=2,m)):(g.flags|=1048576,m)}function o(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,m,v,x){return m===null||m.tag!==6?(m=yc(v,g.mode,x),m.return=g,m):(m=s(m,v),m.return=g,m)}function l(g,m,v,x){var S=v.type;return S===Ws?c(g,m,v.props.children,x,v.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===en&&Dp(S)===m.type)?(x=s(m,v.props),x.ref=Zi(g,m,v),x.return=g,x):(x=cl(v.type,v.key,v.props,null,g.mode,x),x.ref=Zi(g,m,v),x.return=g,x)}function u(g,m,v,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=wc(v,g.mode,x),m.return=g,m):(m=s(m,v.children||[]),m.return=g,m)}function c(g,m,v,x,S){return m===null||m.tag!==7?(m=ds(v,g.mode,x,S),m.return=g,m):(m=s(m,v),m.return=g,m)}function d(g,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=yc(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ba:return v=cl(m.type,m.key,m.props,null,g.mode,v),v.ref=Zi(g,null,m),v.return=g,v;case Hs:return m=wc(m,g.mode,v),m.return=g,m;case en:var x=m._init;return d(g,x(m._payload),v)}if(so(m)||qi(m))return m=ds(m,g.mode,v,null),m.return=g,m;Oa(g,m)}return null}function f(g,m,v,x){var S=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(g,m,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ba:return v.key===S?l(g,m,v,x):null;case Hs:return v.key===S?u(g,m,v,x):null;case en:return S=v._init,f(g,m,S(v._payload),x)}if(so(v)||qi(v))return S!==null?null:c(g,m,v,x,null);Oa(g,v)}return null}
vendor: 2,460 bytes, line 38
38function h(g,m,v,x,S){if(typeof x=="string"&&x!==""||typeof x=="number")return g=g.get(v)||null,a(m,g,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ba:return g=g.get(x.key===null?v:x.key)||null,l(m,g,x,S);case Hs:return g=g.get(x.key===null?v:x.key)||null,u(m,g,x,S);case en:var k=x._init;return h(g,m,v,k(x._payload),S)}if(so(x)||qi(x))return g=g.get(v)||null,c(m,g,x,S,null);Oa(m,x)}return null}function b(g,m,v,x){for(var S=null,k=null,E=m,T=m=0,A=null;E!==null&&T<v.length;T++){E.index>T?(A=E,E=null):A=E.sibling;var O=f(g,E,v[T],x);if(O===null){E===null&&(E=A);break}t&&E&&O.alternate===null&&e(g,E),m=i(O,m,T),k===null?S=O:k.sibling=O,k=O,E=A}if(T===v.length)return r(g,E),Re&&Jn(g,T),S;if(E===null){for(;T<v.length;T++)E=d(g,v[T],x),E!==null&&(m=i(E,m,T),k===null?S=E:k.sibling=E,k=E);return Re&&Jn(g,T),S}for(E=n(g,E);T<v.length;T++)A=h(E,g,T,v[T],x),A!==null&&(t&&A.alternate!==null&&E.delete(A.key===null?T:A.key),m=i(A,m,T),k===null?S=A:k.sibling=A,k=A);return t&&E.forEach(function(q){return e(g,q)}),Re&&Jn(g,T),S}function p(g,m,v,x){var S=qi(v);if(typeof S!="function")throw Error(N(150));if(v=S.call(v),v==null)throw Error(N(151));for(var k=S=null,E=m,T=m=0,A=null,O=v.next();E!==null&&!O.done;T++,O=v.next()){E.index>T?(A=E,E=null):A=E.sibling;var q=f(g,E,O.value,x);if(q===null){E===null&&(E=A);break}t&&E&&q.alternate===null&&e(g,E),m=i(q,m,T),k===null?S=q:k.sibling=q,k=q,E=A}if(O.done)return r(g,E),Re&&Jn(g,T),S;if(E===null){for(;!O.done;T++,O=v.next())O=d(g,O.value,x),O!==null&&(m=i(O,m,T),k===null?S=O:k.sibling=O,k=O);return Re&&Jn(g,T),S}for(E=n(g,E);!O.done;T++,O=v.next())O=h(E,g,T,O.value,x),O!==null&&(t&&O.alternate!==null&&E.delete(O.key===null?T:O.key),m=i(O,m,T),k===null?S=O:k.sibling=O,k=O);return t&&E.forEach(function(D){return e(g,D)}),Re&&Jn(g,T),S}function w(g,m,v,x){if(typeof v=="object"&&v!==null&&v.type===Ws&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ba:e:{for(var S=v.key,k=m;k!==null;){if(k.key===S){if(S=v.type,S===Ws){if(k.tag===7){r(g,k.sibling),m=s(k,v.props.children),m.return=g,g=m;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===en&&Dp(S)===k.type){r(g,k.sibling),m=s(k,v.props),m.ref=Zi(g,k,v),m.return=g,g=m;break e}r(g,k);break}else e(g,k);k=k.sibling}v.type===Ws?(m=ds(v.props.children,g.mode,x,v.key),m.return=g,g=m):(x=cl(v.type,v.key,v.props,null,g.mode,x),x.ref=Zi(g,m,v),x.return=g,g=x)}return o(g);
vendor: 4,751 bytes, line 38
38case Hs:e:{for(k=v.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){r(g,m.sibling),m=s(m,v.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else e(g,m);m=m.sibling}m=wc(v,g.mode,x),m.return=g,g=m}return o(g);case en:return k=v._init,w(g,m,k(v._payload),x)}if(so(v))return b(g,m,v,x);if(qi(v))return p(g,m,v,x);Oa(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(r(g,m.sibling),m=s(m,v),m.return=g,g=m):(r(g,m),m=yc(v,g.mode,x),m.return=g,g=m),o(g)):r(g,m)}return w}var ki=wy(!0),by=wy(!1),Ol=Un(null),Nl=null,Xs=null,Gh=null;function Qh(){Gh=Xs=Nl=null}function Jh(t){var e=Ol.current;Ce(Ol),t._currentValue=e}function vd(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function ai(t,e){Nl=t,Gh=Xs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(gt=!0),t.firstContext=null)}function Mt(t){var e=t._currentValue;if(Gh!==t)if(t={context:t,memoizedValue:e,next:null},Xs===null){if(Nl===null)throw Error(N(308));Xs=t,Nl.dependencies={lanes:0,firstContext:t}}else Xs=Xs.next=t;return e}var es=null;function Zh(t){es===null?es=[t]:es.push(t)}function _y(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,Zh(e)):(r.next=s.next,s.next=r),e.interleaved=r,Mr(t,n)}function Mr(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var tn=!1;function Yh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xy(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Lr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ce&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,Mr(t,r)}return s=n.interleaved,s===null?(e.next=e,Zh(n)):(e.next=s.next,s.next=e),n.interleaved=e,Mr(t,r)}function sl(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Dh(t,r)}}function Mp(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function jl(t,e,r,n){var s=t.updateQueue;tn=!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=t.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 b=t,p=a;switch(f=e,h=r,p.tag){case 1:if(b=p.payload,typeof b=="function"){d=b.call(h,d,f);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,f=typeof b=="function"?b.call(h,d,f):b,f==null)break e;d=Oe({},d,f);break e;case 2:tn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},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,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);ms|=o,t.lanes=o,t.memoizedState=d}}function Up(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(N(191,s));s.call(n)}}}var da={},br=Un(da),$o=Un(da),Do=Un(da);function ts(t){if(t===da)throw Error(N(174));return t}function Xh(t,e){switch(_e(Do,e),_e($o,t),_e(br,da),t=e.nodeType,t){case 9:case 11:e=(e
vendor: 15,317 bytes, lines 38-40
38=e.documentElement)?e.namespaceURI:Zc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Zc(e,t)}Ce(br),_e(br,e)}function Ei(){Ce(br),Ce($o),Ce(Do)}function Sy(t){ts(Do.current);var e=ts(br.current),r=Zc(e,t.type);e!==r&&(_e($o,t),_e(br,r))}function ef(t){$o.current===t&&(Ce(br),Ce($o))}var Pe=Un(0);function Il(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var hc=[];function tf(){for(var t=0;t<hc.length;t++)hc[t]._workInProgressVersionPrimary=null;hc.length=0}var il=Vr.ReactCurrentDispatcher,fc=Vr.ReactCurrentBatchConfig,ps=0,Ae=null,Ve=null,qe=null,Ll=!1,vo=!1,Mo=0,jS=0;function rt(){throw Error(N(321))}function rf(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!sr(t[r],e[r]))return!1;return!0}function nf(t,e,r,n,s,i){if(ps=i,Ae=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,il.current=t===null||t.memoizedState===null?DS:MS,t=r(n,s),vo){i=0;do{if(vo=!1,Mo=0,25<=i)throw Error(N(301));i+=1,qe=Ve=null,e.updateQueue=null,il.current=US,t=r(n,s)}while(vo)}if(il.current=$l,e=Ve!==null&&Ve.next!==null,ps=0,qe=Ve=Ae=null,Ll=!1,e)throw Error(N(300));return t}function sf(){var t=Mo!==0;return Mo=0,t}function dr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Ae.memoizedState=qe=t:qe=qe.next=t,qe}function Ut(){if(Ve===null){var t=Ae.alternate;t=t!==null?t.memoizedState:null}else t=Ve.next;var e=qe===null?Ae.memoizedState:qe.next;if(e!==null)qe=e,Ve=t;else{if(t===null)throw Error(N(310));Ve=t,t={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},qe===null?Ae.memoizedState=qe=t:qe=qe.next=t}return qe}function Uo(t,e){return typeof e=="function"?e(t):e}function pc(t){var e=Ut(),r=e.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=t;var n=Ve,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((ps&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:t(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,Ae.lanes|=c,ms|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,sr(n,e.memoizedState)||(gt=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,Ae.lanes|=i,ms|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function mc(t){var e=Ut(),r=e.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);sr(i,e.memoizedState)||(gt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function ky(){}function Ey(t,e){var r=Ae,n=Ut(),s=e(),i=!sr(n.memoizedState,s);if(i&&(n.memoizedState=s,gt=!0),n=n.queue,of(Ry.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||qe!==null&&qe.memoizedState.tag&1){if(r.flags|=2048,Fo(9,Ty.bind(null,r,n,s,e),void 0,null),Ke===null)throw Error(N(349));ps&30||Cy(r,e,s)}return s}function Cy(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Ae.updateQueue,e===null?(e={lastEffect:null,stores:null},Ae.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Ty(t,e,r,n){e.value=r,e.getSnapshot=n,Py(e)&&Ay(t)}function Ry(t,e,r){return r(function(){Py(e)&&Ay(t)})}function Py(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!sr(t,r)}catch{return!0}}function Ay(t){var e=Mr(t,1);e!==null&&nr(e,t,1,-1)}function Fp(t){var e=dr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:t},e.queue=t,t=t.dispatch=$S.bind(null,Ae,t),[e.memoizedState,t]}function Fo(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ae.updateQueue,e===null?(e={lastEffect:null,stores:null},Ae.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function Oy(){return Ut().memoizedState}function ol(t,e,r,n){var s=dr();Ae.flags|=t,s.memoizedState=Fo(1|e,r,void 0,n===void 0?null:n)}function mu(t,e,r,n){var s=Ut();n=n===void 0?null:n;var i=void 0;if(Ve!==null){var o=Ve.memoizedState;if(i=o.destroy,n!==null&&rf(n,o.deps)){s.memoizedState=Fo(e,r,i,n);return}}Ae.flags|=t,s.memoizedState=Fo(1|e,r,i,n)}function zp(t,e){return ol(8390656,8,t,e)}function of(t,e){return mu(2048,8,t,e)}function Ny(t,e){return mu(4,2,t,e)}function jy(t,e){return mu(4,4,t,e)}function Iy(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Ly(t,e,r){return r=r!=null?r.concat([t]):null,mu(4,4,Iy.bind(null,e,t),r)}function af(){}function $y(t,e){var r=Ut();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&rf(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Dy(t,e){var r=Ut();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&rf(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function My(t,e,r){return ps&21?(sr(r,e)||(r=Vv(),Ae.lanes|=r,ms|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,gt=!0),t.memoizedState=r)}function IS(t,e){var r=ye;ye=r!==0&&4>r?r:4,t(!0);var n=fc.transition;fc.transition={};try{t(!1),e()}finally{ye=r,fc.transition=n}}function Uy(){return Ut().memoizedState}function LS(t,e,r){var n=En(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Fy(t))zy(e,r);else if(r=_y(t,e,r,n),r!==null){var s=ct();nr(r,t,n,s),By(r,e,n)}}function $S(t,e,r){var n=En(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Fy(t))zy(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,sr(a,o)){var l=e.interleaved;l===null?(s.next=s,Zh(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=_y(t,e,s,n),r!==null&&(s=ct(),nr(r,t,n,s),By(r,e,n))}}function Fy(t){var e=t.alternate;return t===Ae||e!==null&&e===Ae}function zy(t,e){vo=Ll=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function By(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Dh(t,r)}}var $l={readContext:Mt,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useInsertionEffect:rt,useLayoutEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useMutableSource:rt,useSyncExternalStore:rt,useId:rt,unstable_isNewReconciler:!1},DS={readContext:Mt,useCallback:function(t,e){return dr().memoizedState=[t,e===void 0?null:e],t},useContext:Mt,useEffect:zp,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,ol(4194308,4,Iy.bind(null,e,t),r)},useLayoutEffect:function(t,e){return ol(4194308,4,t,e)},useInsertionEffect:function(t,e){return ol(4,2,t,e)},useMemo:function(t,e){var r=dr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=dr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=LS.bind(null,Ae,t),[n.memoizedState,t]},useRef:function(t){var e=dr();return t={current:t},e.memoizedState=t},useState:Fp,useDebugValue:af,useDeferredValue:function(t){return dr().memoizedState=t},useTransition:function(){var t=Fp(!1),e=t[0];return t=IS.bind(null,t[1]),dr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ae,s=dr();if(Re){if(r===void 0)throw Error(N(407));r=r()}else{if(r=e(),Ke===null)throw Error(N(349));ps&30||Cy(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,zp(Ry.bind(null,n,i,t),[t]),n.flags|=2048,Fo(9,Ty.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=dr(),e=Ke.identifierPrefix;if(Re){var r=Ir,n=jr;r=(n&~(1<<32-rr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Mo++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=jS++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},MS={readContext:Mt,useCallback:$y,useContext:Mt,useEffect:of,useImperativeHandle:Ly,useInsertionEffect:Ny,useLayoutEffect:jy,useMemo:Dy,useReducer:pc,useRef:Oy,useState:function(){return pc(Uo)},useDebugValue:af,useDeferredValue:function(t){var e=Ut();return My(e,Ve.memoizedState,t)},useTransition:function(){var t=pc(Uo)[0],e=Ut().memoizedState;return[t,e]},useMutableSource:ky,useSyncExternalStore:Ey,useId:Uy,unstable_isNewReconciler:!1},US={readContext:Mt,useCallback:$y,useContext:Mt,useEffect:of,useImperativeHandle:Ly,useInsertionEffect:Ny,useLayoutEffect:jy,useMemo:Dy,useReducer:mc,useRef:Oy,useState:function(){return mc(Uo)},useDebugValue:af,useDeferredValue:function(t){var e=Ut();return Ve===null?e.memoizedState=t:My(e,Ve.memoizedState,t)},useTransition:function(){var t=mc(Uo)[0],e=Ut().memoizedState;return[t,e]},useMutableSource:ky,useSyncExternalStore:Ey,useId:Uy,unstable_isNewReconciler:!1};function Gt(t,e){if(t&&t.defaultProps){e=Oe({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function yd(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Oe({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var gu={isMounted:function(t){return(t=t._reactInternals)?xs(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ct(),s=En(t),i=Lr(n,s);i.payload=e,r!=null&&(i.callback=r),e=Sn(t,i,s),e!==null&&(nr(e,t,s,n),sl(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ct(),s=En(t),i=Lr(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=Sn(t,i,s),e!==null&&(nr(e,t,s,n),sl(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ct(),n=En(t),s=Lr(r,n);s.tag=2,e!=null&&(s.callback=e),e=Sn(t,s,n),e!==null&&(nr(e,t,n,r),sl(e,t,n))}};function Bp(t,e,r,n,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!No(r,n)||!No(s,i):!0}function Vy(t,e,r){var n=!1,s=An,i=e.contextType;return typeof i=="object"&&i!==null?i=Mt(i):(s=yt(e)?hs:ot.current,n=e.contextTypes,i=(n=n!=null)?xi(t,s):An),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=gu,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Vp(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&gu.enqueueReplaceState(e,e.state,null)}function wd(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},Yh(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Mt(i):(i=yt(e)?hs:ot.current,s.context=xi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(yd(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&gu.enqueueReplaceState(s,s.state,null),jl(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Ci(t,e){try{var r="",n=e;do r+=fx(n),n=n.return;while(n);var s=r}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function gc(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function bd(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var FS=typeof WeakMap=="function"?WeakMap:Map;function Hy(t,e,r){r=Lr(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Ml||(Ml=!0,Ad=n),bd(t,e)},r}function Wy(t,e,r){r=Lr(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){bd(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){bd(t,e),typeof n!="function"&&(kn===null?kn=new Set([this]):kn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function Hp(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new FS;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=ek.bind(null,t,e,r),e.then(t,t))}function Wp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function qp(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Lr(-1,1),e.tag=2,Sn(r,e,1))),r.lanes|=1),t)}var zS=Vr.ReactCurrentOwner,gt=!1;function lt(t,e,r,n){e.child=t===null?by(e,null,r,n):ki(e,t.child,r,n)}function Kp(t,e,r,n,s){r=r.render;var i=e.ref;return ai(e,s),n=nf(t,e,r,n,i,s),r=sf(),t!==null&&!gt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ur(t,e,s)):(Re&&r&&Wh(e),e.flags|=1,lt(t,e,n,s),e.child)}function Gp(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!mf(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,qy(t,e,i,n,s)):(t=cl(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:No,r(o,n)&&t.ref===e.ref)return Ur(t,e,s)}return e.flags|=1,t=Cn(i,n),t.ref=e.ref,t.return=e,e.child=t}function qy(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(No(i,n)&&t.ref===e.ref)if(gt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(gt=!0);else return e.lanes=t.lanes,Ur(t,e,s)}return _d(t,e,r,n,s)}function Ky(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},_e(ti,bt),bt|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,_e(ti,bt),bt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,_e(ti,bt),bt|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,_e(ti,bt),bt|=n;return lt(t,e,s,r),e.child}function Gy(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function _d(t,e,r,n,s){var i=yt(r)?hs:ot.current;return i=xi(e,i),ai(e,s),r=nf(t,e,r,n,i,s),n=sf(),t!==null&&!gt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ur(t,e,s)):(Re&&n&&Wh(e),e.flags|=1,lt(t,e,r,s),e.child)}function Qp(t,e,r,n,s){if(yt(r)){var i=!0;Rl(e)}else i=!1;if(ai(e,s),e.stateNode===null)al(t,e),Vy(e,r,n),wd(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Mt(u):(u=yt(r)?hs:ot.current,u=xi(e,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)&&Vp(e,o,n,u),tn=!1;var f=e.memoizedState;o.state=f,jl(e,n,o,s),l=e.memoizedState,a!==n||f!==l||vt.current||tn?(typeof c=="function"&&(yd(e,r,c,n),l=e.memoizedState),(a=tn||Bp(e,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"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,xy(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Gt(e.type,a),o.props=u,d=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Mt(l):(l=yt(r)?hs:ot.current,l=xi(e,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)&&Vp(e,o,n,l),tn=!1,f=e.memoizedState,o.state=f,jl(e,n,o,s);var b=e.memoizedState;a!==d||f!==b||vt.current||tn?(typeof h=="function"&&(yd(e,r,h,n),b=e.memoizedState),(u=tn||Bp(e,r,u,n,f,b,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,b,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,b,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=b),o.props=n,o.state=b,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return xd(t,e,r,n,i,s)}function xd(t,e,r,n,s,i){Gy(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&Ip(e,r,!1),Ur(t,e,i);n=e.stateNode,zS.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ki(e,t.child,null,i),e.child=ki(e,null,a,i)):lt(t,e,a,i),e.memoizedState=n.state,s&&Ip(e,r,!0),e.child}function Qy(t){var e=t.stateNode;e.pendingContext?jp(t,e.pendingContext,e.pendingContext!==e.context):e.context&&jp(t,e.context,!1),Xh(t,e.containerInfo)}function Jp(t,e,r,n,s){return Si(),Kh(s),e.flags|=256,lt(t,e,r,n),e.child}var Sd={dehydrated:null,treeContext:null,retryLane:0};function kd(t){return{baseLanes:t,cachePool:null,transitions:null}}function Jy(t,e,r){var n=e.pendingProps,s=Pe.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),_e(Pe,s&1),t===null)return gd(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=wu(o,n,0,null),t=ds(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=kd(r),e.memoizedState=Sd,t):lf(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return BS(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Cn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Cn(a,i):(i=ds(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?kd(r):{base
vendor: 8,213 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Sd,n}return i=t.child,t=i.sibling,n=Cn(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function lf(t,e){return e=wu({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Na(t,e,r,n){return n!==null&&Kh(n),ki(e,t.child,null,r),t=lf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function BS(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=gc(Error(N(422))),Na(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=wu({mode:"visible",children:n.children},s,0,null),i=ds(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&ki(e,t.child,null,o),e.child.memoizedState=kd(o),e.memoizedState=Sd,i);if(!(e.mode&1))return Na(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(N(419)),n=gc(i,n,void 0),Na(t,e,o,n)}if(a=(o&t.childLanes)!==0,gt||a){if(n=Ke,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,Mr(t,s),nr(n,t,s,-1))}return pf(),n=gc(Error(N(421))),Na(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=tk.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,St=xn(s.nextSibling),kt=e,Re=!0,er=null,t!==null&&(It[Lt++]=jr,It[Lt++]=Ir,It[Lt++]=fs,jr=t.id,Ir=t.overflow,fs=e),e=lf(e,n.children),e.flags|=4096,e)}function Zp(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),vd(t.return,e,r)}function vc(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Zy(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(lt(t,e,n.children,r),n=Pe.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Zp(t,r,e);else if(t.tag===19)Zp(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(_e(Pe,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Il(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),vc(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Il(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}vc(e,!0,r,null,i);break;case"together":vc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function al(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ur(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),ms|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(N(153));if(e.child!==null){for(t=e.child,r=Cn(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Cn(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function VS(t,e,r){switch(e.tag){case 3:Qy(e),Si();break;case 5:Sy(e);break;case 1:yt(e.type)&&Rl(e);break;case 4:Xh(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;_e(Ol,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(_e(Pe,Pe.current&1),e.flags|=128,null):r&e.child.childLanes?Jy(t,e,r):(_e(Pe,Pe.current&1),t=Ur(t,e,r),t!==null?t.sibling:null);_e(Pe,Pe.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Zy(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),_e(Pe,Pe.current),n)break;return null;case 22:case 23:return e.lanes=0,Ky(t,e,r)}return Ur(t,e,r)}var Yy,Ed,Xy,ew;Yy=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ed=function(){};Xy=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,ts(br.current);var i=null;switch(r){case"input":s=Kc(t,s),n=Kc(t,n),i=[];break;case"select":s=Oe({},s,{value:void 0}),n=Oe({},n,{value:void 0}),i=[];break;case"textarea":s=Jc(t,s),n=Jc(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Cl)}Yc(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"&&(Eo.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"&&(Eo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ee("scroll",t),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};ew=function(t,e,r,n){r!==n&&(e.flags|=4)};function Yi(t,e){if(!Re)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function nt(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function HS(t,e,r){var n=e.pendingProps;switch(qh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(e),null;case 1:return yt(e.type)&&Tl(),nt(e),null;case 3:return n=e.stateNode,Ei(),Ce(vt),Ce(ot),tf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Aa(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,er!==null&&(jd(er),er=null))),Ed(t,e),nt(e),null;case 5:ef(e);var s=ts(Do.current);if(r=e.type,t!==null&&e.stateNode!=null)Xy(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(N(166));return nt(e),null}if(t=ts(br.current),Aa(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[vr]=e,n[Lo]=i,t=(e.mode&1)!==0,r){case"dialog":Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":case"embed":Ee("load",n);break;case"video":case"audio":for(s=0;s<oo.length;s++)Ee(oo[s],n);break;case"source":Ee("error",n);break;case"img":case"image":case"link":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"input":op(n,i),Ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",n);break;case"textarea":lp(n,i),Ee("invalid",n)}Yc(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 34,670 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Pa(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Pa(n.textContent,a,t),s=["children",""+a]):Eo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ee("scroll",n)}switch(r){case"input":_a(n),ap(n,i,!0);break;case"textarea":_a(n),up(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Cl)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Rv(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[vr]=e,t[Lo]=n,Yy(t,e,!1,!1),e.stateNode=t;e:{switch(o=Xc(r,n),r){case"dialog":Ee("cancel",t),Ee("close",t),s=n;break;case"iframe":case"object":case"embed":Ee("load",t),s=n;break;case"video":case"audio":for(s=0;s<oo.length;s++)Ee(oo[s],t);s=n;break;case"source":Ee("error",t),s=n;break;case"img":case"image":case"link":Ee("error",t),Ee("load",t),s=n;break;case"details":Ee("toggle",t),s=n;break;case"input":op(t,n),s=Kc(t,n),Ee("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=Oe({},n,{value:void 0}),Ee("invalid",t);break;case"textarea":lp(t,n),s=Jc(t,n),Ee("invalid",t);break;default:s=n}Yc(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Ov(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Pv(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Co(t,l):typeof l=="number"&&Co(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Eo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",t):l!=null&&Oh(t,i,l,o))}switch(r){case"input":_a(t),ap(t,n,!1);break;case"textarea":_a(t),up(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Pn(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?ni(t,!!n.multiple,i,!1):n.defaultValue!=null&&ni(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Cl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return nt(e),null;case 6:if(t&&e.stateNode!=null)ew(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(N(166));if(r=ts(Do.current),ts(br.current),Aa(e)){if(n=e.stateNode,r=e.memoizedProps,n[vr]=e,(i=n.nodeValue!==r)&&(t=kt,t!==null))switch(t.tag){case 3:Pa(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Pa(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[vr]=e,e.stateNode=n}return nt(e),null;case 13:if(Ce(Pe),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Re&&St!==null&&e.mode&1&&!(e.flags&128))yy(),Si(),e.flags|=98560,i=!1;else if(i=Aa(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(N(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(N(317));i[vr]=e}else Si(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;nt(e),i=!1}else er!==null&&(jd(er),er=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Pe.current&1?He===0&&(He=3):pf())),e.updateQueue!==null&&(e.flags|=4),nt(e),null);case 4:return Ei(),Ed(t,e),t===null&&jo(e.stateNode.containerInfo),nt(e),null;case 10:return Jh(e.type._context),nt(e),null;case 17:return yt(e.type)&&Tl(),nt(e),null;case 19:if(Ce(Pe),i=e.memoizedState,i===null)return nt(e),null;if(n=(e.flags&128)!==0,o=i.rendering,o===null)if(n)Yi(i,!1);else{if(He!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Il(t),o!==null){for(e.flags|=128,Yi(i,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return _e(Pe,Pe.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ue()>Ti&&(e.flags|=128,n=!0,Yi(i,!1),e.lanes=4194304)}else{if(!n)if(t=Il(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Yi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Re)return nt(e),null}else 2*Ue()-i.renderingStartTime>Ti&&r!==1073741824&&(e.flags|=128,n=!0,Yi(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ue(),e.sibling=null,r=Pe.current,_e(Pe,n?r&1|2:r&1),e):(nt(e),null);case 22:case 23:return ff(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?bt&1073741824&&(nt(e),e.subtreeFlags&6&&(e.flags|=8192)):nt(e),null;case 24:return null;case 25:return null}throw Error(N(156,e.tag))}function WS(t,e){switch(qh(e),e.tag){case 1:return yt(e.type)&&Tl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ei(),Ce(vt),Ce(ot),tf(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ef(e),null;case 13:if(Ce(Pe),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(N(340));Si()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ce(Pe),null;case 4:return Ei(),null;case 10:return Jh(e.type._context),null;case 22:case 23:return ff(),null;case 24:return null;default:return null}}var ja=!1,it=!1,qS=typeof WeakSet=="function"?WeakSet:Set,z=null;function ei(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){De(t,e,n)}else r.current=null}function Cd(t,e,r){try{r()}catch(n){De(t,e,n)}}var Yp=!1;function KS(t,e){if(ud=Sl,t=iy(),Hh(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===r&&++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(cd={focusedElem:t,selectionRange:r},Sl=!1,z=e;z!==null;)if(e=z,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,z=t;else for(;z!==null;){e=z;try{var b=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var p=b.memoizedProps,w=b.memoizedState,g=e.stateNode,m=g.getSnapshotBeforeUpdate(e.elementType===e.type?p:Gt(e.type,p),w);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(x){De(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,z=t;break}z=e.return}return b=Yp,Yp=!1,b}function yo(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Cd(e,r,i)}s=s.next}while(s!==n)}}function vu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Td(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function tw(t){var e=t.alternate;e!==null&&(t.alternate=null,tw(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[vr],delete e[Lo],delete e[fd],delete e[PS],delete e[AS])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function rw(t){return t.tag===5||t.tag===3||t.tag===4}function Xp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||rw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Rd(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Cl));else if(n!==4&&(t=t.child,t!==null))for(Rd(t,e,r),t=t.sibling;t!==null;)Rd(t,e,r),t=t.sibling}function Pd(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Pd(t,e,r),t=t.sibling;t!==null;)Pd(t,e,r),t=t.sibling}var Je=null,Xt=!1;function Qr(t,e,r){for(r=r.child;r!==null;)nw(t,e,r),r=r.sibling}function nw(t,e,r){if(wr&&typeof wr.onCommitFiberUnmount=="function")try{wr.onCommitFiberUnmount(uu,r)}catch{}switch(r.tag){case 5:it||ei(r,e);case 6:var n=Je,s=Xt;Je=null,Qr(t,e,r),Je=n,Xt=s,Je!==null&&(Xt?(t=Je,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Je.removeChild(r.stateNode));break;case 18:Je!==null&&(Xt?(t=Je,r=r.stateNode,t.nodeType===8?cc(t.parentNode,r):t.nodeType===1&&cc(t,r),Ao(t)):cc(Je,r.stateNode));break;case 4:n=Je,s=Xt,Je=r.stateNode.containerInfo,Xt=!0,Qr(t,e,r),Je=n,Xt=s;break;case 0:case 11:case 14:case 15:if(!it&&(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)&&Cd(r,e,o),s=s.next}while(s!==n)}Qr(t,e,r);break;case 1:if(!it&&(ei(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){De(r,e,a)}Qr(t,e,r);break;case 21:Qr(t,e,r);break;case 22:r.mode&1?(it=(n=it)||r.memoizedState!==null,Qr(t,e,r),it=n):Qr(t,e,r);break;default:Qr(t,e,r)}}function em(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new qS),e.forEach(function(n){var s=rk.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Ht(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Je=a.stateNode,Xt=!1;break e;case 3:Je=a.stateNode.containerInfo,Xt=!0;break e;case 4:Je=a.stateNode.containerInfo,Xt=!0;break e}a=a.return}if(Je===null)throw Error(N(160));nw(i,o,s),Je=null,Xt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){De(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)sw(e,t),e=e.sibling}function sw(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ht(e,t),ur(t),n&4){try{yo(3,t,t.return),vu(3,t)}catch(p){De(t,t.return,p)}try{yo(5,t,t.return)}catch(p){De(t,t.return,p)}}break;case 1:Ht(e,t),ur(t),n&512&&r!==null&&ei(r,r.return);break;case 5:if(Ht(e,t),ur(t),n&512&&r!==null&&ei(r,r.return),t.flags&32){var s=t.stateNode;try{Co(s,"")}catch(p){De(t,t.return,p)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=r!==null?r.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Cv(s,i),Xc(a,o);var u=Xc(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Ov(s,d):c==="dangerouslySetInnerHTML"?Pv(s,d):c==="children"?Co(s,d):Oh(s,c,d,u)}switch(a){case"input":Gc(s,i);break;case"textarea":Tv(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?ni(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?ni(s,!!i.multiple,i.defaultValue,!0):ni(s,!!i.multiple,i.multiple?[]:"",!1))}s[Lo]=i}catch(p){De(t,t.return,p)}}break;case 6:if(Ht(e,t),ur(t),n&4){if(t.stateNode===null)throw Error(N(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(p){De(t,t.return,p)}}break;case 3:if(Ht(e,t),ur(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ao(e.containerInfo)}catch(p){De(t,t.return,p)}break;case 4:Ht(e,t),ur(t);break;case 13:Ht(e,t),ur(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(df=Ue())),n&4&&em(t);break;case 22:if(c=r!==null&&r.memoizedState!==null,t.mode&1?(it=(u=it)||c,Ht(e,t),it=u):Ht(e,t),ur(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(z=t,c=t.child;c!==null;){for(d=z=c;z!==null;){switch(f=z,h=f.child,f.tag){case 0:case 11:case 14:case 15:yo(4,f,f.return);break;case 1:ei(f,f.return);var b=f.stateNode;if(typeof b.componentWillUnmount=="function"){n=f,r=f.return;try{e=n,b.props=e.memoizedProps,b.state=e.memoizedState,b.componentWillUnmount()}catch(p){De(n,r,p)}}break;case 5:ei(f,f.return);break;case 22:if(f.memoizedState!==null){rm(d);continue}}h!==null?(h.return=f,z=h):rm(d)}c=c.sibling}e:for(c=null,d=t;;){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=Av("display",o))}catch(p){De(t,t.return,p)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(p){De(t,t.return,p)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ht(e,t),ur(t),n&4&&em(t);break;case 21:break;default:Ht(e,t),ur(t)}}function ur(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(rw(r)){var n=r;break e}r=r.return}throw Error(N(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Co(s,""),n.flags&=-33);var i=Xp(t);Pd(t,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Xp(t);Rd(t,a,o);break;default:throw Error(N(161))}}catch(l){De(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function GS(t,e,r){z=t,iw(t)}function iw(t,e,r){for(var n=(t.mode&1)!==0;z!==null;){var s=z,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||ja;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||it;a=ja;var u=it;if(ja=o,(it=l)&&!u)for(z=s;z!==null;)o=z,l=o.child,o.tag===22&&o.memoizedState!==null?nm(s):l!==null?(l.return=o,z=l):nm(s);for(;i!==null;)z=i,iw(i),i=i.sibling;z=s,ja=a,it=u}tm(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,z=i):tm(t)}}function tm(t){for(;z!==null;){var e=z;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:it||vu(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!it)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Gt(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Up(e,i,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Up(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ao(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}it||e.flags&512&&Td(e)}catch(f){De(e,e.return,f)}}if(e===t){z=null;break}if(r=e.sibling,r!==null){r.return=e.return,z=r;break}z=e.return}}function rm(t){for(;z!==null;){var e=z;if(e===t){z=null;break}var r=e.sibling;if(r!==null){r.return=e.return,z=r;break}z=e.return}}function nm(t){for(;z!==null;){var e=z;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{vu(4,e)}catch(l){De(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){De(e,s,l)}}var i=e.return;try{Td(e)}catch(l){De(e,i,l)}break;case 5:var o=e.return;try{Td(e)}catch(l){De(e,o,l)}}}catch(l){De(e,e.return,l)}if(e===t){z=null;break}var a=e.sibling;if(a!==null){a.return=e.return,z=a;break}z=e.return}}var QS=Math.ceil,Dl=Vr.ReactCurrentDispatcher,uf=Vr.ReactCurrentOwner,Dt=Vr.ReactCurrentBatchConfig,ce=0,Ke=null,ze=null,Ze=0,bt=0,ti=Un(0),He=0,zo=null,ms=0,yu=0,cf=0,wo=null,mt=null,df=0,Ti=1/0,Rr=null,Ml=!1,Ad=null,kn=null,Ia=!1,mn=null,Ul=0,bo=0,Od=null,ll=-1,ul=0;function ct(){return ce&6?Ue():ll!==-1?ll:ll=Ue()}function En(t){return t.mode&1?ce&2&&Ze!==0?Ze&-Ze:NS.transition!==null?(ul===0&&(ul=Vv()),ul):(t=ye,t!==0||(t=window.event,t=t===void 0?16:Jv(t.type)),t):1}function nr(t,e,r,n){if(50<bo)throw bo=0,Od=null,Error(N(185));la(t,r,n),(!(ce&2)||t!==Ke)&&(t===Ke&&(!(ce&2)&&(yu|=r),He===4&&sn(t,Ze)),wt(t,n),r===1&&ce===0&&!(e.mode&1)&&(Ti=Ue()+500,pu&&Fn()))}function wt(t,e){var r=t.callbackNode;Nx(t,e);var n=xl(t,t===Ke?Ze:0);if(n===0)r!==null&&hp(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&hp(r),e===1)t.tag===0?OS(sm.bind(null,t)):my(sm.bind(null,t)),TS(function(){!(ce&6)&&Fn()}),r=null;else{switch(Hv(n)){case 1:r=$h;break;case 4:r=zv;break;case 16:r=_l;break;case 536870912:r=Bv;break;default:r=_l}r=fw(r,ow.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function ow(t,e){if(ll=-1,ul=0,ce&6)throw Error(N(327));var r=t.callbackNode;if(li()&&t.callbackNode!==r)return null;var n=xl(t,t===Ke?Ze:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Fl(t,n);else{e=n;var s=ce;ce|=2;var i=lw();(Ke!==t||Ze!==e)&&(Rr=null,Ti=Ue()+500,cs(t,e));do try{YS();break}catch(a){aw(t,a)}while(!0);Qh(),Dl.current=i,ce=s,ze!==null?e=0:(Ke=null,Ze=0,e=He)}if(e!==0){if(e===2&&(s=sd(t),s!==0&&(n=s,e=Nd(t,s))),e===1)throw r=zo,cs(t,0),sn(t,n),wt(t,Ue()),r;if(e===6)sn(t,n);else{if(s=t.current.alternate,!(n&30)&&!JS(s)&&(e=Fl(t,n),e===2&&(i=sd(t),i!==0&&(n=i,e=Nd(t,i))),e===1))throw r=zo,cs(t,0),sn(t,n),wt(t,Ue()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(N(345));case 2:Zn(t,mt,Rr);break;case 3:if(sn(t,n),(n&130023424)===n&&(e=df+500-Ue(),10<e)){if(xl(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){ct(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=hd(Zn.bind(null,t,mt,Rr),e);break}Zn(t,mt,Rr);break;case 4:if(sn(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var o=31-rr(n);i=1<<o,o=e[o],o>s&&(s=o),n&=~i}if(n=s,n=Ue()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*QS(n/1960))-n,10<n){t.timeoutHandle=hd(Zn.bind(null,t,mt,Rr),n);break}Zn(t,mt,Rr);break;case 5:Zn(t,mt,Rr);break;default:throw Error(N(329))}}}return wt(t,Ue()),t.callbackNode===r?ow.bind(null,t):null}function Nd(t,e){var r=wo;return t.current.memoizedState.isDehydrated&&(cs(t,e).flags|=256),t=Fl(t,e),t!==2&&(e=mt,mt=r,e!==null&&jd(e)),t}function jd(t){mt===null?mt=t:mt.push.apply(mt,t)}function JS(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!sr(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function sn(t,e){for(e&=~cf,e&=~yu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-rr(e),n=1<<r;t[r]=-1,e&=~n}}function sm(t){if(ce&6)throw Error(N(327));li();var e=xl(t,0);if(!(e&1))return wt(t,Ue()),null;var r=Fl(t,e);if(t.tag!==0&&r===2){var n=sd(t);n!==0&&(e=n,r=Nd(t,n))}if(r===1)throw r=zo,cs(t,0),sn(t,e),wt(t,Ue()),r;if(r===6)throw Error(N(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Zn(t,mt,Rr),wt(t,Ue()),null}function hf(t,e){var r=ce;ce|=1;try{return t(e)}finally{ce=r,ce===0&&(Ti=Ue()+500,pu&&Fn())}}function gs(t){mn!==null&&mn.tag===0&&!(ce&6)&&li();var e=ce;ce|=1;var r=Dt.transition,n=ye;try{if(Dt.transition=null,ye=1,t)return t()}finally{ye=n,Dt.transition=r,ce=e,!(ce&6)&&Fn()}}function ff(){bt=ti.current,Ce(ti)}function cs(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,CS(r)),ze!==null)for(r=ze.return;r!==null;){var n=r;switch(qh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Tl();break;case 3:Ei(),Ce(vt),Ce(ot),tf();break;case 5:ef(n);break;case 4:Ei();break;case 13:Ce(Pe);break;case 19:Ce(Pe);break;case 10:Jh(n.type._context);break;case 22:case 23:ff()}r=r.return}if(Ke=t,ze=t=Cn(t.current,null),Ze=bt=e,He=0,zo=null,cf=yu=ms=0,mt=wo=null,es!==null){for(e=0;e<es.length;e++)if(r=es[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}es=null}return t}function aw(t,e){do{var r=ze;try{if(Qh(),il.current=$l,Ll){for(var n=Ae.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ll=!1}if(ps=0,qe=Ve=Ae=null,vo=!1,Mo=0,uf.current=null,r===null||r.return===null){He=1,zo=e,ze=null;break}e:{var i=t,o=r.return,a=r,l=e;if(e=Ze,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=Wp(o);if(h!==null){h.flags&=-257,qp(h,o,a,i,e),h.mode&1&&Hp(i,u,e),e=h,l=u;var b=e.updateQueue;if(b===null){var p=new Set;p.add(l),e.updateQueue=p}else b.add(l);break e}else{if(!(e&1)){Hp(i,u,e),pf();break e}l=Error(N(426))}}else if(Re&&a.mode&1){var w=Wp(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),qp(w,o,a,i,e),Kh(Ci(l,a));break e}}i=l=Ci(l,a),He!==4&&(He=2),wo===null?wo=[i]:wo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var g=Hy(i,l,e);Mp(i,g);break e;case 1:a=l;var m=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(kn===null||!kn.has(v)))){i.flags|=65536,e&=-e,i.lanes|=e;var x=Wy(i,a,e);Mp(i,x);break e}}i=i.return}while(i!==null)}cw(r)}catch(S){e=S,ze===r&&r!==null&&(ze=r=r.return);continue}break}while(!0)}function lw(){var t=Dl.current;return Dl.current=$l,t===null?$l:t}function pf(){(He===0||He===3||He===2)&&(He=4),Ke===null||!(ms&268435455)&&!(yu&268435455)||sn(Ke,Ze)}function Fl(t,e){var r=ce;ce|=2;var n=lw();(Ke!==t||Ze!==e)&&(Rr=null,cs(t,e));do try{ZS();break}catch(s){aw(t,s)}while(!0);if(Qh(),ce=r,Dl.current=n,ze!==null)throw Error(N(261));return Ke=null,Ze=0,He}function ZS(){for(;ze!==null;)uw(ze)}function YS(){for(;ze!==null&&!Sx();)uw(ze)}function uw(t){var e=hw(t.alternate,t,bt);t.memoizedProps=t.pendingProps,e===null?cw(t):ze=e,uf.current=null}function cw(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=WS(r,e),r!==null){r.flags&=32767,ze=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{He=6,ze=null;return}}else if(r=HS(r,e,bt),r!==null){ze=r;return}if(e=e.sibling,e!==null){ze=e;return}ze=e=t}while(e!==null);He===0&&(He=5)}function Zn(t,e,r){var n=ye,s=Dt.transition;try{Dt.transition=null,ye=1,XS(t,e,r,n)}finally{Dt.transition=s,ye=n}return null}function XS(t,e,r,n){do li();while(mn!==null);if(ce&6)throw Error(N(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(N(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(jx(t,i),t===Ke&&(ze=Ke=null,Ze=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ia||(Ia=!0,fw(_l,function(){return li(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Dt.transition,Dt.transition=null;var o=ye;ye=1;var a=ce;ce|=4,uf.current=null,KS(t,r),sw(r,t),wS(cd),Sl=!!ud,cd=ud=null,t.current=r,GS(r),kx(),ce=a,ye=o,Dt.transition=i}else t.current=r;if(Ia&&(Ia=!1,mn=t,Ul=s),i=t.pendingLanes,i===0&&(kn=null),Tx(r.stateNode),wt(t,Ue()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Ml)throw Ml=!1,t=Ad,Ad=null,t;return Ul&1&&t.tag!==0&&li(),i=t.pendingLanes,i&1?t===Od?bo++:(bo=0,Od=t):bo=0,Fn(),null}function li(){if(mn!==null){var t=Hv(Ul),e=Dt.transition,r=ye;try{if(Dt.transition=null,ye=16>t?16:t,mn===null)var n=!1;else{if(t=mn,mn=null,Ul=0,ce&6)throw Error(N(331));var s=ce;for(ce|=4,z=t.current;z!==null;){var i=z,o=i.child;if(z.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(z=u;z!==null;){var c=z;switch(c.tag){case 0:case 11:case 15:yo(8,c,i)}var d=c.child;if(d!==null)d.return=c,z=d;else for(;z!==null;){c=z;var f=c.sibling,h=c.return;if(tw(c),c===u){z=null;break}if(f!==null){f.return=h,z=f;break}z=h}}}var b=i.alternate;if(b!==null){var p=b.child;if(p!==null){b.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}z=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,z=o;else e:for(;z!==null;){if(i=z,i.flags&2048)switch(i.tag){case 0:case 11:case 15:yo(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,z=g;break e}z=i.return}}var m=t.current;for(z=m;z!==null;){o=z;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,z=v;else e:for(o=m;z!==null;){if(a=z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:vu(9,a)}}catch(S){De(a,a.return,S)}if(a===o){z=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,z=x;break e}z=a.return}}if(ce=s,Fn(),wr&&typeof wr.onPostCommitFiberRoot=="function")try{wr.onPostCommitFiberRoot(uu,t)}catch{}n=!0}return n}finally{ye=r,Dt.transition=e}}return!1}function im(t,e,r){e=Ci(r,e),e=Hy(t,e,1),t=Sn(t,e,1),e=ct(),t!==null&&(la(t,1,e),wt(t,e))}function De(t,e,r){if(t.tag===3)im(t,t,r);else for(;e!==null;){if(e.tag===3){im(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(kn===null||!kn.has(n))){t=Ci(r,t),t=Wy(e,t,1),e=Sn(e,t,1),t=ct(),e!==null&&(la(e,1,t),wt(e,t));break}}e=e.return}}function ek(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ct(),t.pingedLanes|=t.suspendedLanes&r,Ke===t&&(Ze&r)===r&&(He===4||He===3&&(Ze&130023424)===Ze&&500>Ue()-df?cs(t,0):cf|=r),wt(t,e)}function dw(t,e){e===0&&(t.mode&1?(e=ka,ka<<=1,!(ka&130023424)&&(ka=4194304)):e=1);var r=ct();t=Mr(t,e),t!==null&&(la(t,e,r),wt(t,r))}function tk(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),dw(t,r)}function rk(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(N(314))}n!==null&&n.delete(e),dw(t,r)}var hw;hw=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||vt.current)gt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return gt=!1,VS(t,e,r);gt=!!(t.flags&131072)}else gt=!1,Re&&e.flags&1048576&&gy(e,Al,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;al(t,e),t=e.pendingProps;var s=xi(e,ot.current);ai(e,r),s=nf(null,e,n,t,s,r);var i=sf();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,yt(n)?(i=!0,Rl(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Yh(e),s.updater=gu,e.stateNode=s,s._reactInternals=e,wd(e,n,t,r),e=xd(null,e,n,!0,i,r)):(e.tag=0,Re&&i&&Wh(e),lt(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(al(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=sk(n),t=Gt(n,t),s){case 0:e=_d(null,e,n,t,r);break e;case 1:e=Qp(null,e,n,t,r);break e;case 11:e=Kp(null,e,n,t,r);break e;case 14:e=Gp(null,e,n,Gt(n.type,t),r);break e}throw Error(N(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),_d(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),Qp(t,e,n,s,r);case 3:e:{if(Qy(e),t===null)throw Error(N(387));n=e.pendingProps,i=e.memoizedState,s=i.element,xy(t,e),jl(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Ci(Error(N(423)),e),e=Jp(t,e,n,r,s);break e}else if(n!==s){s=Ci(Error(N(424)),e),e=Jp(t,e,n,r,s);break e}else for(St=xn(e.stateNode.containerInfo.firstChild),kt=e,Re=!0,er=null,r=by(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Si(),n===s){e=Ur(t,e,r);break e}lt(t,e,n,r)}e=e.child}return e;case 5:return Sy(e),t===null&&gd(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,dd(n,s)?o=null:i!==null&&dd(n,i)&&(e.flags|=32),Gy(t,e),lt(t,e,o,r),e.child;case 6:return t===null&&gd(e),null;case 13:return Jy(t,e,r);case 4:return Xh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ki(e,null,n,r):lt(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),Kp(t,e,n,s,r);case 7:return lt(t,e,e.pendingProps,r),e.child;case 8:return lt(t,e,e.pendingProps.children,r),e.child;case 12:return lt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,_e(Ol,n._currentValue),n._currentValue=o,i!==null)if(sr(i.value,o)){if(i.children===s.children&&!vt.current){e=Ur(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Lr(-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),vd(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(N(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),vd(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}lt(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,ai(e,r),s=Mt(s),n=n(s),e.flags|=1,lt(t,e,n,r),e.child;case 14:return n=e.type,s=Gt(n,e.pendingProps),s=Gt(n.type,s),Gp(t,e,n,s,r);case 15:return qy(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Gt(n,s),al(t,e),e.tag=1,yt(n)?(t=!0,Rl(e)):t=!1,ai(e,r),Vy(e,n,s),wd(e,n,s,r),xd(null,e,n,!0,t,r);case 19:return Zy(t,e,r);case 22:return Ky(t,e,r)}throw Error(N(156,e.tag))};function fw(t,e){return Fv(t,e)}function nk(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(t,e,r,n){return new nk(t,e,r,n)}function mf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sk(t){if(typeof t=="function")return mf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===jh)return 11;if(t===Ih)return 14}return 2}function Cn(t,e){var r=t.alternate;return r===null?(r=$t(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function cl(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")mf(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ws:return ds(r.children,s,i,e);case Nh:o=8,s|=8;break;case Vc:return t=$t(12,r,e,s|2),t.elementType=Vc,t.lanes=i,t;case Hc:return t=$t(13,r,e,s),t.elementType=Hc,t.lanes=i,t;case Wc:return t=$t(19,r,e,s),t.elementType=Wc,t.lanes=i,t;case Sv:return wu(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case _v:o=10;break e;case xv:o=9;break e;case jh:o=11;break e;case Ih:o=14;break e;case en:o=16,n=null;break e}throw Error(N(130,t==null?t:typeof t,""))}return e=$t(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function ds(t,e,r,n){return t=$t(7,t,n,e),t.lanes=r,t}function wu(t,e,r,n){return t=$t(22,t,n,e),t.elementType=Sv,t.lanes=r,t.stateNode={isHidden:!1},t}function yc(t,e,r){return t=$t(6,t,null,e),t.lanes=r,t}function wc(t,e,r){return e=$t(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ik(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xu(0),this.expirationTimes=Xu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gf(t,e,r,n,s,i,o,a,l){return t=new ik(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=$t(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yh(i),t}function ok(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,591 bytes, line 40
40return{$$typeof:Hs,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function pw(t){if(!t)return An;t=t._reactInternals;e:{if(xs(t)!==t||t.tag!==1)throw Error(N(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(yt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(N(171))}if(t.tag===1){var r=t.type;if(yt(r))return py(t,r,e)}return e}function mw(t,e,r,n,s,i,o,a,l){return t=gf(r,n,!0,t,s,i,o,a,l),t.context=pw(null),r=t.current,n=ct(),s=En(r),i=Lr(n,s),i.callback=e??null,Sn(r,i,s),t.current.lanes=s,la(t,s,n),wt(t,n),t}function bu(t,e,r,n){var s=e.current,i=ct(),o=En(s);return r=pw(r),e.context===null?e.context=r:e.pendingContext=r,e=Lr(i,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Sn(s,e,o),t!==null&&(nr(t,s,o,i),sl(t,s,o)),o}function zl(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function om(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function vf(t,e){om(t,e),(t=t.alternate)&&om(t,e)}function ak(){return null}var gw=typeof reportError=="function"?reportError:function(t){console.error(t)};function yf(t){this._internalRoot=t}_u.prototype.render=yf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(N(409));bu(t,e,null,null)};_u.prototype.unmount=yf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;gs(function(){bu(null,t,null,null)}),e[Dr]=null}};function _u(t){this._internalRoot=t}_u.prototype.unstable_scheduleHydration=function(t){if(t){var e=Kv();t={blockedOn:null,target:t,priority:e};for(var r=0;r<nn.length&&e!==0&&e<nn[r].priority;r++);nn.splice(r,0,t),r===0&&Qv(t)}};function wf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function xu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function am(){}function lk(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=zl(o);i.call(u)}}var o=mw(e,n,t,0,null,!1,!1,"",am);return t._reactRootContainer=o,t[Dr]=o.current,jo(t.nodeType===8?t.parentNode:t),gs(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=zl(l);a.call(u)}}var l=gf(t,0,!1,null,null,!1,!1,"",am);return t._reactRootContainer=l,t[Dr]=l.current,jo(t.nodeType===8?t.parentNode:t),gs(function(){bu(e,l,r,n)}),l}function Su(t,e,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=zl(o);a.call(l)}}bu(e,o,t,s)}else o=lk(r,e,t,s,n);return zl(o)}Wv=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=io(e.pendingLanes);r!==0&&(Dh(e,r|1),wt(e,Ue()),!(ce&6)&&(Ti=Ue()+500,Fn()))}break;case 13:gs(function(){var n=Mr(t,1);if(n!==null){var s=ct();nr(n,t,1,s)}}),vf(t,1)}};Mh=function(t){if(t.tag===13){var e=Mr(t,134217728);if(e!==null){var r=ct();nr(e,t,134217728,r)}vf(t,134217728)}};qv=function(t){if(t.tag===13){var e=En(t),r=Mr(t,e);if(r!==null){var n=ct();nr(r,t,e,n)}vf(t,e)}};Kv=function(){return ye};Gv=function(t,e){var r=ye;try{return ye=t,e()}finally{ye=r}};td=function(t,e,r){switch(e){case"input":if(Gc(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=fu(n);if(!s)throw Error(N(90));Ev(n),Gc(n,s)}}}break;case"textarea":Tv(t,r);break;case"select":e=r.value,e!=null&&ni(t,!!r.multiple,e,!1)}};Iv=hf;Lv=gs;var uk={usingClientEntryPoint:!1,Events:[ca,Qs,fu,Nv,jv,hf]},Xi={findFiberByHostInstance:Xn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ck={bundleType:Xi.bundleType,version:Xi.version,rendererPackageName:Xi.rendererPackageName,rendererConfig:Xi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Mv(t),t===null?null:t.stateNode},findFiberByHostInstance:Xi.findFiberByHostInstance||ak,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 La=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!La.isDisabled&&La.supportsFiber)try{uu=La.inject(ck),wr=La}catch{}}Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uk;Rt.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wf(e))throw Error(N(200));return ok(t,e,null,r)};Rt.createRoot=function(t,e){if(!wf(t))throw Error(N(299));var r=!1,n="",s=gw;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=gf(t,1,!1,null,null,r,!1,n,s),t[Dr]=e.current,jo(t.nodeType===8?t.parentNode:t),new yf(e)};Rt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(N(188)):(t=Object.keys(t).join(","),Error(N(268,t)));return t=Mv(e),t=t===null?null:t.stateNode,t};Rt.flushSync=function(t){return gs(t)};Rt.hydrate=function(t,e,r){if(!xu(e))throw Error(N(200));return Su(null,t,e,!0,r)};Rt.hydrateRoot=function(t,e,r){if(!wf(t))throw Error(N(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=gw;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=mw(e,null,t,1,r??null,s,!1,i,o),t[Dr]=e.current,jo(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new _u(e)};Rt.render=function(t,e,r){if(!xu(e))throw Error(N(200));return Su(null,t,e,!1,r)};Rt.unmountComponentAtNode=function(t){if(!xu(t))throw Error(N(40));return t._reactRootContainer?(gs(function(){Su(null,null,t,!1,function(){t._reactRootContainer=null,t[Dr]=null})}),!0):!1};Rt.unstable_batchedUpdates=hf;Rt.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!xu(r))throw Error(N(200));if(t==null||t._reactInternals===void 0)throw Error(N(38));return Su(t,e,r,!1,n)};Rt.version="18.3.1-next-f1338f8080-20240426";function vw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vw)}catch(t){console.error(t)}}vw(),vv.exports=Rt;var Ss=vv.exports;const yw=iv(Ss);var ww,lm=Ss;ww=lm.createRoot,lm.hydrateRoot;var ku=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Eu=typeof window>"u"||"Deno"in globalThis;function Qt(){}function dk(t,e){return typeof t=="function"?t(e):t}function hk(t){return typeof t=="number"&&t>=0&&t!==1/0}function fk(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Id(t,e){return typeof t=="function"?t(e):t}function pk(t,e){return typeof t=="function"?t(e):t}function um(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==bf(o,e.options))return!1}else if(!Vo(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function cm(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(Bo(e.options.mutationKey)!==Bo(i))return!1}else if(!Vo(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function bf(t,e){return((e==null?void 0:e.queryKeyHashFn)||Bo)(t)}function Bo(t){return JSON.stringify(t,(e,r)=>Ld(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Vo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Vo(t[r],e[r])):!1}function bw(t,e){if(t===e)return t;const r=dm(t)&&dm(e);if(r||Ld(t)&&Ld(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<o;c++){const d=r?c:i[c];(!r&&l.has(d)||r)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,u++):(a[d]=bw(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&u++)}return s===o&&u===s?t:a}return e}function dm(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ld(t){if(!hm(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!hm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function hm(t){return Object.prototype.toString.call(t)==="[object Object]"}function mk(t){return new Promise(e=>{setTimeout(e,t)})}function gk(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?bw(t,e):e}function vk(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function yk(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var _f=Symbol();function _w(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===_f?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ss,un,fi,Zg,wk=(Zg=class extends ku{constructor(){super();fe(this,ss);fe(this,un);fe(this,fi);ne(this,fi,e=>{if(!Eu&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,un)||this.setEventListener(R(this,fi))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,un))==null||e.call(this),ne(this,un,void 0))}setEventListener(e){var r;ne(this,fi,e),(r=R(this,un))==null||r.call(this),ne(this,un,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){R(this,ss)!==e&&(ne(this,ss,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 13,877 bytes, line 40
40this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof R(this,ss)=="boolean"?R(this,ss):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ss=new WeakMap,un=new WeakMap,fi=new WeakMap,Zg),xw=new wk,pi,cn,mi,Yg,bk=(Yg=class extends ku{constructor(){super();fe(this,pi,!0);fe(this,cn);fe(this,mi);ne(this,mi,e=>{if(!Eu&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){R(this,cn)||this.setEventListener(R(this,mi))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,cn))==null||e.call(this),ne(this,cn,void 0))}setEventListener(e){var r;ne(this,mi,e),(r=R(this,cn))==null||r.call(this),ne(this,cn,e(this.setOnline.bind(this)))}setOnline(e){R(this,pi)!==e&&(ne(this,pi,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return R(this,pi)}},pi=new WeakMap,cn=new WeakMap,mi=new WeakMap,Yg),Bl=new bk;function _k(){let t,e;const r=new Promise((s,i)=>{t=s,e=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function xk(t){return Math.min(1e3*2**t,3e4)}function Sw(t){return(t??"online")==="online"?Bl.isOnline():!0}var kw=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function bc(t){return t instanceof kw}function Ew(t){let e=!1,r=0,n=!1,s;const i=_k(),o=p=>{var w;n||(f(new kw(p)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>xw.isFocused()&&(t.networkMode==="always"||Bl.isOnline())&&t.canRun(),c=()=>Sw(t.networkMode)&&t.canRun(),d=p=>{var w;n||(n=!0,(w=t.onSuccess)==null||w.call(t,p),s==null||s(),i.resolve(p))},f=p=>{var w;n||(n=!0,(w=t.onError)==null||w.call(t,p),s==null||s(),i.reject(p))},h=()=>new Promise(p=>{var w;s=g=>{(n||u())&&p(g)},(w=t.onPause)==null||w.call(t)}).then(()=>{var p;s=void 0,n||(p=t.onContinue)==null||p.call(t)}),b=()=>{if(n)return;let p;const w=r===0?t.initialPromise:void 0;try{p=w??t.fn()}catch(g){p=Promise.reject(g)}Promise.resolve(p).then(d).catch(g=>{var k;if(n)return;const m=t.retry??(Eu?0:3),v=t.retryDelay??xk,x=typeof v=="function"?v(r,g):v,S=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,g);if(e||!S){f(g);return}r++,(k=t.onFail)==null||k.call(t,r,g),mk(x).then(()=>u()?void 0:h()).then(()=>{e?f(g):b()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?b():h().then(b),i)}}var Sk=t=>setTimeout(t,0);function kk(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=Sk;const i=a=>{e?t.push(a):s(()=>{r(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var ut=kk(),is,Xg,Cw=(Xg=class{constructor(){fe(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hk(this.gcTime)&&ne(this,is,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Eu?1/0:5*60*1e3))}clearGcTimeout(){R(this,is)&&(clearTimeout(R(this,is)),ne(this,is,void 0))}},is=new WeakMap,Xg),gi,os,jt,as,st,ia,ls,Zt,Cr,ev,Ek=(ev=class extends Cw{constructor(e){super();fe(this,Zt);fe(this,gi);fe(this,os);fe(this,jt);fe(this,as);fe(this,st);fe(this,ia);fe(this,ls);ne(this,ls,!1),ne(this,ia,e.defaultOptions),this.setOptions(e.options),this.observers=[],ne(this,as,e.client),ne(this,jt,R(this,as).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ne(this,gi,Tk(this.options)),this.state=e.state??R(this,gi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,st))==null?void 0:e.promise}setOptions(e){this.options={...R(this,ia),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,jt).remove(this)}setData(e,r){const n=gk(this.state.data,e,this.options);return tt(this,Zt,Cr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){tt(this,Zt,Cr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=R(this,st))==null?void 0:n.promise;return(s=R(this,st))==null||s.cancel(e),r?r.then(Qt).catch(Qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,gi))}isActive(){return this.observers.some(e=>pk(e.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(e=>Id(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!fk(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,st))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,st))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,jt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(R(this,st)&&(R(this,ls)?R(this,st).cancel({revert:!0}):R(this,st).cancelRetry()),this.scheduleGc()),R(this,jt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,Zt,Cr).call(this,{type:"invalidate"})}fetch(e,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(R(this,st))return R(this,st).continueRetry(),R(this,st).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ne(this,ls,!0),n.signal)})},i=()=>{const f=_w(this.options,r),b=(()=>{const p={client:R(this,as),queryKey:this.queryKey,meta:this.meta};return s(p),p})();return ne(this,ls,!1),this.options.persister?this.options.persister(f,b,this):f(b)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,as),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),ne(this,os,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&tt(this,Zt,Cr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,b,p,w;bc(f)&&f.silent||tt(this,Zt,Cr).call(this,{type:"error",error:f}),bc(f)||((b=(h=R(this,jt).config).onError)==null||b.call(h,f,this),(w=(p=R(this,jt).config).onSettled)==null||w.call(p,this.state.data,f,this)),this.scheduleGc()};return ne(this,st,Ew({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,b,p,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(b=(h=R(this,jt).config).onSuccess)==null||b.call(h,f,this),(w=(p=R(this,jt).config).onSettled)==null||w.call(p,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{tt(this,Zt,Cr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{tt(this,Zt,Cr).call(this,{type:"pause"})},onContinue:()=>{tt(this,Zt,Cr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),R(this,st).start()}},gi=new WeakMap,os=new WeakMap,jt=new WeakMap,as=new WeakMap,st=new WeakMap,ia=new WeakMap,ls=new WeakMap,Zt=new WeakSet,Cr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ck(n.data,this.options),fetchMeta:e.meta??null};case"success":return ne(this,os,void 0),{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return bc(s)&&s.revert&&R(this,os)?{...R(this,os),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),ut.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,jt).notify({query:this,type:"updated",action:e})})},ev);function Ck(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sw(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Tk(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var fr,tv,Rk=(tv=class extends ku{constructor(e={}){super();fe(this,fr);this.config=e,ne(this,fr,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??bf(s,r);let o=this.get(i);return o||(o=new Ek({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){R(this,fr).has(e.queryHash)||(R(this,fr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=R(this,fr).get(e.queryHash);r&&(e.destroy(),r===e&&R(this,fr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,fr).get(e)}getAll(){return[...R(this,fr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>um(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>um(e,n)):r}notify(e){ut.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fr=new WeakMap,tv),pr,at,us,mr,Yr,rv,Pk=(rv=class extends Cw{constructor(e){super();fe(this,mr);fe(this,pr);fe(this,at);fe(this,us);this.mutationId=e.mutationId,ne(this,at,e.mutationCache),ne(this,pr,[]),this.state=e.state||Ak(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,pr).includes(e)||(R(this,pr).push(e),this.clearGcTimeout(),R(this,at).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ne(this,pr,R(this,pr).filter(r=>r!==e)),this.scheduleGc(),R(this,at).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,pr).length||(this.state.status==="pending"?this.scheduleGc():R(this,at).remove(this))}continue(){var e;return((e=R(this,us))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,u,c,d,f,h,b,p,w,g,m,v,x,S,k,E,T;const r=()=>{tt(this,mr,Yr).call(this,{type:"continue"})};ne(this,us,Ew({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{tt(this,mr,Yr).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{tt(this,mr,Yr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,at).canRun(this)}));const n=this.state.status==="pending",s=!R(this,us).canStart();try{if(n)r();else{tt(this,mr,Yr).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=R(this,at).config).onMutate)==null?void 0:o.call(i,e,this));const O=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));O!==this.state.context&&tt(this,mr,Yr).call(this,{type:"pending",context:O,variables:e,isPaused:s})}const A=await R(this,us).start();return await((c=(u=R(this,at).config).onSuccess)==null?void 0:c.call(u,A,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,A,e,this.state.context)),await((b=(h=R(this,at).config).onSettled)==null?void 0:b.call(h,A,null,this.state.variables,this.state.context,this)),await((w=(p=this.options).onSettled)==null?void 0:w.call(p,A,null,e,this.state.context)),tt(this,mr,Yr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((m=(g=R(this,at).config).onError)==null?void 0:m.call(g,A,e,this.state.context,this)),await((x=(v=this.options).onError)==null?void 0:x.call(v,A,e,this.state.context)),await((k=(S=R(this,at).config).onSettled)==null?void 0:k.call(S,void 0,A,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,A,e,this.state.context)),A}finally{tt(this,mr,Yr).call(this,{type:"error",error:A})}}finally{R(this,at).runNext(this)}}}
40,pr=new WeakMap,at=new WeakMap,us=new WeakMap,mr=new WeakSet,Yr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ut.batch(()=>{R(this,pr).forEach(n=>{n.onMutationUpdate(e)}),R(this,at).notify({mutation:this,type:"updated",action:e})})},rv);function Ak(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Nr,Yt,oa,nv,Ok=(nv=class extends ku{constructor(e={}){super();fe(this,Nr);fe(this,Yt);fe(this,oa);this.config=e,ne(this,Nr,new Set),ne(this,Yt,new Map),ne(this,oa,0)}build(e,r,n){const s=new Pk({mutationCache:this,mutationId:++ya(this,oa)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){R(this,Nr).add(e);const r=$a(e);if(typeof r=="string"){const n=R(this,Yt).get(r);n?n.push(e):R(this,Yt).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,Nr).delete(e)){const r=$a(e);if(typeof r=="string"){const n=R(this,Yt).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&R(this,Yt).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=$a(e);if(typeof r=="string"){const n=R(this,Yt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=$a(e);if(typeof r=="string"){const s=(n=R(this,Yt).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{R(this,Nr).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,Nr).clear(),R(this,Yt).clear()})}getAll(){return Array.from(R(this,Nr))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>cm(r,n))}findAll(e={}){return this.getAll().filter(r=>cm(e,r))}notify(e){ut.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>
vendor: 4,438 bytes, line 40
40r.state.isPaused);return ut.batch(()=>Promise.all(e.map(r=>r.continue().catch(Qt))))}},Nr=new WeakMap,Yt=new WeakMap,oa=new WeakMap,nv);function $a(t){var e;return(e=t.options.scope)==null?void 0:e.id}function fm(t){return{onFetch:(e,r)=>{var c,d,f,h,b;const n=e.options,s=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=e.state.data)==null?void 0:h.pages)||[],o=((b=e.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(e.signal.aborted?p=!0:e.signal.addEventListener("abort",()=>{p=!0}),e.signal)})},g=_w(e.options,e.fetchOptions),m=async(v,x,S)=>{if(p)return Promise.reject();if(x==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const q={client:e.client,queryKey:e.queryKey,pageParam:x,direction:S?"backward":"forward",meta:e.options.meta};return w(q),q})(),T=await g(E),{maxPages:A}=e.options,O=S?yk:vk;return{pages:O(v.pages,T,A),pageParams:O(v.pageParams,x,A)}};if(s&&i.length){const v=s==="backward",x=v?Nk:pm,S={pages:i,pageParams:o},k=x(n,S);a=await m(S,k,v)}else{const v=t??i.length;do{const x=l===0?o[0]??n.initialPageParam:pm(n,a);if(l>0&&x==null)break;a=await m(a,x),l++}while(l<v)}return a};e.options.persister?e.fetchFn=()=>{var p,w;return(w=(p=e.options).persister)==null?void 0:w.call(p,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=u}}}function pm(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function Nk(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var Ie,dn,hn,vi,yi,fn,wi,bi,sv,jk=(sv=class{constructor(t={}){fe(this,Ie);fe(this,dn);fe(this,hn);fe(this,vi);fe(this,yi);fe(this,fn);fe(this,wi);fe(this,bi);ne(this,Ie,t.queryCache||new Rk),ne(this,dn,t.mutationCache||new Ok),ne(this,hn,t.defaultOptions||{}),ne(this,vi,new Map),ne(this,yi,new Map),ne(this,fn,0)}mount(){ya(this,fn)._++,R(this,fn)===1&&(ne(this,wi,xw.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Ie).onFocus())})),ne(this,bi,Bl.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Ie).onOnline())})))}unmount(){var t,e;ya(this,fn)._--,R(this,fn)===0&&((t=R(this,wi))==null||t.call(this),ne(this,wi,void 0),(e=R(this,bi))==null||e.call(this),ne(this,bi,void 0))}isFetching(t){return R(this,Ie).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,dn).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Ie).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=R(this,Ie).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Id(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return R(this,Ie).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=R(this,Ie).get(n.queryHash),i=s==null?void 0:s.state.data,o=dk(e,i);if(o!==void 0)return R(this,Ie).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return ut.batch(()=>R(this,Ie).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Ie).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=R(this,Ie);ut.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=R(this,Ie);return ut.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=ut.batch(()=>R(this,Ie).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(Qt).catch(Qt)}invalidateQueries(t,e={}){return ut.batch(()=>(R(this,Ie).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=ut.batch(()=>R(this,Ie).findAll(t).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}
40));return Promise.all(n).then(Qt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=R(this,Ie).build(this,e);return r.isStaleByTime(Id(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Qt).catch(Qt)}fetchInfiniteQuery(t){return t.behavior=fm(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Qt).catch(Qt)}ensureInfiniteQueryData(t){return t.behavior=fm(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Bl.isOnline()?R(this,dn).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Ie)}getMutationCache(){return R(this,dn)}getDefaultOptions(){return R(this,hn)}setDefaultOptions(t){ne(this,hn,t)}setQueryDefaults(t,e){R(this,vi).set(Bo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,vi).values()],r={};return e.forEach(n=>{Vo(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){R(this,yi).set(Bo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,yi).values()],r={};return e.forEach(n=>{Vo(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,hn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=bf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===_f&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,hn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,Ie).clear(),R(this,dn).clear()}},Ie=new WeakMap,dn=new WeakMap,hn=new WeakMap,vi=new WeakMap,yi=new WeakMap,fn=new WeakMap,wi=new WeakMap,bi=new WeakMap,sv),Ik=y.createContext(void 0),Lk=({client:t,children:e})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),_.jsx(Ik.Provider,{value:t,children:e}));/** 41 * @remix-run/router v1.23.0 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */function Ho(){return Ho=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ho.apply(this,arguments)}var gn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(gn||(gn={}));const mm="popstate";function $k(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:o,hash:a}=n.location;return $d("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Vl(s)}return Mk(e,r,null,t)}function Be(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Tw(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Dk(){return Math.random().toString(36).substr(2,8)}function gm(t,e){return{usr:t.state,key:t.key,idx:e}}function $d(t,e,r,n){return r===void 0&&(r=null),Ho({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Di(e):e,{state:r,key:e&&e.key||n||Dk()})}function Vl(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Di(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function Mk(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=gn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Ho({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=gn.Pop;let w=c(),g=w==null?null:w-u;u=w,l&&l({action:a,location:p.location,delta:g})}function f(w,g){a=gn.Push;let m=$d(p.location,w,g);u=c()+1;let v=gm(m,u),x=p.createHref(m);try{o.pushState(v,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(x)}i&&l&&l({action:a,location:p.location,delta:1})}function h(w,g){a=gn.Replace;let m=$d(p.location,w,g);u=c();let v=gm(m,u),x=p.createHref(m);o.replaceState(v,"",x),i&&l&&l({action:a,location:p.location,delta:0})}function b(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof w=="string"?w:Vl(w);return m=m.replace(/ $/,"%20"),Be(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let p={get action(){return a},get location(){return t(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(mm,d),l=w,()=>{s.removeEventListener(mm,d),l=null}},createHref(w){return e(s,w)},createURL:b,encodeLocation(w){let g=b(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(w){return o.go(w)}};return p}var vm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(vm||(vm={}));function Uk(t,e,r){return r===void 0&&(r="/"),Fk(t,e,r,!1)}function Fk(t,e,r,n){let s=typeof e=="string"?Di(e):e,i=xf(s.pathname||"/",r);if(i==null)return null;let o=Rw(t);zk(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=Yk(i);a=Jk(o[l],u,n)}return a}function Rw(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Be(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Tn([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Be(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Rw(i.children,e,c,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:Gk(u,i.index),routesMeta:c})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Pw(i.path))s(i,o,l)}),e}function Pw(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=Pw(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function zk(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Qk(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Bk=/^:[\w-]+$/,Vk=3,Hk=2,Wk=1,qk=10,Kk=-2,ym=t=>t==="*";function Gk(t,e){let r=t.split("/"),n=r.length;return r.some(ym)&&(n+=Kk),e&&(n+=Hk),r.filter(s=>!ym(s)).reduce((s,i)=>s+(Bk.test(i)?Vk:i===""?Wk:qk),n)}function Qk(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function Jk(t,e,r){let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=wm({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=wm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 9,263 bytes, lines 49-58
49Object.assign(s,d.params),o.push({params:s,pathname:Tn([i,d.pathname]),pathnameBase:rE(Tn([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Tn([i,d.pathnameBase]))}return o}function wm(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Zk(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let p=a[d]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const b=a[d];return h&&!b?u[f]=void 0:u[f]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function Zk(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Tw(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function Yk(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Tw(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function xf(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Xk(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Di(t):t;return{pathname:r?r.startsWith("/")?r:eE(r,e):e,search:nE(n),hash:sE(s)}}function eE(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function _c(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tE(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Aw(t,e){let r=tE(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ow(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Di(t):(s=Ho({},t),Be(!s.pathname||!s.pathname.includes("?"),_c("?","pathname","search",s)),Be(!s.pathname||!s.pathname.includes("#"),_c("#","pathname","hash",s)),Be(!s.search||!s.search.includes("#"),_c("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=e.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=Xk(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Tn=t=>t.join("/").replace(/\/\/+/g,"/"),rE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),nE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,sE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function iE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Nw=["post","put","patch","delete"];new Set(Nw);const oE=["get",...Nw];new Set(oE);/** 50 * React Router v6.30.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function Wo(){return Wo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wo.apply(this,arguments)}const Sf=y.createContext(null),aE=y.createContext(null),ks=y.createContext(null),Cu=y.createContext(null),zn=y.createContext({outlet:null,matches:[],isDataRoute:!1}),jw=y.createContext(null);function lE(t,e){let{relative:r}=e===void 0?{}:e;ha()||Be(!1);let{basename:n,navigator:s}=y.useContext(ks),{hash:i,pathname:o,search:a}=Lw(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Tn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function ha(){return y.useContext(Cu)!=null}function fa(){return ha()||Be(!1),y.useContext(Cu).location}function Iw(t){y.useContext(ks).static||y.useLayoutEffect(t)}function kf(){let{isDataRoute:t}=y.useContext(zn);return t?xE():uE()}function uE(){ha()||Be(!1);let t=y.useContext(Sf),{basename:e,future:r,navigator:n}=y.useContext(ks),{matches:s}=y.useContext(zn),{pathname:i}=fa(),o=JSON.stringify(Aw(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return Iw(()=>{a.current=!0}),y.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=Ow(u,JSON.parse(o),i,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Tn([e,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[e,n,o,i,t])}function cE(){let{matches:t}=y.useContext(zn),e=t[t.length-1];return e?e.params:{}}function Lw(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=y.useContext(ks),{matches:s}=y.useContext(zn),{pathname:i}=fa(),o=JSON.stringify(Aw(s,n.v7_relativeSplatPath));return y.useMemo(()=>Ow(t,JSON.parse(o),i,r==="path"),[t,o,i,r])}function dE(t,e){return hE(t,e)}function hE(t,e,r,n){ha()||Be(!1);let{navigator:s}=y.useContext(ks),{matches:i}=y.useContext(zn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=fa(),c;if(e){var d;let w=typeof e=="string"?Di(e):e;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||Be(!1),c=w}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=Uk(t,{pathname:h}),p=vE(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Tn([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Tn([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,r,n);return e&&p?y.createElement(Cu.Provider,{value:{location:Wo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:gn.Pop}},p):p}function fE(){let t=_E(),e=iE(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:s},r):null,null)}const pE=y.createElement(fE,null);class mE extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?y.createElement(zn.Provider,{value:this.props.routeContext},y.createElement(jw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gE(t){let{routeContext:e,match:r,children:n}=t,s=y.useContext(Sf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(zn.Provider,{value:e},n)}function vE(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Be(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,b=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||b){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let h,b=!1,p=null,w=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,p=d.route.errorElement||pE,l&&(u<0&&f===0?(b=!0,w=null):u===f&&(b=!0,w=d.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,f+1)),m=()=>{let v;return h?v=p:b?v=w:d.route.Component?v=y.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,y.createElement(gE,{match:d,routeC
58ontext:{outlet:c,matches:g,isDataRoute:r!=null},children:v})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?y.createElement(mE,{location:r.location,revalidation:r.revalidation,component:p,error:h,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var $w=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}($w||{}),Hl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Hl||{});function yE(t){let e=y.useContext(Sf);return e||Be(!1),e}function wE(t){let e=y.useContext(aE);return e||Be(!1),e}function bE(t){let e=y.useContext(zn);return e||Be(!1),e}function Dw(t){let e=bE(),r=e.matches[e.matches.length-1];return r.route.id||Be(!1),r.route.id}function _E(){var t;let e=y.useContext(jw),r=wE(Hl.UseRouteError),n=Dw(Hl.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function xE(){let{router:t}=yE($w.UseNavigateStable),e=Dw(Hl.UseNavigateStable),r=y.useRef(!1);return Iw(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Wo({fromRouteId:e},i)))},[t,e])}function SE(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Tr(t){Be(!1)}function kE(t){let{basename:e="/",children:r=null,location:n,navigationType:s=gn.Pop,navigator:i,static:o=!1,future:a}=t;ha()&&Be(!1);let l=e.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:i,static:o,future:Wo({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Di(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:b="default"}=n,p=y.useMemo(()=>{let w=xf(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:b},navigationType:s}},[l,c,d,f,h,b,s]);return p==null?null:y.createElement(ks.Provider,{value:u},y.createElement(Cu.Provider,{children:r,value:p}))}function EE(t){let{children:e,location:r}=t;return dE(Dd(e),r)}new Promise(()=>{});function Dd(t,e){e===void 0&&(e=[]);let r=[];return y.Children.forEach(t,(n,s)=>{if(!y.isValidElement(n))return;let i=[...e,s];if(n.type===y.Fragment){r.push.apply(r,Dd(n.props.children,i));return}n.type!==Tr&&Be(!1),!n.props.index||!n.props.children||Be(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Dd(n.props.children,i)),r.push(o)}),r}/** 59 * React Router DOM v6.30.1 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */function Md(){return Md=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Md.apply(this,arguments)}function CE(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function TE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function RE(t,e){return t.button===0&&(!e||e==="_self")&&!TE(t)}const PE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],AE="6";try{window.__reactRouterVersion=AE}catch{}const OE="startTransition",bm=Rh[OE];function NE(t){let{basename:e,children:r,future:n,window:s}=t,i=y.useRef();i.current==null&&(i.current=$k({window:s,v5Compat:!0}));let o=i.current,[a,l]=y.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=y.useCallback(d=>{u&&bm?bm(()=>l(d)):l(d)},[l,u]);return y.useLayoutEffect(()=>o.listen(c),[o,c]),y.useEffect(()=>SE(n),[n]),y.createElement(kE,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const jE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,LE=y.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,f=CE(e,PE),{basename:h}=y.useContext(ks),b,p=!1;if(typeof u=="string"&&IE.test(u)&&(b=u,jE))try{let v=new URL(window.location.href),x=u.startsWith("//")?new URL(v.protocol+u):new URL(u),S=xf(x.pathname,h);x.origin===v.origin&&S!=null?u=S+x.search+x.hash:p=!0}catch{}let w=lE(u,{relative:s}),g=$E(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function m(v){n&&n(v),v.defaultPrevented||g(v)}return y.createElement("a",Md({},f,{href:b||w,onClick:p||i?n:m,ref:r,target:l}))});var _m;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(_m||(_m={}));var xm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(xm||(xm={}));function $E(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=kf(),u=fa(),c=Lw(t,{relative:o});return y.useCallback(d=>
67{if(RE(d,r)){d.preventDefault();let f=n!==void 0?n:Vl(u)===Vl(c);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,n,s,r,t,i,o,a])}var Sm=["light","dark"],DE="(prefers-color-scheme: dark)",ME=y.createContext(void 0),UE={setTheme:t=>{},themes:[]},FE=()=>{var t;return(t=y.useContext(ME))!=null?t:UE};y.memo(({forcedTheme:t,storageKey:e,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(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?Sm.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(b,p=!1,w=!0)=>{let g=o?o[b]:b,m=p?b+"|| ''":`'${g}'`,v="";return s&&w&&!p&&Sm.includes(b)&&(v+=`d.style.colorScheme = '${b}';`),r==="class"?p||g?v+=`c.add(${m})`:v+="null":g&&(v+=`d[s](n,${m})`),v},h=t?`!function(){${c}${f(t)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${DE}',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('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return y.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var zE=t=>{switch(t){case"success":return HE;case"info":return qE;case"warning":return WE;case"error":return KE;default:return null}},BE=Array(12).fill(0),VE=({visible:t,className:e})=>I.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},I.createElement("div",{className:"sonner-spinner"},BE.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),HE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),qE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),KE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GE=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),QE=()=>{let[t,e]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},Ud=1,JE=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>
67{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Ud++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:r}),{...a,...t,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(YE(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,c=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:u,description:c})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),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=(t,e)=>{let r=(e==null?void 0:e.id)||Ud++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},pt=new JE,ZE=(t,e)=>{let r=(e==null?void 0:e.id)||Ud++;return pt.addToast({title:t,...e,id:r}),r},YE=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",XE=ZE,e1=()=>pt.toasts,t1=()=>pt.getActiveToasts(),Fd=Object.assign(XE,{success:pt.success,info:pt.info,warning:pt.warning,error:pt.error,custom:pt.custom,message:pt.message,promise:pt.promise,dismiss:pt.dismiss,loading:pt.loading},{getHistory:e1,getToasts:t1});function r1(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}r1(`: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;
67left: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}
67: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%);
67--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%)} 68`);function Da(t){return t.label!==void 0}var n1=3,s1="32px",i1="16px",km=4e3,o1=356,a1=14,l1=20,u1=200;function Wt(...t){return t.filter(Boolean).join(" ")}function c1(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var d1=t=>{var e,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:b,interacting:p,setHeights:w,visibleToasts:g,heights:m,index:v,toasts:x,expanded:S,removeToast:k,defaultRichColors:E,closeButton:T,style:A,cancelButtonStyle:O,actionButtonStyle:q,className:D="",descriptionClassName:J="",duration:L,position:Y,gap:H,loadingIcon:G,expandByDefault:C,classNames:P,icons:M,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:K}
68=t,[se,te]=I.useState(null),[Se,Ne]=I.useState(null),[U,ve]=I.useState(!1),[je,me]=I.useState(!1),[ue,he]=I.useState(!1),[et,At]=I.useState(!1),[Hn,Wr]=I.useState(!1),[Wn,Hi]=I.useState(0),[Es,Kf]=I.useState(0),Wi=I.useRef(h.duration||L||km),Gf=I.useRef(null),qn=I.useRef(null),A_=v===0,O_=v+1<=g,Ot=h.type,Cs=h.dismissible!==!1,N_=h.className||"",j_=h.descriptionClassName||"",va=I.useMemo(()=>m.findIndex(re=>re.toastId===h.id)||0,[m,h.id]),I_=I.useMemo(()=>{var re;return(re=h.closeButton)!=null?re:T},[h.closeButton,T]),Qf=I.useMemo(()=>h.duration||L||km,[h.duration,L]),Wu=I.useRef(0),Ts=I.useRef(0),Jf=I.useRef(0),Rs=I.useRef(null),[L_,$_]=Y.split("-"),Zf=I.useMemo(()=>m.reduce((re,we,Te)=>Te>=va?re:re+we.height,0),[m,va]),Yf=QE(),D_=h.invert||f,qu=Ot==="loading";Ts.current=I.useMemo(()=>va*H+Zf,[va,Zf]),I.useEffect(()=>{Wi.current=Qf},[Qf]),I.useEffect(()=>{ve(!0)},[]),I.useEffect(()=>{let re=qn.current;if(re){let we=re.getBoundingClientRect().height;return Kf(we),w(Te=>[{toastId:h.id,height:we,position:h.position},...Te]),()=>w(Te=>Te.filter(zt=>zt.toastId!==h.id))}},[w,h.id]),I.useLayoutEffect(()=>{if(!U)return;let re=qn.current,we=re.style.height;re.style.height="auto";let Te=re.getBoundingClientRect().height;re.style.height=we,Kf(Te),w(zt=>zt.find(Bt=>Bt.toastId===h.id)?zt.map(Bt=>Bt.toastId===h.id?{...Bt,height:Te}:Bt):[{toastId:h.id,height:Te,position:h.position},...zt])},[U,h.title,h.description,w,h.id]);let qr=I.useCallback(()=>{me(!0),Hi(Ts.current),w(re=>re.filter(we=>we.toastId!==h.id)),setTimeout(()=>{k(h)},u1)},[h,k,w,Ts]);I.useEffect(()=>{if(h.promise&&Ot==="loading"||h.duration===1/0||h.type==="loading")return;let re;return S||p||K&&Yf?(()=>{if(Jf.current<Wu.current){let we=new Date().getTime()-Wu.current;Wi.current=Wi.current-we}Jf.current=new Date().getTime()})():Wi.current!==1/0&&(Wu.current=new Date().getTime(),re=setTimeout(()=>{var we;(we=h.onAutoClose)==null||we.call(h,h),qr()},Wi.current)),()=>clearTimeout(re)},[S,p,h,Ot,K,Yf,qr]),I.useEffect(()=>{h.delete&&qr()},[qr,h.delete]);function M_(){var re,we,Te;return M!=null&&M.loading?I.createElement("div",{className:Wt(P==null?void 0:P.loader,(re=h==null?void 0:h.classNames)==null?void 0:re.loader,"sonner-loader"),"data-visible":Ot==="loading"},M.loading):G?I.createElement("div",{className:Wt(P==null?void 0:P.loader,(we=h==null?void 0:h.classNames)==null?void 0:we.loader,"sonner-loader"),"data-visible":Ot==="loading"},G):I.createElement(VE,{className:Wt(P==null?void 0:P.loader,(Te=h==null?void 0:h.classNames)==null?void 0:Te.loader),visible:Ot==="loading"})}return I.createElement("li",{tabIndex:0,ref:qn,className:Wt(D,N_,P==null?void 0:P.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,P==null?void 0:P.default,P==null?void 0:P[Ot],(r=h==null?void 0:h.classNames)==null?void 0:r[Ot]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:E,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":U,"data-promise":!!h.promise,"data-swiped":Hn,"data-removed":je,"data-visible":O_,"data-y-position":L_,"data-x-position":$_,"data-index":v,"data-front":A_,"data-swiping":ue,"data-dismissible":Cs,"data-type":Ot,"data-invert":D_,"data-swipe-out":et,"data-swipe-direction":Se,"data-expanded":!!(S||C&&U),style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${je?Wn:Ts.current}px`,"--initial-height":C?"auto":`${Es}px`,...A,...h.style},onDragEnd:()=>{he(!1),te(null),Rs.current=null},onPointerDown:re=>{qu||!Cs||(Gf.current=new Date,Hi(Ts.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(he(!0),Rs.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,we,Te,zt;if(et||!Cs)return;Rs.current=null;let Bt=Number(((re=qn.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Kr=Number(((we=qn.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Kn=new Date().getTime()-((Te=Gf.current)==null?void 0:Te.getTime()),Vt=se==="x"?Bt:Kr,Gr=Math.abs(Vt)/Kn;if(Math.abs(Vt)>=l1||Gr>.11){Hi(Ts.current),(zt=h.onDismiss)==null||zt.call(h,h),Ne(se==="x"?Bt>0?"right":"left":Kr>0?"down":"up"),qr(),At(!0),Wr(!1);return}he(!1),te(null)},onPointerMove:re=>{var we,Te,zt,Bt;if(!Rs.current||!Cs||((we=window.getSelection())==null?void 0:we.toString().length)>0)return;let Kr=re.clientY-Rs.current.y,Kn=re.clientX-Rs.current.x,Vt=(Te=t.swipeDirections)!=null?Te:c1(Y);!se&&(Math.abs(Kn)>1||Math.abs(Kr)>1)&&te(Math.abs(Kn)>Math.abs(Kr)?"x":"y");let Gr={x:0,y:0};se==="y"?(Vt.includes("top")||Vt.includes("bottom"))&&(Vt.includes("top")&&Kr<0||Vt.includes("bottom")&&Kr>0)&&(Gr.y=Kr):se==="x"&&(Vt.includes("left")||Vt.includes("right"))&&(Vt.includes("left")&&Kn<0||Vt.includes("right")&&Kn>0)&&(Gr.x=Kn),(Math.abs(Gr.x)>0||Math.abs(Gr.y)>0)&&Wr(!0),(zt=qn.current)==null||zt.style.setProperty("--swipe-amount-x",`${Gr.x}px`),(Bt=qn.current)==null||Bt.style.setProperty("--swipe-amount-y",`${Gr.y}px`)}},I_&&!h.jsx?I.createElement("button",{"aria-label":Z,"data-disabled":qu,"data-close-button":!0,onClick:qu||!Cs?()=>{}:()=>{var re;qr(),(re=h.onDismiss)==null||re.call(h,h)},className:Wt(P==null?void 0:P.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:GE):null,h.jsx||y.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:I.createElement(I.Fragment,null,Ot||h.icon||h.promise?I.createElement("div",{"data-icon":"",className:Wt(P==null?void 0:P.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||M_():null,h.type!=="loading"?h.icon||(M==null?void 0:M[Ot])||zE(Ot):null):null,I.createElement("div",{"data-content":"",className:Wt(P==null?void 0:P.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Wt(P==null?void 0:P.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?I.createElement("div",{"data-description":"",className:Wt(J,j_,P==null?void 0:P.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),y.isValidElement(h.cancel)?h.cancel:h.cancel&&Da(h.c
68ancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:re=>{var we,Te;Da(h.cancel)&&Cs&&((Te=(we=h.cancel).onClick)==null||Te.call(we,re),qr())},className:Wt(P==null?void 0:P.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,y.isValidElement(h.action)?h.action:h.action&&Da(h.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||q,onClick:re=>{var we,Te;Da(h.action)&&((Te=(we=h.action).onClick)==null||Te.call(we,re),!re.defaultPrevented&&qr())},className:Wt(P==null?void 0:P.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Em(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function h1(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?i1:s1;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 f1=y.forwardRef(function(t,e){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:b=n1,toastOptions:p,dir:w=Em(),gap:g=a1,loadingIcon:m,icons:v,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:S}=t,[k,E]=I.useState([]),T=I.useMemo(()=>Array.from(new Set([n].concat(k.filter(K=>K.position).map(K=>K.position)))),[k,n]),[A,O]=I.useState([]),[q,D]=I.useState(!1),[J,L]=I.useState(!1),[Y,H]=I.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=I.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=I.useRef(null),M=I.useRef(!1),Z=I.useCallback(K=>{E(se=>{var te;return(te=se.find(Se=>Se.id===K.id))!=null&&te.delete||pt.dismiss(K.id),se.filter(({id:Se})=>Se!==K.id)})},[]);return I.useEffect(()=>pt.subscribe(K=>{if(K.dismiss){E(se=>se.map(te=>te.id===K.id?{...te,delete:!0}:te));return}setTimeout(()=>{yw.flushSync(()=>{E(se=>{let te=se.findIndex(Se=>Se.id===K.id);return te!==-1?[...se.slice(0,te),{...se[te],...K},...se.slice(te+1)]:[K,...se]})})})}),[]),I.useEffect(()=>{if(c!=="system"){H(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:se})=>{H(se?"dark":"light")})}catch{K.addListener(({matches:te})=>{try{H(te?"dark":"light")}catch(Se){console.error(Se)}})}},[c]),I.useEffect(()=>{k.length<=1&&D(!1)},[k]),I.useEffect(()=>{let K=se=>{var te,Se;s.every(Ne=>se[Ne]||se.code===Ne)&&(D(!0),(te=G.current)==null||te.focus()),se.code==="Escape"&&(document.activeElement===G.current||(Se=G.current)!=null&&Se.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[s]),I.useEffect(()=>{if(G.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,M.current=!1)}},[G.current]),I.createElement("section",{ref:e,"aria-label":`${x} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((K,se)=>{var te;let[Se,Ne]=K.split("-");return k.length?I.createElement("ol",{key:K,dir:w==="auto"?Em():w,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":Se,"data-lifted":q&&k.length>1&&!i,"data-x-position":Ne,style:{"--front-toast-height":`${((te=A[0])==null?void 0:te.height)||0}px`,"--width":`${o1}px`,"--gap":`${g}px`,...h,...h1(l,u)},onBlur:U=>{M.current&&!U.currentTarget.contains(U.relatedTarget)&&(M.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||M.current||(M.current=!0,P.current=U.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{J||D(!1)},onDragEnd:()=>D(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},k.filter(U=>!U.position&&se===0||U.position===K).map((U,ve)=>{var je,me;return I.createElement(d1,{key:U.id,icons:v,index:ve,toast:U,defaultRichColors:d,duration:(je=p==null?void 0:p.duration)!=null?je:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:r,visibleToasts:b,closeButton:(me=p==null?void 0:p.closeButton)!=null?me:o,interacting:J,position:K,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:Z,toasts:k.filter(ue=>ue.position==U.position),heights:A.filter(ue=>ue.position==U.position),setHeights:O,expandByDefault:i,gap:g,loadingIcon:m,expanded:q,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const p1=({...t})=>{const{theme:e="system"}=FE();return _.jsx(f1,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})},m1=1,g1=1e6;let xc=0;function v1(){return xc=(xc+1)%Number.MAX_SAFE_INTEGER,xc.toString()}const Sc=new Map,Cm=t=>{if(Sc.has(t))return;const e=setTimeout(()=>{Sc.delete(t),_o({type:"REMOVE_TOAST",toastId:t})},g1);Sc.set(t,e)},y1=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,m1)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;
68return r?Cm(r):t.toasts.forEach(n=>{Cm(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},dl=[];let hl={toasts:[]};function _o(t){hl=y1(hl,t),dl.forEach(e=>{e(hl)})}function w1({...t}){const e=v1(),r=s=>_o({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>_o({type:"DISMISS_TOAST",toastId:e});return _o({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function b1(){const[t,e]=y.useState(hl);return y.useEffect(()=>(dl.push(e),()=>{const r=dl.indexOf(e);r>-1&&dl.splice(r,1)}),[t]),{...t,toast:w1,dismiss:r=>_o({type:"DISMISS_TOAST",toastId:r})}}function le(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Tm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Mw(...t){return e=>{let r=!1;const n=t.map(s=>{const i=Tm(s,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():Tm(t[s],null)}}}}function Me(...t){return y.useCallback(Mw(...t),t)}function Mi(t,e=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];const u=d=>{var g;const{scope:f,children:h,...b}=d,p=((g=f==null?void 0:f[t])==null?void 0:g[l])||a,w=y.useMemo(()=>b,Object.values(b));return _.jsx(p.Provider,{value:w,children:h})};u.displayName=i+"Provider";function c(d,f){var p;const h=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,b=y.useContext(h);if(b)return b;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=>y.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return y.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,_1(s,...e)]}function _1(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function qo(t){const e=S1(t),r=y.forwardRef((n,s)=>{const{children:i,...o}=n,a=y.Children.toArray(i),l=a.find(E1);if(l){const u=l.props.children,c=a.map(d=>d===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:d);return _.jsx(e,{...o,ref:s,children:y.isValidElement(u)?y.cloneElement(u,void 0,c):null})}return _.jsx(e,{...o,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var x1=qo("Slot");function S1(t){const e=y.forwardRef((r,n)=>{const{children:s,...i}=r;if(y.isValidElement(s)){const o=T1(s),a=C1(i,s.props);return s.type!==y.Fragment&&(a.ref=n?Mw(n,o):o),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Uw=Symbol("radix.slottable");function k1(t){const e=({children:r})=>_.jsx(_.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=Uw,e}function E1(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Uw}function C1(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function T1(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Fw(t){const e=t+"CollectionProvider",[r,n]=Mi(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:w,children:g}=p,m=I.useRef(null),v=I.useRef(new Map).current;return _.jsx(s,{scope:w,itemMap:v,collectionRef:m,children:g})};o.displayName=e;const a=t+"CollectionSlot",l=qo(a),u=I.forwardRef((p,w)=>{const{scope:g,children:m}=p,v=i(a,g),x=Me(w,v.collectionRef);return _.jsx(l,{ref:x,children:m})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=qo(c),h=I.forwardRef((p,w)=>{const{scope:g,children:m,...v}=p,x=I.useRef(null),S=Me(w,x),k=i(c,g);return I.useEffect(()=>(k.itemMap.set(x,{ref:x,...v}),()=>
vendor: 8,865 bytes, line 68
68void k.itemMap.delete(x))),_.jsx(f,{[d]:"",ref:S,children:m})});h.displayName=c;function b(p){const w=i(t+"CollectionConsumer",p);return I.useCallback(()=>{const m=w.collectionRef.current;if(!m)return[];const v=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((k,E)=>v.indexOf(k.ref.current)-v.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},b,n]}var R1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=R1.reduce((t,e)=>{const r=qo(`Primitive.${e}`),n=y.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function zw(t,e){t&&Ss.flushSync(()=>t.dispatchEvent(e))}function ir(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function P1(t,e=globalThis==null?void 0:globalThis.document){const r=ir(t);y.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var A1="DismissableLayer",zd="dismissableLayer.update",O1="dismissableLayer.pointerDownOutside",N1="dismissableLayer.focusOutside",Rm,Bw=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tu=y.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,u=y.useContext(Bw),[c,d]=y.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),b=Me(e,E=>d(E)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(w),m=c?p.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,x=m>=g,S=I1(E=>{const T=E.target,A=[...u.branches].some(O=>O.contains(T));!x||A||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),k=L1(E=>{const T=E.target;[...u.branches].some(O=>O.contains(T))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return P1(E=>{m===u.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),y.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Rm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Pm(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Rm)}},[c,f,r,u]),y.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Pm())},[c,u]),y.useEffect(()=>{const E=()=>h({});return document.addEventListener(zd,E),()=>document.removeEventListener(zd,E)},[]),_.jsx(ge.div,{...l,ref:b,style:{pointerEvents:v?x?"auto":"none":void 0,...t.style},onFocusCapture:le(t.onFocusCapture,k.onFocusCapture),onBlurCapture:le(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:le(t.onPointerDownCapture,S.onPointerDownCapture)})});Tu.displayName=A1;var j1="DismissableLayerBranch",Vw=y.forwardRef((t,e)=>{const r=y.useContext(Bw),n=y.useRef(null),s=Me(e,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),_.jsx(ge.div,{...t,ref:s})});Vw.displayName=j1;function I1(t,e=globalThis==null?void 0:globalThis.document){const r=ir(t),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Hw(O1,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function L1(t,e=globalThis==null?void 0:globalThis.document){const r=ir(t),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&Hw(N1,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Pm(){const t=new CustomEvent(zd);document.dispatchEvent(t)}function Hw(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?zw(s,i):s.dispatchEvent(i)}var $1=Tu,D1=Vw,Xe=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},M1="Portal",Ef=y.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,i]=y.useState(!1);Xe(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?yw.createPortal(_.jsx(ge.div,{...n,ref:e}),o):null});Ef.displayName=M1;function U1(t,e){return y.useReducer((r,n)=>e[r][n]??r,t)}var Cf=t=>{const{present:e,children:r}=t,n=F1(e),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=Me(n.ref,z1(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};Cf.displayName="Presence";function F1(t){const[e,r]=y.useState(),n=y.useRef(null),s=y.useRef(t),i=y.useRef("none"),o=t?"mounted":"unmounted",[a,l]=U1(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Ma(n.current);i.current=a==="mounted"?u:"none"},[a]),Xe(()=>{const u=n.current,c=s.current;if(c!==t){const f=i.current,h=Ma(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Xe(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=h=>{const p=Ma(n.current).includes(h.animationName);if(h.target===e&&p&&(l("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},f=h=>{h.target===e&&(i.current=Ma(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ma(t){return(t==null?void 0:t.animationName)||"none"}function z1(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var B1=Rh[" useInsertionEffect ".trim().toString()]||Xe;function Bd({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,o]=V1({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const c=y.useRef(t!==void 0);y.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=y.useCallback(c=>{var d;if(a){const f=H1(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else i(c)},[a,t,i,o]);return[l,u]}function V1({defaultProp:t,onChange:e}){const[r,n]=y.useState(t),s=y.useRef(r),i=y.useRef(e);return B1(()=>{i.current=e},[e]),y.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function H1(t){return typeof t=="function"}var Ww=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"}),W1="VisuallyHidden",Ru=y.forwardRef((t,e)=>_.jsx(ge.span,{...t,ref:e,style:{...Ww,...t.style}}));Ru.displayName=W1;var q1=Ru,Tf="ToastProvider",[Rf,K1,G1]=Fw("Toast"),[qw,Yj]=Mi("Toast",[G1]),[Q1,Pu]=qw(Tf),Kw=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=y.useState(null),[u,c]=y.useState(0),d=y.useRef(!1),f=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tf}\`. Expected non-empty \`string\`.`),_.jsx(Rf.Provider,{scope:e,children:_.jsx(Q1,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:
68a,onViewportChange:l,onToastAdd:y.useCallback(()=>c(h=>h+1),[]),onToastRemove:y.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Kw.displayName=Tf;var Gw="ToastViewport",J1=["F8"],Vd="toast.viewportPause",Hd="toast.viewportResume",Qw=y.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=J1,label:s="Notifications ({hotkey})",...i}=t,o=Pu(Gw,r),a=K1(r),l=y.useRef(null),u=y.useRef(null),c=y.useRef(null),d=y.useRef(null),f=Me(e,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=o.toastCount>0;y.useEffect(()=>{const w=g=>{var v;n.length!==0&&n.every(x=>g[x]||g.code===x)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),y.useEffect(()=>{const w=l.current,g=d.current;if(b&&w&&g){const m=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Vd);g.dispatchEvent(k),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(Hd);g.dispatchEvent(k),o.isClosePausedRef.current=!1}},x=k=>{!w.contains(k.relatedTarget)&&v()},S=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",m),w.addEventListener("focusout",x),w.addEventListener("pointermove",m),w.addEventListener("pointerleave",S),window.addEventListener("blur",m),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",m),w.removeEventListener("focusout",x),w.removeEventListener("pointermove",m),w.removeEventListener("pointerleave",S),window.removeEventListener("blur",m),window.removeEventListener("focus",v)}}},[b,o.isClosePausedRef]);const p=y.useCallback(({tabbingDirection:w})=>{const m=a().map(v=>{const x=v.ref.current,S=[x,...uC(x)];return w==="forwards"?S:S.reverse()});return(w==="forwards"?m.reverse():m).flat()},[a]);return y.useEffect(()=>{const w=d.current;if(w){const g=m=>{var S,k,E;const v=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!v){const T=document.activeElement,A=m.shiftKey;if(m.target===w&&A){(S=u.current)==null||S.focus();return}const D=p({tabbingDirection:A?"backwards":"forwards"}),J=D.findIndex(L=>L===T);kc(D.slice(J+1))?m.preventDefault():A?(k=u.current)==null||k.focus():(E=c.current)==null||E.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[a,p]),_.jsxs(D1,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&_.jsx(Wd,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});kc(w)}}),_.jsx(Rf.Slot,{scope:r,children:_.jsx(ge.ol,{tabIndex:-1,...i,ref:f})}),b&&_.jsx(Wd,{ref:c,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});kc(w)}})]})});Qw.displayName=Gw;var Jw="ToastFocusProxy",Wd=y.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Pu(Jw,r);return _.jsx(Ru,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});Wd.displayName=Jw;var pa="Toast",Z1="toast.swipeStart",Y1="toast.swipeMove",X1="toast.swipeCancel",eC="toast.swipeEnd",Zw=y.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Bd({prop:n,defaultProp:s??!0,onChange:i,caller:pa});return _.jsx(Cf,{present:r||a,children:_.jsx(nC,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:ir(t.onPause),onResume:ir(t.onResume),onSwipeStart:le(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(t.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:le(t.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:le(t.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)})})})});Zw.displayName=pa;var[tC,rC]=qw(pa,{onClose(){}}),nC=y.forwardRef((t,e)=>{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,...b}=t,p=Pu(pa,r),[w,g]=y.useState(null),m=Me(e,L=>g(L)),v=y.useRef(null),x=y.useRef(null),S=s||p.duration,k=y.useRef(0),E=y.useRef(S),T=y.useRef(0),{onToastAdd:A,onToastRemove:O}=p,q=ir(()=>{var Y;(w==null?void 0:w.contains(document.activeElement))&&((Y=p.viewport)==null||Y.focus()),o()}),D=y.useCallback(L=>
vendor: 4,181 bytes, line 68
68{!L||L===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(q,L))},[q]);y.useEffect(()=>{const L=p.viewport;if(L){const Y=()=>{D(E.current),u==null||u()},H=()=>{const G=new Date().getTime()-k.current;E.current=E.current-G,window.clearTimeout(T.current),l==null||l()};return L.addEventListener(Vd,H),L.addEventListener(Hd,Y),()=>{L.removeEventListener(Vd,H),L.removeEventListener(Hd,Y)}}},[p.viewport,S,l,u,D]),y.useEffect(()=>{i&&!p.isClosePausedRef.current&&D(S)},[i,S,p.isClosePausedRef,D]),y.useEffect(()=>(A(),()=>O()),[A,O]);const J=y.useMemo(()=>w?s0(w):null,[w]);return p.viewport?_.jsxs(_.Fragment,{children:[J&&_.jsx(sC,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:J}),_.jsx(tC,{scope:r,onClose:q,children:Ss.createPortal(_.jsx(Rf.ItemSlot,{scope:r,children:_.jsx($1,{asChild:!0,onEscapeKeyDown:le(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||q(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:_.jsx(ge.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...b,ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:le(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:le(t.onPointerDown,L=>{L.button===0&&(v.current={x:L.clientX,y:L.clientY})}),onPointerMove:le(t.onPointerMove,L=>{if(!v.current)return;const Y=L.clientX-v.current.x,H=L.clientY-v.current.y,G=!!x.current,C=["left","right"].includes(p.swipeDirection),P=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,M=C?P(0,Y):0,Z=C?0:P(0,H),K=L.pointerType==="touch"?10:2,se={x:M,y:Z},te={originalEvent:L,delta:se};G?(x.current=se,Ua(Y1,d,te,{discrete:!1})):Am(se,p.swipeDirection,K)?(x.current=se,Ua(Z1,c,te,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Y)>K||Math.abs(H)>K)&&(v.current=null)}),onPointerUp:le(t.onPointerUp,L=>{const Y=x.current,H=L.target;if(H.hasPointerCapture(L.pointerId)&&H.releasePointerCapture(L.pointerId),x.current=null,v.current=null,Y){const G=L.currentTarget,C={originalEvent:L,delta:Y};Am(Y,p.swipeDirection,p.swipeThreshold)?Ua(eC,h,C,{discrete:!0}):Ua(X1,f,C,{discrete:!0}),G.addEventListener("click",P=>P.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),sC=t=>{const{__scopeToast:e,children:r,...n}=t,s=Pu(pa,e),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return aC(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:_.jsx(Ef,{asChild:!0,children:_.jsx(Ru,{...n,children:i&&_.jsxs(_.Fragment,{children:[s.label," ",r]})})})},iC="ToastTitle",Yw=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return _.jsx(ge.div,{...n,ref:e})});Yw.displayName=iC;var oC="ToastDescription",Xw=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return _.jsx(ge.div,{...n,ref:e})});Xw.displayName=oC;var e0="ToastAction",t0=y.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?_.jsx(n0,{altText:r,asChild:!0,children:_.jsx(Pf,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${e0}\`. Expected non-empty \`string\`.`),null)});t0.displayName=e0;var r0="ToastClose",Pf=y.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=rC(r0,r);return _.jsx(n0,{asChild:!0,children:_.jsx(ge.button,{type:"button",...n,ref:e,onClick:le(t.onClick,s.onClose)})})});Pf.displayName=r0;var n0=y.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return _.jsx(ge.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function s0(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),lC(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...s0(n))}}),e}function Ua(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}
vendor: 5,445 bytes, lines 68-122
68),n?zw(s,i):s.dispatchEvent(i)}var Am=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function aC(t=()=>{}){const e=ir(t);Xe(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function lC(t){return t.nodeType===t.ELEMENT_NODE}function uC(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function kc(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var cC=Kw,i0=Qw,o0=Zw,a0=Yw,l0=Xw,u0=t0,c0=Pf;function d0(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=d0(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function h0(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=d0(t))&&(n&&(n+=" "),n+=e);return n}const Om=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Nm=h0,Au=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Nm(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,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=Om(c)||Om(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=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(b=>{let[p,w]=b;return Array.isArray(w)?w.includes({...i,...a}[p]):{...i,...a}[p]===w})?[...u,d,f]:u},[]);return Nm(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 69 * @license lucide-react v0.462.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const dC=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),f0=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/** 74 * @license lucide-react v0.462.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */var hC={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"};/** 79 * @license lucide-react v0.462.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const fC=y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...hC,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:f0("lucide",s),...a},[...o.map(([u,c])=>y.createElement(u,c)),...Array.isArray(i)?i:[i]]));/** 84 * @license lucide-react v0.462.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const lr=(t,e)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(fC,{ref:i,iconNode:e,className:f0(`lucide-${dC(t)}`,n),...s}));return r.displayName=`${t}`,r};/** 89 * @license lucide-react v0.462.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const pC=lr("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 94 * @license lucide-react v0.462.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const mC=lr("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 99 * @license lucide-react v0.462.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const gC=lr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 104 * @license lucide-react v0.462.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const p0=lr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 109 * @license lucide-react v0.462.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const vC=lr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 114 * @license lucide-react v0.462.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const yC=lr("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 119 * @license lucide-react v0.462.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree.
vendor: 10,964 bytes, lines 123-143
123 */const m0=lr("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"}]]);/** 124 * @license lucide-react v0.462.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const wC=lr("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 129 * @license lucide-react v0.462.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const bC=lr("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 134 * @license lucide-react v0.462.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const _C=lr("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 139 * @license lucide-react v0.462.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const xC=lr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Af="-",SC=t=>{const e=EC(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(Af);return a[0]===""&&a.length!==1&&a.shift(),g0(a,e)||kC(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},g0=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?g0(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Af);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},jm=/^\[(.+)\]$/,kC=t=>{if(jm.test(t)){const e=jm.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},EC=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return TC(Object.entries(t.classGroups),r).forEach(([i,o])=>{qd(o,n,i,e)}),n},qd=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Im(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(CC(s)){qd(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{qd(o,Im(e,i),r,n)})})},Im=(t,e)=>{let r=t;return e.split(Af).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},CC=t=>t.isThemeGetter,TC=(t,e)=>e?t.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[r,s]}):t,RC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},v0="!",PC=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(n||a.slice(w,w+i)===e)){l.push(a.slice(c,w)),c=w+i;continue}if(g==="/"){d=w;continue}}g==="["?u++:g==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(v0),b=h?f.substring(1):f,p=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:p}};return r?a=>r({className:a,parseClassName:o}):o},AC=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},OC=t=>({cache:RC(t.cacheSize),parseClassName:PC(t),...SC(t)}),NC=/\s+/,jC=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(NC);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 b=!!h,p=n(b?f.substring(0,h):f);if(!p){if(!b){a=u+(a.length>0?" "+a:a);continue}if(p=n(f),!p){a=u+(a.length>0?" "+a:a);continue}b=!1}const w=AC(c).join(":"),g=d?w+v0:w,m=g+p;if(i.includes(m))continue;i.push(m);const v=s(p,b);for(let x=0;x<v.length;++x){const S=v[x];i.push(g+S)}a=u+(a.length>0?" "+a:a)}return a};function IC(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=y0(e))&&(n&&(n+=" "),n+=r);return n}const y0=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=y0(t[n]))&&(r&&(r+=" "),r+=e);return r};function LC(t,...e){let r,n,s,i=o;function o(l){const u=e.reduce((c,d)=>d(c),t());return r=OC(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=jC(l,r);return s(l,c),c}return function(){return i(IC.apply(null,arguments))}}const ke=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},w0=/^\[(?:([a-z-]+):)?(.+)\]$/i,$C=/^\d+\/\d+$/,DC=new Set(["px","full","screen"]),MC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UC=/\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$/,FC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kr=t=>ui(t)||DC.has(t)||$C.test(t),Jr=t=>Ui(t,"length",JC),ui=t=>!!t&&!Number.isNaN(Number(t)),Ec=t=>Ui(t,"number",ui),eo=t=>!!t&&Number.isInteger(Number(t)),VC=t=>t.endsWith("%")&&ui(t.slice(0,-1)),ie=t=>w0.test(t),Zr=t=>MC.test(t),HC=new Set(["length","size","percentage"]),WC=t=>Ui(t,HC,b0),qC=t=>Ui(t,"position",b0),KC=new Set(["image","url"]),GC=t=>Ui(t,KC,YC),QC=t=>Ui(t,"",ZC),to=()=>!0,Ui=(t,e,r)=>{const n=w0.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},JC=t=>UC.test(t)&&!FC.test(t),b0=()=>!1,ZC=t=>zC.test(t),YC=t=>BC.test(t),XC=()=>{const t=ke("colors"),e=ke("spacing"),r=ke("blur"),n=ke("brightness"),s=ke("borderColor"),i=ke("borderRadius"),o=ke("borderSpacing"),a=ke("borderWidth"),l=ke("contrast"),u=ke("grayscale"),c=ke("hueRotate"),d=ke("invert"),f=ke("gap"),h=ke("gradientColorStops"),b=ke("gradientColorStopPositions"),p=ke("inset"),w=ke("margin"),g=ke("opacity"),m=ke("padding"),v=ke("saturate"),x=ke("scale"),S=ke("sepia"),k=ke("skew"),E=ke("space"),T=ke("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",ie,e],D=()=>[ie,e],J=()=>["",kr,Jr],L=()=>["auto",ui,ie],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",ie],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[ui,ie];return{cacheSize:500,separator:":",theme:{colors:[to],spacing:[kr,Jr],blur:["none","",Zr,ie],brightness:Z(),borderColor:[t],borderRadius:["none","","full",Zr,ie],borderSpacing:D(),borderWidth:J(),contrast:Z(),grayscale:P(),hueRotate:Z(),invert:P(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[VC,Jr],inset:q(),margin:q(),opacity:Z(),padding:D(),saturate:Z(),scale:Z(),sepia:P(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ie]}],container:["container"],columns:[{columns:[Zr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ie]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",eo,ie]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ie]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",eo,ie]}],"grid-cols":[{"grid-cols":[to]}],"col-start-end":[{col:["auto",{span:["full",eo,ie]},ie]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[to]}],"row-start-end":[{row:["auto",{span:[eo,ie]},ie]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ie]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",
vendor: 8,427 bytes, line 143
143ie,e]}],"min-w":[{"min-w":[ie,e,"min","max","fit"]}],"max-w":[{"max-w":[ie,e,"none","full","min","max","fit","prose",{screen:[Zr]},Zr]}],h:[{h:[ie,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ie,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ie,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ie,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Zr,Jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ec]}],"font-family":[{font:[to]}],"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",ie]}],"line-clamp":[{"line-clamp":["none",ui,Ec]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kr,ie]}],"list-image":[{"list-image":["none",ie]}],"list-style-type":[{list:["none","disc","decimal",ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kr,Jr]}],"underline-offset":[{"underline-offset":["auto",kr,ie]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie]}],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",ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),qC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",WC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GC]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[kr,ie]}],"outline-w":[{outline:[kr,Jr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[kr,Jr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Zr,QC]}],"shadow-color":[{shadow:[to]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Zr,ie]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ie]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ie]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[eo,ie]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ie]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ie]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",ie]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[kr,Jr,Ec]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
143none"]}]},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"]}}},eT=LC(XC);function xe(...t){return eT(h0(t))}const tT=cC,_0=y.forwardRef(({className:t,...e},r)=>_.jsx(i0,{ref:r,className:xe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));_0.displayName=i0.displayName;const rT=Au("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"}}),x0=y.forwardRef(({className:t,variant:e,...r},n)=>_.jsx(o0,{ref:n,className:xe(rT({variant:e}),t),...r}));x0.displayName=o0.displayName;const nT=y.forwardRef(({className:t,...e},r)=>_.jsx(u0,{ref:r,className:xe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));nT.displayName=u0.displayName;const S0=y.forwardRef(({className:t,...e},r)=>_.jsx(c0,{ref:r,className:xe("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,162 bytes, line 143
143/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:_.jsx(xC,{className:"h-4 w-4"})}));S0.displayName=c0.displayName;const k0=y.forwardRef(({className:t,...e},r)=>_.jsx(a0,{ref:r,className:xe("text-sm font-semibold",t),...e}));k0.displayName=a0.displayName;const E0=y.forwardRef(({className:t,...e},r)=>_.jsx(l0,{ref:r,className:xe("text-sm opacity-90",t),...e}));E0.displayName=l0.displayName;function sT(){const{toasts:t}=b1();return _.jsxs(tT,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return _.jsxs(x0,{...i,children:[_.jsxs("div",{className:"grid gap-1",children:[r&&_.jsx(k0,{children:r}),n&&_.jsx(E0,{children:n})]}),s,_.jsx(S0,{})]},e)}),_.jsx(_0,{})]})}var iT=Rh[" useId ".trim().toString()]||(()=>{}),oT=0;function Of(t){const[e,r]=y.useState(iT());return Xe(()=>{r(n=>n??String(oT++))},[t]),e?`radix-${e}`:""}const aT=["top","right","bottom","left"],On=Math.min,_t=Math.max,Wl=Math.round,Fa=Math.floor,Nn=t=>({x:t,y:t}),lT={left:"right",right:"left",bottom:"top",top:"bottom"},uT={start:"end",end:"start"};function Kd(t,e,r){return _t(t,On(e,r))}function Fr(t,e){return typeof t=="function"?t(e):t}function zr(t){return t.split("-")[0]}function Fi(t){return t.split("-")[1]}function Nf(t){return t==="x"?"y":"x"}function jf(t){return t==="y"?"height":"width"}function jn(t){return["top","bottom"].includes(zr(t))?"y":"x"}function If(t){return Nf(jn(t))}function cT(t,e,r){r===void 0&&(r=!1);const n=Fi(t),s=If(t),i=jf(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ql(o)),[o,ql(o)]}function dT(t){const e=ql(t);return[Gd(t),e,Gd(e)]}function Gd(t){return t.replace(/start|end/g,e=>uT[e])}function hT(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function fT(t,e,r,n){const s=Fi(t);let i=hT(zr(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Gd)))),i}function ql(t){return t.replace(/left|right|bottom|top/g,e=>lT[e])}function pT(t){return{top:0,right:0,bottom:0,left:0,...t}}function C0(t){return typeof t!="number"?pT(t):{top:t,right:t,bottom:t,left:t}}function Kl(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function Lm(t,e,r){let{reference:n,floating:s}=t;const i=jn(e),o=If(e),a=jf(o),l=zr(e),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(Fi(e)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const mT=async(t,e,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(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:c,y:d}=Lm(u,n,l),f=n,h={},b=0;for(let p=0;p<a.length;p++){const{name:w,fn:g}=a[p],{x:m,y:v,data:x,reset:S}=await g({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:t,floating:e}});c=m??c,d=v??d,h={...h,[w]:{...h[w],...x}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:c,y:d}=Lm(u,f,l)),p=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function Ko(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Fr(e,t),b=C0(h),w=a[f?d==="floating"?"reference":"floating":d],g=Kl(await i.getClippingRect
vendor: 8,722 bytes, line 143
143({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),m=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=Kl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-S.top+b.top)/x.y,bottom:(S.bottom-g.bottom+b.bottom)/x.y,left:(g.left-S.left+b.left)/x.x,right:(S.right-g.right+b.right)/x.x}}const gT=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=Fr(t,e)||{};if(u==null)return{};const d=C0(c),f={x:r,y:n},h=If(s),b=jf(h),p=await o.getDimensions(u),w=h==="y",g=w?"top":"left",m=w?"bottom":"right",v=w?"clientHeight":"clientWidth",x=i.reference[b]+i.reference[h]-f[h]-i.floating[b],S=f[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=k?k[v]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[v]||i.floating[b]);const T=x/2-S/2,A=E/2-p[b]/2-1,O=On(d[g],A),q=On(d[m],A),D=O,J=E-p[b]-q,L=E/2-p[b]/2+T,Y=Kd(D,L,J),H=!l.arrow&&Fi(s)!=null&&L!==Y&&i.reference[b]/2-(L<D?O:q)-p[b]/2<0,G=H?L<D?L-D:L-J:0;return{[h]:f[h]+G,data:{[h]:Y,centerOffset:L-Y-G,...H&&{alignmentOffset:G}},reset:H}}}),vT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...w}=Fr(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=zr(s),m=jn(a),v=zr(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(v||!p?[ql(a)]:dT(a)),k=b!=="none";!f&&k&&S.push(...fT(a,p,b,x));const E=[a,...S],T=await Ko(e,w),A=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&A.push(T[g]),d){const L=cT(s,o,x);A.push(T[L[0]],T[L[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(L=>L<=0)){var q,D;const L=(((q=i.flip)==null?void 0:q.index)||0)+1,Y=E[L];if(Y)return{data:{index:L,overflows:O},reset:{placement:Y}};let H=(D=O.filter(G=>G.overflows[0]<=0).sort((G,C)=>G.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!H)switch(h){case"bestFit":{var J;const G=(J=O.filter(C=>{if(k){const P=jn(C.placement);return P===m||P==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,M)=>P+M,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:J[0];G&&(H=G);break}case"initialPlacement":H=a;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function $m(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Dm(t){return aT.some(e=>t[e]>=0)}const yT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Fr(t,e);switch(n){case"referenceHidden":{const i=await Ko(e,{...s,elementContext:"reference"}),o=$m(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Dm(o)}}}case"escaped":{const i=await Ko(e,{...s,altBoundary:!0}),o=$m(i,r.floating);return{data:{escapedOffsets:o,escaped:Dm(o)}}}default:return{}}}}};async function wT(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=zr(r),a=Fi(r),l=jn(r)==="y",u=["left","top"].includes(o)?-1:1,c=i&&l?-1:1,d=Fr(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(h=a==="end"?b*-1:b),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const bT=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await wT(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},_T=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:g,y:m}=w;return{x:g,y:m}}},...l}=Fr(t,e),u={x:r,y:n},c=await Ko(e,l),d=jn(zr(s)),f=Nf(d);let h=u[f],b=u[d];if(i){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=h+c[w],v=h-c[g];h=Kd(m,h,v)}if(o){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",m=b+c[w],v=b-c[g];b=Kd(m,b,v)}const p=a.fn({...e,[f]:h,[d]:b});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:i,[d]:o}}}}}},xT=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Fr(t,e),c={x:r,y:n},d=jn(s),f=Nf(d);let h=c[f],b=c[d];const p=Fr(a,e),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const v=f==="y"?"height":"width",x=i.reference[f]-i.floating[v]+w.mainAxis,S=i.reference[f]+i.reference[v]-w.mainAxis;h<x?h=x:h>S&&(h=S)}if(u){var g,m;const v=f==="y"?"width":"height",x=["top","left"].includes(zr(s)),S=i.reference[d]-i.floating[v]+(x&&((g=o.offset)==null?void 0:g[d])||0)+(x?0:w.crossAxis),k=i.reference[d]+i.reference[v]+(x?0:((m=o.offset)==null?void 0:m[d])||0)-(x?w.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[f]:h,[d]:b}}}},ST=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...u}=Fr(t,e),c=await Ko(e,u),d=zr(s),f=Fi(s),h=jn(s)==="y",{width:b,height:p}=i.floating;let w,g;d==="top"||d==="bottom"?(w=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,w=f==="end"?"top":"bottom");const m=p-c.top-c.bottom,v=b-c.left-c.right,x=On(p-c[w],m),S=On(b-c[g],v),k=!e.middlewareData.shift;let E=x,T=S;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(T=v),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(E=m),k&&!f){const O=_t(c.left,0),q=_t(c.right,0),D=_t(c.top,0),J=_t(c.bottom,0);h?T=b-2*(O!==0||q!==0?O+q:_t(c.left,c.right)):E=p-2*(D!==0||J!==0?D+J:_t(c.top,c.bottom))}await l({...e,availableWidth:T,availableHeight:E});const A=await o.getDimensions(a.floating);return b!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function Ou(){return typeof window<"u"}function zi(t){return T0(t)?(t.nodeName||"").toLowerCase():"#document"}function Et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Sr(t){var e;return(e=(T0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function T0(t){return Ou()?t instanceof Node||t instanceof Et(t).Node:!1}function or(t){return Ou()?t instanceof Element||t instanceof Et(t).Element:!1}function xr(t){return Ou()?t instanceof HTMLElement||t instanceof Et(t).HTMLElement:!1}function Mm(t){return!Ou()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Et(t).ShadowRoot}function ma(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=ar(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function kT(t){return["table","td","th"].includes(zi(t))}function Nu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Lf(t){const e=$f(),r=or(t)?ar(t):t;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ET(t){let e=In(t);for(;xr(e)&&!Ri(e);){if(Lf(e))return e;if(Nu(e))return null;e=In(e)}return null}function $f(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ri(t){return["html","body","#document"].includes(zi(t))}function ar(t){return Et(t).getComputedStyle(t)}function ju(t){return or(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function In(t){if(zi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Mm(t)&&t.host||Sr(t);return Mm(e)?e.host:e}function R0(t){const e=In(t);return Ri(e)?t.ownerDocument?t.ownerDocument.body:t.body:xr(e)&&ma(e)?e:R0(e)}function Go(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=R0(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Et(s);if(i){const a=Qd(o);
vendor: 1,666 bytes, line 143
143return e.concat(o,o.visualViewport||[],ma(s)?s:[],a&&r?Go(a):[])}return e.concat(s,Go(s,[],r))}function Qd(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function P0(t){const e=ar(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=xr(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Wl(r)!==i||Wl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Df(t){return or(t)?t:t.contextElement}function ci(t){const e=Df(t);if(!xr(e))return Nn(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=P0(e);let o=(i?Wl(r.width):r.width)/n,a=(i?Wl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const CT=Nn(0);function A0(t){const e=Et(t);return!$f()||!e.visualViewport?CT:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function TT(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Et(t)?!1:e}function vs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Df(t);let o=Nn(1);e&&(n?or(n)&&(o=ci(n)):o=ci(t));const a=TT(i,r,n)?A0(i):Nn(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=Et(i),h=n&&or(n)?Et(n):n;let b=f,p=Qd(b);for(;p&&n&&h!==b;){const w=ci(p),g=p.getBoundingClientRect(),m=ar(p),v=g.left+(p.clientLeft+parseFloat(m.paddingLeft))*w.x,x=g.top+(p.clientTop+parseFloat(m.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=v,u+=x,b=Et(p),p=Qd(b)}}return Kl({width:c,height:d,x:l,y:u})}function RT(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=Sr(n),a=e?Nu(e.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Nn(1);const c=Nn(0),d=xr(n);
vendor: 4,526 bytes, line 143
143if((d||!d&&!i)&&((zi(n)!=="body"||ma(o))&&(l=ju(n)),xr(n))){const f=vs(n);u=ci(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}}function PT(t){return Array.from(t.getClientRects())}function Jd(t,e){const r=ju(t).scrollLeft;return e?e.left+r:vs(Sr(t)).left+r}function AT(t){const e=Sr(t),r=ju(t),n=t.ownerDocument.body,s=_t(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_t(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Jd(t);const a=-r.scrollTop;return ar(n).direction==="rtl"&&(o+=_t(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function OT(t,e){const r=Et(t),n=Sr(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=$f();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function NT(t,e){const r=vs(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=xr(t)?ci(t):Nn(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function Um(t,e,r){let n;if(e==="viewport")n=OT(t,r);else if(e==="document")n=AT(Sr(t));else if(or(e))n=NT(e,r);else{const s=A0(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Kl(n)}function O0(t,e){const r=In(t);return r===e||!or(r)||Ri(r)?!1:ar(r).position==="fixed"||O0(r,e)}function jT(t,e){const r=e.get(t);if(r)return r;let n=Go(t,[],!1).filter(a=>or(a)&&zi(a)!=="body"),s=null;const i=ar(t).position==="fixed";let o=i?In(t):t;for(;or(o)&&!Ri(o);){const a=ar(o),l=Lf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ma(o)&&!l&&O0(t,o))?n=n.filter(c=>c!==o):s=a,o=In(o)}return e.set(t,n),n}function IT(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?Nu(e)?[]:jT(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=Um(e,c,s);return u.top=_t(d.top,u.top),u.right=On(d.right,u.right),u.bottom=On(d.bottom,u.bottom),u.left=_t(d.left,u.left),u},Um(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LT(t){const{width:e,height:r}=P0(t);return{width:e,height:r}}function $T(t,e,r){const n=xr(e),s=Sr(e),i=r==="fixed",o=vs(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Nn(0);if(n||!n&&!i)if((zi(e)!=="body"||ma(s))&&(a=ju(e)),n){const h=vs(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&(l.x=Jd(s));let u=0,c=0;if(s&&!n&&!i){const h=s.getBoundingClientRect();c=h.top+a.scrollTop,u=h.left+a.scrollLeft-Jd(s,h)}const d=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-c;return{x:d,y:f,width:o.width,height:o.height}}function Cc(t){return ar(t).position==="static"}function Fm(t,e){if(!xr(t)||ar(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Sr(t)===r&&(r=r.ownerDocument.body),r}function N0(t,e){const r=Et(t);if(Nu(t))return r;if(!xr(t)){let s=In(t);for(;s&&!Ri(s);){if(or(s)&&!Cc(s))return s;s=In(s)}return r}let n=Fm(t,e);for(;n&&kT(n)&&Cc(n);)n=Fm(n,e);return n&&Ri(n)&&Cc(n)&&!Lf(n)?r:n||ET(t)||r}const DT=async function(t){const e=this.getOffsetParent||N0,r=this.getDimensions,n=await r(t.floating);return{reference:$T(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function MT(t){return ar(t).direction==="rtl"}const UT={convertOffsetParentRelativeRectToViewportRelativeRect:RT,getDocumentElement:Sr,getClippingRect:IT,getOffsetParent:N0,getElementRects:DT,getClientRects:PT,getDimensions:LT,getScale:ci,isElement:or,isRTL:MT};function FT(t,e){let r=null,n;const s=Sr(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(a||e(),!d||!f)return;const h=Fa(c),b=Fa(s.clientWidth-(u+d)),p=Fa(s.clientHeight-(c+f)),w=Fa(u),m={rootMargin:-h+"px "+-b+"px "+-p+"px "+-w+"px",threshold:_t(0,On(1,l))||1};let v=!0;function x(S){const k=S[0].intersectionRatio;if(k!==l){if(!v)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{r=new IntersectionObserver(x,{...m,root:s.ownerDocument})}catch{r=new IntersectionObserver(x,m)}r.observe(t)}return o(!0),i}function zT(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Df(t),c=s||i?[...u?Go(u):[],...Go(e)]:[];
vendor: 4,250 bytes, line 143
143c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=u&&a?FT(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(g=>{let[m]=g;m&&m.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),r()}),u&&!l&&h.observe(u),h.observe(e));let b,p=l?vs(t):null;l&&w();function w(){const g=vs(t);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&r(),p=g,b=requestAnimationFrame(w)}return r(),()=>{var g;c.forEach(m=>{s&&m.removeEventListener("scroll",r),i&&m.removeEventListener("resize",r)}),d==null||d(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const BT=bT,VT=_T,HT=vT,WT=ST,qT=yT,zm=gT,KT=xT,GT=(t,e,r)=>{const n=new Map,s={platform:UT,...r},i={...s.platform,_c:n};return mT(t,e,{...s,platform:i})};var fl=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Gl(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Gl(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Gl(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function j0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Bm(t,e){const r=j0(t);return Math.round(e*r)/r}function Tc(t){const e=y.useRef(t);return fl(()=>{e.current=t}),e}function QT(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=y.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=y.useState(n);Gl(f,n)||h(n);const[b,p]=y.useState(null),[w,g]=y.useState(null),m=y.useCallback(C=>{C!==k.current&&(k.current=C,p(C))},[]),v=y.useCallback(C=>{C!==E.current&&(E.current=C,g(C))},[]),x=i||b,S=o||w,k=y.useRef(null),E=y.useRef(null),T=y.useRef(c),A=l!=null,O=Tc(l),q=Tc(s),D=Tc(u),J=y.useCallback(()=>{if(!k.current||!E.current)return;const C={placement:e,strategy:r,middleware:f};q.current&&(C.platform=q.current),GT(k.current,E.current,C).then(P=>{const M={...P,isPositioned:D.current!==!1};L.current&&!Gl(T.current,M)&&(T.current=M,Ss.flushSync(()=>{d(M)}))})},[f,e,r,q,D]);fl(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const L=y.useRef(!1);fl(()=>(L.current=!0,()=>{L.current=!1}),[]),fl(()=>{if(x&&(k.current=x),S&&(E.current=S),x&&S){if(O.current)return O.current(x,S,J);J()}},[x,S,J,O,A]);const Y=y.useMemo(()=>({reference:k,floating:E,setReference:m,setFloating:v}),[m,v]),H=y.useMemo(()=>({reference:x,floating:S}),[x,S]),G=y.useMemo(()=>{const C={position:r,left:0,top:0};if(!H.floating)return C;const P=Bm(H.floating,c.x),M=Bm(H.floating,c.y);return a?{...C,transform:"translate("+P+"px, "+M+"px)",...j0(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:P,top:M}},[r,a,H.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:J,refs:Y,elements:H,floatingStyles:G}),[c,J,Y,H,G])}const JT=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?zm({element:n.current,padding:s}).fn(r):{}:n?zm({element:n,padding:s}).fn(r):{}}}},ZT=(t,e)=>({...BT(t),options:[t,e]}),YT=(t,e)=>({...VT(t),options:[t,e]}),XT=(t,e)=>({...KT(t),options:[t,e]}),eR=(t,e)=>({...HT(t),options:[t,e]}),tR=(t,e)=>({...WT(t),options:[t,e]}),rR=(t,e)=>({...qT(t),options:[t,e]}),nR=(t,e)=>({...JT(t),options:[t,e]});var sR="Arrow",I0=y.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return _.jsx(ge.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});I0.displayName=sR;var iR=I0;function oR(t){const[e,r]=y.useState(void 0);return Xe(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>
vendor: 5,041 bytes, line 143
143{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=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Mf="Popper",[L0,Iu]=Mi(Mf),[aR,$0]=L0(Mf),D0=t=>{const{__scopePopper:e,children:r}=t,[n,s]=y.useState(null);return _.jsx(aR,{scope:e,anchor:n,onAnchorChange:s,children:r})};D0.displayName=Mf;var M0="PopperAnchor",U0=y.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=$0(M0,r),o=y.useRef(null),a=Me(e,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:_.jsx(ge.div,{...s,ref:a})});U0.displayName=M0;var Uf="PopperContent",[lR,uR]=L0(Uf),F0=y.forwardRef((t,e)=>{var U,ve,je,me,ue,he;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:b,...p}=t,w=$0(Uf,r),[g,m]=y.useState(null),v=Me(e,et=>m(et)),[x,S]=y.useState(null),k=oR(x),E=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,A=n+(i!=="center"?"-"+i:""),O=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},q=Array.isArray(u)?u:[u],D=q.length>0,J={padding:O,boundary:q.filter(dR),altBoundary:D},{refs:L,floatingStyles:Y,placement:H,isPositioned:G,middlewareData:C}=QT({strategy:"fixed",placement:A,whileElementsMounted:(...et)=>zT(...et,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[ZT({mainAxis:s+T,alignmentAxis:o}),l&&YT({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?XT():void 0,...J}),l&&eR({...J}),tR({...J,apply:({elements:et,rects:At,availableWidth:Hn,availableHeight:Wr})=>{const{width:Wn,height:Hi}=At.reference,Es=et.floating.style;Es.setProperty("--radix-popper-available-width",`${Hn}px`),Es.setProperty("--radix-popper-available-height",`${Wr}px`),Es.setProperty("--radix-popper-anchor-width",`${Wn}px`),Es.setProperty("--radix-popper-anchor-height",`${Hi}px`)}}),x&&nR({element:x,padding:a}),hR({arrowWidth:E,arrowHeight:T}),f&&rR({strategy:"referenceHidden",...J})]}),[P,M]=V0(H),Z=ir(b);Xe(()=>{G&&(Z==null||Z())},[G,Z]);const K=(U=C.arrow)==null?void 0:U.x,se=(ve=C.arrow)==null?void 0:ve.y,te=((je=C.arrow)==null?void 0:je.centerOffset)!==0,[Se,Ne]=y.useState();return Xe(()=>{g&&Ne(window.getComputedStyle(g).zIndex)},[g]),_.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:G?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(me=C.transformOrigin)==null?void 0:me.x,(ue=C.transformOrigin)==null?void 0:ue.y].join(" "),...((he=C.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:_.jsx(lR,{scope:r,placedSide:P,onArrowChange:S,arrowX:K,arrowY:se,shouldHideArrow:te,children:_.jsx(ge.div,{"data-side":P,"data-align":M,...p,ref:v,style:{...p.style,animation:G?void 0:"none"}})})})});F0.displayName=Uf;var z0="PopperArrow",cR={top:"bottom",right:"left",bottom:"top",left:"right"},B0=y.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=uR(z0,n),o=cR[i.placedSide];return _.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:_.jsx(iR,{...s,ref:r,style:{...s.style,display:"block"}})})});B0.displayName=z0;function dR(t){return t!==null}var hR=t=>({name:"transformOrigin",options:t,fn(e){var w,g,m;const{placement:r,rects:n,middlewareData:s}=e,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=V0(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,h=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let b="",p="";return u==="bottom"?(b=o?d:`${f}px`,p=`${-l}px`):u==="top"?(b=o?d:`${f}px`,p=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,p=o?d:`${h}px`):u==="left"&&(b=`${n.floating.width+l}px`,p=o?d:`${h}px`),{data:{x:b,y:p}}}});function V0(t){const[e,r="center"]=t.split("-");return[e,r]}var fR=D0,H0=U0,W0=F0,q0=B0,[Lu,Xj]=Mi("Tooltip",[Iu]),Ff=Iu(),K0="TooltipProvider",pR=700,Vm="tooltip.open",[mR,G0]=Lu(K0),Q0=t=>{const{__scopeTooltip:e,delayDuration:r=pR,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),_.jsx(mR,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 4,219 bytes, line 143
143o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};Q0.displayName=K0;var J0="Tooltip",[eI,$u]=Lu(J0),Zd="TooltipTrigger",gR=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=$u(Zd,r),i=G0(Zd,r),o=Ff(r),a=y.useRef(null),l=Me(e,a,s.onTriggerChange),u=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),_.jsx(H0,{asChild:!0,...o,children:_.jsx(ge.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:le(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:le(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:le(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:le(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:le(t.onBlur,s.onClose),onClick:le(t.onClick,s.onClose)})})});gR.displayName=Zd;var vR="TooltipPortal",[tI,yR]=Lu(vR,{forceMount:void 0}),Pi="TooltipContent",Z0=y.forwardRef((t,e)=>{const r=yR(Pi,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=$u(Pi,t.__scopeTooltip);return _.jsx(Cf,{present:n||o.open,children:o.disableHoverableContent?_.jsx(Y0,{side:s,...i,ref:e}):_.jsx(wR,{side:s,...i,ref:e})})}),wR=y.forwardRef((t,e)=>{const r=$u(Pi,t.__scopeTooltip),n=G0(Pi,t.__scopeTooltip),s=y.useRef(null),i=Me(e,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=y.useCallback(()=>{a(null),d(!1)},[d]),h=y.useCallback((b,p)=>{const w=b.currentTarget,g={x:b.clientX,y:b.clientY},m=kR(g,w.getBoundingClientRect()),v=ER(g,m),x=CR(p.getBoundingClientRect()),S=RR([...v,...x]);a(S),d(!0)},[d]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(l&&c){const b=w=>h(w,c),p=w=>h(w,l);return l.addEventListener("pointerleave",b),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",b),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),y.useEffect(()=>{if(o){const b=p=>{const w=p.target,g={x:p.clientX,y:p.clientY},m=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),v=!TR(g,o);m?f():v&&(f(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,c,o,u,f]),_.jsx(Y0,{...t,ref:i})}),[bR,_R]=Lu(J0,{isInside:!1}),xR=k1("TooltipContent"),Y0=y.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=$u(Pi,r),u=Ff(r),{onClose:c}=l;return y.useEffect(()=>(document.addEventListener(Vm,c),()=>document.removeEventListener(Vm,c)),[c]),y.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]),_.jsx(Tu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:_.jsxs(W0,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[_.jsx(xR,{children:n}),_.jsx(bR,{scope:r,isInside:!0,children:_.jsx(q1,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Z0.displayName=Pi;var X0="TooltipArrow",SR=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Ff(r);return _R(X0,r).isInside?null:_.jsx(q0,{...s,...n,ref:e})});SR.displayName=X0;function kR(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function ER(t,e,r=5){const n=[];
143switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function CR(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function TR(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],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 RR(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),PR(e)}function PR(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const s=t[n];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var AR=Q0,eb=Z0;const OR=AR,NR=y.forwardRef(({className:t,sideOffset:e=4,...r},n)=>_.jsx(eb,{ref:n,sideOffset:e,className:xe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));NR.displayName=eb.displayName;var pe;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(pe||(pe={}));var Hm;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Hm||(Hm={}));const V=pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rn=t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return Number.isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}}
vendor: 5,704 bytes, line 143
143,j=pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Br extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),n}static assert(e){if(!(e instanceof Br))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];r[i]=r[i]||[],r[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Br.create=t=>new Br(t);const Yd=(t,e)=>{let r;switch(t.code){case j.invalid_type:t.received===V.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case j.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,pe.jsonStringifyReplacer)}`;break;case j.unrecognized_keys:r=`Unrecognized key(s) in object: ${pe.joinValues(t.keys,", ")}`;break;case j.invalid_union:r="Invalid input";break;case j.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${pe.joinValues(t.options)}`;break;case j.invalid_enum_value:r=`Invalid enum value. Expected ${pe.joinValues(t.options)}, received '${t.received}'`;break;case j.invalid_arguments:r="Invalid function arguments";break;case j.invalid_return_type:r="Invalid function return type";break;case j.invalid_date:r="Invalid date";break;case j.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:pe.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case j.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case j.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case j.custom:r="Invalid input";break;case j.invalid_intersection_types:r="Intersection results could not be merged";break;case j.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case j.not_finite:r="Number must be finite";break;default:r=e.defaultError,pe.assertNever(t)}return{message:r}};let jR=Yd;function IR(){return jR}const LR=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function F(t,e){const r=IR(),n=LR({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Yd?void 0:Yd].filter(s=>!!s)});t.common.issues.push(n)}class Tt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return X;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const i=await s.key,o=await s.value;n.push({key:i,value:o})}return Tt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:i,value:o}=s;
vendor: 28,039 bytes, line 143
143if(i.status==="aborted"||o.status==="aborted")return X;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const X=Object.freeze({status:"aborted"}),ao=t=>({status:"dirty",value:t}),Ft=t=>({status:"valid",value:t}),Wm=t=>t.status==="aborted",qm=t=>t.status==="dirty",Ai=t=>t.status==="valid",Ql=t=>typeof Promise<"u"&&t instanceof Promise;var W;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(W||(W={}));class Ln{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Km=(t,e)=>{if(Ai(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Br(t.common.issues);return this._error=r,this._error}}};function oe(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??r??a.defaultError}},description:s}}class de{get description(){return this._def.description}_getType(e){return rn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:rn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Tt,ctx:{common:e.parent.common,data:e.data,parsedType:rn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Ql(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rn(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Km(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rn(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return Ai(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(s=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>Ai(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rn(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Ql(s)?s:Promise.resolve(s));return Km(n,i)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=e(s),a=()=>i.addIssue({code:j.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new Ni({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Rn.create(this,this._def)}nullable(){return ji.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _r.create(this)}promise(){return Xl.create(this,this._def)}or(e){return Zl.create([this,e],this._def)}and(e){return Yl.create(this,e,this._def)}transform(e){return new Ni({...oe(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new eh({...oe(this._def),innerType:this,defaultValue:r,typeName:ee.ZodDefault})}brand(){return new sP({typeName:ee.ZodBranded,type:this,...oe(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new th({...oe(this._def),innerType:this,catchValue:r,typeName:ee.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return zf.create(this,e)}readonly(){return rh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $R=/^c[^\s-]{8,}$/i,DR=/^[0-9a-z]+$/,MR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,UR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FR=/^[a-z0-9_-]{21}$/i,zR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,BR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,VR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Rc;const WR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,KR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,GR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,QR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,JR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tb="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ZR=new RegExp(`^${tb}$`);function rb(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function YR(t){return new RegExp(`^${rb(t)}$`)}function XR(t){let e=`${tb}T${rb(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function eP(t,e){return!!((e==="v4"||!e)&&WR.test(t)||(e==="v6"||!e)&&KR.test(t))}function tP(t,e){if(!zR.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function rP(t,e){return!!((e==="v4"||!e)&&qR.test(t)||(e==="v6"||!e)&&GR.test(t))}class vn extends de{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){const i=this._getOrReturnCtx(e);return F(i,{code:j.invalid_type,expected:V.string,received:i.parsedType}),X}const n=new Tt;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:j.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?F(s,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&F(s,{code:j.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")VR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"email",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Rc||(Rc=new RegExp(HR,"u")),Rc.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"emoji",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")UR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"uuid",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")FR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"nanoid",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$R.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"cuid",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")DR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"cuid2",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")MR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"ulid",code:j.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),F(s,{validation:"url",code:j.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"regex",code:j.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),F(s,{code:j.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),F(s,{code:j.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),F(s,{code:j.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?XR(i).test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{code:j.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ZR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{code:j.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?YR(i).test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{code:j.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?BR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"duration",code:j.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?eP(e.data,i.version)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"ip",code:j.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?tP(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"jwt",code:j.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?rP(e.data,i.version)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"cidr",code:j.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?QR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"base64",code:j.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?JR.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"base64url",code:j.invalid_string,message:i.message}),n.dirty()):pe.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:j.invalid_string,...W.errToObj(n)})}_addCheck(e){return new vn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...W.errToObj(e)})}url(e){return this._addCheck({kind:"url",...W.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...W.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...W.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...W.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...W.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...W.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...W.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...W.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...W.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...W.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...W.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...W.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...W.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...W.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...W.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...W.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...W.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...W.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...W.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...W.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...W.errToObj(r)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new vn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}vn.create=t=>new vn({checks:[],typeName:ee.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...oe(t)});function nP(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class Qo extends de{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){const i=this._getOrReturnCtx(e);return F(i,{code:j.invalid_type,expected:V.number,received:i.parsedType}),X}let n;const s=new Tt;for(const i of this._def.checks)i.kind==="int"?pe.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),F(n,{code:j.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:j.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:j.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?nP(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),F(n,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),F(n,{code:j.not_finite,message:i.message}),s.dirty()):pe.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,W.toString(r))}gt(e,r){return this.setLimit("min",e,!1,W.toString(r))}lte(e,r){return this.setLimit("max",e,!0,W.toString(r))}lt(e,r){return this.setLimit("max",e,!1,W.toString(r))}setLimit(e,r,n,s){return new Qo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:W.toString(s)}]})}_addCheck(e){return new Qo({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:W.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:W.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&pe.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Qo.create=t=>new Qo({checks:[],typeName:ee.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...oe(t)});class Jo extends de{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==V.bigint)return this._getInvalidInput(e);let n;const s=new Tt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:j.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:j.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),F(n,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):pe.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return F(r,{code:j.invalid_type,expected:V.bigint,received:r.parsedType}),X}gte(e,r){return this.setLimit("min",e,!0,W.toString(r))}gt(e,r){return this.setLimit("min",e,!1,W.toString(r))}lte(e,r){return this.setLimit("max",e,!0,W.toString(r))}lt(e,r){return this.setLimit("max",e,!1,W.toString(r))}setLimit(e,r,n,s){return new Jo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:W.toString(s)}]})}_addCheck(e){return new Jo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Jo.create=t=>new Jo({checks:[],typeName:ee.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...oe(t)});class Gm extends de{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){const n=this._getOrReturnCtx(e);return F(n,{code:j.invalid_type,expected:V.boolean,received:n.parsedType}),X}return Ft(e.data)}}Gm.create=t=>new Gm({typeName:ee.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...oe(t)});class Jl extends de{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){const i=this._getOrReturnCtx(e);return F(i,{code:j.invalid_type,expected:V.date,received:i.parsedType}),X}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return F(i,{code:j.invalid_date}),X}const n=new Tt;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:j.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:j.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):pe.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Jl({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:W.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:W.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Jl.create=t=>new Jl({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ee.ZodDate,...oe(t)});class Qm extends de{_parse(e){if(this._getType(e)!==V.symbol){const n=this._getOrReturnCtx(e);return F(n,{code:j.invalid_type,expected:V.symbol,received:n.parsedType}),X}return Ft(e.data)}}Qm.create=t=>new Qm({typeName:ee.ZodSymbol,...oe(t)});class Jm extends de{_parse(e){if(this._getType(e)!==V.undefined){const n=this._getOrReturnCtx(e);return F(n,{code:j.invalid_type,expected:V.undefined,received:n.parsedType}),X}return Ft(e.data)}}Jm.create=t=>new Jm({typeName:ee.ZodUndefined,...oe(t)});class Zm extends de{_parse(e){if(this._getType(e)!==V.null){const n=this._getOrReturnCtx(e);return F(n,{code:j.invalid_type,expected:V.null,received:n.parsedType}),X}return Ft(e.data)}}Zm.create=t=>new Zm({typeName:ee.ZodNull,...oe(t)});class Ym extends de{constructor(){super(...arguments),this._any=!0}_parse(e){return Ft(e.data)}}Ym.create=t=>new Ym({typeName:ee.ZodAny,...oe(t)});class Xm extends de{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ft(e.data)}}Xm.create=t=>new Xm({typeName:ee.ZodUnknown,...oe(t)});class $n extends de{_parse(e){const r=this._getOrReturnCtx(e);return F(r,{code:j.invalid_type,expected:V.never,received:r.parsedType}),X}}$n.create=t=>new $n({typeName:ee.ZodNever,...oe(t)});class eg extends de{_parse(e){if(this._getType(e)!==V.undefined){const n=this._getOrReturnCtx(e);return F(n,{code:j.invalid_type,expected:V.void,received:n.parsedType}),X}return Ft(e.data)}}eg.create=t=>new eg({typeName:ee.ZodVoid,...oe(t)});class _r extends de{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==V.array)return F(r,{code:j.invalid_type,expected:V.array,received:r.parsedType}),X;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(F(r,{code:o?j.too_big:j.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(F(r,{code:j.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(F(r,{code:j.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Ln(r,o,r.path,a)))).then(o=>Tt.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new Ln(r,o,r.path,a)));return Tt.mergeArray(n,i)}
vendor: 5,073 bytes, line 143
143get element(){return this._def.type}min(e,r){return new _r({...this._def,minLength:{value:e,message:W.toString(r)}})}max(e,r){return new _r({...this._def,maxLength:{value:e,message:W.toString(r)}})}length(e,r){return new _r({...this._def,exactLength:{value:e,message:W.toString(r)}})}nonempty(e){return this.min(1,e)}}_r.create=(t,e)=>new _r({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...oe(e)});function Us(t){if(t instanceof $e){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Rn.create(Us(n))}return new $e({...t._def,shape:()=>e})}else return t instanceof _r?new _r({...t._def,type:Us(t.element)}):t instanceof Rn?Rn.create(Us(t.unwrap())):t instanceof ji?ji.create(Us(t.unwrap())):t instanceof ys?ys.create(t.items.map(e=>Us(e))):t}class $e extends de{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=pe.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==V.object){const u=this._getOrReturnCtx(e);return F(u,{code:j.invalid_type,expected:V.object,received:u.parsedType}),X}const{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof $n&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ln(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof $n){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:s.data[c]}});else if(u==="strict")a.length>0&&(F(s,{code:j.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ln(s,d,s.path,c)),alwaysSet:c in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>Tt.mergeObjectSync(n,u)):Tt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new $e({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:W.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new $e({...this._def,unknownKeys:"strip"})}passthrough(){return new $e({...this._def,unknownKeys:"passthrough"})}extend(e){return new $e({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new $e({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new $e({...this._def,catchall:e})}pick(e){const r={};for(const n of pe.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new $e({...this._def,shape:()=>r})}omit(e){const r={};for(const n of pe.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new $e({...this._def,shape:()=>r})}deepPartial(){return Us(this)}partial(e){const r={};for(const n of pe.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new $e({...this._def,shape:()=>r})}required(e){const r={};for(const n of pe.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Rn;)i=i._def.innerType;r[n]=i}return new $e({...this._def,shape:()=>r})}keyof(){return nb(pe.objectKeys(this.shape))}}$e.create=(t,e)=>new $e({shape:()=>t,unknownKeys:"strip",catchall:$n.create(),typeName:ee.ZodObject,...oe(e)});$e.strictCreate=(t,e)=>new $e({shape:()=>t,unknownKeys:"strict",catchall:$n.create(),typeName:ee.ZodObject,...oe(e)});$e.lazycreate=(t,e)=>new $e({shape:t,unknownKeys:"strip",catchall:$n.create(),typeName:ee.ZodObject,...oe(e)});class Zl extends de{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Br(a.ctx.common.issues));return F(r,{code:j.invalid_union,unionErrors:o}),X}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 4,828 bytes, line 143
143const a=o.map(l=>new Br(l));return F(r,{code:j.invalid_union,unionErrors:a}),X}}get options(){return this._def.options}}Zl.create=(t,e)=>new Zl({options:t,typeName:ee.ZodUnion,...oe(e)});function Xd(t,e){const r=rn(t),n=rn(e);if(t===e)return{valid:!0,data:t};if(r===V.object&&n===V.object){const s=pe.objectKeys(e),i=pe.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=Xd(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===V.array&&n===V.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=Xd(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===V.date&&n===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Yl extends de{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(i,o)=>{if(Wm(i)||Wm(o))return X;const a=Xd(i.value,o.value);return a.valid?((qm(i)||qm(o))&&r.dirty(),{status:r.value,value:a.data}):(F(n,{code:j.invalid_intersection_types}),X)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Yl.create=(t,e,r)=>new Yl({left:t,right:e,typeName:ee.ZodIntersection,...oe(r)});class ys extends de{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return F(n,{code:j.invalid_type,expected:V.array,received:n.parsedType}),X;if(n.data.length<this._def.items.length)return F(n,{code:j.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),X;!this._def.rest&&n.data.length>this._def.items.length&&(F(n,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ln(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>Tt.mergeArray(r,o)):Tt.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new ys({...this._def,rest:e})}}ys.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ys({items:t,typeName:ee.ZodTuple,rest:null,...oe(e)})};class tg extends de{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return F(n,{code:j.invalid_type,expected:V.map,received:n.parsedType}),X;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:s._parse(new Ln(n,a,n.path,[u,"key"])),value:i._parse(new Ln(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return X;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(u.value,c.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return X;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(u.value,c.value)}return{status:r.value,value:a}}}}tg.create=(t,e,r)=>new tg({valueType:e,keyType:t,typeName:ee.ZodMap,...oe(r)});class Zo extends de{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return F(n,{code:j.invalid_type,expected:V.set,received:n.parsedType}),X;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(F(n,{code:j.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(F(n,{code:j.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return X;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>i._parse(new Ln(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new Zo({...this._def,minSize:{value:e,message:W.toString(r)}})}max(e,r){return new Zo({...this._def,maxSize:{value:e,message:W.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Zo.create=(t,e)=>new Zo({valueType:t,minSize:null,maxSize:null,typeName:ee.ZodSet,...oe(e)});class rg extends de{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}rg.create=(t,e)=>new rg({getter:t,typeName:ee.ZodLazy,...oe(e)});
vendor: 4,722 bytes, line 143
143class ng extends de{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return F(r,{received:r.data,code:j.invalid_literal,expected:this._def.value}),X}return{status:"valid",value:e.data}}get value(){return this._def.value}}ng.create=(t,e)=>new ng({value:t,typeName:ee.ZodLiteral,...oe(e)});function nb(t,e){return new Oi({values:t,typeName:ee.ZodEnum,...oe(e)})}class Oi extends de{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return F(r,{expected:pe.joinValues(n),received:r.parsedType,code:j.invalid_type}),X}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return F(r,{received:r.data,code:j.invalid_enum_value,options:n}),X}return Ft(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Oi.create(e,{...this._def,...r})}exclude(e,r=this._def){return Oi.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Oi.create=nb;class sg extends de{_parse(e){const r=pe.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){const s=pe.objectValues(r);return F(n,{expected:pe.joinValues(s),received:n.parsedType,code:j.invalid_type}),X}if(this._cache||(this._cache=new Set(pe.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=pe.objectValues(r);return F(n,{received:n.data,code:j.invalid_enum_value,options:s}),X}return Ft(e.data)}get enum(){return this._def.values}}sg.create=(t,e)=>new sg({values:t,typeName:ee.ZodNativeEnum,...oe(e)});class Xl extends de{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.promise&&r.common.async===!1)return F(r,{code:j.invalid_type,expected:V.promise,received:r.parsedType}),X;const n=r.parsedType===V.promise?r.data:Promise.resolve(r.data);return Ft(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Xl.create=(t,e)=>new Xl({type:t,typeName:ee.ZodPromise,...oe(e)});class Ni extends de{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{F(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return X;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?X:l.status==="dirty"||r.value==="dirty"?ao(l.value):l});{if(r.value==="aborted")return X;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?X:a.status==="dirty"||r.value==="dirty"?ao(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?X:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?X:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ai(o))return X;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Ai(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):X);pe.assertNever(s)}}Ni.create=(t,e,r)=>new Ni({schema:t,typeName:ee.ZodEffects,effect:e,...oe(r)});Ni.createWithPreprocess=(t,e,r)=>new Ni({schema:e,effect:{type:"preprocess",transform:t},typeName:ee.ZodEffects,...oe(r)});class Rn extends de{_parse(e){return this._getType(e)===V.undefined?Ft(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Rn.create=(t,e)=>new Rn({innerType:t,typeName:ee.ZodOptional,...oe(e)});
vendor: 5,925 bytes, line 143
143class ji extends de{_parse(e){return this._getType(e)===V.null?Ft(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ji.create=(t,e)=>new ji({innerType:t,typeName:ee.ZodNullable,...oe(e)});class eh extends de{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}eh.create=(t,e)=>new eh({innerType:t,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});class th extends de{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ql(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Br(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Br(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}th.create=(t,e)=>new th({innerType:t,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});class ig extends de{_parse(e){if(this._getType(e)!==V.nan){const n=this._getOrReturnCtx(e);return F(n,{code:j.invalid_type,expected:V.nan,received:n.parsedType}),X}return{status:"valid",value:e.data}}}ig.create=t=>new ig({typeName:ee.ZodNaN,...oe(t)});class sP extends de{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class zf extends de{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?X:i.status==="dirty"?(r.dirty(),ao(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?X:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new zf({in:e,out:r,typeName:ee.ZodPipeline})}}class rh extends de{_parse(e){const r=this._def.innerType._parse(e),n=s=>(Ai(s)&&(s.value=Object.freeze(s.value)),s);return Ql(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}rh.create=(t,e)=>new rh({innerType:t,typeName:ee.ZodReadonly,...oe(e)});$e.lazycreate;var ee;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ee||(ee={}));const Pc=vn.create;$n.create;_r.create;const iP=$e.create;$e.strictCreate;Zl.create;Yl.create;ys.create;Oi.create;Xl.create;Rn.create;ji.create;const oP=Au("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"}}),rs=y.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const o=n?x1:"button";return _.jsx(o,{className:xe(oP({variant:e,size:r,className:t})),ref:i,...s})});rs.displayName="Button";const nh=y.forwardRef(({className:t,type:e,...r},n)=>_.jsx("input",{type:e,className:xe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));nh.displayName="Input";var aP="Label",sb=y.forwardRef((t,e)=>_.jsx(ge.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));sb.displayName=aP;var ib=sb;const lP=Au("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sh=y.forwardRef(({className:t,...e},r)=>_.jsx(ib,{ref:r,className:xe(lP(),t),...e}));sh.displayName=ib.displayName;const yn=y.forwardRef(({className:t,...e},r)=>_.jsx("div",{ref:r,className:xe("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));
143yn.displayName="Card";const uP=y.forwardRef(({className:t,...e},r)=>_.jsx("div",{ref:r,className:xe("flex flex-col space-y-1.5 p-6",t),...e}));uP.displayName="CardHeader";const cP=y.forwardRef(({className:t,...e},r)=>_.jsx("h3",{ref:r,className:xe("text-2xl font-semibold leading-none tracking-tight",t),...e}));cP.displayName="CardTitle";const dP=y.forwardRef(({className:t,...e},r)=>_.jsx("p",{ref:r,className:xe("text-sm text-muted-foreground",t),...e}));dP.displayName="CardDescription";const hP=y.forwardRef(({className:t,...e},r)=>_.jsx("div",{ref:r,className:xe("p-6 pt-0",t),...e}));hP.displayName="CardContent";const fP=y.forwardRef(({className:t,...e},r)=>_.jsx("div",{ref:r,className:xe("flex items-center p-6 pt-0",t),...e}));fP.displayName="CardFooter";var Bf="Progress",Vf=100,[pP,rI]=Mi(Bf),[mP,gP]=pP(Bf),ob=y.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:i=vP,...o}=t;(s||s===0)&&!og(s)&&console.error(yP(`${s}`,"Progress"));const a=og(s)?s:Vf;n!==null&&!ag(n,a)&&console.error(wP(`${n}`,"Progress"));const l=ag(n,a)?n:null,u=eu(l)?i(l,a):void 0;return _.jsx(mP,{scope:r,value:l,max:a,children:_.jsx(ge.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":eu(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":ub(l,a),"data-value":l??void 0,"data-max":a,...o,ref:e})})});ob.displayName=Bf;var ab="ProgressIndicator",lb=y.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=gP(ab,r);return _.jsx(ge.div,{"data-state":ub(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});lb.displayName=ab;function vP(t,e){return`${Math.round(t/e*100)}%`}function ub(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function eu(t){return typeof t=="number"}function og(t){return eu(t)&&!isNaN(t)&&t>0}function ag(t,e){return eu(t)&&!isNaN(t)&&t<=e&&t>=0}function yP(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vf}\`.`}function wP(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: 144 - a positive number 145 - less than the value passed to \`max\` (or ${Vf} if no \`max\` prop is set) 146 - \`null\` or \`undefined\` if the progress is indeterminate. 147 148Defaulting to \`null\`.`}var cb=ob,bP=lb;const _P=y.forwardRef(({className:t,value:e,...r},n)=>_.jsx(cb,{ref:n,className:xe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...r,children:_.jsx(bP,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));_P.displayName=cb.displayName;const xP=[{id:1,emoji:"âï¸",question:"São quantas oportunidades de concursos na Justiça do Trabalho?",options:[{letter:"a",emoji:"1ï¸â£",text:"Um concurso unificado"},{letter:"b",emoji:"ð¯",text:"25 concursos (24 TRTs + TST)",correct:!0},{letter:"c",emoji:"ð ",text:"Um concurso por ano"},{letter:"d",emoji:"â³",text:"Um concurso a cada quatro anos"}]},{id:2,emoji:"ð°",question:"A remuneração inicial (bruta) de um Técnico é de aproximadamente:",options:[{letter:"a",emoji:"ðµ",text:"R$ 3.500,00"},{letter:"b",emoji:"ð´",text:"R$ 7.000,00"},{letter:"c",emoji:"ð¶",text:"R$ 9.000,00"},{letter:"d",emoji:"ð",text:"R$ 13.000,00",correct:!0}]},{id:3,emoji:"ð¼",question:"A remuneração inicial (bruta) de um Analista é de aproximadamente:",options:[{letter:"a",emoji:"ðµ",text:"R$ 4.500,00"},{letter:"b",emoji:"ð¤",text:"R$ 19.000,00",correct:!0},{letter:"c",emoji:"ð¶",text:"R$ 9.000,00"},{letter:"d",emoji:"ð·",text:"R$ 12.000,00"}]},{id:4,emoji:"ð",question:"Ao passar em um determinado TRT, é possÃvel ir para outro TRT sem precisar fazer um novo concurso?",options:[{letter:"a",emoji:"â ",text:"Sim, por meio da remoção por permuta",correct:!0},{letter:"b",emoji:"â",text:"Não, é necessário fazer um novo concurso"}]},{id:5,emoji:"ð",question:"Qual dos fatores abaixo é mais importante no estudo para concursos?",options:[{letter:"a",emoji:"â",text:"Qualidade do estudo",correct:!0},{letter:"b",emoji:"â°",text:"Quantidade de horas"},{letter:"c",emoji:"ð",text:"Idade"},{letter:"d",emoji:"ð",text:"Ter sido um excelente aluno(a)"}]},{id:6,emoji:"ð",question:"Qual o requisito de escolaridade para o cargo de Técnico Judiciário â
148Ãrea Administrativa?",options:[{letter:"a",emoji:"ð",text:"NÃvel médio"},{letter:"b",emoji:"ð",text:"NÃvel médio especializado"},{letter:"c",emoji:"ð",text:"NÃvel superior, em qualquer área (inclusive tecnólogo)",correct:!0},{letter:"d",emoji:"âï¸",text:"Apenas nÃvel superior em Administração ou Direito"}]},{id:7,emoji:"ðª",question:"Quando abrem as vagas para a Mentoria Caminho da Aprovação?",options:[{letter:"a",emoji:"ð
",text:"Segunda-feira (06/07)"},{letter:"b",emoji:"ð
",text:"Terça-feira (07/07)"},{letter:"c",emoji:"ð¥",text:"Quarta-feira (08/07)",correct:!0},{letter:"d",emoji:"ð
",text:"Sábado (11/07)"}]},{id:8,emoji:"â±ï¸",question:"Por que esse é o melhor momento para estudar para TRTs?",options:[{letter:"a",emoji:"ð",text:"Porque o edital já está aberto"},{letter:"b",emoji:"ð",text:"Porque a maioria espera o edital abrir e quem começar agora terá muita vantagem",correct:!0},{letter:"c",emoji:"â",text:"Não dá mais tempo de estudar"},{letter:"d",emoji:"ð¤·",text:"Nenhuma das anteriores"}]},{id:9,emoji:"ð¯",question:"à possÃvel estudar para mais de um concurso de TRT ao mesmo tempo?",options:[{letter:"a",emoji:"â",text:"Não, tem que escolher e fazer apenas um"},{letter:"b",emoji:"ð",text:"Sim, basta esperar os editais abrirem e começar a estudar"},{letter:"c",emoji:"ð§",text:"Sim, mas o direcionamento é fundamental para não se perder no caminho",correct:!0},{letter:"d",emoji:"1ï¸â£",text:"Não, tem que escolher no máximo um TRT por ano"}]},{id:10,emoji:"ð
",question:"Somente quem participar dos dois quizzes (segunda e terça) é que vai concorrer a uma vaga na mentoria.",options:[{letter:"a",emoji:"â
",text:"Verdadeiro",correct:!0},{letter:"b",emoji:"â",text:"Falso"}]}],Dn={"aula-1":{slug:"aula-1",titulo:"QUIZ AULA 1 TRT",subtitulo:"Esquadrão de Elite ⢠Caminho da Aprovação",replayUrl:"https://youtube.com/live/XrZGjSZtn6w",webhookUrl:"https://hook.us1.make.com/7rdxd9n6osab2vwbr2j44irewau8oe7b",accessCode:"0126",whatsappNumber:"554591210877",whatsappMessage:"Meu código para liberar o Cronograma e simulado é 0126",questions:xP},"aula-2":{slug:"aula-2",titulo:"QUIZ AULA 2 TRT",subtitulo:"Esquadrão de Elite ⢠Caminho da Aprovação",replayUrl:"https://youtu.be/lbMvlRENQ74",webhookUrl:"https://hook.us1.make.com/ez5r9gxauqay1a1habbac9c8s44nlyc5",accessCode:"0228",whatsappNumber:"554591210877",whatsappMessage:"Meu código da Aula 2 é 0228",whatsappUrl:"https://api.whatsapp.com/send/?phone=554599273274&text=Meu+c%C3%B3digo+da+Aula+2+%C3%A9+0228&type=phone_number&app_absent=0",questions:[{id:1,emoji:"ð",question:"Ao estudar para TRTs a distribuição das matérias não importa muito, pois todas tem a mesma relevância em prova.",options:[{letter:"a",emoji:"â
",text:"Verdadeiro"},{letter:"b",emoji:"â",text:"Falso",correct:!0}]},{id:2,emoji:"ðï¸",question:"Para um estudo eficiente é indispensável um cronograma de estudos bem definido, sabendo exatamente qual matéria e tópico vai estudar em cada dia.",options:[{letter:"a",emoji:"â
",text:"Verdadeiro",correct:!0},{letter:"b",emoji:"â",text:"Falso"}]},{id:3,emoji:"ð",question:"Qual a forma certa de inserir revisões nos seus estudos?",options:[{letter:"a",emoji:"ð",text:"Estudar todo o edital e só depois começar a revisar"},{letter:"b",emoji:"ð²",text:"Ir revisando os tópicos de forma aleatória, conforme for lembrando"},{letter:"c",emoji:"ð«",text:"Não precisa revisar"},{letter:"d",emoji:"ð§",text:"Revisões espaçadas do conteúdo estudado, distribuÃdas automaticamente pelo cronograma interativo.",correct:!0}]},{id:4,emoji:"ðï¸",question:"Qual a banca examinadora mais presente nos editais de TRTs?",options:[{letter:"a",emoji:"ð",text:"FGV"},{letter:"b",emoji:"ð¯",text:"FCC",correct:!0},{letter:"c",emoji:"ð",text:"Cebraspe"},{letter:"d",emoji:"ð",text:"Vunesp"}]},{id:5,emoji:"âï¸",question:"Quem estuda para TRT, consegue adaptar os estudos para eventualmente fazer um TRF ou um TJ?",options:[{letter:"a",emoji:"ð",text:"Sim, o melhor é estudar desde o começo para tudo junto."},{letter:"b",emoji:"ð°",text:"Sim, nem precisa adaptar, é tudo igual."},{letter:"c",emoji:"ð§",text:"Sim, mas precisa de um direcionamento cuidadoso e conforme o momento de cada edital.",correct:!0},{letter:"d",emoji:"â",text:"Não, é impossÃvel conciliar esses editais."}]},{id:6,emoji:"ð",question:"Quando for estudar um tópico que nunca vi antes, é melhor começar pelas questões e só depois ir para a teoria.",options:[{letter:"a",emoji:"â
",text:"Verdadeiro"},{letter:"b",emoji:"â",text:"Falso",correct:!0}]},{id:7,emoji:"ðï¸",question:"Quais são os três pilares da Mentoria Caminho da Aprovação?",options:[{letter:"a",emoji:"ð¡",text:"Clareza, Confiança e Constância.",correct:!0},{letter:"b",emoji:"ð¯",text:"Determinação, Foco e Objetivo."},{letter:"c",emoji:"ð¥",text:"Intensidade, Constância e Amplitude."},{letter:"d",emoji:"â¨",text:"Clareza, Objetivo e Intensidade."}]},{id:8,emoji:"â°",question:"Antes de montar meu cronograma de estudos é fundamental montar minha rotina diária, de forma a encontrar os horários disponÃveis para estudo.",options:[{letter:"a",emoji:"â
",text:"Verdadeiro",correct:!0},{letter:"b",emoji:"â",text:"Falso"}]},{id:9,emoji:"ð",question:"O estudo dos tópicos de cada matéria pode ser feito conforme a sequ
148ência do próprio edital. A ordem dos tópicos de estudo dos tópicos em nada interfere no aprendizado.",options:[{letter:"a",emoji:"â
",text:"Verdadeiro"},{letter:"b",emoji:"â",text:"Falso",correct:!0}]},{id:10,emoji:"ðª",question:"Quando abrem as vagas para a Mentoria Caminho da Aprovação?",options:[{letter:"a",emoji:"ð
",text:"Segunda-feira (06/07)"},{letter:"b",emoji:"ð
",text:"Terça-feira (07/07)"},{letter:"c",emoji:"ð¥",text:"Quarta-feira (08/07)",correct:!0},{letter:"d",emoji:"ð
",text:"Sábado (11/07)"}]}]}},pl="aula-1";Dn["aula-1"].questions;Dn["aula-1"].webhookUrl;Dn["aula-1"].accessCode;Dn["aula-1"].whatsappNumber;function SP(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(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(t,e||[])).next())})}const kP=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Hf extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class EP extends Hf{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class lg extends Hf{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class ug extends Hf{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var ih;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(ih||(ih={}));class CP{constructor(e,{headers:r={},customFetch:n,region:s=ih.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=kP(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return SP(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 b=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,b.searchParams.set("forceFunctionRegion",h));let p;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",p=u):typeof u=="string"?(f["Content-Type"]="text/plain",p=u):typeof FormData<"u"&&u instanceof FormData?p=u:(f["Content-Type"]="application/json",p=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?p=JSON.stringify(u):p=u;let w=c;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),c?(w=o.signal,c.addEventListener("abort",()=>o.abort())):w=o.signal);const g=yield this.fetch(b.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:p,signal:w}).catch(S=>{throw new EP(S)}),m=g.headers.get("x-relay-error");if(m&&m==="true")throw new lg(g);if(!g.ok)throw new ug(g);let v=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return v==="application/json"?x=yield g.json():v==="application/octet-stream"||v==="application/pdf"?x=yield g.blob():v==="text/event-stream"?x=g:v==="multipart/form-data"?x=yield g.formData():x=yield g.text(),{data:x,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof ug||a instanceof lg?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const db=3,cg=t=>Math.min(1e3*2**t,3e4),TP=[520,503],hb=["GET","HEAD","OPTIONS"];var RP=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
148de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function dg(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function PP(t,e,r,n){return!(!n||r>=db||!hb.includes(t)||!TP.includes(e))}var AP=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const u=new Headers(r.headers);o>0&&u.set("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 instanceof Error&&(d.name==="AbortError"||"code"in d&&d.code==="ABORT_ERR")||!hb.includes(r.method))throw d;if(r.retryEnabled&&o<db){const f=cg(o);o++,await dg(f,r.signal);continue}throw d}if(PP(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:cg(o);await c.text(),o++,await dg(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,b,p;const m=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",v=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(b=o==null?void 0:o.name)!==null&&b!==void 0?b:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 149 150Caused by: ${(p=d==null?void 0:d.name)!==null&&p!==void 0?p:"Error"}: ${m}`,v&&(l+=` (${v})`),d!=null&&d.stack&&(l+=` 151${d.stack}`)}else{var w;l=(w=o==null?void 0:o.stack)!==null&&w!==void 0?w:""}const g=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)",g>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${g} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(u+=`. Your request URL is ${g} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}}
151)),i.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var u;const f=await t.text();f===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((u=e.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=f:n=JSON.parse(f))}const c=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");c&&d&&d.length>1&&(s=parseInt(d[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const c=await t.text();try{r=JSON.parse(c),Array.isArray(r)&&t.status===404&&(n=[],r=null,i=200,o="OK")}catch{t.status===404&&c===""?(i=204,o="No Content"):r={message:c}}if(r&&e.shouldThrowOnError)throw new RP(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},OP=class extends AP{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const hg=new RegExp("[,()]");var Fs=class extends OP{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&hg.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&hg.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>
151r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},NP=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(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 Fs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),r||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1510){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new Fs({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const u=t.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 Fs({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Fs({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new Fs({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Yo(t){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yo(t)}function jP(t,e){if(Yo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Yo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function IP(t){var e=jP(t,"string");return Yo(e)=="symbol"?e:e+""}function LP(t,e,r){return(e=IP(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function za(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fg(Object(r),!0).forEach(function(n){LP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var $P=class fb{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(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 b=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",b,{once:!0}),l(u,za(za({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",b)})}return l(u,za(za({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new NP(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new fb(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let 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,b])=>b!==void 0).map(([h,b])=>[h,Array.isArray(b)?`{${b.join(",")}}`:`${b}
151`]).forEach(([h,b])=>{l.searchParams.append(h,b)})):(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 Fs({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 DP{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 152import ws from "ws" 153new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 154 155Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const MP="2.105.3",UP=`realtime-js/${MP}`,FP="1.0.0",pb="2.0.0",zP=pb,BP=1e4,VP=100,on={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},mb={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},oh={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class HP{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,r,n){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",u=e.payload.event,c=this.allowedMetadataKeys?this._pick(e.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);
155let b=new DataView(h),p=0;b.setUint8(p++,this.KINDS.userBroadcastPush),b.setUint8(p++,l.length),b.setUint8(p++,a.length),b.setUint8(p++,o.length),b.setUint8(p++,u.length),b.setUint8(p++,d.length),b.setUint8(p++,r),Array.from(l,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(a,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(o,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(u,g=>b.setUint8(p++,g.charCodeAt(0))),Array.from(d,g=>b.setUint8(p++,g.charCodeAt(0)));var w=new Uint8Array(h.byteLength+n.byteLength);return w.set(new Uint8Array(h),0),w.set(new Uint8Array(n),h.byteLength),w.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodeUserBroadcast(e,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(e.slice(l,l+s));l=l+s;const c=n.decode(e.slice(l,l+i));l=l+i;const d=n.decode(e.slice(l,l+o));l=l+o;const f=e.slice(l,e.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,b={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(b.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:b}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}var be;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(be||(be={}));const pg=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=WP(o,t,e,s),i),{}):{}},WP=(t,e,r,n)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=r[t];return i&&!n.includes(i)?gb(i,o):ah(o)},gb=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return QP(e,r)}switch(t){case be.bool:return qP(e);case be.float4:case be.float8:case be.int2:case be.int4:case be.int8:case be.numeric:case be.oid:return KP(e);case be.json:case be.jsonb:return GP(e);case be.timestamp:return JP(e);case be.abstime:case be.date:case be.daterange:case be.int4range:case be.int8range:case be.money:case be.reltime:case be.text:case be.time:case be.timestamptz:case be.timetz:case be.tsrange:case be.tstzrange:return ah(e);default:return ah(e)}},ah=t=>t,qP=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},KP=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},GP=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},QP=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const o=t.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>gb(e,a))}return t},JP=t=>typeof t=="string"?t.replace(" ","T"):t,vb=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var xo=t=>typeof t=="function"?t:function(){return t},ZP=typeof self<"u"?self:null,zs=typeof window<"u"?window:null,hr=ZP||zs||globalThis,YP="2.0.0",XP=1e4,eA=1e3,gr={connecting:0,open:1,closing:2,closed:3},ft={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Pr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},lh={longpoll:"longpoll",websocket:"websocket"},tA={complete:4},uh="base64url.bearer.phx.",Ba=class{constructor(t,e,r,n){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 20,925 bytes, lines 155-156
155oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},yb=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},rA=class{constructor(t,e,r){this.state=ft.closed,this.topic=t,this.params=xo(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ba(this,Pr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new yb(()=>{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=ft.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=ft.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=ft.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=ft.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 Ba(this,Pr.leave,xo({}),this.timeout).send(),this.state=ft.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Pr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ft.closed,this.bindings=[]}onClose(t){this.on(Pr.close,t)}onError(t){return this.on(Pr.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Ba(this,t,function(){return e},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ft.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Pr.close,"leave")},r=new Ba(this,Pr.leave,xo({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ft.joining,this.joinPush.resend(t))}trigger(t,e,r,n){let s=this.onMessage(t,e,r,n);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===ft.closed}isErrored(){return this.state===ft.errored}isJoined(){return this.state===ft.joined}isJoining(){return this.state===ft.joining}isLeaving(){return this.state===ft.leaving}},tu=class{static request(t,e,r,n,s,i,o){if(hr.XDomainRequest){let a=new hr.XDomainRequest;return this.xdomainRequest(a,t,e,n,s,i,o)}else if(hr.XMLHttpRequest){let a=new hr.XMLHttpRequest;return this.xhrRequest(a,t,e,r,n,s,i,o)}else{if(hr.fetch&&hr.AbortController)return this.fetchRequest(t,e,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,s,i,o){let a={method:t,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),hr.fetch(e,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(t,e,r,n,s,i,o){return t.timeout=s,t.open(e,r),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,s,i,o,a){t.open(e,r,!0),t.timeout=i;for(let[l,u]of Object.entries(n))t.setRequestHeader(l,u);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===tA.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=e?`${e}[${n}]`:n,i=t[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},nA=t=>{let e="",r=new Uint8Array(t),n=r.byteLength;for(let s=0;s<n;s++)e+=String.fromCharCode(r[s]);return btoa(e)},As=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(uh)&&(this.authToken=atob(e[1].slice(uh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=gr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+lh.websocket),"$1/"+lh.longpoll)}endpointURL(){return tu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,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 t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:n,messages:s}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=gr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(t){typeof t!="string"&&(t=nA(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 156`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let s of this.reqs)s.abort();this.readyState=gr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=tu.request(t,this.endpointURL(),e,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},sA=class lo{constructor(e,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=lo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=lo.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=lo.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return lo.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,s){let i=this.clone(e),o={},a={};return this.map(i,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let c=i[l];if(c){let d=u.metas.map(p=>p.phx_ref),f=c.metas.map(p=>p.phx_ref),h=u.metas.filter(p=>f.indexOf(p.phx_ref)<0),b=c.metas.filter(p=>d.indexOf(p.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),b.length>0&&(a[l]=this.clone(c),a[l].metas=b)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(e,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=e[a];if(e[a]=this.clone(l),u){let c=e[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);e[a].metas.unshift(...d)}n(a,u,l)}),this.map(o,(a,l)=>{let u=e[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 e[a]}),e}static list(e,r){return r||(r=function(n,s){return s}),this.map(e,(n,s)=>r(n,s))}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Va={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,n,s,i,o]=JSON.parse(t);return e({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:s,payload:i}=t,o=this.META_LENGTH+e.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,e.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(e,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(t){let e=new DataView(t),r=e.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(t.slice(o,o+n));o=o+n;let l=r.decode(t.slice(o,o+s));o=o+s;let u=r.decode(t.slice(o,o+i));o=o+i;let c=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(t.slice(a,a+n));a=a+n;let u=r.decode(t.slice(a,a+s));a=a+s;let c=r.decode(t.slice(a,a+i));a=a+i;let d=r.decode(t.slice(a,a+o));a=a+o;let f=t.slice(a,t.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:Pr.reply,payload:h}},decodeBroadcast(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(t.slice(i,i+n));i=i+n;let a=r.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},iA=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||XP,this.transport=e.transport||hr.WebSocket||As,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||hr&&hr.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Va.encode.bind(Va),this.defaultDecoder=Va.decode.bind(Va),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==As?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;zs&&zs.addEventListener&&(zs.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),zs.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),zs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(n,s,i)=>{console.log(`${n}: ${s}`,i)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=xo(e.params||{}),this.endPoint=`${t}/${lh.websocket}`,this.vsn=e.vsn||YP,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new yb(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return As}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=tu.appendParams(tu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=xo(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==As?this.connectWithFallback(As,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(s=>{s.ref===e&&(this.off([n]),t(Date.now()-r))});return!0}transportName(t){switch(t){case As:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${uh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),eA,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,935 bytes, line 156
156,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===gr.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Pr.error,t)})}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(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new rA(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:n,ref:s,join_ref:i}=t;this.log("push",`${e} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,n])=>{try{n(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class So{constructor(e,r){const n=aA(r);this.presence=new sA(e.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=So.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=So.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return So.transformState(this.presence.state)}static transformState(e){return e=oA(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return r[n]=ml(s),r},{})}static onJoinPayload(e,r,n){const s=mg(r),i=ml(n);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,r,n){const s=mg(r),i=ml(n);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function ml(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function oA(t){return JSON.parse(JSON.stringify(t))}function aA(t){return(t==null?void 0:t.events)&&{events:t.events}}function mg(t){return t!=null&&t.metas?ml(t):[]}var gg;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(gg||(gg={}));class lA{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new So(this.channel.channelAdapter,r)}}function uA(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
156if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class cA{constructor(e,r,n){const s=dA(n);this.channel=e.getSocket().channel(r,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,n){let s;try{s=this.channel.push(e,r,n)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>VP){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===on.joined}isJoined(){return this.state===on.joined}isJoining(){return this.state===on.joining}isClosed(){return this.state===on.closed}isLeaving(){return this.state===on.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function dA(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var vg;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(vg||(vg={}));var ri;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(ri||(ri={}));var Ar;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Ar||(Ar={}));class ko{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,r={config:{}},n){var s,i;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new cA(this.socket.socketAdapter,e,this.params),this.presence=new lA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=vb(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,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[ri.PRESENCE]&&this.bindings[ri.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=>{e==null||e(Ar.CHANNEL_ERROR,uA(h))}),this._onClose(()=>e==null?void 0:e(Ar.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){e==null||e(Ar.SUBSCRIBED);return}this._updatePostgresBindings(h,e)}).receive("error",h=>{this.state=on.errored;const b=Object.values(h).join(", ")||"error";e==null||e(Ar.CHANNEL_ERROR,new Error(b,{cause:h}))}).receive("timeout",()=>{e==null||e(Ar.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=e&&e[a];if(h&&h.event===u&&ko.isFilterValueEqual(h.schema,c)&&ko.isFilterValueEqual(h.table,d)&&ko.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=on.errored,r==null||r(Ar.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=on.errored&&r&&r(Ar.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===ri.PRESENCE||e===ri.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,n)}async httpSend(e,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
156try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(e,r={}){var n,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const 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(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(e,r,n){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,n)=>{var s,i,o,a,l,u,c;const d=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===e.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,b=(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))&&(b==="*"||(b==null?void 0:b.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(e,r){const{close:n,error:s,leave:i,join:o}=mb;return r&&[n,s,i,o].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors: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(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const n of e.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=pg(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=pg(e.columns,e.old_record)),r}}class hA{constructor(e,r){this.socket=new iA(e,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},r,n)})}push(e){this.socket.push(e)}log(e,r,n){this.socket.log(e,r,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==oh.connecting}isDisconnecting(){return this.socket.connectionState()==oh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const yg={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},fA=[1e3,2e3,5e3,1e4],pA=1e4,mA=` 157 addEventListener("message", (e) => { 158 if (e.data.event === "start") { 159 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 160 } 161 });`;class gA{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
161,this.ref=0,this.serializer=new HP,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 hA(e,s),this.httpEndpoint=vb(e),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r} 162 163To use Realtime in Node.js, you need to provide a WebSocket implementation: 164 165Option 1: Use Node.js 22+ which has native WebSocket support 166Option 2: Install and provide the "ws" package: 167 168 npm install ws 169 170 import ws from "ws" 171 const client = new RealtimeClient(url, { 172 ...options, 173 transport: ws 174 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||oh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new ko(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
174this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,n=!1;if(e)r=e,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:UP};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(mb.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,n)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([mA],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,s,i,o,a,l,u,c,d,f;this.worker=(r=e==null?void 0:e.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=e==null?void 0:e.accessToken)!==null&&n!==void 0?n:null;const h={};h.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:BP,h.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:yg.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:yg.HEARTBEAT_INTERVAL),h.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:DP.getWebSocketConstructor(),h.params=e==null?void 0:e.params,h.logger=e==null?void 0:e.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),h.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:g=>fA[g-1]||pA;let b,p;const w=(c=e==null?void 0:e.vsn)!==null&&c!==void 0?c:zP;switch(w){case FP:b=(g,m)=>m(JSON.stringify(g)),p=(g,m)=>m(JSON.parse(g));break;case pb:b=this.serializer.encode.bind(this.serializer),p=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=w,h.encode=(d=e==null?void 0:e.encode)!==null&&d!==void 0?d:b,h.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:p,h.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,h.params=Object.assign(Object.assign({},h.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
174var Xo=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function vA(t,e,r){const n=new URL(e,t);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function yA(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function wA(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=vA(t.baseUrl,n,s),l=await yA(t.auth),u=await e(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,b=h==null?void 0:h.error;throw new Xo((b==null?void 0:b.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Ha(t){return t.join("�")}var bA=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Ha(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ha(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ha(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ha(t.namespace)}`}),!0}catch(e){if(e instanceof Xo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof Xo&&r.status===409)return;throw r}}};function Os(t){return t.join("�")}var _A=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Os(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof Xo&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof Xo&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},xA=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=wA({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new bA(this.client,e),this.tableOps=new _A(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
174async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function ea(t){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ea(t)}function SA(t,e){if(ea(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ea(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kA(t){var e=SA(t,"string");return ea(e)=="symbol"?e:e+""}function EA(t,e,r){return(e=kA(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wg(Object(r),!0).forEach(function(n){EA(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Du=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Mu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var ch=class extends Du{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return Q({},super.toJSON())}},wb=class extends Du{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function ru(t,e,r){const n=Q({},t),s=e.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function CA(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const TA=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),RA=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},dh=t=>{if(Array.isArray(t))return t.map(r=>dh(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=dh(n)}),e},PA=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),bg=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},AA=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new ch(bg(o),i,a,n))}).catch(()=>{const o=i+"";e(new ch(s.statusText||`HTTP ${i} error`,i,o,n))})}else e(new wb(bg(t),t,n))},OA=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return Q(Q({},s),r);if(RA(n)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=ru(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return e!=null&&e.duplex&&(s.duplex=e.duplex),Q(Q({},s),r)};async function ro(t,e,r,n,s,i,o){return new Promise((a,l)=>{t(r,OA(e,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=>AA(u,l,n,o))})}function bb(t="storage"){return{get:async(e,r,n,s)=>ro(e,"GET",r,n,s,void 0,t),post:async(e,r,n,s,i)=>ro(e,"POST",r,s,i,n,t),put:async(e,r,n,s,i)=>ro(e,"PUT",r,s,i,n,t),head:async(e,r,n,s)=>ro(e,"HEAD",r,Q(Q({},n),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,r,n,s,i)=>ro(e,"DELETE",r,s,i,n,t)}}const NA=bb("storage"),{get:ta,post:Jt,put:hh,head:jA,remove:Wf}=NA,xt=bb("vectors");var Bi=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=CA(e),this.fetch=TA(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=ru(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(Mu(r))return{data:null,error:r};throw r}}},IA=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Mu(e))return{data:null,error:e};throw e}}};let _b;_b=Symbol.toStringTag;var LA=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[_b]="BlobDownloadBuilder",this.promise=null}asStream(){return new IA(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Mu(e))return{data:null,error:e};throw e}}};const $A={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},_g={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var DA=class extends Bi{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=Q(Q({},_g),n);let a=Q(Q({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[f,h]of Object.entries(n.headers))a=ru(a,f,h);const u=s._removeEmptyFolders(e),c=s._getFinalPath(u),d=await(t=="PUT"?hh:Jt)(s.fetch,`${s.url}/object/${c}`,i,Q({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}
174async uploadToSignedUrl(t,e,r,n){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const u=Q(Q({},_g),n);let c=Q(Q({},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=ru(c,f,h);return{path:i,fullPath:(await hh(s.fetch,a.toString(),l,Q({headers:c},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const s=Q({},r.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Jt(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 Du("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await Jt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await Jt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(t);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Jt(n.fetch,`${n.url}/object/sign/${s}`,Q({expiresIn:e},i?{transform:r.transform}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const s=await Jt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return s.map(a=>Q(Q({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>ta(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new LA(a,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>dh(await ta(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await jA(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(Mu(s)){var n;const i=s instanceof ch?s.status:s instanceof wb?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=new URLSearchParams;e!=null&&e.download&&n.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(n,e.transform),(e==null?void 0:e.cacheNonce)!=null&&n.set("cacheNonce",String(e.cacheNonce));const s=n.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Wf(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const s=Q(Q(Q({},$A),e),{},{prefix:t||""});return await Jt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=Q({},t);return await Jt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
174ity",e.quality.toString()),t}};const MA="2.105.3",ga={"X-Client-Info":`storage-js/${MA}`};var UA=class extends Bi{constructor(t,e={},r,n){const s=new URL(t);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=Q(Q({},ga),e);super(i,o,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await ta(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await ta(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await Jt(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await hh(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Jt(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Wf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},FA=class extends Bi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},ga),e);super(n,s,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Jt(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),s=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await ta(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Wf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!PA(t))throw new Du("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 xA({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},zA=class extends Bi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},ga),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await xt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await xt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},BA=class extends Bi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},ga),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
174if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},VA=class extends Bi{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},ga),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await xt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},HA=class extends VA{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new WA(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},WA=class extends zA{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new qA(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},qA=class extends BA{constructor(t,e,r,n,s){super(t,e,s),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},KA=class extends UA{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new DA(this.url,this.headers,t,this.fetch)}get vectors(){return new HA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new FA(this.url+"/iceberg",this.headers,this.fetch)}};function Uu(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}const xb="2.105.3",Bs=30*1e3,fh=3,Ac=fh*Bs,GA="http://localhost:9999",QA="supabase.auth.token",JA={"X-Client-Info":`gotrue-js/${xb}`},ph="X-Supabase-Api-Version",Sb={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},ZA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,YA=10*60*1e3;
174class ra extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function $(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class XA extends ra{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function eO(t){return $(t)&&t.name==="AuthApiError"}class tr extends ra{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Hr extends ra{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class We extends Hr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Wa(t){return $(t)&&t.name==="AuthSessionMissingError"}class Ns extends Hr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class qa extends Hr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Ka extends Hr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function tO(t){return $(t)&&t.name==="AuthImplicitGrantRedirectError"}class xg extends Hr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class rO extends Hr{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 mh extends Hr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Oc(t){return $(t)&&t.name==="AuthRetryableFetchError"}class Sg extends Hr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class gh extends Hr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const nu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),kg=` 175\r=`.split(""),nO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<kg.length;e+=1)t[kg[e].charCodeAt(0)]=-2;for(let e=0;e<nu.length;e+=1)t[nu[e].charCodeAt(0)]=e;return t})();function Eg(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(nu[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(nu[n]),e.queuedBits-=6}}function kb(t,e,r){const n=nO[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Cg(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{oO(o,n,r)};for(let o=0;o<t.length;o+=1)kb(t.charCodeAt(o),s,i);return e.join("")}function sO(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function iO(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}sO(n,e)}}function oO(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function di(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;
175s+=1)kb(t.charCodeAt(s),r,n);return new Uint8Array(e)}function aO(t){const e=[];return iO(t,r=>e.push(r)),new Uint8Array(e)}function ns(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>Eg(s,r,n)),Eg(null,r,n),e.join("")}function lO(t){return Math.round(Date.now()/1e3)+t}function uO(){return Symbol("auth-callback")}const Qe=()=>typeof window<"u"&&typeof document<"u",Gn={tested:!1,writable:!1},Eb=()=>{if(!Qe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Gn.tested)return Gn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Gn.tested=!0,Gn.writable=!0}catch{Gn.tested=!0,Gn.writable=!1}return Gn.writable};function cO(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const Cb=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),dO=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Vs=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Qn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ge=async(t,e)=>{await t.removeItem(e)};class Fu{constructor(){this.promise=new Fu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Fu.promiseConstructor=Promise;function Ga(t){const e=t.split(".");if(e.length!==3)throw new gh("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!ZA.test(e[n]))throw new gh("JWT not in base64url format");return{header:JSON.parse(Cg(e[0])),payload:JSON.parse(Cg(e[1])),signature:di(e[2]),raw:{header:e[0],payload:e[1]}}}async function hO(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function fO(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){n(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function pO(t){return("0"+t.toString(16)).substr(-2)}function mO(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,pO).join("")}async function gO(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function vO(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await gO(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function js(t,e,r=!1){const n=mO();let s=n;r&&(s+="/recovery"),await Vs(t,`${e}-code-verifier`,s);const i=await vO(n);return[i,n===i?"plain":"s256"]}const yO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function wO(t){const e=t.headers.get(ph);if(!e||!e.match(yO))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function bO(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function _O(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const xO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Er(t){if(!xO.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function qt(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Nc(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function SO(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
175if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,s)}})}function Tg(t){return JSON.parse(JSON.stringify(t))}const Yn=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},kO=[502,503,504,520,521,522,523,524,530];async function Rg(t){var e;if(!dO(t))throw new mh(Yn(t),0);if(kO.includes(t.status))throw new mh(Yn(t),t.status);let r;try{r=await t.json()}catch(i){throw new tr(Yn(i),i)}let n;const s=wO(t);if(s&&s.getTime()>=Sb["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 Sg(Yn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new We}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 Sg(Yn(r),t.status,r.weak_password.reasons);throw new XA(Yn(r),t.status||500,n)}const EO=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function B(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[ph]||(i[ph]=Sb["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 CO(t,e,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function CO(t,e,r,n,s,i){const o=EO(e,n,s,i);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new mh(Yn(l),0)}if(a.ok||await Rg(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Rg(l)}}function Nt(t){var e;let r=null;PO(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=lO(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function Pg(t){const e=Nt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function an(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function TO(t){return{data:t,error:null}}function RO(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,o=Uu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function Ag(t){return t}function PO(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const jc=["global","local","others"];class AO{constructor({url:e="",headers:r={},fetch:n,experimental:s}){this.url=e,this.headers=r,this.fetch=Cb(n),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,r=jc[0]){if(jc.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${jc.join(", ")}`);try{return await B(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await B(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:an})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=Uu(e,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await B(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:RO,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if($(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await B(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:an})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await B(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Ag});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>
1750&&(h.forEach(b=>{const p=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if($(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Er(e);try{return await B(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:an})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Er(e);try{return await B(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:an})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Er(e);try{return await B(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:an})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Er(e.userId);try{const{data:r,error:n}=await B(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Er(e.userId),Er(e.id);try{return{data:await B(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await B(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Ag});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(b=>{const p=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if($(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await B(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await B(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await B(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await B(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await B(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await B(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if($(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await B(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await B(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await B(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{return await B(this.fetch,"DELET
175E",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){qt(this.experimental),Er(e.userId);try{return await B(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){qt(this.experimental),Er(e.userId),Er(e.passkeyId);try{return await B(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}}function Og(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const cr={debug:!!(globalThis&&Eb()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Tb extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Ng extends Tb{}async function OO(t,e,r){cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;let s;e>0&&(s=setTimeout(()=>{n.abort(),cr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){clearTimeout(s),cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Ng(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(cr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await r()}})}catch(i){if(e>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&e>0){if(n.signal.aborted)return cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async o=>{if(o){cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,o.name);try{return await r()}finally{cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new Ng(`Lock "${t}" was released because another request stole it`)}throw i}}function NO(){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 Rb(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function jO(t){return parseInt(t,16)}function IO(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function LO(t){var e;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}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 176`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=Rb(t.address),b=c?`${c}://${n}`:n,p=t.statement?`${t.statement} 177`:"",w=`${b} wants you to sign in with your Ethereum account: 178${h} 179 180${p}`;let g=`URI: ${d} 181Version: ${f} 182Chain ID: ${r}${o?` 183Nonce: ${o}`:""} 184Issued At: ${i.toISOString()}`;if(s&&(g+=` 185Expiration Time: ${s.toISOString()}`),a&&(g+=` 186Not Before: ${a.toISOString()}`),l&&(g+=` 187Request ID: ${l}`),u){let m=` 188Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);m+=` 189- ${v}`}g+=m}return`${w} 190${g}`}
190class Fe extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class su extends Fe{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function $O({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Fe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Fe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Fe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Fe({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Fe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Fe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Fe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Fe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Pb(o)){if(i.rp.id!==o)return new Fe({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Fe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Fe({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Fe({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Fe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function DO({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Fe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Fe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Pb(n)){if(r.rpId!==n)return new Fe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Fe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Fe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Fe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class MO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const vh=new MO;function jg(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=Uu(t,["challenge","user","excludeCredentials"]),i=di(e).buffer,o=Object.assign(Object.assign({},r),{id:di(r.id).buffer}),a=Object.assign(Object.assign({}
190,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:di(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Ig(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=Uu(t,["challenge","allowCredentials"]),s=di(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:di(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Lg(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:ns(new Uint8Array(t.response.attestationObject)),clientDataJSON:ns(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function $g(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:ns(new Uint8Array(s.authenticatorData)),clientDataJSON:ns(new Uint8Array(s.clientDataJSON)),signature:ns(new Uint8Array(s.signature)),userHandle:s.userHandle?ns(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Pb(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function iu(){var t,e;return!!(Qe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Ab(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new su("Browser returned unexpected credential type",e)}:{data:null,error:new su("Empty credential response",e)}}catch(e){return{data:null,error:$O({error:e,options:t})}}}async function Ob(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new su("Browser returned unexpected credential type",e)}:{data:null,error:new su("Empty credential response",e)}}catch(e){return{data:null,error:DO({error:e,options:t})}}}const UO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},FO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function ou(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(e(o)){const a=n[i];e(a)?n[i]=ou(a,o):n[i]=ou(o)}else n[i]=o}return n}function zO(t,e){return ou(UO,t,e||{})}function BO(t,e){return ou(FO,t,e||{})}class VO{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!a)return{data:null,error:l};const u=s??vh.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,b=((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}:${b}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=zO(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await Ab({publicKey:c,signal:u});return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=BO(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await Ob(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return $(a)?{data:null,error:a}:{data:null,error:new tr("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new ra("rpId is required for WebAuthn authentication")};try{if(!iu())return{data:null,error:new tr("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new tr("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new ra("rpId is required for WebAuthn registration")};try{if(!iu())return{data:null,error:new tr("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&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 $(o)?{data:null,error:o}:{data:null,error:new tr("Unexpected error in register",o)}}}}NO();const HO={url:GA,storageKey:QA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:JA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Dg(t,e,r){return await r()}const Is={};class na{get jwks(){var e,r;return(r=(e=Is[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Is[this.storageKey]=Object.assign(Object.assign({},Is[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Is[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Is[this.storageKey]=Object.assign(Object.assign({},Is[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},HO),e);if(this.storageKey=o.storageKey,this.instanceID=(r=na.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,na.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Qe()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(n=o.experimental)!==null&&n!==void 0?n:{},this.admin=new AO({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=Cb(o.fetch),this.lock=o.lock||Dg,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&Qe()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=OO:this.lock=Dg,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 VO(this)}
190,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?(o.storage?this.storage=o.storage:Eb()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Og(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Og(this.memoryStorage)),Qe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${xb}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(Qe()&&(r=cO(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),tO(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return $(r)?this._returnResult({error:r}):this._returnResult({error:new tr("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Nt}),{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($(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:c,password:d,options:f}=e;let h=null,b=null;this.flowType==="pkce"&&([h,b]=await js(this.storage,this.storageKey)),i=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email: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:b},xform:Nt})}else if("phone"in e){const{phone:c,password:d,options:f}=e;i=await B(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:Nt})}else throw new qa("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ge(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 Ge(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:o,options:a}=e;r=await B(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Pg})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await B(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Pg})}else throw new qa("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Ns;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,o,a,l,u,c,d,f;let h,b;if("message"in e)h=e.message,b=e.signature;else{const{chain:p,wallet:w,statement:g,options:m}=e;let v;if(Qe())if(typeof w=="object")v=w;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")v=A.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 w!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const x=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),S=await v.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=Rb(S[0]);let E=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const A=await v.request({method:"eth_chainId"});E=jO(A)}const T={domain:x.host,address:k,statement:g,uri:x.href,version:"1",chainId:E,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=LO(T),b=await v.request({method:"personal_sign",params:[IO(h),k]})}try{const{data:p,error:w}=await B(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:b},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Nt});if(w)throw w;if(!p||!p.session||!p.user){const g=new Ns;return this._returnResult({data:{user:null,session:null},error:g})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:w})}catch(p){if($(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(e){var r,n,s,i,o,a,l,u,c,d,f,h;let b,p;if("message"in e)b=e.message,p=e.signature;else{const{chain:w,wallet:g,statement:m,options:v}=e;let x;if(Qe())if(typeof g=="object")x=g;
190else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))x=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=g}const S=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in x&&x.signIn){const k=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),m?{statement:m}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)b=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),p=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");b=[`${S.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=v==null?void 0:v.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((d=(c=v==null?void 0:v.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...v.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 191`);const k=await x.signMessage(new TextEncoder().encode(b),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=k}}try{const{data:w,error:g}=await B(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:ns(p)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Nt});if(g)throw g;if(!w||!w.session||!w.user){const m=new Ns;return this._returnResult({data:{user:null,session:null},error:m})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:g})}catch(w){if($(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const r=await Qn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new rO;const{data:i,error:o}=await B(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Nt});if(await Ge(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Ns;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 Ge(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await B(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Nt}),{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 Ns;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($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await js(this.storage,this.storageKey));const{error:d}=await B(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge: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 e){const{phone:a,options:l}=e,{data:u,error:c}=await B(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new qa("You must provide either an email or phone number.")}catch(a){if(await Ge(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await B(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Nt});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(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if($(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await js(this.storage,this.storageKey));const u=await B(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:TO});return!((i=u.data)===null||i===void 0)&&i.url&&Qe()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Ge(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new We;
191const{error:s}=await B(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if($(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await B(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await B(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new qa("You must provide either an email or phone number and a type")}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Qn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Ac:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await Qn(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Nc()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=SO(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await B(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:an}):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 We}:await B(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:an})})}catch(r){if($(r))return Wa(r)&&(await this._removeSession(),await Ge(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new We;
191const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await js(this.storage,this.storageKey));const{data:u,error:c}=await B(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:an});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 Ge(this.storage,`${this.storageKey}-code-verifier`),$(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new We;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Ga(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if($(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new We;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Qe())throw new Ka("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Ka(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new xg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ka("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new xg("No code detected.");const{data:v,error:x}=await this._exchangeCodeForSession(e.code);if(x)throw x;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.session,redirectType:(n=v.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}=e;if(!o||!l||!a||!c)throw new Ka("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;u&&(h=parseInt(u));const b=h-d;b*1e3<=Bs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${b}s, should have been closer to ${f}s`);const p=h-f;d-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,h,d):d-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,h,d);const{data:w,error:g}=await this._getUser(o);if(g)throw g;const m={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:c,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:e.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Qn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Wa(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);
191if(a&&!(eO(a)&&(a.status===404||a.status===401||a.status===403)||Wa(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await Ge(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=uO(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),Wa(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await js(this.storage,this.storageKey,!0));try{return await B(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Ge(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await B(this.fetch,"GET",h,{headers:this.headers,jwt:(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=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if($(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=e,d=await B(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Nt}),{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 Ns}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ge(this.storage,`${this.storageKey}-code-verifier`),$(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;return await B(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await fO(async s=>(s>
1910&&await hO(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await B(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Nt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Oc(i)&&Date.now()+o-n<Bs})}catch(n){if(this._debug(r,"error",n),$(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Qe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Qn(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Qn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Vs(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Nc()}else if(s&&!s.user&&!s.user){const o=await Qn(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ge(this.storage,this.storageKey+"-user"),await Vs(this.storage,this.storageKey,s)):s.user=Nc()}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()<Ac;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Ac}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Oc(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new We;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Fu;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new We;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),$(i)){const o={data:null,error:i};return Oc(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ge(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Vs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Tg(s);await Vs(this.storage,this.storageKey,i)}else{const s=Tg(r);await Vs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ge(this.storage,this.storageKey),await Ge(this.storage,this.storageKey+"-code-verifier"),await Ge(this.storage,this.storageKey+"-user"),this.userStorage&&await Ge(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
191catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Bs);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Bs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Bs}ms, refresh threshold is ${fh} ticks`),s<=fh&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof Tb)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Qe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await js(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await B(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:u}=await B(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Lg(e.webauthn.credential_response):$g(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await B(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await B(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:jg(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Ig(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:h}=Ga(e);let b=null;h.aal&&(b=h.aal);let p=b;const{data:{user:w},error:g}=await this.getUser(e);if(g)return this._returnResult({data:null,error:g});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(x=>x.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(p="aal2");const v=h.amr||[];return{data:{currentLevel:b,nextLevel:p,currentAuthenticationMethods:v},error:null}}catch(h){if($(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
191=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}=Ga(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(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await B(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new We})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new We});const o=await B(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new We});const o=await B(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await B(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new We})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await B(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new We})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+YA>s)return n;const{data:i,error:o}=await B(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:h,error:b}
191=await this.getSession();if(b||!h.session)return this._returnResult({data:null,error:b});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Ga(n);r!=null&&r.allowExpired||bO(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,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=_O(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,aO(`${a}.${l}`)))throw new gh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,s;qt(this.experimental);try{if(!iu())return this._returnResult({data:null,error:new tr("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Ig(i.options),l=(s=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:vh.createNewAbortSignal(),{data:u,error:c}=await Ob({publicKey:a,signal:l});if(c||!u)return this._returnResult({data:null,error:c??new tr("WebAuthn ceremony failed",null)});const d=$g(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if($(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var r,n;qt(this.experimental);try{if(!iu())return this._returnResult({data:null,error:new tr("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=jg(s.options),a=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:vh.createNewAbortSignal(),{data:l,error:u}=await Ab({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new tr("WebAuthn ceremony failed",null)});const c=Lg(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:c})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){qt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new We});const{data:s,error:i}=await B(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){qt(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 We});const{data:i,error:o}=await B(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;qt(this.experimental);try{const{data:n,error:s}=await B(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){qt(this.experimental);try{const{data:r,error:n}=await B(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Nt});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($(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){qt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new We});const{data:s,error:i}=await B(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){qt(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 We});const{data:i,error:o}=await B(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){qt(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 We});const{error:i}
191=await B(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}}na.nextInstanceID={};const WO=na,qO="2.105.3";let uo="";typeof Deno<"u"?uo="deno":typeof document<"u"?uo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?uo="react-native":uo="node";const KO={"X-Client-Info":`supabase-js-${uo}/${qO}`},GO={headers:KO},QO={schema:"public"},JO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ZO={};function sa(t){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sa(t)}function YO(t,e){if(sa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XO(t){var e=YO(t,"string");return sa(e)=="symbol"?e:e+""}function eN(t,e,r){return(e=XO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mg(Object(r),!0).forEach(function(n){eN(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const tN=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),rN=()=>Headers,nN=(t,e,r)=>{const n=tN(r),s=rN();return async(i,o)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(i,Le(Le({},o),{},{headers:u}))}};function sN(t){return t.endsWith("/")?t:t+"/"}function iN(t,e){var r,n;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:u,realtime:c,global:d}=e,f={db:Le(Le({},l),s),auth:Le(Le({},u),i),realtime:Le(Le({},c),o),storage:{},global:Le(Le(Le({},d),a),{},{headers:Le(Le({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}function oN(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(sN(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var aN=class extends WO{constructor(t){super(t)}},lN=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=oN(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:QO,realtime:ZO,auth:Le(Le({},JO),{},{storageKey:o}),global:GO},l=iN(r??{},a);if(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=nN(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Le({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 $P(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 KA(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new CP(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,lockAcquireTimeout:d,skipAutoInitialize:f},h,b){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new aN({url:this.authUrl.href,headers:Le(Le({},p),h),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,fetch:b,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new gA(this.realtimeUrl.href,Le(Le({},t),{},{params:Le(Le({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const uN=(t,e,r)=>new lN(t,e,r);function cN(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}cN()&&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
191ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const dN="https://ketwxgiteuhrsjzanztm.supabase.co",hN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtldHd4Z2l0ZXVocnNqemFuenRtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc5MTYxMTIsImV4cCI6MjA5MzQ5MjExMn0.tzplfMBOpsaBX4vUy2uM6YlhMO6IWCkMcZ9q31HR5Cg",ln=uN(dN,hN,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Nb="/assets/logo-projeto-trts-CdteUD4y.png";iP({nome:Pc().trim().min(2,"Nome muito curto").max(100),email:Pc().trim().email("E-mail inválido").max(255),telefone:Pc().trim().min(8,"Telefone inválido").max(30)});const fN=()=>{const{slug:t}=cE(),e=typeof window<"u"&&window.location.pathname.startsWith("/aula-")?window.location.pathname.replace("/",""):void 0,r=(t||e||pl)in Dn&&(t||e)||pl,n=Dn[r],s=n.questions;n.webhookUrl,n.accessCode,n.whatsappNumber,y.useState("intro"),y.useState(""),y.useState(""),y.useState(""),y.useState(null),y.useState(0);const[i,o]=y.useState({});y.useState(null),y.useState(!1),y.useEffect(()=>{document.title=`${n.titulo} â Esquadrão de Elite`},[n.titulo]);const a=y.useMemo(()=>s.reduce((l,u)=>{var f;const c=i[u.id],d=(f=u.options.find(h=>h.correct))==null?void 0:f.letter;return l+(c===d?1:0)},0),[i]);return Math.round(a/s.length*100),_.jsx("main",{className:"min-h-screen flex items-center justify-center p-2 md:p-4",children:_.jsxs(yn,{className:"w-full max-w-lg p-6 md:p-8 bg-gradient-card shadow-card border-border/50 animate-pop-in text-center",children:[_.jsx("img",{src:Nb,alt:"Projeto TRTs",className:"mx-auto w-full max-w-[180px] md:max-w-[260px] h-auto mb-4 drop-shadow-[0_0_30px_hsl(var(--primary)/0.4)]"}),_.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-secondary mb-4",children:_.jsx(m0,{className:"w-8 h-8 text-muted-foreground"})}),_.jsx("h1",{className:"text-2xl md:text-3xl font-bold mb-2",children:_.jsx("span",{className:"text-gradient-gold",children:"Quiz encerrado"})}),_.jsx("p",{className:"text-muted-foreground text-sm md:text-base",children:"As inscrições para este quiz foram encerradas. Obrigado a todos que participaram!"})]})})},Ic=()=>_.jsx(fN,{}),pN=()=>{const t=fa();return y.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),_.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:_.jsxs("div",{className:"text-center",children:[_.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),_.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),_.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},mN=()=>{const[t,e]=y.useState("login"),[r,n]=y.useState(""),[s,i]=y.useState(""),[o,a]=y.useState(!1),l=kf();y.useEffect(()=>{document.title="Admin â Quiz TRT",ln.auth.getSession().then(({data:c})=>{c.session&&l("/admin")})},[l]);const u=async c=>{c.preventDefault(),a(!0);try{if(t==="signup"){const{error:d}=await ln.auth.signUp({email:r,password:s,options:{emailRedirectTo:window.location.origin+"/admin"}});if(d)throw d;Fd.success("Conta criada! Faça login."),e("login")}else{const{error:d}=await ln.auth.signInWithPassword({email:r,password:s});if(d)throw d;l("/admin")}}catch(d){Fd.error(d.message||"Erro")}finally{a(!1)}};return _.jsx("main",{className:"min-h-screen flex items-center justify-center p-2 md:p-4",children:_.jsxs(yn,{className:"w-full max-w-md p-5 md:p-8 bg-gradient-card shadow-card border-border/50",children:[_.jsxs("div",{className:"text-center mb-4 md:mb-6",children:[_.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 md:w-14 md:h-14 rounded-2xl bg-gradient-gold shadow-glow mb-2 md:mb-3",children:_.jsx(m0,{className:"w-5 h-5 md:w-6 md:h-6 text-primary-foreground"})}),_.jsx("h1",{className:"text-xl md:text-2xl font-bold",children:"Ãrea do Administrador"}),_.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t==="login"?"Faça login para ver as respostas":"Crie a conta de administrador"})]}),_.jsxs("form",{onSubmit:u,className:"space-y-3 md:space-y-4",children:[_.jsxs("div",{children:[_.jsx(sh,{htmlFor:"email",children:"E-mail"}),_.jsx(nh,{id:"email",type:"email",value:r,onChange:c=>n(c.target.value),required:!0})]}),_.jsxs("div",{children:[_.jsx(sh,{htmlFor:"password",children:"Senha"}),_.jsx(nh,{id:"password",type:"password",value:s,onChange:c=>i(c.target.value),required:!0,minLength:6})]}),_.jsx(rs,{type:"submit",disabled:o,className:"w-full bg-gradient-gold text-primary-foreground font-bold",children:o?"...":t==="login"?"Entrar":"Criar conta"})]}),_.jsx("button",{onClick:()=>e(t==="login"?"signup":"login"),className:"text-sm text-muted-foreground hover:text-primary mt-4 w-full text-center transition-smooth",children:t==="login"?"Primeiro acesso? Criar conta":"Já tem conta? Entrar"}),_.jsx("p",{className:"text-xs text-muted-foreground text-center mt-2",children:"A primeira conta criada vira admin automaticamente."})]})})},gN=Au("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 vN({className:t,variant:e,...r}){return _.jsx("div",{className:xe(gN({variant:e}),t),...r})}function Ug(t,[e,r]){return Math.min(r,Math.max(e,t))}var yN=y.createContext(void 0);function wN(t){const e=y.useContext(yN);return t||e||"ltr"}var Lc=0;function bN(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Fg()),document.body.insertAdjacentElement("beforeend",t[1]??Fg()),Lc++,()=>{Lc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
vendor: 4,220 bytes, line 191
191=>e.remove()),Lc--}},[])}function Fg(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var $c="focusScope.autoFocusOnMount",Dc="focusScope.autoFocusOnUnmount",zg={bubbles:!1,cancelable:!0},_N="FocusScope",jb=y.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=y.useState(null),u=ir(s),c=ir(i),d=y.useRef(null),f=Me(e,p=>l(p)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let p=function(v){if(h.paused||!a)return;const x=v.target;a.contains(x)?d.current=x:Xr(d.current,{select:!0})},w=function(v){if(h.paused||!a)return;const x=v.relatedTarget;x!==null&&(a.contains(x)||Xr(d.current,{select:!0}))},g=function(v){if(document.activeElement===document.body)for(const S of v)S.removedNodes.length>0&&Xr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),m.disconnect()}}},[n,a,h.paused]),y.useEffect(()=>{if(a){Vg.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent($c,zg);a.addEventListener($c,u),a.dispatchEvent(g),g.defaultPrevented||(xN(TN(Ib(a)),{select:!0}),document.activeElement===p&&Xr(a))}return()=>{a.removeEventListener($c,u),setTimeout(()=>{const g=new CustomEvent(Dc,zg);a.addEventListener(Dc,c),a.dispatchEvent(g),g.defaultPrevented||Xr(p??document.body,{select:!0}),a.removeEventListener(Dc,c),Vg.remove(h)},0)}}},[a,u,c,h]);const b=y.useCallback(p=>{if(!r&&!n||h.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(w&&g){const m=p.currentTarget,[v,x]=SN(m);v&&x?!p.shiftKey&&g===x?(p.preventDefault(),r&&Xr(v,{select:!0})):p.shiftKey&&g===v&&(p.preventDefault(),r&&Xr(x,{select:!0})):g===m&&p.preventDefault()}},[r,n,h.paused]);return _.jsx(ge.div,{tabIndex:-1,...o,ref:f,onKeyDown:b})});jb.displayName=_N;function xN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Xr(n,{select:e}),document.activeElement!==r)return}function SN(t){const e=Ib(t),r=Bg(e,t),n=Bg(e.reverse(),t);return[r,n]}function Ib(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Bg(t,e){for(const r of t)if(!kN(r,{upTo:e}))return r}function kN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function EN(t){return t instanceof HTMLInputElement&&"select"in t}function Xr(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&EN(t)&&e&&t.select()}}var Vg=CN();function CN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=Hg(t,e),t.unshift(e)},remove(e){var r;t=Hg(t,e),(r=t[0])==null||r.resume()}}}function Hg(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function TN(t){return t.filter(e=>e.tagName!=="A")}function RN(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var PN=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ls=new WeakMap,Qa=new WeakMap,Ja={},Mc=0,Lb=function(t){return t&&(t.host||Lb(t.parentNode))},AN=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Lb(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},ON=function(t,e,r,n){var s=AN(e,Array.isArray(t)?t:[t]);Ja[r]||(Ja[r]=new WeakMap);var i=Ja[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};
vendor: 6,462 bytes, lines 191-206
191s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(n),b=h!==null&&h!=="false",p=(Ls.get(f)||0)+1,w=(i.get(f)||0)+1;Ls.set(f,p),i.set(f,w),o.push(f),p===1&&b&&Qa.set(f,!0),w===1&&f.setAttribute(r,"true"),b||f.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(e),a.clear(),Mc++,function(){o.forEach(function(d){var f=Ls.get(d)-1,h=i.get(d)-1;Ls.set(d,f),i.set(d,h),f||(Qa.has(d)||d.removeAttribute(n),Qa.delete(d)),h||d.removeAttribute(r)}),Mc--,Mc||(Ls=new WeakMap,Ls=new WeakMap,Qa=new WeakMap,Ja={})}},NN=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=PN(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),ON(n,s,r,"aria-hidden")):function(){return null}},yr=function(){return yr=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},yr.apply(this,arguments)};function $b(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function jN(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var gl="right-scroll-bar-position",vl="width-before-scroll-bar",IN="with-scroll-bars-hidden",LN="--removed-body-scroll-bar-size";function Uc(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function $N(t,e){var r=y.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var DN=typeof window<"u"?y.useLayoutEffect:y.useEffect,Wg=new WeakMap;function MN(t,e){var r=$N(null,function(n){return t.forEach(function(s){return Uc(s,n)})});return DN(function(){var n=Wg.get(r);if(n){var s=new Set(n),i=new Set(t),o=r.current;s.forEach(function(a){i.has(a)||Uc(a,null)}),i.forEach(function(a){s.has(a)||Uc(a,o)})}Wg.set(r,t)},[t]),r}function UN(t){return t}function FN(t,e){e===void 0&&(e=UN);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var c=o;o=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),r}}}};return s}function zN(t){t===void 0&&(t={});var e=FN(null);return e.options=yr({async:!0,ssr:!1},t),e}var Db=function(t){var e=t.sideCar,r=$b(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,yr({},r))};Db.isSideCarExport=!0;function BN(t,e){return t.useMedium(e),Db}var Mb=zN(),Fc=function(){},zu=y.forwardRef(function(t,e){var r=y.useRef(null),n=y.useState({onScrollCapture:Fc,onWheelCapture:Fc,onTouchMoveCapture:Fc}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,u=t.removeScrollBar,c=t.enabled,d=t.shards,f=t.sideCar,h=t.noRelative,b=t.noIsolation,p=t.inert,w=t.allowPinchZoom,g=t.as,m=g===void 0?"div":g,v=t.gapMode,x=$b(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,k=MN([r,e]),E=yr(yr({},x),s);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:Mb,removeScrollBar:u,shards:d,noRelative:h,noIsolation:b,inert:p,setCallbacks:i,allowPinchZoom:!!w,lockRef:r,gapMode:v}),o?y.cloneElement(y.Children.only(a),yr(yr({},E),{ref:k})):y.createElement(m,yr({},E,{className:l,ref:k}),a))});zu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zu.classNames={fullWidth:vl,zeroRight:gl};var VN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function HN(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=VN();return e&&t.setAttribute("nonce",e),t}function WN(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function qN(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var KN=function(){var t=0,e=null;return{add:function(r){t==0&&(e=HN())&&(WN(e,r),qN(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},GN=function(){var t=KN();return function(e,r){y.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},Ub=function(){var t=GN(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},QN={left:0,top:0,right:0,gap:0},zc=function(t){return parseInt(t||"",10)||0},JN=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[zc(r),zc(n),zc(s)]},ZN=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return QN;var e=JN(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},YN=Ub(),hi="data-scroll-locked",XN=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` 192 .`.concat(IN,` { 193 overflow: hidden `).concat(n,`; 194 padding-right: `).concat(a,"px ").concat(n,`; 195 } 196 body[`).concat(hi,`] { 197 overflow: hidden `).concat(n,`; 198 overscroll-behavior: contain; 199 `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` 200 padding-left: `.concat(s,`px; 201 padding-top: `).concat(i,`px; 202 padding-right: `).concat(o,`px; 203 margin-left:0; 204 margin-top:0; 205 margin-right: `).concat(a,"px ").concat(n,`; 206 `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
206")].filter(Boolean).join(""),` 207 } 208 209 .`).concat(gl,` { 210 right: `).concat(a,"px ").concat(n,`; 211 } 212 213 .`).concat(vl,` { 214 margin-right: `).concat(a,"px ").concat(n,`; 215 } 216 217 .`).concat(gl," .").concat(gl,` { 218 right: 0 `).concat(n,`; 219 } 220 221 .`).concat(vl," .").concat(vl,` { 222 margin-right: 0 `).concat(n,`; 223 } 224 225 body[`).concat(hi,`] { 226 `).concat(LN,": ").concat(a,`px; 227 } 228`)},qg=function(){var t=parseInt(document.body.getAttribute(hi)||"0",10);return isFinite(t)?t:0},ej=function(){y.useEffect(function(){return document.body.setAttribute(hi,(qg()+1).toString()),function(){var t=qg()-1;t<=0?document.body.removeAttribute(hi):document.body.setAttribute(hi,t.toString())}},[])},tj=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;ej();var i=y.useMemo(function(){return ZN(s)},[s]);return y.createElement(YN,{styles:XN(i,!e,s,r?"":"!important")})},yh=!1;if(typeof window<"u")try{var Za=Object.defineProperty({},"passive",{get:function(){return yh=!0,!0}});window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{yh=!1}var $s=yh?{passive:!1}:!1,rj=function(t){return t.tagName==="TEXTAREA"},Fb=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!rj(t)&&r[e]==="visible")},nj=function(t){return Fb(t,"overflowY")},sj=function(t){return Fb(t,"overflowX")},Kg=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=zb(t,n);if(s){var i=Bb(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ij=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},oj=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},zb=function(t,e){return t==="v"?nj(e):sj(e)},Bb=function(t,e){return t==="v"?ij(e):oj(e)},aj=function(t,e){return t==="h"&&e==="rtl"?-1:1},lj=function(t,e,r,n,s){var i=aj(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),u=!1,c=o>0,d=0,f=0;do{if(!a)break;var h=Bb(t,a),b=h[0],p=h[1],w=h[2],g=p-w-i*b;(b||g)&&zb(t,a)&&(d+=g,f+=b);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&(Math.abs(d)<1||!s)||!c&&(Math.abs(f)<1||!s))&&(u=!0),u},Ya=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Gg=function(t){return[t.deltaX,t.deltaY]},Qg=function(t){return t&&"current"in t?t.current:t},uj=function(t,e){return t[0]===e[0]&&t[1]===e[1]},cj=function(t){return` 229 .block-interactivity-`.concat(t,` {pointer-events: none;} 230 .allow-interactivity-`).concat(t,` {pointer-events: all;} 231`)},dj=0,Ds=[];function hj(t){var e=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(dj++)[0],i=y.useState(Ub)[0],o=y.useRef(t);y.useEffect(function(){o.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var p=jN([t.lockRef.current],(t.shards||[]).map(Qg),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=y.useCallback(function(p,w){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var g=Ya(p),m=r.current,v="deltaX"in p?p.deltaX:m[0]-g[0],x="deltaY"in p?p.deltaY:m[1]-g[1],S,k=p.target,E=Math.abs(v)>Math.abs(x)?"h":"v";if("touches"in p&&E==="h"&&k.type==="range")return!1;var T=Kg(E,k);if(!T)return!0;if(T?S=E:(S=E==="v"?"h":"v",T=Kg(E,k)),!T)return!1;if(!n.current&&"changedTouches"in p&&(v||x)&&(n.current=S),!S)return!0;var A=n.current||S;return lj(A,w,p,A==="h"?v:x,!0)},[]),l=y.useCallback(function(p){var w=p;if(!(!Ds.length||Ds[Ds.length-1]!==i)){var g="deltaY"in w?Gg(w):Ya(w),m=e.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&uj(S.delta,g)})[0];if(m&&m.should){w.cancelable&&w.preventDefault();return}
vendor: 5,924 bytes, line 231
231if(!m){var v=(o.current.shards||[]).map(Qg).filter(Boolean).filter(function(S){return S.contains(w.target)}),x=v.length>0?a(w,v[0]):!o.current.noIsolation;x&&w.cancelable&&w.preventDefault()}}},[]),u=y.useCallback(function(p,w,g,m){var v={name:p,delta:w,target:g,should:m,shadowParent:fj(g)};e.current.push(v),setTimeout(function(){e.current=e.current.filter(function(x){return x!==v})},1)},[]),c=y.useCallback(function(p){r.current=Ya(p),n.current=void 0},[]),d=y.useCallback(function(p){u(p.type,Gg(p),p.target,a(p,t.lockRef.current))},[]),f=y.useCallback(function(p){u(p.type,Ya(p),p.target,a(p,t.lockRef.current))},[]);y.useEffect(function(){return Ds.push(i),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,$s),document.addEventListener("touchmove",l,$s),document.addEventListener("touchstart",c,$s),function(){Ds=Ds.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,$s),document.removeEventListener("touchmove",l,$s),document.removeEventListener("touchstart",c,$s)}},[]);var h=t.removeScrollBar,b=t.inert;return y.createElement(y.Fragment,null,b?y.createElement(i,{styles:cj(s)}):null,h?y.createElement(tj,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function fj(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const pj=BN(Mb,hj);var Vb=y.forwardRef(function(t,e){return y.createElement(zu,yr({},t,{ref:e,sideCar:pj}))});Vb.classNames=zu.classNames;var mj=[" ","Enter","ArrowUp","ArrowDown"],gj=[" ","Enter"],ws="Select",[Bu,Vu,vj]=Fw(ws),[Vi,nI]=Mi(ws,[vj,Iu]),Hu=Iu(),[yj,Bn]=Vi(ws),[wj,bj]=Vi(ws),Hb=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:b}=t,p=Hu(e),[w,g]=y.useState(null),[m,v]=y.useState(null),[x,S]=y.useState(!1),k=wN(u),[E,T]=Bd({prop:n,defaultProp:s??!1,onChange:i,caller:ws}),[A,O]=Bd({prop:o,defaultProp:a,onChange:l,caller:ws}),q=y.useRef(null),D=w?b||!!w.closest("form"):!0,[J,L]=y.useState(new Set),Y=Array.from(J).map(H=>H.props.value).join(";");return _.jsx(fR,{...p,children:_.jsxs(yj,{required:h,scope:e,trigger:w,onTriggerChange:g,valueNode:m,onValueNodeChange:v,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Of(),value:A,onValueChange:O,open:E,onOpenChange:T,dir:k,triggerPointerDownPosRef:q,disabled:f,children:[_.jsx(Bu.Provider,{scope:e,children:_.jsx(wj,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(H=>{L(G=>new Set(G).add(H))},[]),onNativeOptionRemove:y.useCallback(H=>{L(G=>{const C=new Set(G);return C.delete(H),C})},[]),children:r})}),D?_.jsxs(p_,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:A,onChange:H=>O(H.target.value),disabled:f,form:b,children:[A===void 0?_.jsx("option",{value:""}):null,Array.from(J)]},Y):null]})})};Hb.displayName=ws;var Wb="SelectTrigger",qb=y.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Hu(r),o=Bn(Wb,r),a=o.disabled||n,l=Me(e,o.onTriggerChange),u=Vu(r),c=y.useRef("touch"),[d,f,h]=g_(p=>{const w=u().filter(v=>!v.disabled),g=w.find(v=>v.value===o.value),m=v_(w,p,g);m!==void 0&&o.onValueChange(m.value)}),b=p=>{a||(o.onOpenChange(!0),h()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return _.jsx(H0,{asChild:!0,...i,children:_.jsx(ge.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":m_(o.value)?"":void 0,...s,ref:l,onClick:le(s.onClick,p=>{p.currentTarget.focus(),c.current!=="mouse"&&b(p)}),onPointerDown:le(s.onPointerDown,p=>{c.current=p.pointerType;const w=p.target;w.hasPointerCapture(p.pointerId)&&w.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(b(p),p.preventDefault())}),onKeyDown:le(s.onKeyDown,p=>{const w=d.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(w&&p.key===" ")&&mj.includes(p.key)&&(b(),p.preventDefault())})})})});qb.displayName=Wb;var Kb="SelectValue",Gb=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,l=Bn(Kb,r),{onValueNodeHasChildrenChange:u}=l,c=i!==void 0,d=Me(e,l.onValueNodeChange);return Xe(()=>{u(c)},[u,c]),_.jsx(ge.span,{...a,ref:d,style:{pointerEvents:"none"},children:m_(l.value)?_.jsx(_.Fragment,{children:o}):i})});Gb.displayName=Kb;var _j="SelectIcon",Qb=y.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return _.jsx(ge.span,{"aria-hidden":!0,...s,ref:e,children:n||"â¼"})});Qb.displayName=_j;var xj="SelectPortal",Jb=t=>_.jsx(Ef,{asChild:!0,...t});Jb.displayName=xj;var bs="SelectContent",Zb=y.forwardRef((t,e)=>{const r=Bn(bs,t.__scopeSelect),[n,s]=y.useState();if(Xe(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Ss.createPortal(_.jsx(Yb,{scope:t.__scopeSelect,children:_.jsx(Bu.Slot,{scope:t.__scopeSelect,children:_.jsx("div",{children:t.children})})}),i):null}return _.jsx(Xb,{...t,ref:e})});Zb.displayName=bs;var Kt=10,[Yb,Vn]=Vi(bs),Sj="SelectContentImpl",kj=qo("SelectContent.RemoveScroll"),Xb=y.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:b,hideWhenDetached:p,avoidCollisions:w,...g}=t,m=Bn(bs,r),[v,x]=y.useState(null),[S,k]=y.useState(null),E=Me(e,U=>x(U)),[T,A]=y.useState(null),[O,q]=y.useState(null),D=Vu(r),[J,L]=y.useState(!1),Y=y.useRef(!1);y.useEffect(()=>{if(v)return NN(v)},[v]),bN();const H=y.useCallback(U=>{const[ve,...je]=D().map(he=>he.ref.current),[me]=je.slice(-1),ue=document.activeElement;for(const he of U)if(he===ue||(he==null||he.scrollIntoView({block:"nearest"}
vendor: 13,844 bytes, line 231
231),he===ve&&S&&(S.scrollTop=0),he===me&&S&&(S.scrollTop=S.scrollHeight),he==null||he.focus(),document.activeElement!==ue))return},[D,S]),G=y.useCallback(()=>H([T,v]),[H,T,v]);y.useEffect(()=>{J&&G()},[J,G]);const{onOpenChange:C,triggerPointerDownPosRef:P}=m;y.useEffect(()=>{if(v){let U={x:0,y:0};const ve=me=>{var ue,he;U={x:Math.abs(Math.round(me.pageX)-(((ue=P.current)==null?void 0:ue.x)??0)),y:Math.abs(Math.round(me.pageY)-(((he=P.current)==null?void 0:he.y)??0))}},je=me=>{U.x<=10&&U.y<=10?me.preventDefault():v.contains(me.target)||C(!1),document.removeEventListener("pointermove",ve),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",je,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",je,{capture:!0})}}},[v,C,P]),y.useEffect(()=>{const U=()=>C(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[C]);const[M,Z]=g_(U=>{const ve=D().filter(ue=>!ue.disabled),je=ve.find(ue=>ue.ref.current===document.activeElement),me=v_(ve,U,je);me&&setTimeout(()=>me.ref.current.focus())}),K=y.useCallback((U,ve,je)=>{const me=!Y.current&&!je;(m.value!==void 0&&m.value===ve||me)&&(A(U),me&&(Y.current=!0))},[m.value]),se=y.useCallback(()=>v==null?void 0:v.focus(),[v]),te=y.useCallback((U,ve,je)=>{const me=!Y.current&&!je;(m.value!==void 0&&m.value===ve||me)&&q(U)},[m.value]),Se=n==="popper"?wh:e_,Ne=Se===wh?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:b,hideWhenDetached:p,avoidCollisions:w}:{};return _.jsx(Yb,{scope:r,content:v,viewport:S,onViewportChange:k,itemRefCallback:K,selectedItem:T,onItemLeave:se,itemTextRefCallback:te,focusSelectedItem:G,selectedItemText:O,position:n,isPositioned:J,searchRef:M,children:_.jsx(Vb,{as:kj,allowPinchZoom:!0,children:_.jsx(jb,{asChild:!0,trapped:m.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:le(s,U=>{var ve;(ve=m.trigger)==null||ve.focus({preventScroll:!0}),U.preventDefault()}),children:_.jsx(Tu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:_.jsx(Se,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:U=>U.preventDefault(),...g,...Ne,onPlaced:()=>L(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:le(g.onKeyDown,U=>{const ve=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!ve&&U.key.length===1&&Z(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let me=D().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);if(["ArrowUp","End"].includes(U.key)&&(me=me.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const ue=U.target,he=me.indexOf(ue);me=me.slice(he+1)}setTimeout(()=>H(me)),U.preventDefault()}})})})})})})});Xb.displayName=Sj;var Ej="SelectItemAlignedPosition",e_=y.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Bn(bs,r),o=Vn(bs,r),[a,l]=y.useState(null),[u,c]=y.useState(null),d=Me(e,E=>c(E)),f=Vu(r),h=y.useRef(!1),b=y.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:g,focusSelectedItem:m}=o,v=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&p&&w&&g){const E=i.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),O=g.getBoundingClientRect();if(i.dir!=="rtl"){const ue=O.left-T.left,he=A.left-ue,et=E.left-he,At=E.width+et,Hn=Math.max(At,T.width),Wr=window.innerWidth-Kt,Wn=Ug(he,[Kt,Math.max(Kt,Wr-Hn)]);a.style.minWidth=At+"px",a.style.left=Wn+"px"}else{const ue=T.right-O.right,he=window.innerWidth-A.right-ue,et=window.innerWidth-E.right-he,At=E.width+et,Hn=Math.max(At,T.width),Wr=window.innerWidth-Kt,Wn=Ug(he,[Kt,Math.max(Kt,Wr-Hn)]);a.style.minWidth=At+"px",a.style.right=Wn+"px"}const q=f(),D=window.innerHeight-Kt*2,J=p.scrollHeight,L=window.getComputedStyle(u),Y=parseInt(L.borderTopWidth,10),H=parseInt(L.paddingTop,10),G=parseInt(L.borderBottomWidth,10),C=parseInt(L.paddingBottom,10),P=Y+H+J+C+G,M=Math.min(w.offsetHeight*5,P),Z=window.getComputedStyle(p),K=parseInt(Z.paddingTop,10),se=parseInt(Z.paddingBottom,10),te=E.top+E.height/2-Kt,Se=D-te,Ne=w.offsetHeight/2,U=w.offsetTop+Ne,ve=Y+H+U,je=P-ve;if(ve<=te){const ue=q.length>0&&w===q[q.length-1].ref.current;a.style.bottom="0px";const he=u.clientHeight-p.offsetTop-p.offsetHeight,et=Math.max(Se,Ne+(ue?se:0)+he+G),At=ve+et;a.style.height=At+"px"}else{const ue=q.length>0&&w===q[0].ref.current;a.style.top="0px";const et=Math.max(te,Y+p.offsetTop+(ue?K:0)+Ne)+je;a.style.height=et+"px",p.scrollTop=ve-te+p.offsetTop}a.style.margin=`${Kt}px 0`,a.style.minHeight=M+"px",a.style.maxHeight=D+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,a,u,p,w,g,i.dir,n]);Xe(()=>v(),[v]);const[x,S]=y.useState();Xe(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const k=y.useCallback(E=>{E&&b.current===!0&&(v(),m==null||m(),b.current=!1)},[v,m]);return _.jsx(Tj,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:_.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:_.jsx(ge.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});e_.displayName=Ej;var Cj="SelectPopperPosition",wh=y.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Kt,...i}=t,o=Hu(r);return _.jsx(W0,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wh.displayName=Cj;var[Tj,qf]=Vi(bs,{}),bh="SelectViewport",t_=y.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=Vn(bh,r),o=qf(bh,r),a=Me(e,i.onViewportChange),l=y.useRef(0);return _.jsxs(_.Fragment,{children:[_.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),_.jsx(Bu.Slot,{scope:r,children:_.jsx(ge.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:le(s.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const h=Math.abs(l.current-c.scrollTop);if(h>0){const b=window.innerHeight-Kt*2,p=parseFloat(d.style.minHeight),w=parseFloat(d.style.height),g=Math.max(p,w);if(g<b){const m=g+h,v=Math.min(b,m),x=m-v;d.style.height=v+"px",d.style.bottom==="0px"&&(c.scrollTop=x>0?x:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});t_.displayName=bh;var r_="SelectGroup",[Rj,Pj]=Vi(r_),Aj=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Of();return _.jsx(Rj,{scope:r,id:s,children:_.jsx(ge.div,{role:"group","aria-labelledby":s,...n,ref:e})})});Aj.displayName=r_;var n_="SelectLabel",s_=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Pj(n_,r);return _.jsx(ge.div,{id:s.id,...n,ref:e})});s_.displayName=n_;var au="SelectItem",[Oj,i_]=Vi(au),o_=y.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Bn(au,r),l=Vn(au,r),u=a.value===n,[c,d]=y.useState(i??""),[f,h]=y.useState(!1),b=Me(e,m=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,m,n,s)}),p=Of(),w=y.useRef("touch"),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return _.jsx(Oj,{scope:r,value:n,disabled:s,textId:p,isSelected:u,onItemTextChange:y.useCallback(m=>{d(v=>v||((m==null?void 0:m.textContent)??"").trim())},[]),children:_.jsx(Bu.ItemSlot,{scope:r,value:n,disabled:s,textValue:c,children:_.jsx(ge.div,{role:"option","aria-labelledby":p,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:b,onFocus:le(o.onFocus,()=>h(!0)),onBlur:le(o.onBlur,()=>h(!1)),onClick:le(o.onClick,()=>{w.current!=="mouse"&&g()}),onPointerUp:le(o.onPointerUp,()=>{w.current==="mouse"&&g()}),onPointerDown:le(o.onPointerDown,m=>{w.current=m.pointerType}),onPointerMove:le(o.onPointerMove,m=>{var v;w.current=m.pointerType,s?(v=l.onItemLeave)==null||v.call(l):w.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le(o.onPointerLeave,m=>{var v;m.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:le(o.onKeyDown,m=>{var x;((x=l.searchRef)==null?void 0:x.current)!==""&&m.key===" "||(gj.includes(m.key)&&g(),m.key===" "&&m.preventDefault())})})})})});o_.displayName=au;var co="SelectItemText",a_=y.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Bn(co,r),a=Vn(co,r),l=i_(co,r),u=bj(co,r),[c,d]=y.useState(null),f=Me(e,g=>d(g),l.onItemTextChange,g=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,g,l.value,l.disabled)}),h=c==null?void 0:c.textContent,b=y.useMemo(()=>_.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return Xe(()=>(p(b),()=>w(b)),[p,w,b]),_.jsxs(_.Fragment,{children:[_.jsx(ge.span,{id:l.textId,...i,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ss.createPortal(i.children,o.valueNode):null]})});a_.displayName=co;var l_="SelectItemIndicator",u_=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return i_(l_,r).isSelected?_.jsx(ge.span,{"aria-hidden":!0,...n,ref:e}):null});u_.displayName=l_;var _h="SelectScrollUpButton",c_=y.forwardRef((t,e)=>{const r=Vn(_h,t.__scopeSelect),n=qf(_h,t.__scopeSelect),[s,i]=y.useState(!1),o=Me(e,n.onScrollButtonChange);return Xe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?_.jsx(h_,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});c_.displayName=_h;var xh="SelectScrollDownButton",d_=y.forwardRef((t,e)=>{const r=Vn(xh,t.__scopeSelect),n=qf(xh,t.__scopeSelect),[s,i]=y.useState(!1),o=Me(e,n.onScrollButtonChange);return Xe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)<u;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?_.jsx(h_,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});d_.displayName=xh;var h_=y.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=Vn("SelectScrollButton",r),o=y.useRef(null),a=Vu(r),l=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),Xe(()=>{var c;const u=a().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),_.jsx(ge.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:le(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:le(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:le(s.onPointerLeave,()=>{l()})})}),Nj="SelectSeparator",f_=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return _.jsx(ge.div,{"aria-hidden":!0,...n,ref:e})});f_.displayName=Nj;var Sh="SelectArrow",jj=y.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Hu(r),i=Bn(Sh,r),o=Vn(Sh,r);return i.open&&o.position==="popper"?_.jsx(q0,{...s,...n,ref:e}):null});jj.displayName=Sh;var Ij="SelectBubbleInput",p_=y.forwardRef(({__scopeSelect:t,value:e,...r},n)=>{const s=y.useRef(null),i=Me(n,s),o=RN(e);return y.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&c){const d=new Event("change",{bubbles:!0});c.call(a,e),a.dispatchEvent(d)}},[o,e]),_.jsx(ge.select,{...r,style:{...Ww,...r.style},ref:i,defaultValue:e})});p_.displayName=Ij;function m_(t){return t===""||t===void 0}function g_(t){const e=ir(t),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(o=>{const a=r.current+o;e(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function v_(t,e,r){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=Lj(t,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function Lj(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var $j=Hb,y_=qb,Dj=Gb,Mj=Qb,Uj=Jb,w_=Zb,Fj=t_,b_=s_,__=o_,zj=a_,Bj=u_,x_=c_,S_=d_,k_=f_;const Vj=$j,Hj=Dj,E_=y.forwardRef(({className:t,children:e,...r},n)=>_.jsxs(y_,{ref:n,className:xe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
231ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...r,children:[e,_.jsx(Mj,{asChild:!0,children:_.jsx(p0,{className:"h-4 w-4 opacity-50"})})]}));E_.displayName=y_.displayName;const C_=y.forwardRef(({className:t,...e},r)=>_.jsx(x_,{ref:r,className:xe("flex cursor-default items-center justify-center py-1",t),...e,children:_.jsx(vC,{className:"h-4 w-4"})}));C_.displayName=x_.displayName;const T_=y.forwardRef(({className:t,...e},r)=>_.jsx(S_,{ref:r,className:xe("flex cursor-default items-center justify-center py-1",t),...e,children:_.jsx(p0,{className:"h-4 w-4"})}));T_.displayName=S_.displayName;const R_=y.forwardRef(({className:t,children:e,position:r="popper",...n},s)=>_.jsx(Uj,{children:_.jsxs(w_,{ref:s,className:xe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:[_.jsx(C_,{}),_.jsx(Fj,{className:xe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),_.jsx(T_,{})]})}));R_.displayName=w_.displayName;const Wj=y.forwardRef(({className:t,...e},r)=>_.jsx(b_,{ref:r,className:xe("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));Wj.displayName=b_.displayName;const P_=y.forwardRef(({className:t,children:e,...r},n)=>_.jsxs(__,{ref:n,className:xe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...r,children:[_.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_.jsx(Bj,{children:_.jsx(gC,{className:"h-4 w-4"})})}),_.jsx(zj,{children:e})]}));P_.displayName=__.displayName;const qj=y.forwardRef(({className:t,...e},r)=>_.jsx(k_,{ref:r,className:xe("-mx-1 my-1 h-px bg-muted",t),...e}));qj.displayName=k_.displayName;const Kj=({r:t,expanded:e,setExpanded:r})=>_.jsxs(_.Fragment,{children:[_.jsxs("tr",{className:"border-t border-border hover:bg-secondary/30",children:[_.jsx("td",{className:"p-3 font-medium",children:t.nome}),_.jsx("td",{className:"p-3 text-muted-foreground",children:t.email}),_.jsx("td",{className:"p-3 text-muted-foreground",children:t.telefone}),_.jsxs("td",{className:"p-3",children:[t.score,"/",t.total]}),_.jsx("td",{className:"p-3",children:_.jsxs(vN,{className:Number(t.percentage)>=50?"bg-success text-success-foreground":"bg-secondary",children:[Math.round(Number(t.percentage)),"%"]})}),_.jsx("td",{className:"p-3 text-muted-foreground text-xs",children:new Date(t.completed_at).toLocaleString("pt-BR")}),_.jsx("td",{className:"p-3",children:_.jsx("button",{onClick:()=>r(e===t.id?null:t.id),className:"text-primary hover:underline text-xs",children:e===t.id?"ocultar":"ver respostas"})})]}),e===t.id&&_.jsx("tr",{className:"bg-secondary/20",children:_.jsx("td",{colSpan:7,className:"p-4",children:_.jsx("div",{className:"space-y-2",children:t.answers.map(n=>_.jsxs("div",{className:"text-xs flex gap-2 items-start",children:[_.jsxs("span",{className:"font-bold text-primary",children:["Q",n.questionId,"."]}),_.jsx("span",{className:"flex-1 text-muted-foreground",children:n.question}),_.jsxs("span",{className:n.answer===n.correct?"text-success font-bold":"text-destructive font-bold",children:[n.answer??"â"," ",n.answer===n.correct?"â":`â (${n.correct})`]})]},n.questionId))})})})]}),Ms=50,Gj=()=>{const[t,e]=y.useState([]),[r,n]=y.useState(!0),[s,i]=y.useState(null),[o,a]=y.useState(0),[l,u]=y.useState(0),[c,d]=y.useState(pl),f=kf();y.useEffect(()=>{document.title="Admin â Respostas do Quiz"},[]),y.useEffect(()=>{(async()=>{n(!0);const{data:x}=await ln.auth.getSession();if(!x.session){f("/auth");return}const S=o*Ms,k=S+Ms-1,{data:E,error:T,count:A}=await ln.from("quiz_responses").select("*",{count:"exact"}).eq("quiz_slug",c).order("completed_at",{ascending:!1}).range(S,k);T?(Fd.error("Sem permissão. Garanta que sua conta tem perfil admin."),console.error(T)):(e(E||[]),u(A||0
231)),n(!1)})()},[f,o,c]);const h=async()=>{await ln.auth.signOut(),f("/auth")},b=()=>{const x=["nome","email","telefone","score","total","percentage","completed_at"],S=t.map(O=>[O.nome,O.email,O.telefone,O.score,O.total,O.percentage,O.completed_at].map(q=>`"${String(q??"").replace(/"/g,'""')}"`).join(",")),k=[x.join(","),...S].join(` 232`),E=new Blob([k],{type:"text/csv"}),T=URL.createObjectURL(E),A=document.createElement("a");A.href=T,A.download=`quiz-${c}-${Date.now()}.csv`,A.click(),URL.revokeObjectURL(T)},[p,w]=y.useState(0),[g,m]=y.useState(0);y.useEffect(()=>{(async()=>{const{count:x}=await ln.from("quiz_responses").select("*",{count:"exact",head:!0}).eq("quiz_slug",c).gte("percentage",50);w(x||0);const{data:S}=await ln.from("quiz_responses").select("percentage").eq("quiz_slug",c).limit(1e4);S&&S.length?m(Math.round(S.reduce((k,E)=>k+Number(E.percentage),0)/S.length)):m(0)})()},[c]);const v=Math.max(1,Math.ceil(l/Ms));return _.jsxs("main",{className:"min-h-screen p-4 md:p-8 max-w-7xl mx-auto",children:[_.jsxs("header",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 mb-8",children:[_.jsxs("div",{children:[_.jsxs("h1",{className:"text-3xl font-bold",children:["Painel ",_.jsx("span",{className:"text-gradient-gold",children:"Admin"})]}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Respostas do quiz"})]}),_.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[_.jsxs(Vj,{value:c,onValueChange:x=>{a(0),d(x)},children:[_.jsx(E_,{className:"w-[180px]",children:_.jsx(Hj,{placeholder:"Quiz"})}),_.jsx(R_,{children:Object.values(Dn).map(x=>_.jsx(P_,{value:x.slug,children:x.titulo},x.slug))})]}),_.jsxs(rs,{onClick:b,variant:"outline",disabled:!t.length,children:[_.jsx(yC,{className:"w-4 h-4 mr-2"})," CSV"]}),_.jsxs(rs,{onClick:h,variant:"ghost",children:[_.jsx(wC,{className:"w-4 h-4 mr-2"})," Sair"]})]})]}),_.jsxs("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:[_.jsx(yn,{className:"p-5 bg-gradient-card border-border/50",children:_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(_C,{className:"w-8 h-8 text-primary"}),_.jsxs("div",{children:[_.jsx("div",{className:"text-2xl font-bold",children:l}),_.jsx("div",{className:"text-xs text-muted-foreground",children:"Respostas"})]})]})}),_.jsx(yn,{className:"p-5 bg-gradient-card border-border/50",children:_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(mC,{className:"w-8 h-8 text-success"}),_.jsxs("div",{children:[_.jsx("div",{className:"text-2xl font-bold",children:p}),_.jsx("div",{className:"text-xs text-muted-foreground",children:"Aprovados (â¥50%)"})]})]})}),_.jsx(yn,{className:"p-5 bg-gradient-card border-border/50",children:_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(bC,{className:"w-8 h-8 text-accent"}),_.jsxs("div",{children:[_.jsxs("div",{className:"text-2xl font-bold",children:[g,"%"]}),_.jsx("div",{className:"text-xs text-muted-foreground",children:"Média"})]})]})})]}),_.jsxs(yn,{className:"bg-gradient-card border-border/50 overflow-hidden",children:[r?_.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Carregando..."}):t.length===0?_.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Nenhuma resposta ainda."}):_.jsx("div",{className:"overflow-x-auto",children:_.jsxs("table",{className:"w-full text-sm",children:[_.jsx("thead",{className:"bg-secondary/60",children:_.jsxs("tr",{className:"text-left",children:[_.jsx("th",{className:"p-3",children:"Nome"}),_.jsx("th",{className:"p-3",children:"E-mail"}),_.jsx("th",{className:"p-3",children:"Telefone"}),_.jsx("th",{className:"p-3",children:"Pontos"}),_.jsx("th",{className:"p-3",children:"%"}),_.jsx("th",{className:"p-3",children:"Quando"}),_.jsx("th",{className:"p-3"})]})}),_.jsx("tbody",{children:t.map(x=>_.jsx(Kj,{r:x,expanded:s,setExpanded:i},x.id))})]})}),!r&&l>Ms&&_.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-border",children:[_.jsxs("div",{className:"text-xs text-muted-foreground",children:["Mostrando ",o*Ms+1,"â",Math.min((o+1)*Ms,l)," de ",l]}),_.jsxs("div",{className:"flex gap-2",children:[_.jsx(rs,{size:"sm",variant:"outline",disabled:o===0,onClick:()=>a(x=>x-1),children:"Anterior"}),_.jsxs("span",{className:"text-xs self-center",children:["Página ",o+1," de ",v]}),_.jsx(rs,{size:"sm",variant:"outline",disabled:o+1>=v,onClick:()=>a(x=>x+1),children:"Próxima"})]})]})]})]})},Jg=()=>{const t=Object.values(Dn);return _.jsxs("main",{className:"min-h-screen bg-background flex flex-col items-center px-4 py-4 md:py-10",children:[_.jsx("img",{src:Nb,alt:"Projeto TRTs",className:"h-14 md:h-20 mb-3 md:mb-6"}),_.jsx("h1",{className:"text-2xl md:text-4xl font-bold text-center mb-1 md:mb-2",children:"Escolha o seu Quiz"}),_.jsx("p",{className:"text-muted-foreground text-center mb-4 md:mb-8 max-w-xl text-sm md:text-base",children:"Selecione abaixo a aula correspondente ao quiz que você quer realizar."}),_.jsx("div",{className:"grid gap-4 md:gap-6 md:grid-cols-2 w-full max-w-3xl",children:t.map(e=>_.jsxs(yn,{className:"p-4 md:p-6 flex flex-col gap-3 md:gap-4",children:[_.jsxs("div",{children:[_.jsx("h2",{className:"text-xl font-semibold",children:e.titulo}),_.jsx("p",{className:"text-sm text-muted-foreground",children:e.subt
232itulo})]}),_.jsxs("p",{className:"text-sm",children:[e.questions.length," perguntas ⢠Acerte ao menos 50% para liberar o material."]}),_.jsx(rs,{asChild:!0,className:"mt-auto",children:_.jsxs(LE,{to:`/quiz/${e.slug}`,children:["Fazer Quiz ",_.jsx(pC,{className:"ml-2 w-4 h-4"})]})})]},e.slug))})]})},Qj=new jk,Jj=()=>_.jsx(Lk,{client:Qj,children:_.jsxs(OR,{children:[_.jsx(sT,{}),_.jsx(p1,{}),_.jsx(NE,{children:_.jsxs(EE,{children:[_.jsx(Tr,{path:"/",element:_.jsx(Jg,{})}),_.jsx(Tr,{path:"/quizzes",element:_.jsx(Jg,{})}),_.jsx(Tr,{path:"/quiz/:slug",element:_.jsx(Ic,{})}),_.jsx(Tr,{path:"/aula-1",element:_.jsx(Ic,{})}),_.jsx(Tr,{path:"/aula-2",element:_.jsx(Ic,{})}),_.jsx(Tr,{path:"/auth",element:_.jsx(mN,{})}),_.jsx(Tr,{path:"/admin",element:_.jsx(Gj,{})}),_.jsx(Tr,{path:"*",element:_.jsx(pN,{})})]})})]})});ww(document.getElementById("root")).render(_.jsx(Jj,{}));
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.