PageSourceSearch

https://davidecaiazzo.lovable.app/assets/index-Baldd8ct.js

js davidecaiazzo.lovable.app collected 2026-10-03 03:24:12 UTC 750,057 bytes, 263 lines download raw bytes

vendor: 4,137 bytes, lines 1-9
1var Og=e=>{throw TypeError(e)};var ld=(e,t,n)=>t.has(e)||Og("Cannot "+n);var _=(e,t,n)=>(ld(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Og("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),U=(e,t,n,r)=>(ld(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(ld(e,t,"access private method"),n);var cl=(e,t,n,r)=>({set _(s){U(e,t,s,n)},get _(){return _(e,t,r)}});function x_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Vw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uw={exports:{}},vu={},Bw={exports:{}},re={};/**
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 Ga=Symbol.for("react.element"),b_=Symbol.for("react.portal"),S_=Symbol.for("react.fragment"),E_=Symbol.for("react.strict_mode"),k_=Symbol.for("react.profiler"),C_=Symbol.for("react.provider"),__=Symbol.for("react.context"),T_=Symbol.for("react.forward_ref"),P_=Symbol.for("react.suspense"),R_=Symbol.for("react.memo"),A_=Symbol.for("react.lazy"),Ig=Symbol.iterator;function j_(e){return e===null||typeof e!="object"?null:(e=Ig&&e[Ig]||e["@@iterator"],typeof e=="function"?e:null)}var zw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ww=Object.assign,Hw={};function ho(e,t,n){this.props=e,this.context=t,this.refs=Hw,this.updater=n||zw}ho.prototype.isReactComponent={};ho.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ho.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Kw(){}Kw.prototype=ho.prototype;function Tp(e,t,n){this.props=e,this.context=t,this.refs=Hw,this.updater=n||zw}var Pp=Tp.prototype=new Kw;Pp.constructor=Tp;Ww(Pp,ho.prototype);Pp.isPureReactComponent=!0;var Lg=Array.isArray,qw=Object.prototype.hasOwnProperty,Rp={current:null},Gw={key:!0,ref:!0,__self:!0,__source:!0};function Yw(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)qw.call(t,r)&&!Gw.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Ga,type:e,key:i,ref:o,props:s,_owner:Rp.current}}function N_(e,t){return{$$typeof:Ga,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ap(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ga}function O_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dg=/\/+/g;function cd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?O_(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function Gl(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ga:case b_:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+cd(o,0):r,Lg(s)?(n="",e!=null&&(n=e.replace(Dg,"$&/")+"/"),Gl(s,t,n,"",function(c){return c})):s!=null&&(Ap(s)&&(s=N_(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Dg,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Lg(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+cd(i,a);o+=Gl(i,t,n,l,s)}else if(l=j_(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+cd(i,a++),o+=Gl(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ul(e,t,n){if(e==null)return e;var r=[],s=0;return Gl(e,r,"","",function(i){return t.call(n,i,s++)}),r}function I_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ft={current:null},Yl={transition:null},L_={ReactCurrentDispatcher:ft,ReactCurrentBatchConfig:Yl,ReactCurrentOwner:Rp};function Qw(){throw Error("act(...) is not supported in production builds of React.")}re.Children={map:ul,forEach:function(e,t,n){ul(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ul(e,function(){t++}),t},toArray:function(e){return ul(e,function(t){return t})||[]},only:function(e){if(!Ap(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=ho;re.Fragment=S_;re.Profiler=k_;re.PureComponent=Tp;re.StrictMode=E_;re.Suspense=P_;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L_;re.act=Qw;re.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ww({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Rp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)qw.call(t,l)&&!Gw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ga,type:e.type,key:s,ref:i,props:r,_owner:o}};re.createContext=function(e){return e={$$typeof:__,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:C_,_context:e},e.Consumer=e};re.createElement=Yw;re.createFactory=function(e){var t=Yw.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:T_,render:e}};re.isValidElement=Ap;re.lazy=function(e){return{$$typeof:A_,_payload:{_status:-1,_result:e},_init:I_}};re.memo=function(e,t){return{$$typeof:R_,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Yl.transition;Yl.transition={};try{e()}finally{Yl.transition=t}};re.unstable_act=Qw;re.useCallback=function(e,t){return ft.current.useCallback(e,t)};re.useContext=function(e){return ft.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return ft.current.useDeferredValue(e)};re.useEffect=function(e,t){return ft.current.useEffect(e,t)};re.useId=function(){return ft.current.useId()};re.useImperativeHandle=function(e,t,n){return ft.current.useImperativeHandle(e,t,n)};re.useInsertionEffect=function(e,t){return ft.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return ft.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return ft.current.useMemo(e,t)};re.useReducer=function(e,t,n){return ft.current.useReducer(e,t,n)};re.useRef=function(e){return ft.current.useRef(e)};re.useState=function(e){return ft.current.useState(e)};re.useSyncExternalStore=function(e,t,n){return ft.current.useSyncExternalStore(e,t,n)};re.useTransition=function(){return ft.current.useTransition()};re.version="18.3.1";Bw.exports=re;var b=Bw.exports;const D=Vw(b),jp=x_({__proto__:null,default:D},[b]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var D_=b,M_=Symbol.for("react.element"),$_=Symbol.for("react.fragment"),F_=Object.prototype.hasOwnProperty,V_=D_.__SECRET_INT
vendor: 10,204 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,U_={key:!0,ref:!0,__self:!0,__source:!0};function Jw(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)F_.call(t,r)&&!U_.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:M_,type:e,key:i,ref:o,props:s,_owner:V_.current}}vu.Fragment=$_;vu.jsx=Jw;vu.jsxs=Jw;Uw.exports=vu;var p=Uw.exports,Xw={exports:{}},Dt={},Zw={exports:{}},ex={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(R,j){var M=R.length;R.push(j);e:for(;0<M;){var Y=M-1>>>1,H=R[Y];if(0<s(H,j))R[Y]=j,R[M]=H,M=Y;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var j=R[0],M=R.pop();if(M!==j){R[0]=M;e:for(var Y=0,H=R.length,ee=H>>>1;Y<ee;){var X=2*(Y+1)-1,ye=R[X],Ne=X+1,$=R[Ne];if(0>s(ye,M))Ne<H&&0>s($,ye)?(R[Y]=$,R[Ne]=M,Y=Ne):(R[Y]=ye,R[X]=M,Y=X);else if(Ne<H&&0>s($,M))R[Y]=$,R[Ne]=M,Y=Ne;else break e}}return j}function s(R,j){var M=R.sortIndex-j.sortIndex;return M!==0?M:R.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,x=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=R)r(c),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(c)}}function S(R){if(m=!1,w(R),!x)if(n(l)!==null)x=!0,F(E);else{var j=n(c);j!==null&&G(S,j.startTime-R)}}function E(R,j){x=!1,m&&(m=!1,v(T),T=-1),f=!0;var M=h;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||R&&!L());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,h=d.priorityLevel;var H=Y(d.expirationTime<=j);j=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var ee=!0;else{var X=n(c);X!==null&&G(S,X.startTime-j),ee=!1}return ee}finally{d=null,h=M,f=!1}}var k=!1,C=null,T=-1,A=5,P=-1;function L(){return!(e.unstable_now()-P<A)}function N(){if(C!==null){var R=e.unstable_now();P=R;var j=!0;try{j=C(!0,R)}finally{j?W():(k=!1,C=null)}}else k=!1}var W;if(typeof g=="function")W=function(){g(N)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,K=O.port2;O.port1.onmessage=N,W=function(){K.postMessage(null)}}else W=function(){y(N,0)};function F(R){C=R,k||(k=!0,W())}function G(R,j){T=y(function(){R(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){x||f||(x=!0,F(E))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(R){switch(h){case 1:case 2:case 3:var j=3;break;default:j=h}var M=h;h=j;try{return R()}finally{h=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,j){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var M=h;h=R;try{return j()}finally{h=M}},e.unstable_scheduleCallback=function(R,j,M){var Y=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?Y+M:Y):M=Y,R){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=M+H,R={id:u++,callback:j,priorityLevel:R,startTime:M,expirationTime:H,sortIndex:-1},M>Y?(R.sortIndex=M,t(c,R),n(l)===null&&R===n(c)&&(m?(v(T),T=-1):m=!0,G(S,M-Y))):(R.sortIndex=H,t(l,R),x||f||(x=!0,F(E))),R},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(R){var j=h;return function(){var M=h;h=j;try{return R.apply(this,arguments)}finally{h=M}}}})(ex);Zw.exports=ex;var B_=Zw.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 z_=b,Lt=B_;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tx=new Set,ha={};function Hs(e,t){Xi(e,t),Xi(e+"Capture",t)}function Xi(e,t){for(ha[e]=t,e=0;e<t.length;e++)tx.add(t[e])}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wh=Object.prototype.hasOwnProperty,W_=/^[: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]*$/,Mg={},$g={};function H_(e){return wh.call($g,e)?!0:wh.call(Mg,e)?!1:W_.test(e)?$g[e]=!0:(Mg[e]=!0,!1)}function K_(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function q_(e,t,n,r){if(t===null||typeof t>"u"||K_(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function pt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ze[e]=new pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ze[t]=new pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ze[e]=new pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ze[e]=new pt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ze[e]=new pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ze[e]=new pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ze[e]=new pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ze[e]=new pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ze[e]=new pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Np=/[\-:]([a-z])/g;function Op(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Np,Op);Ze[t]=new pt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Np,Op);Ze[t]=new pt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Np,Op);Ze[t]=new pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ze[e]=new pt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ze.xlinkHref=new pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ze[e]=new pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ip(e,t,n,r){var s=Ze.hasOwnProperty(t)?Ze[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(q_(t,n,s,r)&&(n=null),r||s===null?H_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}
vendor: 5,027 bytes, lines 33-37
33var sr=z_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dl=Symbol.for("react.element"),fi=Symbol.for("react.portal"),pi=Symbol.for("react.fragment"),Lp=Symbol.for("react.strict_mode"),xh=Symbol.for("react.profiler"),nx=Symbol.for("react.provider"),rx=Symbol.for("react.context"),Dp=Symbol.for("react.forward_ref"),bh=Symbol.for("react.suspense"),Sh=Symbol.for("react.suspense_list"),Mp=Symbol.for("react.memo"),vr=Symbol.for("react.lazy"),sx=Symbol.for("react.offscreen"),Fg=Symbol.iterator;function To(e){return e===null||typeof e!="object"?null:(e=Fg&&e[Fg]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,ud;function Fo(e){if(ud===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ud=t&&t[1]||""}return`
34`+ud+e}var dd=!1;function hd(e,t){if(!e||dd)return"";dd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
35`),i=r.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{dd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fo(e):""}function G_(e){switch(e.tag){case 5:return Fo(e.type);case 16:return Fo("Lazy");case 13:return Fo("Suspense");case 19:return Fo("SuspenseList");case 0:case 2:case 15:return e=hd(e.type,!1),e;case 11:return e=hd(e.type.render,!1),e;case 1:return e=hd(e.type,!0),e;default:return""}}function Eh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pi:return"Fragment";case fi:return"Portal";case xh:return"Profiler";case Lp:return"StrictMode";case bh:return"Suspense";case Sh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rx:return(e.displayName||"Context")+".Consumer";case nx:return(e._context.displayName||"Context")+".Provider";case Dp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mp:return t=e.displayName||null,t!==null?t:Eh(e.type)||"Memo";case vr:t=e._payload,e=e._init;try{return Eh(e(t))}catch{}}return null}function Y_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Eh(t);case 8:return t===Lp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Hr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ix(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Q_(e){var t=ix(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hl(e){e._valueTracker||(e._valueTracker=Q_(e))}function ox(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ix(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kh(e,t){var n=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Hr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}
vendor: 4,651 bytes, line 37
37function ax(e,t){t=t.checked,t!=null&&Ip(e,"checked",t,!1)}function Ch(e,t){ax(e,t);var n=Hr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?_h(e,t.type,n):t.hasOwnProperty("defaultValue")&&_h(e,t.type,Hr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ug(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function _h(e,t,n){(t!=="number"||Sc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vo=Array.isArray;function Pi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Hr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Th(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(Vo(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Hr(n)}}function lx(e,t){var n=Hr(t.value),r=Hr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function zg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function cx(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ph(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fl,ux=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fl=fl||document.createElement("div"),fl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Go={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},J_=["Webkit","ms","Moz","O"];Object.keys(Go).forEach(function(e){J_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Go[t]=Go[e]})});function dx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Go.hasOwnProperty(e)&&Go[e]?(""+t).trim():t+"px"}function hx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=dx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var X_=je({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 Rh(e,t){if(t){if(X_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Ah(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
37ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jh=null;function $p(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nh=null,Ri=null,Ai=null;function Wg(e){if(e=Ja(e)){if(typeof Nh!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Su(t),Nh(e.stateNode,e.type,t))}}function fx(e){Ri?Ai?Ai.push(e):Ai=[e]:Ri=e}function px(){if(Ri){var e=Ri,t=Ai;if(Ai=Ri=null,Wg(e),t)for(e=0;e<t.length;e++)Wg(t[e])}}function mx(e,t){return e(t)}function gx(){}var fd=!1;function vx(e,t,n){if(fd)return e(t,n);fd=!0;try{return mx(e,t,n)}finally{fd=!1,(Ri!==null||Ai!==null)&&(gx(),px())}}function pa(e,t){var n=e.stateNode;if(n===null)return null;var r=Su(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var Oh=!1;if(Xn)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){Oh=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{Oh=!1}function Z_(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Yo=!1,Ec=null,kc=!1,Ih=null,eT={onError:function(e){Yo=!0,Ec=e}};function tT(e,t,n,r,s,i,o,a,l){Yo=!1,Ec=null,Z_.apply(eT,arguments)}function nT(e,t,n,r,s,i,o,a,l){if(tT.apply(this,arguments),Yo){if(Yo){var c=Ec;Yo=!1,Ec=null}else throw Error(I(198));kc||(kc=!0,Ih=c)}}function Ks(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function yx(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Hg(e){if(Ks(e)!==e)throw Error(I(188))}function rT(e){var t=e.alternate;if(!t){if(t=Ks(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Hg(s),e;if(i===r)return Hg(s),t;i=i.sibling}throw Error(I(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function wx(e){return e=rT(e),e!==null?xx(e):null}function xx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xx(e);if(t!==null)return t;e=e.sibling}return null}var bx=Lt.unstable_scheduleCallback,Kg=Lt.unstable_cancelCallback,sT=Lt.unstable_shouldYield,iT=Lt.unstable_requestPaint,Me=Lt.unstable_now,oT=Lt.unstable_getCurrentPriorityLevel,Fp=Lt.unstable_ImmediatePriority,Sx=Lt.unstable_UserBlockingPriority,Cc=Lt.unstable_NormalPriority,aT=Lt.unstable_LowPriority,Ex=Lt.unstable_IdlePriority,yu=null,On=null;function lT(e){if(On&&typeof On.onCommitFiberRoot=="function")try{On.onCommitFiberRoot(yu,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:dT,cT=Math.log,uT=Math.LN2;function dT(e){return e>>>=0,e===0?32:31-(cT(e)/uT|0)|0}var pl=64,ml=4194304;function Uo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _c(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Uo(a):(i&=o,i!==0&&(r=Uo(i)))}else o=n&~s,o!==0?r=Uo(o):i!==0&&(r=Uo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-hn(t),s=1<<n,r|=e[n],t&=~s;return r}function hT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-hn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=hT(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Lh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kx(){var e=pl;return pl<<=1,!(pl&4194240)&&(pl=64),e}function pd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ya(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=n}function pT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-hn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Vp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-hn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var fe=0;function Cx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _x,Up,Tx,Px,Rx,Dh=!1,gl=[],Dr=null,Mr=null,$r=null,ma=new Map,ga=new Map,wr=[],mT="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 qg(e,t){switch(e){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":Mr=null;break;case"mouseover":case"mouseout":$r=null;break;case"pointerover":case"pointerout":ma.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ga.delete(t.pointerId)}}function Ro(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Ja(t),t!==null&&Up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 12,981 bytes, line 37
37function gT(e,t,n,r,s){switch(t){case"focusin":return Dr=Ro(Dr,e,t,n,r,s),!0;case"dragenter":return Mr=Ro(Mr,e,t,n,r,s),!0;case"mouseover":return $r=Ro($r,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ma.set(i,Ro(ma.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ga.set(i,Ro(ga.get(i)||null,e,t,n,r,s)),!0}return!1}function Ax(e){var t=ms(e.target);if(t!==null){var n=Ks(t);if(n!==null){if(t=n.tag,t===13){if(t=yx(n),t!==null){e.blockedOn=t,Rx(e.priority,function(){Tx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ql(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);jh=r,n.target.dispatchEvent(r),jh=null}else return t=Ja(n),t!==null&&Up(t),e.blockedOn=n,!1;t.shift()}return!0}function Gg(e,t,n){Ql(e)&&n.delete(t)}function vT(){Dh=!1,Dr!==null&&Ql(Dr)&&(Dr=null),Mr!==null&&Ql(Mr)&&(Mr=null),$r!==null&&Ql($r)&&($r=null),ma.forEach(Gg),ga.forEach(Gg)}function Ao(e,t){e.blockedOn===t&&(e.blockedOn=null,Dh||(Dh=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,vT)))}function va(e){function t(s){return Ao(s,e)}if(0<gl.length){Ao(gl[0],e);for(var n=1;n<gl.length;n++){var r=gl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Dr!==null&&Ao(Dr,e),Mr!==null&&Ao(Mr,e),$r!==null&&Ao($r,e),ma.forEach(t),ga.forEach(t),n=0;n<wr.length;n++)r=wr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wr.length&&(n=wr[0],n.blockedOn===null);)Ax(n),n.blockedOn===null&&wr.shift()}var ji=sr.ReactCurrentBatchConfig,Tc=!0;function yT(e,t,n,r){var s=fe,i=ji.transition;ji.transition=null;try{fe=1,Bp(e,t,n,r)}finally{fe=s,ji.transition=i}}function wT(e,t,n,r){var s=fe,i=ji.transition;ji.transition=null;try{fe=4,Bp(e,t,n,r)}finally{fe=s,ji.transition=i}}function Bp(e,t,n,r){if(Tc){var s=Mh(e,t,n,r);if(s===null)kd(e,t,r,Pc,n),qg(e,r);else if(gT(s,e,t,n,r))r.stopPropagation();else if(qg(e,r),t&4&&-1<mT.indexOf(e)){for(;s!==null;){var i=Ja(s);if(i!==null&&_x(i),i=Mh(e,t,n,r),i===null&&kd(e,t,r,Pc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else kd(e,t,r,null,n)}}var Pc=null;function Mh(e,t,n,r){if(Pc=null,e=$p(r),e=ms(e),e!==null)if(t=Ks(e),t===null)e=null;else if(n=t.tag,n===13){if(e=yx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Pc=e,null}function jx(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(oT()){case Fp:return 1;case Sx:return 4;case Cc:case aT:return 16;case Ex:return 536870912;default:return 16}default:return 16}}var Nr=null,zp=null,Jl=null;function Nx(){if(Jl)return Jl;var e,t=zp,n=t.length,r,s="value"in Nr?Nr.value:Nr.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Jl=s.slice(e,1<r?1-r:void 0)}function Xl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vl(){return!0}function Yg(){return!1}function Mt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?vl:Yg,this.isPropagationStopped=Yg,this}return je(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=vl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vl)},persist:function(){},isPersistent:vl}),t}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=Mt(fo),Qa=je({},fo,{view:0,detail:0}),xT=Mt(Qa),md,gd,jo,wu=je({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==jo&&(jo&&e.type==="mousemove"?(md=e.screenX-jo.screenX,gd=e.screenY-jo.screenY):gd=md=0,jo=e),md)},movementY:function(e){return"movementY"in e?e.movementY:gd}}),Qg=Mt(wu),bT=je({},wu,{dataTransfer:0}),ST=Mt(bT),ET=je({},Qa,{relatedTarget:0}),vd=Mt(ET),kT=je({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),CT=Mt(kT),_T=je({},fo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),TT=Mt(_T),PT=je({},fo,{data:0}),Jg=Mt(PT),RT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AT={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"},jT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function NT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jT[e])?!!t[e]:!1}function Hp(){return NT}var OT=je({},Qa,{key:function(e){if(e.key){var t=RT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?AT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hp,charCode:function(e){return e.type==="keypress"?Xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),IT=Mt(OT),LT=je({},wu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xg=Mt(LT),DT=je({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hp}),MT=Mt(DT),$T=je({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),FT=Mt($T),VT=je({},wu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),UT=Mt(VT),BT=[9,13,27,32],Kp=Xn&&"CompositionEvent"in window,Qo=null;Xn&&"documentMode"in document&&(Qo=document.documentMode);var zT=Xn&&"TextEvent"in window&&!Qo,Ox=Xn&&(!Kp||Qo&&8<Qo&&11>=Qo),Zg=" ",ev=!1;function Ix(e,t){switch(e){case"keyup":return BT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mi=!1;function WT(e,t){switch(e){case"compositionend":return Lx(t);case"keypress":return t.which!==32?null:(ev=!0,Zg);case"textInput":return e=t.data,e===Zg&&ev?null:e;default:return null}}function HT(e,t){if(mi)return e==="compositionend"||!Kp&&Ix(e,t)?(e=Nx(),Jl=zp=Nr=null,mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ox&&t.locale!=="ko"?null:t.data;default:return null}}var KT={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 tv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!KT[e.type]:t==="textarea"}function Dx(e,t,n,r){fx(r),t=Rc(t,"onChange"),0<t.length&&(n=new Wp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jo=null,ya=null;function qT(e){qx(e,0)}function xu(e){var t=yi(e);if(ox(t))return e}function GT(e,t){if(e==="change")return t}var Mx=!1;if(Xn){var yd;if(Xn){var wd="oninput"in document;if(!wd){var nv=document.createElement("div");nv.setAttribute("oninput","return;"),wd=typeof nv.oninput=="function"}yd=wd}else yd=!1;Mx=yd&&(!document.documentMode||9<document.documentMode)}function rv(){Jo&&(Jo.detachEvent("onpropertychange",$x),ya=Jo=null)}function $x(e){if(e.propertyName==="value"&&xu(ya)){var t=[];Dx(t,ya,e,$p(e)),vx(qT,t)}}function YT(e,t,n){e==="focusin"?(rv(),Jo=t,ya=n,Jo.attachEvent("onpropertychange",$x)):e==="focusout"&&rv()}function QT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xu(ya)}function JT(e,t){if(e==="click")return xu(t)}function XT(e,t){if(e==="input"||e==="change")return xu(t)}function ZT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:ZT;function wa(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!wh.call(t,s)||!mn(e[s],t[s]))return!1}return!0}function sv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function iv(e,t){var n=sv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sv(n)}}function Fx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vx(){for(var e=window,t=Sc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sc(e.document)}return t}function qp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function eP(e){var t=Vx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Fx(n.ownerDocument.documentElement,n)){if(r!==null&&qp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=iv(n,i);var o=iv(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var tP=Xn&&"documentMode"in document&&11>=document.documentMode,gi=null,$h=null,Xo=null,Fh=!1;function ov(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fh||gi==null||gi!==Sc(r)||(r=gi,"selectionStart"in r&&qp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Xo&&wa(Xo,r)||(Xo=r,r=Rc($h,"onSelect"),0<r.length&&(t=new Wp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gi)))}function yl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vi={animationend:yl("Animation","AnimationEnd"),animationiteration:yl("Animation","AnimationIteration"),animationstart:yl("Animation","AnimationStart"),transitionend:yl("Transition","TransitionEnd")},xd={},Ux={};Xn&&(Ux=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function bu(e){if(xd[e])return xd[e];if(!vi[e])return e;var t=vi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ux)return xd[e]=t[n];return e}var Bx=bu("animationend"),zx=bu("animationiteration"),Wx=bu("animationstart"),Hx=bu("transitionend"),Kx=new Map,av="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 Jr(e,t){Kx.set(e,t),Hs(t,[e])}for(var bd=0;bd<av.length;bd++){var Sd=av[bd],nP=Sd.toLowerCase(),rP=Sd[0].toUpperCase()+Sd.slice(1);Jr(nP,"on"+rP)}Jr(Bx,"onAnimationEnd");Jr(zx,"onAnimationIteration");Jr(Wx,"onAnimationStart");Jr("dblclick","onDoubleClick");Jr("focusin","onFocus");Jr("focusout","onBlur");Jr(Hx,"onTransitionEnd");Xi("onMouseEnter",["mouseout","mouseover"]);Xi("onMouseLeave",["mouseout","mouseover"]);Xi("onPointerEnter",["pointerout","pointerover"]);Xi("onPointerLeave",["pointerout","pointerover"]);Hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bo="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(" "),sP=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bo));function lv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,nT(r,t,void 0,e),e.currentTarget=null}function qx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;lv(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;lv(s,a,c),i=l}}}if(kc)throw e=Ih,kc=!1,Ih=null,e}function xe(e,t){var n=t[Wh];n===void 0&&(n=t[Wh]=new Set);var r=e+"__bubble";n.has(r)||(Gx(t,e,2,!1),n.add(r))}function Ed(e,t,n){var r=0;t&&(r|=4),Gx(n,e,r,t)}var wl="_reactListening"+Math.random().toString(36).slice(2);function xa(e){if(!e[wl]){e[wl]=!0,tx.forEach(function(n){n!=="selectionchange"&&(sP.has(n)||Ed(n,!1,e),Ed(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wl]||(t[wl]=!0,Ed("selectionchange",!1,t))}}function Gx(e,t,n,r){switch(jx(t)){case 1:var s=yT;break;case 4:s=wT;break;default:s=Bp}n=s.bind(null,t,n,e),s=void 0,!Oh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 4,454 bytes, line 37
37function kd(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=ms(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}vx(function(){var c=i,u=$p(n),d=[];e:{var h=Kx.get(e);if(h!==void 0){var f=Wp,x=e;switch(e){case"keypress":if(Xl(n)===0)break e;case"keydown":case"keyup":f=IT;break;case"focusin":x="focus",f=vd;break;case"focusout":x="blur",f=vd;break;case"beforeblur":case"afterblur":f=vd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Qg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=ST;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=MT;break;case Bx:case zx:case Wx:f=CT;break;case Hx:f=FT;break;case"scroll":f=xT;break;case"wheel":f=UT;break;case"copy":case"cut":case"paste":f=TT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Xg}var m=(t&4)!==0,y=!m&&e==="scroll",v=m?h!==null?h+"Capture":null:h;m=[];for(var g=c,w;g!==null;){w=g;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,v!==null&&(S=pa(g,v),S!=null&&m.push(ba(g,S,w)))),y)break;g=g.return}0<m.length&&(h=new f(h,x,null,n,u),d.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==jh&&(x=n.relatedTarget||n.fromElement)&&(ms(x)||x[Zn]))break e;if((f||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,f?(x=n.relatedTarget||n.toElement,f=c,x=x?ms(x):null,x!==null&&(y=Ks(x),x!==y||x.tag!==5&&x.tag!==6)&&(x=null)):(f=null,x=c),f!==x)){if(m=Qg,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=Xg,S="onPointerLeave",v="onPointerEnter",g="pointer"),y=f==null?h:yi(f),w=x==null?h:yi(x),h=new m(S,g+"leave",f,n,u),h.target=y,h.relatedTarget=w,S=null,ms(u)===c&&(m=new m(v,g+"enter",x,n,u),m.target=w,m.relatedTarget=y,S=m),y=S,f&&x)t:{for(m=f,v=x,g=0,w=m;w;w=Xs(w))g++;for(w=0,S=v;S;S=Xs(S))w++;for(;0<g-w;)m=Xs(m),g--;for(;0<w-g;)v=Xs(v),w--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Xs(m),v=Xs(v)}m=null}else m=null;f!==null&&cv(d,h,f,m,!1),x!==null&&y!==null&&cv(d,y,x,m,!0)}}e:{if(h=c?yi(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var E=GT;else if(tv(h))if(Mx)E=XT;else{E=QT;var k=YT}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(E=JT);if(E&&(E=E(e,c))){Dx(d,E,n,u);break e}k&&k(e,h,c),e==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&_h(h,"number",h.value)}switch(k=c?yi(c):window,e){case"focusin":(tv(k)||k.contentEditable==="true")&&(gi=k,$h=c,Xo=null);break;case"focusout":Xo=$h=gi=null;break;case"mousedown":Fh=!0;break;case"contextmenu":case"mouseup":case"dragend":Fh=!1,ov(d,n,u);break;case"selectionchange":if(tP)break;case"keydown":case"keyup":ov(d,n,u)}var C;if(Kp)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else mi?Ix(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Ox&&n.locale!=="ko"&&(mi||T!=="onCompositionStart"?T==="onCompositionEnd"&&mi&&(C=Nx()):(Nr=u,zp="value"in Nr?Nr.value:Nr.textContent,mi=!0)),k=Rc(c,T),0<k.length&&(T=new Jg(T,e,null,n,u),d.push({event:T,listeners:k}),C?T.data=C:(C=Lx(n),C!==null&&(T.data=C)))),(C=zT?WT(e,n):HT(e,n))&&(c=Rc(c,"onBeforeInput"),0<c.length&&(u=new Jg("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}qx(d,t)})}function ba(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=pa(e,n),i!=null&&r.unshift(ba(e,i,s)),i=pa(e,t),i!=null&&r.push(ba(e,i,s))),e=e.return}return r}function Xs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}
vendor: 5,804 bytes, lines 37-38
37function cv(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=pa(n,i),l!=null&&o.unshift(ba(n,l,a))):s||(l=pa(n,i),l!=null&&o.push(ba(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var iP=/\r\n?/g,oP=/\u0000|\uFFFD/g;function uv(e){return(typeof e=="string"?e:""+e).replace(iP,`
38`).replace(oP,"")}function xl(e,t,n){if(t=uv(t),uv(e)!==t&&n)throw Error(I(425))}function Ac(){}var Vh=null,Uh=null;function Bh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zh=typeof setTimeout=="function"?setTimeout:void 0,aP=typeof clearTimeout=="function"?clearTimeout:void 0,dv=typeof Promise=="function"?Promise:void 0,lP=typeof queueMicrotask=="function"?queueMicrotask:typeof dv<"u"?function(e){return dv.resolve(null).then(e).catch(cP)}:zh;function cP(e){setTimeout(function(){throw e})}function Cd(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),va(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);va(t)}function Fr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),jn="__reactFiber$"+po,Sa="__reactProps$"+po,Zn="__reactContainer$"+po,Wh="__reactEvents$"+po,uP="__reactListeners$"+po,dP="__reactHandles$"+po;function ms(e){var t=e[jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hv(e);e!==null;){if(n=e[jn])return n;e=hv(e)}return t}e=n,n=e.parentNode}return null}function Ja(e){return e=e[jn]||e[Zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function Su(e){return e[Sa]||null}var Hh=[],wi=-1;function Xr(e){return{current:e}}function Se(e){0>wi||(e.current=Hh[wi],Hh[wi]=null,wi--)}function ve(e,t){wi++,Hh[wi]=e.current,e.current=t}var Kr={},ot=Xr(Kr),St=Xr(!1),Ls=Kr;function Zi(e,t){var n=e.type.contextTypes;if(!n)return Kr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Et(e){return e=e.childContextTypes,e!=null}function jc(){Se(St),Se(ot)}function fv(e,t,n){if(ot.current!==Kr)throw Error(I(168));ve(ot,t),ve(St,n)}function Yx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(I(108,Y_(e)||"Unknown",s));return je({},n,r)}function Nc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kr,Ls=ot.current,ve(ot,e),ve(St,St.current),!0}function pv(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Yx(e,t,Ls),r.__reactInternalMemoizedMergedChildContext=e,Se(St),Se(ot),ve(ot,e)):Se(St),ve(St,n)}var Kn=null,Eu=!1,_d=!1;function Qx(e){Kn===null?Kn=[e]:Kn.push(e)}function hP(e){Eu=!0,Qx(e)}function Zr(){if(!_d&&Kn!==null){_d=!0;var e=0,t=fe;try{var n=Kn;for(fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kn=null,Eu=!1}catch(s){throw Kn!==null&&(Kn=Kn.slice(e+1)),bx(Fp,Zr),s}finally{fe=t,_d=!1}}return null}var xi=[],bi=0,Oc=null,Ic=0,Bt=[],zt=0,Ds=null,Yn=1,Qn="";function us(e,t){xi[bi++]=Ic,xi[bi++]=Oc,Oc=e,Ic=t}function Jx(e,t,n){Bt[zt++]=Yn,Bt[zt++]=Qn,Bt[zt++]=Ds,Ds=e;var r=Yn;e=Qn;var s=32-hn(r)-1;r&=~(1<<s),n+=1;var i=32-hn(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Yn=1<<32-hn(t)+s|n<<s|r,Qn=i+e}else Yn=1<<i|n<<s|r,Qn=e}function Gp(e){e.return!==null&&(us(e,1),Jx(e,1,0))}function Yp(e){for(;e===Oc;)Oc=xi[--bi],xi[bi]=null,Ic=xi[--bi],xi[bi]=null;for(;e===Ds;)Ds=Bt[--zt],Bt[zt]=null,Qn=Bt[--zt],Bt[zt]=null,Yn=Bt[--zt],Bt[zt]=null}var Ot=null,Nt=null,Ce=!1,dn=null;function Xx(e,t){var n=Wt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ot=e,Nt=Fr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ot=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ds!==null?{id:Yn,overflow:Qn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Wt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ot=e,Nt=null,!0):!1;default:return!1}}function Kh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qh(e){if(Ce){var t=Nt;if(t){var n=t;if(!mv(e,t)){if(Kh(e))throw Error(I(418));t=Fr(n.nextSibling);var r=Ot;t&&mv(e,t)?Xx(r,n):(e.flags=e.flags&-4097|2,Ce=!1,Ot=e)}}else{if(Kh(e))throw Error(I(418));e.flags=e.flags&-4097|2,Ce=!1,Ot=e}}}function gv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ot=e}function bl(e){if(e!==Ot)return!1;if(!Ce)return gv(e),Ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bh(e.type,e.memoizedProps)),t&&(t=Nt)){if(Kh(e))throw Zx(),Error(I(418));for(;t;)Xx(e,t),t=Fr(t.nextSibling)}if(gv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317)
vendor: 22,620 bytes, lines 38-40
38);e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Fr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ot?Fr(e.stateNode.nextSibling):null;return!0}function Zx(){for(var e=Nt;e;)e=Fr(e.nextSibling)}function eo(){Nt=Ot=null,Ce=!1}function Qp(e){dn===null?dn=[e]:dn.push(e)}var fP=sr.ReactCurrentBatchConfig;function No(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function Sl(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vv(e){var t=e._init;return t(e._payload)}function eb(e){function t(v,g){if(e){var w=v.deletions;w===null?(v.deletions=[g],v.flags|=16):w.push(g)}}function n(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=zr(v,g),v.index=0,v.sibling=null,v}function i(v,g,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<g?(v.flags|=2,g):w):(v.flags|=2,g)):(v.flags|=1048576,g)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,w,S){return g===null||g.tag!==6?(g=Od(w,v.mode,S),g.return=v,g):(g=s(g,w),g.return=v,g)}function l(v,g,w,S){var E=w.type;return E===pi?u(v,g,w.props.children,S,w.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===vr&&vv(E)===g.type)?(S=s(g,w.props),S.ref=No(v,g,w),S.return=v,S):(S=ic(w.type,w.key,w.props,null,v.mode,S),S.ref=No(v,g,w),S.return=v,S)}function c(v,g,w,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=Id(w,v.mode,S),g.return=v,g):(g=s(g,w.children||[]),g.return=v,g)}function u(v,g,w,S,E){return g===null||g.tag!==7?(g=Ns(w,v.mode,S,E),g.return=v,g):(g=s(g,w),g.return=v,g)}function d(v,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Od(""+g,v.mode,w),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case dl:return w=ic(g.type,g.key,g.props,null,v.mode,w),w.ref=No(v,null,g),w.return=v,w;case fi:return g=Id(g,v.mode,w),g.return=v,g;case vr:var S=g._init;return d(v,S(g._payload),w)}if(Vo(g)||To(g))return g=Ns(g,v.mode,w,null),g.return=v,g;Sl(v,g)}return null}function h(v,g,w,S){var E=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:a(v,g,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case dl:return w.key===E?l(v,g,w,S):null;case fi:return w.key===E?c(v,g,w,S):null;case vr:return E=w._init,h(v,g,E(w._payload),S)}if(Vo(w)||To(w))return E!==null?null:u(v,g,w,S,null);Sl(v,w)}return null}function f(v,g,w,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(w)||null,a(g,v,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case dl:return v=v.get(S.key===null?w:S.key)||null,l(g,v,S,E);case fi:return v=v.get(S.key===null?w:S.key)||null,c(g,v,S,E);case vr:var k=S._init;return f(v,g,w,k(S._payload),E)}if(Vo(S)||To(S))return v=v.get(w)||null,u(g,v,S,E,null);Sl(g,S)}return null}function x(v,g,w,S){for(var E=null,k=null,C=g,T=g=0,A=null;C!==null&&T<w.length;T++){C.index>T?(A=C,C=null):A=C.sibling;var P=h(v,C,w[T],S);if(P===null){C===null&&(C=A);break}e&&C&&P.alternate===null&&t(v,C),g=i(P,g,T),k===null?E=P:k.sibling=P,k=P,C=A}if(T===w.length)return n(v,C),Ce&&us(v,T),E;if(C===null){for(;T<w.length;T++)C=d(v,w[T],S),C!==null&&(g=i(C,g,T),k===null?E=C:k.sibling=C,k=C);return Ce&&us(v,T),E}for(C=r(v,C);T<w.length;T++)A=f(C,v,T,w[T],S),A!==null&&(e&&A.alternate!==null&&C.delete(A.key===null?T:A.key),g=i(A,g,T),k===null?E=A:k.sibling=A,k=A);return e&&C.forEach(function(L){return t(v,L)}),Ce&&us(v,T),E}function m(v,g,w,S){var E=To(w);if(typeof E!="function")throw Error(I(150));if(w=E.call(w),w==null)throw Error(I(151));for(var k=E=null,C=g,T=g=0,A=null,P=w.next();C!==null&&!P.done;T++,P=w.next()){C.index>T?(A=C,C=null):A=C.sibling;var L=h(v,C,P.value,S);if(L===null){C===null&&(C=A);break}e&&C&&L.alternate===null&&t(v,C),g=i(L,g,T),k===null?E=L:k.sibling=L,k=L,C=A}if(P.done)return n(v,C),Ce&&us(v,T),E;if(C===null){for(;!P.done;T++,P=w.next())P=d(v,P.value,S),P!==null&&(g=i(P,g,T),k===null?E=P:k.sibling=P,k=P);return Ce&&us(v,T),E}for(C=r(v,C);!P.done;T++,P=w.next())P=f(C,v,T,P.value,S),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?T:P.key),g=i(P,g,T),k===null?E=P:k.sibling=P,k=P);return e&&C.forEach(function(N){return t(v,N)}),Ce&&us(v,T),E}function y(v,g,w,S){if(typeof w=="object"&&w!==null&&w.type===pi&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case dl:e:{for(var E=w.key,k=g;k!==null;){if(k.key===E){if(E=w.type,E===pi){if(k.tag===7){n(v,k.sibling),g=s(k,w.props.children),g.return=v,v=g;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===vr&&vv(E)===k.type){n(v,k.sibling),g=s(k,w.props),g.ref=No(v,k,w),g.return=v,v=g;break e}n(v,k);break}else t(v,k);k=k.sibling}w.type===pi?(g=Ns(w.props.children,v.mode,S,w.key),g.return=v,v=g):(S=ic(w.type,w.key,w.props,null,v.mode,S),S.ref=No(v,g,w),S.return=v,v=S)}return o(v);case fi:e:{for(k=w.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(v,g.sibling),g=s(g,w.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=Id(w,v.mode,S),g.return=v,v=g}return o(v);case vr:return k=w._init,y(v,g,k(w._payload),S)}if(Vo(w))return x(v,g,w,S);if(To(w))return m(v,g,w,S);Sl(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(v,g.sibling),g=s(g,w),g.return=v,v=g):(n(v,g),g=Od(w,v.mode,S),g.return=v,v=g),o(v)):n(v,g)}return y}var to=eb(!0),tb=eb(!1),Lc=Xr(null),Dc=null,Si=null,Jp=null;function Xp(){Jp=Si=Dc=null}function Zp(e){var t=Lc.current;Se(Lc),e._currentValue=t}function Gh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ni(e,t){Dc=e,Jp=Si=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(bt=!0),e.firstContext=null)}function Gt(e){var t=e._currentValue;if(Jp!==e)if(e={context:e,memoizedValue:t,next:null},Si===null){if(Dc===null)throw Error(I(308));Si=e,Dc.dependencies={lanes:0,firstContext:e}}else Si=Si.next=e;return t}var gs=null;function em(e){gs===null?gs=[e]:gs.push(e)}function nb(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,em(t)):(n.next=s.next,s.next=n),t.interleaved=n,er(e,r)}function er(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var yr=!1;function tm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rb(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Jn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,er(e,n)}return s=r.interleaved,s===null?(t.next=t,em(r)):(t.next=s.next,s.next=t),r.interleaved=t,er(e,n)}function Zl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vp(e,n)}}function yv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Mc(e,t,n,r){var s=e.updateQueue;yr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var h=a.lane,f=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,m=a;switch(h=t,f=n,m.tag){case 1:if(x=m.payload,typeof x=="function"){d=x.call(f,d,h);break e}d=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=m.payload,h=typeof x=="function"?x.call(f,d,h):x,h==null)break e;d=je({},d,h);break e;case 2:yr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);$s|=o,e.lanes=o,e.memoizedState=d}}function wv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(I(191,s));s.call(r)}}}var Xa={},In=Xr(Xa),Ea=Xr(Xa),ka=Xr(Xa);function vs(e){if(e===Xa)throw Error(I(174));return e}function nm(e,t){switch(ve(ka,t),ve(Ea,e),ve(In,Xa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ph(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ph(t,e)}Se(In),ve(In,t)}function no(){Se(In),Se(Ea),Se(ka)}function sb(e){vs(ka.current);var t=vs(In.current),n=Ph(t,e.type);t!==n&&(ve(Ea,e),ve(In,n))}function rm(e){Ea.current===e&&(Se(In),Se(Ea))}var Re=Xr(0);function $c(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Td=[];function sm(){for(var e=0;e<Td.length;e++)Td[e]._workInProgressVersionPrimary=null;Td.length=0}var ec=sr.ReactCurrentDispatcher,Pd=sr.ReactCurrentBatchConfig,Ms=0,Ae=null,Be=null,We=null,Fc=!1,Zo=!1,Ca=0,pP=0;function nt(){throw Error(I(321))}function im(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function om(e,t,n,r,s,i){if(Ms=i,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ec.current=e===null||e.memoizedState===null?yP:wP,e=n(r,s),Zo){i=0;do{if(Zo=!1,Ca=0,25<=i)throw Error(I(301));i+=1,We=Be=null,t.updateQueue=null,ec.current=xP,e=n(r,s)}while(Zo)}if(ec.current=Vc,t=Be!==null&&Be.next!==null,Ms=0,We=Be=Ae=null,Fc=!1,t)throw Error(I(300));return e}function am(){var e=Ca!==0;return Ca=0,e}function Sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Ae.memoizedState=We=e:We=We.next=e,We}function Yt(){if(Be===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=We===null?Ae.memoizedState:We.next;if(t!==null)We=t,Be=e;else{if(e===null)throw Error(I(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},We===null?Ae.memoizedState=We=e:We=We.next=e}return We}function _a(e,t){return typeof t=="function"?t(e):t}function Rd(e){var t=Yt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Be,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Ms&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ae.lanes|=u,$s|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,mn(r,t.memoizedState)||(bt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Ae.lanes|=i,$s|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ad(e){var t=Yt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);mn(i,t.memoizedState)||(bt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ib(){}function ob(e,t){var n=Ae,r=Yt(),s=t(),i=!mn(r.memoizedState,s);if(i&&(r.memoizedState=s,bt=!0),r=r.queue,lm(cb.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||We!==null&&We.memoizedState.tag&1){if(n.flags|=2048,Ta(9,lb.bind(null,n,r,s,t),void 0,null),He===null)throw Error(I(349));Ms&30||ab(n,t,s)}return s}function ab(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lb(e,t,n,r){t.value=n,t.getSnapshot=r,ub(t)&&db(e)}function cb(e,t,n){return n(function(){ub(t)&&db(e)})}function ub(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function db(e){var t=er(e,1);t!==null&&fn(t,e,1,-1)}function xv(e){var t=Sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t.queue=e,e=e.dispatch=vP.bind(null,Ae,e),[t.memoizedState,e]}function Ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null,stores:null},Ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function hb(){return Yt().memoizedState}function tc(e,t,n,r){var s=Sn();Ae.flags|=e,s.memoizedState=Ta(1|t,n,void 0,r===void 0?null:r)}function ku(e,t,n,r){var s=Yt();r=r===void 0?null:r;var i=void 0;if(Be!==null){var o=Be.memoizedState;if(i=o.destroy,r!==null&&im(r,o.deps)){s.memoizedState=Ta(t,n,i,r);return}}Ae.flags|=e,s.memoizedState=Ta(1|t,n,i,r)}function bv(e,t){return tc(8390656,8,e,t)}function lm(e,t){return ku(2048,8,e,t)}function fb(e,t){return ku(4,2,e,t)}function pb(e,t){return ku(4,4,e,t)}function mb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gb(e,t,n){return n=n!=null?n.concat([e]):null,ku(4,4,mb.bind(null,t,e),n)}function cm(){}function vb(e,t){var n=Yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&im(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function yb(e,t){var n=Yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&im(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wb(e,t,n){return Ms&21?(mn(n,t)||(n=kx(),Ae.lanes|=n,$s|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bt=!0),e.memoizedState=n)}function mP(e,t){var n=fe;fe=n!==0&&4>n?n:4,e(!0);var r=Pd.transition;Pd.transition={};try{e(!1),t()}finally{fe=n,Pd.transition=r}}function xb(){return Yt().memoizedState}function gP(e,t,n){var r=Br(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bb(e))Sb(t,n);else if(n=nb(e,t,n,r),n!==null){var s=ht();fn(n,e,r,s),Eb(n,t,r)}}function vP(e,t,n){var r=Br(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bb(e))Sb(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,mn(a,o)){var l=t.interleaved;l===null?(s.next=s,em(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=nb(e,t,s,r),n!==null&&(s=ht(),fn(n,e,r,s),Eb(n,t,r))}}function bb(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Sb(e,t){Zo=Fc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Eb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vp(e,n)}}var Vc={readContext:Gt,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useInsertionEffect:nt,useLayoutEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useMutableSource:nt,useSyncExternalStore:nt,useId:nt,unstable_isNewReconciler:!1},yP={readContext:Gt,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:bv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tc(4194308,4,mb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){return tc(4,2,e,t)},useMemo:function(e,t){var n=Sn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gP.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:xv,useDebugValue:cm,useDeferredValue:function(e){return Sn().memoizedState=e},useTransition:function(){var e=xv(!1),t=e[0];return e=mP.bind(null,e[1]),Sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ae,s=Sn();if(Ce){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),He===null)throw Error(I(349));Ms&30||ab(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,bv(cb.bind(null,r,i,e),[e]),r.flags|=2048,Ta(9,lb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Sn(),t=He.identifierPrefix;if(Ce){var n=Qn,r=Yn;n=(r&~(1<<32-hn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ca++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wP={readContext:Gt,useCallback:vb,useContext:Gt,useEffect:lm,useImperativeHandle:gb,useInsertionEffect:fb,useLayoutEffect:pb,useMemo:yb,useReducer:Rd,useRef:hb,useState:function(){return Rd(_a)},useDebugValue:cm,useDeferredValue:function(e){var t=Yt();return wb(t,Be.memoizedState,e)},useTransition:function(){var e=Rd(_a)[0],t=Yt().memoizedState;return[e,t]},useMutableSource:ib,useSyncExternalStore:ob,useId:xb,unstable_isNewReconciler:!1},xP={readContext:Gt,useCallback:vb,useContext:Gt,useEffect:lm,useImperativeHandle:gb,useInsertionEffect:fb,useLayoutEffect:pb,useMemo:yb,useReducer:Ad,useRef:hb,useState:function(){return Ad(_a)},useDebugValue:cm,useDeferredValue:function(e){var t=Yt();return Be===null?t.memoizedState=e:wb(t,Be.memoizedState,e)},useTransition:function(){var e=Ad(_a)[0],t=Yt().memoizedState;return[e,t]},useMutableSource:ib,useSyncExternalStore:ob,useId:xb,unstable_isNewReconciler:!1};function on(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cu={isMounted:function(e){return(e=e._reactInternals)?Ks(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ht(),s=Br(e),i=Jn(r,s);i.payload=t,n!=null&&(i.callback=n),t=Vr(e,i,s),t!==null&&(fn(t,e,s,r),Zl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ht(),s=Br(e),i=Jn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Vr(e,i,s),t!==null&&(fn(t,e,s,r),Zl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ht(),r=Br(e),s=Jn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Vr(e,s,r),t!==null&&(fn(t,e,r,n),Zl(t,e,r))}};function Sv(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!wa(n,r)||!wa(s,i):!0}function kb(e,t,n){var r=!1,s=Kr,i=t.contextType;return typeof i=="object"&&i!==null?i=Gt(i):(s=Et(t)?Ls:ot.current,r=t.contextTypes,i=(r=r!=null)?Zi(e,s):Kr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Cu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ev(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Cu.enqueueReplaceState(t,t.state,null)}function Qh(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},tm(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Gt(i):(i=Et(t)?Ls:ot.current,s.context=Zi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Yh(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Cu.enqueueReplaceState(s,s.state,null),Mc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ro(e,t){try{var n="",r=t;do n+=G_(r),r=r.return;while(r);var s=n}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}
vendor: 11,185 bytes, line 40
40function jd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Jh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var bP=typeof WeakMap=="function"?WeakMap:Map;function Cb(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Bc||(Bc=!0,lf=r),Jh(e,t)},n}function _b(e,t,n){n=Jn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Jh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Jh(e,t),typeof r!="function"&&(Ur===null?Ur=new Set([this]):Ur.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function kv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new bP;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=LP.bind(null,e,t,n),t.then(e,e))}function Cv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function _v(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Jn(-1,1),t.tag=2,Vr(n,t,1))),n.lanes|=1),e)}var SP=sr.ReactCurrentOwner,bt=!1;function ct(e,t,n,r){t.child=e===null?tb(t,null,n,r):to(t,e.child,n,r)}function Tv(e,t,n,r,s){n=n.render;var i=t.ref;return Ni(t,s),r=om(e,t,n,r,i,s),n=am(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,tr(e,t,s)):(Ce&&n&&Gp(t),t.flags|=1,ct(e,t,r,s),t.child)}function Pv(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!vm(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Tb(e,t,i,r,s)):(e=ic(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:wa,n(o,r)&&e.ref===t.ref)return tr(e,t,s)}return t.flags|=1,e=zr(i,r),e.ref=t.ref,e.return=t,t.child=e}function Tb(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(wa(i,r)&&e.ref===t.ref)if(bt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(bt=!0);else return t.lanes=e.lanes,tr(e,t,s)}return Xh(e,t,n,r,s)}function Pb(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(ki,Pt),Pt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(ki,Pt),Pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ve(ki,Pt),Pt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ve(ki,Pt),Pt|=r;return ct(e,t,s,n),t.child}function Rb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xh(e,t,n,r,s){var i=Et(n)?Ls:ot.current;return i=Zi(t,i),Ni(t,s),n=om(e,t,n,r,i,s),r=am(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,tr(e,t,s)):(Ce&&r&&Gp(t),t.flags|=1,ct(e,t,n,s),t.child)}function Rv(e,t,n,r,s){if(Et(n)){var i=!0;Nc(t)}else i=!1;if(Ni(t,s),t.stateNode===null)nc(e,t),kb(t,n,r),Qh(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Gt(c):(c=Et(n)?Ls:ot.current,c=Zi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Ev(t,o,r,c),yr=!1;var h=t.memoizedState;o.state=h,Mc(t,r,o,s),l=t.memoizedState,a!==r||h!==l||St.current||yr?(typeof u=="function"&&(Yh(t,n,u,r),l=t.memoizedState),(a=yr||Sv(t,n,a,r,h,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,rb(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:on(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Gt(l):(l=Et(n)?Ls:ot.current,l=Zi(t,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Ev(t,o,r,l),yr=!1,h=t.memoizedState,o.state=h,Mc(t,r,o,s);var x=t.memoizedState;a!==d||h!==x||St.current||yr?(typeof f=="function"&&(Yh(t,n,f,r),x=t.memoizedState),(c=yr||Sv(t,n,c,r,h,x,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,x,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,x,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),o.props=r,o.state=x,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Zh(e,t,n,r,i,s)}function Zh(e,t,n,r,s,i){Rb(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&pv(t,n,!1),tr(e,t,i);r=t.stateNode,SP.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=to(t,e.child,null,i),t.child=to(t,null,a,i)):ct(e,t,a,i),t.memoizedState=r.state,s&&pv(t,n,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?fv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fv(e,t.context,!1),nm(e,t.containerInfo)}function Av(e,t,n,r,s){return eo(),Qp(s),t.flags|=256,ct(e,t,n,r),t.child}var ef={dehydrated:null,treeContext:null,retryLane:0};function tf(e){return{baseLanes:e,cachePool:null,transitions:null}}function jb(e,t,n){var r=t.pendingProps,s=Re.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ve(Re,s&1),e===null)return qh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Pu(o,r,0,null),e=Ns(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=tf(n),t.memoizedState=ef,e):um(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return EP(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=zr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=zr(a,i):(i=Ns(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?tf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=ef,r}return i=e.child,e=i.sibling,r=zr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function um(e,t){return t=Pu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function El(e,t,n,r){return r!==null&&Qp(r),to(t,e.child,null,n),e=um(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EP(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=jd(Error(I(422))),El(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Pu({mode:"visible",children:r.children},s,0,null),i=Ns(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&to(t,e.child,null,o),t.child.memoizedState=tf(o),t.memoizedState=ef,i);if(!(t.mode&1))return El(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(I(419)),r=jd(i,r,void 0),El(e,t,o,r)}if(a=(o&e.childLanes)!==0,bt||a){if(r=He,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,er(e,s),fn(r,e,s,-1))}return gm(),r=jd(Error(I(421))),El(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=DP.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Nt=Fr(s.nextSibling),Ot=t,Ce=!0,dn=null,e!==null&&(Bt[zt++]=Yn,Bt[zt++]=Qn,Bt[zt++]=Ds,Yn=e.id,Qn=e.overflow,Ds=t),t=um(t,r.children),t.flags|=4096,t)}function jv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gh(e.return,t,n)}function Nd(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Nb(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ct(e,t,r.children,n),r=Re.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jv(e,n,t);else if(e.tag===19)jv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ve(Re,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&$c(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Nd(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&$c(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Nd(t,!0,n,null,i);break;case"together":Nd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function nc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$s|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));
vendor: 3,860 bytes, line 40
40if(t.child!==null){for(e=t.child,n=zr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kP(e,t,n){switch(t.tag){case 3:Ab(t),eo();break;case 5:sb(t);break;case 1:Et(t.type)&&Nc(t);break;case 4:nm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ve(Lc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ve(Re,Re.current&1),t.flags|=128,null):n&t.child.childLanes?jb(e,t,n):(ve(Re,Re.current&1),e=tr(e,t,n),e!==null?e.sibling:null);ve(Re,Re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Nb(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ve(Re,Re.current),r)break;return null;case 22:case 23:return t.lanes=0,Pb(e,t,n)}return tr(e,t,n)}var Ob,nf,Ib,Lb;Ob=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};nf=function(){};Ib=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,vs(In.current);var i=null;switch(n){case"input":s=kh(e,s),r=kh(e,r),i=[];break;case"select":s=je({},s,{value:void 0}),r=je({},r,{value:void 0}),i=[];break;case"textarea":s=Th(e,s),r=Th(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ac)}Rh(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ha.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ha.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&xe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Lb=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oo(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function CP(e,t,n){var r=t.pendingProps;switch(Yp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return Et(t.type)&&jc(),rt(t),null;case 3:return r=t.stateNode,no(),Se(St),Se(ot),sm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(bl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(df
vendor: 13,109 bytes, line 40
40(dn),dn=null))),nf(e,t),rt(t),null;case 5:rm(t);var s=vs(ka.current);if(n=t.type,e!==null&&t.stateNode!=null)Ib(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return rt(t),null}if(e=vs(In.current),bl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[jn]=t,r[Sa]=i,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<Bo.length;s++)xe(Bo[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Vg(r,i),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xe("invalid",r);break;case"textarea":Bg(r,i),xe("invalid",r)}Rh(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&xl(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&xl(r.textContent,a,e),s=["children",""+a]):ha.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&xe("scroll",r)}switch(n){case"input":hl(r),Ug(r,i,!0);break;case"textarea":hl(r),zg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ac)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[jn]=t,e[Sa]=r,Ob(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ah(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<Bo.length;s++)xe(Bo[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":Vg(e,r),s=kh(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=je({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Bg(e,r),s=Th(e,r),xe("invalid",e);break;default:s=r}Rh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?hx(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ux(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&fa(e,l):typeof l=="number"&&fa(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ha.hasOwnProperty(i)?l!=null&&i==="onScroll"&&xe("scroll",e):l!=null&&Ip(e,i,l,o))}switch(n){case"input":hl(e),Ug(e,r,!1);break;case"textarea":hl(e),zg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Hr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Pi(e,!!r.multiple,i,!1):r.defaultValue!=null&&Pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ac)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return rt(t),null;case 6:if(e&&t.stateNode!=null)Lb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=vs(ka.current),vs(In.current),bl(t)){if(r=t.stateNode,n=t.memoizedProps,r[jn]=t,(i=r.nodeValue!==n)&&(e=Ot,e!==null))switch(e.tag){case 3:xl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xl(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jn]=t,t.stateNode=r}return rt(t),null;case 13:if(Se(Re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ce&&Nt!==null&&t.mode&1&&!(t.flags&128))Zx(),eo(),t.flags|=98560,i=!1;else if(i=bl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(I(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(I(317));i[jn]=t}else eo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;rt(t),i=!1}else dn!==null&&(df(dn),dn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Re.current&1?ze===0&&(ze=3):gm())),t.updateQueue!==null&&(t.flags|=4),rt(t),null);case 4:return no(),nf(e,t),e===null&&xa(t.stateNode.containerInfo),rt(t),null;case 10:return Zp(t.type._context),rt(t),null;case 17:return Et(t.type)&&jc(),rt(t),null;case 19:if(Se(Re),i=t.memoizedState,i===null)return rt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Oo(i,!1);else{if(ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$c(e),o!==null){for(t.flags|=128,Oo(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ve(Re,Re.current&1|2),t.child}e=e.sibling}i.tail!==null&&Me()>so&&(t.flags|=128,r=!0,Oo(i,!1),t.lanes=4194304)}else{if(!r)if(e=$c(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ce)return rt(t),null}else 2*Me()-i.renderingStartTime>so&&n!==1073741824&&(t.flags|=128,r=!0,Oo(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=Re.current,ve(Re,r?n&1|2:n&1),t):(rt(t),null);case 22:case 23:return mm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pt&1073741824&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function _P(e,t){switch(Yp(t),t.tag){case 1:return Et(t.type)&&jc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return no(),Se(St),Se(ot),sm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rm(t),null;case 13:if(Se(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));eo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Re),null;case 4:return no(),null;case 10:return Zp(t.type._context),null;case 22:case 23:return mm(),null;case 24:return null;default:return null}}var kl=!1,it=!1,TP=typeof WeakSet=="function"?WeakSet:Set,V=null;function Ei(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(e,t,r)}else n.current=null}function rf(e,t,n){try{n()}catch(r){De(e,t,r)}}var Nv=!1;function PP(e,t){if(Vh=Tc,e=Vx(),qp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++u===r&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uh={focusedElem:e,selectionRange:n},Tc=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var m=x.memoizedProps,y=x.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:on(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(S){De(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return x=Nv,Nv=!1,x}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&rf(t,n,i)}s=s.next}while(s!==r)}}function _u(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function sf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Db(e){var t=e.alternate;t!==null&&(e.alternate=null,Db(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[Sa],delete t[Wh],delete t[uP],delete t[dP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mb(e){return e.tag===5||e.tag===3||e.tag===4}function Ov(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ac));else if(r!==4&&(e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function af(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(af(e,t,n),e=e.sibling;e!==null;)af(e,t,n),e=e.sibling}var Ge=null,un=!1;function ur(e,t,n){for(n=n.child;n!==null;)$b(e,t,n),n=n.sibling}function $b(e,t,n){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(yu,n)}catch{}switch(n.tag){case 5:it||Ei(n,t);case 6:var r=Ge,s=un;Ge=null,ur(e,t,n),Ge=r,un=s,Ge!==null&&(un?(e=Ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&(un?(e=Ge,n=n.stateNode,e.nodeType===8?Cd(e.parentNode,n):e.nodeType===1&&Cd(e,n),va(e)):Cd(Ge,n.stateNode));break;case 4:r=Ge,s=un,Ge=n.stateNode.containerInfo,un=!0,ur(e,t,n),Ge=r,un=s;break;case 0:case 11:case 14:case 15:if(!it&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&rf(n,t,o),s=s.next}while(s!==r)}ur(e,t,n);break;case 1:if(!it&&(Ei(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,t,a)}ur(e,t,n);break;case 21:ur(e,t,n);break;case 22:n.mode&1?(it=(r=it)||n.memoizedState!==null,ur(e,t,n),it=r):ur(e,t,n);break;default:ur(e,t,n)}}function Iv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new TP),t.forEach(function(r){var s=MP.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Zt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ge=a.stateNode,un=!1;break e;case 3:Ge=a.stateNode.containerInfo,un=!0;break e;case 4:Ge=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(Ge===null)throw Error(I(160));$b(i,o,s),Ge=null,un=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){De(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Fb(t,e),t=t.sibling}function Fb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zt(t,e),xn(e),r&4){try{ea(3,e,e.return),_u(3,e)}catch(m){De(e,e.return,m)}try{ea(5,e,e.return)}catch(m){De(e,e.return,m)}}break;case 1:Zt(t,e),xn(e),r&512&&n!==null&&Ei(n,n.return);break;case 5:if(Zt(t,e),xn(e),r&512&&n!==null&&Ei(n,n.return),e.flags&32){var s=e.stateNode;try{fa(s,"")}catch(m){De(e,e.return,m)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&ax(s,i),Ah(a,o);var c=Ah(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];
vendor: 5,999 bytes, line 40
40u==="style"?hx(s,d):u==="dangerouslySetInnerHTML"?ux(s,d):u==="children"?fa(s,d):Ip(s,u,d,c)}switch(a){case"input":Ch(s,i);break;case"textarea":lx(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Pi(s,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?Pi(s,!!i.multiple,i.defaultValue,!0):Pi(s,!!i.multiple,i.multiple?[]:"",!1))}s[Sa]=i}catch(m){De(e,e.return,m)}}break;case 6:if(Zt(t,e),xn(e),r&4){if(e.stateNode===null)throw Error(I(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){De(e,e.return,m)}}break;case 3:if(Zt(t,e),xn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{va(t.containerInfo)}catch(m){De(e,e.return,m)}break;case 4:Zt(t,e),xn(e);break;case 13:Zt(t,e),xn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(fm=Me())),r&4&&Iv(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(it=(c=it)||u,Zt(t,e),it=c):Zt(t,e),xn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(V=e,u=e.child;u!==null;){for(d=V=u;V!==null;){switch(h=V,f=h.child,h.tag){case 0:case 11:case 14:case 15:ea(4,h,h.return);break;case 1:Ei(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(m){De(r,n,m)}}break;case 5:Ei(h,h.return);break;case 22:if(h.memoizedState!==null){Dv(d);continue}}f!==null?(f.return=h,V=f):Dv(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=dx("display",o))}catch(m){De(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){De(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Zt(t,e),xn(e),r&4&&Iv(e);break;case 21:break;default:Zt(t,e),xn(e)}}function xn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Mb(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(fa(s,""),r.flags&=-33);var i=Ov(e);af(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ov(e);of(e,a,o);break;default:throw Error(I(161))}}catch(l){De(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function RP(e,t,n){V=e,Vb(e)}function Vb(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var s=V,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||kl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||it;a=kl;var c=it;if(kl=o,(it=l)&&!c)for(V=s;V!==null;)o=V,l=o.child,o.tag===22&&o.memoizedState!==null?Mv(s):l!==null?(l.return=o,V=l):Mv(s);for(;i!==null;)V=i,Vb(i),i=i.sibling;V=s,kl=a,it=c}Lv(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,V=i):Lv(e)}}function Lv(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:it||_u(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!it)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:on(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&wv(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}wv(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&va(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}it||t.flags&512&&sf(t)}catch(h){De(t,t.return,h)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function Dv(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Mv(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{_u(4,t)}catch(l){De(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){De(t,s,l)}}var i=t.return;try{sf(t)}catch(l){De(t,i,l)}break;case 5:var o=t.return;try{sf(t)}catch(l){De(t,o,l)}}}catch(l){De(t,t.return,l)}if(t===e){V=null;break}var a=t.sibling;if(a!==null){a.return=t.return,V=a;break}V=t.return}}var AP=Math.ceil,Uc=sr.ReactCurrentDispatcher,dm=sr.ReactCurrentOwner,Kt=sr.ReactCurrentBatchConfig,le=0,He=null,Ve=null,Xe=0,Pt=0,ki=Xr(0),ze=0,Pa=null,$s=0,Tu=0,hm=0,ta=null,xt=null,fm=0,so=1/0,zn=null,Bc=!1,lf=null,Ur=null,Cl=!1,Or=null,zc=0,na=0,cf=null,rc=-1,sc=0;function ht(){return le&6?Me():rc!==-1?rc:rc=Me()}function Br(e){return e.mode&1?le&2&&Xe!==0?Xe&-Xe:fP.transition!==null?(sc===0&&(sc=kx()),sc):(e=fe,e!==0||(e=window.event,e=e===void 0?16:jx(e.type)),e):1}function fn(e,t,n,r){if(50<na)throw na=0,cf=null,Error(I(185));Ya(e,n,r),(!(le&2)||e!==He)&&(e===He&&(!(le&2)&&(Tu|=n),ze===4&&xr(e,Xe)),kt(e,r),n===1&&le===0&&!(t.mode&1)&&(so=Me()+500,Eu&&Zr()))}function kt(e,t){var n=e.callbackNode;fT(e,t);var r=_c(e,e===He?Xe:0);if(r===0)n!==null&&Kg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Kg(n),t===1)e.tag===0?hP($v.bind(null,e)):Qx($v.bind(null,e)),lP(function(){!(le&6)&&Zr
vendor: 10,674 bytes, line 40
40()}),n=null;else{switch(Cx(r)){case 1:n=Fp;break;case 4:n=Sx;break;case 16:n=Cc;break;case 536870912:n=Ex;break;default:n=Cc}n=Gb(n,Ub.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ub(e,t){if(rc=-1,sc=0,le&6)throw Error(I(327));var n=e.callbackNode;if(Oi()&&e.callbackNode!==n)return null;var r=_c(e,e===He?Xe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Wc(e,r);else{t=r;var s=le;le|=2;var i=zb();(He!==e||Xe!==t)&&(zn=null,so=Me()+500,js(e,t));do try{OP();break}catch(a){Bb(e,a)}while(!0);Xp(),Uc.current=i,le=s,Ve!==null?t=0:(He=null,Xe=0,t=ze)}if(t!==0){if(t===2&&(s=Lh(e),s!==0&&(r=s,t=uf(e,s))),t===1)throw n=Pa,js(e,0),xr(e,r),kt(e,Me()),n;if(t===6)xr(e,r);else{if(s=e.current.alternate,!(r&30)&&!jP(s)&&(t=Wc(e,r),t===2&&(i=Lh(e),i!==0&&(r=i,t=uf(e,i))),t===1))throw n=Pa,js(e,0),xr(e,r),kt(e,Me()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:ds(e,xt,zn);break;case 3:if(xr(e,r),(r&130023424)===r&&(t=fm+500-Me(),10<t)){if(_c(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ht(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=zh(ds.bind(null,e,xt,zn),t);break}ds(e,xt,zn);break;case 4:if(xr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-hn(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AP(r/1960))-r,10<r){e.timeoutHandle=zh(ds.bind(null,e,xt,zn),r);break}ds(e,xt,zn);break;case 5:ds(e,xt,zn);break;default:throw Error(I(329))}}}return kt(e,Me()),e.callbackNode===n?Ub.bind(null,e):null}function uf(e,t){var n=ta;return e.current.memoizedState.isDehydrated&&(js(e,t).flags|=256),e=Wc(e,t),e!==2&&(t=xt,xt=n,t!==null&&df(t)),e}function df(e){xt===null?xt=e:xt.push.apply(xt,e)}function jP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!mn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xr(e,t){for(t&=~hm,t&=~Tu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-hn(t),r=1<<n;e[n]=-1,t&=~r}}function $v(e){if(le&6)throw Error(I(327));Oi();var t=_c(e,0);if(!(t&1))return kt(e,Me()),null;var n=Wc(e,t);if(e.tag!==0&&n===2){var r=Lh(e);r!==0&&(t=r,n=uf(e,r))}if(n===1)throw n=Pa,js(e,0),xr(e,t),kt(e,Me()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ds(e,xt,zn),kt(e,Me()),null}function pm(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(so=Me()+500,Eu&&Zr())}}function Fs(e){Or!==null&&Or.tag===0&&!(le&6)&&Oi();var t=le;le|=1;var n=Kt.transition,r=fe;try{if(Kt.transition=null,fe=1,e)return e()}finally{fe=r,Kt.transition=n,le=t,!(le&6)&&Zr()}}function mm(){Pt=ki.current,Se(ki)}function js(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,aP(n)),Ve!==null)for(n=Ve.return;n!==null;){var r=n;switch(Yp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&jc();break;case 3:no(),Se(St),Se(ot),sm();break;case 5:rm(r);break;case 4:no();break;case 13:Se(Re);break;case 19:Se(Re);break;case 10:Zp(r.type._context);break;case 22:case 23:mm()}n=n.return}if(He=e,Ve=e=zr(e.current,null),Xe=Pt=t,ze=0,Pa=null,hm=Tu=$s=0,xt=ta=null,gs!==null){for(t=0;t<gs.length;t++)if(n=gs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}gs=null}return e}function Bb(e,t){do{var n=Ve;try{if(Xp(),ec.current=Vc,Fc){for(var r=Ae.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Fc=!1}if(Ms=0,We=Be=Ae=null,Zo=!1,Ca=0,dm.current=null,n===null||n.return===null){ze=1,Pa=t,Ve=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Xe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Cv(o);if(f!==null){f.flags&=-257,_v(f,o,a,i,t),f.mode&1&&kv(i,c,t),t=f,l=c;var x=t.updateQueue;if(x===null){var m=new Set;m.add(l),t.updateQueue=m}else x.add(l);break e}else{if(!(t&1)){kv(i,c,t),gm();break e}l=Error(I(426))}}else if(Ce&&a.mode&1){var y=Cv(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),_v(y,o,a,i,t),Qp(ro(l,a));break e}}i=l=ro(l,a),ze!==4&&(ze=2),ta===null?ta=[i]:ta.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Cb(i,l,t);yv(i,v);break e;case 1:a=l;var g=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Ur===null||!Ur.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=_b(i,a,t);yv(i,S);break e}}i=i.return}while(i!==null)}Hb(n)}catch(E){t=E,Ve===n&&n!==null&&(Ve=n=n.return);continue}break}while(!0)}function zb(){var e=Uc.current;return Uc.current=Vc,e===null?Vc:e}function gm(){(ze===0||ze===3||ze===2)&&(ze=4),He===null||!($s&268435455)&&!(Tu&268435455)||xr(He,Xe)}function Wc(e,t){var n=le;le|=2;var r=zb();(He!==e||Xe!==t)&&(zn=null,js(e,t));do try{NP();break}catch(s){Bb(e,s)}while(!0);if(Xp(),le=n,Uc.current=r,Ve!==null)throw Error(I(261));return He=null,Xe=0,ze}function NP(){for(;Ve!==null;)Wb(Ve)}function OP(){for(;Ve!==null&&!sT();)Wb(Ve)}function Wb(e){var t=qb(e.alternate,e,Pt);e.memoizedProps=e.pendingProps,t===null?Hb(e):Ve=t,dm.current=null}function Hb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_P(n,t),n!==null){n.flags&=32767,Ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Ve=null;return}}else if(n=CP(n,t,Pt),n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);ze===0&&(ze=5)}function ds(e,t,n){var r=fe,s=Kt.transition;try{Kt.transition=null,fe=1,IP(e,t,n,r)}finally{Kt.transition=s,fe=r}return null}function IP(e,t,n,r){do Oi();while(Or!==null);if(le&6)throw Error(I(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(pT(e,i),e===He&&(Ve=He=null,Xe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Cl||(Cl=!0,Gb(Cc,function(){return Oi(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Kt.transition,Kt.transition=null;var o=fe;fe=1;var a=le;le|=4,dm.current=null,PP(e,n),Fb(n,e),eP(Uh),Tc=!!Vh,Uh=Vh=null,e.current=n,RP(n),iT(),le=a,fe=o,Kt.transition=i}else e.current=n;if(Cl&&(Cl=!1,Or=e,zc=s),i=e.pendingLanes,i===0&&(Ur=null),lT(n.stateNode),kt(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Bc)throw Bc=!1,e=lf,lf=null,e;return zc&1&&e.tag!==0&&Oi(),i=e.pendingLanes,i&1?e===cf?na++:(na=0,cf=e):na=0,Zr(),null}function Oi(){if(Or!==null){var e=Cx(zc),t=Kt.transition,n=fe;try{if(Kt.transition=null,fe=16>e?16:e,Or===null)var r=!1;else{if(e=Or,Or=null,zc=0,le&6)throw Error(I(331));var s=le;for(le|=4,V=e.current;V!==null;){var i=V,o=i.child;if(V.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(V=c;V!==null;){var u=V;switch(u.tag){case 0:case 11:case 15:ea(8,u,i)}var d=u.child;if(d!==null)d.return=u,V=d;else for(;V!==null;){u=V;var h=u.sibling,f=u.return;if(Db(u),u===c){V=null;break}if(h!==null){h.return=f,V=h;break}V=f}}}var x=i.alternate;if(x!==null){var m=x.child;if(m!==null){x.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}V=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,V=o;else e:for(;V!==null;){if(i=V,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ea(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,V=v;break e}V=i.return}}var g=e.current;for(V=g;V!==null;){o=V;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,V=w;else e:for(o=g;V!==null;){if(a=V,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:_u(9,a)}}catch(E){De(a,a.return,E)}if(a===o){V=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,V=S;break e}V=a.return}}if(le=s,Zr(),On&&typeof On.onPostCommitFiberRoot=="function")try{On.onPostCommitFiberRoot(yu,e)}catch{}r=!0}return r}finally{fe=n,Kt.transition=t}}return!1}function Fv(e,t,n){t=ro(n,t),t=Cb(e,t,1),e=Vr(e,t,1),t=ht(),e!==null&&(Ya(e,1,t),kt(e,t))}function De(e,t,n){if(e.tag===3)Fv(e,e,n);else for(;t!==null;){if(t.tag===3){Fv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ur===null||!Ur.has(r))){e=ro(n,e),e=_b(t,e,1),t=Vr(t,e,1),e=ht(),t!==null&&(Ya(t,1,e),kt(t,e));break}}t=t.return}}function LP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ht(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Xe&n)===n&&(ze===4||ze===3&&(Xe&130023424)===Xe&&500>Me()-fm?js(e,0):hm|=n),kt(e,t)}function Kb(e,t){t===0&&(e.mode&1?(t=ml,ml<<=1,!(ml&130023424)&&(ml=4194304)):t=1);var n=ht();e=er(e,t),e!==null&&(Ya(e,t,n),kt(e,n))}function DP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kb(e,n)}function MP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),Kb(e,n)}var qb;qb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return bt=!1,kP(e,t,n);bt=!!(e.flags&131072)}else bt=!1,Ce&&t.flags&1048576&&Jx(t,Ic,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nc(e,t),e=t.pendingProps;var s=Zi(t,ot.current);Ni(t,n),s=om(null,t,r,e,s,n);var i=am();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(i=!0,Nc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,tm(t),s.updater=Cu,t.stateNode=s,s._reactInternals=t,Qh(t,r,e,n),t=Zh(null,t,r,!0,i,n)):(t.tag=0,Ce&&i&&Gp(t),ct(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=FP(r),e=on(r,e),s){case 0:t=Xh(null,t,r,e,n);break e;case 1:t=Rv(null,t,r,e,n);break e;case 11:t=Tv(null,t,r,e,n);break e;case 14:t=Pv(null,t,r,on(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:on(r,s),Xh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:on(r,s),Rv(e,t,r,s,n);case 3:e:{if(Ab(t),e===null)throw Error(I(387));
vendor: 4,729 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,s=i.element,rb(e,t),Mc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=ro(Error(I(423)),t),t=Av(e,t,r,n,s);break e}else if(r!==s){s=ro(Error(I(424)),t),t=Av(e,t,r,n,s);break e}else for(Nt=Fr(t.stateNode.containerInfo.firstChild),Ot=t,Ce=!0,dn=null,n=tb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(eo(),r===s){t=tr(e,t,n);break e}ct(e,t,r,n)}t=t.child}return t;case 5:return sb(t),e===null&&qh(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Bh(r,s)?o=null:i!==null&&Bh(r,i)&&(t.flags|=32),Rb(e,t),ct(e,t,o,n),t.child;case 6:return e===null&&qh(t),null;case 13:return jb(e,t,n);case 4:return nm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=to(t,null,r,n):ct(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:on(r,s),Tv(e,t,r,s,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,ve(Lc,r._currentValue),r._currentValue=o,i!==null)if(mn(i.value,o)){if(i.children===s.children&&!St.current){t=tr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Jn(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Gh(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(I(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Gh(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ct(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ni(t,n),s=Gt(s),r=r(s),t.flags|=1,ct(e,t,r,n),t.child;case 14:return r=t.type,s=on(r,t.pendingProps),s=on(r.type,s),Pv(e,t,r,s,n);case 15:return Tb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:on(r,s),nc(e,t),t.tag=1,Et(r)?(e=!0,Nc(t)):e=!1,Ni(t,n),kb(t,r,s),Qh(t,r,s,n),Zh(null,t,r,!0,e,n);case 19:return Nb(e,t,n);case 22:return Pb(e,t,n)}throw Error(I(156,t.tag))};function Gb(e,t){return bx(e,t)}function $P(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,t,n,r){return new $P(e,t,n,r)}function vm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function FP(e){if(typeof e=="function")return vm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dp)return 11;if(e===Mp)return 14}return 2}function zr(e,t){var n=e.alternate;return n===null?(n=Wt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ic(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")vm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case pi:return Ns(n.children,s,i,t);case Lp:o=8,s|=8;break;case xh:return e=Wt(12,n,t,s|2),e.elementType=xh,e.lanes=i,e;case bh:return e=Wt(13,n,t,s),e.elementType=bh,e.lanes=i,e;case Sh:return e=Wt(19,n,t,s),e.elementType=Sh,e.lanes=i,e;case sx:return Pu(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nx:o=10;break e;case rx:o=9;break e;case Dp:o=11;break e;case Mp:o=14;break e;case vr:o=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Wt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Ns(e,t,n,r){return e=Wt(7,e,r,t),e.lanes=n,e}function Pu(e,t,n,r){return e=Wt(22,e,r,t),e.elementType=sx,e.lanes=n,e.stateNode={isHidden:!1},e}function Od(e,t,n){return e=Wt(6,e,null,t),e.lanes=n,e}
vendor: 6,289 bytes, line 40
40function Id(e,t,n){return t=Wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function VP(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pd(0),this.expirationTimes=pd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ym(e,t,n,r,s,i,o,a,l){return e=new VP(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Wt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tm(i),e}function UP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Yb(e){if(!e)return Kr;e=e._reactInternals;e:{if(Ks(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(Et(n))return Yx(e,n,t)}return t}function Qb(e,t,n,r,s,i,o,a,l){return e=ym(n,r,!0,e,s,i,o,a,l),e.context=Yb(null),n=e.current,r=ht(),s=Br(n),i=Jn(r,s),i.callback=t??null,Vr(n,i,s),e.current.lanes=s,Ya(e,s,r),kt(e,r),e}function Ru(e,t,n,r){var s=t.current,i=ht(),o=Br(s);return n=Yb(n),t.context===null?t.context=n:t.pendingContext=n,t=Jn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Vr(s,t,o),e!==null&&(fn(e,s,o,i),Zl(e,s,o)),o}function Hc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Vv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function wm(e,t){Vv(e,t),(e=e.alternate)&&Vv(e,t)}function BP(){return null}var Jb=typeof reportError=="function"?reportError:function(e){console.error(e)};function xm(e){this._internalRoot=e}Au.prototype.render=xm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));Ru(e,t,null,null)};Au.prototype.unmount=xm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fs(function(){Ru(null,e,null,null)}),t[Zn]=null}};function Au(e){this._internalRoot=e}Au.prototype.unstable_scheduleHydration=function(e){if(e){var t=Px();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wr.length&&t!==0&&t<wr[n].priority;n++);wr.splice(n,0,e),n===0&&Ax(e)}};function bm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ju(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uv(){}function zP(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Hc(o);i.call(c)}}var o=Qb(t,r,e,0,null,!1,!1,"",Uv);return e._reactRootContainer=o,e[Zn]=o.current,xa(e.nodeType===8?e.parentNode:e),Fs(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Hc(l);a.call(c)}}var l=ym(e,0,!1,null,null,!1,!1,"",Uv);return e._reactRootContainer=l,e[Zn]=l.current,xa(e.nodeType===8?e.parentNode:e),Fs(function(){Ru(t,l,n,r)}),l}function Nu(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Hc(o);a.call(l)}}Ru(t,o,e,s)}else o=zP(n,t,e,s,r);return Hc(o)}_x=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Uo(t.pendingLanes);n!==0&&(Vp(t,n|1),kt(t,Me()),!(le&6)&&(so=Me()+500,Zr()))}break;case 13:Fs(function(){var r=er(e,1);if(r!==null){var s=ht();fn(r,e,1,s)}}),wm(e,1)}};Up=function(e){if(e.tag===13){var t=er(e,134217728);if(t!==null){var n=ht();fn(t,e,134217728,n)}wm(e,134217728)}};Tx=function(e){if(e.tag===13){var t=Br(e),n=er(e,t);if(n!==null){var r=ht();fn(n,e,t,r)}wm(e,t)}};Px=function(){return fe};Rx=function(e,t){var n=fe;try{return fe=e,t()}finally{fe=n}};Nh=function(e,t,n){switch(t){case"input":if(Ch(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Su(r);if(!s)throw Error(I(90));ox(r),Ch(r,s)}}}break;case"textarea":lx(e,n);break;case"select":t=n.value,t!=null&&Pi(e,!!n.multiple,t,!1)}};mx=pm;gx=Fs;var WP={usingClientEntryPoint:!1,Events:[Ja,yi,Su,fx,px,pm]},Io={findFiberByHostInstance:ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},HP={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wx(e),e===null?null:e.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||BP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{yu=_l.inject(HP),On=_l}catch{}}Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WP;Dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bm(t))throw Error(I(200));return UP(e,t,null,n)};Dt.createRoot=function(e,t){if(!bm(e))throw Error(I(299));var n=!1,r="",s=Jb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ym(e,1,!1,null,null,n,!1,r,s),e[Zn]=t.current,xa(e.n
40odeType===8?e.parentNode:e),new xm(t)};Dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=wx(t),e=e===null?null:e.stateNode,e};Dt.flushSync=function(e){return Fs(e)};Dt.hydrate=function(e,t,n){if(!ju(t))throw Error(I(200));return Nu(null,e,t,!0,n)};Dt.hydrateRoot=function(e,t,n){if(!bm(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Jb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Qb(t,null,e,1,n??null,s,!1,i,o),e[Zn]=t.current,xa(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Au(t)};Dt.render=function(e,t,n){if(!ju(t))throw Error(I(200));return Nu(null,e,t,!1,n)};Dt.unmountComponentAtNode=function(e){if(!ju(e))throw Error(I(40));return e._reactRootContainer?(Fs(function(){Nu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};Dt.unstable_batchedUpdates=pm;Dt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ju(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return Nu(e,t,n,!1,r)};Dt.version="18.3.1-next-f1338f8080-20240426";function Xb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xb)}catch(e){console.error(e)}}Xb(),Xw.exports=Dt;var qs=Xw.exports;const Zb=Vw(qs);var eS,Bv=qs;eS=Bv.createRoot,Bv.hydrateRoot;var Za=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vs=typeof window>"u"||"Deno"in globalThis;function wt(){}function KP(e,t){return typeof e=="function"?e(t):e}function hf(e){return typeof e=="number"&&e>=0&&e!==1/0}function tS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return typeof e=="function"?e(t):e}function zv(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sm(o,t.options))return!1}else if(!Aa(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Wv(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ra(t.options.mutationKey)!==Ra(i))return!1}else if(!Aa(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Sm(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ra)(e)}function Ra(e){return JSON.stringify(e,(t,n)=>pf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Aa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Aa(e[n],t[n])):!1}function nS(e,t){if(e===t)return e;const n=Hv(e)&&Hv(t);if(n||pf(e)&&pf(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=nS(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function ff(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Hv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pf(e){if(!Kv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Kv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Kv(e){return Object.prototype.toString.call(e)==="[object Object]"}function qP(e){return new Promise(t=>{setTimeout(t,e)})}function mf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nS(e,t):t}function GP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function YP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Em=Symbol();function rS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Em?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function QP(e,t){return typeof e=="function"?e(...t):!!e}var Ss,kr,Vi,jw,JP=(jw=class extends Za{constructor(){super();
vendor: 4,133 bytes, line 40
40J(this,Ss);J(this,kr);J(this,Vi);U(this,Vi,t=>{if(!Vs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){_(this,kr)||this.setEventListener(_(this,Vi))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,kr))==null||t.call(this),U(this,kr,void 0))}setEventListener(t){var n;U(this,Vi,t),(n=_(this,kr))==null||n.call(this),U(this,kr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){_(this,Ss)!==t&&(U(this,Ss,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof _(this,Ss)=="boolean"?_(this,Ss):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ss=new WeakMap,kr=new WeakMap,Vi=new WeakMap,jw),km=new JP,Ui,Cr,Bi,Nw,XP=(Nw=class extends Za{constructor(){super();J(this,Ui,!0);J(this,Cr);J(this,Bi);U(this,Bi,t=>{if(!Vs&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,Cr)||this.setEventListener(_(this,Bi))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Cr))==null||t.call(this),U(this,Cr,void 0))}setEventListener(t){var n;U(this,Bi,t),(n=_(this,Cr))==null||n.call(this),U(this,Cr,t(this.setOnline.bind(this)))}setOnline(t){_(this,Ui)!==t&&(U(this,Ui,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return _(this,Ui)}},Ui=new WeakMap,Cr=new WeakMap,Bi=new WeakMap,Nw),Kc=new XP;function gf(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function ZP(e){return Math.min(1e3*2**e,3e4)}function sS(e){return(e??"online")==="online"?Kc.isOnline():!0}var iS=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ld(e){return e instanceof iS}function oS(e){let t=!1,n=0,r=!1,s;const i=gf(),o=m=>{var y;r||(h(new iS(m)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>km.isFocused()&&(e.networkMode==="always"||Kc.isOnline())&&e.canRun(),u=()=>sS(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),s==null||s(),i.resolve(m))},h=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var y;s=v=>{(r||c())&&m(v)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),x=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var k;if(r)return;const g=e.retry??(Vs?0:3),w=e.retryDelay??ZP,S=typeof w=="function"?w(n,v):w,E=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,v);if(t||!E){h(v);return}n++,(k=e.onFail)==null||k.call(e,n,v),qP(S).then(()=>c()?void 0:f()).then(()=>{t?h(v):x()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?x():f().then(x),i)}}var eR=e=>setTimeout(e,0);function tR(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=eR;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Qe=tR(),Es,Ow,aS=(Ow=class{constructor(){J(this,Es)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hf(this.gcTime)&&U(this,Es,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vs?1/0:5*60*1e3))}clearGcTimeout(){_(this,Es)&&(clearTimeout(_(this,Es)),U(this,Es,void 0))}},Es=new WeakMap,Ow),zi,ks,Vt,Cs,st,Wa,_s,ln,Un,Iw,nR=(Iw=class extends aS{constructor(t){super();
vendor: 2,651 bytes, line 40
40J(this,ln);J(this,zi);J(this,ks);J(this,Vt);J(this,Cs);J(this,st);J(this,Wa);J(this,_s);U(this,_s,!1),U(this,Wa,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Cs,t.client),U(this,Vt,_(this,Cs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,zi,rR(this.options)),this.state=t.state??_(this,zi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=_(this,st))==null?void 0:t.promise}setOptions(t){this.options={..._(this,Wa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,Vt).remove(this)}setData(t,n){const r=mf(this.state.data,t,this.options);return se(this,ln,Un).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,ln,Un).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=_(this,st))==null?void 0:r.promise;return(s=_(this,st))==null||s.cancel(t),n?n.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(_(this,zi))}isActive(){return this.observers.some(t=>Ut(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Em||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Wr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!tS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,st))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,st))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,Vt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(_(this,st)&&(_(this,_s)?_(this,st).cancel({revert:!0}):_(this,st).cancelRetry()),this.scheduleGc()),_(this,Vt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,ln,Un).call(this,{type:"invalidate"})}
40fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(_(this,st))return _(this,st).continueRetry(),_(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(U(this,_s,!0),r.signal)})},i=()=>{const h=rS(this.options,n),x=(()=>{const m={client:_(this,Cs),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return U(this,_s,!1),this.options.persister?this.options.persister(h,x,this):h(x)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:_(this,Cs),state:this.state,fetchFn:i};return s(h),h})();(c=this.options.behavior)==null||c.onFetch(a,this),U(this,ks,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&se(this,ln,Un).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var f,x,m,y;
vendor: 4,473 bytes, line 40
40Ld(h)&&h.silent||se(this,ln,Un).call(this,{type:"error",error:h}),Ld(h)||((x=(f=_(this,Vt).config).onError)==null||x.call(f,h,this),(y=(m=_(this,Vt).config).onSettled)==null||y.call(m,this.state.data,h,this)),this.scheduleGc()};return U(this,st,oS({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,x,m,y;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(v){l(v);return}(x=(f=_(this,Vt).config).onSuccess)==null||x.call(f,h,this),(y=(m=_(this,Vt).config).onSettled)==null||y.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,f)=>{se(this,ln,Un).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{se(this,ln,Un).call(this,{type:"pause"})},onContinue:()=>{se(this,ln,Un).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),_(this,st).start()}},zi=new WeakMap,ks=new WeakMap,Vt=new WeakMap,Cs=new WeakMap,st=new WeakMap,Wa=new WeakMap,_s=new WeakMap,ln=new WeakSet,Un=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...lS(r.data,this.options),fetchMeta:t.meta??null};case"success":return U(this,ks,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ld(s)&&s.revert&&_(this,ks)?{..._(this,ks),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,Vt).notify({query:this,type:"updated",action:t})})},Iw);function lS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Cn,Lw,sR=(Lw=class extends Za{constructor(t={}){super();J(this,Cn);this.config=t,U(this,Cn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Sm(s,n);let o=this.get(i);return o||(o=new nR({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){_(this,Cn).has(t.queryHash)||(_(this,Cn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=_(this,Cn).get(t.queryHash);n&&(t.destroy(),n===t&&_(this,Cn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,Cn).get(t)}getAll(){return[..._(this,Cn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>zv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>zv(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Cn=new WeakMap,Lw),_n,at,Ts,Tn,fr,Dw,iR=(Dw=class extends aS{constructor(t){super();J(this,Tn);J(this,_n);J(this,at);J(this,Ts);this.mutationId=t.mutationId,U(this,at,t.mutationCache),U(this,_n,[]),this.state=t.state||oR(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){_(this,_n).includes(t)||(_(this,_n).push(t),this.clearGcTimeout(),_(this,at).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,_n,_(this,_n).filter(n=>n!==t)),this.scheduleGc(),_(this,at).notify({type:"observerRemoved",mutation:this,observer:t})}
40optionalRemove(){_(this,_n).length||(this.state.status==="pending"?this.scheduleGc():_(this,at).remove(this))}continue(){var t;return((t=_(this,Ts))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,h,f,x,m,y,v,g,w,S,E,k,C,T;const n=()=>{se(this,Tn,fr).call(this,{type:"continue"})};U(this,Ts,oS({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,P)=>{se(this,Tn,fr).call(this,{type:"failed",failureCount:A,error:P})},onPause:()=>{se(this,Tn,fr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,at).canRun(this)}));const r=this.state.status==="pending",s=!_(this,Ts).canStart();try{if(r)n();else{se(this,Tn,fr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=_(this,at).config).onMutate)==null?void 0:o.call(i,t,this));const P=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));P!==this.state.context&&se(this,Tn,fr).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const A=await _(this,Ts).start();return await((u=(c=_(this,at).config).onSuccess)==null?void 0:u.call(c,A,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,A,t,this.state.context)),await((x=(f=_(this,at).config).onSettled)==null?void 0:x.call(f,A,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,A,null,t,this.state.context)),se(this,Tn,fr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((g=(v=_(this,at).config).onError)==null?void 0:g.call(v,A,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context)),await((k=(E=_(this,at).config).onSettled)==null?void 0:k.call(E,void 0,A,this.state.variables,this.state.context,this)),await((T=(C=this.options).onSettled)==null?void 0:T.call(C,void 0,A,t,this.state.context)),A}finally{se(this,Tn,fr).call(this,{type:"error",error:A})}}finally{_(this,at).runNext(this)}}},_n=new WeakMap,at=new WeakMap,Ts=new WeakMap,Tn=new WeakSet,fr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{_(this,_n).forEach(r=>{r.onMutationUpdate(t)}),_(this,at).notify({mutation:this,type:"updated",action:t})})},Dw);function oR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gn,cn,Ha,Mw,aR=(Mw=class extends Za{constructor(t={}){super();J(this,Gn);J(this,cn);J(this,Ha);this.config=t,U(this,Gn,new Set),U(this,cn,new Map),U(this,Ha,0)}build(t,n,r){const s=new iR({mutationCache:this,mutationId:++cl(this,Ha)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){_(this,Gn).add(t);const n=Tl(t);if(typeof n=="string"){const r=_(this,cn).get(n);r?r.push(t):_(this,cn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(_(this,Gn).delete(t)){const n=Tl(t);if(typeof n=="string"){const r=_(this,cn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&_(this,cn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Tl(t);if(typeof n=="string"){const r=_(this,cn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Tl(t);if(typeof n=="string"){const s=(r=_(this,cn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>
vendor: 15,110 bytes, line 40
40{_(this,Gn).forEach(t=>{this.notify({type:"removed",mutation:t})}),_(this,Gn).clear(),_(this,cn).clear()})}getAll(){return Array.from(_(this,Gn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wv(n,r))}findAll(t={}){return this.getAll().filter(n=>Wv(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(wt))))}},Gn=new WeakMap,cn=new WeakMap,Ha=new WeakMap,Mw);function Tl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function qv(e){return{onFetch:(t,n)=>{var u,d,h,f,x;const r=t.options,s=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=rS(t.options,t.fetchOptions),g=async(w,S,E)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const C=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return y(L),L})(),T=await v(C),{maxPages:A}=t.options,P=E?YP:GP;return{pages:P(w.pages,T,A),pageParams:P(w.pageParams,S,A)}};if(s&&i.length){const w=s==="backward",S=w?lR:Gv,E={pages:i,pageParams:o},k=S(r,E);a=await g(E,k,w)}else{const w=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:Gv(r,a);if(l>0&&S==null)break;a=await g(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Gv(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function lR(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ie,_r,Tr,Wi,Hi,Pr,Ki,qi,$w,cR=($w=class{constructor(e={}){J(this,Ie);J(this,_r);J(this,Tr);J(this,Wi);J(this,Hi);J(this,Pr);J(this,Ki);J(this,qi);U(this,Ie,e.queryCache||new sR),U(this,_r,e.mutationCache||new aR),U(this,Tr,e.defaultOptions||{}),U(this,Wi,new Map),U(this,Hi,new Map),U(this,Pr,0)}mount(){cl(this,Pr)._++,_(this,Pr)===1&&(U(this,Ki,km.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Ie).onFocus())})),U(this,qi,Kc.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Ie).onOnline())})))}unmount(){var e,t;cl(this,Pr)._--,_(this,Pr)===0&&((e=_(this,Ki))==null||e.call(this),U(this,Ki,void 0),(t=_(this,qi))==null||t.call(this),U(this,qi,void 0))}isFetching(e){return _(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,_r).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,Ie).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=_(this,Ie).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return _(this,Ie).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=_(this,Ie).get(r.queryHash),i=s==null?void 0:s.state.data,o=KP(t,i);if(o!==void 0)return _(this,Ie).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Qe.batch(()=>_(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,Ie).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=_(this,Ie);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=_(this,Ie);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>_(this,Ie).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(wt).catch(wt)}invalidateQueries(e,t={}){return Qe.batch(()=>(_(this,Ie).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>_(this,Ie).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(wt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=_(this,Ie).build(this,t);return n.isStaleByTime(Wr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wt).catch(wt)}fetchInfiniteQuery(e){return e.behavior=qv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wt).catch(wt)}ensureInfiniteQueryData(e){return e.behavior=qv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Kc.isOnline()?_(this,_r).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,Ie)}getMutationCache(){return _(this,_r)}getDefaultOptions(){return _(this,Tr)}setDefaultOptions(e){U(this,Tr,e)}setQueryDefaults(e,t){_(this,Wi).set(Ra(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,Wi).values()],n={};return t.forEach(r=>{Aa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){_(this,Hi).set(Ra(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,Hi).values()],n={};return t.forEach(r=>{Aa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,Tr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Em&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,Tr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,Ie).clear(),_(this,_r).clear()}},Ie=new WeakMap,_r=new WeakMap,Tr=new WeakMap,Wi=new WeakMap,Hi=new WeakMap,Pr=new WeakMap,Ki=new WeakMap,qi=new WeakMap,$w),vt,ie,Ka,lt,Ps,Gi,Rr,Ar,qa,Yi,Qi,Rs,As,jr,Ji,de,zo,vf,yf,wf,xf,bf,Sf,Ef,cS,Fw,uR=(Fw=class extends Za{constructor(t,n){super();J(this,de);J(this,vt);J(this,ie);J(this,Ka);J(this,lt);J(this,Ps);J(this,Gi);J(this,Rr);J(this,Ar);J(this,qa);J(this,Yi);J(this,Qi);J(this,Rs);J(this,As);J(this,jr);J(this,Ji,new Set);this.options=n,U(this,vt,t),U(this,Ar,null),U(this,Rr,gf()),this.options.experimental_prefetchInRender||_(this,Rr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,ie).addObserver(this),Yv(_(this,ie),this.options)?se(this,de,zo).call(this):this.updateResult(),se(this,de,xf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kf(_(this,ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kf(_(this,ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,de,bf).call(this),se(this,de,Sf).call(this),_(this,ie).removeObserver(this)}setOptions(t){const n=this.options,r=_(this,ie);if(this.options=_(this,vt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,_(this,ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,de,Ef).call(this),_(this,ie).setOptions(this.options),n._defaulted&&!ff(this.options,n)&&_(this,vt).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,ie),observer:this});const s=this.hasListeners();s&&Qv(_(this,ie),r,this.options,n)&&se(this,de,zo).call(this),this.updateResult(),s&&(_(this,ie)!==r||Ut(this.options.enabled,_(this,ie))!==Ut(n.enabled,_(this,ie))||Wr(this.options.staleTime,_(this,ie))!==Wr(n.staleTime,_(this,ie)))&&se(this,de,vf).call(this);const i=se(this,de,yf).call(this);s&&(_(this,ie)!==r||Ut(this.options.enabled,_(this,ie))!==Ut(n.enabled,_(this,ie))||i!==_(this,jr))&&se(this,de,wf).call(this,i)}getOptimisticResult(t){const n=_(this,vt).getQueryCache().build(_(this,vt),t),r=this.createResult(n,t);return hR(this,r)&&(U(this,lt,r),U(this,Gi,this.options),U(this,Ps,_(this,ie).state)),r}getCurrentResult(){return _(this,lt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){_(this,Ji).add(t)}getCurrentQuery(){return _(this,ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=_(this,vt).defaultQueryOptions(t),r=_(this,vt).getQueryCache().build(_(this,vt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,de,zo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,lt)))}createResult(t,n){var A;const r=_(this,ie),s=this.options,i=_(this,lt),o=_(this,Ps),a=_(this,Gi),c=t!==r?t.state:_(this,Ka),{state:u}=t;let d={...u},h=!1,f;if(n._optimisticResults){const P=this.hasListeners(),L=!P&&Yv(t,n),N=P&&Qv(t,r,n,s);(L||N)&&(d={...d,...lS(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:x,errorUpdatedAt:m,status:y}=d;f=d.data;let v=!1;if(n.placeholderData!==void 0&&f===void 0&&y==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,v=!0):P=typeof n.placeholderData=="function"?n.placeholderData((A=_(this,Qi))==null?void 0:A.state.data,_(this,Qi)):n.placeholderData,P!==void 0&&(y="success",f=mf(i==null?void 0:i.data,P,n),h=!0)}if(n.select&&f!==void 0&&!v)if(i&&f===(o==null?void 0:o.data)&&n.select===_(this,qa))f=_(this,Yi);else try{U(this,qa,n.select),f=n.select(f),f=mf(i==null?void 0:i.data,f,n),U(this,Yi,f),U(this,Ar,null)}catch(P){U(this,Ar,P)}_(this,Ar)&&(x=_(this,Ar),f=_(this,Yi),m=Date.now(),y="error");const g=d.fetchStatus==="fetching",w=y==="pending",S=y==="error",E=w&&g,k=f!==void 0,T={status:y,fetchStatus:d.fetchStatus,isPending:w,isSuccess:y==="success",isError:S,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:d.dataUpdatedAt,error:x,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:S&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&k,isStale:Cm(t,n),refetch:this.refetch,promise:_(this,Rr),isEnabled:Ut(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=W=>{T.status==="error"?W.reject(T.error):T.data!==void 0&&W.resolve(T.data)},L=()=>{const W=U(this,Rr,T.promise=gf());P(W)},N=_(this,Rr);switch(N.status){case"pending":t.queryHash===r.queryHash&&P(N);break;case"fulfilled":(T.status==="error"||T.data!==N.value)&&L();break;case"rejected":(T.status!=="error"||T.error!==N.reason)&&L();break}}return T}updateResult(){const t=_(this,lt),n=this.createResult(_(this,ie),this.options);if(U(this,Ps,_(this,ie).state),U(this,Gi,this.options),_(this,Ps).data!==void 0&&U(this,Qi,_(this,ie)),ff(n,t))return;U(this,lt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!_(this,Ji).size)return!0;const o=new Set(i??_(this,Ji));return this.options.throwOnError&&o.add("error"),Object.keys(_(this,lt)).some(a=>{const l=a;return _(this,lt)[l]!==t[l]&&o.has(l)})};se(this,de,cS).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,de,xf).call(this)}},vt=new WeakMap,ie=new WeakMap,Ka=new WeakMap,lt=new WeakMap,Ps=new WeakMap,Gi=new WeakMap,Rr=new WeakMap,Ar=new WeakMap,qa=new WeakMap,Yi=new WeakMap,Qi=new WeakMap,Rs=new WeakMap,As=new WeakMap,jr=new WeakMap,Ji=new WeakMap,de=new WeakSet,zo=function(t){se(this,de,Ef).call(this);let n=_(this,ie).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(wt)),n},vf=function(){se(this,de,bf).call(this);const t=Wr(this.options.staleTime,_(this,ie));if(Vs||_(this,lt).isStale||!hf(t))return;const r=tS(_(this,lt).dataUpdatedAt,t)+1;U(this,Rs,setTimeout(()=>{_(this,lt).isStale||this.updateResult()},r))},yf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,ie)):this.options.refetchInterval)??!1},wf=function(t){se(this,de,Sf).call(this),U(this,jr,t),!(Vs||Ut(this.options.enabled,_(this,ie))===!1||!hf(_(this,jr))||_(this,jr)===0)&&U(this,As,setInterval(()=>{(this.options.refetchIntervalInBackground||km.isFocused())&&se(this,de,zo).call(this)},_(this,jr)))},xf=function(){se(this,de,vf).call(this),se(this,de,wf).call(this,se(this,de,yf).call(this))},bf=function(){_(this,Rs)&&(clearTimeout(_(this,Rs)),U(this,Rs,void 0))},Sf=function(){_(this,As)&&(clearInterval(_(this,As)),U(this,As,void 0))},Ef=function(){const t=_(this,vt).getQueryCache().build(_(this,vt),this.options);if(t===_(this,ie))return;const n=_(this,ie);U(this,ie,t),U(this,Ka,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cS=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(_(this,lt))}),_(this,vt).getQueryCache().notify({query:_(this,ie),type:"observerResultsUpdated"})})},Fw);function dR(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Yv(e,t){return dR(e,t)||e.state.data!==void 0&&kf(e,t,t.refetchOnMount)}function kf(e,t,n){if(Ut(t.enabled,e)!==!1&&Wr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cm(e,t)}return!1}function Qv(e,t,n,r){return(e!==t||Ut(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cm(e,n)}function Cm(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(Wr(t.staleTime,e))}function hR(e,t){return!ff(e.getCurrentResult(),t)}var uS=b.createContext(void 0),dS=e=>{const t=b.useContext(uS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},fR=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(uS.Provider,{value:e,children:t})),hS=b.createContext(!1),pR=()=>b.useContext(hS);hS.Provider;function mR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
40var gR=b.createContext(mR()),vR=()=>b.useContext(gR),yR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},wR=e=>{b.useEffect(()=>{e.clearReset()},[e])},xR=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||QP(n,[e.error,r])),bR=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},SR=(e,t)=>e.isLoading&&e.isFetching&&!t,ER=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Jv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function kR(e,t,n){var d,h,f,x,m;const r=pR(),s=vR(),i=dS(),o=i.defaultQueryOptions(e);(h=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",bR(o),yR(o,s),wR(s);const a=!i.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(y=>{const v=u?l.subscribe(Qe.batchCalls(y)):wt;return l.updateResult(),v},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),ER(o,c))throw Jv(o,l,s);if(xR({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((x=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||x.call(f,o,c),o.experimental_prefetchInRender&&!Vs&&SR(c,r)){const y=a?Jv(o,l,s):(m=i.getQueryCache().get(o.queryHash))==null?void 0:m.promise;y==null||y.catch(wt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function CR(e,t){return kR(e,uR)}/**
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 qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}var Ir;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ir||(Ir={}));const Xv="popstate";function _R(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Cf("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:pS(s)}return PR(t,n,null,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TR(){return Math.random().toString(36).substr(2,8)}function Zv(e,t){return{usr:e.state,key:e.key,idx:t}}function Cf(e,t,n,r){return n===void 0&&(n=null),qc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ou(t):t,{state:n,key:t&&t.key||r||TR()})}function pS(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ou(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function PR(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Ir.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(qc({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Ir.Pop;let y=u(),v=y==null?null:y-c;c=y,l&&l({action:a,location:m.location,delta:v})}function h(y,v){a=Ir.Push;let g=Cf(m.location,y,v);c=u()+1;let w=Zv(g,c),S=m.createHref(g);try{o.pushState(w,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(S)}i&&l&&l({action:a,location:m.location,delta:1})}function f(y,v){a=Ir.Replace;let g=Cf(m.location,y,v);c=u();let w=Zv(g,c),S=m.createHref(g);o.replaceState(w,"",S),i&&l&&l({action:a,location:m.location,delta:0})}function x(y){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof y=="string"?y:pS(y);return g=g.replace(/ $/,"%20"),_t(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let m={get action(){return a},get location(){return e(s,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Xv,d),l=y,()=>{s.removeEventListener(Xv,d),l=null}},createHref(y){return t(s,y)},createURL:x,encodeLocation(y){let v=x(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:f,go(y){return o.go(y)}};return m}var ey;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ey||(ey={}));
vendor: 6,418 bytes, lines 49-58
49function RR(e,t,n){return n===void 0&&(n="/"),AR(e,t,n,!1)}function AR(e,t,n,r){let s=typeof t=="string"?Ou(t):t,i=vS(s.pathname||"/",n);if(i==null)return null;let o=mS(e);jR(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=BR(i);a=VR(o[l],c,r)}return a}function mS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(_t(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ii([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(_t(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),mS(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:$R(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of gS(i.path))s(i,o,l)}),t}function gS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=gS(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function jR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:FR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const NR=/^:[\w-]+$/,OR=3,IR=2,LR=1,DR=10,MR=-2,ty=e=>e==="*";function $R(e,t){let n=e.split("/"),r=n.length;return n.some(ty)&&(r+=MR),t&&(r+=IR),n.filter(s=>!ty(s)).reduce((s,i)=>s+(NR.test(i)?OR:i===""?LR:DR),r)}function FR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function VR(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=ny({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ny({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(s,d.params),o.push({params:s,pathname:Ii([i,d.pathname]),pathnameBase:zR(Ii([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=Ii([i,d.pathnameBase]))}return o}function ny(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=UR(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:f}=u;if(h==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const x=a[d];return f&&!x?c[h]=void 0:c[h]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function UR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),fS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function BR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function vS(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Ii=e=>e.join("/").replace(/\/\/+/g,"/"),zR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function WR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yS=["post","put","patch","delete"];new Set(yS);const HR=["get",...yS];new Set(HR);/**
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 Gc(){return Gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gc.apply(this,arguments)}const KR=b.createContext(null),qR=b.createContext(null),wS=b.createContext(null),Iu=b.createContext(null),Lu=b.createContext({outlet:null,matches:[],isDataRoute:!1}),xS=b.createContext(null);function _m(){return b.useContext(Iu)!=null}function bS(){return _m()||_t(!1),b.useContext(Iu).location}function GR(e,t){return YR(e,t)}function YR(e,t,n,r){_m()||_t(!1);let{navigator:s}=b.useContext(wS),{matches:i}=b.useContext(Lu),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=bS(),u;if(t){var d;let y=typeof t=="string"?Ou(t):t;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||_t(!1),u=y}else u=c;let h=u.pathname||"/",f=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let x=RR(e,{pathname:f}),m=eA(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Ii([l,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Ii([l,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&m?b.createElement(Iu.Provider,{value:{location:Gc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ir.Pop}},m):m}function QR(){let e=sA(),t=WR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application 
58Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:s},n):null,null)}const JR=b.createElement(QR,null);class XR extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(Lu.Provider,{value:this.props.routeContext},b.createElement(xS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ZR(e){let{routeContext:t,match:n,children:r}=e,s=b.useContext(KR);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Lu.Provider,{value:t},r)}function eA(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||_t(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:f}=n,x=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||x){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,h)=>{let f,x=!1,m=null,y=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||JR,l&&(c<0&&h===0?(x=!0,y=null):c===h&&(x=!0,y=d.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,h+1)),g=()=>{let w;return f?w=m:x?w=y:d.route.Component?w=b.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=u,b.createElement(ZR,{match:d,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?b.createElement(XR,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var _f=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_f||{});function tA(e){let t=b.useContext(qR);return t||_t(!1),t}function nA(e){let t=b.useContext(Lu);return t||_t(!1),t}function rA(e){let t=nA(),n=t.matches[t.matches.length-1];return n.route.id||_t(!1),n.route.id}function sA(){var e;let t=b.useContext(xS),n=tA(_f.UseRouteError),r=rA(_f.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function iA(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function oc(e){_t(!1)}function oA(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ir.Pop,navigator:i,static:o=!1,future:a}=e;_m()&&_t(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Gc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Ou(r));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:x="default"}=r,m=b.useMemo(()=>{let y=vS(u,l);return y==null?null:{location:{pathname:y,search:d,hash:h,state:f,key:x},navigationType:s}},[l,u,d,h,f,x,s]);return m==null?null:b.createElement(wS.Provider,{value:c},b.createElement(Iu.Provider,{children:n,value:m}))}function aA(e){let{children:t,location:n}=e;return GR(Tf(t),n)}new Promise(()=>{});function Tf(e,t){t===void 0&&(t=[]);let n=[];
58return b.Children.forEach(e,(r,s)=>{if(!b.isValidElement(r))return;let i=[...t,s];if(r.type===b.Fragment){n.push.apply(n,Tf(r.props.children,i));return}r.type!==oc&&_t(!1),!r.props.index||!r.props.children||_t(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Tf(r.props.children,i)),n.push(o)}),n}/**
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 */const lA="6";try{window.__reactRouterVersion=lA}catch{}const cA="startTransition",ry=jp[cA];function uA(e){let{basename:t,children:n,future:r,window:s}=e,i=b.useRef();i.current==null&&(i.current=_R({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=b.useCallback(d=>{c&&ry?ry(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>iA(r),[r]),b.createElement(oA,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}var sy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(sy||(sy={}));var iy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(iy||(iy={}));var oy=["light","dark"],dA="(prefers-color-scheme: dark)",hA=b.createContext(void 0),fA={setTheme:e=>{},themes:[]},pA=()=>{var e;return(e=b.useContext(hA))!=null?e:fA};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?oy.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(x,m=!1,y=!0)=>{let v=o?o[x]:x,g=m?x+"|| ''":`'${v}'`,w="";return s&&y&&!m&&oy.includes(x)&&(w+=`d.style.colorScheme = '${x}';`),n==="class"?m||v?w+=`c.add(${g})`:w+="null":v&&(w+=`d[s](n,${g})`),w},f=e?`!function(){${u}${h(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${dA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${c?"":"else{"+h(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var mA=e=>{switch(e){case"success":return yA;case"info":return xA;case"warning":return wA;case"error":return bA;default:return null}},gA=Array(12).fill(0),vA=({visible:e,className:t})=>D.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},D.createElement("div",{className:"sonner-spinner"},gA.map((n,r)=>D.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),yA=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),wA=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
67currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),xA=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),bA=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),SA=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},D.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),D.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),EA=()=>{let[e,t]=D.useState(document.hidden);return D.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Pf=1,kA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Pf++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
67this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],D.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(_A(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Pf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},yt=new kA,CA=(e,t)=>{let n=(t==null?void 0:t.id)||Pf++;return yt.addToast({title:e,...t,id:n}),n},_A=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",TA=CA,PA=()=>yt.toasts,RA=()=>yt.getActiveToasts(),qn=Object.assign(TA,{success:yt.success,info:yt.info,warning:yt.warning,error:yt.error,custom:yt.custom,message:yt.message,promise:yt.promise,dismiss:yt.dismiss,loading:yt.loading},{getHistory:PA,getToasts:RA});function AA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}AA(`: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 Pl(e){return e.label!==void 0}var jA=3,NA="32px",OA="16px",ay=4e3,IA=356,LA=14,DA=20,MA=200;function en(...e){return e.filter(Boolean).join(" ")}function $A(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var FA=e=>{var t,n,r,s,i,o,a,l,c,u,d;let{invert:h,toast:f,unstyled:x,interacting:m,setHeights:y,visibleToasts:v,heights:g,index:w,toasts:S,expanded:E,removeToast:k,defaultRichColors:C,closeButton:T,style:A,cancelButtonStyle:P,actionButtonStyle:L,className:N="",descriptionClassName:W="",duration:O,position:K,gap:F,loadingIcon:G,expandByDefault:R,classNames:j,icons:M,closeButtonAriaLabel:Y="Close toast",pauseWhenPageIsHidden:H}=e,[ee,X]=D.useState(null),[ye,Ne]=D.useState(null),[$,he]=D.useState(!1),[Oe,ue]=D.use
vendor: 8,125 bytes, line 68
68State(!1),[oe,ce]=D.useState(!1),[tt,$t]=D.useState(!1),[rs,or]=D.useState(!1),[ss,Co]=D.useState(0),[Gs,Tg]=D.useState(0),_o=D.useRef(f.duration||O||ay),Pg=D.useRef(null),is=D.useRef(null),d_=w===0,h_=w+1<=v,Ft=f.type,Ys=f.dismissible!==!1,f_=f.className||"",p_=f.descriptionClassName||"",ll=D.useMemo(()=>g.findIndex(Z=>Z.toastId===f.id)||0,[g,f.id]),m_=D.useMemo(()=>{var Z;return(Z=f.closeButton)!=null?Z:T},[f.closeButton,T]),Rg=D.useMemo(()=>f.duration||O||ay,[f.duration,O]),od=D.useRef(0),Qs=D.useRef(0),Ag=D.useRef(0),Js=D.useRef(null),[g_,v_]=K.split("-"),jg=D.useMemo(()=>g.reduce((Z,pe,ke)=>ke>=ll?Z:Z+pe.height,0),[g,ll]),Ng=EA(),y_=f.invert||h,ad=Ft==="loading";Qs.current=D.useMemo(()=>ll*F+jg,[ll,jg]),D.useEffect(()=>{_o.current=Rg},[Rg]),D.useEffect(()=>{he(!0)},[]),D.useEffect(()=>{let Z=is.current;if(Z){let pe=Z.getBoundingClientRect().height;return Tg(pe),y(ke=>[{toastId:f.id,height:pe,position:f.position},...ke]),()=>y(ke=>ke.filter(Qt=>Qt.toastId!==f.id))}},[y,f.id]),D.useLayoutEffect(()=>{if(!$)return;let Z=is.current,pe=Z.style.height;Z.style.height="auto";let ke=Z.getBoundingClientRect().height;Z.style.height=pe,Tg(ke),y(Qt=>Qt.find(Jt=>Jt.toastId===f.id)?Qt.map(Jt=>Jt.toastId===f.id?{...Jt,height:ke}:Jt):[{toastId:f.id,height:ke,position:f.position},...Qt])},[$,f.title,f.description,y,f.id]);let ar=D.useCallback(()=>{ue(!0),Co(Qs.current),y(Z=>Z.filter(pe=>pe.toastId!==f.id)),setTimeout(()=>{k(f)},MA)},[f,k,y,Qs]);D.useEffect(()=>{if(f.promise&&Ft==="loading"||f.duration===1/0||f.type==="loading")return;let Z;return E||m||H&&Ng?(()=>{if(Ag.current<od.current){let pe=new Date().getTime()-od.current;_o.current=_o.current-pe}Ag.current=new Date().getTime()})():_o.current!==1/0&&(od.current=new Date().getTime(),Z=setTimeout(()=>{var pe;(pe=f.onAutoClose)==null||pe.call(f,f),ar()},_o.current)),()=>clearTimeout(Z)},[E,m,f,Ft,H,Ng,ar]),D.useEffect(()=>{f.delete&&ar()},[ar,f.delete]);function w_(){var Z,pe,ke;return M!=null&&M.loading?D.createElement("div",{className:en(j==null?void 0:j.loader,(Z=f==null?void 0:f.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":Ft==="loading"},M.loading):G?D.createElement("div",{className:en(j==null?void 0:j.loader,(pe=f==null?void 0:f.classNames)==null?void 0:pe.loader,"sonner-loader"),"data-visible":Ft==="loading"},G):D.createElement(vA,{className:en(j==null?void 0:j.loader,(ke=f==null?void 0:f.classNames)==null?void 0:ke.loader),visible:Ft==="loading"})}return D.createElement("li",{tabIndex:0,ref:is,className:en(N,f_,j==null?void 0:j.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[Ft],(n=f==null?void 0:f.classNames)==null?void 0:n[Ft]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:C,"data-styled":!(f.jsx||f.unstyled||x),"data-mounted":$,"data-promise":!!f.promise,"data-swiped":rs,"data-removed":Oe,"data-visible":h_,"data-y-position":g_,"data-x-position":v_,"data-index":w,"data-front":d_,"data-swiping":oe,"data-dismissible":Ys,"data-type":Ft,"data-invert":y_,"data-swipe-out":tt,"data-swipe-direction":ye,"data-expanded":!!(E||R&&$),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${Oe?ss:Qs.current}px`,"--initial-height":R?"auto":`${Gs}px`,...A,...f.style},onDragEnd:()=>{ce(!1),X(null),Js.current=null},onPointerDown:Z=>{ad||!Ys||(Pg.current=new Date,Co(Qs.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(ce(!0),Js.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,pe,ke,Qt;if(tt||!Ys)return;Js.current=null;let Jt=Number(((Z=is.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lr=Number(((pe=is.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),os=new Date().getTime()-((ke=Pg.current)==null?void 0:ke.getTime()),Xt=ee==="x"?Jt:lr,cr=Math.abs(Xt)/os;if(Math.abs(Xt)>=DA||cr>.11){Co(Qs.current),(Qt=f.onDismiss)==null||Qt.call(f,f),Ne(ee==="x"?Jt>0?"right":"left":lr>0?"down":"up"),ar(),$t(!0),or(!1);return}ce(!1),X(null)},onPointerMove:Z=>{var pe,ke,Qt,Jt;if(!Js.current||!Ys||((pe=window.getSelection())==null?void 0:pe.toString().length)>0)return;let lr=Z.clientY-Js.current.y,os=Z.clientX-Js.current.x,Xt=(ke=e.swipeDirections)!=null?ke:$A(K);!ee&&(Math.abs(os)>1||Math.abs(lr)>1)&&X(Math.abs(os)>Math.abs(lr)?"x":"y");let cr={x:0,y:0};ee==="y"?(Xt.includes("top")||Xt.includes("bottom"))&&(Xt.includes("top")&&lr<0||Xt.includes("bottom")&&lr>0)&&(cr.y=lr):ee==="x"&&(Xt.includes("left")||Xt.includes("right"))&&(Xt.includes("left")&&os<0||Xt.includes("right")&&os>0)&&(cr.x=os),(Math.abs(cr.x)>0||Math.abs(cr.y)>0)&&or(!0),(Qt=is.current)==null||Qt.style.setProperty("--swipe-amount-x",`${cr.x}px`),(Jt=is.current)==null||Jt.style.setProperty("--swipe-amount-y",`${cr.y}px`)}},m_&&!f.jsx?D.createElement("button",{"aria-label":Y,"data-disabled":ad,"data-close-button":!0,onClick:ad||!Ys?()=>{}:()=>{var Z;ar(),(Z=f.onDismiss)==null||Z.call(f,f)},className:en(j==null?void 0:j.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:SA):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:D.createElement(D.Fragment,null,Ft||f.icon||f.promise?D.createElement("div",{"data-icon":"",className:en(j==null?void 0:j.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||w_():null,f.type!=="loading"?f.icon||(M==null?void 0:M[Ft])||mA(Ft):null):null,D.createElement("div",{"data-content":"",className:en(j==null?void 0:j.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},D.createElement("div",{"data-title":"",className:en(j==null?void 0:j.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?D.createElement("div",{"data-description":"",className:en(W,p_,j==null?void 0:j.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&Pl(f.cancel)?D.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:Z=>{var pe,ke;Pl(f.cancel)&&Ys&&((ke=(pe=f.cancel).onClick)==null||ke.call(pe,Z),ar())},className:en(j==null?void 0:j.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&Pl(f.action)?D.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||L,onClick:Z=>{var pe,ke;Pl(f.action)&&((ke=(pe=f.action).onClick)==null||ke.call(pe,Z),!Z.defaultPrevented&&ar())},className:en(j==null?void 0:j.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function ly(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function VA(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?OA:NA;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var UA=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:f,visibleToasts:x=jA,toastOptions:m,dir:y=ly(),gap:v=LA,loadingIcon:g,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E}=e,[k,C]=D.useState([]),T=D.useMemo(()=>Array.from(new Set([r].concat(k.filter(H=>H.position).map(H=>H.position)))),[k,r]),[A,P]=D.useState([]),[L,N]=D.useState(!1),[W,O]=D.useState(!1),[K,F]=D.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
68k":"light"),G=D.useRef(null),R=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=D.useRef(null),M=D.useRef(!1),Y=D.useCallback(H=>{C(ee=>{var X;return(X=ee.find(ye=>ye.id===H.id))!=null&&X.delete||yt.dismiss(H.id),ee.filter(({id:ye})=>ye!==H.id)})},[]);return D.useEffect(()=>yt.subscribe(H=>{if(H.dismiss){C(ee=>ee.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{Zb.flushSync(()=>{C(ee=>{let X=ee.findIndex(ye=>ye.id===H.id);return X!==-1?[...ee.slice(0,X),{...ee[X],...H},...ee.slice(X+1)]:[H,...ee]})})})}),[]),D.useEffect(()=>{if(u!=="system"){F(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:ee})=>{F(ee?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{F(X?"dark":"light")}catch(ye){console.error(ye)}})}},[u]),D.useEffect(()=>{k.length<=1&&N(!1)},[k]),D.useEffect(()=>{let H=ee=>{var X,ye;s.every(Ne=>ee[Ne]||ee.code===Ne)&&(N(!0),(X=G.current)==null||X.focus()),ee.code==="Escape"&&(document.activeElement===G.current||(ye=G.current)!=null&&ye.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),D.useEffect(()=>{if(G.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,M.current=!1)}},[G.current]),D.createElement("section",{ref:t,"aria-label":`${S} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((H,ee)=>{var X;let[ye,Ne]=H.split("-");return k.length?D.createElement("ol",{key:H,dir:y==="auto"?ly():y,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":ye,"data-lifted":L&&k.length>1&&!i,"data-x-position":Ne,style:{"--front-toast-height":`${((X=A[0])==null?void 0:X.height)||0}px`,"--width":`${IA}px`,"--gap":`${v}px`,...f,...VA(l,c)},onBlur:$=>{M.current&&!$.currentTarget.contains($.relatedTarget)&&(M.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:$=>{$.target instanceof HTMLElement&&$.target.dataset.dismissible==="false"||M.current||(M.current=!0,j.current=$.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{W||N(!1)},onDragEnd:()=>N(!1),onPointerDown:$=>{$.target instanceof HTMLElement&&$.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},k.filter($=>!$.position&&ee===0||$.position===H).map(($,he)=>{var Oe,ue;return D.createElement(FA,{key:$.id,icons:w,index:he,toast:$,defaultRichColors:d,duration:(Oe=m==null?void 0:m.duration)!=null?Oe:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:x,closeButton:(ue=m==null?void 0:m.closeButton)!=null?ue:o,interacting:W,position:H,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:Y,toasts:k.filter(oe=>oe.position==$.position),heights:A.filter(oe=>oe.position==$.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:g,expanded:L,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const BA=({...e})=>{const{theme:t="system"}=pA();return p.jsx(UA,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},zA=1,WA=1e6;let Dd=0;function HA(){return Dd=(Dd+1)%Number.MAX_SAFE_INTEGER,Dd.toString()}const Md=new Map,cy=e=>{if(Md.has(e))return;const t=setTimeout(()=>{Md.delete(e),ra({type:"REMOVE_TOAST",toastId:e})},WA);Md.set(e,t)},KA=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,zA)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;
vendor: 13,981 bytes, line 68
68return n?cy(n):e.toasts.forEach(r=>{cy(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ac=[];let lc={toasts:[]};function ra(e){lc=KA(lc,e),ac.forEach(t=>{t(lc)})}function qA({...e}){const t=HA(),n=s=>ra({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>ra({type:"DISMISS_TOAST",toastId:t});return ra({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function GA(){const[e,t]=b.useState(lc);return b.useEffect(()=>(ac.push(t),()=>{const n=ac.indexOf(t);n>-1&&ac.splice(n,1)}),[e]),{...e,toast:qA,dismiss:n=>ra({type:"DISMISS_TOAST",toastId:n})}}function ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function uy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function SS(...e){return t=>{let n=!1;const r=e.map(s=>{const i=uy(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():uy(e[s],null)}}}}function Ee(...e){return b.useCallback(SS(...e),e)}function YA(e,t){const n=b.createContext(t),r=i=>{const{children:o,...a}=i,l=b.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=b.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function mo(e,t=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const c=d=>{var v;const{scope:h,children:f,...x}=d,m=((v=h==null?void 0:h[e])==null?void 0:v[l])||a,y=b.useMemo(()=>x,Object.values(x));return p.jsx(m.Provider,{value:y,children:f})};c.displayName=i+"Provider";function u(d,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,x=b.useContext(f);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,QA(s,...t)]}function QA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function io(e){const t=XA(e),n=b.forwardRef((r,s)=>{const{children:i,...o}=r,a=b.Children.toArray(i),l=a.find(ej);if(l){const c=l.props.children,u=a.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return p.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var JA=io("Slot");function XA(e){const t=b.forwardRef((n,r)=>{const{children:s,...i}=n;if(b.isValidElement(s)){const o=nj(s),a=tj(i,s.props);return s.type!==b.Fragment&&(a.ref=r?SS(r,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ES=Symbol("radix.slottable");function ZA(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ES,t}function ej(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ES}function tj(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function nj(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kS(e){const t=e+"CollectionProvider",[n,r]=mo(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:v}=m,g=D.useRef(null),w=D.useRef(new Map).current;return p.jsx(s,{scope:y,itemMap:w,collectionRef:g,children:v})};o.displayName=t;const a=e+"CollectionSlot",l=io(a),c=D.forwardRef((m,y)=>{const{scope:v,children:g}=m,w=i(a,v),S=Ee(y,w.collectionRef);return p.jsx(l,{ref:S,children:g})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=io(u),f=D.forwardRef((m,y)=>{const{scope:v,children:g,...w}=m,S=D.useRef(null),E=Ee(y,S),k=i(u,v);return D.useEffect(()=>(k.itemMap.set(S,{ref:S,...w}),()=>void k.itemMap.delete(S))),p.jsx(h,{[d]:"",ref:E,children:g})});f.displayName=u;function x(m){const y=i(e+"CollectionConsumer",m);return D.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((k,C)=>w.indexOf(k.ref.current)-w.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},x,r]}var rj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ae=rj.reduce((e,t)=>{const n=io(`Primitive.${t}`),r=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function CS(e,t){e&&qs.flushSync(()=>e.dispatchEvent(t))}function gn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function sj(e,t=globalThis==null?void 0:globalThis.document){const n=gn(e);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ij="DismissableLayer",Rf="dismissableLayer.update",oj="dismissableLayer.pointerDownOutside",aj="dismissableLayer.focusOutside",dy,_S=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),el=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=b.useContext(_S),[u,d]=b.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),x=Ee(t,C=>d(C)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),g=u?m.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,E=cj(C=>{const T=C.target,A=[...c.branches].some(P=>P.contains(T));!S||A||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},h),k=uj(C=>{const T=C.target;[...c.branches].some(P=>P.contains(T))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},h);return sj(C=>{g===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},h),b.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(dy=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),hy(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=dy)}},[u,h,n,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),hy())},[u,c]),b.useEffect(()=>{const C=()=>f({});return document.addEventListener(Rf,C),()=>document.removeEventListener(Rf,C)},[]),p.jsx(ae.div,{...l,ref:x,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,E.onPointerDownCapture)})});el.displayName=ij;var lj="DismissableLayerBranch",TS=b.forwardRef((e,t)=>{const n=b.useContext(_S),r=b.useRef(null),s=Ee(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(ae.div,{...e,ref:s})});TS.displayName=lj;function cj(e,t=globalThis==null?void 0:globalThis.document){const n=gn(e),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){PS(oj,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uj(e,t=globalThis==null?void 0:globalThis.document){const n=gn(e),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&PS(aj,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hy(){const e=new CustomEvent(Rf);document.dispatchEvent(e)}function PS(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?CS(s,i):s.dispatchEvent(i)}var dj=el,hj=TS,et=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},fj="Portal",Du=b.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=b.useState(!1);et(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Zb.createPortal(p.jsx(ae.div,{...r,ref:t}),o):null});Du.displayName=fj;function pj(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var go=e=>{const{present:t,children:n}=e,r=mj(t),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Ee(r.ref,gj(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};go.displayName="Presence";function mj(e){const[t,n]=b.useState(),r=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=pj(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Rl(r.current);i.current=a==="mounted"?c:"none"},[a]),et(()=>{const c=r.current,u=s.current;if(u!==e){const h=i.current,f=Rl(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),et(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const m=Rl(r.current).includes(f.animationName);if(f.target===t&&m&&(l("ANIMATION_END"),!s.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=f=>{f.target===t&&(i.current=Rl(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Rl(e){return(e==null?void 0:e.animationName)||"none"}function gj(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vj=jp[" useInsertionEffect ".trim().toString()]||et;function Yc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=yj({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const u=b.useRef(e!==void 0);b.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=b.useCallback(u=>{var d;if(a){const h=wj(u)?u(e):u;h!==e&&((d=o.current)==null||d.call(o,h))}else i(u)},[a,e,i,o]);return[l,c]}function yj({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),s=b.useRef(n),i=b.useRef(t);return vj(()=>{i.current=t},[t]),b.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function wj(e){return typeof e=="function"}var RS=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"}),xj="VisuallyHidden",Mu=b.forwardRef((e,t)=>p.jsx(ae.span,{...e,ref:t,style:{...RS,...e.style}}));Mu.displayName=xj;var bj=Mu,Tm="ToastProvider",[Pm,Sj,Ej]=kS("Toast"),[AS,eU]=mo("Toast",[Ej]),[kj,$u]=AS(Tm),jS=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tm}\`. Expected non-empty \`string\`.`),p.jsx(Pm.Provider,{scope:t,children:p.jsx(kj,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(f=>f+1),[]),onToastRemove:b.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:o})})};jS.displayName=Tm;var NS="ToastViewport",Cj=["F8"],Af="toast.viewportPause",jf="toast.viewportResume",OS=b.forwardRef((e,t)=>
68{const{__scopeToast:n,hotkey:r=Cj,label:s="Notifications ({hotkey})",...i}=e,o=$u(NS,n),a=Sj(n),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),h=Ee(t,d,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=o.toastCount>0;b.useEffect(()=>{const y=v=>{var w;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),b.useEffect(()=>{const y=l.current,v=d.current;if(x&&y&&v){const g=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Af);v.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(jf);v.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!y.contains(k.relatedTarget)&&w()},E=()=>{y.contains(document.activeElement)||w()};return y.addEventListener("focusin",g),y.addEventListener("focusout",S),y.addEventListener("pointermove",g),y.addEventListener("pointerleave",E),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{y.removeEventListener("focusin",g),y.removeEventListener("focusout",S),y.removeEventListener("pointermove",g),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[x,o.isClosePausedRef]);const m=b.useCallback(({tabbingDirection:y})=>{const g=a().map(w=>{const S=w.ref.current,E=[S,...$j(S)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?g.reverse():g).flat()},[a]);return b.useEffect(()=>{const y=d.current;if(y){const v=g=>{var E,k,C;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const T=document.activeElement,A=g.shiftKey;if(g.target===y&&A){(E=c.current)==null||E.focus();return}const N=m({tabbingDirection:A?"backwards":"forwards"}),W=N.findIndex(O=>O===T);$d(N.slice(W+1))?g.preventDefault():A?(k=c.current)==null||k.focus():(C=u.current)==null||C.focus()}};return y.addEventListener("keydown",v),()=>y.removeEventListener("keydown",v)}},[a,m]),p.jsxs(hj,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&p.jsx(Nf,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});$d(y)}}),p.jsx(Pm.Slot,{scope:n,children:p.jsx(ae.ol,{tabIndex:-1,...i,ref:h})}),x&&p.jsx(Nf,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});$d(y)}})]})});OS.displayName=NS;var IS="ToastFocusProxy",Nf=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=$u(IS,n);return p.jsx(Mu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});Nf.displayName=IS;var tl="Toast",_j="toast.swipeStart",Tj="toast.swipeMove",Pj="toast.swipeCancel",Rj="toast.swipeEnd",LS=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=Yc({prop:r,defaultProp:s??!0,onChange:i,caller:tl});return p.jsx(go,{present:n||a,children:p.jsx(Nj,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:gn(e.onPause),onResume:gn(e.onResume),onSwipeStart:ne(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ne(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ne(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ne(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});LS.displayName=tl;var[Aj,jj]=AS(tl,{onClose(){}}),Nj=b.forwardRef((e,t)=>
68{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...x}=e,m=$u(tl,n),[y,v]=b.useState(null),g=Ee(t,O=>v(O)),w=b.useRef(null),S=b.useRef(null),E=s||m.duration,k=b.useRef(0),C=b.useRef(E),T=b.useRef(0),{onToastAdd:A,onToastRemove:P}=m,L=gn(()=>{var K;(y==null?void 0:y.contains(document.activeElement))&&((K=m.viewport)==null||K.focus()),o()}),N=b.useCallback(O=>{!O||O===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(L,O))},[L]);b.useEffect(()=>{const O=m.viewport;if(O){const K=()=>{N(C.current),c==null||c()},F=()=>{const G=new Date().getTime()-k.current;C.current=C.current-G,window.clearTimeout(T.current),l==null||l()};return O.addEventListener(Af,F),O.addEventListener(jf,K),()=>{O.removeEventListener(Af,F),O.removeEventListener(jf,K)}}},[m.viewport,E,l,c,N]),b.useEffect(()=>{i&&!m.isClosePausedRef.current&&N(E)},[i,E,m.isClosePausedRef,N]),b.useEffect(()=>(A(),()=>P()),[A,P]);const W=b.useMemo(()=>y?BS(y):null,[y]);return m.viewport?p.jsxs(p.Fragment,{children:[W&&p.jsx(Oj,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),p.jsx(Aj,{scope:n,onClose:L,children:qs.createPortal(p.jsx(Pm.ItemSlot,{scope:n,children:p.jsx(dj,{asChild:!0,onEscapeKeyDown:ne(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(ae.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...x,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ne(e.onKeyDown,O=>{O.key==="Escape"&&(a==null||a(O.nativeEvent),O.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:ne(e.onPointerDown,O=>{O.button===0&&(w.current={x:O.clientX,y:O.clientY})}),onPointerMove:ne(e.onPointerMove,O=>{if(!w.current)return;const K=O.clientX-w.current.x,F=O.clientY-w.current.y,G=!!S.current,R=["left","right"].includes(m.swipeDirection),j=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=R?j(0,K):0,Y=R?0:j(0,F),H=O.pointerType==="touch"?10:2,ee={x:M,y:Y},X={originalEvent:O,delta:ee};G?(S.current=ee,Al(Tj,d,X,{discrete:!1})):fy(ee,m.swipeDirection,H)?(S.current=ee,Al(_j,u,X,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(K)>H||Math.abs(F)>H)&&(w.current=null)}),onPointerUp:ne(e.onPointerUp,O=>{const K=S.current,F=O.target;if(F.hasPointerCapture(O.pointerId)&&F.releasePointerCapture(O.pointerId),S.current=null,w.current=null,K){const G=O.currentTarget,R={originalEvent:O,delta:K};fy(K,m.swipeDirection,m.swipeThreshold)?Al(Rj,f,R,{discrete:!0}):Al(Pj,h,R,{discrete:!0}),G.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Oj=e=>{const{__scopeToast:t,children:n,...r}=e,s=$u(tl,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return Dj(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:p.jsx(Du,{asChild:!0,children:p.jsx(Mu,{...r,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",n]})})})},Ij="ToastTitle",DS=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(ae.div,{...r,ref:t})});DS.displayName=Ij;var Lj="ToastDescription",MS=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(ae.div,{...r,ref:t})});MS.displayName=Lj;var $S="ToastAction",FS=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(US,{altText:n,asChild:!0,children:p.jsx(Rm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$S}\`. Expected non-empty \`string\`.`),null)});FS.displayName=$S;var VS="ToastClose",Rm=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=jj(VS,n);return p.jsx(US,{asChild:!0,children:p.jsx(ae.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,s.onClose)})})});Rm.displayName=VS;var US=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return p.jsx(ae.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function BS(e){const t=[];
vendor: 9,925 bytes, lines 68-163
68return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Mj(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...BS(r))}}),t}function Al(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?CS(s,i):s.dispatchEvent(i)}var fy=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function Dj(e=()=>{}){const t=gn(e);et(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Mj(e){return e.nodeType===e.ELEMENT_NODE}function $j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $d(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Fj=jS,zS=OS,WS=LS,HS=DS,KS=MS,qS=FS,GS=Rm;function YS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=YS(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function QS(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=YS(e))&&(r&&(r+=" "),r+=t);return r}const py=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,my=QS,Am=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return my(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const h=py(u)||py(d);return s[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(x=>{let[m,y]=x;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,d,h]:c},[]);return my(e,o,l,n==null?void 0:n.class,n==null?void 0:n.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 Vj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JS=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).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 Uj={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 Bj=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...Uj,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:JS("lucide",s),...a},[...o.map(([c,u])=>b.createElement(c,u)),...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 mt=(e,t)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(Bj,{ref:i,iconNode:t,className:JS(`lucide-${Vj(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
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 zj=mt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
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 Wj=mt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
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 jm=mt("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 Qc=mt("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 Hj=mt("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 Kj=mt("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
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.
123 */const XS=mt("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"}]]);/**
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 qj=mt("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
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 Gj=mt("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
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 Yj=mt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 Fd=mt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
144 * @license lucide-react v0.462.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const Qj=mt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
149 * @license lucide-react v0.462.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const Jj=mt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
154 * @license lucide-react v0.462.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const Xj=mt("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"}]]);/**
159 * @license lucide-react v0.462.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const Nm=mt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Om="-",Zj=e=>{const t=tN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Om);return a[0]===""&&a.length!==1&&a.shift(),ZS(a,t)||eN(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},ZS=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?ZS(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Om);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},gy=/^\[(.+)\]$/,eN=e=>{if(gy.test(e)){const t=gy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},tN=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,120 bytes, line 163
163return rN(Object.entries(e.classGroups),n).forEach(([i,o])=>{Of(o,r,i,t)}),r},Of=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:vy(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(nN(s)){Of(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Of(o,vy(t,i),n,r)})})},vy=(e,t)=>{let n=e;return t.split(Om).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},nN=e=>e.isThemeGetter,rN=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,sN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},e1="!",iN=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===s&&(r||a.slice(y,y+i)===t)){l.push(a.slice(u,y)),u=y+i;continue}if(v==="/"){d=y;continue}}v==="["?c++:v==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(e1),x=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:x,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},oN=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},aN=e=>({cache:sN(e.cacheSize),parseClassName:iN(e),...Zj(e)}),lN=/\s+/,cN=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(lN);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let x=!!f,m=r(x?h.substring(0,f):h);if(!m){if(!x){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}x=!1}const y=oN(u).join(":"),v=d?y+e1:y,g=v+m;if(i.includes(g))continue;i.push(g);const w=s(m,x);for(let S=0;S<w.length;++S){const E=w[S];i.push(v+E)}a=c+(a.length>0?" "+a:a)}return a};function uN(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=t1(t))&&(r&&(r+=" "),r+=n);return r}const t1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=t1(e[r]))&&(n&&(n+=" "),n+=t);return n};function dN(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=aN(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=cN(l,n);return s(l,u),u}return function(){return i(uN.apply(null,arguments))}}const we=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},n1=/^\[(?:([a-z-]+):)?(.+)\]$/i,hN=/^\d+\/\d+$/,fN=new Set(["px","full","screen"]),pN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mN=/\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$/,gN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vn=e=>Li(e)||fN.has(e)||hN.test(e),dr=e=>vo(e,"length",_N),Li=e=>!!e&&!Number.isNaN(Number(e)),Vd=e=>vo(e,"number",Li),Lo=e=>!!e&&Number.isInteger(Number(e)),wN=e=>e.endsWith("%")&&Li(e.slice(0,-1)),te=e=>n1.test(e),hr=e=>pN.test(e),xN=new Set(["length","size","percentage"]),bN=e=>vo(e,xN,r1),SN=e=>vo(e,"position",r1),EN=new Set(["image","url"]),kN=e=>vo(e,EN,PN),CN=e=>vo(e,"",TN),Do=()=>!0,vo=(e,t,n)=>{const r=n1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},_N=e=>mN.test(e)&&!gN.test(e),r1=()=>!1,TN=e=>vN.test(e),PN=e=>yN.test(e),RN=()=>{const e=we("colors"),t=we("spacing"),n=we("blur"),r=we("brightness"),s=we("borderColor"),i=we("borderRadius"),o=we("borderSpacing"),a=we("borderWidth"),l=we("contrast"),c=we("grayscale"),u=we("hueRotate"),d=we("invert"),h=we("gap"),f=we("gradientColorStops"),x=we("gradientColorStopPositions"),m=we("inset"),y=we("margin"),v=we("opacity"),g=we("padding"),w=we("saturate"),S=we("scale"),E=we("sepia"),k=we("skew"),C=we("space"),T=we("translate"),A=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",te,t],N=()=>[te,t],W=()=>["",Vn,dr],O=()=>["auto",Li,te],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["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"],R=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",te],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[Li,te];return{cacheSize:500,separator:":",theme:{colors:[Do],spacing:[Vn,dr],blur:["none","",hr,te],brightness:Y(),borderColor:[e],borderRadius:["n
163one","","full",hr,te],borderSpacing:N(),borderWidth:W(),contrast:Y(),grayscale:j(),hueRotate:Y(),invert:j(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[wN,dr],inset:L(),margin:L(),opacity:Y(),padding:N(),saturate:Y(),scale:Y(),sepia:j(),skew:Y(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[hr]}],"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:[...K(),te]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lo,te]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Lo,te]}],"grid-cols":[{"grid-cols":[Do]}],"col-start-end":[{col:["auto",{span:["full",Lo,te]},te]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Do]}],"row-start-end":[{row:["auto",{span:[Lo,te]},te]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[hr]},hr]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",hr,dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vd]}],"font-family":[{font:[Do]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",Li,Vd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,dr]}],"underline-offset":[{"underline-offset":["auto",Vn,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),SN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}
vendor: 5,180 bytes, line 163
163],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[Vn,te]}],"outline-w":[{outline:[Vn,dr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Vn,dr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",hr,CN]}],"shadow-color":[{shadow:[Do]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",hr,te]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Lo,te]}],"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",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 163
163],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,dr,Vd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},AN=dN(RN);function Te(...e){return AN(QS(e))}const jN=Fj,s1=b.forwardRef(({className:e,...t},n)=>p.jsx(zS,{ref:n,className:Te("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));s1.displayName=zS.displayName;const NN=Am("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"}}),i1=b.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(WS,{ref:r,className:Te(NN({variant:t}),e),...n}));i1.displayName=WS.displayName;const ON=b.forwardRef(({className:e,...t},n)=>p.jsx(qS,{ref:n,className:Te("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));ON.displayName=qS.displayName;const o1=b.forwardRef(({className:e,...t},n)=>p.jsx(GS,{ref:n,className:Te("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 13,149 bytes, line 163
163/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(Nm,{className:"h-4 w-4"})}));o1.displayName=GS.displayName;const a1=b.forwardRef(({className:e,...t},n)=>p.jsx(HS,{ref:n,className:Te("text-sm font-semibold",e),...t}));a1.displayName=HS.displayName;const l1=b.forwardRef(({className:e,...t},n)=>p.jsx(KS,{ref:n,className:Te("text-sm opacity-90",e),...t}));l1.displayName=KS.displayName;function IN(){const{toasts:e}=GA();return p.jsxs(jN,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return p.jsxs(i1,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(a1,{children:n}),r&&p.jsx(l1,{children:r})]}),s,p.jsx(o1,{})]},t)}),p.jsx(s1,{})]})}var LN=jp[" useId ".trim().toString()]||(()=>{}),DN=0;function Di(e){const[t,n]=b.useState(LN());return et(()=>{n(r=>r??String(DN++))},[e]),t?`radix-${t}`:""}const MN=["top","right","bottom","left"],qr=Math.min,Rt=Math.max,Jc=Math.round,jl=Math.floor,Ln=e=>({x:e,y:e}),$N={left:"right",right:"left",bottom:"top",top:"bottom"},FN={start:"end",end:"start"};function If(e,t,n){return Rt(e,qr(t,n))}function nr(e,t){return typeof e=="function"?e(t):e}function rr(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function Im(e){return e==="x"?"y":"x"}function Lm(e){return e==="y"?"height":"width"}const VN=new Set(["top","bottom"]);function Nn(e){return VN.has(rr(e))?"y":"x"}function Dm(e){return Im(Nn(e))}function UN(e,t,n){n===void 0&&(n=!1);const r=yo(e),s=Dm(e),i=Lm(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Xc(o)),[o,Xc(o)]}function BN(e){const t=Xc(e);return[Lf(e),t,Lf(t)]}function Lf(e){return e.replace(/start|end/g,t=>FN[t])}const yy=["left","right"],wy=["right","left"],zN=["top","bottom"],WN=["bottom","top"];function HN(e,t,n){switch(e){case"top":case"bottom":return n?t?wy:yy:t?yy:wy;case"left":case"right":return t?zN:WN;default:return[]}}function KN(e,t,n,r){const s=yo(e);let i=HN(rr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Lf)))),i}function Xc(e){return e.replace(/left|right|bottom|top/g,t=>$N[t])}function qN(e){return{top:0,right:0,bottom:0,left:0,...e}}function c1(e){return typeof e!="number"?qN(e):{top:e,right:e,bottom:e,left:e}}function Zc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function xy(e,t,n){let{reference:r,floating:s}=e;const i=Nn(t),o=Dm(t),a=Lm(o),l=rr(t),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-s.width,y:d};break;default:f={x:r.x,y:r.y}}switch(yo(t)){case"start":f[o]-=h*(n&&c?-1:1);break;case"end":f[o]+=h*(n&&c?-1:1);break}return f}const GN=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=xy(c,r,l),h=r,f={},x=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:g,y:w,data:S,reset:E}=await v({x:u,y:d,initialPlacement:r,placement:h,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});u=g??u,d=w??d,f={...f,[y]:{...f[y],...S}},E&&x<=50&&(x++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:u,y:d}=xy(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function ja(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=nr(t,e),x=c1(f),y=a[h?d==="floating"?"reference":"floating":d],v=Zc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Zc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:(v.top-E.top+x.top)/S.y,bottom:(E.bottom-v.bottom+x.bottom)/S.y,left:(v.left-E.left+x.left)/S.x,right:(E.right-v.right+x.right)/S.x}}const YN=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=nr(e,t)||{};if(c==null)return{};const d=c1(u),h={x:n,y:r},f=Dm(s),x=Lm(f),m=await o.getDimensions(c),y=f==="y",v=y?"top":"left",g=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=i.reference[x]+i.reference[f]-h[f]-i.floating[x],E=h[f]-i.reference[f],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=k?k[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=a.floating[w]||i.floating[x]);const T=S/2-E/2,A=C/2-m[x]/2-1,P=qr(d[v],A),L=qr(d[g],A),N=P,W=C-m[x]-L,O=C/2-m[x]/2+T,K=If(N,O,W),F=!l.arrow&&yo(s)!=null&&O!==K&&i.reference[x]/2-(O<N?P:L)-m[x]/2<0,G=F?O<N?O-N:O-W:0;return{[f]:h[f]+G,data:{[f]:K,centerOffset:O-K-G,...F&&{alignmentOffset:G}},reset:F}}}),QN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...y}=nr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=rr(s),g=Nn(a),w=rr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(w||!m?[Xc(a)]:BN(a)),k=x!=="none";!h&&k&&E.push(...KN(a,m,x,S));const C=[a,...E],T=await ja(t,y),A=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(T[v]),d){const O=UN(s,o,S);A.push(T[O[0]],T[O[1]])}if(P=[...P,{placement:s,overflows:A}],!A.every(O=>O<=0)){var L,N;const O=(((L=i.flip)==null?void 0:L.index)||0)+1,K=C[O];if(K&&(!(d==="alignment"?g!==Nn(K):!1)||P.every(R=>R.overflows[0]>0&&Nn(R.placement)===g)))return{data:{index:O,overflows:P},reset:{placement:K}};let F=(N=P.filter(G=>G.overflows[0]<=0).sort((G,R)=>G.overflows[1]-R.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(f){case"bestFit":{var W;const G=(W=P.filter(R=>{if(k){const j=Nn(R.placement);return j===g||j==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(j=>j>0).reduce((j,M)=>j+M,0)]).sort((R,j)=>R[1]-j[1])[0])==null?void 0:W[0];G&&(F=G);break}case"initialPlacement":F=a;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function by(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sy(e){return MN.some(t=>e[t]>=0)}const JN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=nr(e,t);switch(r){case"referenceHidden":{const i=await ja(t,{...s,elementContext:"reference"}),o=by(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Sy(o)}}}case"escaped":{const i=await ja(t,{...s,altBoundary:!0}),o=by(i,n.floating);return{data:{escapedOffsets:o,escaped:Sy(o)}}}default:return{}}}}},u1=new Set(["left","top"]);async function XN(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=rr(n),a=yo(n),l=Nn(n)==="y",c=u1.has(o)?-1:1,u=i&&l?-1:1,d=nr(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof x=="number"&&(f=a==="end"?x*-1:x),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const ZN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await XN(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},e2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...l}=nr(e,t),c={x:n,y:r},u=await ja(t,l),d=Nn(rr(s)),h=Im(d);let f=c[h],x=c[d];if(i){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=f+u[y],w=f-u[v];f=If(g,f,w)}if(o){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=x+u[y],w=x-u[v];x=If(g,x,w)}const m=a.fn({...t,[h]:f,[d]:x});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:o}}}}}},t2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=nr(e,t),u={x:n,y:r},d=Nn(s),h=Im(d);let f=u[h],x=u[d];const m=nr(a,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=h==="y"?"height":"width",S=i.reference[h]-i.floating[w]+y.mainAxis,E=i.reference[h]+i.reference[w]-y.mainAxis;f<S?f=S:f>E&&(f=E)}if(c){var v,g;const w=h==="y"?"width":"height",S=u1.has(rr(s)),E=i.reference[d]-i.floating[w]+(S&&((v=o.offset)==null?void 0:v[d])||0)+(S?0:y.crossAxis),k=i.reference[d]+i.reference[w]+(S?0:((g=o.offset)==null?void 0:g[d])||0)-(S?y.crossAxis:0);x<E?x=E:x>k&&(x=k)}return{[h]:f,[d]:x}}}},n2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=nr(e,t),u=await ja(t,c),d=rr(s),h=yo(s),f=Nn(s)==="y",{width:x,height:m}=i.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y=h==="end"?"top":"bottom");const g=m-u.top-u.bottom,w=x-u.left-u.right,S=qr(m-u[y],g),E=qr(x-u[v],w),k=!t.middlewareData.shift;let C=S,T=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=g),k&&!h){const P=Rt(u.left,0),L=Rt(u.right,0),N=Rt(u.top,0),W=Rt(u.bottom,0);f?T=x-2*(P!==0||L!==0?P+L:Rt(u.left,u.right)):C=m-2*(N!==0||W!==0?N+W:Rt(u.top,u.bottom))}await l({...t,availableWidth:T,availableHeight:C});const A=await o.getDimensions(a.floating);return x!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Fu(){return typeof window<"u"}function wo(e){return d1(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){var t;return(t=(d1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function d1(e){return Fu()?e instanceof Node||e instanceof It(e).Node:!1}function vn(e){return Fu()?e instanceof Element||e instanceof It(e).Element:!1}function Mn(e){return Fu()?e instanceof HTMLElement||e instanceof It(e).HTMLElement:!1}function Ey(e){return!Fu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}const r2=new Set(["inline","contents"]);function nl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=yn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!r2.has(s)}const s2=new Set(["table","td","th"]);function i2(e){return s2.has(wo(e))}const o2=[":popover-open",":modal"];function Vu(e){return o2.some(t=>{try{return e.matches(t)}catch{return!1}})}const a2=["transform","translate","scale","rotate","perspective"],l2=["transform","translate","scale","rotate","perspective","filter"],c2=["paint","layout","strict","content"];function Mm(e){const t=$m(),n=vn(e)?yn(e):e;return a2.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||l2.some(r=>(n.willChange||"").includes(r))||c2.some(r=>(n.contain||"").includes(r))}function u2(e){let t=Gr(e);for(;Mn(t)&&!oo(t);){if(Mm(t))return t;if(Vu(t))return null;t=Gr(t)}return null}function $m(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const d2=new Set(["html","body","#document"]);function oo(e){return d2.has(wo(e))}function yn(e){return It(e).getComputedStyle(e)}function Uu(e){return vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gr(e){if(wo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ey(e)&&e.host||Fn(e);return Ey(t)?t.host:t}function h1(e){const t=Gr(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mn(t)&&nl(t)?t:h1(t)}function Na(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=h1(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=It(s);if(i){const a=Df(o);
vendor: 4,741 bytes, line 163
163return t.concat(o,o.visualViewport||[],nl(s)?s:[],a&&n?Na(a):[])}return t.concat(s,Na(s,[],n))}function Df(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function f1(e){const t=yn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Mn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Jc(n)!==i||Jc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Fm(e){return vn(e)?e:e.contextElement}function Mi(e){const t=Fm(e);if(!Mn(t))return Ln(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=f1(t);let o=(i?Jc(n.width):n.width)/r,a=(i?Jc(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const h2=Ln(0);function p1(e){const t=It(e);return!$m()||!t.visualViewport?h2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==It(e)?!1:t}function Us(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Fm(e);let o=Ln(1);t&&(r?vn(r)&&(o=Mi(r)):o=Mi(e));const a=f2(i,n,r)?p1(i):Ln(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const h=It(i),f=r&&vn(r)?It(r):r;let x=h,m=Df(x);for(;m&&r&&f!==x;){const y=Mi(m),v=m.getBoundingClientRect(),g=yn(m),w=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(g.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=w,c+=S,x=It(m),m=Df(x)}}return Zc({width:u,height:d,x:l,y:c})}function Vm(e,t){const n=Uu(e).scrollLeft;return t?t.left+n:Us(Fn(e)).left+n}function m1(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Vm(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function p2(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Fn(r),a=t?Vu(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ln(1);const u=Ln(0),d=Mn(r);if((d||!d&&!i)&&((wo(r)!=="body"||nl(o))&&(l=Uu(r)),Mn(r))){const f=Us(r);c=Mi(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=o&&!d&&!i?m1(o,l,!0):Ln(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function m2(e){return Array.from(e.getClientRects())}function g2(e){const t=Fn(e),n=Uu(e),r=e.ownerDocument.body,s=Rt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Rt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Vm(e);const a=-n.scrollTop;return yn(r).direction==="rtl"&&(o+=Rt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function v2(e,t){const n=It(e),r=Fn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=$m();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const y2=new Set(["absolute","fixed"]);function w2(e,t){const n=Us(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Mn(e)?Mi(e):Ln(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function ky(e,t,n){let r;if(t==="viewport")r=v2(e,n);else if(t==="document")r=g2(Fn(e));else if(vn(t))r=w2(t,n);else{const s=p1(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Zc(r)}function g1(e,t){const n=Gr(e);return n===t||!vn(n)||oo(n)?!1:yn(n).position==="fixed"||g1(n,t)}function x2(e,t){const n=t.get(e);if(n)return n;let r=Na(e,[],!1).filter(a=>vn(a)&&wo(a)!=="body"),s=null;const i=yn(e).position==="fixed";let o=i?Gr(e):e;for(;vn(o)&&!oo(o);){const a=yn(o),l=Mm(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&y2.has(s.position)||nl(o)&&!l&&g1(e,o))?r=r.filter(u=>u!==o):s=a,o=Gr(o)}return t.set(e,r),r}function b2(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Vu(t)?[]:x2(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=ky(t,u,s);return c.top=Rt(d.top,c.top),c.right=qr(d.right,c.right),c.bottom=qr(d.bottom,c.bottom),c.left=Rt(d.left,c.left),c},ky(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function S2(e){const{width:t,height:n}=f1(e);return{width:t,height:n}}function E2(e,t,n){const r=Mn(t),s=Fn(t),i=n==="fixed",o=Us(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ln(0);function c(){l.x=Vm(s)}if(r||!r&&!i)if((wo(t)!=="body"||nl(s))&&(a=Uu(t)),r){const f=Us(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?m1(s,a):Ln(0),d=o.left+a.scrollLeft-l.x-u.x,h=o.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function Ud(e){return yn(e).position==="static"}function Cy(e,t){if(!Mn(e)||yn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fn(e)===n&&(n=n.ownerDocument.body),n}
vendor: 9,171 bytes, line 163
163function v1(e,t){const n=It(e);if(Vu(e))return n;if(!Mn(e)){let s=Gr(e);for(;s&&!oo(s);){if(vn(s)&&!Ud(s))return s;s=Gr(s)}return n}let r=Cy(e,t);for(;r&&i2(r)&&Ud(r);)r=Cy(r,t);return r&&oo(r)&&Ud(r)&&!Mm(r)?n:r||u2(e)||n}const k2=async function(e){const t=this.getOffsetParent||v1,n=this.getDimensions,r=await n(e.floating);return{reference:E2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C2(e){return yn(e).direction==="rtl"}const _2={convertOffsetParentRelativeRectToViewportRelativeRect:p2,getDocumentElement:Fn,getClippingRect:b2,getOffsetParent:v1,getElementRects:k2,getClientRects:m2,getDimensions:S2,getScale:Mi,isElement:vn,isRTL:C2};function y1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function T2(e,t){let n=null,r;const s=Fn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||t(),!h||!f)return;const x=jl(d),m=jl(s.clientWidth-(u+h)),y=jl(s.clientHeight-(d+f)),v=jl(u),w={rootMargin:-x+"px "+-m+"px "+-y+"px "+-v+"px",threshold:Rt(0,qr(1,l))||1};let S=!0;function E(k){const C=k[0].intersectionRatio;if(C!==l){if(!S)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!y1(c,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(E,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return o(!0),i}function P2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Fm(e),u=s||i?[...c?Na(c):[],...Na(t)]:[];u.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?T2(c,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let x,m=l?Us(e):null;l&&y();function y(){const v=Us(e);m&&!y1(m,v)&&n(),m=v,x=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(g=>{s&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(x)}}const R2=ZN,A2=e2,j2=QN,N2=n2,O2=JN,_y=YN,I2=t2,L2=(e,t,n)=>{const r=new Map,s={platform:_2,...n},i={...s.platform,_c:r};return GN(e,t,{...s,platform:i})};var D2=typeof document<"u",M2=function(){},cc=D2?b.useLayoutEffect:M2;function eu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!eu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!eu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function w1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ty(e,t){const n=w1(e);return Math.round(t*n)/n}function Bd(e){const t=b.useRef(e);return cc(()=>{t.current=e}),t}function $2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);eu(h,r)||f(r);const[x,m]=b.useState(null),[y,v]=b.useState(null),g=b.useCallback(R=>{R!==k.current&&(k.current=R,m(R))},[]),w=b.useCallback(R=>{R!==C.current&&(C.current=R,v(R))},[]),S=i||x,E=o||y,k=b.useRef(null),C=b.useRef(null),T=b.useRef(u),A=l!=null,P=Bd(l),L=Bd(s),N=Bd(c),W=b.useCallback(()=>{if(!k.current||!C.current)return;const R={placement:t,strategy:n,middleware:h};L.current&&(R.platform=L.current),L2(k.current,C.current,R).then(j=>{const M={...j,isPositioned:N.current!==!1};O.current&&!eu(T.current,M)&&(T.current=M,qs.flushSync(()=>{d(M)}))})},[h,t,n,L,N]);cc(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[c]);const O=b.useRef(!1);cc(()=>(O.current=!0,()=>{O.current=!1}),[]),cc(()=>{if(S&&(k.current=S),E&&(C.current=E),S&&E){if(P.current)return P.current(S,E,W);W()}},[S,E,W,P,A]);const K=b.useMemo(()=>({reference:k,floating:C,setReference:g,setFloating:w}),[g,w]),F=b.useMemo(()=>({reference:S,floating:E}),[S,E]),G=b.useMemo(()=>{const R={position:n,left:0,top:0};if(!F.floating)return R;const j=Ty(F.floating,u.x),M=Ty(F.floating,u.y);return a?{...R,transform:"translate("+j+"px, "+M+"px)",...w1(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:M}},[n,a,F.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:W,refs:K,elements:F,floatingStyles:G}),[u,W,K,F,G])}const F2=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?_y({element:r.current,padding:s}).fn(n):{}:r?_y({element:r,padding:s}).fn(n):{}}}},V2=(e,t)=>({...R2(e),options:[e,t]}),U2=(e,t)=>({...A2(e),options:[e,t]}),B2=(e,t)=>({...I2(e),options:[e,t]}),z2=(e,t)=>({...j2(e),options:[e,t]}),W2=(e,t)=>({...N2(e),options:[e,t]}),H2=(e,t)=>({...O2(e),options:[e,t]}),K2=(e,t)=>({...F2(e),options:[e,t]});var q2="Arrow",x1=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return p.jsx(ae.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});x1.displayName=q2;var G2=x1;function Y2(e){const[t,n]=b.useState(void 0);return et(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Um="Popper",[b1,Bu]=mo(Um),[Q2,S1]=b1(Um),E1=e=>{const{__scopePopper:t,children:n}=e,[r,s]=b.useState(null);return p.jsx(Q2,{scope:t,anchor:r,onAnchorChange:s,children:n})};E1.displayName=Um;var k1="PopperAnchor",C1=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=S1(k1,n),o=b.useRef(null),a=Ee(t,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(ae.div,{...s,ref:a})});C1.displayName=k1;var Bm="PopperContent",[J2,X2]=b1(Bm),_1=b.forwardRef((e,t)=>{var $,he,Oe,ue,oe,ce;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:x,...m}=e,y=S1(Bm,n),[v,g]=b.useState(null),w=Ee(t,tt=>g(tt)),[S,E]=b.useState(null),k=Y2(S),C=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,A=r+(i!=="center"?"-"+i:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(c)?c:[c],N=L.length>0,W={padding:P,boundary:L.filter(eO),altBoundary:N},{refs:O,floatingStyles:K,placement:F,isPositioned:G,middlewareData:R}=$2({strategy:"fixed",placement:A,whileElementsMounted:(...tt)=>P2(...tt,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[V2({mainAxis:s+T,alignmentAxis:o}),l&&U2({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?B2():void 0,...W}),l&&z2({...W}),W2({...W,apply:({elements:tt,rects:$t,availableWidth:rs,availableHeight:or})=>{const{width:ss,height:Co}=$t.reference,Gs=tt.floating.style;Gs.setProperty("--radix-popper-available-width",`${rs}px`),Gs.setProperty("--radix-popper-available-height",`${or}px`),Gs.setProperty("--radix-popper-anchor-width",`${ss}px`),Gs.setProperty("--radix-popper-anchor-height",`${Co}px`)}}),S&&K2({element:S,padding:a}),tO({arrowWidth:C,arrowHeight:T}),h&&H2({strategy:"referenceHidden",...W})]}),[j,M]=R1(F),Y=gn(x);et(()=>{G&&(Y==null||Y())},[G,Y]);const H=($=R.arrow)==null?void 0:$.x,ee=(he=R.arrow)==null?void 0:he.y,X=((Oe=R.arrow)==null?void 0:Oe.centerOffset)!==0,[ye,Ne]=b.useState();return et(()=>{v&&Ne(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:G?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(ue=R.transformOrigin)==null?void 0:ue.x,(oe=R.transformOrigin)==null?void 0:oe.y].join(" "),...((ce=R.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(J2,{scope:n,placedSide:j,onArrowChange:E,arrowX:H,arrowY:ee,shouldHideArrow:X,children:p.jsx(ae.div,{"data-side":j,"data-align":M,...m,ref:w,style:{...m.style,animation:G?void 0:"none"}})})})});_1.displayName=Bm;var T1="PopperArrow",Z2={top:"bottom",right:"left",bottom:"top",left:"r
163ight"},P1=b.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=X2(T1,r),o=Z2[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(G2,{...s,ref:n,style:{...s.style,display:"block"}})})});P1.displayName=T1;function eO(e){return e!==null}var tO=e=>({name:"transformOrigin",options:e,fn(t){var y,v,g;const{placement:n,rects:r,middlewareData:s}=t,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=R1(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let x="",m="";return c==="bottom"?(x=o?d:`${h}px`,m=`${-l}px`):c==="top"?(x=o?d:`${h}px`,m=`${r.floating.height+l}px`):c==="right"?(x=`${-l}px`,m=o?d:`${f}px`):c==="left"&&(x=`${r.floating.width+l}px`,m=o?d:`${f}px`),{data:{x,y:m}}}});function R1(e){const[t,n="center"]=e.split("-");return[t,n]}var nO=E1,A1=C1,j1=_1,N1=P1,[zu,tU]=mo("Tooltip",[Bu]),zm=Bu(),O1="TooltipProvider",rO=700,Py="tooltip.open",[sO,I1]=zu(O1),L1=e=>{const{__scopeTooltip:t,delayDuration:n=rO,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(sO,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};L1.displayName=O1;var D1="Tooltip",[nU,Wu]=zu(D1),Mf="TooltipTrigger",iO=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Wu(Mf,n),i=I1(Mf,n),o=zm(n),a=b.useRef(null),l=Ee(t,a,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(A1,{asChild:!0,...o,children:p.jsx(ae.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ne(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ne(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:ne(e.onBlur,s.onClose),onClick:ne(e.onClick,s.onClose)})})});iO.displayName=Mf;var oO="TooltipPortal",[rU,aO]=zu(oO,{forceMount:void 0}),ao="TooltipContent",M1=b.forwardRef((e,t)=>{const n=aO(ao,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Wu(ao,e.__scopeTooltip);return p.jsx(go,{present:r||o.open,children:o.disableHoverableContent?p.jsx($1,{side:s,...i,ref:t}):p.jsx(lO,{side:s,...i,ref:t})})}),lO=b.forwardRef((e,t)=>{const n=Wu(ao,e.__scopeTooltip),r=I1(ao,e.__scopeTooltip),s=b.useRef(null),i=Ee(t,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{a(null),d(!1)},[d]),f=b.useCallback((x,m)=>{const y=x.currentTarget,v={x:x.clientX,y:x.clientY},g=fO(v,y.getBoundingClientRect()),w=pO(v,g),S=mO(m.getBoundingClientRect()),E=vO([...w,...S]);a(E),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&u){const x=y=>f(y,u),m=y=>f(y,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",m)}}},[l,u,f,h]),b.useEffect(()=>{if(o){const x=m=>{const y=m.target,v={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),w=!gO(v,o);g?h():w&&(h(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,o,c,h]),p.jsx($1,{...e,ref:i})}),[cO,uO]=zu(D1,{isInside:!1}),dO=ZA("TooltipContent"),$1=b.forwardRef((e,t)=>
163{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Wu(ao,n),c=zm(n),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(Py,u),()=>document.removeEventListener(Py,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=h=>{const f=h.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(el,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(j1,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(dO,{children:r}),p.jsx(cO,{scope:n,isInside:!0,children:p.jsx(bj,{id:l.contentId,role:"tooltip",children:s||r})})]})})});M1.displayName=ao;var F1="TooltipArrow",hO=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=zm(n);return uO(F1,n).isInside?null:p.jsx(N1,{...s,...r,ref:t})});hO.displayName=F1;function fO(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function pO(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mO(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function gO(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,u=a.y,d=l.x,h=l.y;u>r!=h>r&&n<(d-c)*(r-u)/(h-u)+c&&(s=!s)}return s}function vO(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),yO(t)}function yO(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var wO=L1,V1=M1;const xO=wO,bO=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(V1,{ref:r,sideOffset:t,className:Te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));bO.displayName=V1.displayName;const SO=()=>{const e=b.useRef(null);return b.useEffect(()=>{const t=e.current;if(!t)return;const n=t.getContext("2d");if(!n)return;let r=t.width=window.innerWidth,s=t.height=document.documentElement.scrollHeight,i,o={x:-100,y:-100};const a=[],l=()=>{r=t.width=window.innerWidth,s=t.height=document.documentElement.scrollHeight},c=d=>{o.x=d.clientX,o.y=d.clientY+window.scrollY;for(let h=0;h<2;h++)a.push({x:o.x+(Math.random()-.5)*4,y:o.y+(Math.random()-.5)*4,vx:(Math.random()-.5)*1.5,vy:(Math.random()-.5)*1.5,life:1,maxLife:40+Math.random()*20,size:2+Math.random()*3})},u=()=>{n.clearRect(0,0,r,s);for(let d=a.length-1;d>=0;d--){const h=a[d];h.x+=h.vx,h.y+=h.vy,h.life++;const f=h.life/h.maxLife,x=1-f,m=h.size*(1-f*.5);n.beginPath(),n.arc(h.x,h.y-window.scrollY,m,0,Math.PI*2),n.fillStyle=`hsla(40, 75%, 52%, ${x*.6})`,n.fill(),n.beginPath(),n.arc(h.x,h.y-window.scrollY,m*2,0,Math.PI*2),n.fillStyle=`hsla(40, 85%, 62%, ${x*.15})`,n.fill(),h.life>=h.maxLife&&a.splice(d,1)}i=requestAnimationFrame(u)};return window.addEventListener("mousemove",c),window.addEventListener("resize",l),u(),()=>{window.removeEventListener("mousemove",c),window.removeEventListener("resize",l),cancelAnimationFrame(i)}},[]),p.jsx("canvas",{ref:e,className:"fixed inset-0 pointer-events-none z-[9999]"})},Wm=b.createContext({});function Hm(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const EO=typeof window<"u",U1=EO?b.useLayoutEffect:b.useEffect,Hu=b.createContext(null);function Km(e,t){e.indexOf(t)===-1&&e.push(t)}function tu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const $n=(e,t,n)=>n>t?t:n<e?e:n;let Ku=()=>{},lo=()=>{};const Yr={},B1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function z1(e){return typeof e=="object"&&e!==null}const W1=e=>/^0[^.\s]+$/u.test(e);function H1(e){let t;return()=>(t===void 0&&(t=e()),t)}const qt=e=>e,kO=(e,t)=>
vendor: 4,706 bytes, line 163
163n=>t(e(n)),rl=(...e)=>e.reduce(kO),Oa=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class qm{constructor(){this.subscriptions=[]}add(t){return Km(this.subscriptions,t),()=>tu(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ct=e=>e*1e3,Ht=e=>e/1e3;function K1(e,t){return t?e*(1e3/t):0}const q1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,CO=1e-7,_O=12;function TO(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=q1(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>CO&&++a<_O);return o}function sl(e,t,n,r){if(e===t&&n===r)return qt;const s=i=>TO(i,0,1,e,n);return i=>i===0||i===1?i:q1(s(i),t,r)}const G1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Y1=e=>t=>1-e(1-t),Q1=sl(.33,1.53,.69,.99),Gm=Y1(Q1),J1=G1(Gm),X1=e=>e>=1?1:(e*=2)<1?.5*Gm(e):.5*(2-Math.pow(2,-10*(e-1))),Ym=e=>1-Math.sin(Math.acos(e)),Z1=Y1(Ym),eE=G1(Ym),PO=sl(.42,0,1,1),RO=sl(0,0,.58,1),tE=sl(.42,0,.58,1),AO=e=>Array.isArray(e)&&typeof e[0]!="number",nE=e=>Array.isArray(e)&&typeof e[0]=="number",Ry={linear:qt,easeIn:PO,easeInOut:tE,easeOut:RO,circIn:Ym,circInOut:eE,circOut:Z1,backIn:Gm,backInOut:J1,backOut:Q1,anticipate:X1},jO=e=>typeof e=="string",Ay=e=>{if(nE(e)){lo(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return sl(t,n,r,s)}else if(jO(e))return lo(Ry[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ry[e];return e},Nl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],jy={value:null,addProjectionMetrics:null};function NO(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,h=!1,f=!1)=>{const m=f&&s?n:r;return h&&o.add(d),m.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0;const h=n;n=r,r=h,n.forEach(c),t&&jy.value&&jy.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const OO=40;function rE(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Nl.reduce((w,S)=>(w[S]=NO(i,t?S:void 0),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:x}=o,m=()=>{const w=Yr.useManualTiming,S=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,OO),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),x.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,s.isProcessing||e(m)};return{schedule:Nl.reduce((w,S)=>{const E=o[S];return w[S]=(k,C=!1,T=!1)=>(n||y(),E.schedule(k,C,T)),w},{}),cancel:w=>{for(let S=0;S<Nl.length;S++)o[Nl[S]].cancel(w)},state:s,steps:o}}const{schedule:me,cancel:Qr,state:Ye,steps:zd}=rE(typeof requestAnimationFrame<"u"?requestAnimationFrame:qt,!0);let uc;function IO(){uc=void 0}const ut={now:()=>(uc===void 0&&ut.set(Ye.isProcessing||Yr.useManualTiming?Ye.timestamp:performance.now()),uc),set:e=>{uc=e,queueMicrotask(IO)}},sE=e=>t=>typeof t=="string"&&t.startsWith(e),iE=sE("--"),LO=sE("var(--"),Qm=e=>LO(e)?DO.test(e.split("/*")[0].trim()):!1,DO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ny(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const xo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ia={...xo,transform:e=>$n(0,1,e)},Ol={...xo,default:1},sa=e=>Math.round(e*1e5)/1e5,Jm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function MO(e){return e==null}const $O=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xm=(e,t)=>n=>!!(typeof n=="string"&&$O.test(n)&&n.startsWith(e)||t&&!MO(n)&&Object.prototype.hasOwnProperty.call(n,t)),oE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Jm);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},FO=e=>$n(0,255,e),Wd={...xo,transform:e=>Math.round(FO(e))},ys={test:Xm("rgb","red"),parse:oE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wd.transform(e)+", "+Wd.transform(t)+", "+Wd.transform(n)+", "+sa(Ia.transform(r))+")"};function VO(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alph
vendor: 2,000 bytes, line 163
163a:s?parseInt(s,16)/255:1}}const $f={test:Xm("#"),parse:VO,transform:ys.transform},il=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pr=il("deg"),Dn=il("%"),B=il("px"),UO=il("vh"),BO=il("vw"),Oy={...Dn,parse:e=>Dn.parse(e)/100,transform:e=>Dn.transform(e*100)},Ci={test:Xm("hsl","hue"),parse:oE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Dn.transform(sa(t))+", "+Dn.transform(sa(n))+", "+sa(Ia.transform(r))+")"},Fe={test:e=>ys.test(e)||$f.test(e)||Ci.test(e),parse:e=>ys.test(e)?ys.parse(e):Ci.test(e)?Ci.parse(e):$f.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ys.transform(e):Ci.transform(e),getAnimatableNone:e=>{const t=Fe.parse(e);return t.alpha=0,Fe.transform(t)}},zO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function WO(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Jm))==null?void 0:t.length)||0)+(((n=e.match(zO))==null?void 0:n.length)||0)>0}const aE="number",lE="color",HO="var",KO="var(",Iy="${}",qO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function co(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(qO,l=>(Fe.test(l)?(r.color.push(i),s.push(lE),n.push(Fe.parse(l))):l.startsWith(KO)?(r.var.push(i),s.push(HO),n.push(l)):(r.number.push(i),s.push(aE),n.push(parseFloat(l))),++i,Iy)).split(Iy);return{values:n,split:a,indexes:r,types:s}}function GO(e){return co(e).values}function cE({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===aE?s+=sa(r[i]):o===lE?s+=Fe.transform(r[i]):s+=r[i]}return s}}function YO(e){return cE(co(e))}const QO=e=>
vendor: 22,755 bytes, line 163
163typeof e=="number"?0:Fe.test(e)?Fe.getAnimatableNone(e):e,JO=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:QO(e);function XO(e){const t=co(e);return cE(t)(t.values.map((r,s)=>JO(r,t.split[s])))}const pn={test:WO,parse:GO,createTransformer:YO,getAnimatableNone:XO};function Hd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ZO({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Hd(l,a,e+1/3),i=Hd(l,a,e),o=Hd(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function nu(e,t){return n=>n>0?t:e}const be=(e,t,n)=>e+(t-e)*n,Kd=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},eI=[$f,ys,Ci],tI=e=>eI.find(t=>t.test(e));function Ly(e){const t=tI(e);if(Ku(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ci&&(n=ZO(n)),n}const Dy=(e,t)=>{const n=Ly(e),r=Ly(t);if(!n||!r)return nu(e,t);const s={...n};return i=>(s.red=Kd(n.red,r.red,i),s.green=Kd(n.green,r.green,i),s.blue=Kd(n.blue,r.blue,i),s.alpha=be(n.alpha,r.alpha,i),ys.transform(s))},Ff=new Set(["none","hidden"]);function nI(e,t){return Ff.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rI(e,t){return n=>be(e,t,n)}function Zm(e){return typeof e=="number"?rI:typeof e=="string"?Qm(e)?nu:Fe.test(e)?Dy:oI:Array.isArray(e)?uE:typeof e=="object"?Fe.test(e)?Dy:sI:nu}function uE(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Zm(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function sI(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Zm(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function iI(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const oI=(e,t)=>{const n=pn.createTransformer(t),r=co(e),s=co(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Ff.has(e)&&!s.values.length||Ff.has(t)&&!r.values.length?nI(e,t):rl(uE(iI(r,s),s.values),n):(Ku(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),nu(e,t))};function dE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):Zm(e)(e,t)}const aI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>me.update(t,n),stop:()=>Qr(t),now:()=>Ye.isProcessing?Ye.timestamp:ut.now()}},hE=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ru=2e4;function eg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ru;)t+=n,r=e.next(t);return t>=ru?1/0:t}function lI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(eg(r),ru);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Ht(s)}}const Pe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Vf(e,t){return e*Math.sqrt(1-t*t)}const cI=12;function uI(e,t,n){let r=n;for(let s=1;s<cI;s++)r=r-e(r)/t(r);return r}const qd=.001;function dI({duration:e=Pe.duration,bounce:t=Pe.bounce,velocity:n=Pe.velocity,mass:r=Pe.mass}){let s,i;Ku(e<=Ct(Pe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=$n(Pe.minDamping,Pe.maxDamping,o),e=$n(Pe.minDuration,Pe.maxDuration,Ht(e)),o<1?(s=c=>{const u=c*o,d=u*e,h=u-n,f=Vf(c,o),x=Math.exp(-d);return qd-h/f*x},i=c=>{const d=c*o*e,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*e,x=Math.exp(-d),m=Vf(Math.pow(c,2),o);return(-s(c)+qd>0?-1:1)*((h-f)*x)/m}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-qd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=uI(s,i,a);if(e=Ct(e),isNaN(l))return{stiffness:Pe.stiffness,damping:Pe.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const hI=["duration","bounce"],fI=["stiffness","damping","mass"];function My(e,t){return t.some(n=>e[n]!==void 0)}function pI(e){let t={velocity:Pe.velocity,stiffness:Pe.stiffness,damping:Pe.damping,mass:Pe.mass,isResolvedFromDuration:!1,...e};if(!My(e,fI)&&My(e,hI))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*$n(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Pe.mass,stiffness:s,damping:i}}else{const n=dI({...e,velocity:0});t={...t,...n,mass:Pe.mass},t.isResolvedFromDuration=!0}return t}function su(e=Pe.visualDuration,t=Pe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=pI({...n,velocity:-Ht(n.velocity||0)}),x=h||0,m=c/(2*Math.sqrt(l*u)),y=o-i,v=Ht(Math.sqrt(l/u)),g=Math.abs(y)<5;r||(r=g?Pe.restSpeed.granular:Pe.restSpeed.default),s||(s=g?Pe.restDelta.granular:Pe.restDelta.default);let w,S,E,k,C,T;if(m<1)E=Vf(v,m),k=(x+m*v*y)/E,w=P=>{const L=Math.exp(-m*v*P);return o-L*(k*Math.sin(E*P)+y*Math.cos(E*P))},C=m*v*k+y*E,T=m*v*y-k*E,S=P=>Math.exp(-m*v*P)*(C*Math.sin(E*P)+T*Math.cos(E*P));else if(m===1){w=L=>o-Math.exp(-v*L)*(y+(x+v*y)*L);const P=x+v*y;S=L=>Math.exp(-v*L)*(v*P*L-x)}else{const P=v*Math.sqrt(m*m-1);w=O=>{const K=Math.exp(-m*v*O),F=Math.min(P*O,300);return o-K*((x+m*v*y)*Math.sinh(F)+P*y*Math.cosh(F))/P};const L=(x+m*v*y)/P,N=m*v*L-y*P,W=m*v*y-L*P;S=O=>{const K=Math.exp(-m*v*O),F=Math.min(P*O,300);return K*(N*Math.sinh(F)+W*Math.cosh(F))}}const A={calculatedDuration:f&&d||null,velocity:P=>Ct(S(P)),next:P=>{if(!f&&m<1){const N=Math.exp(-m*v*P),W=Math.sin(E*P),O=Math.cos(E*P),K=o-N*(k*W+y*O),F=Ct(N*(C*W+T*O));return a.done=Math.abs(F)<=r&&Math.abs(o-K)<=s,a.value=a.done?o:K,a}const L=w(P);if(f)a.done=P>=d;else{const N=Ct(S(P));a.done=Math.abs(N)<=r&&Math.abs(o-L)<=s}return a.value=a.done?o:L,a},toString:()=>{const P=Math.min(eg(A),ru),L=hE(N=>A.next(P*N).value,P,30);return P+"ms "+L},toTransition:()=>{}};return A}su.applyToOptions=e=>{const t=lI(e,100,su);return e.ease=t.ease,e.duration=Ct(t.duration),e.type="keyframes",e};const mI=5;function fE(e,t,n){const r=Math.max(t-mI,0);return K1(n-e(r),t-r)}function Uf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=T=>a!==void 0&&T<a||l!==void 0&&T>l,x=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const y=d+m,v=o===void 0?y:o(y);v!==y&&(m=v-d);const g=T=>-m*Math.exp(-T/r),w=T=>v+g(T),S=T=>{const A=g(T),P=w(T);h.done=Math.abs(A)<=c,h.value=h.done?v:P};let E,k;const C=T=>{f(h.value)&&(E=T,k=su({keyframes:[h.value,x(h.value)],velocity:fE(w,T,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:T=>{let A=!1;return!k&&E===void 0&&(A=!0,S(T),C(T)),E!==void 0&&T>=E?k.next(T-E):(!A&&S(T),h)}}}function gI(e,t,n){const r=[],s=n||Yr.mix||dE,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||qt:t;a=rl(l,a)}r.push(a)}return r}function vI(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(lo(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=gI(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=Oa(e[d],e[d+1],u);return a[d](h)};return n?u=>c($n(e[0],e[i-1],u)):c}function yI(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Oa(0,t,r);e.push(be(n,1,s))}}function wI(e){const t=[0];return yI(t,e.length-1),t}function xI(e,t){return e.map(n=>n*t)}function bI(e,t){return e.map(()=>t||tE).splice(0,e.length-1)}function ia({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=AO(r)?r.map(Ay):Ay(r),i={done:!1,value:t[0]},o=xI(n&&n.length===t.length?n:wI(t),e),a=vI(o,t,{ease:Array.isArray(s)?s:bI(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const SI=e=>e!==null;function qu(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(SI),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const EI={decay:Uf,inertia:Uf,tween:ia,keyframes:ia,spring:su};function pE(e){typeof e.type=="string"&&(e.type=EI[e.type])}class tg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const kI=e=>e/100;class iu extends tg{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ut.now()&&this.tick(ut.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;pE(t);const{type:n=ia,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||ia;l!==ia&&typeof a[0]!="number"&&(this.mixKeyframes=rl(kI,dE(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=eg(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:x,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,S=r;if(d){const T=Math.min(this.currentTime,s)/a;let A=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(h==="reverse"?(P=1-P,f&&(P-=f/a)):h==="mirror"&&(S=o)),w=$n(0,1,P)*a}let E;g?(this.delayState.value=u[0],E=this.delayState):E=S.next(w),i&&!g&&(E.value=i(E.value));let{done:k}=E;!g&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return C&&x!==Uf&&(E.value=qu(u,this.options,y,this.speed)),m&&m(E.value),C&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Ht(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(this.currentTime)}set time(t){t=Ct(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return fE(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ut.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Ht(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=aI,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ut.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function CI(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ws=e=>e*180/Math.PI,Bf=e=>{const t=ws(Math.atan2(e[1],e[0]));return zf(t)},_I={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bf,rotateZ:Bf,skewX:e=>ws(Math.atan(e[1])),skewY:e=>ws(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zf=e=>(e=e%360,e<0&&(e+=360),e),$y=Bf,Fy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),TI={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fy,scaleY:Vy,scale:e=>(Fy(e)+Vy(e))/2,rotateX:e=>zf(ws(Math.atan2(e[6],e[5]))),rotateY:e=>zf(ws(Math.atan2(-e[2],e[0]))),rotateZ:$y,rotate:$y,skewX:e=>ws(Math.atan(e[4])),skewY:e=>ws(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Wf(e){return e.includes("scale")?1:0}function Hf(e,t){if(!e||e==="none")return Wf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=TI,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_I,s=a}if(!s)return Wf(t);const i=r[t],o=s[1].split(",").map(RI);return typeof i=="function"?i(o):o[i]}const PI=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hf(n,t)};function RI(e){return parseFloat(e.trim())}const bo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],So=new Set(bo),Uy=e=>e===xo||e===B,AI=new Set(["x","y","z"]),jI=bo.filter(e=>!AI.has(e));function NI(e){const t=[];return jI.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Lr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hf(t,"x"),y:(e,{transform:t})=>Hf(t,"y")};Lr.translateX=Lr.x;Lr.translateY=Lr.y;const Os=new Set;let Kf=!1,qf=!1,Gf=!1;function mE(){if(qf){const e=Array.from(Os).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=NI(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}qf=!1,Kf=!1,Os.forEach(e=>e.complete(Gf)),Os.clear()}function gE(){Os.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qf=!0)})}function OI(){Gf=!0,gE(),mE(),Gf=!1}class ng{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Os.add(this),Kf||(Kf=!0,me.read(gE),me.resolveKeyframes(mE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}CI(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Os.delete(this)}cancel(){this.state==="scheduled"&&(Os.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const II=e=>e.startsWith("--");function vE(e,t,n){II(t)?e.style.setProperty(t,n):e.style[t]=n}const LI={};function yE(e,t){const n=H1(e);return()=>LI[t]??n()}const DI=yE(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),wE=yE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,By={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wo([0,.65,.55,1]),circOut:Wo([.55,0,1,.45]),backIn:Wo([.31,.01,.66,-.59]),backOut:Wo([.33,1.53,.69,.99])};function xE(e,t){if(e)return typeof e=="function"?wE()?hE(e,t):"ease-out":nE(e)?Wo(e):Array.isArray(e)?e.map(n=>xE(n,t)||By.easeOut):By[e]}function MI(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=xE(a,s);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function bE(e){return typeof e=="function"&&"applyToOptions"in e}function $I({type:e,...t}){return bE(e)&&wE()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class SE extends tg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,lo(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=$I(t);this.animation=MI(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=qu(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),vE(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ht(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ct(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&DI()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),qt):s(this)}}const EE={anticipate:X1,backInOut:J1,circInOut:eE};function FI(e){return e in EE}function VI(e){typeof e.ease=="string"&&FI(e.ease)&&(e.ease=EE[e.ease])}const Gd=10;class UI extends SE{constructor(t){VI(t),pE(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new iu({...o,autoplay:!1}),l=Math.max(Gd,ut.now()-this.startTime),c=$n(0,Gd,l-Gd),u=a.sample(l).value,{name:d}=this.options;i&&d&&vE(i,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const zy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(pn.test(e)||e==="0")&&!e.startsWith("url("));function BI(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zI(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=zy(s,t),a=zy(i,t);return Ku(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:BI(e)||(n==="spring"||bE(n))&&r}function Yf(e){e.duration=0,e.type="keyframes"}const kE=new Set(["opacity","clipPath","filter","transform"]),WI=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function HI(e){for(let t=0;t<e.length;
163t++)if(typeof e[t]=="string"&&WI.test(e[t]))return!0;return!1}const KI=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),qI=H1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function GI(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return qI()&&n&&(kE.has(n)||KI.has(n)&&HI(a))&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const YI=40;class QI extends tg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var x;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=ut.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...d},f=(u==null?void 0:u.KeyframeResolver)||ng;this.keyframeResolver=new f(a,(m,y,v)=>this.onKeyframesResolved(m,y,h,!v),l,c,u),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,s){var v,g;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=ut.now();let d=!0;zI(t,i,o,a)||(d=!1,(Yr.instantAnimations||!l)&&(u==null||u(qu(t,r,n))),t[0]=t[t.length-1],Yf(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>YI?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=d&&!c&&GI(f),m=(g=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:g.current;let y;if(x)try{y=new UI({...f,element:m})}catch{y=new iu(f)}else y=new iu(f);y.finished.then(()=>{this.notifyFinished()}).catch(qt),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),OI()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function CE(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const JI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function XI(e){const t=JI.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const ZI=4;function _E(e,t,n=1){lo(n<=ZI,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=XI(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return B1(o)?parseFloat(o):o}return Qm(s)?_E(s,t,n+1):s}const eL={type:"spring",stiffness:500,damping:25,restSpeed:10},tL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nL={type:"keyframes",duration:.8},rL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sL=(e,{keyframes:t})=>t.length>2?nL:So.has(e)?e.startsWith("scale")?tL(t[1]):eL:rL;function TE(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function rg(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?TE(n,e):n}const iL=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function oL(e){for(const t in e)if(!iL.has(t))return!0;return!1}const sg=(e,t,n,r={},s,i)=>o=>{const a=rg(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ct(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};oL(a)||Object.assign(u,sL(e,u)),u.duration&&(u.duration=Ct(u.duration)),u.repeatDelay&&(u.repeatDelay=Ct(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Yf(u),u.delay===0&&(
vendor: 8,351 bytes, line 163
163d=!0)),(Yr.instantAnimations||Yr.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,Yf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const h=qu(u.keyframes,a);if(h!==void 0){me.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new iu(u):new QI(u)};function Wy(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ig(e,t,n,r){if(typeof t=="function"){const[s,i]=Wy(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Wy(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Is(e,t,n){const r=e.getProps();return ig(r,t,n!==void 0?n:r.custom,e)}const PE=new Set(["width","height","top","left","right","bottom",...bo]),Hy=30,aL=e=>!isNaN(parseFloat(e));class lL{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ut.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ut.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aL(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new qm);const r=this.events[t].add(n);return t==="change"?()=>{r(),me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ut.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hy);return K1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function uo(e,t){return new lL(e,t)}const Qf=e=>Array.isArray(e);function cL(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function uL(e){return Qf(e)?e[e.length-1]||0:e}function dL(e,t){const n=Is(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=uL(i[o]);cL(e,o,a)}}const Je=e=>!!(e&&e.getVelocity);function hL(e){return!!(Je(e)&&e.add)}function Jf(e,t){const n=e.getValue("willChange");if(hL(n))return n.add(t);if(!n&&Yr.WillChange){const r=new Yr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function og(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const fL="framerAppearId",RE="data-"+og(fL);function AE(e){return e.props[RE]}function pL({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jE(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?TE(i,l):l;const c=i==null?void 0:i.reduceMotion;r&&(i=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const f=e.getValue(h,e.latestValues[h]??null),x=a[h];if(x===void 0||d&&pL(d,h))continue;const m={delay:n,...rg(i||{},h)},y=f.get();if(y!==void 0&&!f.isAnimating()&&!Array.isArray(x)&&x===y&&!m.velocity){me.update(()=>f.set(x));continue}let v=!1;if(window.MotionHandoffAnimation){const S=AE(e);if(S){const E=window.MotionHandoffAnimation(S,h,me);E!==null&&(m.startTime=E,v=!0)}}Jf(e,h);const g=c??e.shouldReduceMotion;f.start(sg(h,f,x,g&&PE.has(h)?{type:!1}:m,e,v));const w=f.animation;w&&u.push(w)}if(o){const h=()=>me.update(()=>{o&&dL(e,o)});u.length?Promise.all(u).then(h):h()}return u}function Xf(e,t,n={}){var l;const r=Is(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(jE(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return mL(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function mL(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Xf(l,t,{...o,delay:n+(typeof r=="function"?0:r)+CE(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function gL(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Xf(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Xf(e,t,n);else{const s=typeof t=="function"?Is(e,t,n.custom):t;r=Promise.all(jE(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const vL={test:e=>e==="auto",parse:e=>e},NE=e=>t=>t.test(e),OE=[xo,B,Dn,pr,BO,UO,vL],Ky=e=>OE.find(NE(e));function yL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||W1(e):!0}const wL=new Set(["brightness","contrast","saturate","opacity"]);function xL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Jm)||[];if(!r)return e;const s=n.replace(r,"");let i=wL.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const bL=/\b([a-z-]*)\(.*?\)/gu,Zf={...pn,getAnimatableNone:e=>{const t=e.match(bL);return t?t.map(xL).join(" "):e}},ep={...pn,getAnimatableNone:e=>{const t=pn.parse(e);return pn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},qy={...xo,transform:Math.round},SL={rotate:pr,rotateX:pr,rotateY:pr,rotateZ:pr,scale:Ol,scaleX:Ol,scaleY:Ol,scaleZ:Ol,skew:pr,skewX:pr,skewY:pr,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ia,originX:Oy,originY:Oy,originZ:B},ag={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...SL,zIndex:qy,fillOpacity:Ia,strokeOpacity:Ia,numOctaves:qy},EL={...ag,color:Fe,backgroundColor:Fe,outlineColor:Fe,fill:Fe,stroke:Fe,borderColor:Fe,borderTopColor:Fe,borderRightColor:Fe,borderBottomColor:Fe,borderLeftColor:Fe,filter:Zf,WebkitFilter:Zf,mask:ep,WebkitMask:ep},IE=e=>EL[e],kL=new Set([Zf,ep]);function LE(e,t){let n=IE(e);return kL.has(n)||(n=pn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const CL=new Set(["auto","none","0"]);
vendor: 1,679 bytes, line 163
163function _L(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!CL.has(i)&&co(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=LE(n,s)}class TL extends ng{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Qm(d))){const h=_E(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!PE.has(r)||t.length!==2)return;const[s,i]=t,o=Ky(s),a=Ky(i),l=Ny(s),c=Ny(i);if(l!==c&&Lr[r]){this.needsMeasurement=!0;return}if(o!==a)if(Uy(o)&&Uy(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Lr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||yL(t[s]))&&r.push(s);r.length&&_L(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Lr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Lr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 50,688 bytes, line 163
163h(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function lg(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const DE=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function dc(e){return z1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:cg,cancel:sU}=rE(queueMicrotask,!1),rn={x:!1,y:!1};function ME(){return rn.x||rn.y}function PL(e){return e==="x"||e==="y"?rn[e]?null:(rn[e]=!0,()=>{rn[e]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}function $E(e,t){const n=lg(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function RL(e){return!(e.pointerType==="touch"||ME())}function AL(e,t,n={}){const[r,s,i]=$E(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",x)},d=y=>{c&&(c(y),c=void 0),u()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(y))},f=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},x=y=>{if(y.pointerType!=="touch"){if(a){l=!0;return}d(y)}},m=y=>{if(!RL(y))return;l=!1;const v=t(o,y);typeof v=="function"&&(c=v,o.addEventListener("pointerleave",x,s))};o.addEventListener("pointerenter",m,s),o.addEventListener("pointerdown",f,s)}),i}const FE=(e,t)=>t?e===t?!0:FE(e,t.parentElement):!1,ug=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NL(e){return jL.has(e.tagName)||e.isContentEditable===!0}const OL=new Set(["INPUT","SELECT","TEXTAREA"]);function IL(e){return OL.has(e.tagName)||e.isContentEditable===!0}const hc=new WeakSet;function Gy(e){return t=>{t.key==="Enter"&&e(t)}}function Yd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const LL=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Gy(()=>{if(hc.has(n))return;Yd(n,"down");const s=Gy(()=>{Yd(n,"up")}),i=()=>Yd(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Yy(e){return ug(e)&&!ME()}const Qy=new WeakSet;function DL(e,t,n={}){const[r,s,i]=$E(e,n),o=a=>{const l=a.currentTarget;if(!Yy(a)||Qy.has(a))return;hc.add(l),n.stopPropagation&&Qy.add(a);const c=t(l,a),u=(f,x)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),hc.has(l)&&hc.delete(l),Yy(f)&&typeof c=="function"&&c(f,{success:x})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||FE(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),dc(a)&&(a.addEventListener("focus",c=>LL(c,s)),!NL(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function dg(e){return z1(e)&&"ownerSVGElement"in e}const fc=new WeakMap;let mr;const VE=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:dg(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ML=VE("inline","width","offsetWidth"),$L=VE("block","height","offsetHeight");function FL({target:e,borderBoxSize:t}){var n;(n=fc.get(e))==null||n.forEach(r=>{r(e,{get width(){return ML(e,t)},get height(){return $L(e,t)}})})}function VL(e){e.forEach(FL)}function UL(){typeof ResizeObserver>"u"||(mr=new ResizeObserver(VL))}function BL(e,t){mr||UL();const n=lg(e);return n.forEach(r=>{let s=fc.get(r);s||(s=new Set,fc.set(r,s)),s.add(t),mr==null||mr.observe(r)}),()=>{n.forEach(r=>{const s=fc.get(r);s==null||s.delete(t),s!=null&&s.size||mr==null||mr.unobserve(r)})}}const pc=new Set;let _i;function zL(){_i=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};pc.forEach(t=>t(e))},window.addEventListener("resize",_i)}function WL(e){return pc.add(e),_i||zL(),()=>{pc.delete(e),!pc.size&&typeof _i=="function"&&(window.removeEventListener("resize",_i),_i=void 0)}}function Jy(e,t){return typeof e=="function"?WL(e):BL(e,t)}function HL(e){return dg(e)&&e.tagName==="svg"}const KL=[...OE,Fe,pn],qL=e=>KL.find(NE(e)),Xy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ti=()=>({x:Xy(),y:Xy()}),Zy=()=>({min:0,max:0}),Ue=()=>({x:Zy(),y:Zy()}),GL=new WeakMap;function Gu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function La(e){return typeof e=="string"||Array.isArray(e)}const hg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fg=["initial",...hg];function Yu(e){return Gu(e.animate)||fg.some(t=>La(e[t]))}function UE(e){return!!(Yu(e)||e.variants)}function YL(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Je(s))e.addValue(r,s);else if(Je(i))e.addValue(r,uo(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,uo(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const tp={current:null},BE={current:!1},QL=typeof window<"u";function JL(){if(BE.current=!0,!!QL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tp.current=e.matches;e.addEventListener("change",t),t()}else tp.current=!1}const e0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ou={};function zE(e){ou=e}function XL(){return ou}class ZL{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ng,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=ut.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,me.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Yu(n),this.isVariantNode=UE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const x=h[f];c[f]!==void 0&&Je(x)&&x.set(c[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,GL.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(BE.current||JL(),this.shouldReduceMotion=tp.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Qr(this.notifyUpdate),Qr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&kE.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new SE({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Ct(u)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=So.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ou){const n=ou[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ue()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<e0.length;r++){const s=e0[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=YL(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(B1(r)||W1(r))?r=parseFloat(r):!qL(r)&&pn.test(n)&&(r=LE(t,n)),this.setBaseTarget(t,Je(r)?r.get():r)),Je(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=ig(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Je(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new qm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){cg.render(this.render)}}class WE extends ZL{constructor(){super(...arguments),this.KeyframeResolver=TL}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Je(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class es{constructor(t){this.isMounted=!1,this.node=t}update(){}}function HE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function eD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qd(e){return e===void 0||e===1}function np({scale:e,scaleX:t,scaleY:n}){return!Qd(e)||!Qd(t)||!Qd(n)}function hs(e){return np(e)||KE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KE(e){return t0(e.x)||t0(e.y)}function t0(e){return e&&e!=="0%"}function au(e,t,n){const r=e-n,s=t*r;return n+s}function n0(e,t,n,r,s){return s!==void 0&&(e=au(e,s,r)),au(e,n,r)+t}function rp(e,t=0,n=1,r,s){e.min=n0(e.min,t,n,r,s),e.max=n0(e.max,t,n,r,s)}function qE(e,{x:t,y:n}){rp(e.x,t.translate,t.scale,t.originPoint),rp(e.y,n.translate,n.scale,n.originPoint)}const r0=.999999999999,s0=1.0000000000001;function nD(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Pn(e.x,-i.scroll.offset.x),Pn(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,qE(e,o)),r&&hs(i.latestValues)&&mc(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<s0&&t.x>r0&&(t.x=1),t.y<s0&&t.y>r0&&(t.y=1)}function Pn(e,t){e.min+=t,e.max+=t}function i0(e,t,n,r,s=.5){const i=be(e.min,e.max,s);rp(e,t,n,i,r)}function o0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function mc(e,t,n){const r=n??e;i0(e.x,o0(t.x,r.x),t.scaleX,t.scale,t.originX),i0(e.y,o0(t.y,r.y),t.scaleY,t.scale,t.originY)}function GE(e,t){return HE(tD(e.getBoundingClientRect(),t))}function rD(e,t,n){const r=GE(e,n),{scroll:s}=t;return s&&(Pn(r.x,s.offset.x),Pn(r.y,s.offset.y)),r}const sD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iD=bo.length;function oD(e,t,n){let r="",s=!0;for(let i=0;i<iD;i++){const o=bo[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=DE(a,ag[o]);if(!l){s=!1;const u=sD[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function pg(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(So.has(l)){o=!0;continue}else if(iE(l)){s[l]=c;continue}else{const u=DE(c,ag[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=oD(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function YE(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function a0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Mo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=a0(e,t.target.x),r=a0(e,t.target.y);return`${n}% ${r}%`}},aD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=pn.parse(e);if(s.length>5)return r;const i=pn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=be(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},sp={borderRadius:{...Mo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Mo,borderTopRightRadius:Mo,borderBottomLeftRadius:Mo,borderBottomRightRadius:Mo,boxShadow:aD};function QE(e,{layout:t,layoutId:n}){return So.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!sp[e]||e==="opacity")}function mg(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Je(r[a])||s&&Je(s[a])||QE(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function lD(e){return window.getComputedStyle(e)}class cD extends WE{constructor(){super(...arguments),this.type="html",this.renderInstance=YE}readValueFromInstance(t,n){var r;if(So.has(n))return(r=this.projection)!=null&&r.isProjecting?Wf(n):PI(t,n);{const s=lD(t),i=(iE(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return GE(t,n)}build(t,n,r){pg(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return mg(t,n,r)}}const uD={offset:"stroke-dashoffset",array:"stroke-dasharray"},dD={offset:"strokeDashoffset",array:"strokeDasharray"};function hD(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?uD:dD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const fD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function JE(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(pg(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const f of fD)d[f]!==void 0&&(h[f]=d[f],delete d[f]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&hD(d,s,i,o,!1)}const XE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ZE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function pD(e,t,n,r){YE(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(XE.has(s)?s:og(s),t.attrs[s])}function ek(e,t,n){const r=mg(e,t,n);for(const s in e)if(Je(e[s])||Je(t[s])){const i=bo.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class mD extends WE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ue}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(So.has(n)){const r=IE(n);return r&&r.default||0}return n=XE.has(n)?n:og(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ek(t,n,r)}build(t,n,r){JE(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){pD(t,n,r,s)}mount(t){this.isSVGTag=ZE(t.tagName),super.mount(t)}}const gD=fg.length;function tk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?tk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<gD;n++){const r=fg[n],s=e.props[r];(La(s)||s===!1)&&(t[r]=s)}return t}function nk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const vD=[...hg].reverse(),yD=hg.length;function wD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gL(e,n,r)))}function xD(e){let t=wD(e),n=l0(),r=!0,s=!1;const i=c=>(u,d)=>{var f;const h=Is(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:x,transitionEnd:m,...y}=h;u={...u,...y,...m}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=tk(e.parent)||{},h=[],f=new Set;let x={},m=1/0;for(let v=0;v<yD;v++){const g=vD[v],w=n[g],S=u[g]!==void 0?u[g]:d[g],E=La(S),k=g===c?w.isActive:null;k===!1&&(m=v);let C=S===d[g]&&S!==u[g]&&E;if(C&&(r||s)&&e.manuallyAnimateOnMount&&(C=!1),w.protectedKeys={...x},!w.isActive&&k===null||!S&&!w.prevProp||Gu(S)||typeof S=="boolean")continue;if(g==="exit"&&w.isActive&&k!==!0){w.prevResolvedValues&&(x={...x,...w.prevResolvedValues});continue}const T=bD(w.prevProp,S);let A=T||g===c&&w.isActive&&!C&&E||v>m&&E,P=!1;const L=Array.isArray(S)?S:[S];let N=L.reduce(i(g),{});k===!1&&(N={});const{prevResolvedValues:W={}}=w,O={...W,...N},K=R=>{A=!0,f.has(R)&&(P=!0,f.delete(R)),w.needsAnimating[R]=!0;const j=e.getValue(R);j&&(j.liveStyle=!1)};for(const R in O){const j=N[R],M=W[R];if(x.hasOwnProperty(R))continue;let Y=!1;Qf(j)&&Qf(M)?Y=!nk(j,M):Y=j!==M,Y?j!=null?K(R):f.add(R):j!==void 0&&f.has(R)?K(R):w.protectedKeys[R]=!0}w.prevProp=S,w.prevResolvedValues=N,w.isActive&&(x={...x,...N}),(r||s)&&e.blockInitialAnimation&&(A=!1);const F=C&&T;A&&(!F||P)&&h.push(...L.map(R=>{const j={type:g};if(typeof R=="string"&&(r||s)&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:M}=e,Y=Is(M,R);if(M.enteringChildren&&Y){const{delayChildren:H}=Y.transition||{};j.delay=CE(M.enteringChildren,e,H)}}return{animation:R,options:j}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const g=Is(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(v.transition=g.transition)}f.forEach(g=>{const w=e.getBaseTarget(g),S=e.getValue(g);S&&(S.liveStyle=!0),v[g]=w??null}),h.push({animation:v})}let y=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var x;return(x=f.animationState)==null?void 0:x.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=l0(),s=!0}}}function bD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nk(t,e):!1}function as(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function l0(){return{animate:as(!0),whileInView:as(),whileHover:as(),whileTap:as(),whileDrag:as(),whileFocus:as(),exit:as()}}function ip(e,t){e.min=t.min,e.max=t.max}function tn(e,t){ip(e.x,t.x),ip(e.y,t.y)}function c0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const rk=1e-4,SD=1-rk,ED=1+rk,sk=.01,kD=0-sk,CD=0+sk;function dt(e){return e.max-e.min}function _D(e,t,n){return Math.abs(e-t)<=n}function u0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=dt(n)/dt(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=SD&&e.scale<=ED||isNaN(e.scale))&&(e.scale=1),(e.translate>=kD&&e.translate<=CD||isNaN(e.translate))&&(e.translate=0)}function oa(e,t,n,r){u0(e.x,t.x,n.x,r?r.originX:void 0),u0(e.y,t.y,n.y,r?r.originY:void 0)}function d0(e,t,n,r=0){const s=r?be(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+dt(t)}function TD(e,t,n,r){d0(e.x,t.x,n.x,r==null?void 0:r.x),d0(e.y,t.y,n.y,r==null?void 0:r.y)}function h0(e,t,n,r=0){const s=r?be(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+dt(t)}function lu(e,t,n,r){h0(e.x,t.x,n.x,r==null?void 0:r.x),h0(e.y,t.y,n.y,r==null?void 0:r.y)}function f0(e,t,n,r,s){return e-=t,e=au(e,1/n,r),s!==void 0&&(e=au(e,1/s,r)),e}function PD(e,t=0,n=1,r=.5,s,i=e,o=e){if(Dn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(i.min,i.max,r);e===i&&(a-=t),e.min=f0(e.min,t,n,a,s),e.max=f0(e.max,t,n,a,s)}function p0(e,t,[n,r,s],i,o){PD(e,t[n],t[r],t[s],t.scale,i,o)}const RD=["x","scaleX","originX"],AD=["y","scaleY","originY"];function m0(e,t,n,r){p0(e.x,t,RD,n?n.x:void 0,r?r.x:void 0),p0(e.y,t,AD,n?n.y:void 0,r?r.y:void 0)}function g0(e){return e.translate===0&&e.scale===1}function ik(e){return g0(e.x)&&g0(e.y)}function v0(e,t){return e.min===t.min&&e.max===t.max}function jD(e,t){return v0(e.x,t.x)&&v0(e.y,t.y)}function y0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ok(e,t){return y0(e.x,t.x)&&y0(e.y,t.y)}function w0(e){return dt(e.x)/dt(e.y)}function x0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function En(e){return[e("x"),e("y")]}function ND(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:x}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),x&&(r+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ak=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],OD=ak.length,b0=e=>typeof e=="string"?parseFloat(e):e,S0=e=>typeof e=="number"||B.test(e);function ID(e,t,n,r,s,i){s?(e.opacity=be(0,n.opacity??1,LD(r)),e.opacityExit=be(t.opacity??1,0,DD(r))):i&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<OD;o++){const a=ak[o];let l=E0(t,a),c=E0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||S0(l)===S0(c)?(e[a]=Math.max(be(b0(l),b0(c),r),0),(Dn.test(c)||Dn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function E0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const LD=lk(0,.5,Z1),DD=lk(.5,.95,qt);function lk(e,t,n){return r=>r<e?0:r>t?1:n(Oa(e,t,r))}function MD(e,t,n){const r=Je(e)?e:uo(e);return r.start(sg("",r,t,n)),r.animation}function Da(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const $D=(e,t)=>e.depth-t.depth;class FD{constructor(){this.children=[],this.isDirty=!1}add(t){Km(this.children,t),this.isDirty=!0}remove(t){tu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($D),this.isDirty=!1,this.children.forEach(t)}}function VD(e,t){const n=ut.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Qr(r),e(i-t))};return me.setup(r,!0),()=>Qr(r)}function gc(e){return Je(e)?e.get():e}class UD{constructor(){this.members=[]}add(t){Km(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(tu(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(tu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const vc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Jd=["","X","Y","Z"],BD=1e3;let zD=0;function Xd(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ck(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=AE(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",me,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ck(r)}function uk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=zD++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(KD),this.nodes.forEach(XD),this.nodes.forEach(ZD),this.nodes.forEach(qD)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new FD)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new qm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=dg(o)&&!HL(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;me.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=VD(h,250),vc.hasAnimatedSinceResize&&(vc.hasAnimatedSinceResize=!1,this.nodes.forEach(_0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||c.getDefaultTransition()||sM,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=c.getProps(),v=!this.targetLayout||!ok(this.targetLayout,f),g=!d&&h;if(this.options.layoutRoot||this.resumeFrom||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...rg(x,"layout"),onPlay:m,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,g)}else d||_0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Qr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(eM),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ck(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(YD),this.nodes.forEach(k0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(C0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(QD),this.nodes.forEach(JD),this.nodes.forEach(WD),this.nodes.forEach(HD)):this.nodes.forEach(C0),this.clearAllSnapshots();const a=ut.now();Ye.delta=$n(0,1e3/60,a-Ye.timestamp),Ye.timestamp=a,Ye.isProcessing=!0,zd.update.process(Ye),zd.preRender.process(Ye),zd.render.process(Ye),Ye.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(GD),this.sharedNodes.forEach(tM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!dt(this.snapshot.measuredBox.x)&&!dt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ue()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ik(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||hs(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),iM(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ue();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(oM))){const{scroll:u}=this.root;u&&(Pn(a.x,u.offset.x),Pn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Ue();if(tn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&tn(a,o),Pn(a.x,d.offset.x),Pn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var u,d;const c=l||Ue();tn(c,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Pn(c.x,-f.scroll.offset.x),Pn(c.y,-f.scroll.offset.y)),hs(f.latestValues)&&mc(c,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return hs(this.latestValues)&&mc(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(o){var l;const a=Ue();tn(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!hs(u.latestValues))continue;let d;u.instance&&(np(u.latestValues)&&u.updateSnapshot(),d=Ue(),tn(d,u.measurePageBox())),m0(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return hs(this.latestValues)&&m0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ye.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Ye.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ue(),this.targetWithTransforms=Ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),TD(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tn(this.target,this.layout.layoutBox),qE(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||np(this.parent.latestValues)||KE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ue(),this.relativeTargetOrigin=Ue(),lu(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),tn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ye.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;tn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;nD(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ue());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(c0(this.prevProjectionDelta.x,this.projectionDelta.x),c0(this.prevProjectionDelta.y,this.projectionDelta.y)),oa(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!x0(this.projectionDelta.x,this.prevProjectionDelta.x)||!x0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ti(),this.projectionDelta=Ti(),this.projectionDeltaWithTransform=Ti()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ti();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ue(),f=l?l.source:void 0,x=this.layout?this.layout.source:void 0,m=f!==x,y=this.getStack(),v=!y||y.members.length<=1,g=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(rM));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const E=S/1e3;T0(d.x,o.x,E),T0(d.y,o.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lu(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),nM(this.relativeTarget,this.relativeTargetOrigin,h,E),w&&jD(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ue()),tn(w,this.relativeTarget)),m&&(this.animationValues=u,ID(u,c,this.latestValues,E,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Qr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=me.update(()=>{vc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=uo(0)),this.motionValue.jump(0,!1),this.currentAnimation=MD(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(BD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&dk(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ue();const d=dt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=dt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}tn(a,l),mc(a,u),oa(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new UD),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Xd("z",o,c,this.animationValues);for(let u=0;u<Jd.length;u++)Xd(`rotate${Jd[u]}`,o,c,this.animationValues),Xd(`skew${Jd[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=gc(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=gc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!hs(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=ND(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:f}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const x in sp){if(u[x]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=sp[x],g=d==="none"?u[x]:m(u[x],c);if(y){const w=y.length;for(let S=0;S<w;S++)o[y[S]]=g}else v?this.options.visualElement.renderState.vars[x]=g:o[x]=g}this.options.layoutId&&(o.pointerEvents=c===this?gc(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(k0),this.root.sharedNodes.clear()}}}function WD(e){e.updateLayout()}function HD(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")En(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=dt(h);h.min=r[d].min,h.max=h.min+f});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";ip(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else dk(i,t.layoutBox,r)&&En(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=dt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Ti();oa(a,r,t.layoutBox);const l=Ti();o?oa(l,e.applyTransform(s,!0),t.measuredBox):oa(l,r,t.layoutBox);const c=!ik(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const x=e.options.layoutAnchor||void 0,m=Ue();lu(m,t.layoutBox,h.layoutBox,x);const y=Ue();lu(y,r,f.layoutBox,x),ok(m,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function KD(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function qD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function GD(e){e.clearSnapshot()}function k0(e){e.clearMeasurements()}function YD(e){e.isLayoutDirty=!0,e.updateLayout()}function C0(e){e.isLayoutDirty=!1}function QD(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function JD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XD(e){e.resolveTargetDelta()}function ZD(e){e.calcProjection()}
163function eM(e){e.resetSkewAndRotation()}function tM(e){e.removeLeadSnapshot()}function T0(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function P0(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function nM(e,t,n,r){P0(e.x,t.x,n.x,r),P0(e.y,t.y,n.y,r)}function rM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sM={duration:.45,ease:[.4,0,.1,1]},R0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),A0=R0("applewebkit/")&&!R0("chrome/")?Math.round:qt;function j0(e){e.min=A0(e.min),e.max=A0(e.max)}function iM(e){j0(e.x),j0(e.y)}function dk(e,t,n){return e==="position"||e==="preserve-aspect"&&!_D(w0(t),w0(n),.2)}function oM(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const aM=uk({attachResizeListener:(e,t)=>Da(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Zd={current:void 0},hk=uk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zd.current){const e=new aM({});e.mount(window),e.setOptions({layoutScroll:!0}),Zd.current=e}return Zd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),gg=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function N0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lM(...e){return t=>{let n=!1;const r=e.map(s=>{const i=N0(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():N0(e[s],null)}}}}function cM(...e){return b.useCallback(lM(...e),e)}class uM extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(dc(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=dc(r)&&r.offsetWidth||0,i=dc(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dM({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var h;const o=b.useId(),a=b.useRef(null),l=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=b.useContext(gg),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=cM(a,u);return b.useInsertionEffect(()=>{const{width:f,height:x,top:m,left:y,right:v,bottom:g}=l.current;if(t||i===!1||!a.current||!f||!x)return;const w=n==="left"?`left: ${y}`:`right: ${v}`,S=r==="bottom"?`bottom: ${g}`:`top: ${m}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const k=s??document.head;return k.appendChild(E),E.sheet&&E.sheet.insertRule(`
164          [data-motion-pop-id="${o}"] {
165            position: absolute !important;
166            width: ${f}px !important;
167            height: ${x}px !important;
168            ${w}px !important;
169            ${S}px !important;
170          }
171        `),()=>{var C;(C=a.current)==null||C.removeAttribute("data-motion-pop-id"),k.contains(E)&&k.removeChild(E)}},[t]),p.jsx(uM,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:b.cloneElement(e,{ref:d})})}const hM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=Hm(fM),d=b.useId();let h=!0,f=b.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:x=>{u.set(x,!0);for(const m of u.values())if(!m)return;r&&r()},register:x=>(u.set(x,!1),()=>u.delete(x))}),[n,u,r]);return i&&h&&(f={...f}),b.useMemo(()=>{u.forEach((x,m)=>u.set(m,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=p.jsx(dM,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),p.jsx(Hu.Provider,{value:f,children:e})};function fM(){return new Map}function fk(e=!0){const t=b.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=b.useId();b.useEffect(()=>{if(e)return s(i)},[e]);const o=b.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Il=e=>e.key||"";function O0(e){const t=[];
vendor: 5,384 bytes, line 171
171return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const eh=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=fk(o),h=b.useMemo(()=>O0(e),[e]),f=o&&!u?[]:h.map(Il),x=b.useRef(!0),m=b.useRef(h),y=Hm(()=>new Map),v=b.useRef(new Set),[g,w]=b.useState(h),[S,E]=b.useState(h);U1(()=>{x.current=!1,m.current=h;for(let T=0;T<S.length;T++){const A=Il(S[T]);f.includes(A)?(y.delete(A),v.current.delete(A)):y.get(A)!==!0&&y.set(A,!1)}},[S,f.length,f.join("-")]);const k=[];if(h!==g){let T=[...h];for(let A=0;A<S.length;A++){const P=S[A],L=Il(P);f.includes(L)||(T.splice(A,0,P),k.push(P))}return i==="wait"&&k.length&&(T=k),E(O0(T)),w(h),null}const{forceRender:C}=b.useContext(Wm);return p.jsx(p.Fragment,{children:S.map(T=>{const A=Il(T),P=o&&!u?!1:h===S||f.includes(A),L=()=>{if(v.current.has(A))return;if(y.has(A))v.current.add(A),y.set(A,!0);else return;let N=!0;y.forEach(W=>{W||(N=!1)}),N&&(C==null||C(),E(m.current),o&&(d==null||d()),r&&r())};return p.jsx(hM,{isPresent:P,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:P?void 0:L,anchorX:a,anchorY:l,children:T},A)})})},pk=b.createContext({strict:!1}),I0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let L0=!1;function pM(){if(L0)return;const e={};for(const t in I0)e[t]={isEnabled:n=>I0[t].some(r=>!!n[r])};zE(e),L0=!0}function mk(){return pM(),XL()}function mM(e){const t=mk();for(const n in e)t[n]={...t[n],...e[n]};zE(t)}const gM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function cu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gM.has(e)}let gk=e=>!cu(e);function vM(e){typeof e=="function"&&(gk=t=>t.startsWith("on")?!cu(t):e(t))}try{vM(require("@emotion/is-prop-valid").default)}catch{}function yM(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Je(e[s])||(gk(s)||n===!0&&cu(s)||!t&&!cu(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Qu=b.createContext({});function wM(e,t){if(Yu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||La(n)?n:void 0,animate:La(r)?r:void 0}}return e.inherit!==!1?t:{}}function xM(e){const{initial:t,animate:n}=wM(e,b.useContext(Qu));return b.useMemo(()=>({initial:t,animate:n}),[D0(t),D0(n)])}function D0(e){return Array.isArray(e)?e.join(" "):e}const vg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vk(e,t,n){for(const r in t)!Je(t[r])&&!QE(r,n)&&(e[r]=t[r])}function bM({transformTemplate:e},t){return b.useMemo(()=>{const n=vg();return pg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function SM(e,t){const n=e.style||{},r={};return vk(r,n,e),Object.assign(r,bM(e,t)),r}function EM(e,t){const n={},r=SM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const yk=()=>({...vg(),attrs:{}});function kM(e,t,n,r){const s=b.useMemo(()=>{const i=yk();return JE(i,t,ZE(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};vk(i,e.style,e),s.style={...i,...s.style}}return s}const CM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yg(e){return typeof e!="string"||e.includes("-")?!1:!!(CM.indexOf(e)>-1||/[A-Z]/u.test(e))}function _M(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??yg(e)?kM:EM)(t,r,s,e),c=yM(t,typeof e=="string",i),u=e!==b.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=b.useMemo(()=>Je(d)?d.get():d,[d]);return b.createElement(e,{...u,children:h})}function TM({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:PM(n,r,s,e),renderState:t()}}function PM(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=gc(i[h]);let{initial:o,animate:a}=e;const l=Yu(e),c=UE(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Gu(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const x=ig(e,h[f]);if(x){const{transitionEnd:m,transition:y,...v}=x;for(const g in v){let w=v[g];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(s[g]=w)}for(const g in m)s[g]=m[g]}}}return s}
vendor: 10,198 bytes, line 171
171const wk=e=>(t,n)=>{const r=b.useContext(Qu),s=b.useContext(Hu),i=()=>TM(e,t,r,s);return n?i():Hm(i)},RM=wk({scrapeMotionValuesFromProps:mg,createRenderState:vg}),AM=wk({scrapeMotionValuesFromProps:ek,createRenderState:yk}),jM=Symbol.for("motionComponentSymbol");function NM(e,t,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i));const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const xk=b.createContext({});function li(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function OM(e,t,n,r,s,i){var w,S;const{visualElement:o}=b.useContext(Qu),a=b.useContext(pk),l=b.useContext(Hu),c=b.useContext(gg),u=c.reducedMotion,d=c.skipAnimations,h=b.useRef(null),f=b.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const x=h.current,m=b.useContext(xk);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&IM(h.current,n,s,m);const y=b.useRef(!1);b.useInsertionEffect(()=>{x&&y.current&&x.update(n,l)});const v=n[RE],g=b.useRef(!!v&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,v)));return U1(()=>{f.current=!0,x&&(y.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),g.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!g.current&&x.animationState&&x.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,v)}),g.current=!1),x.enteringChildren=void 0)}),x}function IM(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bk(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&li(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function bk(e){if(e)return e.options.allowProjection!==!1?e.projection:bk(e.parent)}function th(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&mM(r);const i=n?n==="svg":yg(e),o=i?AM:RM;function a(c,u){let d;const h={...b.useContext(gg),...c,layoutId:LM(c)},{isStatic:f}=h,x=xM(c),m=o(c,f);if(!f&&typeof window<"u"){DM();const y=MM(h);d=y.MeasureLayout,x.visualElement=OM(e,m,h,s,y.ProjectionNode,i)}return p.jsxs(Qu.Provider,{value:x,children:[d&&x.visualElement?p.jsx(d,{visualElement:x.visualElement,...h}):null,_M(e,c,NM(m,x.visualElement,u),m,f,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=b.forwardRef(a);return l[jM]=e,l}function LM({layoutId:e}){const t=b.useContext(Wm).id;return t&&e!==void 0?t+"-"+e:e}function DM(e,t){b.useContext(pk).strict}function MM(e){const t=mk(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function $M(e,t){if(typeof Proxy>"u")return th;const n=new Map,r=(i,o)=>th(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,th(o,void 0,e,t)),n.get(o))})}const FM=(e,t)=>t.isSVG??yg(e)?new mD(t):new cD(t,{allowProjection:e!==b.Fragment});class VM extends es{constructor(t){super(t),t.animationState||(t.animationState=xD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let UM=0;class BM extends es{constructor(){super(...arguments),this.id=UM++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=Is(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...d}=l;for(const h in d)(i=this.node.getValue(h))==null||i.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const zM={animation:{Feature:VM},exit:{Feature:BM}};function ol(e){return{point:{x:e.pageX,y:e.pageY}}}const WM=e=>t=>ug(t)&&e(t,ol(t));function aa(e,t,n,r){return Da(e,t,WM(n),r)}const Sk=({current:e})=>e?e.ownerDocument.defaultView:null,M0=(e,t)=>Math.abs(e-t);function HM(e,t){const n=M0(e.x,t.x),r=M0(e.y,t.y);return Math.sqrt(n**2+r**2)}const $0=new Set(["auto","scroll"]);class Ek{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ll(this.lastRawMoveEventInfo,this.transformPagePoint));const f=nh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,m=HM(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!m)return;const{point:y}=f,{timestamp:v}=Ye;this.history.push({...y,timestamp:v});const{onStart:g,onMove:w}=this.handlers;x||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,x)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=Ll(x,this.transformPagePoint),me.update(this.updatePoint,!0)},this.handlePointerUp=(f,x)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=nh(f.type==="pointercancel"?this.lastMoveEventInfo:Ll(x,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,g),y&&y(f,g)},!ug(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=ol(t),c=Ll(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Ye;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,nh(c,this.history)),this.removeListeners=rl(aa(this.contextWindow,"pointermove",this.handlePointerMove),aa(this.contextWindow,"pointerup",this.handlePointerUp),aa(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);($0.has(r.overflowX)||$0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),me.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Qr(this.updatePoint)}}function Ll(e,t){return t?{point:t(e.point)}:e}function F0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nh({point:e},t){return{point:e,delta:F0(e,kk(t)),offset:F0(e,KM(t)),velocity:qM(t,.1)}}function KM(e){return e[0]}function kk(e){return e[e.length-1]}function qM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=kk(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Ct(t)*2&&(r=e[1]);const i=Ht(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function GM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function V0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function YM(e,{top:t,left:n,bottom:r,right:s}){return{x:V0(e.x,n,s),y:V0(e.y,t,r)}}function U0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function QM(e,t){return{x:U0(e.x,t.x),y:U0(e.y,t.y)}}function JM(e,t){let n=.5;const r=dt(e),s=dt(t);return s>r?n=Oa(t.min,t.max-r,e.min):r>s&&(n=Oa(e.min,e.max-s,t.min)),$n(0,1,n)}function XM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const op=.35;function ZM(e=op){return e===!1?e=0:e===!0&&(e=op),{x:B0(e,"left","right"),y:B0(e,"to
171p","bottom")}}function B0(e,t,n){return{min:z0(e,t),max:z0(e,n)}}function z0(e,t){return typeof e=="number"?e:e[t]||0}const e4=new WeakMap;class t4{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ue(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(ol(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:x,onDragStart:m}=this.getProps();if(f&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=PL(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),En(v=>{let g=this.getAxisMotionValue(v).get()||0;if(Dn.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[v];S&&(g=dt(S)*(parseFloat(g)/100))}}this.originPoint[v]=g}),m&&me.update(()=>m(d,h),!1,!0),Jf(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:x,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(x&&this.currentDirection===null){this.currentDirection=r4(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&me.update(()=>y(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ek(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Sk(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&me.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Dl(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=GM(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&li(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=YM(r.layoutBox,t):this.constraints=!1,this.elastic=ZM(n),s!==this.constraints&&!li(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&En(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=XM(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!li(t))return!1;const r=t.current;lo(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=rD(r,s.root,this.visualElement.getTransformPagePoint());let o=QM(s.layout.layoutBox,i);if(n){const a=n(eD(o));this.hasMutatedConstraints=!!a,a&&(o=HE(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=En(u=>{if(!Dl(u,n,this.currentDirection))return;let d=l&&l[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,x={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,x)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jf(this.visualElement,t),r.start(sg(t,r,0,n,this.visualElement,!1))}stopAnimation(){En(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){En(n=>{const{drag:r}=this.getProps();if(!Dl(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-be(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!li(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};En(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=JM({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),En(o=>
vendor: 5,742 bytes, line 171
171{if(!Dl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;e4.set(this.visualElement,this);const t=this.visualElement.current,n=aa(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,f=h!==t&&IL(h);u&&d&&!f&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();li(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=n4(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),me.read(s);const a=Da(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(En(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=op,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function W0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function n4(e,t,n){const r=Jy(e,W0(n)),s=Jy(t,W0(n));return()=>{r(),s()}}function Dl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function r4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class s4 extends es{constructor(t){super(t),this.removeGroupControls=qt,this.removeListeners=qt,this.controls=new t4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const rh=e=>(t,n)=>{e&&me.update(()=>e(t,n),!1,!0)};class i4 extends es{constructor(){super(...arguments),this.removePointerDownListener=qt}onPointerDown(t){this.session=new Ek(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:rh(t),onStart:rh(n),onMove:rh(r),onEnd:(i,o)=>{delete this.session,s&&me.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=aa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sh=!1;class o4 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),sh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),vc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),sh=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||me.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),cg.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;sh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ck(e){const[t,n]=fk(),r=b.useContext(Wm);return p.jsx(o4,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(xk),isPresent:t,safeToRemove:n})}const a4={pan:{Feature:i4},drag:{Feature:s4,ProjectionNode:hk,MeasureLayout:Ck}};function H0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&me.postRender(()=>i(t,ol(t)))}class l4 extends es{mount(){const{current:t}=this.node;t&&(this.unmount=AL(t,(n,r)=>(H0(this.node,r,"Start"),s=>H0(this.node,s,"End"))))}unmount(){}}class c4 extends es{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=rl(Da(this.node.current,"focus",()=>this.onFocus()),Da(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function K0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&me.postRender(()=>i(t,ol(t)))}class u4 extends es{mount(){const{current:t}=this.node;if(!t)return;
vendor: 4,184 bytes, line 171
171const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=DL(t,(s,i)=>(K0(this.node,i,"Start"),(o,{success:a})=>K0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const ap=new WeakMap,ih=new WeakMap,d4=e=>{const t=ap.get(e.target);t&&t(e)},h4=e=>{e.forEach(d4)};function f4({root:e,...t}){const n=e||document;ih.has(n)||ih.set(n,{});const r=ih.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(h4,{root:e,...t})),r[s]}function p4(e,t,n){const r=f4(t);return ap.set(e,n),r.observe(e),()=>{ap.delete(e),r.unobserve(e)}}const m4={some:0,all:1};class g4 extends es{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:m4[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};this.stopObserver=p4(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(v4(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function v4({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const y4={inView:{Feature:g4},tap:{Feature:u4},focus:{Feature:c4},hover:{Feature:l4}},w4={layout:{ProjectionNode:hk,MeasureLayout:Ck}},x4={...zM,...y4,...a4,...w4},_e=$M(x4,FM),b4={some:0,all:1};function S4(e,t,{root:n,margin:r,amount:s="some"}={}){const i=lg(e),o=new WeakMap,a=c=>{c.forEach(u=>{const d=o.get(u.target);if(u.isIntersecting!==!!d)if(u.isIntersecting){const h=t(u.target,u);typeof h=="function"?o.set(u.target,h):l.unobserve(u.target)}else typeof d=="function"&&(d(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof s=="number"?s:b4[s]});return i.forEach(c=>l.observe(c)),()=>l.disconnect()}function E4(e,{root:t,margin:n,amount:r,once:s=!1,initial:i=!1}={}){const[o,a]=b.useState(i);return b.useEffect(()=>{if(!e.current||s&&o)return;const l=()=>(a(!0),s?void 0:()=>a(!1)),c={root:t&&t.current||void 0,margin:n,amount:r};return S4(e.current,l,c)},[t,e,n,s,r]),o}const q0=[{label:"Chi sono",href:"#chi-sono"},{label:"Trasparenza",children:[{label:"Testimonianze",href:"#testimonianze"},{label:"Articoli su di me",href:"https://www.davidecaiazzo.it/parlano-di-me",external:!0},{label:"Affermazioni di primato",href:"https://www.davidecaiazzo.it/primato",external:!0},{label:"Casi studio",href:"https://www.davidecaiazzo.it/casi-studio",external:!0},{label:"I miei clienti",href:"https://www.davidecaiazzo.it/alcuni-miei-clienti",external:!0}]},{label:"Risorse",children:[{label:"🎙️ Podcast",href:"https://open.spotify.com/show/0GbOtmZRorC2GgIJEkpkkM?si=VF_ZnbbeQU6WmQPyPFXLgQ",external:!0},{label:"📰 Newsletter",href:"https://www.davidecaiazzo.it/blog",external:!0},{label:"📁 Guide Gratuite",href:"https://dcacademy.it/",external:!0},{label:"📕 Libro Feltrinelli (LinkedIn)",href:"https://www.amazon.it/dp/8858056310",external:!0},{label:"📗 Libro Feltrinelli (Personal Branding)",href:"https://www.amazon.it/personal-branding-Ottenere-immagine-attrarre/dp/8858041399",external:!0},{label:"🎬 I 4 step per trovare clienti",href:"http://clienti.davidecaiazzo.it/?utm_source=organic-website&utm_medium=funnel-vsl",external:!0}]},{label:"Servizi",children:[{label:"Coaching 1:1",href:"https://calendly.com/dc-academy-team/consulenza-strategica-gratuita-linkedin-dc-academy?utm_source=seo&utm_campaign=calendly&utm_medium=davidecaiazzo.it&utm_content=menu_navigation_coaching",external:!0},{label:"Delega Totale",href:"https://calendly.com/dc-academy-team/consulenza-strategica-gratuita-linkedin-dc-academy?utm_source=seo&utm_campaign=calendly&utm_medium=davidecaiazzo.it&utm_c
171ontent=menu_navigation_delega",external:!0},{label:"Speaker",href:"https://calendly.com/davidecaiazzo/speaker?utm_source=seo&utm_campaign=calendly&utm_medium=davidecaiazzo.it&utm_content=menu_speaker",external:!0}]},{label:"Login",href:"https://www.davidecaiazzo.it/login",external:!0}],k4=({items:e,onClose:t,onNavigate:n})=>p.jsx(_e.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.2},className:"absolute top-full left-1/2 -translate-x-1/2 mt-2 min-w-[240px] rounded-xl border border-border bg-card/95 backdrop-blur-xl shadow-xl overflow-hidden z-50",children:e.map(r=>p.jsx("a",{href:r.href,target:r.external?"_blank":void 0,rel:r.external?"noopener noreferrer":void 0,onClick:s=>{t(),n(s,r)},className:"block px-5 py-3 text-sm text-foreground/80 hover:bg-primary/10 hover:text-primary transition-colors",children:r.label},r.label))}),C4=()=>{const[e,t]=b.useState(!1),[n,r]=b.useState(null),[s,i]=b.useState(!1),o=b.useRef();b.useEffect(()=>{const u=()=>t(window.scrollY>20);return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[]);const a=u=>{clearTimeout(o.current),r(u)},l=()=>{o.current=setTimeout(()=>r(null),150)},c=(u,d)=>{if(i(!1),r(null),d.external)return;if(u.preventDefault(),d.href.startsWith("/")){window.location.href=d.href;return}const h=document.querySelector(d.href);h==null||h.scrollIntoView({behavior:"smooth",block:"start"})};return p.jsxs("nav",{className:`fixed top-0 left-0 right-0 z-[100] transition-all duration-500 ${e?"bg-background/90 backdrop-blur-xl border-b border-border/50 shadow-lg":"bg-transparent"}`,children:[p.jsxs("div",{className:"max-w-7xl mx-auto px-6 flex items-center justify-between h-16",children:[p.jsx("a",{href:"#",onClick:u=>{u.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})},className:"font-display text-xl md:text-2xl font-bold text-foreground tracking-wide",children:"DAVIDE CAIAZZO"}),p.jsxs("div",{className:"hidden md:flex items-center gap-1",children:[q0.map(u=>u.children?p.jsxs("div",{className:"relative",onMouseEnter:()=>a(u.label),onMouseLeave:l,children:[p.jsxs("button",{className:"flex items-center gap-1 px-4 py-2 text-sm font-medium text-foreground/70 hover:text-foreground transition-colors rounded-lg",children:[u.label,p.jsx(Qc,{className:`w-3.5 h-3.5 transition-transform duration-200 ${n===u.label?"rotate-180":""}`})]}),p.jsx(eh,{children:n===u.label&&p.jsx(k4,{items:u.children,onClose:()=>r(null),onNavigate:c})})]},u.label):p.jsx("a",{href:u.href,target:u.external?"_blank":void 0,rel:u.external?"noopener noreferrer":void 0,onClick:d=>c(d,{href:u.href,external:u.external}),className:"px-4 py-2 text-sm font-medium text-foreground/70 hover:text-foreground transition-colors rounded-lg",children:u.label},u.label)),p.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"ml-4 px-6 py-2.5 rounded-full bg-[hsl(120,60%,45%)] hover:bg-[hsl(120,60%,40%)] text-white text-sm font-bold tracking-wide transition-colors",href:"https://calendly.com/dc-academy-team/consulenza-strategica-gratuita-linkedin-dc-academy?utm_source=seo&utm_campaign=calendly&utm_medium=davidecaiazzo.it&utm_content=consulenza_gratuita_bottone_menu",children:"Prenota una Consulenza"})]}),p.jsx("button",{className:"md:hidden text-foreground p-2",onClick:()=>i(!s),children:s?p.jsx(Nm,{className:"w-6 h-6"}):p.jsx(qj,{className:"w-6 h-6"})})]}),p.jsx(eh,{children:s&&p.jsx(_e.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden bg-background/95 backdrop-blur-xl border-t border-border overflow-hidden",children:p.jsxs("div",{className:"px-6 py-4 space-y-1",children:[q0.map(u=>u.children?p.jsxs("div",{children:[p.jsxs("button",{onClick:()=>r(n===u.label?null:u.label),className:"flex items-center justify-between w-full px-3 py-3 text-sm font-medium text-foreground/70",children:[u.label,p.jsx(Qc,{className:`w-4 h-4 transition-transform ${n===u.label?"rotate-180":""}`})]}),p.jsx(eh,{children:n===u.label&&p.jsx(_e.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"pl-4 space-y-1",children:u.children.map(d=>p.jsx("a",{href:d.href,target:d.external?"_blank":void 0,rel:d.external?"noopener noreferrer":void 0,onClick:h=>
171c(h,d),className:"block px-3 py-2 text-sm text-foreground/60 hover:text-primary",children:d.label},d.label))})})]},u.label):p.jsx("a",{href:u.href,onClick:d=>c(d,{href:u.href}),className:"block px-3 py-3 text-sm font-medium text-foreground/70",children:u.label},u.label)),p.jsx("a",{href:"https://www.davidecaiazzo.it/prenota",target:"_blank",rel:"noopener noreferrer",className:"block text-center mt-3 px-6 py-3 rounded-full bg-[hsl(120,60%,45%)] text-white text-sm font-bold",children:"Prenota una Consulenza"})]})})})]})},_4=()=>p.jsx("div",{className:"bg-card/80 border-b border-border/50 py-3 px-4 mt-16",children:p.jsx("div",{className:"max-w-5xl mx-auto text-center",children:p.jsxs("p",{className:"text-sm font-mono",children:["I contenuti di questo sito hanno natura pubblicitaria a favore della DC Academy S.r.l. ·"," ","Per qualsiasi approfondimento sui nostri servizi, clienti, testimonianze, testate e sui numeri citati su questo sito visita la pagina: www.davidecaiazzo.it/trasparenza",p.jsx("br",{}),p.jsx("a",{href:"https://www.davidecaiazzo.it/trasparenza",target:"_blank",rel:"noopener noreferrer",className:"text-primary/70 hover:text-primary underline underline-offset-2 transition-colors"})]})})}),T4=()=>p.jsxs("section",{className:"relative flex flex-col overflow-hidden grain",children:[p.jsxs("div",{className:"relative h-[520px] md:h-[620px] lg:h-[700px] flex items-center justify-center bg-background",children:[p.jsx("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-contain",children:p.jsx("source",{src:"/hero-video.mp4",type:"video/mp4"})}),p.jsx("div",{className:"absolute inset-0 bg-background/35"}),p.jsxs("div",{className:"relative z-20 text-center px-6 max-w-5xl mx-auto pt-12 md:pt-16",children:[p.jsxs(_e.h1,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:1,delay:.3,ease:[.16,1,.3,1]},className:"font-display text-5xl md:text-7xl lg:text-[5.5rem] font-bold leading-[1.05] mb-6",children:[p.jsx("span",{className:"text-foreground"})," ",p.jsx("span",{className:"text-gradient-gold"})]}),p.jsx(_e.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.6},className:"mb-10",children:p.jsx("p",{className:"text-primary text-sm md:text-base font-medium tracking-wide",children:`
172`})})]}),p.jsx(_e.div,{initial:{opacity:0}
172,animate:{opacity:1},transition:{delay:1.5},className:"absolute bottom-8 left-1/2 -translate-x-1/2 z-20",children:p.jsx(_e.div,{animate:{y:[0,8,0]},transition:{repeat:1/0,duration:2},className:"w-5 h-8 border-2 border-primary/30 rounded-full flex items-start justify-center p-1",children:p.jsx("div",{className:"w-1 h-2 bg-primary rounded-full"})})})]}),p.jsx(_e.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.8},className:"relative z-30 py-8 text-center bg-background",children:p.jsx("a",{href:"#credenziali",onClick:e=>{var t;e.preventDefault(),(t=document.getElementById("credenziali"))==null||t.scrollIntoView({behavior:"smooth"})},className:"inline-block px-10 py-4 rounded-full bg-gold-gradient text-primary-foreground font-bold text-sm tracking-wider uppercase hover:shadow-gold-lg transition-shadow duration-500 cursor-pointer animate-pulse-ring",children:"Scopri di più"})})]}),P4=(e,t=2e3,n=!1)=>{const[r,s]=b.useState(0);return b.useEffect(()=>{if(!n)return;let i;const o=a=>{i||(i=a);const l=Math.min((a-i)/t,1),c=1-Math.pow(1-l,3);s(Math.floor(c*e)),l<1&&requestAnimationFrame(o)};requestAnimationFrame(o)},[e,t,n]),r},R4=({value:e,prefix:t="",suffix:n="",label:r,delay:s,inView:i})=>{const o=P4(e,2e3,i);return p.jsxs(_e.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:s},whileHover:{scale:1.05,y:-5},className:"text-center group cursor-default",children:[p.jsxs("div",{className:"text-5xl md:text-6xl lg:text-7xl font-display font-bold text-gradient-gold-shimmer mb-3",children:[t,o,n]}),p.jsx("div",{className:"text-muted-foreground text-sm md:text-base font-light tracking-wide uppercase group-hover:text-foreground/70 transition-colors duration-300",children:r})]})},A4=()=>{const e=b.useRef(null),t=E4(e,{once:!0,margin:"-100px"}),n=[{value:10,suffix:"M",label:"EXIT DA 10 MILIONI DI EURO",delay:0},{value:7,label:"AZIENDE FONDATE",delay:.15},{value:500,prefix:"+",label:"Recensioni",delay:.3},{value:2,suffix:"x",label:"TEDx Speaker",delay:.45}];return p.jsxs("section",{id:"credenziali",ref:e,className:"py-24 md:py-36 px-6 relative grain",children:[p.jsx("div",{className:"absolute inset-0 bg-secondary/20"}),p.jsx("div",{className:"relative z-10 max-w-6xl mx-auto",children:p.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-10 md:gap-16",children:n.map((r,s)=>p.jsx(R4,{...r,inView:t},s))})})]})},G0=["Il Sole 24 ORE","Corriere della Sera","VANITY FAIR","Forbes","Sky","ANSA","ELLE","Feltrinelli"],j4=()=>p.jsxs("section",{className:"py-12 overflow-hidden border-y border-border/50 relative",children:[p.jsx("div",{className:"absolute inset-0 bg-card/50"}),p.jsx("p",{className:"text-center text-muted-foreground text-xs tracking-[0.4em] uppercase mb-8 relative z-10",children:"Visto su"}),p.jsx("div",{className:"relative z-10",children:p.jsx("div",{className:"flex animate-marquee whitespace-nowrap",children:[...G0,...G0].map((e,t)=>p.jsx("a",{href:"https://www.davidecaiazzo.it/parlano-di-me",target:"_blank",rel:"noopener noreferrer",className:"mx-10 md:mx-16 text-foreground/40 hover:text-foreground/70 transition-colors text-xl md:text-2xl font-display font-bold tracking-wider inline-block",children:e},t))})})]}),N4="/assets/foto_libri-CcHgO1Jf.png",O4="https://www.amazon.it/LinkedIn%C2%A9-definitiva-sfruttare-professionale-importante/dp/8858056310/ref=sr_1_1?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=16U9H58IA5L8I&dib=eyJ2IjoiMSJ9.ttlmxrk5Xyu15k6bZnsvrMnnfKud8ru84eh7jaTVgR3Rs6uZpPOpok6PVsy8bdxEV2BrsSXk6vUJvOlfIeXXt_kaP4zen9Y2wbp6yP5Ji_k.wlBKdhREYoYnh-6alfZZ06ZWrB2ZI3vJ1ro0YeN5XMk&dib_tag=se&keywords=davide+caiazzo&qid=1769412477&sprefix=davide+caiazzo%2Caps%2C230&sr=8-1",I4="https://www.amazon.it/personal-branding-Ottenere-immagine-attrarre/dp/8858041399",L4=({src:e,alt:t,className:n})=>{const r=b.useRef(null),[s,i]=b.useState({x:50,y:50}),[o,a]=b.useState(!1),l=b.useCallback(c=>{var f;const u=(f=r.current)==null?void 0:f.getBoundingClientRect();if(!u)return;const d=(c.clientX-u.left)/u.width*100,h=(c.clientY-u.top)/u.height*100;i({x:d,y:h})},[]);return p.jsxs("div",{ref:r,className:`relative cursor-none overflow-hidden ${n}`,onMouseMove:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[p.jsx("img",{src:e,alt:t,className:"w-full h-full object-cover grayscale"}),p.jsx("img",{src:e,alt:"",className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-300",style:{opacity:o?1:0,maskImage:`radial-gradient(circle 120px at ${s.x}% ${s.y}%, black 0%, black 60%, transparent 100%)`,WebkitMaskImage:`radial-gradient(circle 120px at ${s.x}% ${s.y}%, black 0%, black 60%, transparent 100%)`}}),o&&p.jsx("div",{className:"absolute w-[240px] h-[240px] rounded-full pointer-events-none border border-primary/20",style:{left:`${s.x}%`,top:`${s.y}%`,transform:"translate(-50%, -50%)",boxShadow:"0 0 40px 10px hsl(40 75% 52% / 0.1)"}})]})},D4=()=>p.jsxs("section",{id:"libri",className:"scroll-mt-24 py-20 md:py-32 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-card/30 to-background"}),p.jsx("div",{className:"max-w-7xl mx-auto px-6 relative z-10",children:p.jsxs("div",{className:"grid md:grid-cols-2 gap-12 md:gap-16 items-center",children:[p.jsx(_e.div,{initial:{opacity:0,x:-40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.8},className:"flex justify-center",children:p.jsx(L4,{src:N4,alt:"Davide Caiazzo con i libri Il Potere di LinkedIn e I Segreti del Personal Branding - Gruppo Feltrinelli",className:"w-full max-w-md md:max-w-lg rounded-lg"})}),p.jsxs(_e.div,{initial:{opacity:0,x:40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.8,delay:.2},children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.4em] uppercase mb-4 font-medium",children:"I Miei Libri editi dal Gruppo Feltrinelli"}),p.jsxs("h2",{className:"font-display text-3xl md:text-5xl font-bold text-foreground mb-6 leading-tight",children:["Trasforma il Tuo Personal Brand nel Tuo"," ",p.jsx("span",{className:"text-gradient-gold italic",children:"Vantaggio Competitivo"})," su LinkedIn"]}),p.jsxs("div",{className:"space-y-4 text-muted-foreground text-sm md:text-base leading-relaxed mb-8",children:[p.jsxs("p",{children:[p.jsx("strong",{className:"text-foreground",children:'"I Segreti del Personal Branding"'})," e"," ",p.jsx("strong",{className:"text-foreground",children:'"Il potere di LinkedIn"'})," sono due libri estremamente pratici, pensati per professionisti, manager e imprenditori che vogliono smettere di essere invisibili e iniziare a farsi scegliere."]}),p.jsxs("div",{className:"border-l-2 border-primary/40 pl-4 space-y-1 text-foreground
172/80 italic font-display",children:[p.jsx("p",{children:"Il personal brand non è immagine. È posizionamento."}),p.jsx("p",{children:"Non è storytelling. È credibilità."}),p.jsx("p",{children:"Se nessuno ti vede, non esisti."})]}),p.jsx("p",{children:"In Italia se ne parla ancora poco, ma oggi carriera, clienti e opportunità passano dalla capacità di rendere visibile il proprio valore. LinkedIn è lo strumento più potente per farlo, se sai come usarlo sul serio."}),p.jsx("p",{children:"In questi libri trovi un metodo concreto per costruire autorevolezza, fiducia e opportunità reali partendo dalle competenze che già hai, senza pose motivazionali o personaggi finti."}),p.jsxs("p",{children:["I nuovi media hanno cambiato le regole: chi comunica bene trasforma la visibilità in risultati."," ",p.jsx("strong",{className:"text-foreground",children:"Gli altri restano fermi."})]})]}),p.jsxs("div",{className:"space-y-3 mb-6",children:[p.jsxs("a",{href:O4,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 bg-primary/10 hover:bg-primary/20 border border-primary/30 rounded-lg px-5 py-3 transition-all group",children:[p.jsx("span",{className:"text-primary text-lg",children:"📖"}),p.jsx("span",{className:"text-foreground font-medium text-sm",children:'"Il potere di LinkedIn"'}),p.jsx("span",{className:"ml-auto text-primary text-xs tracking-wider uppercase group-hover:translate-x-1 transition-transform",children:"Acquista su Amazon →"})]}),p.jsxs("a",{href:I4,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 bg-primary/10 hover:bg-primary/20 border border-primary/30 rounded-lg px-5 py-3 transition-all group",children:[p.jsx("span",{className:"text-primary text-lg",children:"📖"}),p.jsx("span",{className:"text-foreground font-medium text-sm",children:'"I Segreti del Personal Branding"'}),p.jsx("span",{className:"ml-auto text-primary text-xs tracking-wider uppercase group-hover:translate-x-1 transition-transform",children:"Acquista su Amazon →"})]})]}),p.jsx("p",{className:"text-muted-foreground text-xs italic",children:"Un'opportunità immediata per CEO, manager, professionisti e dipendenti che vogliono crescere davvero."})]})]})})]}),M4="https://calendly.com/dc-academy-team/consulenza-strategica-gratuita-linkedin-dc-academy?utm_source=seo&utm_campaign=calendly&utm_medium=davidecaiazzo.it&utm_content=coaching_home_page_met%C3%A0_pagina",$4="https://calendly.com/dc-academy-team/consulenza-strategica-gratuita-linkedin-dc-academy?utm_source=seo&utm_campaign=calendly&utm_medium=davidecaiazzo.it&utm_content=delega_home_a_meta_pagina",F4=[{bold:"Strategia",text:"con Davide Caiazzo"},{bold:"3 mesi",text:"di Coaching"},{bold:"Affiancamento giornaliero per tutti i 3 mesi di Coaching",text:""},{bold:"12 settimane:",text:"una sessione a settimana"},{bold:"Creazione profilo funnel",text:"di vendita ottimizzato per convertire"},{bold:"Revisione contenuti",text:"e feedback diretto sui tuoi post"},{bold:"Template e script",text:"pronti all'uso per messaggi e connessioni"}],V4=["Master Personal Branding","Master Social Selling","Master Come Portare Lead in Chiamata"],U4=[{bold:"Accesso",text:"alla DC Community (gratuita a vita)"},{bold:"Commenti Davide Caiazzo",text:"su alcuni post"}],B4=[{bold:"Strategia",text:"con Davide Caiazzo"},{bold:"Team dedicato di 5 persone:",text:"3 esperti di posizionamento + 2 esperti di social selling"},{bold:"Creazione profilo funnel",text:"di vendita"},{bold:"1 post/settimana",text:"scritto e ottimizzato dal team per la massima viralità"},{bold:"Commenti Davide Caiazzo",text:"sotto alcuni post"},{bold:"Report + Allineamento",text:"mensile con i 2 team"},{bold:"Automazioni value-driven",text:"(e-mail + LinkedIn™) per 
172contattare dando valore ai clienti in target"},{bold:"Gestione completa",text:"del networking e delle connessioni strategiche"},{bold:"Ottimizzazione continua",text:"basata sui dati e le performance"}],oh=({bold:e,text:t})=>p.jsxs("li",{className:"flex items-start gap-3 group/item rounded-lg px-3 py-0.5 -mx-3 hover:bg-primary/5 transition-all duration-300 hover:translate-x-1 cursor-default",children:[p.jsx("span",{className:"mt-0.5 flex-shrink-0 w-5 h-5 rounded-full bg-primary/15 flex items-center justify-center group-hover/item:bg-primary/25 group-hover/item:scale-110 transition-all duration-300",children:p.jsx(jm,{className:"w-3 h-3 text-primary",strokeWidth:3})}),p.jsxs("span",{className:"text-foreground/90 text-[15px] leading-relaxed group-hover/item:text-foreground transition-colors duration-300",children:[p.jsx("strong",{className:"text-foreground",children:e}),t?` ${t}`:""]})]}),z4=()=>p.jsxs("section",{id:"prodotti",className:"scroll-mt-24 py-24 md:py-36 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-background"}),p.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,hsl(var(--primary)/0.04)_0%,transparent_70%)]"}),p.jsxs("div",{className:"max-w-6xl mx-auto px-6 relative z-10",children:[p.jsxs(_e.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"text-center mb-20",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.4em] uppercase mb-5 font-medium",children:"I Nostri Servizi"}),p.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold text-foreground mb-5 leading-[1.1]",children:["Scegli il Percorso"," ",p.jsx("span",{className:"text-gradient-gold italic",children:"Giusto per Te"})]}),p.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto text-base",children:"Due soluzioni concrete per trasformare LinkedIn nel tuo canale di acquisizione clienti principale."}),p.jsx("div",{className:"line-gold w-24 mx-auto mt-8"})]}),p.jsxs("div",{className:"grid md:grid-cols-2 gap-6 lg:gap-8",children:[p.jsxs(_e.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},whileHover:{y:-6},className:"group relative rounded-2xl border border-border bg-card p-8 md:p-10 flex flex-col hover:border-primary/30 card-hover-glow",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[p.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:p.jsx(Xj,{className:"w-5 h-5 text-primary"})}),p.jsxs("div",{children:[p.jsx("h3",{className:"text-xl md:text-2xl font-bold text-foreground tracking-tight",children:"COACHING 1:1 ÈLITE"}),p.jsx("p",{className:"text-muted-foreground text-xs mt-0.5",children:"Ti affianchiamo passo dopo passo per 3 mesi"})]})]}),p.jsxs("ul",{className:"space-y-1 flex-1",children:[F4.map((e,t)=>p.jsx(oh,{...e},t)),p.jsxs("li",{className:"flex items-start gap-3",children:[p.jsx("span",{className:"mt-0.5 flex-shrink-0 w-5 h-5 rounded-full bg-primary/15 flex items-center justify-center",children:p.jsx(jm,{className:"w-3 h-3 text-primary",strokeWidth:3})}),p.jsxs("div",{children:[p.jsx("strong",{className:"text-foreground text-[15px]",children:"Corsi Registrati"}),p.jsx("span",{className:"text-foreground/50 text-xs block mt-0.5",children:"(da completare prima dell'inizio del percorso)"}),p.jsx("ul",{className:"mt-2 space-y-1.5 ml-1",children:V4.map((e,t)=>p.jsxs("li",{className:"text-foreground/70 text-sm flex items-center gap-2",children:[p.jsx("span",{className:"w-1 h-1 rounded-full bg-primary/50"}),e]},t))})]})]}),U4.map((e,t)=>p.jsx(oh,{...e},t))]}),p.jsxs("div",{className:"mt-10 pt-6 border-t border-border",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[p.jsx(Fd,{className:"w-4 h-4 text-primary"}),p.jsxs("p",{className:"font-bold text-sm",children:[p.jsx("span",{className:"text-primary",children:"GARANZIA:"})," ",p.jsx("span",{className:"text-foreground",children:"x10 media impression sui post"})]})]}),p.jsx("a",{href:M4,target:"_blank",rel:"noopener noreferrer",className:"block w-full text-center bg-primary text-primary-foreground font-bold text-sm py-4 px-6 rounded-xl hover:shadow-[0_0_30px_hsl(var(--primary)/0.3)] hover:scale-[1.02] transition-all duration-300",children:"Prenota una Call Gratuita →"})]})]}),p.jsxs(_e.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.15},className:"group relative rounded-2xl border-2 border-primary/50 p-8 md:p-10 flex flex-col overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/8 via-card to-card"}),p.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-primary/5 rounded-full blur-3xl -translate-y-1/2 translate-x-1/4"}),p.jsxs("div",{className:"relative z-10 flex flex-col h-full",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[p.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/20 flex items-center justify-center",children:p.jsx(Fd,{className:"w-5 h-5 text-primary"})}),p.jsxs("div",{children:[p.jsx("h3",{className:"text-xl md:text-2xl font-bold text-foreground tracking-tight",children:"DELEGA TOTALE"}),p.jsx("p",{className:"text-muted-foreground text-xs mt-0.5",children:"Gestiamo il tuo LinkedIn dalla strategia alla pubblicazione"})]})]}),p.jsx("ul",{className:"space-y-1 flex-1",children:B4.map((e,t)=>p.jsx(oh,{...e},t))}),p.jsxs("div",{className:"mt-10 pt-6 border-t border-primary/20",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[p.jsx(Fd,{className:"w-4 h-4 text-primary"}),p.jsxs("p",{className:"font-bold text-sm",children:[p.jsx("span",{className:"text-primary",children:"GARANZIA:"})," ",p.jsx("span",{className:"text-foreground",children:"x10 media impression sui post"})]})]}),p.jsx("a",{href:$4,target:"_blank",rel:"noopener noreferrer",className:"block w-full text-center bg-primary text-primary-foreground font-bold text-sm py-4 px-6 rounded-xl hover:shadow-[0_0_30px_hsl(var(--primary)/0.3)] hover:scale-[1.02] transition-all duration-300",children:"Prenota una Call Gratuita →"})]})]})]})]})]})]});function Ju(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function W4(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
172return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const H4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class wg extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class K4 extends wg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Y0 extends wg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Q0 extends wg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var lp;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(lp||(lp={}));class q4{constructor(t,{headers:n={},customFetch:r,region:s=lp.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=H4(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return W4(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=r;let h={},{region:f}=r;f||(f=this.region);const x=new URL(`${this.url}/${n}`);f&&f!=="any"&&(h["x-region"]=f,x.searchParams.set("forceFunctionRegion",f));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(h["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(h["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let y=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(y=o.signal,u.addEventListener("abort",()=>o.abort())):y=o.signal);const v=yield this.fetch(x.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:m,signal:y}).catch(E=>{throw new K4(E)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new Y0(v);if(!v.ok)throw new Q0(v);let w=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return w==="application/json"?S=yield v.json():w==="application/octet-stream"||w==="application/pdf"?S=yield v.blob():w==="text/event-stream"?S=v:w==="multipart/form-data"?S=yield v.formData():S=yield v.text(),{data:S,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Q0||a instanceof Y0?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var G4=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
172de=e.code}},Y4=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,c=i.status,u=i.statusText;if(i.ok){var d,h;if(n.method!=="HEAD"){var f;const y=await i.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((f=n.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?a=y:a=JSON.parse(y))}const x=(d=n.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),m=(h=i.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");x&&m&&m.length>1&&(l=parseInt(m[1])),n.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const x=await i.text();try{o=JSON.parse(x),Array.isArray(o)&&i.status===404&&(a=[],o=null,c=200,u="OK")}catch{i.status===404&&x===""?(c=204,u="No Content"):o={message:x}}if(o&&n.shouldThrowOnError)throw new G4(o)}return{error:o,data:a,count:l,status:c,statusText:u}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",c="";const u=i==null?void 0:i.cause;if(u){var d,h,f,x;const v=(d=u==null?void 0:u.message)!==null&&d!==void 0?d:"",g=(h=u==null?void 0:u.code)!==null&&h!==void 0?h:"";a=`${(f=i==null?void 0:i.name)!==null&&f!==void 0?f:"FetchError"}: ${i==null?void 0:i.message}`,a+=`
173
174Caused by: ${(x=u==null?void 0:u.name)!==null&&x!==void 0?x:"Error"}: ${v}`,g&&(a+=` (${g})`),u!=null&&u.stack&&(a+=`
175${u.stack}`)}else{var m;a=(m=i==null?void 0:i.stack)!==null&&m!==void 0?m:""}const y=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((u==null?void 0:u.name)==="HeadersOverflowError"||(u==null?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(l+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:c},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},Q4=class extends Y4{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
175explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const J0=new RegExp("[,()]");var ci=class extends Q4{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&J0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&J0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},J4=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new ci({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
1750){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new ci({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new ci({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ci({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ci({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Ma(e){"@babel/helpers - typeof";return Ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(e)}function X4(e,t){if(Ma(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ma(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z4(e){var t=X4(e,"string");return Ma(t)=="symbol"?t:t+""}function e$(e,t,n){return(t=Z4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ml(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X0(Object(n),!0).forEach(function(r){e$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var t$=class _k{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,c)=>{const u=new AbortController,d=setTimeout(()=>u.abort(),i),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(d),a(l,c);const f=()=>{clearTimeout(d),u.abort()};return h.addEventListener("abort",f,{once:!0}),a(l,Ml(Ml({},c),{},{signal:u.signal})).finally(()=>{clearTimeout(d),h.removeEventListener("abort",f)})}return a(l,Ml(Ml({},c),{},{signal:u.signal})).finally(()=>clearTimeout(d))}:this.fetch=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new J4(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new _k(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),d=r&&Object.values(n).some(u);d?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,x])=>x!==void 0).map(([f,x])=>[f,Array.isArray(x)?`{${x.join(",")}}`:`${x}
175`]).forEach(([f,x])=>{l.searchParams.append(f,x)})):(a="POST",c=n);const h=new Headers(this.headers);return d?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new ci({method:a,url:l,headers:h,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class n${constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
176import ws from "ws"
177new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
178
179Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const r$="2.100.1",s$=`realtime-js/${r$}`,i$="1.0.0",Tk="2.0.0",o$=Tk,a$=1e4,l$=100,br={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Pk={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},cp={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class c${constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,f=new ArrayBuffer(this.HEADER_LENGTH+h);let x=new DataView(f),m=0;x.setUint8(m++,this.KINDS.userBroadcastPush),x.setUint8(m++,l.length),x.setUint8(m++,a.length),x.setUint8(m++,o.length),x.setUint8(m++,c.length),x.setUint8(m++,d.length),x.setUint8(m++,n),Array.from(l,v=>x.setUint8(m++,v.charCodeAt(0))),Array.from(a,v=>
179x.setUint8(m++,v.charCodeAt(0))),Array.from(o,v=>x.setUint8(m++,v.charCodeAt(0))),Array.from(c,v=>x.setUint8(m++,v.charCodeAt(0))),Array.from(d,v=>x.setUint8(m++,v.charCodeAt(0)));var y=new Uint8Array(f.byteLength+r.byteLength);return y.set(new Uint8Array(f),0),y.set(new Uint8Array(r),f.byteLength),y.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,x={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(x.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var ge;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ge||(ge={}));const Z0=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=u$(o,e,t,s),i),{}):{}},u$=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?Rk(i,o):up(o)},Rk=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return p$(t,n)}switch(e){case ge.bool:return d$(t);case ge.float4:case ge.float8:case ge.int2:case ge.int4:case ge.int8:case ge.numeric:case ge.oid:return h$(t);case ge.json:case ge.jsonb:return f$(t);case ge.timestamp:return m$(t);case ge.abstime:case ge.date:case ge.daterange:case ge.int4range:case ge.int8range:case ge.money:case ge.reltime:case ge.text:case ge.time:case ge.timestamptz:case ge.timetz:case ge.tsrange:case ge.tstzrange:return up(t);default:return up(t)}},up=e=>e,d$=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},h$=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},f$=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},p$=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Rk(t,a))}return e},m$=e=>typeof e=="string"?e.replace(" ","T"):e,Ak=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var la=e=>typeof e=="function"?e:function(){return e},g$=typeof self<"u"?self:null,ui=typeof window<"u"?window:null,kn=g$||ui||globalThis,v$="2.0.0",y$=1e4,w$=1e3,Rn={connecting:0,open:1,closing:2,closed:3},gt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Wn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},dp={longpoll:"longpoll",websocket:"websocket"},x$={complete:4},hp="base64url.bearer.phx.",$l=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHo
vendor: 21,658 bytes, lines 179-180
179oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},jk=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},b$=class{constructor(e,t,n){this.state=gt.closed,this.topic=e,this.params=la(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new $l(this,Wn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new jk(()=>{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=gt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=gt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=gt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=gt.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 $l(this,Wn.leave,la({}),this.timeout).send(),this.state=gt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Wn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=gt.closed,this.bindings=[]}onClose(e){this.on(Wn.close,e)}onError(e){return this.on(Wn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new $l(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=gt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Wn.close,"leave")},n=new $l(this,Wn.leave,la({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=gt.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===gt.closed}isErrored(){return this.state===gt.errored}isJoined(){return this.state===gt.joined}isJoining(){return this.state===gt.joining}isLeaving(){return this.state===gt.leaving}},uu=class{static request(e,t,n,r,s,i,o){if(kn.XDomainRequest){let a=new kn.XDomainRequest;return this.xdomainRequest(a,e,t,r,s,i,o)}else if(kn.XMLHttpRequest){let a=new kn.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,s,i,o)}else{if(kn.fetch&&kn.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let a={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),kn.fetch(t,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,a){e.open(t,n,!0),e.timeout=i;for(let[l,c]of Object.entries(r))e.setRequestHeader(l,c);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===x$.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},S$=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},Zs=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(hp)&&(this.authToken=atob(t[1].slice(hp.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Rn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+dp.websocket),"$1/"+dp.longpoll)}endpointURL(){return uu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Rn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Rn.open||this.readyState===Rn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Rn.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 ${n}`)}})}send(e){typeof e!="string"&&(e=S$(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
180`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=Rn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=uu.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},E$=class Ho{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Ho.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ho.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ho.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Ho.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},a={};return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(m=>m.phx_ref),h=u.metas.map(m=>m.phx_ref),f=c.metas.filter(m=>h.indexOf(m.phx_ref)<0),x=u.metas.filter(m=>d.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),x.length>0&&(a[l]=this.clone(u),a[l].metas=x)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=t[a];if(t[a]=this.clone(l),c){let u=t[a].metas.map(h=>h.phx_ref),d=c.metas.filter(h=>u.indexOf(h.phx_ref)<0);t[a].metas.unshift(...d)}r(a,c,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete t[a]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Fl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),l.setUint8(c++,r.length),Array.from(t,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let c=n.decode(e.slice(o,o+i));o=o+i;let u=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let c=n.decode(e.slice(a,a+s));a=a+s;let u=n.decode(e.slice(a,a+i));a=a+i;let d=n.decode(e.slice(a,a+o));a=a+o;let h=e.slice(a,e.byteLength),f={status:d,response:h};return{join_ref:l,ref:c,topic:u,event:Wn.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let a=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},k$=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||y$,this.transport=t.transport||kn.WebSocket||Zs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||kn&&kn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Fl.encode.bind(Fl),this.defaultDecoder=Fl.decode.bind(Fl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Zs?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ui&&ui.addEventListener&&(ui.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ui.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),ui.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=la(t.params||{}),this.endPoint=`${e}/${dp.websocket}`,this.vsn=t.vsn||v$,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new jk(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Zs}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=uu.appendParams(uu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=la(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Zs?this.connectWithFallback(Zs,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Zs:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${hp}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),w$,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Rn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
180triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Wn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Rn.connecting:return"connecting";case Rn.open:return"open";case Rn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new b$(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class ca{constructor(t,n){const r=_$(n);this.presence=new E$(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=ca.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=ca.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return ca.transformState(this.presence.state)}static transformState(t){return t=C$(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=yc(s),n},{})}static onJoinPayload(t,n,r){const s=ew(n),i=yc(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=ew(n),i=yc(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function yc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function C$(e){return JSON.parse(JSON.stringify(e))}function _$(e){return(e==null?void 0:e.events)&&{events:e.events}}function ew(e){return e!=null&&e.metas?yc(e):[]}var tw;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(tw||(tw={}));class T${get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new ca(this.channel.channelAdapter,n)}}class P${constructor(t,n,r){const s=R$(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>l$){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===br.joined}isJoined(){return this.state===br.joined}isJoining(){return this.state===br.joining}isClosed(){return this.state===br.closed}isLeaving(){return this.state===br.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function R$(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var nw;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(nw||(nw={}));var ua;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ua||(ua={}));var Hn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Hn||(Hn={}));class da{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new P$(this.socket.socketAdapter,t,this.params),this.presence=new T$(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Ak(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`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[ua.PRESENCE]&&this.bindings[ua.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(Hn.CHANNEL_ERROR,f)}),this._onClose(()=>t==null?void 0:t(Hn.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(Hn.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=br.errored,t==null||t(Hn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Hn.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:d,filter:h}}=l,f=t&&t[a];if(f&&f.event===c&&da.isFilterValueEqual(f.schema,u)&&da.isFilterValueEqual(f.table,d)&&da.isFilterValueEqual(f.filter,h))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=br.errored,n==null||n(Hn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=br.errored&&n&&n(Hn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){if(this.channelAdapter.isJoined()&&t===ua.PRESENCE)throw this.socket.log("channel",`cannot add presence callbacks for ${this.topic} after joining.`),new Error("cannot add presence callbacks after joining a channel");return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
180try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,a,l,c,u;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const h=(s=this.bindings[d])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in h){const f=h.id,x=(i=h.filter)===null||i===void 0?void 0:i.event;return f&&((o=n.ids)===null||o===void 0?void 0:o.includes(f))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=Pk;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Z0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Z0(t.columns,t.old_record)),n}}class A${constructor(t,n){this.socket=new k$(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==cp.connecting}isDisconnecting(){return this.socket.connectionState()==cp.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const j$={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},N$=[1e3,2e3,5e3,1e4],O$=1e4,I$=`
181  addEventListener("message", (e) => {
182    if (e.data.event === "start") {
183      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
184    }
185  });`;class L${get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
185,this.ref=0,this.serializer=new c$,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new A$(t,s),this.httpEndpoint=Ak(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n}
186
187To use Realtime in Node.js, you need to provide a WebSocket implementation:
188
189Option 1: Use Node.js 22+ which has native WebSocket support
190Option 2: Install and provide the "ws" package:
191
192  npm install ws
193
194  import ws from "ws"
195  const client = new RealtimeClient(url, {
196    ...options,
197    transport: ws
198  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||cp.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new da(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:s$};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(Pk.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([I$],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,a,l,c,u;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const d={};
198d.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:a$,d.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:j$.HEARTBEAT_INTERVAL,d.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:n$.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:m=>N$[m-1]||O$;let h,f;const x=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:o$;switch(x){case i$:h=(m,y)=>y(JSON.stringify(m)),f=(m,y)=>y(JSON.parse(m));break;case Tk:h=this.serializer.encode.bind(this.serializer),f=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=x,d.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:h,d.decode=(u=t==null?void 0:t.decode)!==null&&u!==void 0?u:f,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var $a=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function D$(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function M$(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function $$(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=D$(e.baseUrl,r,s),l=await M$(e.auth),c=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),h=d&&u?JSON.parse(u):u;if(!c.ok){const f=d?h:void 0,x=f==null?void 0:f.error;throw new $a((x==null?void 0:x.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:f})}return{status:c.status,headers:c.headers,data:h}}}}function Vl(e){return e.join("�")}var F$=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Vl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Vl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Vl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Vl(e.namespace)}`}),!0}catch(t){if(t instanceof $a&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof $a&&n.status===409)return;throw n}}};function ei(e){return e.join("�")}var V$=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ei(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ei(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ei(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ei(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ei(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ei(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof $a&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof $a&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},U$=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=$$({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new F$(this.client,t),this.tableOps=new V$(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
198async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Xu=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function Zu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var fp=class extends Xu{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Nk=class extends Xu{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const B$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),z$=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},pp=e=>{if(Array.isArray(e))return e.map(n=>pp(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=pp(r)}),t},W$=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function H$(e,t){if(Fa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K$(e){var t=H$(e,"string");return Fa(t)=="symbol"?t:t+""}function q$(e,t,n){return(t=K$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rw(Object(n),!0).forEach(function(r){q$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const sw=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},G$=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new fp(sw(o),i,a,r))}).catch(()=>{const o=i+"";t(new fp(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new Nk(sw(e),e,r))},Y$=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?Q(Q({},s),n):(z$(r)?(s.headers=Q({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),Q(Q({},s),n))};async function $o(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,Y$(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>G$(c,l,r,o))})}function Ok(e="storage"){return{get:async(t,n,r,s)=>$o(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>$o(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>$o(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>$o(t,"HEAD",n,Q(Q({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>$o(t,"DELETE",n,s,i,r,e)}}const Q$=Ok("storage"),{get:Va,post:an,put:mp,head:J$,remove:xg}=Q$,At=Ok("vectors");var Eo=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=B$
198(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Q(Q({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Zu(n))return{data:null,error:n};throw n}}},X$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Zu(t))return{data:null,error:t};throw t}}};let Ik;Ik=Symbol.toStringTag;var Z$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ik]="BlobDownloadBuilder",this.promise=null}asStream(){return new X$(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Zu(t))return{data:null,error:t};throw t}}};const e5={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},iw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var t5=class extends Eo{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=Q(Q({},iw),r);let a=Q(Q({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(a=Q(Q({},a),r.headers));const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),d=await(e=="PUT"?mp:an)(s.fetch,`${s.url}/object/${u}`,i,Q({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=Q(Q({},iw),r),u=Q(Q({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:i,fullPath:(await mp(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=Q({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await an(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Xu("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await an(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
198stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await an(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await an(r.fetch,`${r.url}/object/sign/${s}`,Q({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"",l=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${r.url}${l}${a}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await an(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(o=>Q(Q({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${i}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>Va(this.fetch,`${this.url}/${r}/${o}${i}`,{headers:this.headers,noResolveJson:!0},n);return new Z$(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>pp(await Va(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await J$(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Zu(s)){var r;const i=s instanceof fp?s.status:s instanceof Nk?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await xg(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=Q(Q(Q({},e5),t),{},{prefix:e||""});return await an(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=Q({},e);return await an(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const n5="2.100.1",al={"X-Client-Info":`storage-js/${n5}`};var r5=class extends Eo{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=Q(Q({},al),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Va(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Va(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await an(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await mp(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await an(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await xg(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}}
198,s5=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Q(Q({},al),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await an(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Va(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await xg(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!W$(e))throw new Xu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new U$({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},i5=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Q(Q({},al),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await At.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await At.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},o5=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Q(Q({},al),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},a5=class extends Eo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Q(Q({},al),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await At.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},l5=class extends a5{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new c5(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},c5=class extends i5{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName}))}
198async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new u5(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},u5=class extends o5{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,Q(Q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},d5=class extends r5{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new t5(this.url,this.headers,e,this.fetch)}get vectors(){return new l5(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new s5(this.url+"/iceberg",this.headers,this.fetch)}};const Lk="2.100.1",di=30*1e3,gp=3,ah=gp*di,h5="http://localhost:9999",f5="supabase.auth.token",p5={"X-Client-Info":`gotrue-js/${Lk}`},vp="X-Supabase-Api-Version",Dk={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},m5=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,g5=10*60*1e3;class Ua extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function z(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class v5 extends Ua{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function y5(e){return z(e)&&e.name==="AuthApiError"}class ps extends Ua{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class ir extends Ua{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Tt extends ir{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function lh(e){return z(e)&&e.name==="AuthSessionMissingError"}class ti extends ir{constructor(){super("Auth session or user missing","AuthInvalidToken
198ResponseError",500,void 0)}}class Ul extends ir{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Bl extends ir{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function w5(e){return z(e)&&e.name==="AuthImplicitGrantRedirectError"}class ow extends ir{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class x5 extends ir{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 yp extends ir{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function ch(e){return z(e)&&e.name==="AuthRetryableFetchError"}class aw extends ir{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class wp extends ir{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),lw=` 	
199\r=`.split(""),b5=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<lw.length;t+=1)e[lw[t].charCodeAt(0)]=-2;for(let t=0;t<du.length;t+=1)e[du[t].charCodeAt(0)]=t;return e})();function cw(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(du[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(du[r]),t.queuedBits-=6}}function Mk(e,t,n){const r=b5[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function uw(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{k5(o,r,n)};for(let o=0;o<e.length;o+=1)Mk(e.charCodeAt(o),s,i);return t.join("")}function S5(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function E5(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}S5(r,t)}}function k5(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function $i(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Mk(e.charCodeAt(s),n,r);return new Uint8Array(t)}function C5(e){const t=[];return E5(e,n=>t.push(n)),new Uint8Array(t)}function xs(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>cw(s,n,r)),cw(null,n,r),t.join("")}function _5(e){return Math.round(Date.now()/1e3)+e}function T5(){return Symbol("auth-callback")}const qe=()=>typeof window<"u"&&typeof document<"u",ls={tested:!1,writable:!1},$k=()=>{if(!qe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ls.tested)return ls.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ls.tested=!0,ls.writable=!0}catch{ls.tested=!0,ls.writable=!1}return ls.writable};function P5(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
199h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const Fk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),R5=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",hi=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},cs=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ke=async(e,t)=>{await e.removeItem(t)};class ed{constructor(){this.promise=new ed.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}ed.promiseConstructor=Promise;function zl(e){const t=e.split(".");if(t.length!==3)throw new wp("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!m5.test(t[r]))throw new wp("JWT not in base64url format");return{header:JSON.parse(uw(t[0])),payload:JSON.parse(uw(t[1])),signature:$i(t[2]),raw:{header:t[0],payload:t[1]}}}async function A5(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function j5(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function N5(e){return("0"+e.toString(16)).substr(-2)}function O5(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,N5).join("")}async function I5(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function L5(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await I5(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ni(e,t,n=!1){const r=O5();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await hi(e,`${t}-code-verifier`,s);const i=await L5(r);return[i,r===i?"plain":"s256"]}const D5=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function M5(e){const t=e.headers.get(vp);if(!t||!t.match(D5))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function $5(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function F5(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const V5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ri(e){if(!V5.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function uh(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function U5(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function dw(e){return JSON.parse(JSON.stringify(e))}const fs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),B5=[502,503,504];async function hw(e){var t;if(!R5(e))throw new yp(fs(e),0);if(B5.includes(e.status))throw new yp(fs(e),e.status);let n;try{n=await e.json()}catch(i){throw new ps(fs(i),i)}let r;const s=M5(e);if(s&&s.getTime()>=Dk["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new aw(fs(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Tt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>
199i&&typeof o=="string",!0))throw new aw(fs(n),e.status,n.weak_password.reasons);throw new v5(fs(n),e.status||500,r)}const z5=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function q(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[vp]||(i[vp]=Dk["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await W5(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function W5(e,t,n,r,s,i){const o=z5(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new yp(fs(l),0)}if(a.ok||await hw(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await hw(l)}}function nn(e){var t;let n=null;q5(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=_5(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function fw(e){const t=nn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Sr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function H5(e){return{data:e,error:null}}function K5(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Ju(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function pw(e){return e}function q5(e){return e.access_token&&e.refresh_token&&e.expires_in}const dh=["global","local","others"];class G5{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=Fk(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},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)}}async signOut(t,n=dh[0]){if(dh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${dh.join(", ")}`);try{return await q(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(z(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await q(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Sr})}catch(r){if(z(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Ju(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await q(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:K5,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(z(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await q(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Sr})}catch(n){if(z(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await q(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:pw});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(x.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(z(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){ri(t);try{return await q(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Sr})}catch(n){if(z(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ri(t);try{return await q(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Sr})}catch(r){if(z(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){ri(t);
199try{return await q(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Sr})}catch(r){if(z(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){ri(t.userId);try{const{data:n,error:r}=await q(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(z(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ri(t.userId),ri(t.id);try{return{data:await q(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(z(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await q(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:pw});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(x.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(z(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await q(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(z(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await q(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(z(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await q(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(z(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await q(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(z(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await q(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(z(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await q(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(z(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await q(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(z(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await q(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(z(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await q(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(z(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await q(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(z(n))return{data:null,error:n};throw n}}}function mw(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const bn={debug:!!(globalThis&&$k()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
199class Vk extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class gw extends Vk{}async function Y5(e,t,n){bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),bn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new gw(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(bn.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 n()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(r.signal.aborted)return bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new gw(`Lock "${e}" was released because another request stole it`)}throw i}}function Q5(){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 Uk(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function J5(e){return parseInt(e,16)}function X5(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function Z5(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:h}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
200`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=Uk(e.address),x=u?`${u}://${r}`:r,m=e.statement?`${e.statement}
201`:"",y=`${x} wants you to sign in with your Ethereum account:
202${f}
203
204${m}`;let v=`URI: ${d}
205Version: ${h}
206Chain ID: ${n}${o?`
207Nonce: ${o}`:""}
208Issued At: ${i.toISOString()}`;if(s&&(v+=`
209Expiration Time: ${s.toISOString()}`),a&&(v+=`
210Not Before: ${a.toISOString()}`),l&&(v+=`
211Request ID: ${l}`),c){let g=`
212Resources:`;
212for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);g+=`
213- ${w}`}v+=g}return`${y}
214${v}`}class $e extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class hu extends $e{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function e3({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new $e({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new $e({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new $e({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new $e({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new $e({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new $e({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new $e({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new $e({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(Bk(o)){if(i.rp.id!==o)return new $e({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new $e({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new $e({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new $e({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new $e({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function t3({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new $e({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new $e({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(Bk(r)){if(n.rpId!==r)return new $e({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new $e({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new $e({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
214ROR",cause:e})}return new $e({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class n3{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const r3=new n3;function s3(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Ju(e,["challenge","user","excludeCredentials"]),i=$i(t).buffer,o=Object.assign(Object.assign({},n),{id:$i(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:$i(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function i3(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Ju(e,["challenge","allowCredentials"]),s=$i(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:$i(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function o3(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:xs(new Uint8Array(e.response.attestationObject)),clientDataJSON:xs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function a3(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:xs(new Uint8Array(s.authenticatorData)),clientDataJSON:xs(new Uint8Array(s.clientDataJSON)),signature:xs(new Uint8Array(s.signature)),userHandle:s.userHandle?xs(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Bk(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function vw(){var e,t;return!!(qe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function l3(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new hu("Browser returned unexpected credential type",t)}:{data:null,error:new hu("Empty credential response",t)}}catch(t){return{data:null,error:e3({error:t,options:e})}}}async function c3(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new hu("Browser returned unexpected credential type",t)}:{data:null,error:new hu("Empty credential response",t)}}catch(t){return{data:null,error:t3({error:t,options:e})}}}const u3={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},d3={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function fu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=fu(a,o):r[i]=fu(o)}else r[i]=o}return r}function h3(e,t){return fu(u3,e,t||{})}function f3(e,t){return fu(d3,e,t||{})}class p3{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const c=s??r3.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const f=(await this.client.getUser()).data.user,x=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${x}`}}u.displayName||(u.displayName=u.name)}
214switch(a.webauthn.type){case"create":{const u=h3(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await l3({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=f3(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await c3(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return z(a)?{data:null,error:a}:{data:null,error:new ps("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Ua("rpId is required for WebAuthn authentication")};try{if(!vw())return{data:null,error:new ps("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return z(o)?{data:null,error:o}:{data:null,error:new ps("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Ua("rpId is required for WebAuthn registration")};try{if(!vw())return{data:null,error:new ps("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return z(o)?{data:null,error:o}:{data:null,error:new ps("Unexpected error in register",o)}}}}Q5();const m3={url:h5,storageKey:f5,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:p5,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function yw(e,t,n){return await n()}const si={};class Ba{get jwks(){var t,n;return(n=(t=si[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){si[this.storageKey]=Object.assign(Object.assign({},si[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=si[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){si[this.storageKey]=Object.assign(Object.assign({},si[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},m3),t);if(this.storageKey=i.storageKey,this.instanceID=(n=Ba.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ba.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&qe()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new G5({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Fk(i.fetch),this.lock=i.lock||yw,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&qe()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=Y5:this.lock=yw,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 p3(this)}
214,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:$k()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=mw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=mw(this.memoryStorage)),qe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Lk}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(qe()&&(n=P5(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),qe()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),w5(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return z(n)?this._returnResult({error:n}):this._returnResult({error:new ps("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:nn}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(z(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:d,options:h}=t;let f=null,x=null;this.flowType==="pkce"&&([f,x]=await ni(this.storage,this.storageKey)),i=await q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:u,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:f,code_challenge_method:x},xform:nn})}else if("phone"in t){const{phone:u,password:d,options:h}=t;i=await q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:nn})}else throw new Ul("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ke(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await q(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:fw})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await q(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:fw})}else throw new Ul("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new ti;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,c,u,d,h;let f,x;if("message"in t)f=t.message,x=t.signature;else{const{chain:m,wallet:y,statement:v,options:g}=t;let w;if(qe())if(typeof y=="object")w=y;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")w=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 y!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=y}const S=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),E=await w.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=Uk(E[0]);let C=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!C){const A=await w.request({method:"eth_chainId"});C=J5(A)}const T={domain:S.host,address:k,statement:v,uri:S.href,version:"1",chainId:C,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=Z5(T),x=await w.request({method:"personal_sign",params:[X5(f),k]})}try{const{data:m,error:y}=await q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:x},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:nn});if(y)throw y;if(!m||!m.session||!m.user){const v=new ti;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:y})}catch(m){if(z(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,s,i,o,a,l,c,u,d,h,f;let x,m;if("message"in t)x=t.message,m=t.signature;else{const{chain:y,wallet:v,statement:g,options:w}=t;let S;if(qe())if(typeof v=="object")S=v;
214else{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"))S=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 v!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=v}const E=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),g?{statement:g}:null));let C;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")C=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)C=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)x=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${E.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((d=(u=w==null?void 0:w.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...w.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
215`);const k=await S.signMessage(new TextEncoder().encode(x),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:y,error:v}=await q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:xs(m)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:nn});if(v)throw v;if(!y||!y.session||!y.user){const g=new ti;return this._returnResult({data:{user:null,session:null},error:g})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:v})}catch(y){if(z(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(t){const n=await cs(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new x5;const{data:i,error:o}=await q(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:nn});if(await Ke(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new ti;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:nn}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new ti;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;
215let c=null,u=null;this.flowType==="pkce"&&([c,u]=await ni(this.storage,this.storageKey));const{error:d}=await q(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await q(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new Ul("You must provide either an email or phone number.")}catch(a){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await q(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:nn});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ni(this.storage,this.storageKey));const c=await q(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:H5});return!((i=c.data)===null||i===void 0)&&i.url&&qe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Tt;const{error:s}=await q(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(z(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await q(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await q(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Ul("You must provide either an email or phone number and a type")}catch(n){if(z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await cs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
215id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<ah:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await cs(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=uh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=U5(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await q(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Sr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Tt}:await q(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:Sr})})}catch(n){if(z(n))return lh(n)&&(await this._removeSession(),await Ke(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Tt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await ni(this.storage,this.storageKey));const{data:c,error:u}=await q(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Sr});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Tt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=zl(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(z(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Tt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!qe())throw new Bl("No browser detected.");
215if(t.error||t.error_description||t.error_code)throw new Bl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new ow("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Bl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new ow("No code detected.");const{data:g,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new Bl("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let h=u+d;l&&(h=parseInt(l));const f=h-u;f*1e3<=di&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${d}s`);const x=h-d;u-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,h,u):u-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,h,u);const{data:m,error:y}=await this._getUser(i);if(y)throw y;const v={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:h,refresh_token:o,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(z(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await cs(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!lh(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(y5(a)&&(a.status===404||a.status===401||a.status===403)||lh(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Ke(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=T5(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await ni(this.storage,this.storageKey,!0));try{return await q(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:h}=i;if(h)throw h;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await q(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return qe()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(z(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
215if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=t,d=await q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:nn}),{data:h,error:f}=d;return f?this._returnResult({data:{user:null,session:null},error:f}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new ti}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:f}))}catch(s){if(await Ke(this.storage,`${this.storageKey}-code-verifier`),z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await q(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await j5(async s=>(s>
2150&&await A5(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await q(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:nn})),(s,i)=>{const o=200*Math.pow(2,s);return i&&ch(i)&&Date.now()+o-r<di})}catch(r){if(this._debug(n,"error",r),z(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),qe()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await cs(this.storage,this.storageKey);if(s&&this.userStorage){let o=await cs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await hi(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:uh()}else if(s&&!s.user&&!s.user){const o=await cs(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ke(this.storage,this.storageKey+"-user"),await hi(this.storage,this.storageKey,s)):s.user=uh()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<ah;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${ah}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),ch(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Tt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new ed;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Tt;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),z(i)){const o={data:null,error:i};return ch(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ke(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await hi(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=dw(s);await hi(this.storage,this.storageKey,i)}else{const s=dw(n);await hi(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ke(this.storage,this.storageKey),await Ke(this.storage,this.storageKey+"-code-verifier"),await Ke(this.storage,this.storageKey+"-user"),this.userStorage&&await Ke(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
215catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),di);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/di);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${di}ms, refresh threshold is ${gp} ticks`),s<=gp&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Vk)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!qe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await ni(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await q(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await q(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?o3(t.webauthn.credential_response):a3(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await q(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await q(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:s3(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:i3(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:f}=zl(t);let x=null;f.aal&&(x=f.aal);let m=x;const{data:{user:y},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((r=(n=y==null?void 0:y.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const w=f.amr||[];return{data:{currentLevel:x,nextLevel:m,currentAuthenticationMethods:w},error:null}}catch(f){if(z(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
215=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}=zl(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const h=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await q(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Tt})})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Tt});const o=await q(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&qe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(z(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Tt});const o=await q(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&qe()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(z(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await q(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Tt})})}catch(t){if(z(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await q(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Tt})})}catch(n){if(z(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+g5>s)return r;const{data:i,error:o}=await q(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:x}
215=await this.getSession();if(x||!f.session)return this._returnResult({data:null,error:x});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=zl(r);n!=null&&n.allowExpired||$5(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=F5(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,C5(`${a}.${l}`)))throw new wp("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(z(r))return this._returnResult({data:null,error:r});throw r}}}Ba.nextInstanceID={};const g3=Ba,v3="2.100.1";let Ko="";typeof Deno<"u"?Ko="deno":typeof document<"u"?Ko="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ko="react-native":Ko="node";const y3={"X-Client-Info":`supabase-js-${Ko}/${v3}`},w3={headers:y3},x3={schema:"public"},b3={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},S3={};function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function E3(e,t){if(za(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k3(e){var t=E3(e,"string");return za(t)=="symbol"?t:t+""}function C3(e,t,n){return(t=k3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ww(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ww(Object(n),!0).forEach(function(r){C3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ww(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const _3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),T3=()=>Headers,P3=(e,t,n)=>{const r=_3(n),s=T3();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Le(Le({},o),{},{headers:c}))}};function R3(e){return e.endsWith("/")?e:e+"/"}function A3(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,h={db:Le(Le({},l),s),auth:Le(Le({},c),i),realtime:Le(Le({},u),o),storage:{},global:Le(Le(Le({},d),a),{},{headers:Le(Le({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function j3(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(R3(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var N3=class extends g3{constructor(e){super(e)}},O3=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=j3(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:x3,realtime:S3,auth:Le(Le({},b3),{},{storageKey:o}),global:w3},l=A3(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=P3(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Le({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new t$(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 d5(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new q4(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
215channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},u,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new N3({url:this.authUrl.href,headers:Le(Le({},h),u),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new L$(this.realtimeUrl.href,Le(Le({},e),{},{params:Le(Le({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const I3=(e,t,n)=>new O3(e,t,n);function L3(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}L3()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const D3="https://zyvqtndspypckfrerosy.supabase.co",M3="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inp5dnF0bmRzcHlwY2tmcmVyb3N5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2NTk2MzYsImV4cCI6MjA5MDIzNTYzNn0.PtcijeQ-8-45YvoUsY7cVK102zE7b1BJnrHMkdupn00",jt=I3(D3,M3,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),zk=()=>CR({queryKey:["bio-slides"],queryFn:async()=>{const{data:e,error:t}=await jt.from("bio_slides").select("*").order("sort_order",{ascending:!0});if(t)throw t;return(e??[]).map(n=>({...n,type:n.type,stats:n.stats}))}}),$3=({slides:e,title:t,subtitle:n})=>{const[r,s]=b.useState(0),i=e.length,o=()=>s(c=>c===0?i-1:c-1),a=()=>s(c=>c===i-1?0:c+1);if(i===0)return null;const l=e[r];return p.jsxs(_e.div,{initial:{opacity:0,y:60},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.8,ease:[.16,1,.3,1]},children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.3em] uppercase mb-2 font-medium",children:n}),p.jsx("h3",{className:"font-display text-3xl md:text-4xl font-bold text-foreground",children:t})]}),p.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[p.jsx("div",{className:"h-px bg-gold-gradient"}),p.jsxs("div",{className:"relative w-full pb-[115%] md:pb-[75%]",children:[p.jsx("div",{className:"absolute inset-0 flex items-center justify-center overflow-hidden",children:p.jsxs(_e.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},exit:{opacity:0,x:-30},transition:{duration:.4},className:"w-full h-full flex flex-col items-center justify-center p-4 md:p-8",children:[l.type==="hero"&&p.jsxs("div",{className:"text-center space-y-4 w-full",children:[l.image_url&&p.jsx("img",{src:l.image_url,alt:l.subtitle||l.title||"",className:"w-full rounded-xl object-cover aspect-video shadow-gold-sm",loading:"lazy",width:1280,height:720}),l.subtitle&&p.jsx("p",{className:"text-muted-foreground text-sm italic max-w-md mx-auto",children:l.subtitle})]}
215),l.type==="text"&&p.jsxs("div",{className:"max-w-xl mx-auto space-y-6",children:[l.label&&p.jsx("p",{className:"text-primary text-xs tracking-[0.3em] uppercase font-medium",children:l.label}),p.jsx("h4",{className:"font-display text-xl md:text-4xl font-bold text-foreground leading-tight",children:l.title}),l.bullets&&p.jsx("ul",{className:"space-y-3",children:l.bullets.map((c,u)=>p.jsxs("li",{className:"flex items-center gap-3 text-secondary-foreground",children:[p.jsx("span",{className:"w-2 h-2 rounded-full bg-primary flex-shrink-0"}),p.jsx("span",{className:"text-sm md:text-base",children:c})]},u))}),l.stats&&p.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 pt-4",children:l.stats.map((c,u)=>p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-2xl md:text-3xl font-display font-bold text-gradient-gold",children:c.value}),p.jsx("div",{className:"text-muted-foreground text-xs mt-1",children:c.label})]},u))})]}),l.type==="image"&&l.image_url&&p.jsxs("div",{className:"text-center space-y-4 w-full",children:[p.jsx("img",{src:l.image_url,alt:l.caption||"",className:"w-full rounded-xl object-cover aspect-video shadow-gold-sm",loading:"lazy",width:1280,height:720}),l.caption&&p.jsx("p",{className:"text-muted-foreground text-sm italic max-w-md mx-auto",children:l.caption})]})]},r)}),p.jsx("button",{onClick:o,className:"absolute left-3 top-1/2 -translate-y-1/2 z-10 w-10 h-10 rounded-full bg-background/80 border border-border flex items-center justify-center text-foreground hover:bg-background transition-colors shadow-md","aria-label":"Slide precedente",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"m15 18-6-6 6-6"})})}),p.jsx("button",{onClick:a,className:"absolute right-3 top-1/2 -translate-y-1/2 z-10 w-10 h-10 rounded-full bg-background/80 border border-border flex items-center justify-center text-foreground hover:bg-background transition-colors shadow-md","aria-label":"Slide successiva",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"m9 18 6-6-6-6"})})})]}),p.jsx("div",{className:"border-t border-border px-6 py-3 flex items-center justify-center gap-2 bg-secondary/20",children:e.map((c,u)=>p.jsx("button",{onClick:()=>s(u),className:`h-1.5 rounded-full transition-all duration-300 ${u===r?"w-8 bg-primary":"w-1.5 bg-muted-foreground/30 hover:bg-muted-foreground/50"}`,"aria-label":`Vai alla slide ${u+1}`},u))})]})]})},F3=()=>{const{data:e=[],isLoading:t}=zk();return p.jsx("section",{id:"chi-sono",className:"py-24 md:py-36 px-6 relative",children:p.jsxs("div",{className:"max-w-5xl mx-auto",children:[p.jsxs(_e.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-20",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.4em] uppercase mb-4 font-medium",children:"Presentazioni"}),p.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold text-foreground mb-4",children:["Alcune cose ",p.jsx("span",{className:"text-gradient-gold italic",children:"Interessanti"})]}),p.jsx("div",{className:"line-gold w-24 mx-auto mt-6"})]}),p.jsxs("div",{className:"space-y-16",children:[!t&&e.length>0&&p.jsx($3,{slides:e,title:"Chi è Davide Caiazzo",subtitle:"Presentazione personale"}),p.jsxs(_e.div,{initial:{opacity:0,y:60},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.8,ease:[.16,1,.3,1]},children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.3em] uppercase mb-2 font-medium",children:"Case Study & Risultati"}),p.jsx("h3",{className:"font-display text-3xl md:text-4xl font-bold text-foreground",children:"Storie di Successo"})]}),p.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[p.jsx("div",{className:"h-px bg-gold-gradient"}),p.jsx("div",{className:"relative w-full",style:{paddingBottom:"75%"},children:p.jsx("iframe",{src:"https://www.canva.com/design/DAF8wilTZ0k/nifhkkukzYPQJybrmkh4Bw/view?embed",className:"absolute inset-0 w-full h-full",allowFullScreen:!0,loading:"lazy",title:"Storie di Successo"})})]})]})]})]})})},V3=[{name:"Silvia Pistolesi",role:"Coach di Leadership Realizzativa®",text:"Non ti conoscevo prima di ieri. Sono rimasta piacevolmente sorpresa dalla professionalità, leadership, conoscenza, generosità e umanità che incarni. Seguirti è un'esperienza che arricchisce chiu
215nque, a qualsiasi livello. The world is a better place because you and your team are in it.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2Fb408b1e0-c9c8-4735-83b4-7a35d6050a90?alt=media&token=93e761ad-9904-4158-abcf-2c8c1249d22e",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429649108329631744)"},{name:"Sonia Vicino",role:"Strategic Aviation Advisor | Private Aviation",text:"Su LinkedIn non vince chi pubblica di più, ma chi costruisce continuità relazionale. Grazie al tuo approccio ho compreso che essere protagonisti su questa piattaforma significa passare da una logica di semplice esposizione a una logica di relazione strategica.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2Ff6be55cc-48e3-4632-be70-da0835788ed5?alt=media&token=40c80898-b2db-4945-96f9-766bad0b15f5",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429652356599791616)"},{name:"Dr. Roberto Ferrario",role:"Master Trainer & Coach ICF | +5k ore coaching",text:"La fiducia non nasce da un picco di visibilità, ma da una presenza che torna, riconoscibile e coerente. Su LinkedIn non vince chi parla di più, ma chi resta nella memoria senza alzare la voce.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2Fb48f5c0b-a9f9-4adf-a96e-5ea6e7facdba?alt=media&token=87811209-d9b5-40e6-822a-2ac0dcb78420",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429650964661338112)"},{name:"Silvio Scala",role:"Freelance Graphic & Web Designer",text:'Uno dei workshop più utili che abbia mai seguito e sicuramente quello con il maggior "valore" ricevuto. Grazie al workshop, sto riuscendo finalmente a intravedere una luce e a capirne i meccanismi.',image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2Fff03ce05-0769-4630-b103-cb0848acf899?alt=media&token=b7ebf66d-d3bb-46c2-b70f-001711c538da",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429648396841488384)"},{name:"Gabriela H.",role:"Founder B.O.N.D. System™ | Copywriter Strategica",text:"Si percepisce la tua profonda Conoscenza dell'ecosistema LinkedIn, unita a un'empatia rara nel modo in cui la trasmetti, sempre con attenzione acuta e una leggerezza che rende tutto più accessibile senza perdere spessore.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2F77f6322f-a876-4ed4-b1a0-dd1646ee2ee2?alt=media&token=94d4d09f-c2cb-4603-8ab4-16640cc521a7",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429668029921222656)"},{name:"Luca Mastella",role:"Founder Learnn | Digital Marketing",text:"Davide ha una capacità unica di rendere semplici concetti complessi. Il suo metodo su LinkedIn è tra i più strutturati e completi che abbia mai visto nel panorama italiano. Risultati concreti e misurabili.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2F005b07ea-4842-4711-b5e2-6715e955894b?alt=media&token=bc03217f-d400-4001-90da-a1da81730d0d",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128"},{name:"Marco Buscarino",role:"Sales Consultant | Gestione del Rischio di Credito",text:"Seconda serata del tuo corso e un'altra lezione ricca di spunti concreti. Grazie davvero per la tua disponibilità nel guidarci passo passo su come posizionarci al meglio su LinkedIn.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2F0df0c69a-08c7-4481-8b04-ce22648cfec4?alt=media&token=9e3e7bee-2709-4501-a824-dbe4398bff07",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429647704626020352)"},{name:"Danilo De Lumè",role:"HR Manager | 30.000+ Followers",text:"Grazie Davide per il workshop gratuito su LinkedIn! Essere a contatto con il tuo know how fa la differenza tra essere sbandati ed avere una strategia!",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image
215%2F005b07ea-4842-4711-b5e2-6715e955894b?alt=media&token=bc03217f-d400-4001-90da-a1da81730d0d",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429647678138929153)"},{name:"Alessandro Rolfo",role:"Founder Best Life | Welfare aziendale",text:"Quello che apprezzo di più nei tuoi contenuti è il livello di analisi che porti: riesci a scomporre dinamiche complesse e sfaccettate in principi chiari e applicabili.",image:"https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/linkedin-profile-image%2F2d81bb8f-d138-4968-b613-36c2acbe8c54?alt=media&token=ae05a693-ee2e-4fcf-9731-72542aae6288",linkedin:"https://www.linkedin.com/feed/update/urn:li:ugcPost:7429420474478256128?commentUrn=urn:li:comment:(activity:7429420474478256128,7429647310491570176)"}],U3=()=>p.jsxs("section",{id:"testimonianze",className:"scroll-mt-24 py-24 md:py-36 px-6 relative grain",children:[p.jsx("div",{className:"absolute inset-0 bg-secondary/20"}),p.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto",children:[p.jsxs(_e.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-20",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.4em] uppercase mb-4 font-medium",children:"Testimonianze verificabili su LinkedIn"}),p.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold text-foreground mb-4",children:["La Voce dei Nostri ",p.jsx("span",{className:"text-gradient-gold italic",children:"Clienti Soddisfatti"})]}),p.jsx("div",{className:"line-gold w-24 mx-auto mt-6"})]}),p.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:V3.map((e,t)=>p.jsxs(_e.a,{href:e.linkedin,target:"_blank",rel:"noopener noreferrer",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t%3*.1,duration:.6},whileHover:{y:-6,scale:1.02},className:"block rounded-xl border border-border bg-card p-6 hover:border-primary/30 card-hover-glow group",children:[p.jsx("svg",{className:"w-8 h-8 text-primary/20 mb-4",viewBox:"0 0 24 24",fill:"currentColor",children:p.jsx("path",{d:"M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10H14.017zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10H0z"})}),p.jsx("p",{className:"text-secondary-foreground/80 text-sm leading-relaxed mb-5 line-clamp-4",children:e.text}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("img",{src:e.image,alt:e.name,className:"w-10 h-10 rounded-full object-cover border border-primary/20 group-hover:border-primary/50 transition-colors",loading:"lazy"}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("p",{className:"text-foreground text-sm font-semibold truncate",children:e.name}),p.jsx("p",{className:"text-muted-foreground text-xs truncate",children:e.role})]}),p.jsx("svg",{className:"w-5 h-5 text-primary/40 group-hover:text-primary transition-colors flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:p.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})]})]},e.name))}),p.jsx(_e.div,{initial:{opacity:0}
215,whileInView:{opacity:1},viewport:{once:!0},className:"text-center mt-12",children:p.jsx("a",{href:"https://www.davidecaiazzo.it/testimonianze",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground text-sm hover:text-primary transition-colors underline underline-offset-4",children:"Vedi la pagina completa delle testimonianze →"})})]})]}),B3="/assets/press-leggo-Clldgqu6.png",z3="/assets/press-sole24ore-fintech-IanVw6N_.png",W3="/assets/press-iltempo-DsLWH3k8.png",H3="/assets/press-affaritaliani-CX_cMMX8.png",K3="/assets/press-vanityfair-BddLa0Ky.png",q3="/assets/press-sole24ore-zucchetti-oLIeB0Oo.png",G3=[{image:q3,source:"Il Sole 24 Ore",title:"Zucchetti acquisisce My Governance: valutazione oltre 10 milioni, Caiazzo confermato AD"},{image:z3,source:"Il Sole 24 Ore",title:"MYGO premiata agli Oscar del FinTech per le migliori soluzioni LegalTech e Compliance"},{image:K3,source:"Vanity Fair",title:"Davide Caiazzo: 11 consigli su come crescere su LinkedIn"},{image:H3,source:"Affaritaliani",title:'Davide Caiazzo, il Re di LinkedIn: "Vi svelo i segreti del Personal Branding"'},{image:W3,source:"Il Tempo",title:'Assegnato il premio "Impresa Etica e Innovativa" a Davide Caiazzo e Savino Novelli'},{image:B3,source:"Leggo",title:"Libri, arriva Il Potere di LinkedIn di Davide Caiazzo"}],Y3=()=>p.jsxs("section",{className:"py-24 md:py-36 px-6 relative grain",children:[p.jsx("div",{className:"absolute inset-0 bg-secondary/20"}),p.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto",children:[p.jsxs(_e.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-20",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.4em] uppercase mb-4 font-medium",children:"Rassegna Stampa"}),p.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold text-foreground mb-4",children:["Articoli ",p.jsx("span",{className:"text-gradient-gold italic",children:"Su di Me"})]}),p.jsxs("p",{className:"text-muted-foreground max-w-2xl mx-auto text-sm md:text-base mt-6 leading-relaxed",children:["Per garantire la massima trasparenza, potete trovare alcuni link alle testate, i convegni e gli interventi in cui è apparso o stato citato Davide Caiazzo. ",p.jsx("span",{className:"font-semibold text-foreground",children:"Nessun articolo, post, citazione o uscita presente in questa pagina è mai stato pagato."})]}),p.jsx("div",{className:"line-gold w-24 mx-auto mt-6"})]}),p.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:G3.map((e,t)=>p.jsxs(_e.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t%3*.1,duration:.6},whileHover:{y:-6,scale:1.02},className:"rounded-2xl border border-border bg-card overflow-hidden hover:border-primary/30 card-hover-glow group",children:[p.jsx("div",{className:"h-px bg-gold-gradient"}),p.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:p.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover object-top group-hover:scale-105 transition-transform duration-700",loading:"lazy"})}),p.jsxs("div",{className:"p-5",children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.2em] uppercase font-medium mb-2",children:e.source}),p.jsx("h3",{className:"font-display text-sm md:text-base font-semibold text-foreground leading-snug line-clamp-3",children:e.title})]})]},t))})]})]}),Q3=[{name:"LinkedIn",url:"https://www.linkedin.com/in/davidecaiazzo/",icon:p.jsx("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"currentColor",children:p.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})},{name:"Instagram",url:"https://www.instagram.com/davidecaiazzo_official",icon:p.jsx("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"
215currentColor",children:p.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"})})},{name:"YouTube",url:"https://www.youtube.com/@DavideCaiazzo",icon:p.jsx("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"currentColor",children:p.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}],J3=()=>p.jsxs("section",{className:"py-24 md:py-36 px-6 relative grain overflow-hidden",children:[p.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] rounded-full bg-primary/5 blur-[120px]"}),p.jsx("div",{className:"relative z-10 max-w-3xl mx-auto text-center",children:p.jsxs(_e.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},children:[p.jsx("p",{className:"text-primary text-xs tracking-[0.4em] uppercase mb-4 font-medium",children:"Resta connesso"}),p.jsxs("h2",{className:"font-display text-4xl md:text-6xl font-bold text-foreground mb-6 leading-tight",children:["Seguimi sui"," ",p.jsx("span",{className:"text-gradient-gold italic",children:"Social"})]}),p.jsx("p",{className:"text-muted-foreground text-lg leading-relaxed mb-12 max-w-xl mx-auto",children:"Contenuti esclusivi, strategie LinkedIn e aggiornamenti dal mondo DC Academy."}),p.jsx("div",{className:"flex items-center justify-center gap-6",children:Q3.map(e=>p.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"group flex flex-col items-center gap-3 px-8 py-6 rounded-2xl border border-border bg-card hover:border-primary/40 card-hover-glow",children:[p.jsx("span",{className:"text-muted-foreground group-hover:text-primary transition-colors duration-300",children:e.icon}),p.jsx("span",{className:"text-foreground text-sm font-semibold tracking-wide",children:e.name})]},e.name))})]})})]}),X3=()=>p.jsx("footer",{className:"border-t border-border bg-card/80 py-10 px-6",children:p.jsxs("div",{className:"max-w-6xl mx-auto text-center space-y-4",children:[p.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:["© 2026 DC ACADEMY S.r.l. | P.IVA 05125350750 | 📩"," ",p.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})," ","| Via I. Adriano 9 | Lecce"]}),p.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-muted-foreground text-xs",children:[p.jsx("a",{href:"https://docs.google.com/document/d/1qUNgRcZ0W9aZxutDu1Fv2k5aM6Nti4V0/edit",target:"_blank",rel:"noopener noreferrer",className:"text-primary/70 hover:text-primary hover:underline transition-colors",children:"Informativa Privacy"}),p.jsx("span",{className:"text-border",children:"|"}),p.jsx("a",{href:"https://docs.google.com/document/d/1PTTs2QFMqBtZaefLHPrrfMxJRnlGewih/edit",target:"_blank",rel:"noopener noreferrer",className:"text-primary/70 hover:text-primary hover:underline transition-colors",children:"Cookie Policy"}),p.jsx("span",{className:"text-border",children:"|"}
215),p.jsx("a",{href:"https://docs.google.com/document/d/1K6WGjt9aFTRN-zWMvEOh5bw2A32nNag-/edit",target:"_blank",rel:"noopener noreferrer",className:"text-primary/70 hover:text-primary hover:underline transition-colors",children:"Condizioni di Vendita"})]})]})}),Z3=()=>p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(SO,{}),p.jsx(C4,{}),p.jsx(_4,{}),p.jsx(T4,{}),p.jsx(A4,{}),p.jsx(j4,{}),p.jsx(D4,{}),p.jsx(z4,{}),p.jsx(F3,{}),p.jsx(U3,{}),p.jsx(Y3,{}),p.jsx(J3,{}),p.jsx(X3,{})]}),eF=Am("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"}}),An=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?JA:"button";return p.jsx(o,{className:Te(eF({variant:t,size:n,className:e})),ref:i,...s})});An.displayName="Button";const bs=b.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:Te("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));bs.displayName="Input";var tF="Label",Wk=b.forwardRef((e,t)=>p.jsx(ae.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Wk.displayName=tF;var Hk=Wk;const nF=Am("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Bn=b.forwardRef(({className:e,...t},n)=>p.jsx(Hk,{ref:n,className:Te(nF(),e),...t}));Bn.displayName=Hk.displayName;const xp=b.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:Te("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
215ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));xp.displayName="Textarea";function xw(e,[t,n]){return Math.min(n,Math.max(t,e))}var rF=b.createContext(void 0);function sF(e){const t=b.useContext(rF);return e||t||"ltr"}var hh=0;function Kk(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bw()),document.body.insertAdjacentElement("beforeend",e[1]??bw()),hh++,()=>{hh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hh--}},[])}function bw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fh="focusScope.autoFocusOnMount",ph="focusScope.autoFocusOnUnmount",Sw={bubbles:!1,cancelable:!0},iF="FocusScope",bg=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=b.useState(null),c=gn(s),u=gn(i),d=b.useRef(null),h=Ee(t,m=>l(m)),f=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let m=function(w){if(f.paused||!a)return;const S=w.target;a.contains(S)?d.current=S:gr(d.current,{select:!0})},y=function(w){if(f.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||gr(d.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&gr(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,a,f.paused]),b.useEffect(()=>{if(a){kw.add(f);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(fh,Sw);a.addEventListener(fh,c),a.dispatchEvent(v),v.defaultPrevented||(oF(dF(qk(a)),{select:!0}),document.activeElement===m&&gr(a))}return()=>{a.removeEventListener(fh,c),setTimeout(()=>{const v=new CustomEvent(ph,Sw);a.addEventListener(ph,u),a.dispatchEvent(v),v.defaultPrevented||gr(m??document.body,{select:!0}),a.removeEventListener(ph,u),kw.remove(f)},0)}}},[a,c,u,f]);const x=b.useCallback(m=>{if(!n&&!r||f.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const g=m.currentTarget,[w,S]=aF(g);w&&S?!m.shiftKey&&v===S?(m.preventDefault(),n&&gr(w,{select:!0})):m.shiftKey&&v===w&&(m.preventDefault(),n&&gr(S,{select:!0})):v===g&&m.preventDefault()}},[n,r,f.paused]);return p.jsx(ae.div,{tabIndex:-1,...o,ref:h,onKeyDown:x})});bg.displayName=iF;function oF(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gr(r,{select:t}),document.activeElement!==n)return}function aF(e){const t=qk(e),n=Ew(t,e),r=Ew(t.reverse(),e);return[n,r]}function qk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ew(e,t){for(const n of e)if(!lF(n,{upTo:t}))return n}function lF(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cF(e){return e instanceof HTMLInputElement&&"select"in e}function gr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cF(e)&&t&&e.select()}}var kw=uF();function uF(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Cw(e,t),e.unshift(t)},remove(t){var n;e=Cw(e,t),(n=e[0])==null||n.resume()}}}function Cw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dF(e){return e.filter(t=>t.tagName!=="A")}function hF(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var fF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body}
vendor: 9,451 bytes, lines 215-252
215,ii=new WeakMap,Wl=new WeakMap,Hl={},mh=0,Gk=function(e){return e&&(e.host||Gk(e.parentNode))},pF=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mF=function(e,t,n,r){var s=pF(t,Array.isArray(e)?e:[e]);Hl[n]||(Hl[n]=new WeakMap);var i=Hl[n],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var f=h.getAttribute(r),x=f!==null&&f!=="false",m=(ii.get(h)||0)+1,y=(i.get(h)||0)+1;ii.set(h,m),i.set(h,y),o.push(h),m===1&&x&&Wl.set(h,!0),y===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return u(t),a.clear(),mh++,function(){o.forEach(function(d){var h=ii.get(d)-1,f=i.get(d)-1;ii.set(d,h),i.set(d,f),h||(Wl.has(d)||d.removeAttribute(r),Wl.delete(d)),f||d.removeAttribute(n)}),mh--,mh||(ii=new WeakMap,ii=new WeakMap,Wl=new WeakMap,Hl={})}},Yk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=fF(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),mF(r,s,n,"aria-hidden")):function(){return null}},Er=function(){return Er=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Er.apply(this,arguments)};function gF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function vF(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var wc="right-scroll-bar-position",xc="width-before-scroll-bar",yF="with-scroll-bars-hidden",wF="--removed-body-scroll-bar-size";function gh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xF(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var bF=typeof window<"u"?b.useLayoutEffect:b.useEffect,_w=new WeakMap;function SF(e,t){var n=xF(null,function(r){return e.forEach(function(s){return gh(s,r)})});return bF(function(){var r=_w.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(a){i.has(a)||gh(a,null)}),i.forEach(function(a){s.has(a)||gh(a,o)})}_w.set(n,e)},[e]),n}var pu=function(){return pu=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pu.apply(this,arguments)};function EF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function kF(e){return e}function CF(e,t){t===void 0&&(t=kF);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return s}function _F(e){e===void 0&&(e={});var t=CF(null);return t.options=pu({async:!0,ssr:!1},e),t}var Qk=function(e){var t=e.sideCar,n=EF(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,pu({},n))};Qk.isSideCarExport=!0;function TF(e,t){return e.useMedium(t),Qk}var Jk=_F(),vh=function(){},td=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:vh,onWheelCapture:vh,onTouchMoveCapture:vh}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,f=e.noRelative,x=e.noIsolation,m=e.inert,y=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,w=e.gapMode,S=gF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,k=SF([n,t]),C=Er(Er({},S),s);return b.createElement(b.Fragment,null,u&&b.createElement(E,{sideCar:Jk,removeScrollBar:c,shards:d,noRelative:f,noIsolation:x,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:w}),o?b.cloneElement(b.Children.only(a),Er(Er({},C),{ref:k})):b.createElement(g,Er({},C,{className:l,ref:k}),a))});td.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};td.classNames={fullWidth:xc,zeroRight:wc};var PF=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RF(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=PF();return t&&e.setAttribute("nonce",t),e}function AF(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function jF(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var NF=function(){var e=0,t=null;return{add:function(n){e==0&&(t=RF())&&(AF(t,n),jF(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},OF=function(){var e=NF();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xk=function(){var e=OF(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},IF={left:0,top:0,right:0,gap:0},yh=function(e){return parseInt(e||"",10)||0},LF=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[yh(n),yh(r),yh(s)]},DF=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return IF;var t=LF(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},MF=Xk(),Fi="data-scroll-locked",$F=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
216  .`.concat(yF,` {
217   overflow: hidden `).concat(r,`;
218   padding-right: `).concat(a,"px ").concat(r,`;
219  }
220  body[`).concat(Fi,`] {
221    overflow: hidden `).concat(r,`;
222    overscroll-behavior: contain;
223    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
224    padding-left: `.concat(s,`px;
225    padding-top: `).concat(i,`px;
226    padding-right: `).concat(o,`px;
227    margin-left:0;
228    margin-top:0;
229    margin-right: `).concat(a,"px ").concat(r,`;
230    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
231  }
232  
233  .`).concat(wc,` {
234    right: `).concat(a,"px ").concat(r,`;
235  }
236  
237  .`).concat(xc,` {
238    margin-right: `).concat(a,"px ").concat(r,`;
239  }
240  
241  .`).concat(wc," .").concat(wc,` {
242    right: 0 `).concat(r,`;
243  }
244  
245  .`).concat(xc," .").concat(xc,` {
246    margin-right: 0 `).concat(r,`;
247  }
248  
249  body[`).concat(Fi,`] {
250    `).concat(wF,": ").concat(a,`px;
251  }
252`)},Tw=function(){var e=parseInt(document.body.getAttribute(Fi)||"0",10);return isFinite(e)?e:0},FF=function(){b.useEffect(function(){return document.body.setAttribute(Fi,(Tw()+1).toString()),function(){var e=Tw()-1;e<=0?document.body.removeAttribute(Fi):document.body.setAttribute(Fi,e.toString())}},[])},VF=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;FF();var i=b.useMemo(function(){return DF(s)},[s]);return b.createElement(MF,{styles:$F(i,!t,s,n?"":"!important")})},bp=!1;if(typeof window<"u")try{var Kl=Object.defineProperty({},"passive",{get:function(){return bp=!0,!0}});window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{bp=!1}var oi=bp?{passive:!1}:!1,UF=function(e){return e.tagName==="TEXTAREA"},Zk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!UF(e)&&n[t]==="visible")},BF=function(e){return Zk(e,"overflowY")},zF=function(e){return Zk(e,"overflowX")},Pw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=eC(e,r);if(s){var i=tC(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},WF=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},HF=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},eC=function(e,t){return e==="v"?BF(t):zF(t)},tC=function(e,t){return e==="v"?WF(t):HF(t)},KF=function(e,t){return e==="h"&&t==="rtl"?-1:1}
vendor: 5,204 bytes, lines 252-255
252,qF=function(e,t,n,r,s){var i=KF(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),c=!1,u=o>0,d=0,h=0;do{if(!a)break;var f=tC(e,a),x=f[0],m=f[1],y=f[2],v=m-y-i*x;(x||v)&&eC(e,a)&&(d+=v,h+=x);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!s)||!u&&(Math.abs(h)<1||!s))&&(c=!0),c},ql=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rw=function(e){return[e.deltaX,e.deltaY]},Aw=function(e){return e&&"current"in e?e.current:e},GF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},YF=function(e){return`
253  .block-interactivity-`.concat(e,` {pointer-events: none;}
254  .allow-interactivity-`).concat(e,` {pointer-events: all;}
255`)},QF=0,ai=[];function JF(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),s=b.useState(QF++)[0],i=b.useState(Xk)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=vF([e.lockRef.current],(e.shards||[]).map(Aw),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=ql(m),g=n.current,w="deltaX"in m?m.deltaX:g[0]-v[0],S="deltaY"in m?m.deltaY:g[1]-v[1],E,k=m.target,C=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&k.type==="range")return!1;var T=Pw(C,k);if(!T)return!0;if(T?E=C:(E=C==="v"?"h":"v",T=Pw(C,k)),!T)return!1;if(!r.current&&"changedTouches"in m&&(w||S)&&(r.current=E),!E)return!0;var A=r.current||E;return qF(A,y,m,A==="h"?w:S,!0)},[]),l=b.useCallback(function(m){var y=m;if(!(!ai.length||ai[ai.length-1]!==i)){var v="deltaY"in y?Rw(y):ql(y),g=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&GF(E.delta,v)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var w=(o.current.shards||[]).map(Aw).filter(Boolean).filter(function(E){return E.contains(y.target)}),S=w.length>0?a(y,w[0]):!o.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),c=b.useCallback(function(m,y,v,g){var w={name:m,delta:y,target:v,should:g,shadowParent:XF(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=b.useCallback(function(m){n.current=ql(m),r.current=void 0},[]),d=b.useCallback(function(m){c(m.type,Rw(m),m.target,a(m,e.lockRef.current))},[]),h=b.useCallback(function(m){c(m.type,ql(m),m.target,a(m,e.lockRef.current))},[]);b.useEffect(function(){return ai.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,oi),document.addEventListener("touchmove",l,oi),document.addEventListener("touchstart",u,oi),function(){ai=ai.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,oi),document.removeEventListener("touchmove",l,oi),document.removeEventListener("touchstart",u,oi)}},[]);var f=e.removeScrollBar,x=e.inert;return b.createElement(b.Fragment,null,x?b.createElement(i,{styles:YF(s)}):null,f?b.createElement(VF,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function XF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZF=TF(Jk,JF);var Sg=b.forwardRef(function(e,t){return b.createElement(td,Er({},e,{ref:t,sideCar:ZF}))});Sg.classNames=td.classNames;var eV=[" ","Enter","ArrowUp","ArrowDown"],tV=[" ","Enter"],Bs="Select",[nd,rd,nV]=kS(Bs),[ko,oU]=mo(Bs,[nV,Bu]),sd=Bu(),[rV,ts]=ko(Bs),[sV,iV]=ko(Bs),nC=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:h,required:f,form:x}=e,m=sd(t),[y,v]=b.useState(null),[g,w]=b.useState(null),[S,E]=b.useState(!1),k=sF(c),[C,T]=Yc({prop:r,defaultProp:s??!1,onChange:i,caller:Bs}),[A,P]=Yc({prop:o,defaultProp:a,onChange:l,caller:Bs}),L=b.useRef(null),N=y?x||!!y.closest("form"):!0,[W,O]=b.useState(new Set),K=Array.from(W).map(F=>F.props.value).join(";");return p.jsx(nO,{...m,children:p.jsxs(rV,{required:f,scope:t,trigger:y,onTriggerChange:v,valueNode:g,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:Di(),value:A,onValueChange:P,open:C,onOpenChange:T,dir:k,triggerPointerDownPosRef:L,disabled:h,children:[p.jsx(nd.Provider,{scope:t,children:p.jsx(sV,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(F=>{O(G=>new Set(G).add(F))},[]),onNativeOptionRemove:b.useCallback(F=>{O(G=>{const R=new Set(G);return R.delete(F),R})},[]),children:n})}),N?p.jsxs(_C,{"aria-hidden":!0,required:f,tabIndex:-1,name:u,autoComplete:d,value:A,onChange:F=>P(F.target.value),disabled:h,form:x,children:[A===void 0?p.jsx("option",{value:""}):null,Array.from(W)]},K):null]})})};nC.displayName=Bs;var rC="SelectTrigger",sC=b.forwardRef((e,t)=>
vendor: 16,816 bytes, line 255
255{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=sd(n),o=ts(rC,n),a=o.disabled||r,l=Ee(t,o.onTriggerChange),c=rd(n),u=b.useRef("touch"),[d,h,f]=PC(m=>{const y=c().filter(w=>!w.disabled),v=y.find(w=>w.value===o.value),g=RC(y,m,v);g!==void 0&&o.onValueChange(g.value)}),x=m=>{a||(o.onOpenChange(!0),f()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(A1,{asChild:!0,...i,children:p.jsx(ae.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":TC(o.value)?"":void 0,...s,ref:l,onClick:ne(s.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&x(m)}),onPointerDown:ne(s.onPointerDown,m=>{u.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(x(m),m.preventDefault())}),onKeyDown:ne(s.onKeyDown,m=>{const y=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(y&&m.key===" ")&&eV.includes(m.key)&&(x(),m.preventDefault())})})})});sC.displayName=rC;var iC="SelectValue",oC=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,l=ts(iC,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=Ee(t,l.onValueNodeChange);return et(()=>{c(u)},[c,u]),p.jsx(ae.span,{...a,ref:d,style:{pointerEvents:"none"},children:TC(l.value)?p.jsx(p.Fragment,{children:o}):i})});oC.displayName=iC;var oV="SelectIcon",aC=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return p.jsx(ae.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});aC.displayName=oV;var aV="SelectPortal",lC=e=>p.jsx(Du,{asChild:!0,...e});lC.displayName=aV;var zs="SelectContent",cC=b.forwardRef((e,t)=>{const n=ts(zs,e.__scopeSelect),[r,s]=b.useState();if(et(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?qs.createPortal(p.jsx(uC,{scope:e.__scopeSelect,children:p.jsx(nd.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(dC,{...e,ref:t})});cC.displayName=zs;var sn=10,[uC,ns]=ko(zs),lV="SelectContentImpl",cV=io("SelectContent.RemoveScroll"),dC=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:f,sticky:x,hideWhenDetached:m,avoidCollisions:y,...v}=e,g=ts(zs,n),[w,S]=b.useState(null),[E,k]=b.useState(null),C=Ee(t,$=>S($)),[T,A]=b.useState(null),[P,L]=b.useState(null),N=rd(n),[W,O]=b.useState(!1),K=b.useRef(!1);b.useEffect(()=>{if(w)return Yk(w)},[w]),Kk();const F=b.useCallback($=>{const[he,...Oe]=N().map(ce=>ce.ref.current),[ue]=Oe.slice(-1),oe=document.activeElement;for(const ce of $)if(ce===oe||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===he&&E&&(E.scrollTop=0),ce===ue&&E&&(E.scrollTop=E.scrollHeight),ce==null||ce.focus(),document.activeElement!==oe))return},[N,E]),G=b.useCallback(()=>F([T,w]),[F,T,w]);b.useEffect(()=>{W&&G()},[W,G]);const{onOpenChange:R,triggerPointerDownPosRef:j}=g;b.useEffect(()=>{if(w){let $={x:0,y:0};const he=ue=>{var oe,ce;$={x:Math.abs(Math.round(ue.pageX)-(((oe=j.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(ue.pageY)-(((ce=j.current)==null?void 0:ce.y)??0))}},Oe=ue=>{$.x<=10&&$.y<=10?ue.preventDefault():w.contains(ue.target)||R(!1),document.removeEventListener("pointermove",he),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[w,R,j]),b.useEffect(()=>{const $=()=>R(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[R]);const[M,Y]=PC($=>{const he=N().filter(oe=>!oe.disabled),Oe=he.find(oe=>oe.ref.current===document.activeElement),ue=RC(he,$,Oe);ue&&setTimeout(()=>ue.ref.current.focus())}),H=b.useCallback(($,he,Oe)=>{const ue=!K.current&&!Oe;(g.value!==void 0&&g.value===he||ue)&&(A($),ue&&(K.current=!0))},[g.value]),ee=b.useCallback(()=>w==null?void 0:w.focus(),[w]),X=b.useCallback(($,he,Oe)=>{const ue=!K.current&&!Oe;(g.value!==void 0&&g.value===he||ue)&&L($)},[g.value]),ye=r==="popper"?Sp:hC,Ne=ye===Sp?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:f,sticky:x,hideWhenDetached:m,avoidCollisions:y}:{};return p.jsx(uC,{scope:n,content:w,viewport:E,onViewportChange:k,itemRefCallback:H,selectedItem:T,onItemLeave:ee,itemTextRefCallback:X,focusSelectedItem:G,selectedItemText:P,position:r,isPositioned:W,searchRef:M,children:p.jsx(Sg,{as:cV,allowPinchZoom:!0,children:p.jsx(bg,{asChild:!0,trapped:g.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:ne(s,$=>{var he;(he=g.trigger)==null||he.focus({preventScroll:!0}),$.preventDefault()}),children:p.jsx(el,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:p.jsx(ye,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:$=>$.preventDefault(),...v,...Ne,onPlaced:()=>O(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ne(v.onKeyDown,$=>{const he=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!he&&$.key.length===1&&Y($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let ue=N().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes($.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const oe=$.target,ce=ue.indexOf(oe);ue=ue.slice(ce+1)}setTimeout(()=>F(ue)),$.preventDefault()}})})})})})})});dC.displayName=lV;var uV="SelectItemAlignedPosition",hC=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=ts(zs,n),o=ns(zs,n),[a,l]=b.useState(null),[c,u]=b.useState(null),d=Ee(t,C=>u(C)),h=rd(n),f=b.useRef(!1),x=b.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:v,focusSelectedItem:g}=o,w=b.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&y&&v){const C=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),P=v.getBoundingClientRect();if(i.dir!=="rtl"){const oe=P.left-T.left,ce=A.left-oe,tt=C.left-ce,$t=C.width+tt,rs=Math.max($t,T.width),or=window.innerWidth-sn,ss=xw(ce,[sn,Math.max(sn,or-rs)]);a.style.minWidth=$t+"px",a.style.left=ss+"px"}else{const oe=T.right-P.right,ce=window.innerWidth-A.right-oe,tt=window.innerWidth-C.right-ce,$t=C.width+tt,rs=Math.max($t,T.width),or=window.innerWidth-sn,ss=xw(ce,[sn,Math.max(sn,or-rs)]);a.style.minWidth=$t+"px",a.style.right=ss+"px"}const L=h(),N=window.innerHeight-sn*2,W=m.scrollHeight,O=window.getComputedStyle(c),K=parseInt(O.borderTopWidth,10),F=parseInt(O.paddingTop,10),G=parseInt(O.borderBottomWidth,10),R=parseInt(O.paddingBottom,10),j=K+F+W+R+G,M=Math.min(y.offsetHeight*5,j),Y=window.getComputedStyle(m),H=parseInt(Y.paddingTop,10),ee=parseInt(Y.paddingBottom,10),X=C.top+C.height/2-sn,ye=N-X,Ne=y.offsetHeight/2,$=y.offsetTop+Ne,he=K+F+$,Oe=j-he;if(he<=X){const oe=L.length>0&&y===L[L.length-1].ref.current;a.style.bottom="0px";const ce=c.clientHeight-m.offsetTop-m.offsetHeight,tt=Math.max(ye,Ne+(oe?ee:0)+ce+G),$t=he+tt;a.style.height=$t+"px"}else{const oe=L.length>0&&y===L[0].ref.current;a.style.top="0px";const tt=Math.max(X,K+m.offsetTop+(oe?H:0)+Ne)+Oe;a.style.height=tt+"px",m.scrollTop=he-X+m.offsetTop}a.style.margin=`${sn}px 0`,a.style.minHeight=M+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>f.current=!0)}},[h,i.trigger,i.valueNode,a,c,m,y,v,i.dir,r]);et(()=>w(),[w]);const[S,E]=b.useState();et(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const k=b.useCallback(C=>{C&&x.current===!0&&(w(),g==null||g(),x.current=!1)},[w,g]);return p.jsx(hV,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(ae.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});hC.displayName=uV;var dV="SelectPopperPosition",Sp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=sn,...i}=e,o=sd(n);return p.jsx(j1,{...o,...i,ref:t,align:r,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)"}})});Sp.displayName=dV;var[hV,Eg]=ko(zs,{}),Ep="SelectViewport",fC=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=ns(Ep,n),o=Eg(Ep,n),a=Ee(t,i.onViewportChange),l=b.useRef(0);return p.jsxs(p.Fragment,{children:[p.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:r}),p.jsx(nd.Slot,{scope:n,children:p.jsx(ae.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ne(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&d){const f=Math.abs(l.current-u.scrollTop);if(f>0){const x=window.innerHeight-sn*2,m=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),v=Math.max(m,y);if(v<x){const g=v+f,w=Math.min(x,g),S=g-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});fC.displayName=Ep;var pC="SelectGroup",[fV,pV]=ko(pC),mV=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Di();return p.jsx(fV,{scope:n,id:s,children:p.jsx(ae.div,{role:"group","aria-labelledby":s,...r,ref:t})})});mV.displayName=pC;var mC="SelectLabel",gC=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=pV(mC,n);return p.jsx(ae.div,{id:s.id,...r,ref:t})});gC.displayName=mC;var mu="SelectItem",[gV,vC]=ko(mu),yC=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=ts(mu,n),l=ns(mu,n),c=a.value===r,[u,d]=b.useState(i??""),[h,f]=b.useState(!1),x=Ee(t,g=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,g,r,s)}),m=Di(),y=b.useRef("touch"),v=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 p.jsx(gV,{scope:n,value:r,disabled:s,textId:m,isSelected:c,onItemTextChange:b.useCallback(g=>{d(w=>w||((g==null?void 0:g.textContent)??"").trim())},[]),children:p.jsx(nd.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:p.jsx(ae.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:x,onFocus:ne(o.onFocus,()=>f(!0)),onBlur:ne(o.onBlur,()=>f(!1)),onClick:ne(o.onClick,()=>{y.current!=="mouse"&&v()}),onPointerUp:ne(o.onPointerUp,()=>{y.current==="mouse"&&v()}),onPointerDown:ne(o.onPointerDown,g=>{y.current=g.pointerType}),onPointerMove:ne(o.onPointerMove,g=>{var w;y.current=g.pointerType,s?(w=l.onItemLeave)==null||w.call(l):y.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(o.onPointerLeave,g=>{var w;g.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:ne(o.onKeyDown,g=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&g.key===" "||(tV.includes(g.key)&&v(),g.key===" "&&g.preventDefault())})})})})});yC.displayName=mu;var qo="SelectItemText",wC=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=ts(qo,n),a=ns(qo,n),l=vC(qo,n),c=iV(qo,n),[u,d]=b.useState(null),h=Ee(t,v=>d(v),l.onItemTextChange,v=>{var g;return(g=a.itemTextRefCallback)==null?void 0:g.call(a,v,l.value,l.disabled)}),f=u==null?void 0:u.textContent,x=b.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=c;return et(()=>(m(x),()=>y(x)),[m,y,x]),p.jsxs(p.Fragment,{children:[p.jsx(ae.span,{id:l.textId,...i,ref:h}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?qs.createPortal(i.children,o.valueNode):null]})});wC.displayName=qo;var xC="SelectItemIndicator",bC=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return vC(xC,n).isSelected?p.jsx(ae.span,{"aria-hidden":!0,...r,ref:t}):null});bC.displayName=xC;var kp="SelectScrollUpButton",SC=b.forwardRef((e,t)=>{const n=ns(kp,e.__scopeSelect),r=Eg(kp,e.__scopeSelect),[s,i]=b.useState(!1),o=Ee(t,r.onScrollButtonChange);return et(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?p.jsx(kC,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});SC.displayName=kp;var Cp="SelectScrollDownButton",EC=b.forwardRef((e,t)=>{const n=ns(Cp,e.__scopeSelect),r=Eg(Cp,e.__scopeSelect),[s,i]=b.useState(!1),o=Ee(t,r.onScrollButtonChange);return et(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?p.jsx(kC,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});EC.displayName=Cp;var kC=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=ns("SelectScrollButton",n),o=b.useRef(null),a=rd(n),l=b.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return b.useEffect(()=>()=>l(),[l]),et(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(ae.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ne(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ne(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ne(s.onPointerLeave,()=>{l()})})}),vV="SelectSeparator",CC=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(ae.div,{"aria-hidden":!0,...r,ref:t})});CC.displayName=vV;var _p="SelectArrow",yV=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=sd(n),i=ts(_p,n),o=ns(_p,n);return i.open&&o.position==="popper"?p.jsx(N1,{...s,...r,ref:t}):null});yV.displayName=_p;var wV="SelectBubbleInput",_C=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=b.useRef(null),i=Ee(r,s),o=hF(t);return b.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[o,t]),p.jsx(ae.select,{...n,style:{...RS,...n.style},ref:i,defaultValue:t})});_C.displayName=wV;function TC(e){return e===""||e===void 0}function PC(e){const t=gn(e),n=b.useRef(""),r=b.useRef(0),s=b.useCallback(o=>{const a=n.current+o;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function RC(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=xV(e,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function xV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bV=nC,AC=sC,SV=oC,EV=aC,kV=lC,jC=cC,CV=fC,NC=gC,OC=yC,_V=wC,TV=bC,IC=SC,LC=EC,DC=CC;const PV=bV,RV=SV,MC=b.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(AC,{ref:r,className:Te("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
255ing-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",e),...n,children:[t,p.jsx(EV,{asChild:!0,children:p.jsx(Qc,{className:"h-4 w-4 opacity-50"})})]}));MC.displayName=AC.displayName;const $C=b.forwardRef(({className:e,...t},n)=>p.jsx(IC,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Hj,{className:"h-4 w-4"})}));$C.displayName=IC.displayName;const FC=b.forwardRef(({className:e,...t},n)=>p.jsx(LC,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Qc,{className:"h-4 w-4"})}));FC.displayName=LC.displayName;const VC=b.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>p.jsx(kV,{children:p.jsxs(jC,{ref:s,className:Te("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",n==="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",e),position:n,...r,children:[p.jsx($C,{}),p.jsx(CV,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(FC,{})]})}));VC.displayName=jC.displayName;const AV=b.forwardRef(({className:e,...t},n)=>p.jsx(NC,{ref:n,className:Te("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));AV.displayName=NC.displayName;const bc=b.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(OC,{ref:r,className:Te("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",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(TV,{children:p.jsx(jm,{className:"h-4 w-4"})})}),p.jsx(_V,{children:t})]}));bc.displayName=OC.displayName;const jV=b.forwardRef(({className:e,...t},n)=>p.jsx(DC,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));jV.displayName=DC.displayName;var id="Dialog",[UC,aU]=mo(id),[NV,wn]=UC(id),BC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=b.useRef(null),l=b.useRef(null),[c,u]=Yc({prop:r,defaultProp:s??!1,onChange:i,caller:id});return p.jsx(NV,{scope:t,triggerRef:a,contentRef:l,contentId:Di(),titleId:Di(),descriptionId:Di(),open:c,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(d=>!d),[u]),modal:o,children:n})};BC.displayName=id;var zC="DialogTrigger",OV=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=wn(zC,n),i=Ee(t,s.triggerRef);return p.jsx(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":_g(s.open
vendor: 5,313 bytes, lines 255-259
255),...r,ref:i,onClick:ne(e.onClick,s.onOpenToggle)})});OV.displayName=zC;var kg="DialogPortal",[IV,WC]=UC(kg,{forceMount:void 0}),HC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=wn(kg,t);return p.jsx(IV,{scope:t,forceMount:n,children:b.Children.map(r,o=>p.jsx(go,{present:n||i.open,children:p.jsx(Du,{asChild:!0,container:s,children:o})}))})};HC.displayName=kg;var gu="DialogOverlay",KC=b.forwardRef((e,t)=>{const n=WC(gu,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=wn(gu,e.__scopeDialog);return i.modal?p.jsx(go,{present:r||i.open,children:p.jsx(DV,{...s,ref:t})}):null});KC.displayName=gu;var LV=io("DialogOverlay.RemoveScroll"),DV=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=wn(gu,n);return p.jsx(Sg,{as:LV,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx(ae.div,{"data-state":_g(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ws="DialogContent",qC=b.forwardRef((e,t)=>{const n=WC(Ws,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=wn(Ws,e.__scopeDialog);return p.jsx(go,{present:r||i.open,children:i.modal?p.jsx(MV,{...s,ref:t}):p.jsx($V,{...s,ref:t})})});qC.displayName=Ws;var MV=b.forwardRef((e,t)=>{const n=wn(Ws,e.__scopeDialog),r=b.useRef(null),s=Ee(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return Yk(i)},[]),p.jsx(GC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ne(e.onFocusOutside,i=>i.preventDefault())})}),$V=b.forwardRef((e,t)=>{const n=wn(Ws,e.__scopeDialog),r=b.useRef(!1),s=b.useRef(!1);return p.jsx(GC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),GC=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=wn(Ws,n),l=b.useRef(null),c=Ee(t,l);return Kk(),p.jsxs(p.Fragment,{children:[p.jsx(bg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:p.jsx(el,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":_g(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(FV,{titleId:a.titleId}),p.jsx(UV,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Cg="DialogTitle",YC=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=wn(Cg,n);return p.jsx(ae.h2,{id:s.titleId,...r,ref:t})});YC.displayName=Cg;var QC="DialogDescription",JC=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=wn(QC,n);return p.jsx(ae.p,{id:s.descriptionId,...r,ref:t})});JC.displayName=QC;var XC="DialogClose",ZC=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=wn(XC,n);return p.jsx(ae.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,()=>s.onOpenChange(!1))})});ZC.displayName=XC;function _g(e){return e?"open":"closed"}var e_="DialogTitleWarning",[lU,t_]=YA(e_,{contentName:Ws,titleName:Cg,docsSlug:"dialog"}),FV=({titleId:e})=>{const t=t_(e_),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
256
257If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
258
259For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},VV="DialogDescriptionWarning",UV=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${t_(VV).contentName}}.`;return b.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},BV=BC,zV=HC,n_=KC,r_=qC,s_=YC,i_=JC,WV=ZC;const HV=BV,KV=zV,o_=b.forwardRef(({className:e,...t},n)=>p.jsx(n_,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));o_.displayName=n_.displayName;const a_=b.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(KV,{children:[p.jsx(o_,{}),p.jsxs(r_,{ref:r,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
259nded-lg",e),...n,children:[t,p.jsxs(WV,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[p.jsx(Nm,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));a_.displayName=r_.displayName;const l_=({className:e,...t})=>p.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});l_.displayName="DialogHeader";const c_=b.forwardRef(({className:e,...t},n)=>p.jsx(s_,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));c_.displayName=s_.displayName;const u_=b.forwardRef(({className:e,...t},n)=>p.jsx(i_,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));u_.displayName=i_.displayName;const qV=()=>{const[e,t]=b.useState(null),[n,r]=b.useState(!1),[s,i]=b.useState(!0),[o,a]=b.useState(""),[l,c]=b.useState("");b.useEffect(()=>{jt.auth.getSession().then(({data:{session:x}})=>{t(x),x?u(x.user.id):i(!1)});const{data:{subscription:f}}=jt.auth.onAuthStateChange((x,m)=>{t(m),m?u(m.user.id):(r(!1),i(!1))});return()=>f.unsubscribe()},[]);const u=async f=>{const{data:x}=await jt.rpc("has_role",{_user_id:f,_role:"admin"});r(!!x),i(!1)},d=async()=>{const{error:f}=await jt.auth.signInWithPassword({email:o,password:l});f&&qn.error(f.message)},h=async()=>{await jt.auth.signOut()};return s?p.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center text-foreground",children:"Caricamento..."}):e?n?p.jsx(GV,{onLogout:h}):p.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center text-foreground",children:p.jsxs("div",{className:"text-center space-y-4",children:[p.jsx("p",{className:"text-xl",children:"Non hai i permessi di amministratore."}),p.jsxs(An,{variant:"outline",onClick:h,children:[p.jsx(XS,{className:"w-4 h-4 mr-2"}),"Esci"]})]})}):p.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:p.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[p.jsx("h1",{className:"font-display text-3xl font-bold text-foreground text-center",children:"Admin Login"}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(bs,{placeholder:"Email",value:o,onChange:f=>a(f.target.value)}),p.jsx(bs,{placeholder:"Password",type:"password",value:l,onChange:f=>c(f.target.value),onKeyDown:f=>f.key==="Enter"&&d()}),p.jsxs(An,{onClick:d,className:"w-full",children:[p.jsx(Kj,{className:"w-4 h-4 mr-2"}),"Accedi"]})]})]})})},GV=({onLogout:e})=>{const{data:t=[],isLoading:n}=zk(),r=dS(),[s,i]=b.useState(null),[o,a]=b.useState(!1),l=()=>r.invalidateQueries({queryKey:["bio-slides"]}),c=async h=>{if(!confirm("Eliminare questa slide?"))return;const{error:f}=await jt.from("bio_slides").delete().eq("id",h);f?qn.error(f.message):(qn.success("Slide eliminata"),l())},u=async(h,f)=>{const x=t.findIndex(g=>g.id===h),m=f==="up"?x-1:x+1;if(m<0||m>=t.length)return;const y=t[x],v=t[m];await jt.from("bio_slides").update({sort_order:v.sort_order}).eq("id",y.id),await jt.from("bio_slides").update({sort_order:y.sort_order}).eq("id",v.id),l()},d=()=>{a(!0),i({id:"",type:"image",title:null,subtitle:null,label:null,caption:null,image_url:null,bullets:null,stats:null,sort_order:t.length})};return p.jsxs("div",{className:"min-h-screen bg-background text-foreground p-6 md:p-10",children:[p.jsxs("div",{className:"max-w-4xl mx-auto",children:[p.jsxs("div",{className:"flex items-center justify-between mb-8",children:[p.jsx("h1",{className:"font-display text-3xl font-bold",children:"Gestione Slide Bio"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs(An,{onClick:d,children:[p.jsx(Yj,{className:"w-4 h-4 mr-2"}),"Nuova Slide"]}),p.jsxs(An,{variant:"outline",onClick:e,children:[p.jsx(XS,{className:"w-4 h-4 mr-2"}),"Esci"]})]})]}),n?p.jsx("p",{children:"Caricamento..."}):p.jsx("div",{className:"space-y-3",children:t.map((h,f)=>p.jsxs("div",{className:"border border-border rounded-xl p-4 flex items-center gap-4 bg-card",children:[h.image_url&&p.jsx("img",{src:h.image_url,alt:"",className:"w-20 h-14 object-cover rounded-lg flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("span",{className:"text-xs text-primary uppercase tracking-wider",children:h.type}),p.jsx("p",{className:"text-foreground font-medium truncate",children:h.title||h.caption||h.label||`Slide ${f+1}`})]}),p.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[p.jsx(An,{size:"icon",variant:"ghost",onClick:()=>u(h.id,"up"),disabled:f===0,children:p.jsx(Wj,{className:"w-4 h-4"})}),p.jsx(An,{size:"icon",variant:"ghost",onClick:()=>u(h.id,"down"),disabled:f===t.length-1,children:p.jsx(zj,{className:"w-4 h-4"})}),p.jsx(An,{size:"icon",variant:"ghost",onClick:()=>{a(!1),i(h)},children:p.jsx(Gj,{className:"w-4 h-4"})}),p.jsx(An,{size:"icon",variant:"ghost",onClick:()=>c(h.id),children:p.jsx(Qj,{className:"w-4 h-4 text-destructive"})})]})]}
259,h.id))})]}),s&&p.jsx(YV,{slide:s,isNew:o,onClose:()=>i(null),onSaved:()=>{i(null),l()}})]})},YV=({slide:e,isNew:t,onClose:n,onSaved:r})=>{var m;const[s,i]=b.useState(e),[o,a]=b.useState(!1),[l,c]=b.useState(((m=e.bullets)==null?void 0:m.join(`
260`))||""),[u,d]=b.useState(e.stats?e.stats.map(y=>`${y.value}|${y.label}`).join(`
261`):""),h=(y,v)=>i(g=>({...g,[y]:v})),f=async y=>{var k;const v=(k=y.target.files)==null?void 0:k[0];if(!v)return;a(!0);const g=v.name.split(".").pop(),w=`${crypto.randomUUID()}.${g}`,{error:S}=await jt.storage.from("slide-images").upload(w,v);if(S){qn.error(S.message),a(!1);return}const{data:E}=jt.storage.from("slide-images").getPublicUrl(w);h("image_url",E.publicUrl),a(!1),qn.success("Immagine caricata")},x=async()=>{const y=l.trim()?l.split(`
262`).filter(Boolean):null,v=u.trim()?u.split(`
263`).filter(Boolean).map(w=>{const[S,E]=w.split("|");return{value:(S==null?void 0:S.trim())||"",label:(E==null?void 0:E.trim())||""}}):null,g={type:s.type,title:s.title||null,subtitle:s.subtitle||null,label:s.label||null,caption:s.caption||null,image_url:s.image_url||null,bullets:y,stats:v,sort_order:s.sort_order};if(t){const{error:w}=await jt.from("bio_slides").insert(g);if(w){qn.error(w.message);return}qn.success("Slide creata")}else{const{error:w}=await jt.from("bio_slides").update(g).eq("id",s.id);if(w){qn.error(w.message);return}qn.success("Slide aggiornata")}r()};return p.jsx(HV,{open:!0,onOpenChange:()=>n(),children:p.jsxs(a_,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[p.jsxs(l_,{children:[p.jsx(c_,{children:t?"Nuova Slide":"Modifica Slide"}),p.jsx(u_,{children:"Configura i contenuti della slide."})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(Bn,{children:"Tipo"}),p.jsxs(PV,{value:s.type,onValueChange:y=>h("type",y),children:[p.jsx(MC,{children:p.jsx(RV,{})}),p.jsxs(VC,{children:[p.jsx(bc,{value:"hero",children:"Hero (immagine + titolo)"}),p.jsx(bc,{value:"image",children:"Immagine"}),p.jsx(bc,{value:"text",children:"Testo"})]})]})]}),(s.type==="hero"||s.type==="image")&&p.jsxs("div",{children:[p.jsx(Bn,{children:"Immagine"}),s.image_url&&p.jsx("img",{src:s.image_url,alt:"",className:"w-full h-32 object-cover rounded-lg mb-2"}),p.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-primary hover:underline",children:[p.jsx(Jj,{className:"w-4 h-4"}),o?"Caricamento...":"Carica immagine",p.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:f,disabled:o})]})]}),(s.type==="hero"||s.type==="text")&&p.jsx(p.Fragment,{children:p.jsxs("div",{children:[p.jsx(Bn,{children:"Titolo"}),p.jsx(bs,{value:s.title||"",onChange:y=>h("title",y.target.value)})]})}),s.type==="hero"&&p.jsxs("div",{children:[p.jsx(Bn,{children:"Sottotitolo"}),p.jsx(bs,{value:s.subtitle||"",onChange:y=>h("subtitle",y.target.value)})]}),s.type==="text"&&p.jsxs("div",{children:[p.jsx(Bn,{children:"Etichetta (es. CHI SONO)"}),p.jsx(bs,{value:s.label||"",onChange:y=>h("label",y.target.value)})]}),s.type==="image"&&p.jsxs("div",{children:[p.jsx(Bn,{children:"Didascalia"}),p.jsx(bs,{value:s.caption||"",onChange:y=>h("caption",y.target.value)})]}),s.type==="text"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(Bn,{children:"Bullet points (uno per riga)"}),p.jsx(xp,{value:l,onChange:y=>c(y.target.value),rows:4})]}),p.jsxs("div",{children:[p.jsx(Bn,{children:"Statistiche (valore|etichetta, una per riga)"}),p.jsx(xp,{value:u,onChange:y=>d(y.target.value),rows:4,placeholder:"1000+|Clienti formati"})]})]}),p.jsx(An,{onClick:x,className:"w-full",children:"Salva"})]})]})})},QV=()=>{const e=bS();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),p.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},JV=new cR,XV=()=>p.jsx(fR,{client:JV,children:p.jsxs(xO,{children:[p.jsx(IN,{}),p.jsx(BA,{}),p.jsx(uA,{children:p.jsxs(aA,{children:[p.jsx(oc,{path:"/",element:p.jsx(Z3,{})}),p.jsx(oc,{path:"/admin",element:p.jsx(qV,{})}),p.jsx(oc,{path:"*",element:p.jsx(QV,{})})]})})]})});eS(document.getElementById("root")).render(p.jsx(XV,{}));

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.