PageSourceSearch

https://bienaldearquiteturabrasileira.com/assets/index-DwkDK-Si.js

js bienaldearquiteturabrasileira.com collected 2026-10-04 10:20:12 UTC 709,730 bytes, 145 lines download raw bytes

vendor: 6,154 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Index-tkwKhFl9.js","assets/WhatsAppButton-BILX1wW5.js","assets/SimuladorBienalDeArquitetura-tXwHv_Dt.js","assets/ProjetosVencedores-C2j3QlTW.js","assets/Patrocinadores-C33WEJcm.js","assets/NotFound-B6_SUDLN.js"])))=>i.map(i=>d[i]);
2var UT=Object.defineProperty;var vm=t=>{throw TypeError(t)};var FT=(t,e,n)=>e in t?UT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var bn=(t,e,n)=>FT(t,typeof e!="symbol"?e+"":e,n),gc=(t,e,n)=>e.has(t)||vm("Cannot "+n);var A=(t,e,n)=>(gc(t,e,"read from private field"),n?n.call(t):e.get(t)),ne=(t,e,n)=>e.has(t)?vm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Z=(t,e,n,r)=>(gc(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Ve=(t,e,n)=>(gc(t,e,"access private method"),n);var Oa=(t,e,n,r)=>({set _(s){Z(t,e,s,n)},get _(){return A(t,e,r)}});function VT(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))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 da(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var k0={exports:{}},Ru={},A0={exports:{}},ee={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var ha=Symbol.for("react.element"),zT=Symbol.for("react.portal"),HT=Symbol.for("react.fragment"),WT=Symbol.for("react.strict_mode"),KT=Symbol.for("react.profiler"),qT=Symbol.for("react.provider"),GT=Symbol.for("react.context"),JT=Symbol.for("react.forward_ref"),YT=Symbol.for("react.suspense"),QT=Symbol.for("react.memo"),XT=Symbol.for("react.lazy"),wm=Symbol.iterator;function ZT(t){return t===null||typeof t!="object"?null:(t=wm&&t[wm]||t["@@iterator"],typeof t=="function"?t:null)}var P0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R0=Object.assign,O0={};function ki(t,e,n){this.props=t,this.context=e,this.refs=O0,this.updater=n||P0}ki.prototype.isReactComponent={};ki.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ki.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function L0(){}L0.prototype=ki.prototype;function Ef(t,e,n){this.props=t,this.context=e,this.refs=O0,this.updater=n||P0}var Tf=Ef.prototype=new L0;Tf.constructor=Ef;R0(Tf,ki.prototype);Tf.isPureReactComponent=!0;var bm=Array.isArray,I0=Object.prototype.hasOwnProperty,Cf={current:null},N0={key:!0,ref:!0,__self:!0,__source:!0};function j0(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)I0.call(e,r)&&!N0.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ha,type:t,key:i,ref:o,props:s,_owner:Cf.current}}function e1(t,e){return{$$typeof:ha,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function _f(t){return typeof t=="object"&&t!==null&&t.$$typeof===ha}function t1(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Sm=/\/+/g;function yc(t,e){return typeof t=="object"&&t!==null&&t.key!=null?t1(""+t.key):e.toString(36)}function fl(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case ha:case zT:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+yc(o,0):r,bm(s)?(n="",t!=null&&(n=t.replace(Sm,"$&/")+"/"),fl(s,e,n,"",function(u){return u})):s!=null&&(_f(s)&&(s=e1(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Sm,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",bm(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+yc(i,a);o+=fl(i,e,n,l,s)}else if(l=ZT(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+yc(i,a++),o+=fl(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function La(t,e,n){if(t==null)return t;var r=[],s=0;return fl(t,r,"","",function(i){return e.call(n,i,s++)}),r}function n1(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var tt={current:null},pl={transition:null},r1={ReactCurrentDispatcher:tt,ReactCurrentBatchConfig:pl,ReactCurrentOwner:Cf};function D0(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 4,432 bytes, lines 10-26
10ee.Children={map:La,forEach:function(t,e,n){La(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return La(t,function(){e++}),e},toArray:function(t){return La(t,function(e){return e})||[]},only:function(t){if(!_f(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ee.Component=ki;ee.Fragment=HT;ee.Profiler=KT;ee.PureComponent=Ef;ee.StrictMode=WT;ee.Suspense=YT;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r1;ee.act=D0;ee.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=R0({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Cf.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)I0.call(e,l)&&!N0.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ha,type:t.type,key:s,ref:i,props:r,_owner:o}};ee.createContext=function(t){return t={$$typeof:GT,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:qT,_context:t},t.Consumer=t};ee.createElement=j0;ee.createFactory=function(t){var e=j0.bind(null,t);return e.type=t,e};ee.createRef=function(){return{current:null}};ee.forwardRef=function(t){return{$$typeof:JT,render:t}};ee.isValidElement=_f;ee.lazy=function(t){return{$$typeof:XT,_payload:{_status:-1,_result:t},_init:n1}};ee.memo=function(t,e){return{$$typeof:QT,type:t,compare:e===void 0?null:e}};ee.startTransition=function(t){var e=pl.transition;pl.transition={};try{t()}finally{pl.transition=e}};ee.unstable_act=D0;ee.useCallback=function(t,e){return tt.current.useCallback(t,e)};ee.useContext=function(t){return tt.current.useContext(t)};ee.useDebugValue=function(){};ee.useDeferredValue=function(t){return tt.current.useDeferredValue(t)};ee.useEffect=function(t,e){return tt.current.useEffect(t,e)};ee.useId=function(){return tt.current.useId()};ee.useImperativeHandle=function(t,e,n){return tt.current.useImperativeHandle(t,e,n)};ee.useInsertionEffect=function(t,e){return tt.current.useInsertionEffect(t,e)};ee.useLayoutEffect=function(t,e){return tt.current.useLayoutEffect(t,e)};ee.useMemo=function(t,e){return tt.current.useMemo(t,e)};ee.useReducer=function(t,e,n){return tt.current.useReducer(t,e,n)};ee.useRef=function(t){return tt.current.useRef(t)};ee.useState=function(t){return tt.current.useState(t)};ee.useSyncExternalStore=function(t,e,n){return tt.current.useSyncExternalStore(t,e,n)};ee.useTransition=function(){return tt.current.useTransition()};ee.version="18.3.1";A0.exports=ee;var b=A0.exports;const I=da(b),s1=VT({__proto__:null,default:I},[b]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var i1=b,o1=Symbol.for("react.element"),a1=Symbol.for("react.fragment"),l1=Object.prototype.hasOwnProperty,u1=i1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c1={key:!0,ref:!0,__self:!0,__source:!0};function M0(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)l1.call(e,r)&&!c1.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:o1,type:t,key:i,ref:o,props:s,_owner:u1.current}}Ru.Fragment=a1;Ru.jsx=M0;Ru.jsxs=M0;k0.exports=Ru;var k=k0.exports,$0={exports:{}},St={},B0={exports:{}},U0={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(t){function e(_,O){var D=_.length;_.push(O);e:for(;0<D;){var j=D-1>>>1,z=_[j];if(0<s(z,O))_[j]=O,_[D]=z,D=j;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var O=_[0],D=_.pop();if(D!==O){_[0]=D;e:for(var j=0,z=_.length,Y=z>>>1;j<Y;){var ie=2*(j+1)-1,Fe=_[ie],re=ie+1,Nt=_[re];if(0>s(Fe,D))re<z&&0>s(Nt,Fe)?(_[j]=Nt,_[re]=D,j=re):(_[j]=Fe,_[ie]=D,j=ie);else if(re<z&&0>
vendor: 10,213 bytes, lines 26-35
26s(Nt,D))_[j]=Nt,_[re]=D,j=re;else break e}}return O}function s(_,O){var D=_.sortIndex-O.sortIndex;return D!==0?D:_.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,h=3,f=!1,p=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(_){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=_)r(u),O.sortIndex=O.expirationTime,e(l,O);else break;O=n(u)}}function S(_){if(m=!1,v(_),!p)if(n(l)!==null)p=!0,V(x);else{var O=n(u);O!==null&&$(S,O.startTime-_)}}function x(_,O){p=!1,m&&(m=!1,g(C),C=-1),f=!0;var D=h;try{for(v(O),d=n(l);d!==null&&(!(d.expirationTime>O)||_&&!H());){var j=d.callback;if(typeof j=="function"){d.callback=null,h=d.priorityLevel;var z=j(d.expirationTime<=O);O=t.unstable_now(),typeof z=="function"?d.callback=z:d===n(l)&&r(l),v(O)}else r(l);d=n(l)}if(d!==null)var Y=!0;else{var ie=n(u);ie!==null&&$(S,ie.startTime-O),Y=!1}return Y}finally{d=null,h=D,f=!1}}var E=!1,T=null,C=-1,P=5,R=-1;function H(){return!(t.unstable_now()-R<P)}function B(){if(T!==null){var _=t.unstable_now();R=_;var O=!0;try{O=T(!0,_)}finally{O?K():(E=!1,T=null)}}else E=!1}var K;if(typeof y=="function")K=function(){y(B)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,J=N.port2;N.port1.onmessage=B,K=function(){J.postMessage(null)}}else K=function(){w(B,0)};function V(_){T=_,E||(E=!0,K())}function $(_,O){C=w(function(){_(t.unstable_now())},O)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(_){_.callback=null},t.unstable_continueExecution=function(){p||f||(p=!0,V(x))},t.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(_){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var D=h;h=O;try{return _()}finally{h=D}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,O){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var D=h;h=_;try{return O()}finally{h=D}},t.unstable_scheduleCallback=function(_,O,D){var j=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?j+D:j):D=j,_){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=D+z,_={id:c++,callback:O,priorityLevel:_,startTime:D,expirationTime:z,sortIndex:-1},D>j?(_.sortIndex=D,e(u,_),n(l)===null&&_===n(u)&&(m?(g(C),C=-1):m=!0,$(S,D-j))):(_.sortIndex=z,e(l,_),p||f||(p=!0,V(x))),_},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(_){var O=h;return function(){var D=h;h=O;try{return _.apply(this,arguments)}finally{h=D}}}})(U0);B0.exports=U0;var d1=B0.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var h1=b,bt=d1;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var F0=new Set,ko={};function as(t,e){gi(t,e),gi(t+"Capture",e)}function gi(t,e){for(ko[t]=e,t=0;t<e.length;t++)F0.add(e[t])}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cd=Object.prototype.hasOwnProperty,f1=/^[: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]*$/,xm={},Em={};function p1(t){return Cd.call(Em,t)?!0:Cd.call(xm,t)?!1:f1.test(t)?Em[t]=!0:(xm[t]=!0,!1)}function m1(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function g1(t,e,n,r){if(e===null||typeof e>"u"||m1(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function nt(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ue[t]=new nt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ue[e]=new nt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ue[t]=new nt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ue[t]=new nt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ue[t]=new nt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ue[t]=new nt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ue[t]=new nt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ue[t]=new nt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ue[t]=new nt(t,5,!1,t.toLowerCase(),null,!1,!1)});var kf=/[\-:]([a-z])/g;function Af(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(kf,Af);Ue[e]=new nt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(kf,Af);Ue[e]=new nt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(kf,Af);Ue[e]=new nt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ue[t]=new nt(t,1,!1,t.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ue[t]=new nt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Pf(t,e,n,r){var s=Ue.hasOwnProperty(e)?Ue[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(g1(e,n,s,r)&&(n=null),r||s===null?p1(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Mn=h1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ia=Symbol.for("react.element"),Os=Symbol.for("react.portal"),Ls=Symbol.for("react.fragment"),Rf=Symbol.for("react.strict_mode"),_d=Symbol.for("react.profiler"),V0=Symbol.for("react.provider"),z0=Symbol.for("react.context"),Of=Symbol.for("react.forward_ref"),kd=Symbol.for("react.suspense"),Ad=Symbol.for("react.suspense_list"),Lf=Symbol.for("react.memo"),Yn=Symbol.for("react.lazy"),H0=Symbol.for("react.offscreen"),Tm=Symbol.iterator;function Bi(t){return t===null||typeof t!="object"?null:(t=Tm&&t[Tm]||t["@@iterator"],typeof t=="function"?t:null)}var we=Object.assign,vc;function eo(t){if(vc===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);vc=e&&e[1]||""}return`
35`+vc+t}var wc=!1;function bc(t,e){if(!t||wc)return"";wc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}
vendor: 16,737 bytes, lines 35-38
35catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
36`),i=r.stack.split(`
37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
38`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{wc=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?eo(t):""}function y1(t){switch(t.tag){case 5:return eo(t.type);case 16:return eo("Lazy");case 13:return eo("Suspense");case 19:return eo("SuspenseList");case 0:case 2:case 15:return t=bc(t.type,!1),t;case 11:return t=bc(t.type.render,!1),t;case 1:return t=bc(t.type,!0),t;default:return""}}function Pd(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ls:return"Fragment";case Os:return"Portal";case _d:return"Profiler";case Rf:return"StrictMode";case kd:return"Suspense";case Ad:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case z0:return(t.displayName||"Context")+".Consumer";case V0:return(t._context.displayName||"Context")+".Provider";case Of:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Lf:return e=t.displayName||null,e!==null?e:Pd(t.type)||"Memo";case Yn:e=t._payload,t=t._init;try{return Pd(t(e))}catch{}}return null}function v1(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pd(e);case 8:return e===Rf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function br(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function W0(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function w1(t){var e=W0(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Na(t){t._valueTracker||(t._valueTracker=w1(t))}function K0(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=W0(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Ml(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Rd(t,e){var n=e.checked;return we({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Cm(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=br(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function q0(t,e){e=e.checked,e!=null&&Pf(t,"checked",e,!1)}function Od(t,e){q0(t,e);var n=br(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Ld(t,e.type,n):e.hasOwnProperty("defaultValue")&&Ld(t,e.type,br(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function _m(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Ld(t,e,n){(e!=="number"||Ml(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var to=Array.isArray;function Js(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+br(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Id(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return we({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function km(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(L(92));if(to(n)){if(1<n.length)throw Error(L(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:br(n)}}function G0(t,e){var n=br(e.value),r=br(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Am(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function J0(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nd(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?J0(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ja,Y0=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(ja=ja||document.createElement("div"),ja.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ja.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ao(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ao={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},b1=["Webkit","ms","Moz","O"];Object.keys(ao).forEach(function(t){b1.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ao[e]=ao[t]})});function Q0(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ao.hasOwnProperty(t)&&ao[t]?(""+e).trim():e+"px"}function X0(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Q0(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var S1=we({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 jd(t,e){if(e){if(S1[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function Dd(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Md=null;function If(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var $d=null,Ys=null,Qs=null;function Pm(t){if(t=ma(t)){if(typeof $d!="function")throw Error(L(280));var e=t.stateNode;e&&(e=ju(e),$d(t.stateNode,t.type,e))}}function Z0(t){Ys?Qs?Qs.push(t):Qs=[t]:Ys=t}function ew(){if(Ys){var t=Ys,e=Qs;if(Qs=Ys=null,Pm(t),e)for(t=0;t<e.length;t++)Pm(e[t])}}function tw(t,e){return t(e)}function nw(){}var Sc=!1;function rw(t,e,n){if(Sc)return t(e,n);Sc=!0;try{return tw(t,e,n)}finally{Sc=!1,(Ys!==null||Qs!==null)&&(nw(),ew())}}function Po(t,e){var n=t.stateNode;if(n===null)return null;var r=ju(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(L(231,e,typeof n));return n}var Bd=!1;if(Rn)try{var Ui={};Object.defineProperty(Ui,"passive",{get:function(){Bd=!0}}),window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Bd=!1}function x1(t,e,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var lo=!1,$l=null,Bl=!1,Ud=null,E1={onError:function(t){lo=!0,$l=t}};function T1(t,e,n,r,s,i,o,a,l){lo=!1,$l=null,x1.apply(E1,arguments)}function C1(t,e,n,r,s,i,o,a,l){if(T1.apply(this,arguments),lo){if(lo){var u=$l;lo=!1,$l=null}else throw Error(L(198));Bl||(Bl=!0,Ud=u)}}function ls(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function sw(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Rm(t){if(ls(t)!==t)throw Error(L(188))}function _1(t){var e=t.alternate;if(!e){if(e=ls(t),e===null)throw Error(L(188));return e!==t?null:t}for(var n=t,r=e;;){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 Rm(s),t;if(i===r)return Rm(s),e;i=i.sibling}throw Error(L(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(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?t:e}function iw(t){return t=_1(t),t!==null?ow(t):null}function ow(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=ow(t);if(e!==null)return e;t=t.sibling}return null}var aw=bt.unstable_scheduleCallback,Om=bt.unstable_cancelCallback,k1=bt.unstable_shouldYield,A1=bt.unstable_requestPaint,Ee=bt.unstable_now,P1=bt.unstable_getCurrentPriorityLevel,Nf=bt.unstable_ImmediatePriority,lw=bt.unstable_UserBlockingPriority,Ul=bt.unstable_NormalPriority,R1=bt.unstable_LowPriority,uw=bt.unstable_IdlePriority,Ou=null,fn=null;function O1(t){if(fn&&typeof fn.onCommitFiberRoot=="function")try{fn.onCommitFiberRoot(Ou,t,void 0,(t.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:N1,L1=Math.log,I1=Math.LN2;function N1(t){return t>>>=0,t===0?32:31-(L1(t)/I1|0)|0}var Da=64,Ma=4194304;function no(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Fl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=no(a):(i&=o,i!==0&&(r=no(i)))}else o=n&~s,o!==0?r=no(o):i!==0&&(r=no(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Kt(e),s=1<<n,r|=t[n],e&=~s;return r}function j1(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function D1(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Kt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=j1(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Fd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function cw(){var t=Da;return Da<<=1,!(Da&4194240)&&(Da=64),t}function xc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function fa(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Kt(e),t[e]=n}function M1(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Kt(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function jf(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Kt(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var se=0;function dw(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var hw,Df,fw,pw,mw,Vd=!1,$a=[],dr=null,hr=null,fr=null,Ro=new Map,Oo=new Map,Xn=[],$1="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 Lm(t,e){switch(t){case"focusin":case"focusout":dr=null;break;case"dragenter":case"dragleave":hr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":Ro.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oo.delete(e.pointerId)}}function Fi(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=ma(e),e!==null&&Df(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function B1(t,e,n,r,s){switch(e){case"focusin":return dr=Fi(dr,t,e,n,r,s),!0;case"dragenter":return hr=Fi(hr,t,e,n,r,s),!0;case"mouseover":return fr=Fi(fr,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ro.set(i,Fi(Ro.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Oo.set(i,Fi(Oo.get(i)||null,t,e,n,r,s)),!0}return!1}function gw(t){var e=Ur(t.target);if(e!==null){var n=ls(e);if(n!==null){if(e=n.tag,e===13){if(e=sw(n),e!==null){t.blockedOn=e,mw(t.priority,function(){fw(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ml(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=zd(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Md=r,n.target.dispatchEvent(r),Md=null}else return e=ma(n),e!==null&&Df(e),t.blockedOn=n,!1;e.shift()}return!0}function Im(t,e,n){ml(t)&&n.delete(e)}function U1(){Vd=!1,dr!==null&&ml(dr)&&(dr=null),hr!==null&&ml(hr)&&(hr=null),fr!==null&&ml(fr)&&(fr=null),Ro.forEac
vendor: 10,567 bytes, line 38
38h(Im),Oo.forEach(Im)}function Vi(t,e){t.blockedOn===e&&(t.blockedOn=null,Vd||(Vd=!0,bt.unstable_scheduleCallback(bt.unstable_NormalPriority,U1)))}function Lo(t){function e(s){return Vi(s,t)}if(0<$a.length){Vi($a[0],t);for(var n=1;n<$a.length;n++){var r=$a[n];r.blockedOn===t&&(r.blockedOn=null)}}for(dr!==null&&Vi(dr,t),hr!==null&&Vi(hr,t),fr!==null&&Vi(fr,t),Ro.forEach(e),Oo.forEach(e),n=0;n<Xn.length;n++)r=Xn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Xn.length&&(n=Xn[0],n.blockedOn===null);)gw(n),n.blockedOn===null&&Xn.shift()}var Xs=Mn.ReactCurrentBatchConfig,Vl=!0;function F1(t,e,n,r){var s=se,i=Xs.transition;Xs.transition=null;try{se=1,Mf(t,e,n,r)}finally{se=s,Xs.transition=i}}function V1(t,e,n,r){var s=se,i=Xs.transition;Xs.transition=null;try{se=4,Mf(t,e,n,r)}finally{se=s,Xs.transition=i}}function Mf(t,e,n,r){if(Vl){var s=zd(t,e,n,r);if(s===null)Lc(t,e,r,zl,n),Lm(t,r);else if(B1(s,t,e,n,r))r.stopPropagation();else if(Lm(t,r),e&4&&-1<$1.indexOf(t)){for(;s!==null;){var i=ma(s);if(i!==null&&hw(i),i=zd(t,e,n,r),i===null&&Lc(t,e,r,zl,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Lc(t,e,r,null,n)}}var zl=null;function zd(t,e,n,r){if(zl=null,t=If(r),t=Ur(t),t!==null)if(e=ls(t),e===null)t=null;else if(n=e.tag,n===13){if(t=sw(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return zl=t,null}function yw(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(P1()){case Nf:return 1;case lw:return 4;case Ul:case R1:return 16;case uw:return 536870912;default:return 16}default:return 16}}var ar=null,$f=null,gl=null;function vw(){if(gl)return gl;var t,e=$f,n=e.length,r,s="value"in ar?ar.value:ar.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return gl=s.slice(t,1<r?1-r:void 0)}function yl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ba(){return!0}function Nm(){return!1}function xt(t){function e(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 t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ba:Nm,this.isPropagationStopped=Nm,this}return we(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ba)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ba)},persist:function(){},isPersistent:Ba}),e}var Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bf=xt(Ai),pa=we({},Ai,{view:0,detail:0}),z1=xt(pa),Ec,Tc,zi,Lu=we({},pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==zi&&(zi&&t.type==="mousemove"?(Ec=t.screenX-zi.screenX,Tc=t.screenY-zi.screenY):Tc=Ec=0,zi=t),Ec)},movementY:function(t){return"movementY"in t?t.movementY:Tc}}),jm=xt(Lu),H1=we({},Lu,{dataTransfer:0}),W1=xt(H1),K1=we({},pa,{relatedTarget:0}),Cc=xt(K1),q1=we({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),G1=xt(q1),J1=we({},Ai,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Y1=xt(J1),Q1=we({},Ai,{data:0}),Dm=xt(Q1),X1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z1={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"},eC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tC(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=eC[t])?!!e[t]:!1}function Uf(){return tC}var nC=we({},pa,{key:function(t){if(t.key){var e=X1[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=yl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Z1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uf,charCode:function(t){return t.type==="keypress"?yl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?yl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),rC=xt(nC),sC=we({},Lu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mm=xt(sC),iC=we({},pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uf}),oC=xt(iC),aC=we({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),lC=xt(aC),uC=we({},Lu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),cC=xt(uC),dC=[9,13,27,32],Ff=Rn&&"CompositionEvent"in window,uo=null;Rn&&"documentMode"in document&&(uo=document.documentMode);var hC=Rn&&"TextEvent"in window&&!uo,ww=Rn&&(!Ff||uo&&8<uo&&11>=uo),$m=" ",Bm=!1;function bw(t,e){switch(t){case"keyup":return dC.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sw(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Is=!1;function fC(t,e){switch(t){case"compositionend":return Sw(e);case"keypress":return e.which!==32?null:(Bm=!0,$m);case"textInput":return t=e.data,t===$m&&Bm?null:t;default:return null}}function pC(t,e){if(Is)return t==="compositionend"||!Ff&&bw(t,e)?(t=vw(),gl=$f=ar=null,Is=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ww&&e.locale!=="ko"?null:e.data;default:return null}}var mC={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 Um(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!mC[t.type]:e==="textarea"}function xw(t,e,n,r){Z0(r),e=Hl(e,"onChange"),0<e.length&&(n=new Bf("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var co=null,Io=null;function gC(t){Iw(t,0)}function Iu(t){var e=Ds(t);if(K0(e))return t}function yC(t,e){if(t==="change")return e}var Ew=!1;if(Rn){var _c;if(Rn){var kc="oninput"in document;if(!kc){var Fm=document.createElement("div");Fm.setAttribute("oninput","return;"),kc=typeof Fm.oninput=="function"}_c=kc}else _c=!1;Ew=_c&&(!document.documentMode||9<document.documentMode)}function Vm(){co&&(co.detachEvent("onpropertychange",Tw),Io=co=null)}function Tw(t){if(t.propertyName==="value"&&Iu(Io)){var e=[];xw(e,Io,t,If(t)),rw(gC,e)}}function vC(t,e,n){t==="focusin"?(Vm(),co=e,Io=n,co.attachEvent("onpropertychange",Tw)):t==="focusout"&&Vm()}function wC(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Iu(Io)}function bC(t,e){if(t==="click")return Iu(e)}function SC(t,e){if(t==="input"||t==="change")return Iu(e)}function xC(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Jt=typeof Object.is=="function"?Object.is:xC;function No(t,e){if(Jt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Cd.call(e,s)||!Jt(t[s],e[s]))return!1}return!0}function zm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Hm(t,e){var n=zm(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zm(n)}}function Cw(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Cw(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function _w(){for(var t=window,e=Ml();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ml(t.document)}return e}function Vf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function EC(t){var e=_w(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Cw(n.ownerDocument.documentElement,n)){if(r!==null&&Vf(n)){if
vendor: 5,775 bytes, line 38
38(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=Hm(n,i);var o=Hm(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var TC=Rn&&"documentMode"in document&&11>=document.documentMode,Ns=null,Hd=null,ho=null,Wd=!1;function Wm(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wd||Ns==null||Ns!==Ml(r)||(r=Ns,"selectionStart"in r&&Vf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ho&&No(ho,r)||(ho=r,r=Hl(Hd,"onSelect"),0<r.length&&(e=new Bf("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Ns)))}function Ua(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var js={animationend:Ua("Animation","AnimationEnd"),animationiteration:Ua("Animation","AnimationIteration"),animationstart:Ua("Animation","AnimationStart"),transitionend:Ua("Transition","TransitionEnd")},Ac={},kw={};Rn&&(kw=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Nu(t){if(Ac[t])return Ac[t];if(!js[t])return t;var e=js[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in kw)return Ac[t]=e[n];return t}var Aw=Nu("animationend"),Pw=Nu("animationiteration"),Rw=Nu("animationstart"),Ow=Nu("transitionend"),Lw=new Map,Km="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 kr(t,e){Lw.set(t,e),as(e,[t])}for(var Pc=0;Pc<Km.length;Pc++){var Rc=Km[Pc],CC=Rc.toLowerCase(),_C=Rc[0].toUpperCase()+Rc.slice(1);kr(CC,"on"+_C)}kr(Aw,"onAnimationEnd");kr(Pw,"onAnimationIteration");kr(Rw,"onAnimationStart");kr("dblclick","onDoubleClick");kr("focusin","onFocus");kr("focusout","onBlur");kr(Ow,"onTransitionEnd");gi("onMouseEnter",["mouseout","mouseover"]);gi("onMouseLeave",["mouseout","mouseover"]);gi("onPointerEnter",["pointerout","pointerover"]);gi("onPointerLeave",["pointerout","pointerover"]);as("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));as("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));as("onBeforeInput",["compositionend","keypress","textInput","paste"]);as("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));as("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));as("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ro="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kC=new Set("cancel close invalid load scroll toggle".split(" ").concat(ro));function qm(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,C1(r,e,void 0,t),t.currentTarget=null}function Iw(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;qm(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;qm(s,a,u),i=l}}}if(Bl)throw t=Ud,Bl=!1,Ud=null,t}function he(t,e){var n=e[Yd];n===void 0&&(n=e[Yd]=new Set);var r=t+"__bubble";n.has(r)||(Nw(e,t,2,!1),n.add(r))}function Oc(t,e,n){var r=0;e&&(r|=4),Nw(n,t,r,e)}var Fa="_reactListening"+Math.random().toString(36).slice(2);function jo(t){if(!t[Fa]){t[Fa]=!0,F0.forEach(function(n){n!=="selectionchange"&&(kC.has(n)||Oc(n,!1,t),Oc(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Fa]||(e[Fa]=!0,Oc("selectionchange",!1,e))}}function Nw(t,e,n,r){switch(yw(e)){case 1:var s=F1;break;case 4:s=V1;break;default:s=Mf}n=s.bind(null,e,n,t),s=void 0,!Bd||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function Lc(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;
vendor: 5,316 bytes, lines 38-39
38if(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=Ur(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}rw(function(){var u=i,c=If(n),d=[];e:{var h=Lw.get(t);if(h!==void 0){var f=Bf,p=t;switch(t){case"keypress":if(yl(n)===0)break e;case"keydown":case"keyup":f=rC;break;case"focusin":p="focus",f=Cc;break;case"focusout":p="blur",f=Cc;break;case"beforeblur":case"afterblur":f=Cc;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=jm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=W1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=oC;break;case Aw:case Pw:case Rw:f=G1;break;case Ow:f=lC;break;case"scroll":f=z1;break;case"wheel":f=cC;break;case"copy":case"cut":case"paste":f=Y1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Mm}var m=(e&4)!==0,w=!m&&t==="scroll",g=m?h!==null?h+"Capture":null:h;m=[];for(var y=u,v;y!==null;){v=y;var S=v.stateNode;if(v.tag===5&&S!==null&&(v=S,g!==null&&(S=Po(y,g),S!=null&&m.push(Do(y,S,v)))),w)break;y=y.return}0<m.length&&(h=new f(h,p,null,n,c),d.push({event:h,listeners:m}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",h&&n!==Md&&(p=n.relatedTarget||n.fromElement)&&(Ur(p)||p[On]))break e;if((f||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,f?(p=n.relatedTarget||n.toElement,f=u,p=p?Ur(p):null,p!==null&&(w=ls(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(f=null,p=u),f!==p)){if(m=jm,S="onMouseLeave",g="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(m=Mm,S="onPointerLeave",g="onPointerEnter",y="pointer"),w=f==null?h:Ds(f),v=p==null?h:Ds(p),h=new m(S,y+"leave",f,n,c),h.target=w,h.relatedTarget=v,S=null,Ur(c)===u&&(m=new m(g,y+"enter",p,n,c),m.target=v,m.relatedTarget=w,S=m),w=S,f&&p)t:{for(m=f,g=p,y=0,v=m;v;v=gs(v))y++;for(v=0,S=g;S;S=gs(S))v++;for(;0<y-v;)m=gs(m),y--;for(;0<v-y;)g=gs(g),v--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=gs(m),g=gs(g)}m=null}else m=null;f!==null&&Gm(d,h,f,m,!1),p!==null&&w!==null&&Gm(d,w,p,m,!0)}}e:{if(h=u?Ds(u):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var x=yC;else if(Um(h))if(Ew)x=SC;else{x=wC;var E=vC}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(x=bC);if(x&&(x=x(t,u))){xw(d,x,n,c);break e}E&&E(t,h,u),t==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&Ld(h,"number",h.value)}switch(E=u?Ds(u):window,t){case"focusin":(Um(E)||E.contentEditable==="true")&&(Ns=E,Hd=u,ho=null);break;case"focusout":ho=Hd=Ns=null;break;case"mousedown":Wd=!0;break;case"contextmenu":case"mouseup":case"dragend":Wd=!1,Wm(d,n,c);break;case"selectionchange":if(TC)break;case"keydown":case"keyup":Wm(d,n,c)}var T;if(Ff)e:{switch(t){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Is?bw(t,n)&&(C="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(ww&&n.locale!=="ko"&&(Is||C!=="onCompositionStart"?C==="onCompositionEnd"&&Is&&(T=vw()):(ar=c,$f="value"in ar?ar.value:ar.textContent,Is=!0)),E=Hl(u,C),0<E.length&&(C=new Dm(C,t,null,n,c),d.push({event:C,listeners:E}),T?C.data=T:(T=Sw(n),T!==null&&(C.data=T)))),(T=hC?fC(t,n):pC(t,n))&&(u=Hl(u,"onBeforeInput"),0<u.length&&(c=new Dm("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}Iw(d,e)})}function Do(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Hl(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Po(t,n),i!=null&&r.unshift(Do(t,i,s)),i=Po(t,e),i!=null&&r.push(Do(t,i,s))),t=t.return}return r}function gs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Gm(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Po(n,i),l!=null&&o.unshift(Do(n,l,a))):s||(l=Po(n,i),l!=null&&o.push(Do(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var AC=/\r\n?/g,PC=/\u0000|\uFFFD/g;function Jm(t){return(typeof t=="string"?t:""+t).replace(AC,`
39`).replace(PC,"")}function Va(t,e,n){if(e=Jm(e),Jm(t)!==e&&n)throw Error(L(425))}function Wl(){}var Kd=null,qd=null;function Gd(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Jd=typeof setTimeout=="function"?setTimeout:void 0,RC=typeof clearTimeout=="function"?clearTimeout:void 0,Ym=typeof Promise=="function"?Promise:void 0,OC=typeof queueMicrotask=="function"?queueMicrotask:typeof Ym<"u"?function(t){return Ym.resolve(null).then(t).cat
vendor: 4,824 bytes, line 39
39ch(LC)}:Jd;function LC(t){setTimeout(function(){throw t})}function Ic(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),Lo(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Lo(e)}function pr(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Qm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Pi=Math.random().toString(36).slice(2),dn="__reactFiber$"+Pi,Mo="__reactProps$"+Pi,On="__reactContainer$"+Pi,Yd="__reactEvents$"+Pi,IC="__reactListeners$"+Pi,NC="__reactHandles$"+Pi;function Ur(t){var e=t[dn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[On]||n[dn]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Qm(t);t!==null;){if(n=t[dn])return n;t=Qm(t)}return e}t=n,n=t.parentNode}return null}function ma(t){return t=t[dn]||t[On],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ds(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function ju(t){return t[Mo]||null}var Qd=[],Ms=-1;function Ar(t){return{current:t}}function fe(t){0>Ms||(t.current=Qd[Ms],Qd[Ms]=null,Ms--)}function le(t,e){Ms++,Qd[Ms]=t.current,t.current=e}var Sr={},Ge=Ar(Sr),at=Ar(!1),es=Sr;function yi(t,e){var n=t.type.contextTypes;if(!n)return Sr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function lt(t){return t=t.childContextTypes,t!=null}function Kl(){fe(at),fe(Ge)}function Xm(t,e,n){if(Ge.current!==Sr)throw Error(L(168));le(Ge,e),le(at,n)}function jw(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(L(108,v1(t)||"Unknown",s));return we({},n,r)}function ql(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Sr,es=Ge.current,le(Ge,t),le(at,at.current),!0}function Zm(t,e,n){var r=t.stateNode;if(!r)throw Error(L(169));n?(t=jw(t,e,es),r.__reactInternalMemoizedMergedChildContext=t,fe(at),fe(Ge),le(Ge,t)):fe(at),le(at,n)}var _n=null,Du=!1,Nc=!1;function Dw(t){_n===null?_n=[t]:_n.push(t)}function jC(t){Du=!0,Dw(t)}function Pr(){if(!Nc&&_n!==null){Nc=!0;var t=0,e=se;try{var n=_n;for(se=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}_n=null,Du=!1}catch(s){throw _n!==null&&(_n=_n.slice(t+1)),aw(Nf,Pr),s}finally{se=e,Nc=!1}}return null}var $s=[],Bs=0,Gl=null,Jl=0,Ct=[],_t=0,ts=null,kn=1,An="";function jr(t,e){$s[Bs++]=Jl,$s[Bs++]=Gl,Gl=t,Jl=e}function Mw(t,e,n){Ct[_t++]=kn,Ct[_t++]=An,Ct[_t++]=ts,ts=t;var r=kn;t=An;var s=32-Kt(r)-1;r&=~(1<<s),n+=1;var i=32-Kt(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,kn=1<<32-Kt(e)+s|n<<s|r,An=i+t}else kn=1<<i|n<<s|r,An=t}function zf(t){t.return!==null&&(jr(t,1),Mw(t,1,0))}function Hf(t){for(;t===Gl;)Gl=$s[--Bs],$s[Bs]=null,Jl=$s[--Bs],$s[Bs]=null;for(;t===ts;)ts=Ct[--_t],Ct[_t]=null,An=Ct[--_t],Ct[_t]=null,kn=Ct[--_t],Ct[_t]=null}var vt=null,yt=null,pe=!1,Ht=null;function $w(t,e){var n=kt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function eg(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,vt=t,yt=pr(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vt=t,yt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=ts!==null?{id:kn,overflow:An}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=kt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,vt=t,yt=null,!0):!1;default:return!1}}function Xd(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Zd(t){if(pe){var e=yt;if(e){var n=e;if(!eg(t,e)){if(Xd(t))throw Error(L(418));e=pr(n.nextSibling);var r=vt;e&&eg(t,e)?$w(r,n):(t.flags=t.flags&-4097|2,pe=!1,vt=t)}}else{if(Xd(t))throw Error(L(418));t.flags=t.flags&-4097|2,pe=!1,vt=t}}}function tg(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vt=t}function za(t){if(t!==vt)return!1;if(!pe)return tg(t),pe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Gd(t.type,t.memoizedProps)),e&&(e=yt)){if(Xd(t))throw Bw(),Error(L(418));for(;e;)$w(t,e),e=pr(e.nextSibling)}if(tg(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 25,596 bytes, lines 39-41
39){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){yt=pr(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}yt=null}}else yt=vt?pr(t.stateNode.nextSibling):null;return!0}function Bw(){for(var t=yt;t;)t=pr(t.nextSibling)}function vi(){yt=vt=null,pe=!1}function Wf(t){Ht===null?Ht=[t]:Ht.push(t)}var DC=Mn.ReactCurrentBatchConfig;function Hi(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,t))}return t}function Ha(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function ng(t){var e=t._init;return e(t._payload)}function Uw(t){function e(g,y){if(t){var v=g.deletions;v===null?(g.deletions=[y],g.flags|=16):v.push(y)}}function n(g,y){if(!t)return null;for(;y!==null;)e(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function s(g,y){return g=vr(g,y),g.index=0,g.sibling=null,g}function i(g,y,v){return g.index=v,t?(v=g.alternate,v!==null?(v=v.index,v<y?(g.flags|=2,y):v):(g.flags|=2,y)):(g.flags|=1048576,y)}function o(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,y,v,S){return y===null||y.tag!==6?(y=Fc(v,g.mode,S),y.return=g,y):(y=s(y,v),y.return=g,y)}function l(g,y,v,S){var x=v.type;return x===Ls?c(g,y,v.props.children,S,v.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Yn&&ng(x)===y.type)?(S=s(y,v.props),S.ref=Hi(g,y,v),S.return=g,S):(S=Tl(v.type,v.key,v.props,null,g.mode,S),S.ref=Hi(g,y,v),S.return=g,S)}function u(g,y,v,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=Vc(v,g.mode,S),y.return=g,y):(y=s(y,v.children||[]),y.return=g,y)}function c(g,y,v,S,x){return y===null||y.tag!==7?(y=Xr(v,g.mode,S,x),y.return=g,y):(y=s(y,v),y.return=g,y)}function d(g,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Fc(""+y,g.mode,v),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ia:return v=Tl(y.type,y.key,y.props,null,g.mode,v),v.ref=Hi(g,null,y),v.return=g,v;case Os:return y=Vc(y,g.mode,v),y.return=g,y;case Yn:var S=y._init;return d(g,S(y._payload),v)}if(to(y)||Bi(y))return y=Xr(y,g.mode,v,null),y.return=g,y;Ha(g,y)}return null}function h(g,y,v,S){var x=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return x!==null?null:a(g,y,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ia:return v.key===x?l(g,y,v,S):null;case Os:return v.key===x?u(g,y,v,S):null;case Yn:return x=v._init,h(g,y,x(v._payload),S)}if(to(v)||Bi(v))return x!==null?null:c(g,y,v,S,null);Ha(g,v)}return null}function f(g,y,v,S,x){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(v)||null,a(y,g,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ia:return g=g.get(S.key===null?v:S.key)||null,l(y,g,S,x);case Os:return g=g.get(S.key===null?v:S.key)||null,u(y,g,S,x);case Yn:var E=S._init;return f(g,y,v,E(S._payload),x)}if(to(S)||Bi(S))return g=g.get(v)||null,c(y,g,S,x,null);Ha(y,S)}return null}function p(g,y,v,S){for(var x=null,E=null,T=y,C=y=0,P=null;T!==null&&C<v.length;C++){T.index>C?(P=T,T=null):P=T.sibling;var R=h(g,T,v[C],S);if(R===null){T===null&&(T=P);break}t&&T&&R.alternate===null&&e(g,T),y=i(R,y,C),E===null?x=R:E.sibling=R,E=R,T=P}if(C===v.length)return n(g,T),pe&&jr(g,C),x;if(T===null){for(;C<v.length;C++)T=d(g,v[C],S),T!==null&&(y=i(T,y,C),E===null?x=T:E.sibling=T,E=T);return pe&&jr(g,C),x}for(T=r(g,T);C<v.length;C++)P=f(T,g,C,v[C],S),P!==null&&(t&&P.alternate!==null&&T.delete(P.key===null?C:P.key),y=i(P,y,C),E===null?x=P:E.sibling=P,E=P);return t&&T.forEach(function(H){return e(g,H)}),pe&&jr(g,C),x}function m(g,y,v,S){var x=Bi(v);if(typeof x!="function")throw Error(L(150));if(v=x.call(v),v==null)throw Error(L(151));for(var E=x=null,T=y,C=y=0,P=null,R=v.next();T!==null&&!R.done;C++,R=v.next()){T.index>C?(P=T,T=null):P=T.sibling;var H=h(g,T,R.value,S);if(H===null){T===null&&(T=P);break}t&&T&&H.alternate===null&&e(g,T),y=i(H,y,C),E===null?x=H:E.sibling=H,E=H,T=P}if(R.done)return n(g,T),pe&&jr(g,C),x;if(T===null){for(;!R.done;C++,R=v.next())R=d(g,R.value,S),R!==null&&(y=i(R,y,C),E===null?x=R:E.sibling=R,E=R);return pe&&jr(g,C),x}for(T=r(g,T);!R.done;C++,R=v.next())R=f(T,g,C,R.value,S),R!==null&&(t&&R.alternate!==null&&T.delete(R.key===null?C:R.key),y=i(R,y,C),E===null?x=R:E.sibling=R,E=R);return t&&T.forEach(function(B){return e(g,B)}),pe&&jr(g,C),x}function w(g,y,v,S){if(typeof v=="object"&&v!==null&&v.type===Ls&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ia:e:{for(var x=v.key,E=y;E!==null;){if(E.key===x){if(x=v.type,x===Ls){if(E.tag===7){n(g,E.sibling),y=s(E,v.props.children),y.return=g,g=y;break e}}else if(E.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Yn&&ng(x)===E.type){n(g,E.sibling),y=s(E,v.props),y.ref=Hi(g,E,v),y.return=g,g=y;break e}n(g,E);break}else e(g,E);E=E.sibling}v.type===Ls?(y=Xr(v.props.children,g.mode,S,v.key),y.return=g,g=y):(S=Tl(v.type,v.key,v.props,null,g.mode,S),S.ref=Hi(g,y,v),S.return=g,g=S)}return o(g);case Os:e:{for(E=v.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=s(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else e(g,y);y=y.sibling}y=Vc(v,g.mode,S),y.return=g,g=y}return o(g);case Yn:return E=v._init,w(g,y,E(v._payload),S)}if(to(v))return p(g,y,v,S);if(Bi(v))return m(g,y,v,S);Ha(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=s(y,v),y.return=g,g=y):(n(g,y),y=Fc(v,g.mode,S),y.return=g,g=y),o(g)):n(g,y)}return w}var wi=Uw(!0),Fw=Uw(!1),Yl=Ar(null),Ql=null,Us=null,Kf=null;function qf(){Kf=Us=Ql=null}function Gf(t){var e=Yl.current;fe(Yl),t._currentValue=e}function eh(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Zs(t,e){Ql=t,Kf=Us=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ot=!0),t.firstContext=null)}function Lt(t){var e=t._currentValue;if(Kf!==t)if(t={context:t,memoizedValue:e,next:null},Us===null){if(Ql===null)throw Error(L(308));Us=t,Ql.dependencies={lanes:0,firstContext:t}}else Us=Us.next=t;return e}var Fr=null;function Jf(t){Fr===null?Fr=[t]:Fr.push(t)}function Vw(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Jf(e)):(n.next=s.next,s.next=n),e.interleaved=n,Ln(t,r)}function Ln(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Qn=!1;function Yf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zw(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Pn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function mr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Ln(t,n)}return s=r.interleaved,s===null?(e.next=e,Jf(r)):(e.next=s.next,s.next=e),r.interleaved=e,Ln(t,n)}function vl(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,jf(t,n)}}function rg(t,e){var n=t.updateQueue,r=t.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=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Xl(t,e,n,r){var s=t.updateQueue;Qn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var h=a.lane,f=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,m=a;switch(h=e,f=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,h=typeof p=="function"?p.call(f,d,h):p,h==null)break e;d=we({},d,h);break e;case 2:Qn=!0}}a.callback!==null&&a.lane!==0&&(t.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},c===null?(u=c=f,l=d):c=c.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(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);rs|=o,t.lanes=o,t.memoizedState=d}}function sg(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var ga={},pn=Ar(ga),$o=Ar(ga),Bo=Ar(ga);function Vr(t){if(t===ga)throw Error(L(174));return t}function Qf(t,e){switch(le(Bo,e),le($o,t),le(pn,ga),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Nd(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Nd(e,t)}fe(pn),le(pn,e)}function bi(){fe(pn),fe($o),fe(Bo)}function Hw(t){Vr(Bo.current);var e=Vr(pn.current),n=Nd(e,t.type);e!==n&&(le($o,t),le(pn,n))}function Xf(t){$o.current===t&&(fe(pn),fe($o))}var ge=Ar(0);function Zl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var jc=[];function Zf(){for(var t=0;t<jc.length;t++)jc[t]._workInProgressVersionPrimary=null;jc.length=0}var wl=Mn.ReactCurrentDispatcher,Dc=Mn.ReactCurrentBatchConfig,ns=0,ve=null,Pe=null,Le=null,eu=!1,fo=!1,Uo=0,MC=0;function ze(){throw Error(L(321))}function ep(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Jt(t[n],e[n]))return!1;return!0}function tp(t,e,n,r,s,i){if(ns=i,ve=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,wl.current=t===null||t.memoizedState===null?FC:VC,t=n(r,s),fo){i=0;do{if(fo=!1,Uo=0,25<=i)throw Error(L(301));i+=1,Le=Pe=null,e.updateQueue=null,wl.current=zC,t=n(r,s)}while(fo)}if(wl.current=tu,e=Pe!==null&&Pe.next!==null,ns=0,Le=Pe=ve=null,eu=!1,e)throw Error(L(300));return t}function np(){var t=Uo!==0;return Uo=0,t}function rn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?ve.memoizedState=Le=t:Le=Le.next=t,Le}function It(){if(Pe===null){var t=ve.alternate;t=t!==null?t.memoizedState:null}else t=Pe.next;var e=Le===null?ve.memoizedState:Le.next;if(e!==null)Le=e,Pe=t;else{if(t===null)throw Error(L(310));Pe=t,t={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Le===null?ve.memoizedState=Le=t:Le=Le.next=t}return Le}function Fo(t,e){return typeof e=="function"?e(t):e}function Mc(t){var e=It(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=Pe,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,u=i;do{var c=u.lane;if((ns&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ve.lanes|=c,rs|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Jt(r,e.memoizedState)||(ot=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,ve.lanes|=i,rs|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function $c(t){var e=It(),n=e.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);Jt(i,e.memoizedState)||(ot=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function Ww(){}function Kw(t,e){var n=ve,r=It(),s=e(),i=!Jt(r.memoizedState,s);if(i&&(r.memoizedState=s,ot=!0),r=r.queue,rp(Jw.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Le!==null&&Le.memoizedState.tag&1){if(n.flags|=2048,Vo(9,Gw.bind(null,n,r,s,e),void 0,null),Ie===null)throw Error(L(349));ns&30||qw(n,e,s)}return s}function qw(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ve.updateQueue,e===null?(e={lastEffect:null,stores:null},ve.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Gw(t,e,n,r){e.value=n,e.getSnapshot=r,Yw(e)&&Qw(t)}function Jw(t,e,n){return n(function(){Yw(e)&&Qw(t)})}function Yw(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Jt(t,n)}catch{return!0}}function Qw(t){var e=Ln(t,1);e!==null&&qt(e,t,1,-1)}function ig(t){var e=rn();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:t},e.queue=t,t=t.dispatch=UC.bind(null,ve,t),[e.memoizedState,t]}function Vo(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ve.updateQueue,e===null?(e={lastEffect:null,stores:null},ve.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Xw(){return It().memoizedState}function bl(t,e,n,r){var s=rn();ve.flags|=t,s.memoizedState=Vo(1|e,n,void 0,r===void 0?null:r)}function Mu(t,e,n,r){var s=It();r=r===void 0?null:r;var i=void 0;if(Pe!==null){var o=Pe.memoizedState;if(i=o.destroy,r!==null&&ep(r,o.deps)){s.memoizedState=Vo(e,n,i,r);return}}ve.flags|=t,s.memoizedState=Vo(1|e,n,i,r)}function og(t,e){return bl(8390656,8,t,e)}function rp(t,e){return Mu(2048,8,t,e)}function Zw(t,e){return Mu(4,2,t,e)}function eb(t,e){return Mu(4,4,t,e)}function tb(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function nb(t,e,n){return n=n!=null?n.concat([t]):null,Mu(4,4,tb.bind(null,e,t),n)}function sp(){}function rb(t,e){var n=It();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&ep(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function sb(t,e){var n=It();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&ep(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ib(t,e,n){return ns&21?(Jt(n,e)||(n=cw(),ve.lanes|=n,rs|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ot=!0),t.memoizedState=n)}function $C(t,e){var n=se;se=n!==0&&4>n?n:4,t(!0);var r=Dc.transition;Dc.transition={};try{t(!1),e()}finally{se=n,Dc.transition=r}}function ob(){return It().memoizedState}function BC(t,e,n){var r=yr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ab(t))lb(e,n);else if(n=Vw(t,e,n,r),n!==null){var s=et();qt(n,t,r,s),ub(n,e,r)}}function UC(t,e,n){var r=yr(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ab(t))lb(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Jt(a,o)){var l=e.interleaved;l===null?(s.next=s,Jf(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=Vw(t,e,s,r),n!==null&&(s=et(),qt(n,t,r,s),ub(n,e,r))}}function ab(t){var e=t.alternate;return t===ve||e!==null&&e===ve}function lb(t,e){fo=eu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function ub(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,jf(t,n)}}var tu={readContext:Lt,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useInsertionEffect:ze,useLayoutEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useMutableSource:ze,useSyncExternalStore:ze,useId:ze,unstable_isNewReconciler:!1},FC={readContext:Lt,useCallback:function(t,e){return rn().memoizedState=[t,e===void 0?null:e],t},useContext:Lt,useEffect:og,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,bl(4194308,4,tb.bind(null,e,t),n)},useLayoutEffect:function(t,e){return bl(4194308,4,t,e)},useInsertionEffect:function(t,e){return bl(4,2,t,e)},useMemo:function(t,e){var n=rn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=rn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=BC.bind(null,ve,t),[r.memoizedState,t]},useRef:function(t){var e=rn();return t={current:t},e.memoizedState=t},useState:ig,useDebugValue:sp,useDeferredValue:function(t){return rn().memoizedState=t},useTransition:function(){var t=ig(!1),e=t[0];return t=$C.bind(null,t[1]),rn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ve,s=rn();if(pe){if(n===void 0)throw Error(L(407));n=n()}else{if(n=e(),Ie===null)throw Error(L(349));ns&30||qw(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,og(Jw.bind(null,r,i,t),[t]),r.flags|=2048,Vo(9,Gw.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=rn(),e=Ie.identifierPrefix;if(pe){var n=An,r=kn;n=(r&~(1<<32-Kt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Uo++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=MC++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},VC={readContext:Lt,useCallback:rb,useContext:Lt,useEffect:rp,useImperativeHandle:nb,useInsertionEffect:Zw,useLayoutEffect:eb,useMemo:sb,useReducer:Mc,useRef:Xw,useState:function(){return Mc(Fo)},useDebugValue:sp,useDeferredValue:function(t){var e=It();return ib(e,Pe.memoizedState,t)},useTransition:function(){var t=Mc(Fo)[0],e=It().memoizedState;return[t,e]},useMutableSource:Ww,useSyncExternalStore:Kw,useId:ob,unstable_isNewReconciler:!1},zC={readContext:Lt,useCallback:rb,useContext:Lt,useEffect:rp,useImperativeHandle:nb,useInsertionEffect:Zw,useLayoutEffect:eb,useMemo:sb,useReducer:$c,useRef:Xw,useState:function(){return $c(Fo)},useDebugValue:sp,useDeferredValue:function(t){var e=It();return Pe===null?e.memoizedState=t:ib(e,Pe.memoizedState,t)},useTransition:function(){var t=$c(Fo)[0],e=It().memoizedState;return[t,e]},useMutableSource:Ww,useSyncExternalStore:Kw,useId:ob,unstable_isNewReconciler:!1};function Bt(t,e){if(t&&t.defaultProps){e=we({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function th(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:we({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var $u={isMounted:function(t){return(t=t._reactInternals)?ls(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=et(),s=yr(t),i=Pn(r,s);i.payload=e,n!=null&&(i.callback=n),e=mr(t,i,s),e!==null&&(qt(e,t,s,r),vl(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=et(),s=yr(t),i=Pn(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=mr(t,i,s),e!==null&&(qt(e,t,s,r),vl(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=et(),r=yr(t),s=Pn(n,r);s.tag=2,e!=null&&(s.callback=e),e=mr(t,s,r),e!==null&&(qt(e,t,r,n),vl(e,t,r))}};function ag(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!No(n,r)||!No(s,i):!0}function cb(t,e,n){var r=!1,s=Sr,i=e.contextType;return typeof i=="object"&&i!==null?i=Lt(i):(s=lt(e)?es:Ge.current,r=e.contextTypes,i=(r=r!=null)?yi(t,s):Sr),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=$u,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function lg(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&$u.enqueueReplaceState(e,e.state,null)}function nh(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},Yf(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Lt(i):(i=lt(e)?es:Ge.current,s.context=yi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(th(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&$u.enqueueReplaceState(s,s.state,null),Xl(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Si(t,e){try{var n="",r=e;do n+=y1(r),r=r.return;while(r);var s=n}catch(i){s=`
40Error generating stack: `+i.message+`
41`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Bc(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function rh(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var HC=typeof WeakMap=="function"?WeakMap:Map;function db(t,e,n){n=Pn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){ru||(ru=!0,fh=r),rh(t,e)},n}function hb(t,e,n){n=Pn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){rh(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){rh(t,e),typeof r!="function"&&(gr===null?gr=new Set([this]):gr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function ug(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new HC;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=s_.bind(null,t,e,n),e.then(t,t))}function cg(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function dg(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Pn(-1,1),e.tag=2,mr(n,e,1))),n.lanes|=1),t)}var WC=Mn.ReactCurrentOwner,ot=!1;function Ye(t,e,n,r){e.child=t===null?Fw(e,null,n,r):wi(e,t.child,n,r)}function hg(t,e,n,r,s){n=n.render;var i=e.ref;return Zs(e,s),r=tp(t,e,n,r,i,s),n=np(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,In(t,e,s)):(pe&&n&&zf(e),e.flags|=1,Ye(t,e,r,s),e.child)}function fg(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!hp(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,fb(t,e,i,r,s)):(t=Tl(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:No,n(o,r)&&t.ref===e.ref)return In(t,e,s)}return e.flags|=1,t=vr(i,r),t.ref=e.ref,t.return=e,e.child=t}function fb(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(No(i,r)&&t.ref===e.ref)if(ot=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(ot=!0);else return e.lanes=t.lanes,In(t,e,s)}return sh(t,e,n,r,s)}function pb(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(Vs,pt),pt|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,le(Vs,pt),pt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,le(Vs,pt),pt|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,le(Vs,pt),pt|=r;return Ye(t,e,s,n),e.child}function mb(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 6,379 bytes, line 41
41function sh(t,e,n,r,s){var i=lt(n)?es:Ge.current;return i=yi(e,i),Zs(e,s),n=tp(t,e,n,r,i,s),r=np(),t!==null&&!ot?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,In(t,e,s)):(pe&&r&&zf(e),e.flags|=1,Ye(t,e,n,s),e.child)}function pg(t,e,n,r,s){if(lt(n)){var i=!0;ql(e)}else i=!1;if(Zs(e,s),e.stateNode===null)Sl(t,e),cb(e,n,r),nh(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Lt(u):(u=lt(n)?es:Ge.current,u=yi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&lg(e,o,r,u),Qn=!1;var h=e.memoizedState;o.state=h,Xl(e,r,o,s),l=e.memoizedState,a!==r||h!==l||at.current||Qn?(typeof c=="function"&&(th(e,n,c,r),l=e.memoizedState),(a=Qn||ag(e,n,a,r,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,zw(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Bt(e.type,a),o.props=u,d=e.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Lt(l):(l=lt(n)?es:Ge.current,l=yi(e,l));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&lg(e,o,r,l),Qn=!1,h=e.memoizedState,o.state=h,Xl(e,r,o,s);var p=e.memoizedState;a!==d||h!==p||at.current||Qn?(typeof f=="function"&&(th(e,n,f,r),p=e.memoizedState),(u=Qn||ag(e,n,u,r,h,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return ih(t,e,n,r,i,s)}function ih(t,e,n,r,s,i){mb(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&Zm(e,n,!1),In(t,e,i);r=e.stateNode,WC.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=wi(e,t.child,null,i),e.child=wi(e,null,a,i)):Ye(t,e,a,i),e.memoizedState=r.state,s&&Zm(e,n,!0),e.child}function gb(t){var e=t.stateNode;e.pendingContext?Xm(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Xm(t,e.context,!1),Qf(t,e.containerInfo)}function mg(t,e,n,r,s){return vi(),Wf(s),e.flags|=256,Ye(t,e,n,r),e.child}var oh={dehydrated:null,treeContext:null,retryLane:0};function ah(t){return{baseLanes:t,cachePool:null,transitions:null}}function yb(t,e,n){var r=e.pendingProps,s=ge.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),le(ge,s&1),t===null)return Zd(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Fu(o,r,0,null),t=Xr(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=ah(n),e.memoizedState=oh,t):ip(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return KC(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=vr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=vr(a,i):(i=Xr(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?ah(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=oh,r}return i=t.child,t=i.sibling,r=vr(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function ip(t,e){return e=Fu({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Wa(t,e,n,r){return r!==null&&Wf(r),wi(e,t.child,null,n),t=ip(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function KC(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=Bc(Error(L(422))),Wa(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=Fu({mode:"visible",children:r.children},s,0,null),i=Xr(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&wi(e,t.child,null,o),e.child.memoizedState=ah(o),e.memoizedState=oh,i);if(!(e.mode&1))return Wa(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=Bc(i,r,void 0),Wa(t,e,o,r)}if(a=(o&t.childLanes)!==0,ot||a){if(r=Ie,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,Ln(t,s),qt(r,t,s,-1))}return dp(),r=Bc(Error(L(421))),Wa(t,e,o,r)}
vendor: 5,973 bytes, line 41
41return s.data==="$?"?(e.flags|=128,e.child=t.child,e=i_.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,yt=pr(s.nextSibling),vt=e,pe=!0,Ht=null,t!==null&&(Ct[_t++]=kn,Ct[_t++]=An,Ct[_t++]=ts,kn=t.id,An=t.overflow,ts=e),e=ip(e,r.children),e.flags|=4096,e)}function gg(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),eh(t.return,e,n)}function Uc(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function vb(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Ye(t,e,r.children,n),r=ge.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&gg(t,n,e);else if(t.tag===19)gg(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(le(ge,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Zl(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),Uc(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Zl(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}Uc(e,!0,n,null,i);break;case"together":Uc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Sl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function In(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),rs|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,n=vr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=vr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function qC(t,e,n){switch(e.tag){case 3:gb(e),vi();break;case 5:Hw(e);break;case 1:lt(e.type)&&ql(e);break;case 4:Qf(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;le(Yl,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(le(ge,ge.current&1),e.flags|=128,null):n&e.child.childLanes?yb(t,e,n):(le(ge,ge.current&1),t=In(t,e,n),t!==null?t.sibling:null);le(ge,ge.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return vb(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),le(ge,ge.current),r)break;return null;case 22:case 23:return e.lanes=0,pb(t,e,n)}return In(t,e,n)}var wb,lh,bb,Sb;wb=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lh=function(){};bb=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Vr(pn.current);var i=null;switch(n){case"input":s=Rd(t,s),r=Rd(t,r),i=[];break;case"select":s=we({},s,{value:void 0}),r=we({},r,{value:void 0}),i=[];break;case"textarea":s=Id(t,s),r=Id(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Wl)}jd(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ko.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ko.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&he("scroll",t),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};Sb=function(t,e,n,r){n!==r&&(e.flags|=4)};function Wi(t,e){if(!pe)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function He(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function GC(t,e,n){var r=e.pendingProps;switch(Hf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(e),null;case 1:return lt(e.type)&&Kl(),He(e),null;case 3:return r=e.stateNode,bi(),fe(at),fe(Ge),Zf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(za(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ht!==null&&(gh(Ht),Ht=null))),lh(t,e),He(e),null;case 5:Xf(e);var s=Vr(Bo.current);if(n=e.type,t!==null&&e.stateNode!=null)bb(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(L(166));return He(e),null}if(t=Vr(pn.current),za(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;
vendor: 32,267 bytes, line 41
41switch(r[dn]=e,r[Mo]=i,t=(e.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(s=0;s<ro.length;s++)he(ro[s],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":Cm(r,i),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},he("invalid",r);break;case"textarea":km(r,i),he("invalid",r)}jd(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&&Va(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Va(r.textContent,a,t),s=["children",""+a]):ko.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&he("scroll",r)}switch(n){case"input":Na(r),_m(r,i,!0);break;case"textarea":Na(r),Am(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Wl)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=J0(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[dn]=e,t[Mo]=r,wb(t,e,!1,!1),e.stateNode=t;e:{switch(o=Dd(n,r),n){case"dialog":he("cancel",t),he("close",t),s=r;break;case"iframe":case"object":case"embed":he("load",t),s=r;break;case"video":case"audio":for(s=0;s<ro.length;s++)he(ro[s],t);s=r;break;case"source":he("error",t),s=r;break;case"img":case"image":case"link":he("error",t),he("load",t),s=r;break;case"details":he("toggle",t),s=r;break;case"input":Cm(t,r),s=Rd(t,r),he("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=we({},r,{value:void 0}),he("invalid",t);break;case"textarea":km(t,r),s=Id(t,r),he("invalid",t);break;default:s=r}jd(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?X0(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Y0(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ao(t,l):typeof l=="number"&&Ao(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ko.hasOwnProperty(i)?l!=null&&i==="onScroll"&&he("scroll",t):l!=null&&Pf(t,i,l,o))}switch(n){case"input":Na(t),_m(t,r,!1);break;case"textarea":Na(t),Am(t);break;case"option":r.value!=null&&t.setAttribute("value",""+br(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Js(t,!!r.multiple,i,!1):r.defaultValue!=null&&Js(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Wl)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return He(e),null;case 6:if(t&&e.stateNode!=null)Sb(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(L(166));if(n=Vr(Bo.current),Vr(pn.current),za(e)){if(r=e.stateNode,n=e.memoizedProps,r[dn]=e,(i=r.nodeValue!==n)&&(t=vt,t!==null))switch(t.tag){case 3:Va(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Va(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[dn]=e,e.stateNode=r}return He(e),null;case 13:if(fe(ge),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(pe&&yt!==null&&e.mode&1&&!(e.flags&128))Bw(),vi(),e.flags|=98560,i=!1;else if(i=za(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(L(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[dn]=e}else vi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;He(e),i=!1}else Ht!==null&&(gh(Ht),Ht=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ge.current&1?Oe===0&&(Oe=3):dp())),e.updateQueue!==null&&(e.flags|=4),He(e),null);case 4:return bi(),lh(t,e),t===null&&jo(e.stateNode.containerInfo),He(e),null;case 10:return Gf(e.type._context),He(e),null;case 17:return lt(e.type)&&Kl(),He(e),null;case 19:if(fe(ge),i=e.memoizedState,i===null)return He(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)Wi(i,!1);else{if(Oe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Zl(t),o!==null){for(e.flags|=128,Wi(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return le(ge,ge.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ee()>xi&&(e.flags|=128,r=!0,Wi(i,!1),e.lanes=4194304)}else{if(!r)if(t=Zl(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Wi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!pe)return He(e),null}else 2*Ee()-i.renderingStartTime>xi&&n!==1073741824&&(e.flags|=128,r=!0,Wi(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ee(),e.sibling=null,n=ge.current,le(ge,r?n&1|2:n&1),e):(He(e),null);case 22:case 23:return cp(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?pt&1073741824&&(He(e),e.subtreeFlags&6&&(e.flags|=8192)):He(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function JC(t,e){switch(Hf(e),e.tag){case 1:return lt(e.type)&&Kl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return bi(),fe(at),fe(Ge),Zf(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Xf(e),null;case 13:if(fe(ge),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));vi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return fe(ge),null;case 4:return bi(),null;case 10:return Gf(e.type._context),null;case 22:case 23:return cp(),null;case 24:return null;default:return null}}var Ka=!1,Ke=!1,YC=typeof WeakSet=="function"?WeakSet:Set,M=null;function Fs(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(t,e,r)}else n.current=null}function uh(t,e,n){try{n()}catch(r){xe(t,e,r)}}var yg=!1;function QC(t,e){if(Kd=Vl,t=_w(),Vf(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.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,u=0,c=0,d=t,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===t)break t;if(h===n&&++u===s&&(a=o),h===i&&++c===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(qd={focusedElem:t,selectionRange:n},Vl=!1,M=e;M!==null;)if(e=M,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,M=t;else for(;M!==null;){e=M;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,w=p.memoizedState,g=e.stateNode,y=g.getSnapshotBeforeUpdate(e.elementType===e.type?m:Bt(e.type,m),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){xe(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,M=t;break}M=e.return}return p=yg,yg=!1,p}function po(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&uh(e,n,i)}s=s.next}while(s!==r)}}function Bu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function ch(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function xb(t){var e=t.alternate;e!==null&&(t.alternate=null,xb(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[dn],delete e[Mo],delete e[Yd],delete e[IC],delete e[NC])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Eb(t){return t.tag===5||t.tag===3||t.tag===4}function vg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Eb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function dh(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Wl));else if(r!==4&&(t=t.child,t!==null))for(dh(t,e,n),t=t.sibling;t!==null;)dh(t,e,n),t=t.sibling}function hh(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(hh(t,e,n),t=t.sibling;t!==null;)hh(t,e,n),t=t.sibling}var Me=null,zt=!1;function Hn(t,e,n){for(n=n.child;n!==null;)Tb(t,e,n),n=n.sibling}function Tb(t,e,n){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(Ou,n)}catch{}switch(n.tag){case 5:Ke||Fs(n,e);case 6:var r=Me,s=zt;Me=null,Hn(t,e,n),Me=r,zt=s,Me!==null&&(zt?(t=Me,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(zt?(t=Me,n=n.stateNode,t.nodeType===8?Ic(t.parentNode,n):t.nodeType===1&&Ic(t,n),Lo(t)):Ic(Me,n.stateNode));break;case 4:r=Me,s=zt,Me=n.stateNode.containerInfo,zt=!0,Hn(t,e,n),Me=r,zt=s;break;case 0:case 11:case 14:case 15:if(!Ke&&(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)&&uh(n,e,o),s=s.next}while(s!==r)}Hn(t,e,n);break;case 1:if(!Ke&&(Fs(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){xe(n,e,a)}Hn(t,e,n);break;case 21:Hn(t,e,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Hn(t,e,n),Ke=r):Hn(t,e,n);break;default:Hn(t,e,n)}}function wg(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new YC),e.forEach(function(r){var s=o_.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function jt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Me=a.stateNode,zt=!1;break e;case 3:Me=a.stateNode.containerInfo,zt=!0;break e;case 4:Me=a.stateNode.containerInfo,zt=!0;break e}a=a.return}if(Me===null)throw Error(L(160));Tb(i,o,s),Me=null,zt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){xe(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Cb(e,t),e=e.sibling}function Cb(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(jt(e,t),tn(t),r&4){try{po(3,t,t.return),Bu(3,t)}catch(m){xe(t,t.return,m)}try{po(5,t,t.return)}catch(m){xe(t,t.return,m)}}break;case 1:jt(e,t),tn(t),r&512&&n!==null&&Fs(n,n.return);break;case 5:if(jt(e,t),tn(t),r&512&&n!==null&&Fs(n,n.return),t.flags&32){var s=t.stateNode;try{Ao(s,"")}catch(m){xe(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&q0(s,i),Dd(a,o);var u=Dd(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?X0(s,d):c==="dangerouslySetInnerHTML"?Y0(s,d):c==="children"?Ao(s,d):Pf(s,c,d,u)}switch(a){case"input":Od(s,i);break;case"textarea":G0(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Js(s,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?Js(s,!!i.multiple,i.defaultValue,!0):Js(s,!!i.multiple,i.multiple?[]:"",!1))}s[Mo]=i}catch(m){xe(t,t.return,m)}}break;case 6:if(jt(e,t),tn(t),r&4){if(t.stateNode===null)throw Error(L(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){xe(t,t.return,m)}}break;case 3:if(jt(e,t),tn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Lo(e.containerInfo)}catch(m){xe(t,t.return,m)}break;case 4:jt(e,t),tn(t);break;case 13:jt(e,t),tn(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(lp=Ee())),r&4&&wg(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Ke=(u=Ke)||c,jt(e,t),Ke=u):jt(e,t),tn(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(M=t,c=t.child;c!==null;){for(d=M=c;M!==null;){switch(h=M,f=h.child,h.tag){case 0:case 11:case 14:case 15:po(4,h,h.return);break;case 1:Fs(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(m){xe(r,n,m)}}break;case 5:Fs(h,h.return);break;case 22:if(h.memoizedState!==null){Sg(d);continue}}f!==null?(f.return=h,M=f):Sg(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Q0("display",o))}catch(m){xe(t,t.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){xe(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:jt(e,t),tn(t),r&4&&wg(t);break;case 21:break;default:jt(e,t),tn(t)}}function tn(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Eb(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ao(s,""),r.flags&=-33);var i=vg(t);hh(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=vg(t);dh(t,a,o);break;default:throw Error(L(161))}}catch(l){xe(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function XC(t,e,n){M=t,_b(t)}function _b(t,e,n){for(var r=(t.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Ka;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ke;a=Ka;var u=Ke;if(Ka=o,(Ke=l)&&!u)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?xg(s):l!==null?(l.return=o,M=l):xg(s);for(;i!==null;)M=i,_b(i),i=i.sibling;M=s,Ka=a,Ke=u}bg(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):bg(t)}}function bg(t){for(;M!==null;){var e=M;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ke||Bu(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ke)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Bt(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&sg(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}sg(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.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(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Lo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}Ke||e.flags&512&&ch(e)}catch(h){xe(e,e.return,h)}}if(e===t){M=null;break}if(n=e.sibling,n!==null){n.return=e.return,M=n;break}M=e.return}}function Sg(t){for(;M!==null;){var e=M;if(e===t){M=null;break}var n=e.sibling;if(n!==null){n.return=e.return,M=n;break}M=e.return}}function xg(t){for(;M!==null;){var e=M;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Bu(4,e)}catch(l){xe(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){xe(e,s,l)}}var i=e.return;try{ch(e)}catch(l){xe(e,i,l)}break;case 5:var o=e.return;try{ch(e)}catch(l){xe(e,o,l)}}}catch(l){xe(e,e.return,l)}if(e===t){M=null;break}var a=e.sibling;if(a!==null){a.return=e.return,M=a;break}M=e.return}}var ZC=Math.ceil,nu=Mn.ReactCurrentDispatcher,op=Mn.ReactCurrentOwner,Pt=Mn.ReactCurrentBatchConfig,te=0,Ie=null,_e=null,Be=0,pt=0,Vs=Ar(0),Oe=0,zo=null,rs=0,Uu=0,ap=0,mo=null,it=null,lp=0,xi=1/0,En=null,ru=!1,fh=null,gr=null,qa=!1,lr=null,su=0,go=0,ph=null,xl=-1,El=0;function et(){return te&6?Ee():xl!==-1?xl:xl=Ee()}function yr(t){return t.mode&1?te&2&&Be!==0?Be&-Be:DC.transition!==null?(El===0&&(El=cw()),El):(t=se,t!==0||(t=window.event,t=t===void 0?16:yw(t.type)),t):1}function qt(t,e,n,r){if(50<go)throw go=0,ph=null,Error(L(185));fa(t,n,r),(!(te&2)||t!==Ie)&&(t===Ie&&(!(te&2)&&(Uu|=n),Oe===4&&Zn(t,Be)),ut(t,r),n===1&&te===0&&!(e.mode&1)&&(xi=Ee()+500,Du&&Pr()))}function ut(t,e){var n=t.callbackNode;D1(t,e);var r=Fl(t,t===Ie?Be:0);if(r===0)n!==null&&Om(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Om(n),e===1)t.tag===0?jC(Eg.bind(null,t)):Dw(Eg.bind(null,t)),OC(function(){!(te&6)&&Pr()}),n=null;else{switch(dw(r)){case 1:n=Nf;break;case 4:n=lw;break;case 16:n=Ul;break;case 536870912:n=uw;break;default:n=Ul}n=Nb(n,kb.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function kb(t,e){if(xl=-1,El=0,te&6)throw Error(L(327));var n=t.callbackNode;if(ei()&&t.callbackNode!==n)return null;var r=Fl(t,t===Ie?Be:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=iu(t,r);else{e=r;var s=te;te|=2;var i=Pb();(Ie!==t||Be!==e)&&(En=null,xi=Ee()+500,Qr(t,e));do try{n_();break}catch(a){Ab(t,a)}while(!0);qf(),nu.current=i,te=s,_e!==null?e=0:(Ie=null,Be=0,e=Oe)}if(e!==0){if(e===2&&(s=Fd(t),s!==0&&(r=s,e=mh(t,s))),e===1)throw n=zo,Qr(t,0),Zn(t,r),ut(t,Ee()),n;if(e===6)Zn(t,r);else{if(s=t.current.alternate,!(r&30)&&!e_(s)&&(e=iu(t,r),e===2&&(i=Fd(t),i!==0&&(r=i,e=mh(t,i))),e===1))throw n=zo,Qr(t,0),Zn(t,r),ut(t,Ee()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(L(345));case 2:Dr(t,it,En);break;case 3:if(Zn(t,r),(r&130023424)===r&&(e=lp+500-Ee(),10<e)){if(Fl(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){et(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Jd(Dr.bind(null,t,it,En),e);break}Dr(t,it,En);break;case 4:if(Zn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-Kt(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZC(r/1960))-r,10<r){t.timeoutHandle=Jd(Dr.bind(null,t,it,En),r);break}Dr(t,it,En);break;case 5:Dr(t,it,En);break;default:throw Error(L(329))}}}return ut(t,Ee()),t.callbackNode===n?kb.bind(null,t):null}function mh(t,e){var n=mo;return t.current.memoizedState.isDehydrated&&(Qr(t,e).flags|=256),t=iu(t,e),t!==2&&(e=it,it=n,e!==null&&gh(e)),t}function gh(t){it===null?it=t:it.push.apply(it,t)}function e_(t){for(var e=t;;){if(e.flags&16384){var n=e.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(!Jt(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Zn(t,e){for(e&=~ap,e&=~Uu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Kt(e),r=1<<n;t[n]=-1,e&=~r}}function Eg(t){if(te&6)throw Error(L(327));ei();var e=Fl(t,0);if(!(e&1))return ut(t,Ee()),null;var n=iu(t,e);if(t.tag!==0&&n===2){var r=Fd(t);r!==0&&(e=r,n=mh(t,r))}if(n===1)throw n=zo,Qr(t,0),Zn(t,e),ut(t,Ee()),n;if(n===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Dr(t,it,En),ut(t,Ee()),null}function up(t,e){var n=te;te|=1;try{return t(e)}finally{te=n,te===0&&(xi=Ee()+500,Du&&Pr())}}function ss(t){lr!==null&&lr.tag===0&&!(te&6)&&ei();var e=te;te|=1;var n=Pt.transition,r=se;try{if(Pt.transition=null,se=1,t)return t()}finally{se=r,Pt.transition=n,te=e,!(te&6)&&Pr()}}function cp(){pt=Vs.current,fe(Vs)}function Qr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,RC(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(Hf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Kl();break;case 3:bi(),fe(at),fe(Ge),Zf();break;case 5:Xf(r);break;case 4:bi();break;case 13:fe(ge);break;case 19:fe(ge);break;case 10:Gf(r.type._context);break;case 22:case 23:cp()}n=n.return}if(Ie=t,_e=t=vr(t.current,null),Be=pt=e,Oe=0,zo=null,ap=Uu=rs=0,it=mo=null,Fr!==null){for(e=0;e<Fr.length;e++)if(n=Fr[e],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}Fr=null}return t}function Ab(t,e){do{var n=_e;try{if(qf(),wl.current=tu,eu){for(var r=ve.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eu=!1}if(ns=0,Le=Pe=ve=null,fo=!1,Uo=0,op.current=null,n===null||n.return===null){Oe=1,zo=e,_e=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=Be,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=cg(o);if(f!==null){f.flags&=-257,dg(f,o,a,i,e),f.mode&1&&ug(i,u,e),e=f,l=u;var p=e.updateQueue;if(p===null){var m=new Set;m.add(l),e.updateQueue=m}else p.add(l);break e}else{if(!(e&1)){ug(i,u,e),dp();break e}l=Error(L(426))}}else if(pe&&a.mode&1){var w=cg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),dg(w,o,a,i,e),Wf(Si(l,a));break e}}i=l=Si(l,a),Oe!==4&&(Oe=2),mo===null?mo=[i]:mo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var g=db(i,l,e);rg(i,g);break e;case 1:a=l;var y=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(gr===null||!gr.has(v)))){i.flags|=65536,e&=-e,i.lanes|=e;var S=hb(i,a,e);rg(i,S);break e}}i=i.return}while(i!==null)}Ob(n)}catch(x){e=x,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function Pb(){var t=nu.current;return nu.current=tu,t===null?tu:t}function dp(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Ie===null||!(rs&268435455)&&!(Uu&268435455)||Zn(Ie,Be)}function iu(t,e){var n=te;te|=2;var r=Pb();(Ie!==t||Be!==e)&&(En=null,Qr(t,e));do try{t_();break}catch(s){Ab(t,s)}while(!0);if(qf(),te=n,nu.current=r,_e!==null)throw Error(L(261));return Ie=null,Be=0,Oe}function t_(){for(;_e!==null;)Rb(_e)}function n_(){for(;_e!==null&&!k1();)Rb(_e)}function Rb(t){var e=Ib(t.alternate,t,pt);t.memoizedProps=t.pendingProps,e===null?Ob(t):_e=e,op.current=null}function Ob(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=JC(n,e),n!==null){n.flags&=32767,_e=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Oe=6,_e=null;return}}else if(n=GC(n,e,pt),n!==null){_e=n;return}if(e=e.sibling,e!==null){_e=e;return}_e=e=t}while(e!==null);Oe===0&&(Oe=5)}function Dr(t,e,n){var r=se,s=Pt.transition;try{Pt.transition=null,se=1,r_(t,e,n,r)}finally{Pt.transition=s,se=r}return null}function r_(t,e,n,r){do ei();while(lr!==null);if(te&6)throw Error(L(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(M1(t,i),t===Ie&&(_e=Ie=null,Be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||qa||(qa=!0,Nb(Ul,function(){return ei(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Pt.transition,Pt.transition=null;var o=se;se=1;var a=te;te|=4,op.current=null,QC(t,n),Cb(n,t),EC(qd),Vl=!!Kd,qd=Kd=null,t.current=n,XC(n),A1(),te=a,se=o,Pt.transition=i}else t.current=n;if(qa&&(qa=!1,lr=t,su=s),i=t.pendingLanes,i===0&&(gr=null),O1(n.stateNode),ut(t,Ee()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ru)throw ru=!1,t=fh,fh=null,t;return su&1&&t.tag!==0&&ei(),i=t.pendingLanes,i&1?t===ph?go++:(go=0,ph=t):go=0,Pr(),null}function ei(){if(lr!==null){var t=dw(su),e=Pt.transition,n=se;try{if(Pt.transition=null,se=16>t?16:t,lr===null)var r=!1;else{if(t=lr,lr=null,su=0,te&6)throw Error(L(331));var s=te;for(te|=4,M=t.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(M=u;M!==null;){var c=M;switch(c.tag){case 0:case 11:case 15:po(8,c,i)}var d=c.child;if(d!==null)d.return=c,M=d;else for(;M!==null;){c=M;var h=c.sibling,f=c.return;if(xb(c),c===u){M=null;break}if(h!==null){h.return=f,M=h;break}M=f}}}var p=i.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:po(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,M=g;break e}M=i.return}}var y=t.current;for(M=y;M!==null;){o=M;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,M=v;else e:for(o=y;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Bu(9,a)}}catch(x){xe(a,a.return,x)}if(a===o){M=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,M=S;break e}M=a.return}}if(te=s,Pr(),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(Ou,t)}catch{}r=!0}return r}finally{se=n,Pt.transition=e}}return!1}function Tg(t,e,n){e=Si(n,e),e=db(t,e,1),t=mr(t,e,1),e=et(),t!==null&&(fa(t,1,e),ut(t,e))}function xe(t,e,n){if(t.tag===3)Tg(t,t,n);else for(;e!==null;){if(e.tag===3){Tg(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(gr===null||!gr.has(r))){t=Si(n,t),t=hb(e,t,1),e=mr(e,t,1),t=et(),e!==null&&(fa(e,1,t),ut(e,t));break}}e=e.return}}function s_(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=et(),t.pingedLanes|=t.suspendedLanes&n,Ie===t&&(Be&n)===n&&(Oe===4||Oe===3&&(Be&130023424)===Be&&500>Ee()-lp?Qr(t,0):ap|=n),ut(t,e)}function Lb(t,e){e===0&&(t.mode&1?(e=Ma,Ma<<=1,!(Ma&130023424)&&(Ma=4194304)):e=1);var n=et();t=Ln(t,e),t!==null&&(fa(t,e,n),ut(t,n))}function i_(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Lb(t,n)}function o_(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(e),Lb(t,n)}var Ib;Ib=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||at.current)ot=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ot=!1,qC(t,e,n);ot=!!(t.flags&131072)}else ot=!1,pe&&e.flags&1048576&&Mw(e,Jl,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Sl(t,e),t=e.pendingProps;var s=yi(e,Ge.current);Zs(e,n),s=tp(null,e,r,t,s,n);var i=np();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,lt(r)?(i=!0,ql(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Yf(e),s.updater=$u,e.stateNode=s,s._reactInternals=e,nh(e,r,t,n),e=ih(null,e,r,!0,i,n)):(e.tag=0,pe&&i&&zf(e),Ye(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Sl(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=l_(r),t=Bt(r,t),s){case 0:e=sh(null,e,r,t,n);break e;case 1:e=pg(null,e,r,t,n);break e;case 11:e=hg(null,e,r,t,n);break e;case 14:e=fg(null,e,r,Bt(r.type,t),n);break e}throw Error(L(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bt(r,s),sh(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bt(r,s),pg(t,e,r,s,n);case 3:e:{if(gb(e),t===null)throw Error(L(387));r=e.pendingProps,i=e.memoizedState,s=i.element,zw(t,e),Xl(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Si(Error(L(423)),e),e=mg(t,e,r,n,s);break e}else if(r!==s){s=Si(Error(L(424)),e),e=mg(t,e,r,n,s);break e}else for(yt=pr(e.stateNode.containerInfo.firstChild),vt=e,pe=!0,Ht=null,n=Fw(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vi(),r===s){e=In(t,e,n);break e}Ye(t,e,r,n)}e=e.child}return e;case 5:return Hw(e),t===null&&Zd(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Gd(r,s)?o=null:i!==null&&Gd(r,i)&&(e.flags|=32),mb(t,e),Ye(t,e,o,n),e.child;case 6:return t===null&&Zd(e),null;case 13:return yb(t,e,n);case 4:return Qf(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=wi(e,null,r,n):Ye(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bt(r,s),hg(t,e,r,s,n);case 7:return Ye(t,e,e.pendingProps,n),e.child;case 8:return Ye(t,e,e.pendingProps.children,n),e.child;case 12:return Ye(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,le(Yl,r._currentValue),r._currentValue=o,i!==null)if(Jt(i.value,o)){if(i.children===s.children&&!at.current){e=In(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Pn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),eh(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),eh(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ye(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Zs(e,n),s=Lt(s),r=r(s),e.flags|=1,Ye(t,e,r,n),e.child;case 14:return r=e.type,s=Bt(r,e.pendingProps),s=Bt(r.type,s),fg(t,e,r,s,n);case 15:return fb(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Bt(r,s),Sl(t,e),e.tag=1,lt(r)?(t=!0,ql(e)):t=!1,Zs(e,n),cb(e,r,s),nh(e,r,s,n),ih(null,e,r,!0,t,n);case 19:return vb(t,e,n);case 22:return pb(t,e,n)}throw Error(L(156,e.tag))};function Nb(t,e){return aw(t,e)}function a_(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,707 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 kt(t,e,n,r){return new a_(t,e,n,r)}function hp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function l_(t){if(typeof t=="function")return hp(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Of)return 11;if(t===Lf)return 14}return 2}function vr(t,e){var n=t.alternate;return n===null?(n=kt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Tl(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")hp(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ls:return Xr(n.children,s,i,e);case Rf:o=8,s|=8;break;case _d:return t=kt(12,n,e,s|2),t.elementType=_d,t.lanes=i,t;case kd:return t=kt(13,n,e,s),t.elementType=kd,t.lanes=i,t;case Ad:return t=kt(19,n,e,s),t.elementType=Ad,t.lanes=i,t;case H0:return Fu(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case V0:o=10;break e;case z0:o=9;break e;case Of:o=11;break e;case Lf:o=14;break e;case Yn:o=16,r=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=kt(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Xr(t,e,n,r){return t=kt(7,t,r,e),t.lanes=n,t}function Fu(t,e,n,r){return t=kt(22,t,r,e),t.elementType=H0,t.lanes=n,t.stateNode={isHidden:!1},t}function Fc(t,e,n){return t=kt(6,t,null,e),t.lanes=n,t}function Vc(t,e,n){return e=kt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function u_(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xc(0),this.expirationTimes=xc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xc(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function fp(t,e,n,r,s,i,o,a,l){return t=new u_(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=kt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yf(i),t}function c_(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Os,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function jb(t){if(!t)return Sr;t=t._reactInternals;e:{if(ls(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(lt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var n=t.type;if(lt(n))return jw(t,n,e)}return e}function Db(t,e,n,r,s,i,o,a,l){return t=fp(n,r,!0,t,s,i,o,a,l),t.context=jb(null),n=t.current,r=et(),s=yr(n),i=Pn(r,s),i.callback=e??null,mr(n,i,s),t.current.lanes=s,fa(t,s,r),ut(t,r),t}function Vu(t,e,n,r){var s=e.current,i=et(),o=yr(s);return n=jb(n),e.context===null?e.context=n:e.pendingContext=n,e=Pn(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=mr(s,e,o),t!==null&&(qt(t,s,o,i),vl(t,s,o)),o}function ou(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Cg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function pp(t,e){Cg(t,e),(t=t.alternate)&&Cg(t,e)}function d_(){return null}var Mb=typeof reportError=="function"?reportError:function(t){console.error(t)};function mp(t){this._internalRoot=t}zu.prototype.render=mp.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));Vu(t,e,null,null)};zu.prototype.unmount=mp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ss(function(){Vu(null,t,null,null)}),e[On]=null}};function zu(t){this._internalRoot=t}zu.prototype.unstable_scheduleHydration=function(t){if(t){var e=pw();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Xn.length&&e!==0&&e<Xn[n].priority;n++);Xn.splice(n,0,t),n===0&&gw(t)}};function gp(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Hu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function _g(){}function h_(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=ou(o);i.call(u)}}var o=Db(e,r,t,0,null,!1,!1,"",_g);return t._reactRootContainer=o,t[On]=o.current,jo(t.nodeType===8?t.parentNode:t),ss(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=ou(l);a.call(u)}}var l=fp(t,0,!1,null,null,!1,!1,"",_g);return t._reactRootContainer=l,t[On]=l.current,jo(t.nodeType===8?t.parentNode:t),ss(function(){Vu(e,l,n,r)}),l}function Wu(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ou(o);a.call(l)}}Vu(e,o,t,s)}else o=h_(n,e,t,s,r);
41return ou(o)}hw=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=no(e.pendingLanes);n!==0&&(jf(e,n|1),ut(e,Ee()),!(te&6)&&(xi=Ee()+500,Pr()))}break;case 13:ss(function(){var r=Ln(t,1);if(r!==null){var s=et();qt(r,t,1,s)}}),pp(t,1)}};Df=function(t){if(t.tag===13){var e=Ln(t,134217728);if(e!==null){var n=et();qt(e,t,134217728,n)}pp(t,134217728)}};fw=function(t){if(t.tag===13){var e=yr(t),n=Ln(t,e);if(n!==null){var r=et();qt(n,t,e,r)}pp(t,e)}};pw=function(){return se};mw=function(t,e){var n=se;try{return se=t,e()}finally{se=n}};$d=function(t,e,n){switch(e){case"input":if(Od(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=ju(r);if(!s)throw Error(L(90));K0(r),Od(r,s)}}}break;case"textarea":G0(t,n);break;case"select":e=n.value,e!=null&&Js(t,!!n.multiple,e,!1)}};tw=up;nw=ss;var f_={usingClientEntryPoint:!1,Events:[ma,Ds,ju,Z0,ew,up]},Ki={findFiberByHostInstance:Ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},p_={bundleType:Ki.bundleType,version:Ki.version,rendererPackageName:Ki.rendererPackageName,rendererConfig:Ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=iw(t),t===null?null:t.stateNode},findFiberByHostInstance:Ki.findFiberByHostInstance||d_,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 Ga=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ga.isDisabled&&Ga.supportsFiber)try{Ou=Ga.inject(p_),fn=Ga}catch{}}St.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f_;St.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gp(e))throw Error(L(200));return c_(t,e,null,n)};St.createRoot=function(t,e){if(!gp(t))throw Error(L(299));var n=!1,r="",s=Mb;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=fp(t,1,!1,null,null,n,!1,r,s),t[On]=e.current,jo(t.nodeType===8?t.parentNode:t),new mp(e)};St.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=iw(e),t=t===null?null:t.stateNode,t};St.flushSync=function(t){return ss(t)};St.hydrate=function(t,e,n){if(!Hu(e))throw Error(L(200));return Wu(null,t,e,!0,n)};St.hydrateRoot=function(t,e,n){if(!gp(t))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Mb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=Db(e,null,t,1,n??null,s,!1,i,o),t[On]=e.current,jo(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new zu(e)};St.render=function(t,e,n){if(!Hu(e))throw Error(L(200));return Wu(null,t,e,!1,n)};St.unmountComponentAtNode=function(t){if(!Hu(t))throw Error(L(40));return t._reactRootContainer?(ss(function(){Wu(null,null,t,!1,function(){t._reactRootContainer=null,t[On]=null})}),!0):!1};St.unstable_batchedUpdates=up;St.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Hu(n))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return Wu(t,e,n,!1,r)};St.version="18.3.1-next-f1338f8080-20240426";function $b(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($b)}catch(t){console.error(t)}}$b(),$0.exports=St;var ya=$0.exports;const Bb=da(ya);var Ub,kg=ya;Ub=kg.createRoot,kg.hydrateRoot;const m_="modulepreload",g_=function(t){return"/"+t},Ag={},va=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=g_(l),l in Ag)return;Ag[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":m_,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})},y_=1,v_=1e6;let zc=0;function w_(){return zc=(zc+1)%Number.MAX_SAFE_INTEGER,zc.toString()}const Hc=new Map,Pg=t=>{if(Hc.has(t))return;const e=setTimeout(()=>{Hc.delete(t),yo({type:"REMOVE_TOAST",toastId:t})},v_);Hc.set(t,e)},b_=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,y_)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
41return n?Pg(n):t.toasts.forEach(r=>{Pg(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Cl=[];let _l={toasts:[]};function yo(t){_l=b_(_l,t),Cl.forEach(e=>{e(_l)})}function S_({...t}){const e=w_(),n=s=>yo({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>yo({type:"DISMISS_TOAST",toastId:e});return yo({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function x_(){const[t,e]=b.useState(_l);return b.useEffect(()=>(Cl.push(e),()=>{const n=Cl.indexOf(e);n>-1&&Cl.splice(n,1)}),[t]),{...t,toast:S_,dismiss:n=>yo({type:"DISMISS_TOAST",toastId:n})}}function Re(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function E_(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function Fb(...t){return e=>t.forEach(n=>E_(n,e))}function Yt(...t){return b.useCallback(Fb(...t),t)}function T_(t,e=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];function u(d){const{scope:h,children:f,...p}=d,m=(h==null?void 0:h[t][l])||a,w=b.useMemo(()=>p,Object.values(p));return k.jsx(m.Provider,{value:w,children:f})}function c(d,h){const f=(h==null?void 0:h[t][l])||a,p=b.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,C_(s,...e)]}function C_(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var au=b.forwardRef((t,e)=>{const{children:n,...r}=t,s=b.Children.toArray(n),i=s.find(__);if(i){const o=i.props.children,a=s.map(l=>l===i?b.Children.count(o)>1?b.Children.only(null):b.isValidElement(o)?o.props.children:null:l);return k.jsx(yh,{...r,ref:e,children:b.isValidElement(o)?b.cloneElement(o,void 0,a):null})}return k.jsx(yh,{...r,ref:e,children:n})});au.displayName="Slot";var yh=b.forwardRef((t,e)=>{const{children:n,...r}=t;if(b.isValidElement(n)){const s=A_(n);return b.cloneElement(n,{...k_(r,n.props),ref:e?Fb(e,s):s})}return b.Children.count(n)>1?b.Children.only(null):null});yh.displayName="SlotClone";var Vb=({children:t})=>k.jsx(k.Fragment,{children:t});function __(t){return b.isValidElement(t)&&t.type===Vb}function k_(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function A_(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function P_(t){const e=t+"CollectionProvider",[n,r]=T_(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=f=>{const{scope:p,children:m}=f,w=I.useRef(null),g=I.useRef(new Map).current;return k.jsx(s,{scope:p,itemMap:g,collectionRef:w,children:m})};o.displayName=e;const a=t+"CollectionSlot",l=I.forwardRef((f,p)=>{const{scope:m,children:w}=f,g=i(a,m),y=Yt(p,g.collectionRef);return k.jsx(au,{ref:y,children:w})});l.displayName=a;const u=t+"CollectionItemSlot",c="data-radix-collection-item",d=I.forwardRef((f,p)=>{const{scope:m,children:w,...g}=f,y=I.useRef(null),v=Yt(p,y),S=i(u,m);return I.useEffect(()=>(S.itemMap.set(y,{ref:y,...g}),()=>void S.itemMap.delete(y))),k.jsx(au,{[c]:"",ref:v,children:w})});d.displayName=u;function h(f){const p=i(t+"CollectionConsumer",f);return I.useCallback(()=>{const w=p.collectionRef.current;if(!w)return[];const g=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(p.itemMap.values()).sort((S,x)=>g.indexOf(S.ref.current)-g.indexOf(x.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:l,ItemSlot:d},h,r]}function zb(t,e=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const u=d=>{var g;const{scope:h,children:f,...p}=d,m=((g=h==null?void 0:h[t])==null?void 0:g[l])||a,w=b.useMemo(()=>p,Object.values(p));return k.jsx(m.Provider,{value:w,children:f})};u.displayName=i+"Provider";function c(d,h){var m;const f=((m=h==null?void 0:h[t])==null?void 0:m[l])||a,p=b.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,R_(s,...e)]}function R_(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var O_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ct=O_.reduce((t,e)=>{const n=b.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?au:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Hb(t,e){t&&ya.flushSync(()=>t.dispatchEvent(e))}function gn(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function L_(t,e=globalThis==null?void 0:globalThis.document){const n=gn(t);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}
vendor: 4,682 bytes, line 41
41var I_="DismissableLayer",vh="dismissableLayer.update",N_="dismissableLayer.pointerDownOutside",j_="dismissableLayer.focusOutside",Rg,Wb=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yp=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,u=b.useContext(Wb),[c,d]=b.useState(null),h=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),p=Yt(e,T=>d(T)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(w),y=c?m.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=g,x=M_(T=>{const C=T.target,P=[...u.branches].some(R=>R.contains(C));!S||P||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},h),E=$_(T=>{const C=T.target;[...u.branches].some(R=>R.contains(C))||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},h);return L_(T=>{y===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Rg=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Og(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Rg)}},[c,h,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Og())},[c,u]),b.useEffect(()=>{const T=()=>f({});return document.addEventListener(vh,T),()=>document.removeEventListener(vh,T)},[]),k.jsx(ct.div,{...l,ref:p,style:{pointerEvents:v?S?"auto":"none":void 0,...t.style},onFocusCapture:Re(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Re(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Re(t.onPointerDownCapture,x.onPointerDownCapture)})});yp.displayName=I_;var D_="DismissableLayerBranch",Kb=b.forwardRef((t,e)=>{const n=b.useContext(Wb),r=b.useRef(null),s=Yt(e,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),k.jsx(ct.div,{...t,ref:s})});Kb.displayName=D_;function M_(t,e=globalThis==null?void 0:globalThis.document){const n=gn(t),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){qb(N_,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function $_(t,e=globalThis==null?void 0:globalThis.document){const n=gn(t),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&qb(j_,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Og(){const t=new CustomEvent(vh);document.dispatchEvent(t)}function qb(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Hb(s,i):s.dispatchEvent(i)}var B_=yp,U_=Kb,is=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},F_="Portal",Gb=b.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=b.useState(!1);is(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Bb.createPortal(k.jsx(ct.div,{...r,ref:e}),o):null});Gb.displayName=F_;function V_(t,e){return b.useReducer((n,r)=>e[n][r]??n,t)}var vp=t=>{const{present:e,children:n}=t,r=z_(e),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Yt(r.ref,H_(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};vp.displayName="Presence";function z_(t){const[e,n]=b.useState(),r=b.useRef({}),s=b.useRef(t),i=b.useRef("none"),o=t?"mounted":"unmounted",[a,l]=V_(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Ja(r.current);i.current=a==="mounted"?u:"none"},[a]),is(()=>{const u=r.current,c=s.current;if(c!==t){const h=i.current,f=Ja(u);t?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),is(()=>
41{if(e){let u;const c=e.ownerDocument.defaultView??window,d=f=>{const m=Ja(r.current).includes(f.animationName);if(f.target===e&&m&&(l("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},h=f=>{f.target===e&&(i.current=Ja(r.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ja(t){return(t==null?void 0:t.animationName)||"none"}function H_(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function W_({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=K_({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=gn(n),l=b.useCallback(u=>{if(i){const d=typeof u=="function"?u(t):u;d!==t&&a(d)}else s(u)},[i,t,s,a]);return[o,l]}function K_({defaultProp:t,onChange:e}){const n=b.useState(t),[r]=n,s=b.useRef(r),i=gn(e);return b.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var q_="VisuallyHidden",Ku=b.forwardRef((t,e)=>k.jsx(ct.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));Ku.displayName=q_;var G_=Ku,wp="ToastProvider",[bp,J_,Y_]=P_("Toast"),[Jb,BU]=zb("Toast",[Y_]),[Q_,qu]=Jb(wp),Yb=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wp}\`. Expected non-empty \`string\`.`),k.jsx(bp.Provider,{scope:e,children:k.jsx(Q_,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>c(f=>f+1),[]),onToastRemove:b.useCallback(()=>c(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:o})})};Yb.displayName=wp;var Qb="ToastViewport",X_=["F8"],wh="toast.viewportPause",bh="toast.viewportResume",Xb=b.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=X_,label:s="Notifications ({hotkey})",...i}=t,o=qu(Qb,n),a=J_(n),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),h=Yt(e,d,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=o.toastCount>0;b.useEffect(()=>{const w=g=>{var v;r.length!==0&&r.every(S=>g[S]||g.code===S)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),b.useEffect(()=>{const w=l.current,g=d.current;if(p&&w&&g){const y=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(wh);g.dispatchEvent(E),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(bh);g.dispatchEvent(E),o.isClosePausedRef.current=!1}},S=E=>{!w.contains(E.relatedTarget)&&v()},x=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",y),w.addEventListener("focusout",S),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",x),window.addEventListener("blur",y),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",S),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",x),window.removeEventListener("blur",y),window.removeEventListener("focus",v)}}},[p,o.isClosePausedRef]);const m=b.useCallback(({tabbingDirection:w})=>{const y=a().map(v=>{const S=v.ref.current,x=[S,...dk(S)];return w==="forwards"?x:x.reverse()});return(w==="forwards"?y.reverse():y).flat()},[a]);return b.useEffect(()=>{const w=d.current;if(w){const g=y=>{var x,E,T;const v=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!v){const C=document.activeElement,P=y.shiftKey;if(y.target===w&&P){(x=u.current)==null||x.focus();return}const B=m({tabbingDirection:P?"backwards":"forwards"}),K=B.findIndex(N=>N===C);Wc(B.slice(K+1))?y.preventDefault():P?(E=u.current)==null||E.focus():(T=c.current)==null||T.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[a,m]),k.jsxs(U_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&k.jsx(Sh,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});Wc(w)}}),k.jsx(bp.Slot,{scope:n,children:k.jsx(ct.ol,{tabIndex:-1,...i,ref:h})}),p&&k.jsx(Sh,{ref:c,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});Wc(w)}})]})});Xb.displayName=Qb;var Zb="ToastFocusProxy",Sh=b.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=qu(Zb,n);return k.jsx(Ku,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});Sh.displayName=Zb;var Gu="Toast",Z_="toast.swipeStart",ek="toast.swipeMove",tk="toast.swipeCancel",nk="toast.swipeEnd",eS=b.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,l]=W_({prop:r,defaultProp:s,onChange:i});return k.jsx(vp,{present:n||a,children:k.jsx(ik,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:gn(t.onPause),onResume:gn(t.onResume),onSwipeStart:Re(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Re(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Re(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Re(t.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});eS.displayName=Gu;var[rk,sk]=Jb(Gu,{onClose(){}}),ik=b.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...p}=t,m=qu(Gu,n),[w,g]=b.useState(null),y=Yt(e,N=>g(N)),v=b.useRef(null),S=b.useRef(null),x=s||m.duration,E=b.useRef(0),T=b.useRef(x),C=b.useRef(0),{onToastAdd:P,onToastRemove:R}=m,H=gn(()=>{var J;(w==null?void 0:w.contains(document.activeElement))&&((J=m.viewport)==null||J.focus()),o()}),B=b.useCallback(N=>
41{!N||N===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(H,N))},[H]);b.useEffect(()=>{const N=m.viewport;if(N){const J=()=>{B(T.current),u==null||u()},V=()=>{const $=new Date().getTime()-E.current;T.current=T.current-$,window.clearTimeout(C.current),l==null||l()};return N.addEventListener(wh,V),N.addEventListener(bh,J),()=>{N.removeEventListener(wh,V),N.removeEventListener(bh,J)}}},[m.viewport,x,l,u,B]),b.useEffect(()=>{i&&!m.isClosePausedRef.current&&B(x)},[i,x,m.isClosePausedRef,B]),b.useEffect(()=>(P(),()=>R()),[P,R]);const K=b.useMemo(()=>w?aS(w):null,[w]);return m.viewport?k.jsxs(k.Fragment,{children:[K&&k.jsx(ok,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),k.jsx(rk,{scope:n,onClose:H,children:ya.createPortal(k.jsx(bp.ItemSlot,{scope:n,children:k.jsx(B_,{asChild:!0,onEscapeKeyDown:Re(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||H(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:k.jsx(ct.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:y,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Re(t.onKeyDown,N=>{N.key==="Escape"&&(a==null||a(N.nativeEvent),N.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:Re(t.onPointerDown,N=>{N.button===0&&(v.current={x:N.clientX,y:N.clientY})}),onPointerMove:Re(t.onPointerMove,N=>{if(!v.current)return;const J=N.clientX-v.current.x,V=N.clientY-v.current.y,$=!!S.current,_=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=_?O(0,J):0,j=_?0:O(0,V),z=N.pointerType==="touch"?10:2,Y={x:D,y:j},ie={originalEvent:N,delta:Y};$?(S.current=Y,Ya(ek,d,ie,{discrete:!1})):Lg(Y,m.swipeDirection,z)?(S.current=Y,Ya(Z_,c,ie,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(J)>z||Math.abs(V)>z)&&(v.current=null)}),onPointerUp:Re(t.onPointerUp,N=>{const J=S.current,V=N.target;if(V.hasPointerCapture(N.pointerId)&&V.releasePointerCapture(N.pointerId),S.current=null,v.current=null,J){const $=N.currentTarget,_={originalEvent:N,delta:J};Lg(J,m.swipeDirection,m.swipeThreshold)?Ya(nk,f,_,{discrete:!0}):Ya(tk,h,_,{discrete:!0}),$.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),ok=t=>{const{__scopeToast:e,children:n,...r}=t,s=qu(Gu,e),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return uk(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:k.jsx(Gb,{asChild:!0,children:k.jsx(Ku,{...r,children:i&&k.jsxs(k.Fragment,{children:[s.label," ",n]})})})},ak="ToastTitle",tS=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return k.jsx(ct.div,{...r,ref:e})});tS.displayName=ak;var lk="ToastDescription",nS=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return k.jsx(ct.div,{...r,ref:e})});nS.displayName=lk;var rS="ToastAction",sS=b.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?k.jsx(oS,{altText:n,asChild:!0,children:k.jsx(Sp,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${rS}\`. Expected non-empty \`string\`.`),null)});sS.displayName=rS;var iS="ToastClose",Sp=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=sk(iS,n);return k.jsx(oS,{asChild:!0,children:k.jsx(ct.button,{type:"button",...r,ref:e,onClick:Re(t.onClick,s.onClose)})})});Sp.displayName=iS;var oS=b.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return k.jsx(ct.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function aS(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),ck(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&&e.push(o)}else e.push(...aS(r))}}),e}function Ya(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Hb(s,i):s.dispatchEvent(i)}var Lg=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function uk(t=()=>{}){const e=gn(t);is(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function ck(t){return t.nodeType===t.ELEMENT_NODE}function dk(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function Wc(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var hk=Yb,lS=Xb,uS=eS,cS=tS,dS=nS,hS=sS,fS=Sp;function pS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=pS(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function mS(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=pS(t))&&(r&&(r+=" "),r+=e);return r}const Ig=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ng=mS,fk=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Ng(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const h=Ig(c)||Ig(d);return s[u][h]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:h,...f}=c;return Object.entries(f).every(p=>{let[m,w]=p;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...u,d,h]:u},[]);return Ng(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
42 * @license lucide-react v0.462.0 - ISC
43 *
44 * This source code is licensed under the ISC license.
45 * See the LICENSE file in the root directory of this source tree.
46 */const pk=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gS=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
47 * @license lucide-react v0.462.0 - ISC
48 *
49 * This source code is licensed under the ISC license.
50 * See the LICENSE file in the root directory of this source tree.
51 */var mk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
52 * @license lucide-react v0.462.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */const gk=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...mk,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:gS("lucide",s),...a},[...o.map(([u,c])=>b.createElement(u,c)),...Array.isArray(i)?i:[i]]));/**
57 * @license lucide-react v0.462.0 - ISC
58 *
59 * This source code is licensed under the ISC license.
60 * See the LICENSE file in the root directory of this source tree.
61 */const yk=(t,e)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(gk,{ref:i,iconNode:e,className:gS(`lucide-${pk(t)}`,r),...s}));return n.displayName=`${t}`,n};/**
62 * @license lucide-react v0.462.0 - ISC
63 *
64 * This source code is licensed under the ISC license.
65 * See the LICENSE file in the root directory of this source tree.
66 */const vk=yk("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,361 bytes, line 66
66],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xp="-",wk=t=>{const e=Sk(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(xp);return a[0]===""&&a.length!==1&&a.shift(),yS(a,e)||bk(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},yS=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?yS(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(xp);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},jg=/^\[(.+)\]$/,bk=t=>{if(jg.test(t)){const e=jg.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},Sk=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return Ek(Object.entries(t.classGroups),n).forEach(([i,o])=>{xh(o,r,i,e)}),r},xh=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Dg(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(xk(s)){xh(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{xh(o,Dg(e,i),n,r)})})},Dg=(t,e)=>{let n=t;return e.split(xp).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xk=t=>t.isThemeGetter,Ek=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,Tk=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=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)}}},vS="!",Ck=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(r||a.slice(w,w+i)===e)){l.push(a.slice(c,w)),c=w+i;continue}if(g==="/"){d=w;continue}}g==="["?u++:g==="]"&&u--}const h=l.length===0?a:a.substring(c),f=h.startsWith(vS),p=f?h.substring(1):h,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},_k=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},kk=t=>({cache:Tk(t.cacheSize),parseClassName:Ck(t),...wk(t)}),Ak=/\s+/,Pk=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(Ak);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(u);let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){a=u+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=_k(c).join(":"),g=d?w+vS:w,y=g+m;if(i.includes(y))continue;i.push(y);const v=s(m,p);for(let S=0;S<v.length;++S){const x=v[S];i.push(g+x)}a=u+(a.length>0?" "+a:a)}return a};function Rk(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=wS(e))&&(r&&(r+=" "),r+=n);return r}const wS=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=wS(t[r]))&&(n&&(n+=" "),n+=e);return n};function Ok(t,...e){let n,r,s,i=o;function o(l){const u=e.reduce((c,d)=>d(c),t());return n=kk(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=Pk(l,n);return s(l,c),c}return function(){return i(Rk.apply(null,arguments))}}const de=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},bS=/^\[(?:([a-z-]+):)?(.+)\]$/i,Lk=/^\d+\/\d+$/,Ik=new Set(["px","full","screen"]),Nk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jk=/\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$/,Dk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Mk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$k=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sn=t=>ti(t)||Ik.has(t)||Lk.test(t),Wn=t=>Ri(t,"length",Kk),ti=t=>!!t&&!Number.isNaN(Number(t)),Kc=t=>Ri(t,"number",ti),qi=t=>!!t&&Number.isInteger(Number(t)),Bk=t=>t.endsWith("%")&&ti(t.slice(0,-1)),X=t=>bS.test(t),Kn=t=>Nk.test(t),Uk=new Set(["length","size","percentage"]),Fk=t=>Ri(t,Uk,SS),Vk=t=>Ri(t,"position",SS),zk=new Set(["image","url"]),Hk=t=>Ri(t,zk,Gk),Wk=t=>Ri(t,"",qk),Gi=()=>!0,Ri=(t,e,n)=>{const r=bS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},Kk=t=>jk.test(t)&&!Dk.test(t),SS=()=>!1,qk=t=>Mk.test(t),Gk=t=>$k.test(t),Jk=()=>{const t=de("colors"),e=de("spacing"),n=de("blur"),r=de("brightness"),s=de("borderColor"),i=de("borderRadius"),o=de("borderSpacing"),a=de("borderWidth"),l=de("contrast"),u=de("grayscale"),c=de("hueRotate"),d=de("invert"),h=de("gap"),f=de("gradientColorStops"),p=de("gradientColorStopPositions"),m=de("inset"),w=de("margin"),g=de("opacity"),y=de("padding"),v=de("saturate"),S=de("scale"),x=de("sepia"),E=de("skew"),T=de("space"),C=de("translate"),P=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",X,e],B=()=>[X,e],K=()=>["",Sn,Wn],N=()=>["auto",ti,X],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],
vendor: 12,033 bytes, line 66
66V=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",X],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[ti,X];return{cacheSize:500,separator:":",theme:{colors:[Gi],spacing:[Sn,Wn],blur:["none","",Kn,X],brightness:j(),borderColor:[t],borderRadius:["none","","full",Kn,X],borderSpacing:B(),borderWidth:K(),contrast:j(),grayscale:O(),hueRotate:j(),invert:O(),gap:B(),gradientColorStops:[t],gradientColorStopPositions:[Bk,Wn],inset:H(),margin:H(),opacity:j(),padding:B(),saturate:j(),scale:j(),sepia:O(),skew:j(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[Kn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...J(),X]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],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",qi,X]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",qi,X]}],"grid-cols":[{"grid-cols":[Gi]}],"col-start-end":[{col:["auto",{span:["full",qi,X]},X]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[Gi]}],"row-start-end":[{row:["auto",{span:[qi,X]},X]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",X]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",X]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,e]}],"min-w":[{"min-w":[X,e,"min","max","fit"]}],"max-w":[{"max-w":[X,e,"none","full","min","max","fit","prose",{screen:[Kn]},Kn]}],h:[{h:[X,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Kn,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kc]}],"font-family":[{font:[Gi]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",ti,Kc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Sn,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Sn,Wn]}],"underline-offset":[{"underline-offset":["auto",Sn,X]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],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",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),Vk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Fk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Hk]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"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":[g]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[Sn,X]}],"outline-w":[{outline:[Sn,Wn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Sn,Wn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Kn,Wk]}],"shadow-color":[{shadow:[Gi]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kn,X]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"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",X]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[qi,X]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 66
66],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",X]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Sn,Wn,Kc]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Yk=Ok(Jk);function us(...t){return Yk(mS(t))}const Qk=hk,xS=b.forwardRef(({className:t,...e},n)=>k.jsx(lS,{ref:n,className:us("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));xS.displayName=lS.displayName;const Xk=fk("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"}}),ES=b.forwardRef(({className:t,variant:e,...n},r)=>k.jsx(uS,{ref:r,className:us(Xk({variant:e}),t),...n}));ES.displayName=uS.displayName;const Zk=b.forwardRef(({className:t,...e},n)=>k.jsx(hS,{ref:n,className:us("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));Zk.displayName=hS.displayName;const TS=b.forwardRef(({className:t,...e},n)=>k.jsx(fS,{ref:n,className:us("absolute right-2 top-2 rounded-md p-1 text-foreground
66/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:k.jsx(vk,{className:"h-4 w-4"})}));TS.displayName=fS.displayName;const CS=b.forwardRef(({className:t,...e},n)=>k.jsx(cS,{ref:n,className:us("text-sm font-semibold",t),...e}));CS.displayName=cS.displayName;const _S=b.forwardRef(({className:t,...e},n)=>k.jsx(dS,{ref:n,className:us("text-sm opacity-90",t),...e}));_S.displayName=dS.displayName;function eA(){const{toasts:t}=x_();return k.jsxs(Qk,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return k.jsxs(ES,{...i,children:[k.jsxs("div",{className:"grid gap-1",children:[n&&k.jsx(CS,{children:n}),r&&k.jsx(_S,{children:r})]}),s,k.jsx(TS,{})]},e)}),k.jsx(xS,{})]})}var Mg=["light","dark"],tA="(prefers-color-scheme: dark)",nA=b.createContext(void 0),rA={setTheme:t=>{},themes:[]},sA=()=>{var t;return(t=b.useContext(nA))!=null?t:rA};b.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(p=>`'${p}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?Mg.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(p,m=!1,w=!0)=>{let g=o?o[p]:p,y=m?p+"|| ''":`'${g}'`,v="";return s&&w&&!m&&Mg.includes(p)&&(v+=`d.style.colorScheme = '${p}';`),n==="class"?m||g?v+=`c.add(${y})`:v+="null":g&&(v+=`d[s](n,${y})`),v},f=t?`!function(){${c}${h(t)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${tA}',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)}}${u?"":"else{"+h(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${e}');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 iA=t=>{switch(t){case"success":return lA;case"info":return cA;case"warning":return uA;case"error":return dA;default:return null}},oA=Array(12).fill(0),aA=({visible:t})=>I.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},I.createElement("div",{className:"sonner-spinner"},oA.map((e,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),lA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),uA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),dA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),hA=()=>{let[t,e]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{e(document.hidden)};
66return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Eh=1,fA=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Eh++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0;return r.then(async i=>{if(mA(i)&&!i.ok){s=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,a=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description;this.create({id:n,type:"error",message:o,description:a})}else if(e.success!==void 0){s=!1;let o=typeof e.success=="function"?await e.success(i):e.success,a=typeof e.description=="function"?await e.description(i):e.description;this.create({id:n,type:"success",message:o,description:a})}}).catch(async i=>{if(e.error!==void 0){s=!1;let o=typeof e.error=="function"?await e.error(i):e.error,a=typeof e.description=="function"?await e.description(i):e.description;this.create({id:n,type:"error",message:o,description:a})}}).finally(()=>{var i;s&&(this.dismiss(n),n=void 0),(i=e.finally)==null||i.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Eh++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},ft=new fA,pA=(t,e)=>{let n=(e==null?void 0:e.id)||Eh++;return ft.addToast({title:t,...e,id:n}),n},mA=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",gA=pA,yA=()=>ft.toasts;Object.assign(gA,{success:ft.success,info:ft.info,warning:ft.warning,error:ft.error,custom:ft.custom,message:ft.message,promise:ft.promise,dismiss:ft.dismiss,loading:ft.loading},{getHistory:yA});function vA(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}vA(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
66left: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;background:var(--gray1);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}: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:0;right:0;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}
66: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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%);--error-text: hsl(358, 100%, 81%)}[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%)}
67`);function Qa(t){return t.label!==void 0}var wA=3,bA="32px",SA=4e3,xA=356,EA=14,TA=20,CA=200;function _A(...t){return t.filter(Boolean).join(" ")}var kA=t=>{var e,n,r,s,i,o,a,l,u,c;let{invert:d,toast:h,unstyled:f,interacting:p,setHeights:m,visibleToasts:w,heights:g,index:y,toasts:v,expanded:S,removeToast:x,defaultRichColors:E,closeButton:T,style:C,cancelButtonStyle:P,actionButtonStyle:R,className:H="",descriptionClassName:B="",duration:K,position:N,gap:J,loadingIcon:V,expandByDefault:$,classNames:_,icons:O,closeButtonAriaLabel:D="Close toast",pauseWhenPageIsHidden:j,cn:z}
67=t,[Y,ie]=I.useState(!1),[Fe,re]=I.useState(!1),[Nt,Bn]=I.useState(!1),[Un,Fn]=I.useState(!1),[ka,hs]=I.useState(0),[Or,$i]=I.useState(0),Aa=I.useRef(null),Vn=I.useRef(null),hc=y===0,fc=y+1<=w,Ne=h.type,fs=h.dismissible!==!1,IT=h.className||"",NT=h.descriptionClassName||"",Pa=I.useMemo(()=>g.findIndex(Q=>Q.toastId===h.id)||0,[g,h.id]),jT=I.useMemo(()=>{var Q;return(Q=h.closeButton)!=null?Q:T},[h.closeButton,T]),fm=I.useMemo(()=>h.duration||K||SA,[h.duration,K]),pc=I.useRef(0),ps=I.useRef(0),pm=I.useRef(0),ms=I.useRef(null),[mm,DT]=N.split("-"),gm=I.useMemo(()=>g.reduce((Q,ce,oe)=>oe>=Pa?Q:Q+ce.height,0),[g,Pa]),ym=hA(),MT=h.invert||d,mc=Ne==="loading";ps.current=I.useMemo(()=>Pa*J+gm,[Pa,gm]),I.useEffect(()=>{ie(!0)},[]),I.useLayoutEffect(()=>{if(!Y)return;let Q=Vn.current,ce=Q.style.height;Q.style.height="auto";let oe=Q.getBoundingClientRect().height;Q.style.height=ce,$i(oe),m(Zt=>Zt.find(en=>en.toastId===h.id)?Zt.map(en=>en.toastId===h.id?{...en,height:oe}:en):[{toastId:h.id,height:oe,position:h.position},...Zt])},[Y,h.title,h.description,m,h.id]);let zn=I.useCallback(()=>{re(!0),hs(ps.current),m(Q=>Q.filter(ce=>ce.toastId!==h.id)),setTimeout(()=>{x(h)},CA)},[h,x,m,ps]);I.useEffect(()=>{if(h.promise&&Ne==="loading"||h.duration===1/0||h.type==="loading")return;let Q,ce=fm;return S||p||j&&ym?(()=>{if(pm.current<pc.current){let oe=new Date().getTime()-pc.current;ce=ce-oe}pm.current=new Date().getTime()})():ce!==1/0&&(pc.current=new Date().getTime(),Q=setTimeout(()=>{var oe;(oe=h.onAutoClose)==null||oe.call(h,h),zn()},ce)),()=>clearTimeout(Q)},[S,p,$,h,fm,zn,h.promise,Ne,j,ym]),I.useEffect(()=>{let Q=Vn.current;if(Q){let ce=Q.getBoundingClientRect().height;return $i(ce),m(oe=>[{toastId:h.id,height:ce,position:h.position},...oe]),()=>m(oe=>oe.filter(Zt=>Zt.toastId!==h.id))}},[m,h.id]),I.useEffect(()=>{h.delete&&zn()},[zn,h.delete]);function $T(){return O!=null&&O.loading?I.createElement("div",{className:"sonner-loader","data-visible":Ne==="loading"},O.loading):V?I.createElement("div",{className:"sonner-loader","data-visible":Ne==="loading"},V):I.createElement(aA,{visible:Ne==="loading"})}return I.createElement("li",{"aria-live":h.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Vn,className:z(H,IT,_==null?void 0:_.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,_==null?void 0:_.default,_==null?void 0:_[Ne],(n=h==null?void 0:h.classNames)==null?void 0:n[Ne]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:E,"data-styled":!(h.jsx||h.unstyled||f),"data-mounted":Y,"data-promise":!!h.promise,"data-removed":Fe,"data-visible":fc,"data-y-position":mm,"data-x-position":DT,"data-index":y,"data-front":hc,"data-swiping":Nt,"data-dismissible":fs,"data-type":Ne,"data-invert":MT,"data-swipe-out":Un,"data-expanded":!!(S||$&&Y),style:{"--index":y,"--toasts-before":y,"--z-index":v.length-y,"--offset":`${Fe?ka:ps.current}px`,"--initial-height":$?"auto":`${Or}px`,...C,...h.style},onPointerDown:Q=>{mc||!fs||(Aa.current=new Date,hs(ps.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(Bn(!0),ms.current={x:Q.clientX,y:Q.clientY}))},onPointerUp:()=>{var Q,ce,oe,Zt;if(Un||!fs)return;ms.current=null;let en=Number(((Q=Vn.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ra=new Date().getTime()-((ce=Aa.current)==null?void 0:ce.getTime()),BT=Math.abs(en)/Ra;if(Math.abs(en)>=TA||BT>.11){hs(ps.current),(oe=h.onDismiss)==null||oe.call(h,h),zn(),Fn(!0);return}(Zt=Vn.current)==null||Zt.style.setProperty("--swipe-amount","0px"),Bn(!1)},onPointerMove:Q=>{var ce;if(!ms.current||!fs)return;let oe=Q.clientY-ms.current.y,Zt=Q.clientX-ms.current.x,en=(mm==="top"?Math.min:Math.max)(0,oe),Ra=Q.pointerType==="touch"?10:2;Math.abs(en)>Ra?(ce=Vn.current)==null||ce.style.setProperty("--swipe-amount",`${oe}px`):Math.abs(Zt)>Ra&&(ms.current=null)}},jT&&!h.jsx?I.createElement("button",{"aria-label":D,"data-disabled":mc,"data-close-button":!0,onClick:mc||!fs?()=>{}:()=>{var Q;zn(),(Q=h.onDismiss)==null||Q.call(h,h)},className:z(_==null?void 0:_.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,h.jsx||I.isValidElement(h.title)?h.jsx||h.title:I.createElement(I.Fragment,null,Ne||h.icon||h.promise?I.createElement("div",{"data-icon":"",className:z(_==null?void 0:_.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||$T():null,h.type!=="loading"?h.icon||(O==null?void 0:O[Ne])||iA(Ne):null):null,I.createElement("div",{"data-content":"",className:z(_==null?void 0:_.content,(o=h==null?void 0:h.classNames)==null?void 0:o.content)},I.createElement("div",{"data-title":"",className:z(_==null?void 0:_.title,(a=h==null?void 0:h.classNames)==null?void 0:a.title)},h.title),h.description?I.createElement("div",{"data-description":"",className:z(B,NT,_==null?void 0:_.description,(l=h==null?void 0:h.classNames)==null?void 0:l.description)},h.description):null),I.isValidElement(h.cancel)?h.cancel:h.cancel&&Qa(h.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||P,onClick:Q=>{var ce,oe;Qa(h.cancel)&&fs&&((oe=(ce=h.cancel).onClick)==null||oe.call(ce,Q),zn())},className:z(_==null?void 0:_.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,I.isValidElement(h.action)?h.action:h.action&&Qa(h.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||R,onClick:Q=>{var ce,oe;Qa(h.action)&&(Q.defaultPrevented||((oe=(ce=h.action).onClick)==null||oe.call(ce,Q),zn()))},className:z(_==null?void 0:_.actionButton,(c=h==null?void 0:h.classNames)==null?void 0:c.actionButton)},h.action.label):null))};function $g(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var AA=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:o,offset:a,theme:l="light",richColors:u,duration:c,style:d,visibleToasts:h=wA,toastOptions:f,dir:p=$g(),gap:m=EA,loadingIcon:w,icons:g,containerAriaLabel:y="Notifications",pauseWhenPageIsHidden:v,cn:S=_A}=t,[x,E]=I.useState([]),T=I.useMemo(()=>Array.from(new Set([n].concat(x.filter(j=>j.position).map(j=>
67j.position)))),[x,n]),[C,P]=I.useState([]),[R,H]=I.useState(!1),[B,K]=I.useState(!1),[N,J]=I.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=I.useRef(null),$=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=I.useRef(null),O=I.useRef(!1),D=I.useCallback(j=>{var z;(z=x.find(Y=>Y.id===j.id))!=null&&z.delete||ft.dismiss(j.id),E(Y=>Y.filter(({id:ie})=>ie!==j.id))},[x]);return I.useEffect(()=>ft.subscribe(j=>{if(j.dismiss){E(z=>z.map(Y=>Y.id===j.id?{...Y,delete:!0}:Y));return}setTimeout(()=>{Bb.flushSync(()=>{E(z=>{let Y=z.findIndex(ie=>ie.id===j.id);return Y!==-1?[...z.slice(0,Y),{...z[Y],...j},...z.slice(Y+1)]:[j,...z]})})})}),[]),I.useEffect(()=>{if(l!=="system"){J(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:j})=>{J(j?"dark":"light")})},[l]),I.useEffect(()=>{x.length<=1&&H(!1)},[x]),I.useEffect(()=>{let j=z=>{var Y,ie;r.every(Fe=>z[Fe]||z.code===Fe)&&(H(!0),(Y=V.current)==null||Y.focus()),z.code==="Escape"&&(document.activeElement===V.current||(ie=V.current)!=null&&ie.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[r]),I.useEffect(()=>{if(V.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,O.current=!1)}},[V.current]),x.length?I.createElement("section",{"aria-label":`${y} ${$}`,tabIndex:-1},T.map((j,z)=>{var Y;let[ie,Fe]=j.split("-");return I.createElement("ol",{key:j,dir:p==="auto"?$g():p,tabIndex:-1,ref:V,className:o,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":ie,"data-x-position":Fe,style:{"--front-toast-height":`${((Y=C[0])==null?void 0:Y.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||bA,"--width":`${xA}px`,"--gap":`${m}px`,...d},onBlur:re=>{O.current&&!re.currentTarget.contains(re.relatedTarget)&&(O.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||O.current||(O.current=!0,_.current=re.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{B||H(!1)},onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},x.filter(re=>!re.position&&z===0||re.position===j).map((re,Nt)=>{var Bn,Un;return I.createElement(kA,{key:re.id,icons:g,index:Nt,toast:re,defaultRichColors:u,duration:(Bn=f==null?void 0:f.duration)!=null?Bn:c,className:f==null?void 0:f.className,descriptionClassName:f==null?void 0:f.descriptionClassName,invert:e,visibleToasts:h,closeButton:(Un=f==null?void 0:f.closeButton)!=null?Un:i,interacting:B,position:j,style:f==null?void 0:f.style,unstyled:f==null?void 0:f.unstyled,classNames:f==null?void 0:f.classNames,cancelButtonStyle:f==null?void 0:f.cancelButtonStyle,actionButtonStyle:f==null?void 0:f.actionButtonStyle,removeToast:D,toasts:x.filter(Fn=>Fn.position==re.position),heights:C.filter(Fn=>Fn.position==re.position),setHeights:P,expandByDefault:s,gap:m,loadingIcon:w,expanded:R,pauseWhenPageIsHidden:v,cn:S})}))})):null};const PA=({...t})=>{const{theme:e="system"}=sA();return k.jsx(AA,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})},RA=["top","right","bottom","left"],xr=Math.min,mt=Math.max,lu=Math.round,Xa=Math.floor,Er=t=>({x:t,y:t}),OA={left:"right",right:"left",bottom:"top",top:"bottom"},LA={start:"end",end:"start"};function Th(t,e,n){return mt(t,xr(e,n))}function Nn(t,e){return typeof t=="function"?t(e):t}function jn(t){return t.split("-")[0]}function Oi(t){return t.split("-")[1]}function Ep(t){return t==="x"?"y":"x"}function Tp(t){return t==="y"?"height":"width"}function Tr(t){return["top","bottom"].includes(jn(t))?"y":"x"}function Cp(t){return Ep(Tr(t))}function IA(t,e,n){n===void 0&&(n=!1);const r=Oi(t),s=Cp(t),i=Tp(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=uu(o)),[o,uu(o)]}function NA(t){const e=uu(t);return[Ch(t),e,Ch(e)]}function Ch(t){return t.replace(/start|end/g,e=>LA[e])}function jA(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:o;default:return[]}}function DA(t,e,n,r){const s=Oi(t);let i=jA(jn(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Ch)))),i}function uu(t){return t.replace(/left|right|bottom|top/g,e=>OA[e])}function MA(t){return{top:0,right:0,bottom:0,left:0,...t}}function kS(t){return typeof t!="number"?MA(t):{top:t,right:t,bottom:t,left:t}}function cu(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function Bg(t,e,n){let{reference:r,floating:s}=t;const i=Tr(e),o=Cp(e),a=Tp(o),l=jn(e),u=i==="y",c=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:c,y:r.y-s.height};break;case"bottom":f={x:c,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(Oi(e)){case"start":f[o]-=h*(n&&u?-1:1);break;case"end":f[o]+=h*(n&&u?-1:1);break}return f}const $A=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,689 bytes, line 67
67=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:c,y:d}=Bg(u,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:w,fn:g}=a[m],{x:y,y:v,data:S,reset:x}=await g({x:c,y:d,initialPlacement:r,placement:h,strategy:s,middlewareData:f,rects:u,platform:o,elements:{reference:t,floating:e}});c=y??c,d=v??d,f={...f,[w]:{...f[w],...S}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):x.rects),{x:c,y:d}=Bg(u,h,l)),m=-1)}return{x:c,y:d,placement:h,strategy:s,middlewareData:f}};async function Ho(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Nn(e,t),p=kS(f),w=a[h?d==="floating"?"reference":"floating":d],g=cu(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),y=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},x=cu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+p.top)/S.y,bottom:(x.bottom-g.bottom+p.bottom)/S.y,left:(g.left-x.left+p.left)/S.x,right:(x.right-g.right+p.right)/S.x}}const BA=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=Nn(t,e)||{};if(u==null)return{};const d=kS(c),h={x:n,y:r},f=Cp(s),p=Tp(f),m=await o.getDimensions(u),w=f==="y",g=w?"top":"left",y=w?"bottom":"right",v=w?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[f]-h[f]-i.floating[p],x=h[f]-i.reference[f],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let T=E?E[v]:0;(!T||!await(o.isElement==null?void 0:o.isElement(E)))&&(T=a.floating[v]||i.floating[p]);const C=S/2-x/2,P=T/2-m[p]/2-1,R=xr(d[g],P),H=xr(d[y],P),B=R,K=T-m[p]-H,N=T/2-m[p]/2+C,J=Th(B,N,K),V=!l.arrow&&Oi(s)!=null&&N!==J&&i.reference[p]/2-(N<B?R:H)-m[p]/2<0,$=V?N<B?N-B:N-K:0;return{[f]:h[f]+$,data:{[f]:J,centerOffset:N-J-$,...V&&{alignmentOffset:$}},reset:V}}}),UA=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...w}=Nn(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=jn(s),y=Tr(a),v=jn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(v||!m?[uu(a)]:NA(a)),E=p!=="none";!h&&E&&x.push(...DA(a,m,p,S));const T=[a,...x],C=await Ho(e,w),P=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&P.push(C[g]),d){const N=IA(s,o,S);P.push(C[N[0]],C[N[1]])}if(R=[...R,{placement:s,overflows:P}],!P.every(N=>N<=0)){var H,B;const N=(((H=i.flip)==null?void 0:H.index)||0)+1,J=T[N];if(J)return{data:{index:N,overflows:R},reset:{placement:J}};let V=(B=R.filter($=>$.overflows[0]<=0).sort(($,_)=>$.overflows[1]-_.overflows[1])[0])==null?void 0:B.placement;if(!V)switch(f){case"bestFit":{var K;const $=(K=R.filter(_=>{if(E){const O=Tr(_.placement);return O===y||O==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(O=>O>0).reduce((O,D)=>O+D,0)]).sort((_,O)=>_[1]-O[1])[0])==null?void 0:K[0];$&&(V=$);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function Ug(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Fg(t){return RA.some(e=>t[e]>=0)}const FA=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Nn(t,e);switch(r){case"referenceHidden":{const i=await Ho(e,{...s,elementContext:"reference"}),o=Ug(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Fg(o)}}}case"escaped":{const i=await Ho(e,{...s,altBoundary:!0}),o=Ug(i,n.floating);return{data:{escapedOffsets:o,escaped:Fg(o)}}}default:return{}}}}};async function VA(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=jn(n),a=Oi(n),l=Tr(n)==="y",u=["left","top"].includes(o)?-1:1,c=i&&l?-1:1,d=Nn(e,t);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*c,y:h*u}:{x:h*u,y:f*c}}const zA=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await VA(e,t);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}}}}},HA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:g,y}=w;return{x:g,y}}},...l}=Nn(t,e),u={x:n,y:r},c=await Ho(e,l),d=Tr(jn(s)),h=Ep(d);let f=u[h],p=u[d];if(i){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=f+c[w],v=f-c[g];f=Th(y,f,v)}if(o){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=p+c[w],v=p-c[g];p=Th(y,p,v)}const m=a.fn({...e,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:o}}}}}},WA=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Nn(t,e),c={x:n,y:r},d=Tr(s),h=Ep(d);let f=c[h],p=c[d];const m=Nn(a,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const v=h==="y"?"height":"width",S=i.reference[h]-i.floating[v]+w.mainAxis,x=i.reference[h]+i.reference[v]-w.mainAxis;f<S?f=S:f>x&&(f=x)}if(u){var g,y;const v=h==="y"?"width":"height",S=["top","left"].includes(jn(s)),x=i.reference[d]-i.floating[v]+(S&&((g=o.offset)==null?void 0:g[d])||0)+(S?0:w.crossAxis),E=i.reference[d]+i.reference[v]+(S?0:((y=o.offset)==null?void 0:y[d])||0)-(S?w.crossAxis:0);p<x?p=x:p>E&&(p=E)}return{[h]:f,[d]:p}}}},KA=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...u}=Nn(t,e),c=await Ho(e,u),d=jn(s),h=Oi(s),f=Tr(s)==="y",{width:p,height:m}=i.floating;let w,g;d==="top"||d==="bottom"?(w=d,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,w=h==="end"?"top":"bottom");const y=m-c.top-c.bottom,v=p-c.left-c.right,S=xr(m-c[w],y),x=xr(p-c[g],v),E=!e.middlewareData.shift;let T=S,C=x;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=v),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(T=y),E&&!h){const R=mt(c.left,0),H=mt(c.right,0),B=mt(c.top,0),K=mt(c.bottom,0);f?C=p-2*(R!==0||H!==0?R+H:mt(c.left,c.right)):T=m-2*(B!==0||K!==0?B+K:mt(c.top,c.bottom))}await l({...e,availableWidth:C,availableHeight:T});const P=await o.getDimensions(a.floating);return p!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function Ju(){return typeof window<"u"}function Li(t){return AS(t)?(t.nodeName||"").toLowerCase():"#document"}function wt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function wn(t){var e;return(e=(AS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function AS(t){return Ju()?t instanceof Node||t instanceof wt(t).Node:!1}function Qt(t){return Ju()?t instanceof Element||t instanceof wt(t).Element:!1}function yn(t){return Ju()?t instanceof HTMLElement||t instanceof wt(t).HTMLElement:!1}function Vg(t){return!Ju()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof wt(t).ShadowRoot}function wa(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Xt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function qA(t){return["table","td","th"].includes(Li(t))}function Yu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function _p(t){const e=kp(),n=Qt(t)?Xt(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function GA(t){let e=Cr(t);for(;yn(e)&&!Ei(e);){if(_p(e))return e;if(Yu(e))return null;e=Cr(e)}return null}function kp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ei(t){return["html","body","#document"].includes(Li(t))}function Xt(t){return wt(t).getComputedStyle(t)}function Qu(t){return Qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Cr(t){if(Li(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vg(t)&&t.host||wn(t);return Vg(e)?e.host:e}function PS(t){const e=Cr(t);return Ei(e)?t.ownerDocument?t.ownerDocument.body:t.body:yn(e)&&wa(e)?e:PS(e)}function Wo(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=PS(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=wt(s);if(i){const a=_h(o);
vendor: 5,525 bytes, line 67
67return e.concat(o,o.visualViewport||[],wa(s)?s:[],a&&n?Wo(a):[])}return e.concat(s,Wo(s,[],n))}function _h(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function RS(t){const e=Xt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=yn(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=lu(n)!==i||lu(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Ap(t){return Qt(t)?t:t.contextElement}function ni(t){const e=Ap(t);if(!yn(e))return Er(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=RS(e);let o=(i?lu(n.width):n.width)/r,a=(i?lu(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const JA=Er(0);function OS(t){const e=wt(t);return!kp()||!e.visualViewport?JA:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function YA(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==wt(t)?!1:e}function os(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=Ap(t);let o=Er(1);e&&(r?Qt(r)&&(o=ni(r)):o=ni(t));const a=YA(i,n,r)?OS(i):Er(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const h=wt(i),f=r&&Qt(r)?wt(r):r;let p=h,m=_h(p);for(;m&&r&&f!==p;){const w=ni(m),g=m.getBoundingClientRect(),y=Xt(m),v=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*w.x,S=g.top+(m.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=v,u+=S,p=wt(m),m=_h(p)}}return cu({width:c,height:d,x:l,y:u})}function QA(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=wn(r),a=e?Yu(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Er(1);const c=Er(0),d=yn(r);if((d||!d&&!i)&&((Li(r)!=="body"||wa(o))&&(l=Qu(r)),yn(r))){const h=os(r);u=ni(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function XA(t){return Array.from(t.getClientRects())}function kh(t,e){const n=Qu(t).scrollLeft;return e?e.left+n:os(wn(t)).left+n}function ZA(t){const e=wn(t),n=Qu(t),r=t.ownerDocument.body,s=mt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=mt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+kh(t);const a=-n.scrollTop;return Xt(r).direction==="rtl"&&(o+=mt(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function eP(t,e){const n=wt(t),r=wn(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=kp();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function tP(t,e){const n=os(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=yn(t)?ni(t):Er(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function zg(t,e,n){let r;if(e==="viewport")r=eP(t,n);else if(e==="document")r=ZA(wn(t));else if(Qt(e))r=tP(e,n);else{const s=OS(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return cu(r)}function LS(t,e){const n=Cr(t);return n===e||!Qt(n)||Ei(n)?!1:Xt(n).position==="fixed"||LS(n,e)}function nP(t,e){const n=e.get(t);if(n)return n;let r=Wo(t,[],!1).filter(a=>Qt(a)&&Li(a)!=="body"),s=null;const i=Xt(t).position==="fixed";let o=i?Cr(t):t;for(;Qt(o)&&!Ei(o);){const a=Xt(o),l=_p(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||wa(o)&&!l&&LS(t,o))?r=r.filter(c=>c!==o):s=a,o=Cr(o)}return e.set(t,r),r}function rP(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?Yu(e)?[]:nP(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=zg(e,c,s);return u.top=mt(d.top,u.top),u.right=xr(d.right,u.right),u.bottom=xr(d.bottom,u.bottom),u.left=mt(d.left,u.left),u},zg(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sP(t){const{width:e,height:n}=RS(t);return{width:e,height:n}}function iP(t,e,n){const r=yn(e),s=wn(e),i=n==="fixed",o=os(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Er(0);if(r||!r&&!i)if((Li(e)!=="body"||wa(s))&&(a=Qu(e)),r){const f=os(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&(l.x=kh(s));let u=0,c=0;if(s&&!r&&!i){const f=s.getBoundingClientRect();c=f.top+a.scrollTop,u=f.left+a.scrollLeft-kh(s,f)}const d=o.left+a.scrollLeft-l.x-u,h=o.top+a.scrollTop-l.y-c;return{x:d,y:h,width:o.width,height:o.height}}function qc(t){return Xt(t).position==="static"}function Hg(t,e){if(!yn(t)||Xt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return wn(t)===n&&(n=n.ownerDocument.body),n}function IS(t,e){const n=wt(t);if(Yu(t))return n;if(!yn(t)){let s=Cr(t);for(;s&&!Ei(s);){if(Qt(s)&&!qc(s))return s;s=Cr(s)}return n}let r=Hg(t,e);for(;r&&qA(r)&&qc(r);)r=Hg(r,e);return r&&Ei(r)&&qc(r)&&!_p(r)?n:r||GA(t)||n}const oP=async function(t){const e=this.getOffsetParent||IS,n=this.getDimensions,r=await n(t.floating);return{reference:iP(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aP(t){return Xt(t).direction==="rtl"}const lP={convertOffsetParentRelativeRectToViewportRelativeRect:QA,getDocumentElement:wn,getClippingRect:rP,getOffsetParent:IS,getElementRects:oP,getClientRects:XA,getDimensions:sP,getScale:ni,isElement:Qt,isRTL:aP};function uP(t,e){let n=null,r;const s=wn(t);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{left:u,top:c,width:d,height:h}=t.getBoundingClientRect();if(a||e(),!d||!h)return;
vendor: 10,297 bytes, line 67
67const f=Xa(c),p=Xa(s.clientWidth-(u+d)),m=Xa(s.clientHeight-(c+h)),w=Xa(u),y={rootMargin:-f+"px "+-p+"px "+-m+"px "+-w+"px",threshold:mt(0,xr(1,l))||1};let v=!0;function S(x){const E=x[0].intersectionRatio;if(E!==l){if(!v)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(t)}return o(!0),i}function cP(t,e,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,u=Ap(t),c=s||i?[...u?Wo(u):[],...Wo(e)]:[];c.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=u&&a?uP(u,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(e)})),n()}),u&&!l&&f.observe(u),f.observe(e));let p,m=l?os(t):null;l&&w();function w(){const g=os(t);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(w)}return n(),()=>{var g;c.forEach(y=>{s&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const dP=zA,hP=HA,fP=UA,pP=KA,mP=FA,Wg=BA,gP=WA,yP=(t,e,n)=>{const r=new Map,s={platform:lP,...n},i={...s.platform,_c:r};return $A(t,e,{...s,platform:i})};var kl=typeof document<"u"?b.useLayoutEffect:b.useEffect;function du(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!du(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!du(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function NS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Kg(t,e){const n=NS(t);return Math.round(e*n)/n}function Gc(t){const e=b.useRef(t);return kl(()=>{e.current=t}),e}function vP(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=b.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);du(h,r)||f(r);const[p,m]=b.useState(null),[w,g]=b.useState(null),y=b.useCallback(_=>{_!==E.current&&(E.current=_,m(_))},[]),v=b.useCallback(_=>{_!==T.current&&(T.current=_,g(_))},[]),S=i||p,x=o||w,E=b.useRef(null),T=b.useRef(null),C=b.useRef(c),P=l!=null,R=Gc(l),H=Gc(s),B=Gc(u),K=b.useCallback(()=>{if(!E.current||!T.current)return;const _={placement:e,strategy:n,middleware:h};H.current&&(_.platform=H.current),yP(E.current,T.current,_).then(O=>{const D={...O,isPositioned:B.current!==!1};N.current&&!du(C.current,D)&&(C.current=D,ya.flushSync(()=>{d(D)}))})},[h,e,n,H,B]);kl(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[u]);const N=b.useRef(!1);kl(()=>(N.current=!0,()=>{N.current=!1}),[]),kl(()=>{if(S&&(E.current=S),x&&(T.current=x),S&&x){if(R.current)return R.current(S,x,K);K()}},[S,x,K,R,P]);const J=b.useMemo(()=>({reference:E,floating:T,setReference:y,setFloating:v}),[y,v]),V=b.useMemo(()=>({reference:S,floating:x}),[S,x]),$=b.useMemo(()=>{const _={position:n,left:0,top:0};if(!V.floating)return _;const O=Kg(V.floating,c.x),D=Kg(V.floating,c.y);return a?{..._,transform:"translate("+O+"px, "+D+"px)",...NS(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:D}},[n,a,V.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:K,refs:J,elements:V,floatingStyles:$}),[c,K,J,V,$])}const wP=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Wg({element:r.current,padding:s}).fn(n):{}:r?Wg({element:r,padding:s}).fn(n):{}}}},bP=(t,e)=>({...dP(t),options:[t,e]}),SP=(t,e)=>({...hP(t),options:[t,e]}),xP=(t,e)=>({...gP(t),options:[t,e]}),EP=(t,e)=>({...fP(t),options:[t,e]}),TP=(t,e)=>({...pP(t),options:[t,e]}),CP=(t,e)=>({...mP(t),options:[t,e]}),_P=(t,e)=>({...wP(t),options:[t,e]});var kP="Arrow",jS=b.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return k.jsx(ct.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:k.jsx("polygon",{points:"0,0 30,0 15,10"})})});jS.displayName=kP;var AP=jS;function PP(t,e=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];function u(d){const{scope:h,children:f,...p}=d,m=(h==null?void 0:h[t][l])||a,w=b.useMemo(()=>p,Object.values(p));return k.jsx(m.Provider,{value:w,children:f})}function c(d,h){const f=(h==null?void 0:h[t][l])||a,p=b.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,RP(s,...e)]}function RP(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function OP(t){const[e,n]=b.useState(void 0);return is(()=>{if(t){n({width:t.offsetWidth,height:t.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,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var DS="Popper",[MS,$S]=PP(DS),[UU,BS]=MS(DS),US="PopperAnchor",FS=b.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=BS(US,n),o=b.useRef(null),a=Yt(e,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:k.jsx(ct.div,{...s,ref:a})});FS.displayName=US;var Pp="PopperContent",[LP,IP]=MS(Pp),VS=b.forwardRef((t,e)=>{var Nt,Bn,Un,Fn,ka,hs;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:p,...m}=t,w=BS(Pp,n),[g,y]=b.useState(null),v=Yt(e,Or=>y(Or)),[S,x]=b.useState(null),E=OP(S),T=(E==null?void 0:E.width)??0,C=(E==null?void 0:E.height)??0,P=r+(i!=="center"?"-"+i:""),R=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(u)?u:[u],B=H.length>0,K={padding:R,boundary:H.filter(jP),altBoundary:B},{refs:N,floatingStyles:J,placement:V,isPositioned:$,middlewareData:_}=vP({strategy:"fixed",placement:P,whileElementsMounted:(...Or)=>cP(...Or,{animationFrame:f==="always"}),elements:{reference:w.anchor},middleware:[bP({mainAxis:s+C,alignmentAxis:o}),l&&SP({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?xP():void 0,...K}),l&&EP({...K}),TP({...K,apply:({elements:Or,rects:$i,availableWidth:Aa,availableHeight:Vn})=>{const{width:hc,height:fc}=$i.reference,Ne=Or.floating.style;Ne.setProperty("--radix-popper-available-width",`${Aa}px`),Ne.setProperty("--radix-popper-available-height",`${Vn}px`),Ne.setProperty("--radix-popper-anchor-width",`${hc}px`),Ne.setProperty("--radix-popper-anchor-height",`${fc}px`)}}),S&&_P({element:S,padding:a}),DP({arrowWidth:T,arrowHeight:C}),h&&CP({strategy:"referenceHidden",...K})]}),[O,D]=WS(V),j=gn(p);is(()=>{$&&(j==null||j())},[$,j]);const z=(Nt=_.arrow)==null?void 0:Nt.x,Y=(Bn=_.arrow)==null?void 0:Bn.y,ie=((Un=_.arrow)==null?void 0:Un.centerOffset)!==0,[Fe,re]=b.useState();return is(()=>{g&&re(window.getComputedStyle(g).zIndex)},[g]),k.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:$?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Fe,"--radix-popper-transform-origin":[(Fn=_.transformOrigin)==null?void 0:Fn.x,(ka=_.transformOrigin)==null?void 0:ka.y].join(" "),...((hs=_.hide)==null?void 0:hs.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:k.jsx(LP,{scope:n,placedSide:O,onArrowChange:x,arrowX:z,arrowY:Y,shouldHideArrow:ie,children:k.jsx(ct.div,{"data-side":O,"data-align":D,...m,ref:v,style:{...m.style,animation:$?void 0:"none"}})})})});VS.displayName=Pp;var zS="PopperArrow",NP={top:"bottom",right:"left",bottom:"top",left:"right"},HS=b.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=IP(zS,r),o=NP[i.placedSide];return k.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:k.jsx(AP,{...s,ref:n,style:{...s.style,display:"block"}})})});HS.displayName=zS;function jP(t){return t!==null}var DP=t=>({name:"transformOrigin",options:t,fn(e){var w,g,y;const{placement:n,rects:r,middlewareData:s}=e,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=WS(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,f=(((y=s.arrow)==null?void 0:y.y)??0)+l/2;let p="",m="";return u==="bottom"?(p=o?d:`${h}px`,m=`${-l}px`):u==="top"?(p=o?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=o?d:`${f}px`):u==="left"&&(p=`${r.floating.width+l}px`,m=o?d:`${f}px`),{data:{x:p,y:m}}}});function WS(t){const[e,n="center"]=t.split("-");return[e,n]}var MP=FS,$P=VS,BP=HS,[Xu,FU]=zb("Tooltip",[$S]),Rp=$S(),KS="TooltipProvider",
vendor: 6,279 bytes, line 67
67UP=700,qg="tooltip.open",[FP,qS]=Xu(KS),GS=t=>{const{__scopeTooltip:e,delayDuration:n=UP,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=b.useState(!0),l=b.useRef(!1),u=b.useRef(0);return b.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),k.jsx(FP,{scope:e,isOpenDelayed:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:b.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:b.useCallback(c=>{l.current=c},[]),disableHoverableContent:s,children:i})};GS.displayName=KS;var JS="Tooltip",[VU,Zu]=Xu(JS),Ah="TooltipTrigger",VP=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Zu(Ah,n),i=qS(Ah,n),o=Rp(n),a=b.useRef(null),l=Yt(e,a,s.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),k.jsx(MP,{asChild:!0,...o,children:k.jsx(ct.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Re(t.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Re(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Re(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Re(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Re(t.onBlur,s.onClose),onClick:Re(t.onClick,s.onClose)})})});VP.displayName=Ah;var zP="TooltipPortal",[zU,HP]=Xu(zP,{forceMount:void 0}),Ti="TooltipContent",YS=b.forwardRef((t,e)=>{const n=HP(Ti,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Zu(Ti,t.__scopeTooltip);return k.jsx(vp,{present:r||o.open,children:o.disableHoverableContent?k.jsx(QS,{side:s,...i,ref:e}):k.jsx(WP,{side:s,...i,ref:e})})}),WP=b.forwardRef((t,e)=>{const n=Zu(Ti,t.__scopeTooltip),r=qS(Ti,t.__scopeTooltip),s=b.useRef(null),i=Yt(e,s),[o,a]=b.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{a(null),d(!1)},[d]),f=b.useCallback((p,m)=>{const w=p.currentTarget,g={x:p.clientX,y:p.clientY},y=JP(g,w.getBoundingClientRect()),v=YP(g,y),S=QP(m.getBoundingClientRect()),x=ZP([...v,...S]);a(x),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&c){const p=w=>f(w,c),m=w=>f(w,l);return l.addEventListener("pointerleave",p),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",p),c.removeEventListener("pointerleave",m)}}},[l,c,f,h]),b.useEffect(()=>{if(o){const p=m=>{const w=m.target,g={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),v=!XP(g,o);y?h():v&&(h(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,c,o,u,h]),k.jsx(QS,{...t,ref:i})}),[KP,qP]=Xu(JS,{isInside:!1}),QS=b.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Zu(Ti,n),u=Rp(n),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(qg,c),()=>document.removeEventListener(qg,c)),[c]),b.useEffect(()=>{if(l.trigger){const d=h=>{const f=h.target;f!=null&&f.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),k.jsx(yp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:k.jsxs($P,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[k.jsx(Vb,{children:r}),k.jsx(KP,{scope:n,isInside:!0,children:k.jsx(G_,{id:l.contentId,role:"tooltip",children:s||r})})]})})});YS.displayName=Ti;var XS="TooltipArrow",GP=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Rp(n);return qP(XS,n).isInside?null:k.jsx(BP,{...s,...r,ref:e})});GP.displayName=XS;function JP(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.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 YP(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function QP(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function XP(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i].x,l=e[i].y,u=e[o].x,c=e[o].y;l>r!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(s=!s)}return s}function ZP(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),eR(e)}function eR(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[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(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var tR=GS,ZS=YS;const nR=tR,rR=b.forwardRef(({className:t,sideOffset:e=4,...n},r)=>k.jsx(ZS,{ref:r,sideOffset:e,className:us("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]:sli
67de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));rR.displayName=ZS.displayName;var ec=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tc=typeof window>"u"||"Deno"in globalThis;function Ut(){}function sR(t,e){return typeof t=="function"?t(e):t}function iR(t){return typeof t=="number"&&t>=0&&t!==1/0}function oR(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Gg(t,e){return typeof t=="function"?t(e):t}function aR(t,e){return typeof t=="function"?t(e):t}function Jg(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==Op(o,e.options))return!1}else if(!qo(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Yg(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Ko(e.options.mutationKey)!==Ko(i))return!1}else if(!qo(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function Op(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ko)(t)}function Ko(t){return JSON.stringify(t,(e,n)=>Ph(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function qo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!qo(t[n],e[n])):!1}function ex(t,e){if(t===e)return t;const n=Qg(t)&&Qg(e);if(n||Ph(t)&&Ph(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u];(!n&&r.includes(c)||n)&&t[c]===void 0&&e[c]===void 0?(a[c]=void 0,l++):(a[c]=ex(t[c],e[c]),a[c]===t[c]&&t[c]!==void 0&&l++)}return s===o&&l===s?t:a}return e}function Qg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ph(t){if(!Xg(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Xg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Xg(t){return Object.prototype.toString.call(t)==="[object Object]"}function lR(t){return new Promise(e=>{setTimeout(e,t)})}function uR(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?ex(t,e):e}function cR(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function dR(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Lp=Symbol();function tx(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Lp?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Kr,nr,ai,w0,hR=(w0=class extends ec{constructor(){super();ne(this,Kr);ne(this,nr);ne(this,ai);Z(this,ai,e=>{if(!tc&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,nr)||this.setEventListener(A(this,ai))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,nr))==null||e.call(this),Z(this,nr,void 0))}setEventListener(e){var n;Z(this,ai,e),(n=A(this,nr))==null||n.call(this),Z(this,nr,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){A(this,Kr)!==e&&(Z(this,Kr,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof A(this,Kr)=="boolean"?A(this,Kr):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Kr=new WeakMap,nr=new WeakMap,ai=new WeakMap,w0),nx=new hR,li,rr,ui,b0,fR=(b0=class extends ec{constructor(){super();ne(this,li,!0);ne(this,rr);ne(this,ui);Z(this,ui,e=>{if(!tc&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,rr)||this.setEventListener(A(this,ui))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,rr))==null||e.call(this),Z(this,rr,void 0))}setEventListener(e){var n;Z(this,ui,e),(n=A(this,rr))==null||n.call(this),Z(this,rr,e(this.setOnline.bind(this)))}setOnline(e){A(this,li)!==e&&(Z(this,li,e),this.listeners.forEac
vendor: 18,686 bytes, line 67
67h(r=>{r(e)}))}isOnline(){return A(this,li)}},li=new WeakMap,rr=new WeakMap,ui=new WeakMap,b0),hu=new fR;function pR(){let t,e;const n=new Promise((s,i)=>{t=s,e=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}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function mR(t){return Math.min(1e3*2**t,3e4)}function rx(t){return(t??"online")==="online"?hu.isOnline():!0}var sx=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Jc(t){return t instanceof sx}function ix(t){let e=!1,n=0,r=!1,s;const i=pR(),o=m=>{var w;r||(h(new sx(m)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>nx.isFocused()&&(t.networkMode==="always"||hu.isOnline())&&t.canRun(),c=()=>rx(t.networkMode)&&t.canRun(),d=m=>{var w;r||(r=!0,(w=t.onSuccess)==null||w.call(t,m),s==null||s(),i.resolve(m))},h=m=>{var w;r||(r=!0,(w=t.onError)==null||w.call(t,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var w;s=g=>{(r||u())&&m(g)},(w=t.onPause)==null||w.call(t)}).then(()=>{var m;s=void 0,r||(m=t.onContinue)==null||m.call(t)}),p=()=>{if(r)return;let m;const w=n===0?t.initialPromise:void 0;try{m=w??t.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(d).catch(g=>{var E;if(r)return;const y=t.retry??(tc?0:3),v=t.retryDelay??mR,S=typeof v=="function"?v(n,g):v,x=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,g);if(e||!x){h(g);return}n++,(E=t.onFail)==null||E.call(t,n,g),lR(S).then(()=>u()?void 0:f()).then(()=>{e?h(g):p()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?p():f().then(p),i)}}function gR(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Qe=gR(),qr,S0,ox=(S0=class{constructor(){ne(this,qr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),iR(this.gcTime)&&Z(this,qr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(tc?1/0:5*60*1e3))}clearGcTimeout(){A(this,qr)&&(clearTimeout(A(this,qr)),Z(this,qr,void 0))}},qr=new WeakMap,S0),ci,di,Tt,We,ua,Gr,Vt,xn,x0,yR=(x0=class extends ox{constructor(e){super();ne(this,Vt);ne(this,ci);ne(this,di);ne(this,Tt);ne(this,We);ne(this,ua);ne(this,Gr);Z(this,Gr,!1),Z(this,ua,e.defaultOptions),this.setOptions(e.options),this.observers=[],Z(this,Tt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Z(this,ci,wR(this.options)),this.state=e.state??A(this,ci),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=A(this,We))==null?void 0:e.promise}setOptions(e){this.options={...A(this,ua),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Tt).remove(this)}setData(e,n){const r=uR(this.state.data,e,this.options);return Ve(this,Vt,xn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Ve(this,Vt,xn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=A(this,We))==null?void 0:r.promise;return(s=A(this,We))==null||s.cancel(e),n?n.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,ci))}isActive(){return this.observers.some(e=>aR(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Lp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!oR(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,We))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,We))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,Tt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(A(this,We)&&(A(this,Gr)?A(this,We).cancel({revert:!0}):A(this,We).cancelRetry()),this.scheduleGc()),A(this,Tt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ve(this,Vt,xn).call(this,{type:"invalidate"})}fetch(e,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,We))return A(this,We).continueRetry(),A(this,We).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(Z(this,Gr,!0),r.signal)})},i=()=>{const d=tx(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return s(h),Z(this,Gr,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),Z(this,di,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&Ve(this,Vt,xn).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const a=d=>{var h,f,p,m;Jc(d)&&d.silent||Ve(this,Vt,xn).call(this,{type:"error",error:d}),Jc(d)||((f=(h=A(this,Tt).config).onError)==null||f.call(h,d,this),(m=(p=A(this,Tt).config).onSettled)==null||m.call(p,this.state.data,d,this)),this.scheduleGc()};return Z(this,We,ix({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,f,p,m;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){a(w);return}(f=(h=A(this,Tt).config).onSuccess)==null||f.call(h,d,this),(m=(p=A(this,Tt).config).onSettled)==null||m.call(p,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{Ve(this,Vt,xn).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Ve(this,Vt,xn).call(this,{type:"pause"})},onContinue:()=>{Ve(this,Vt,xn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),A(this,We).start()}},ci=new WeakMap,di=new WeakMap,Tt=new WeakMap,We=new WeakMap,ua=new WeakMap,Gr=new WeakMap,Vt=new WeakSet,xn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vR(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return Jc(s)&&s.revert&&A(this,di)?{...A(this,di),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,...e.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,Tt).notify({query:this,type:"updated",action:e})})},x0);function vR(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rx(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function wR(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 an,E0,bR=(E0=class extends ec{constructor(e={}){super();ne(this,an);this.config=e,Z(this,an,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??Op(s,n);let o=this.get(i);return o||(o=new yR({cache:this,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){A(this,an).has(e.queryHash)||(A(this,an).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=A(this,an).get(e.queryHash);n&&(e.destroy(),n===e&&A(this,an).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Qe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,an).get(e)}getAll(){return[...A(this,an).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Jg(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Jg(e,r)):n}notify(e){Qe.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},an=new WeakMap,E0),ln,Je,Jr,un,qn,T0,SR=(T0=class extends ox{constructor(e){super();ne(this,un);ne(this,ln);ne(this,Je);ne(this,Jr);this.mutationId=e.mutationId,Z(this,Je,e.mutationCache),Z(this,ln,[]),this.state=e.state||xR(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,ln).includes(e)||(A(this,ln).push(e),this.clearGcTimeout(),A(this,Je).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Z(this,ln,A(this,ln).filter(n=>n!==e)),this.scheduleGc(),A(this,Je).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,ln).length||(this.state.status==="pending"?this.scheduleGc():A(this,Je).remove(this))}continue(){var e;return((e=A(this,Jr))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,i,o,a,l,u,c,d,h,f,p,m,w,g,y,v,S,x,E,T;Z(this,Jr,ix({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(C,P)=>{Ve(this,un,qn).call(this,{type:"failed",failureCount:C,error:P})},onPause:()=>{Ve(this,un,qn).call(this,{type:"pause"})},onContinue:()=>{Ve(this,un,qn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,Je).canRun(this)}));const n=this.state.status==="pending",r=!A(this,Jr).canStart();try{if(!n){Ve(this,un,qn).call(this,{type:"pending",variables:e,isPaused:r}),await((i=(s=A(this,Je).config).onMutate)==null?void 0:i.call(s,e,this));const P=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));P!==this.state.context&&Ve(this,un,qn).call(this,{type:"pending",context:P,variables:e,isPaused:r})}const C=await A(this,Jr).start();return await((u=(l=A(this,Je).config).onSuccess)==null?void 0:u.call(l,C,e,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,C,e,this.state.context)),await((f=(h=A(this,Je).config).onSettled)==null?void 0:f.call(h,C,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,C,null,e,this.state.context)),Ve(this,un,qn).call(this,{type:"success",data:C}),C}catch(C){try{throw await((g=(w=A(this,Je).config).onError)==null?void 0:g.call(w,C,e,this.state.context,this)),await((v=(y=this.options).onError)==null?void 0:v.call(y,C,e,this.state.context)),await((x=(S=A(this,Je).config).onSettled)==null?void 0:x.call(S,void 0,C,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,C,e,this.state.context)),C}finally{Ve(this,un,qn).call(this,{type:"error",error:C})}}finally{A(this,Je).runNext(this)}}},ln=new WeakMap,Je=new WeakMap,Jr=new WeakMap,un=new WeakSet,qn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{A(this,ln).forEach(r=>{r.onMutationUpdate(e)}),A(this,Je).notify({mutation:this,type:"updated",action:e})})},T0);function xR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ht,ca,C0,ER=(C0=class extends ec{constructor(e={}){super();ne(this,ht);ne(this,ca);this.config=e,Z(this,ht,new Map),Z(this,ca,Date.now())}build(e,n,r){const s=new SR({mutationCache:this,mutationId:++Oa(this,ca)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){const n=Za(e),r=A(this,ht).get(n)??[];r.push(e),A(this,ht).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=Za(e);if(A(this,ht).has(n)){const s=(r=A(this,ht).get(n))==null?void 0:r.filter(i=>i!==e);s&&(s.length===0?A(this,ht).delete(n):A(this,ht).set(n,s))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=A(this,ht).get(Za(e)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=A(this,ht).get(Za(e)))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Qe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...A(this,ht).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Yg(n,r))}findAll(e={}){return this.getAll().filter(n=>Yg(e,n))}notify(e){Qe.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ut))))}},ht=new WeakMap,ca=new WeakMap,C0);function Za(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function Zg(t){return{onFetch:(e,n)=>{var c,d,h,f,p;const r=e.options,s=(h=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((f=e.state.data)==null?void 0:f.pages)||[],o=((p=e.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},g=tx(e.options,e.fetchOptions),y=async(v,S,x)=>{if(m)return Promise.reject();if(S==null&&v.pages.length)return Promise.resolve(v);const E={queryKey:e.queryKey,pageParam:S,direction:x?"backward":"forward",meta:e.options.meta};w(E);const T=await g(E),{maxPages:C}=e.options,P=x?dR:cR;return{pages:P(v.pages,T,C),pageParams:P(v.pageParams,S,C)}};if(s&&i.length){const v=s==="backward",S=v?TR:ey,x={pages:i,pageParams:o},E=S(r,x);a=await y(x,E,v)}else{const v=t??i.length;do{const S=l===0?o[0]??r.initialPageParam:ey(r,a);if(l>0&&S==null)break;a=await y(a,S),l++}while(l<v)}return a};e.options.persister?e.fetchFn=()=>{var m,w;return(w=(m=e.options).persister)==null?void 0:w.call(m,u,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function ey(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function TR(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var be,sr,ir,hi,fi,or,pi,mi,_0,CR=(_0=class{constructor(t={}){ne(this,be);ne(this,sr);ne(this,ir);ne(this,hi);ne(this,fi);ne(this,or);ne(this,pi);ne(this,mi);Z(this,be,t.queryCache||new bR),Z(this,sr,t.mutationCache||new ER),Z(this,ir,t.defaultOptions||{}),Z(this,hi,new Map),Z(this,fi,new Map),Z(this,or,0)}mount(){Oa(this,or)._++,A(this,or)===1&&(Z(this,pi,nx.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,be).onFocus())})),Z(this,mi,hu.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,be).onOnline())})))}unmount(){var t,e;Oa(this,or)._--,A(this,or)===0&&((t=A(this,pi))==null||t.call(this),Z(this,pi,void 0),(e=A(this,mi))==null||e.call(this),Z(this,mi,void 0))}isFetching(t){return A(this,be).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,sr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,be).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=A(this,be).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Gg(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return A(this,be).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=A(this,be).get(r.queryHash),i=s==null?void 0:s.state.data,o=sR(e,i);if(o!==void 0)return A(this,be).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Qe.batch(()=>A(this,be).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,be).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=A(this,be);Qe.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=A(this,be),r={type:"active",...t};return Qe.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Qe.batch(()=>A(this,be).findAll(t).map(s=>s.cancel(n)));
67return Promise.all(r).then(Ut).catch(Ut)}invalidateQueries(t={},e={}){return Qe.batch(()=>{if(A(this,be).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Qe.batch(()=>A(this,be).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ut)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ut)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=A(this,be).build(this,e);return n.isStaleByTime(Gg(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ut).catch(Ut)}fetchInfiniteQuery(t){return t.behavior=Zg(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ut).catch(Ut)}ensureInfiniteQueryData(t){return t.behavior=Zg(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return hu.isOnline()?A(this,sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,be)}getMutationCache(){return A(this,sr)}getDefaultOptions(){return A(this,ir)}setDefaultOptions(t){Z(this,ir,t)}setQueryDefaults(t,e){A(this,hi).set(Ko(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,hi).values()];let n={};return e.forEach(r=>{qo(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){A(this,fi).set(Ko(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,fi).values()];let n={};return e.forEach(r=>{qo(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,ir).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Op(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Lp&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,ir).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,be).clear(),A(this,sr).clear()}},be=new WeakMap,sr=new WeakMap,ir=new WeakMap,hi=new WeakMap,fi=new WeakMap,or=new WeakMap,pi=new WeakMap,mi=new WeakMap,_0),_R=b.createContext(void 0),ty=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),k.jsx(_R.Provider,{value:t,children:e}));/**
68 * @remix-run/router v1.20.0
69 *
70 * Copyright (c) Remix Software Inc.
71 *
72 * This source code is licensed under the MIT license found in the
73 * LICENSE.md file in the root directory of this source tree.
74 *
75 * @license MIT
76 */function Go(){return Go=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Go.apply(this,arguments)}var ur;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(ur||(ur={}));const ny="popstate";function kR(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return Rh("",{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:fu(s)}return PR(e,n,null,t)}function ke(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ax(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function AR(){return Math.random().toString(36).substr(2,8)}function ry(t,e){return{usr:t.state,key:t.key,idx:e}}function Rh(t,e,n,r){return n===void 0&&(n=null),Go({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ii(e):e,{state:n,key:e&&e.key||r||AR()})}function fu(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ii(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function PR(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=ur.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Go({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=ur.Pop;let w=c(),g=w==null?null:w-u;u=w,l&&l({action:a,location:m.location,delta:g})}function h(w,g){a=ur.Push;let y=Rh(m.location,w,g);u=c()+1;let v=ry(y,u),S=m.createHref(y);try{o.pushState(v,"",S)}
vendor: 3,324 bytes, line 76
76catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;s.location.assign(S)}i&&l&&l({action:a,location:m.location,delta:1})}function f(w,g){a=ur.Replace;let y=Rh(m.location,w,g);u=c();let v=ry(y,u),S=m.createHref(y);o.replaceState(v,"",S),i&&l&&l({action:a,location:m.location,delta:0})}function p(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof w=="string"?w:fu(w);return y=y.replace(/ $/,"%20"),ke(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let m={get action(){return a},get location(){return t(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(ny,d),l=w,()=>{s.removeEventListener(ny,d),l=null}},createHref(w){return e(s,w)},createURL:p,encodeLocation(w){let g=p(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:f,go(w){return o.go(w)}};return m}var sy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(sy||(sy={}));function RR(t,e,n){return n===void 0&&(n="/"),OR(t,e,n,!1)}function OR(t,e,n,r){let s=typeof e=="string"?Ii(e):e,i=Ip(s.pathname||"/",n);if(i==null)return null;let o=lx(t);LR(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=zR(i);a=FR(o[l],u,r)}return a}function lx(t,e,n,r){e===void 0&&(e=[]),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("/")&&(ke(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 u=wr([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(ke(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),lx(i.children,e,c,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:BR(u,i.index),routesMeta:c})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of ux(i.path))s(i,o,l)}),e}function ux(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=ux(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function LR(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:UR(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IR=/^:[\w-]+$/,NR=3,jR=2,DR=1,MR=10,$R=-2,iy=t=>t==="*";function BR(t,e){let n=t.split("/"),r=n.length;return n.some(iy)&&(r+=$R),e&&(r+=jR),n.filter(s=>!iy(s)).reduce((s,i)=>s+(IR.test(i)?NR:i===""?DR:MR),r)}function UR(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function FR(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=oy({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=oy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 13,744 bytes, lines 76-94
76Object.assign(s,d.params),o.push({params:s,pathname:wr([i,d.pathname]),pathnameBase:qR(wr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=wr([i,d.pathnameBase]))}return o}function oy(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=VR(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:h,isOptional:f}=c;if(h==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[d];return f&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function VR(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),ax(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function zR(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ax(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ip(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function HR(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Ii(t):t;return{pathname:n?n.startsWith("/")?n:WR(n,e):e,search:GR(r),hash:JR(s)}}function WR(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Yc(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function KR(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function cx(t,e){let n=KR(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function dx(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Ii(t):(s=Go({},t),ke(!s.pathname||!s.pathname.includes("?"),Yc("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),Yc("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),Yc("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?e[d]:"/"}let l=HR(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const wr=t=>t.join("/").replace(/\/\/+/g,"/"),qR=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),GR=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,JR=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function YR(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const hx=["post","put","patch","delete"];new Set(hx);const QR=["get",...hx];new Set(QR);/**
77 * React Router v6.27.0
78 *
79 * Copyright (c) Remix Software Inc.
80 *
81 * This source code is licensed under the MIT license found in the
82 * LICENSE.md file in the root directory of this source tree.
83 *
84 * @license MIT
85 */function Jo(){return Jo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jo.apply(this,arguments)}const Np=b.createContext(null),XR=b.createContext(null),cs=b.createContext(null),nc=b.createContext(null),ds=b.createContext({outlet:null,matches:[],isDataRoute:!1}),fx=b.createContext(null);function ZR(t,e){let{relative:n}=e===void 0?{}:e;ba()||ke(!1);let{basename:r,navigator:s}=b.useContext(cs),{hash:i,pathname:o,search:a}=mx(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:wr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function ba(){return b.useContext(nc)!=null}function Sa(){return ba()||ke(!1),b.useContext(nc).location}function px(t){b.useContext(cs).static||b.useLayoutEffect(t)}function eO(){let{isDataRoute:t}=b.useContext(ds);return t?fO():tO()}function tO(){ba()||ke(!1);let t=b.useContext(Np),{basename:e,future:n,navigator:r}=b.useContext(cs),{matches:s}=b.useContext(ds),{pathname:i}=Sa(),o=JSON.stringify(cx(s,n.v7_relativeSplatPath)),a=b.useRef(!1);return px(()=>{a.current=!0}),b.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=dx(u,JSON.parse(o),i,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:wr([e,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[e,r,o,i,t])}function mx(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=b.useContext(cs),{matches:s}=b.useContext(ds),{pathname:i}=Sa(),o=JSON.stringify(cx(s,r.v7_relativeSplatPath));return b.useMemo(()=>dx(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function nO(t,e){return rO(t,e)}function rO(t,e,n,r){ba()||ke(!1);let{navigator:s}=b.useContext(cs),{matches:i}=b.useContext(ds),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Sa(),c;if(e){var d;let w=typeof e=="string"?Ii(e):e;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||ke(!1),c=w}else c=u;let h=c.pathname||"/",f=h;if(l!=="/"){let w=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(w.length).join("/")}let p=RR(t,{pathname:f}),m=lO(p&&p.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:wr([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:wr([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return e&&m?b.createElement(nc.Provider,{value:{location:Jo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ur.Pop}},m):m}function sO(){let t=hO(),e=YR(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:s},n):null,null)}const iO=b.createElement(sO,null);class oO extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?b.createElement(ds.Provider,{value:this.props.routeContext},b.createElement(fx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function aO(t){let{routeContext:e,match:n,children:r}=t,s=b.useContext(Np);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(ds.Provider,{value:e},r)}function lO(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||ke(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:h,errors:f}=n,p=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||p){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,h)=>{let f,p=!1,m=null,w=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||iO,l&&(u<0&&h===0?(p=!0,w=null):u===h&&(p=!0,w=d.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,h+1)),y=()=>{let v;return f?v=m:p?v=w:d.route.Component?v=b.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,b.createElement(aO,{match:d,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?b.createElement(oO,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var gx=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(gx||{}),pu=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(pu||{});function uO(t){let e=b.useContext(Np);return e||ke(!1),e}function cO(t){let e=b.useContext(XR);return e||ke(!1),e}function dO(t){let e=b.useContext(ds);return e||ke(!1),e}function yx(t){let e=dO(),n=e.matches[e.matches.length-1];return n.route.id||ke(!1),n.route.id}function hO(){var t;let e=b.useContext(fx),n=cO(pu.UseRouteError),r=yx(pu.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function fO(){let{router:t}=uO(gx.UseNavigateStable),e=yx(pu.UseNavigateStable),n=b.useRef(!1);return px(()=>{n.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Jo({fromRouteId:e},i)))},[t,e])}function Cs(t){ke(!1)}function pO(t){let{basename:e="/",children:n=null,location:r,navigationType:s=ur.Pop,navigator:i,static:o=!1,future:a}=t;ba()&&ke(!1);let l=e.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Jo({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Ii(r));let{pathname:c="/",search:d="",hash:h="",state:f=null,key:p="default"}=r,m=b.useMemo(()=>{let w=Ip(c,l);return w==null?null:{location:{pathname:w,search:d,hash:h,state:f,key:p},navigationType:s}},[l,c,d,h,f,p,s]);return m==null?null:b.createElement(cs.Provider,{value:u},b.createElement(nc.Provider,{children:n,value:m}))}function mO(t){let{children:e,location:n}=t;return nO(Oh(e),n)}new Promise(()=>{});function Oh(t,e){e===void 0&&(e=[]);let n=[];return b.Children.forEach(t,(r,s)=>{if(!b.isValidElement(r))return;let i=[...e,s];if(r.type===b.Fragment){n.push.apply(n,Oh(r.props.children,i));return}r.type!==Cs&&ke(!1),!r.props.index||!r.props.children||ke(!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=Oh(r.props.children,i)),n.push(o)}),n}/**
86 * React Router DOM v6.27.0
87 *
88 * Copyright (c) Remix Software Inc.
89 *
90 * This source code is licensed under the MIT license found in the
91 * LICENSE.md file in the root directory of this source tree.
92 *
93 * @license MIT
94 */function Lh(){return Lh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lh.apply(this,arguments)}function gO(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function yO(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function vO(t,e){return t.button===0&&(!e||e==="_self")&&!yO(t)}const wO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],bO="6";try{window.__reactRouterVersion=bO}catch{}const SO="startTransition",ay=s1[SO];function xO(t){let{basename:e,children:n,future:r,window:s}=t,i=b.useRef();i.current==null&&(i.current=kR({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=b.useCallback(d=>{u&&ay?ay(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.createElement(pO,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const EO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",TO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,HU=b.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}
94=e,h=gO(e,wO),{basename:f}=b.useContext(cs),p,m=!1;if(typeof u=="string"&&TO.test(u)&&(p=u,EO))try{let v=new URL(window.location.href),S=u.startsWith("//")?new URL(v.protocol+u):new URL(u),x=Ip(S.pathname,f);S.origin===v.origin&&x!=null?u=x+S.search+S.hash:m=!0}catch{}let w=ZR(u,{relative:s}),g=CO(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function y(v){r&&r(v),v.defaultPrevented||g(v)}return b.createElement("a",Lh({},h,{href:p||w,onClick:m||i?r:y,ref:n,target:l}))});var ly;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(ly||(ly={}));var uy;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(uy||(uy={}));function CO(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=eO(),u=Sa(),c=mx(t,{relative:o});return b.useCallback(d=>{if(vO(d,n)){d.preventDefault();let h=r!==void 0?r:fu(u)===fu(c);l(t,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,t,i,o,a])}function _O(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}const kO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class jp extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class AO extends jp{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class cy extends jp{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class dy extends jp{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Ih;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Ih||(Ih={}));class PO{constructor(e,{headers:n={},customFetch:r,region:s=Ih.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=kO(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return _O(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=r;let h={},{region:f}=r;f||(f=this.region);const p=new URL(`${this.url}/${n}`);f&&f!=="any"&&(h["x-region"]=f,p.searchParams.set("forceFunctionRegion",f));let m;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(h["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(h["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let w=c;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),c?(w=o.signal,c.addEventListener("abort",()=>o.abort())):w=o.signal);const g=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:m,signal:w}).catch(x=>{throw new AO(x)}),y=g.headers.get("x-relay-error");if(y&&y==="true")throw new cy(g);if(!g.ok)throw new dy(g);let v=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return v==="application/json"?S=yield g.json():v==="application/octet-stream"||v==="application/pdf"?S=yield g.blob():v==="text/event-stream"?S=g:v==="multipart/form-data"?S=yield g.formData():S=yield g.text(),{data:S,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof dy||a instanceof cy?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const vx=3,hy=t=>Math.min(1e3*2**t,3e4),RO=[520,503],wx=["GET","HEAD","OPTIONS"];
94var OO=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function fy(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t);function s(){clearTimeout(r),n()}e==null||e.addEventListener("abort",s)})}function LO(t,e,n,r){return!(!r||n>=vx||!wx.includes(t)||!RO.includes(e))}var IO=class{constructor(t){var e,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const u=new Headers(n.headers);o>0&&u.set("X-Retry-Count",String(o));let c;try{c=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(d,h)=>typeof h=="bigint"?h.toString():h),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!wx.includes(n.method))throw d;if(n.retryEnabled&&o<vx){const h=hy(o);o++,await fy(h,n.signal);continue}throw d}if(LO(n.method,c.status,o,n.retryEnabled)){var a,l;const d=(a=(l=c.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,h=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:hy(o);await c.text(),o++,await fy(h,n.signal);continue}return await n.processResponse(c)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",c="";const d=o==null?void 0:o.cause;if(d){var h,f,p,m;const y=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",v=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(p=o==null?void 0:o.name)!==null&&p!==void 0?p:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
95
96Caused by: ${(m=d==null?void 0:d.name)!==null&&m!==void 0?m:"Error"}: ${y}`,v&&(l+=` (${v})`),d!=null&&d.stack&&(l+=`
97${d.stack}`)}else{var w;l=(w=o==null?void 0:o.stack)!==null&&w!==void 0?w:""}const g=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${g} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(u+=`. Your request URL is ${g} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}}
97)),i.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var u;const h=await t.text();h===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((u=e.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=h:r=JSON.parse(h))}const c=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");c&&d&&d.length>1&&(s=parseInt(d[1])),e.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const c=await t.text();try{n=JSON.parse(c),Array.isArray(n)&&t.status===404&&(r=[],n=null,i=200,o="OK")}catch{t.status===404&&c===""?(i=204,o="No Content"):n={message:c}}if(n&&e.shouldThrowOnError)throw new OO(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},NO=class extends IO{select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!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},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{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,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"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(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const py=new RegExp("[,()]");var _s=class extends NO{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&py.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&py.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config: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(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
97n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},jO=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new _s({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),n||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
970){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new _s({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,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`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new _s({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new _s({method:r,url:s,headers:i,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new _s({method:n,url:r,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Yo(t){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yo(t)}function DO(t,e){if(Yo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Yo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function MO(t){var e=DO(t,"string");return Yo(e)=="symbol"?e:e+""}function $O(t,e,n){return(e=MO(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function my(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function el(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?my(Object(n),!0).forEach(function(r){$O(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):my(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var BO=class bx{constructor(e,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,c)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),i),f=c==null?void 0:c.signal;if(f){if(f.aborted)return clearTimeout(h),l(u,c);const p=()=>{clearTimeout(h),d.abort()};return f.addEventListener("abort",p,{once:!0}),l(u,el(el({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",p)})}return l(u,el(el({},c),{},{signal:d.signal})).finally(()=>clearTimeout(h))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new jO(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new bx(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let u;const c=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(c)),d=r&&Object.values(n).some(c);d?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,p])=>p!==void 0).map(([f,p])=>[f,Array.isArray(p)?`{${p.join(",")}}`:`${p}
97`]).forEach(([f,p])=>{l.searchParams.append(f,p)})):(a="POST",u=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 _s({method:a,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class UO{constructor(){}static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const 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:
98import ws from "ws"
99new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=`
100
101Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const FO="2.104.0",VO=`realtime-js/${FO}`,zO="1.0.0",Sx="2.0.0",HO=Sx,WO=1e4,KO=100,er={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},xx={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Nh={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class qO{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var n,r;const s=(r=(n=e.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(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,n,r){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",u=e.payload.event,c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+d.length,f=new ArrayBuffer(this.HEADER_LENGTH+h);let p=new DataView(f),m=0;p.setUint8(m++,this.KINDS.userBroadcastPush),p.setUint8(m++,l.length),p.setUint8(m++,a.length),p.setUint8(m++,o.length),p.setUint8(m++,u.length),p.setUint8(m++,d.length),p.setUint8(m++,n),Array.from(l,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(u,g=>p.setUint8(m++,g.charCodeAt(0))),Array.from(d,g=>p.setUint8(m++,g.charCodeAt(0)));var w=new Uint8Array(f.byteLength+r.byteLength);return w.set(new Uint8Array(f),0),w.set(new Uint8Array(r),f.byteLength),w.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[s,i,o,a,l]=r;
101return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,s)}}_decodeUserBroadcast(e,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 u=r.decode(e.slice(l,l+s));l=l+s;const c=r.decode(e.slice(l,l+i));l=l+i;const d=r.decode(e.slice(l,l+o));l=l+o;const h=e.slice(l,e.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,p={type:this.BROADCAST_EVENT,event:c,payload:f};return o>0&&(p.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var ae;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(ae||(ae={}));const gy=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=GO(o,t,e,s),i),{}):{}},GO=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?Ex(i,o):jh(o)},Ex=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return XO(e,n)}switch(t){case ae.bool:return JO(e);case ae.float4:case ae.float8:case ae.int2:case ae.int4:case ae.int8:case ae.numeric:case ae.oid:return YO(e);case ae.json:case ae.jsonb:return QO(e);case ae.timestamp:return ZO(e);case ae.abstime:case ae.date:case ae.daterange:case ae.int4range:case ae.int8range:case ae.money:case ae.reltime:case ae.text:case ae.time:case ae.timestamptz:case ae.timetz:case ae.tsrange:case ae.tstzrange:return jh(e);default:return jh(e)}},jh=t=>t,JO=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},YO=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},QO=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},XO=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Ex(e,a))}return t},ZO=t=>typeof t=="string"?t.replace(" ","T"):t,Tx=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var vo=t=>typeof t=="function"?t:function(){return t},eL=typeof self<"u"?self:null,ks=typeof window<"u"?window:null,on=eL||ks||globalThis,tL="2.0.0",nL=1e4,rL=1e3,cn={connecting:0,open:1,closing:2,closed:3},st={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Tn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Dh={longpoll:"longpoll",websocket:"websocket"},sL={complete:4},Mh="base64url.bearer.phx.",tl=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 21,093 bytes, lines 101-102
101matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Cx=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},iL=class{constructor(t,e,n){this.state=st.closed,this.topic=t,this.params=vo(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new tl(this,Tn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Cx(()=>{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=st.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=st.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=st.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=st.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 tl(this,Tn.leave,vo({}),this.timeout).send(),this.state=st.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Tn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=st.closed,this.bindings=[]}onClose(t){this.on(Tn.close,t)}onError(t){return this.on(Tn.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new tl(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=st.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Tn.close,"leave")},n=new tl(this,Tn.leave,vo({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=st.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let s=this.onMessage(t,e,n,r);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===st.closed}isErrored(){return this.state===st.errored}isJoined(){return this.state===st.joined}isJoining(){return this.state===st.joining}isLeaving(){return this.state===st.leaving}},mu=class{static request(t,e,n,r,s,i,o){if(on.XDomainRequest){let a=new on.XDomainRequest;return this.xdomainRequest(a,t,e,r,s,i,o)}else if(on.XMLHttpRequest){let a=new on.XMLHttpRequest;return this.xhrRequest(a,t,e,n,r,s,i,o)}else{if(on.fetch&&on.AbortController)return this.fetchRequest(t,e,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,s,i,o){let a={method:t,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),on.fetch(e,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,n,r,s,i,o){return t.timeout=s,t.open(e,n),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,s,i,o,a){t.open(e,n,!0),t.timeout=i;for(let[l,u]of Object.entries(r))t.setRequestHeader(l,u);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===sL.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=e?`${e}[${r}]`:r,i=t[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},oL=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let s=0;s<r;s++)e+=String.fromCharCode(n[s]);return btoa(e)},ys=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Mh)&&(this.authToken=atob(e[1].slice(Mh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=cn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Dh.websocket),"$1/"+Dh.longpoll)}endpointURL(){return mu.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=cn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===cn.open||this.readyState===cn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:s}=e;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=cn.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(t){typeof t!="string"&&(t=oL(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
102`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,n){for(let s of this.reqs)s.abort();this.readyState=cn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=mu.request(t,this.endpointURL(),e,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},aL=class so{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=so.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=so.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=so.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return so.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,s){let i=this.clone(e),o={},a={};return this.map(i,(l,u)=>{n[l]||(a[l]=u)}),this.map(n,(l,u)=>{let c=i[l];if(c){let d=u.metas.map(m=>m.phx_ref),h=c.metas.map(m=>m.phx_ref),f=u.metas.filter(m=>h.indexOf(m.phx_ref)<0),p=c.metas.filter(m=>d.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=u,o[l].metas=f),p.length>0&&(a[l]=this.clone(c),a[l].metas=p)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(e,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=e[a];if(e[a]=this.clone(l),u){let c=e[a].metas.map(h=>h.phx_ref),d=u.metas.filter(h=>c.indexOf(h.phx_ref)<0);e[a].metas.unshift(...d)}r(a,u,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete e[a]}),e}static list(e,n){return n||(n=function(r,s){return s}),this.map(e,(r,s)=>n(r,s))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static clone(e){return JSON.parse(JSON.stringify(e))}},nl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,s,i,o]=JSON.parse(t);return e({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:s,payload:i}=t,o=this.META_LENGTH+e.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,e.length),l.setUint8(u++,n.length),l.setUint8(u++,s.length),l.setUint8(u++,r.length),Array.from(e,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+i.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(i),a.byteLength),c.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(t.slice(o,o+r));o=o+r;let l=n.decode(t.slice(o,o+s));o=o+s;let u=n.decode(t.slice(o,o+i));o=o+i;let c=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(a,a+r));a=a+r;let u=n.decode(t.slice(a,a+s));a=a+s;let c=n.decode(t.slice(a,a+i));a=a+i;let d=n.decode(t.slice(a,a+o));a=a+o;let h=t.slice(a,t.byteLength),f={status:d,response:h};return{join_ref:l,ref:u,topic:c,event:Tn.reply,payload:f}},decodeBroadcast(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(t.slice(i,i+r));i=i+r;let a=n.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},lL=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||nL,this.transport=e.transport||on.WebSocket||ys,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||on&&on.sessionStorage,this.establishedConnections=0,this.defaultEncoder=nl.encode.bind(nl),this.defaultDecoder=nl.decode.bind(nl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ys?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ks&&ks.addEventListener&&(ks.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ks.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),ks.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>e.rejoinAfterMs?e.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>e.reconnectAfterMs?e.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=vo(e.params||{}),this.endPoint=`${t}/${Dh.websocket}`,this.vsn=e.vsn||tL,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Cx(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return ys}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=mu.appendParams(mu.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=vo(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ys?this.connectWithFallback(ys,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(s=>{s.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case ys:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Mh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),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(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),rL,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,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),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===cn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError()}
102triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Tn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case cn.connecting:return"connecting";case cn.open:return"open";case cn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new iL(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:s,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${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",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class wo{constructor(e,n){const r=cL(n);this.presence=new aL(e.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=wo.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=wo.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return wo.transformState(this.presence.state)}static transformState(e){return e=uL(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return n[r]=Al(s),n},{})}static onJoinPayload(e,n,r){const s=yy(n),i=Al(r);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,n,r){const s=yy(n),i=Al(r);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function Al(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function uL(t){return JSON.parse(JSON.stringify(t))}function cL(t){return(t==null?void 0:t.events)&&{events:t.events}}function yy(t){return t!=null&&t.metas?Al(t):[]}var vy;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(vy||(vy={}));class dL{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new wo(this.channel.channelAdapter,n)}}class hL{constructor(e,n,r){const s=fL(r);this.channel=e.getSocket().channel(n,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let s;try{s=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>KO){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===er.joined}isJoined(){return this.state===er.joined}isJoining(){return this.state===er.joining}isClosed(){return this.state===er.closed}isLeaving(){return this.state===er.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function fL(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var wy;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
102E="DELETE"})(wy||(wy={}));var zs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(zs||(zs={}));var Cn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Cn||(Cn={}));class bo{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var s,i;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new hL(this.socket.socketAdapter,e,this.params),this.presence=new dL(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Tx(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,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,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[zs.PRESENCE]&&this.bindings[zs.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:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(f=>{e==null||e(Cn.CHANNEL_ERROR,f)}),this._onClose(()=>e==null?void 0:e(Cn.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){e==null||e(Cn.SUBSCRIBED);return}this._updatePostgresBindings(f,e)}).receive("error",f=>{this.state=er.errored,e==null||e(Cn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(Cn.TIMED_OUT)})}return this}_updatePostgresBindings(e,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:u,schema:c,table:d,filter:h}}=l,f=e&&e[a];if(f&&f.event===u&&bo.isFilterValueEqual(f.schema,c)&&bo.isFilterValueEqual(f.table,d)&&bo.isFilterValueEqual(f.filter,h))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=er.errored,n==null||n(Cn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=er.errored&&n&&n(Cn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===zs.PRESENCE||e===zs.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload: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;
102try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(e,n={}){var r,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(e,n,r){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,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(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var s,i,o,a,l,u,c;const d=e.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===e.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in h){const f=h.id,p=(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))&&(p==="*"||(p==null?void 0:p.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(u=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return f==="*"||f===((c=n==null?void 0:n.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===d})}_notThisChannelEvent(e,n){const{close:r,error:s,leave:i,join:o}=xx;return n&&[r,s,i,o].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=gy(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=gy(e.columns,e.old_record)),n}}class pL{constructor(e,n){this.socket=new lL(e,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(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Nh.connecting}isDisconnecting(){return this.socket.connectionState()==Nh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const mL={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},gL=[1e3,2e3,5e3,1e4],yL=1e4,vL=`
103  addEventListener("message", (e) => {
104    if (e.data.event === "start") {
105      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
106    }
107  });`;class wL{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
107,this.ref=0,this.serializer=new qO,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 pL(e,s),this.httpEndpoint=Tx(e),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(e){const n=e.message;throw n.includes("Node.js")?new Error(`${n}
108
109To use Realtime in Node.js, you need to provide a WebSocket implementation:
110
111Option 1: Use Node.js 22+ which has native WebSocket support
112Option 2: Install and provide the "ws" package:
113
114  npm install ws
115
116  import ws from "ws"
117  const client = new RealtimeClient(url, {
118    ...options,
119    transport: ws
120  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(e);return this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}connectionState(){return this.socketAdapter.connectionState()||Nh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new bo(`realtime:${e}`,n,this);return this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic)}async _performAuth(e=null){let n,r=!1;if(e)n=e,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:VO};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(xx.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,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(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n=="sent"&&this._setAuthSafely(),e&&e(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=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(e){let n;if(e)n=e;else{const r=new Blob([vL],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,s,i,o,a,l,u,c;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const d={};
120d.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:WO,d.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:mL.HEARTBEAT_INTERVAL,d.transport=(o=e==null?void 0:e.transport)!==null&&o!==void 0?o:UO.getWebSocketConstructor(),d.params=e==null?void 0:e.params,d.logger=e==null?void 0:e.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),d.reconnectAfterMs=(a=e==null?void 0:e.reconnectAfterMs)!==null&&a!==void 0?a:m=>gL[m-1]||yL;let h,f;const p=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:HO;switch(p){case zO:h=(m,w)=>w(JSON.stringify(m)),f=(m,w)=>w(JSON.parse(m));break;case Sx: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=p,d.encode=(u=e==null?void 0:e.encode)!==null&&u!==void 0?u:h,d.decode=(c=e==null?void 0:e.decode)!==null&&c!==void 0?c:f,d.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.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=e==null?void 0:e.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Qo=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function bL(t,e,n){const r=new URL(e,t);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function SL(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function xL(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=bL(t.baseUrl,r,s),l=await SL(t.auth),u=await e(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),h=d&&c?JSON.parse(c):c;if(!u.ok){const f=d?h:void 0,p=f==null?void 0:f.error;throw new Qo((p==null?void 0:p.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:p==null?void 0:p.type,icebergCode:p==null?void 0:p.code,details:f})}return{status:u.status,headers:u.headers,data:h}}}}function rl(t){return t.join("�")}var EL=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:rl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${rl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${rl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${rl(t.namespace)}`}),!0}catch(e){if(e instanceof Qo&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof Qo&&n.status===409)return;throw n}}};function vs(t){return t.join("�")}var TL=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${vs(t.namespace)}
120/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${vs(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof Qo&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof Qo&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},CL=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=xL({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new EL(this.client,e),this.tableOps=new TL(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Xo(t){"@babel/helpers - typeof";return Xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xo(t)}function _L(t,e){if(Xo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Xo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kL(t){var e=_L(t,"string");return Xo(e)=="symbol"?e:e+""}function AL(t,e,n){return(e=kL(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function by(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?by(Object(n),!0).forEach(function(r){AL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):by(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rc=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function sc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var $h=class extends rc{constructor(t,e,n,r="storage"){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return q({},super.toJSON())}},_x=class extends rc{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Dp(t,e,n){const r=q({},t),s=e.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function PL(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const RL=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),OL=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);
120return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Bh=t=>{if(Array.isArray(t))return t.map(n=>Bh(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Bh(r)}),e},LL=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Sy=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},IL=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&typeof t.json=="function"){const s=t;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+"";e(new $h(Sy(o),i,a,r))}).catch(()=>{const o=i+"";e(new $h(s.statusText||`HTTP ${i} error`,i,o,r))})}else e(new _x(Sy(t),t,r))},NL=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return q(q({},s),n);if(OL(r)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=Dp(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return e!=null&&e.duplex&&(s.duplex=e.duplex),q(q({},s),n)};async function Ji(t,e,n,r,s,i,o){return new Promise((a,l)=>{t(n,NL(e,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>IL(u,l,r,o))})}function kx(t="storage"){return{get:async(e,n,r,s)=>Ji(e,"GET",n,r,s,void 0,t),post:async(e,n,r,s,i)=>Ji(e,"POST",n,s,i,r,t),put:async(e,n,r,s,i)=>Ji(e,"PUT",n,s,i,r,t),head:async(e,n,r,s)=>Ji(e,"HEAD",n,q(q({},r),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,n,r,s,i)=>Ji(e,"DELETE",n,s,i,r,t)}}const jL=kx("storage"),{get:Zo,post:Ft,put:Uh,head:DL,remove:Mp}=jL,gt=kx("vectors");var Ni=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=PL(e),this.fetch=RL(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Dp(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(sc(n))return{data:null,error:n};throw n}}},ML=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(sc(e))return{data:null,error:e};throw e}}};let Ax;Ax=Symbol.toStringTag;var $L=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Ax]="BlobDownloadBuilder",this.promise=null}asStream(){return new ML(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(sc(e))return{data:null,error:e};throw e}}};const BL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},xy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var UL=class extends Ni{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=q(q({},xy),r);let a=q(q({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(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)for(const[h,f]of Object.entries(r.headers))a=Dp(a,h,f);const u=s._removeEmptyFolders(e),c=s._getFinalPath(u),d=await(t=="PUT"?Uh:Ft)(s.fetch,`${s.url}/object/${c}`,i,q({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const u=q(q({},xy),r),c=q(q({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType),{path:i,fullPath:(await Uh(s.fetch,a.toString(),l,{headers:c})).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const s=q({},n.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Ft(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 rc("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await Ft(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await Ft(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await Ft(r.fetch,`${r.url}/object/sign/${s}
120`,q({expiresIn:e},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const s=await Ft(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>q(q({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>Zo(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new $L(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>Bh(await Zo(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await DL(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(sc(s)){var r;const i=s instanceof $h?s.status:s instanceof _x?(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(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const s=r.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Mp(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const s=q(q(q({},BL),e),{},{prefix:t||""});return await Ft(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=q({},t);return await Ft(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const FL="2.104.0",xa={"X-Client-Info":`storage-js/${FL}`};var VL=class extends Ni{constructor(t,e={},n,r){const s=new URL(t);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({},xa),e);super(i,o,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Zo(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Zo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await Ft(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await Uh(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Ft(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Mp(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},zL=class extends Ni{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},xa),e);super(r,s,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Ft(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),s=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await Zo(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Mp(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!LL(t))throw new rc("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 CL({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}
120),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}}}}})}},HL=class extends Ni{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},xa),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await gt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await gt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},WL=class extends Ni{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},xa),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},KL=class extends Ni{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=q(q({},xa),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await gt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},qL=class extends KL{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new GL(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},GL=class extends HL{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new JL(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},JL=class extends WL{constructor(t,e,n,r,s){super(t,e,s),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,q(q({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},YL=class extends VL{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new UL(this.url,this.headers,t,this.fetch)}get vectors(){return new qL(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zL(this.url+"/iceberg",this.headers,this.fetch)}};function ic(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}const Px="2.104.0",As=30*1e3,Fh=3,Qc=Fh*As,QL="http://localhost:9999",XL="supabase.auth.token",ZL={"X-Client-Info":`gotrue-js/${Px}`},Vh="X-Supabase-Api-Version",Rx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eI=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,tI=10*60*1e3;
120class ea extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function F(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class nI extends ea{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function rI(t){return F(t)&&t.name==="AuthApiError"}class Br extends ea{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class $n extends ea{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class dt extends $n{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function sl(t){return F(t)&&t.name==="AuthSessionMissingError"}class ws extends $n{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class il extends $n{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ol extends $n{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function sI(t){return F(t)&&t.name==="AuthImplicitGrantRedirectError"}class Ey extends $n{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class iI extends $n{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 zh extends $n{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Xc(t){return F(t)&&t.name==="AuthRetryableFetchError"}class Ty extends $n{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Hh extends $n{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const gu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Cy=` 	
121\r=`.split(""),oI=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Cy.length;e+=1)t[Cy[e].charCodeAt(0)]=-2;for(let e=0;e<gu.length;e+=1)t[gu[e].charCodeAt(0)]=e;return t})();function _y(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(gu[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(gu[r]),e.queuedBits-=6}}function Ox(t,e,n){const r=oI[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function ky(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{uI(o,r,n)};for(let o=0;o<t.length;o+=1)Ox(t.charCodeAt(o),s,i);return e.join("")}function aI(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function lI(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}aI(r,e)}}function uI(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function ri(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)Ox(t.charCodeAt(s),n,r);return new Uint8Array(e)}function cI(t){const e=[];return lI(t,n=>e.push(n)),new Uint8Array(e)}function zr(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>_y(s,n,r)),_y(null,n,r),e.join("")}function dI(t){return Math.round(Date.now()/1e3)+t}function hI(){return Symbol("auth-callback")}const De=()=>typeof window<"u"&&typeof document<"u",Lr={tested:!1,writable:!1},Lx=()=>
121{if(!De())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Lr.tested)return Lr.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Lr.tested=!0,Lr.writable=!0}catch{Lr.tested=!0,Lr.writable=!1}return Lr.writable};function fI(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const Ix=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),pI=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ps=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Ir=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},je=async(t,e)=>{await t.removeItem(e)};class oc{constructor(){this.promise=new oc.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}oc.promiseConstructor=Promise;function al(t){const e=t.split(".");if(e.length!==3)throw new Hh("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!eI.test(e[r]))throw new Hh("JWT not in base64url format");return{header:JSON.parse(ky(e[0])),payload:JSON.parse(ky(e[1])),signature:ri(e[2]),raw:{header:e[0],payload:e[1]}}}async function mI(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function gI(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function yI(t){return("0"+t.toString(16)).substr(-2)}function vI(){const e=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(e),Array.from(e,yI).join("")}async function wI(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function bI(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await wI(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function bs(t,e,n=!1){const r=vI();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Ps(t,`${e}-code-verifier`,s);const i=await bI(r);return[i,r===i?"plain":"s256"]}const SI=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function xI(t){const e=t.headers.get(Vh);if(!e||!e.match(SI))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function EI(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function TI(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const CI=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ss(t){if(!CI.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Zc(){const t={};return new Proxy(t,{get:(e,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:(e,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:(e,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 _I(t,e){return new Proxy(t,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
121if(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!e.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."),e.value=!0),Reflect.get(n,r,s)}})}function Ay(t){return JSON.parse(JSON.stringify(t))}const Mr=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),kI=[502,503,504,520,521,522,523,524,530];async function Py(t){var e;if(!pI(t))throw new zh(Mr(t),0);if(kI.includes(t.status))throw new zh(Mr(t),t.status);let n;try{n=await t.json()}catch(i){throw new Br(Mr(i),i)}let r;const s=xI(t);if(s&&s.getTime()>=Rx["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 Ty(Mr(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new dt}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)=>i&&typeof o=="string",!0))throw new Ty(Mr(n),t.status,n.weak_password.reasons);throw new nI(Mr(n),t.status||500,r)}const AI=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function W(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Vh]||(i[Vh]=Rx["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 PI(t,e,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 PI(t,e,n,r,s,i){const o=AI(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw console.error(l),new zh(Mr(l),0)}if(a.ok||await Py(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await Py(l)}}function Mt(t){var e;let n=null;LI(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=dI(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function Ry(t){const e=Mt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function tr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function RI(t){return{data:t,error:null}}function OI(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=ic(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,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 Oy(t){return t}function LI(t){return t.access_token&&t.refresh_token&&t.expires_in}const ed=["global","local","others"];class II{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=Ix(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(e,n=ed[0]){if(ed.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${ed.join(", ")}`);try{return await W(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await W(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:tr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=ic(e,["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 W(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:OI,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(F(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await W(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:tr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await W(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Oy});if(c.error)throw c.error;const d=await c.json(),h=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(p=>{const m=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(p.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(F(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Ss(e);try{return await W(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:tr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Ss(e);try{return await W(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:tr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Ss(e);
121try{return await W(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:tr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Ss(e.userId);try{const{data:n,error:r}=await W(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Ss(e.userId),Ss(e.id);try{return{data:await W(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await W(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Oy});if(c.error)throw c.error;const d=await c.json(),h=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(p=>{const m=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(p.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(F(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await W(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await W(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await W(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await W(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await W(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(F(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await W(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await W(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await W(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await W(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}}function Ly(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}const nn={debug:!!(globalThis&&Lx()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
121class Nx extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Iy extends Nx{}async function NI(t,e,n){nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;let s;e>0&&(s=setTimeout(()=>{r.abort(),nn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await n()}finally{nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Iy(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(nn.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(e>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&e>0){if(r.signal.aborted)return nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async o=>{if(o){nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,o.name);try{return await n()}finally{nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw nn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new Iy(`Lock "${t}" was released because another request stole it`)}throw i}}function jI(){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 jx(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function DI(t){return parseInt(t,16)}function MI(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function $I(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:h}=t;{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(!((e=t.statement)===null||e===void 0)&&e.includes(`
122`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const f=jx(t.address),p=c?`${c}://${r}`:r,m=t.statement?`${t.statement}
123`:"",w=`${p} wants you to sign in with your Ethereum account:
124${f}
125
126${m}`;let g=`URI: ${d}
127Version: ${h}
128Chain ID: ${n}${o?`
129Nonce: ${o}`:""}
130Issued At: ${i.toISOString()}`;if(s&&(g+=`
131Expiration Time: ${s.toISOString()}`),a&&(g+=`
132Not Before: ${a.toISOString()}`),l&&(g+=`
133Request ID: ${l}`),u){let y=`
134Resources:`;for(const v of u){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);y+=`
135- ${v}`}g+=y}return`${w}
136${g}`}
136class Te extends Error{constructor({message:e,code:n,cause:r,name:s}){var i;super(e,{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 yu extends Te{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function BI({error:t,options:e}){var n,r,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Te({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Te({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Te({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Te({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Te({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Te({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Te({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Te({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Dx(o)){if(i.rp.id!==o)return new Te({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Te({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Te({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Te({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Te({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function UI({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Te({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Te({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(Dx(r)){if(n.rpId!==r)return new Te({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Te({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Te({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Te({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class FI{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const VI=new FI;function zI(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,s=ic(t,["challenge","user","excludeCredentials"]),i=ri(e).buffer,o=Object.assign(Object.assign({},n),{id:ri(n.id).buffer}),a=Object.assign(Object.assign({}
136,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 u=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:ri(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function HI(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=ic(t,["challenge","allowCredentials"]),s=ri(e).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:ri(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function WI(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:zr(new Uint8Array(t.response.attestationObject)),clientDataJSON:zr(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function KI(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:zr(new Uint8Array(s.authenticatorData)),clientDataJSON:zr(new Uint8Array(s.clientDataJSON)),signature:zr(new Uint8Array(s.signature)),userHandle:s.userHandle?zr(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Dx(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Ny(){var t,e;return!!(De()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function qI(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new yu("Browser returned unexpected credential type",e)}:{data:null,error:new yu("Empty credential response",e)}}catch(e){return{data:null,error:BI({error:e,options:t})}}}async function GI(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new yu("Browser returned unexpected credential type",e)}:{data:null,error:new yu("Empty credential response",e)}}catch(e){return{data:null,error:UI({error:e,options:t})}}}const JI={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},YI={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function vu(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of t)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(e(o)){const a=r[i];e(a)?r[i]=vu(a,o):r[i]=vu(o)}else r[i]=o}return r}function QI(t,e){return vu(JI,t,e||{})}function XI(t,e){return vu(YI,t,e||{})}class ZI{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const u=s??VI.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=r;if(d)c.name=`${c.id}:${d}`;else{const f=(await this.client.getUser()).data.user,p=((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";c.name=`${c.id}:${p}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=QI(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await qI({publicKey:c,signal:u});return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const c=XI(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await GI(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return F(a)?{data:null,error:a}:{data:null,error:new Br("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,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 ea("rpId is required for WebAuthn authentication")};try{if(!Ny())return{data:null,error:new Br("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new Br("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,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 ea("rpId is required for WebAuthn registration")};try{if(!Ny())return{data:null,error:new Br("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===e&&h.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId: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:u}}catch(o){return F(o)?{data:null,error:o}:{data:null,error:new Br("Unexpected error in register",o)}}}}jI();const eN={url:QL,storageKey:XL,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ZL,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function jy(t,e,n){return await n()}const xs={};class ta{get jwks(){var e,n;return(n=(e=xs[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){xs[this.storageKey]=Object.assign(Object.assign({},xs[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=xs[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){xs[this.storageKey]=Object.assign(Object.assign({},xs[this.storageKey]),{cachedAt:e})}constructor(e){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({},eN),e);
136if(this.storageKey=i.storageKey,this.instanceID=(n=ta.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,ta.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&De()){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 II({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Ix(i.fetch),this.lock=i.lock||jy,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&&De()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=NI:this.lock=jy,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 ZI(this)},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:Lx()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ly(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Ly(this.memoryStorage)),De()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Px}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let n={},r="none";if(De()&&(n=fI(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),De()&&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),sI(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return F(n)?this._returnResult({error:n}):this._returnResult({error:new Br("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:Mt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var n,r,s;try{let i;if("email"in e){const{email:c,password:d,options:h}=e;let f=null,p=null;this.flowType==="pkce"&&([f,p]=await bs(this.storage,this.storageKey)),i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:c,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:p},xform:Mt})}else if("phone"in e){const{phone:c,password:d,options:h}=e;i=await W(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,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:Mt})}else throw new il("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await je(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await je(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await W(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:Ry})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await W(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:Ry})}else throw new il("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 ws;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(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,u,c,d,h;let f,p;if("message"in e)f=e.message,p=e.signature;else{const{chain:m,wallet:w,statement:g,options:y}=e;let v;if(De())if(typeof w=="object")v=w;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")v=P.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const S=new URL((n=y==null?void 0:y.url)!==null&&n!==void 0?n:window.location.href),x=await v.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!x||x.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=jx(x[0]);let T=(r=y==null?void 0:y.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!T){const P=await v.request({method:"eth_chainId"});T=DI(P)}const C={domain:S.host,address:E,statement:g,uri:S.href,version:"1",chainId:T,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=y==null?void 0:y.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.resources};f=$I(C),p=await v.request({method:"personal_sign",params:[MI(f),E]})}try{const{data:m,error:w}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:p},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Mt});if(w)throw w;if(!m||!m.session||!m.user){const g=new ws;return this._returnResult({data:{user:null,session:null},error:g})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:w})}catch(m){if(F(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var n,r,s,i,o,a,l,u,c,d,h,f;let p,m;if("message"in e)p=e.message,m=e.signature;else{const{chain:w,wallet:g,statement:y,options:v}=e;let S;if(De())if(typeof g=="object")S=g;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))S=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=g}const x=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const E=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:x.host,uri:x.href}),y?{statement:y}:null));let T;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")T=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)T=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in T&&"signature"in T&&(typeof T.signedMessage=="string"||T.signedMessage instanceof Uint8Array)&&T.signature instanceof Uint8Array)p=typeof T.signedMessage=="string"?T.signedMessage:new TextDecoder().decode(T.signedMessage),m=T.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");p=[`${x.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${x.href}`,`Issued At: ${(s=(r=v==null?void 0:v.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((u=v==null?void 0:v.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((d=(c=v==null?void 0:v.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...v.signInWithSolana.resources.map(T=>`- ${T}`)]:[]].join(`
137`);const E=await S.signMessage(new TextEncoder().encode(p),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:w,error:g}=await W(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:zr(m)}
137,!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Mt});if(g)throw g;if(!w||!w.session||!w.user){const y=new ws;return this._returnResult({data:{user:null,session:null},error:y})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:g})}catch(w){if(F(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const n=await Ir(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new iI;const{data:i,error:o}=await W(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:Mt});if(await je(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new ws;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 je(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await W(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:Mt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new ws;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await bs(this.storage,this.storageKey));const{error:d}=await W(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:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in e){const{phone:a,options:l}=e,{data:u,error:c}=await W(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new il("You must provide either an email or phone number.")}catch(a){if(await je(this.storage,`${this.storageKey}-code-verifier`),F(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await W(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Mt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await bs(this.storage,this.storageKey));const u=await W(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:RI});return!((i=u.data)===null||i===void 0)&&i.url&&De()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await je(this.storage,`${this.storageKey}-code-verifier`),F(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new dt;const{error:s}=await W(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(F(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:i}=e,{error:o}=await W(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 e){const{phone:r,type:s,options:i}=e,{data:o,error:a}=await W(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 il("You must provide either an email or phone number and a type")}catch(n){if(F(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(e,n){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(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 e=null;const n=await Ir(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
137id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<Qc:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await Ir(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Zc()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=_I(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await W(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:tr}):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 dt}:await W(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:tr})})}catch(n){if(F(n))return sl(n)&&(await this._removeSession(),await je(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new dt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await bs(this.storage,this.storageKey));const{data:u,error:c}=await W(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:tr});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await je(this.storage,`${this.storageKey}-code-verifier`),F(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new dt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=al(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in: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(F(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new dt;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(F(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){try{if(!De())throw new ol("No browser detected.");
137if(e.error||e.error_description||e.error_code)throw new ol(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Ey("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ol("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Ey("No code detected.");const{data:y,error:v}=await this._exchangeCodeForSession(e.code);if(v)throw v;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:y.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:u}=e;if(!i||!a||!o||!u)throw new ol("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(a);let h=c+d;l&&(h=parseInt(l));const f=h-c;f*1e3<=As&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${d}s`);const p=h-d;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,h,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,h,c);const{data:m,error:w}=await this._getUser(i);if(w)throw w;const g={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:h,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(r){if(F(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await Ir(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!sl(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,e);if(a&&!(rI(a)&&(a.status===404||a.status===401||a.status===403)||sl(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await je(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const n=hI(),r={id:n,callback:e,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(e){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(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),sl(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await bs(this.storage,this.storageKey,!0));try{return await W(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await je(this.storage,`${this.storageKey}-code-verifier`),F(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:h}=i;if(h)throw h;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await W(this.fetch,"GET",f,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return De()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:e.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(F(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
137if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=e,d=await W(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:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Mt}),{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 ws}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:f}))}catch(s){if(await je(this.storage,`${this.storageKey}-code-verifier`),F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await W(this.fetch,"DELETE",`${this.url}/user/identities/${e.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(F(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await gI(async s=>(s>
1370&&await mI(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await W(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Mt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Xc(i)&&Date.now()+o-r<As})}catch(r){if(this._debug(n,"error",r),F(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),De()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Ir(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Ir(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ps(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Zc()}else if(s&&!s.user&&!s.user){const o=await Ir(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await je(this.storage,this.storageKey+"-user"),await Ps(this.storage,this.storageKey,s)):s.user=Zc()}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()<Qc;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Qc}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Xc(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(e){var n,r;if(!e)throw new dt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new oc;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new dt;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),F(i)){const o={data:null,error:i};return Xc(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(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,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(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await je(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Ps(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=Ay(s);await Ps(this.storage,this.storageKey,i)}else{const s=Ay(n);await Ps(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await je(this.storage,this.storageKey),await je(this.storage,this.storageKey+"-code-verifier"),await je(this.storage,this.storageKey+"-user"),this.userStorage&&await je(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&De()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
137catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),As);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);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 e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);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 e=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-e)/As);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${As}ms, refresh threshold is ${Fh} ticks`),s<=Fh&&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(e){if(e.isAcquireTimeout||e instanceof Nx)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!De()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(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(e,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 bs(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}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await W(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){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:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:u}=await W(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 u?this._returnResult({data:null,error:u}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){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:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?WI(e.webauthn.credential_response):KI(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await W(this.fetch,"POST",`${this.url}/factors/${e.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(F(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(e){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 W(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,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:zI(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:HI(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;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(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,s,i;if(e)try{const{payload:f}=al(e);let p=null;f.aal&&(p=f.aal);let m=p;const{data:{user:w},error:g}=await this.getUser(e);if(g)return this._returnResult({data:null,error:g});((r=(n=w==null?void 0:w.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const v=f.amr||[];return{data:{currentLevel:p,nextLevel:m,currentAuthenticationMethods:v},error:null}}catch(f){if(F(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
137=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}=al(o.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(c="aal2");const h=l.amr||[];return{data:{currentLevel:u,nextLevel:c,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await W(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new dt})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,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 dt});const o=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&De()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,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 dt});const o=await W(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&De()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await W(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 dt})})}catch(e){if(F(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await W(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new dt})})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+tI>s)return r;const{data:i,error:o}=await W(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===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:f,error:p}
137=await this.getSession();if(p||!f.session)return this._returnResult({data:null,error:p});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=al(r);n!=null&&n.allowExpired||EI(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const c=TI(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,cI(`${a}.${l}`)))throw new Hh("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}}ta.nextInstanceID={};const tN=ta,nN="2.104.0";let io="";typeof Deno<"u"?io="deno":typeof document<"u"?io="web":typeof navigator<"u"&&navigator.product==="ReactNative"?io="react-native":io="node";const rN={"X-Client-Info":`supabase-js-${io}/${nN}`},sN={headers:rN},iN={schema:"public"},oN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},aN={};function na(t){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},na(t)}function lN(t,e){if(na(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(na(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}
137function uN(t){var e=lN(t,"string");return na(e)=="symbol"?e:e+""}function cN(t,e,n){return(e=uN(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Se(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dy(Object(n),!0).forEach(function(r){cN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const dN=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),hN=()=>Headers,fN=(t,e,n)=>{const r=dN(n),s=hN();return async(i,o)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(i,Se(Se({},o),{},{headers:u}))}};function pN(t){return t.endsWith("/")?t:t+"/"}function mN(t,e){var n,r;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:u,realtime:c,global:d}=e,h={db:Se(Se({},l),s),auth:Se(Se({},u),i),realtime:Se(Se({},c),o),storage:{},global:Se(Se(Se({},d),a),{},{headers:Se(Se({},(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 t.accessToken?h.accessToken=t.accessToken:delete h.accessToken,h}function gN(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(pN(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var yN=class extends tN{constructor(t){super(t)}},vN=class{constructor(t,e,n){var r,s;this.supabaseUrl=t,this.supabaseKey=e;const i=gN(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:iN,realtime:aN,auth:Se(Se({},oN),{},{storageKey:o}),global:sN},l=mN(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:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=fN(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Se({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new BO(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 YL(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new PO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();
137return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u},c,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new yN({url:this.authUrl.href,headers:Se(Se({},h),c),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new wL(this.realtimeUrl.href,Se(Se({},t),{},{params:Se(Se({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const wN=(t,e,n)=>new vN(t,e,n);function bN(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}bN()&&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 SN="https://lcronrlafrsofvmalggc.supabase.co",xN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imxjcm9ucmxhZnJzb2Z2bWFsZ2djIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzM2NjgxMDYsImV4cCI6MjA4OTI0NDEwNn0.WebABf5GOG3IcOfeHAL9__KoTCbC8vmjPrO748kUiTk",My=wN(SN,xN,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),EN=b.createContext({user:null,session:null,loading:!0,isRegistered:!1,authorizedEmail:null}),TN=({children:t})=>{const[e,n]=b.useState(null),[r,s]=b.useState(null),[i,o]=b.useState(!0),[a,l]=b.useState(!1),[u,c]=b.useState(null),d=()=>{const h=localStorage.getItem("authorized_email");h!==u&&(c(h),l(!!h))};return b.useEffect(()=>{d();const h=()=>{d()};window.addEventListener("storage",h),window.addEventListener("localStorageChange",h);const{data:{subscription:f}}=My.auth.onAuthStateChange(async(p,m)=>{var w,g;console.log("Auth state changed:",{event:p,session:!!m,userEmail:(w=m==null?void 0:m.user)==null?void 0:w.email}),s(m),n((m==null?void 0:m.user)??null),(g=m==null?void 0:m.user)!=null&&g.email,d(),o(!1)});return My.auth.getSession().then(({data:{session:p}})=>{var m;console.log("Initial session check:",{session:!!p,userEmail:(m=p==null?void 0:p.user)==null?void 0:m.email}),s(p),n((p==null?void 0:p.user)??null),o(!1)}),()=>{f.unsubscribe(),window.removeEventListener("storage",h),window.removeEventListener("localStorageChange",h)}},[]),k.jsx(EN.Provider,{value:{user:e,session:r,loading:i,isRegistered:a,authorizedEmail:u},children:t})};var CN=typeof Element<"u",_N=typeof Map=="function",kN=typeof Set=="function",AN=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Pl(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,s;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Pl(t[r],e[r]))return!1;return!0}var i;if(_N&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;for(i=t.entries();!(r=i.next()).done;)if(!Pl(r.value[1],e.get(r.value[0])))return!1;return!0}if(kN&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(AN&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;if(CN&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&t.$$typeof)&&!Pl(t[s[r]],e[s[r]]))return!1;return!0}return t!==t&&e!==e}var PN=function(e,n){try{return Pl(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const RN=da(PN);var ON=function(t,e,n,r,s,i,o,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,i,o,a],c=0;
137l=new Error(e.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},LN=ON;const $y=da(LN);var IN=function(e,n,r,s){var i=r?r.call(s,e,n):void 0;if(i!==void 0)return!!i;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),u=0;u<o.length;u++){var c=o[u];if(!l(c))return!1;var d=e[c],h=n[c];if(i=r?r.call(s,d,h,c):void 0,i===!1||i===void 0&&d!==h)return!1}return!0};const NN=da(IN);var Mx=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(Mx||{}),td={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},By=Object.values(Mx),$p={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},jN=Object.entries($p).reduce((t,[e,n])=>(t[n]=e,t),{}),Wt="data-rh",si={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ii=(t,e)=>{for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},DN=t=>{let e=ii(t,"title");const n=ii(t,si.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,()=>e);const r=ii(t,si.DEFAULT_TITLE);return e||r||void 0},MN=t=>ii(t,si.ON_CHANGE_CLIENT_STATE)||(()=>{}),nd=(t,e)=>e.filter(n=>typeof n[t]<"u").map(n=>n[t]).reduce((n,r)=>({...n,...r}),{}),$N=(t,e)=>e.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(t.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),BN=t=>console&&typeof console.warn=="function"&&console.warn(t),Yi=(t,e,n)=>{const r={};return n.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&BN(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let u;const c=Object.keys(l);for(let h=0;h<c.length;h+=1){const f=c[h],p=f.toLowerCase();e.indexOf(p)!==-1&&!(u==="rel"&&l[u].toLowerCase()==="canonical")&&!(p==="rel"&&l[p].toLowerCase()==="stylesheet")&&(u=p),e.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!l[u])return!1;const d=l[u].toLowerCase();return r[u]||(r[u]={}),o[u]||(o[u]={}),r[u][d]?!1:(o[u][d]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const u=a[l],c={...r[u],...o[u]};r[u]=c}return s},[]).reverse()},UN=(t,e)=>{if(Array.isArray(t)&&t.length){for(let n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},FN=t=>({baseTag:$N(["href"],t),bodyAttributes:nd("bodyAttributes",t),defer:ii(t,si.DEFER),encode:ii(t,si.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:nd("htmlAttributes",t),linkTags:Yi("link",["rel","href"],t),metaTags:Yi("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:Yi("noscript",["innerHTML"],t),onChangeClientState:MN(t),scriptTags:Yi("script",["src","innerHTML"],t),styleTags:Yi("style",["cssText"],t),title:DN(t),titleAttributes:nd("titleAttributes",t),prioritizeSeoTags:UN(t,si.PRIORITIZE_SEO_TAGS)}),$x=t=>Array.isArray(t)?t.join(""):t,VN=(t,e)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&e[n[r]].includes(t[n[r]]))return!0;return!1},rd=(t,e)=>Array.isArray(t)?t.reduce((n,r)=>(VN(r,e)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:t,priority:[]},Uy=(t,e)=>({...t,[e]:void 0}),zN=["noscript","script","style"],Wh=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Bx=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]<"u"?`${n}
137="${t[n]}"`:`${n}`;return e?`${e} ${r}`:r},""),HN=(t,e,n,r)=>{const s=Bx(n),i=$x(e);return s?`<${t} ${Wt}="true" ${s}>${Wh(i,r)}</${t}>`:`<${t} ${Wt}="true">${Wh(i,r)}</${t}>`},WN=(t,e,n=!0)=>e.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,c)=>{const d=typeof i[c]>"u"?c:`${c}="${Wh(i[c],n)}"`;return u?`${u} ${d}`:d},""),a=i.innerHTML||i.cssText||"",l=zN.indexOf(t)===-1;return`${r}<${t} ${Wt}="true" ${o}${l?"/>":`>${a}</${t}>`}`},""),Ux=(t,e={})=>Object.keys(t).reduce((n,r)=>{const s=$p[r];return n[s||r]=t[r],n},e),KN=(t,e,n)=>{const r={key:e,[Wt]:!0},s=Ux(n,r);return[I.createElement("title",s,e)]},Rl=(t,e)=>e.map((n,r)=>{const s={key:r,[Wt]:!0};return Object.keys(n).forEach(i=>{const a=$p[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),I.createElement(t,s)}),Et=(t,e,n=!0)=>{switch(t){case"title":return{toComponent:()=>KN(t,e.title,e.titleAttributes),toString:()=>HN(t,e.title,e.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Ux(e),toString:()=>Bx(e)};default:return{toComponent:()=>Rl(t,e),toString:()=>WN(t,e,n)}}},qN=({metaTags:t,linkTags:e,scriptTags:n,encode:r})=>{const s=rd(t,td.meta),i=rd(e,td.link),o=rd(n,td.script);return{priorityMethods:{toComponent:()=>[...Rl("meta",s.priority),...Rl("link",i.priority),...Rl("script",o.priority)],toString:()=>`${Et("meta",s.priority,r)} ${Et("link",i.priority,r)} ${Et("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},GN=t=>{const{baseTag:e,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:u}=t;let{linkTags:c,metaTags:d,scriptTags:h}=t,f={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:f,linkTags:c,metaTags:d,scriptTags:h}=qN(t)),{priority:f,base:Et("base",e,r),bodyAttributes:Et("bodyAttributes",n,r),htmlAttributes:Et("htmlAttributes",s,r),link:Et("link",c,r),meta:Et("meta",d,r),noscript:Et("noscript",i,r),script:Et("script",h,r),style:Et("style",o,r),title:Et("title",{title:a,titleAttributes:l},r)}},Kh=GN,ll=[],Fx=!!(typeof window<"u"&&window.document&&window.document.createElement),qh=class{constructor(t,e){bn(this,"instances",[]);bn(this,"canUseDOM",Fx);bn(this,"context");bn(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?ll:this.instances,add:t=>{(this.canUseDOM?ll:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?ll:this.instances).indexOf(t);(this.canUseDOM?ll:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=Kh({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},JN={},Vx=I.createContext(JN),Yr,Gh=(Yr=class extends b.Component{constructor(n){super(n);bn(this,"helmetData");this.helmetData=new qh(this.props.context||{},Yr.canUseDOM)}render(){return I.createElement(Vx.Provider,{value:this.helmetData.value},this.props.children)}},bn(Yr,"canUseDOM",Fx),Yr),Es=(t,e)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${t}[${Wt}]`),s=[].slice.call(r),i=[];let o;return e&&e.length&&e.forEach(a=>{const l=document.createElement(t);for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u))if(u==="innerHTML")l.innerHTML=a.innerHTML;else if(u==="cssText")l.styleSheet?l.styleSheet.cssText=a.cssText:l.appendChild(document.createTextNode(a.cssText));else{const c=u,d=typeof a[c]>"u"?"":a[c];l.setAttribute(u,d)}l.setAttribute(Wt,"true"),s.some((u,c)=>(o=c,l.isEqualNode(u)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}
137),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},Jh=(t,e)=>{const n=document.getElementsByTagName(t)[0];if(!n)return;const r=n.getAttribute(Wt),s=r?r.split(","):[],i=[...s],o=Object.keys(e);for(const a of o){const l=e[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const u=i.indexOf(a);u!==-1&&i.splice(u,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(Wt):n.getAttribute(Wt)!==o.join(",")&&n.setAttribute(Wt,o.join(","))},YN=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=$x(t)),Jh("title",e)},Fy=(t,e)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:u,styleTags:c,title:d,titleAttributes:h}=t;Jh("body",r),Jh("html",s),YN(d,h);const f={baseTag:Es("base",n),linkTags:Es("link",i),metaTags:Es("meta",o),noscriptTags:Es("noscript",a),scriptTags:Es("script",u),styleTags:Es("style",c)},p={},m={};Object.keys(f).forEach(w=>{const{newTags:g,oldTags:y}=f[w];g.length&&(p[w]=g),y.length&&(m[w]=f[w].oldTags)}),e&&e(),l(t,p,m)},Qi=null,QN=t=>{Qi&&cancelAnimationFrame(Qi),t.defer?Qi=requestAnimationFrame(()=>{Fy(t,()=>{Qi=null})}):(Fy(t),Qi=null)},XN=QN,Vy=class extends b.Component{constructor(){super(...arguments);bn(this,"rendered",!1)}shouldComponentUpdate(e){return!NN(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const s=FN(e.get().map(i=>{const o={...i.props};return delete o.context,o}));Gh.canUseDOM?XN(s):Kh&&(r=Kh(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Td,WU=(Td=class extends b.Component{shouldComponentUpdate(t){return!RN(Uy(this.props,"helmetData"),Uy(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,n,r){return{...e,[t.type]:[...e[t.type]||[],{...n,...this.mapNestedChildrenToProps(t,r)}]}}mapObjectTypeChildren(t,e,n,r){switch(t.type){case"title":return{...e,[t.type]:r,titleAttributes:{...n}};case"body":return{...e,bodyAttributes:{...n}};case"html":return{...e,htmlAttributes:{...n}};default:return{...e,[t.type]:{...n}}}}mapArrayTypeChildrenToProps(t,e){let n={...e};return Object.keys(t).forEach(r=>{n={...n,[r]:t[r]}}),n}warnOnInvalidChildren(t,e){return $y(By.some(n=>t.type===n),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${By.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),$y(!e||typeof e=="string"||Array.isArray(e)&&!e.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let n={};return I.Children.forEach(t,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,u)=>(l[jN[u]||u]=i[u],l),{});let{type:a}=r;
vendor: 7,497 bytes, line 137
137switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:e=this.mapObjectTypeChildren(r,e,o,s);break}}),this.mapArrayTypeChildrenToProps(n,e)}render(){const{children:t,...e}=this.props;let n={...e},{helmetData:r}=e;if(t&&(n=this.mapChildrenToProps(t,n)),r&&!(r instanceof qh)){const s=r;r=new qh(s.context,!0),delete n.helmetData}return r?I.createElement(Vy,{...n,context:r.value}):I.createElement(Vx.Consumer,null,s=>I.createElement(Vy,{...n,context:s}))}},bn(Td,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Td);const G=t=>typeof t=="string",Xi=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},zy=t=>t==null?"":""+t,ZN=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},ej=/###/g,Hy=t=>t&&t.indexOf("###")>-1?t.replace(ej,"."):t,Wy=t=>!t||G(t),So=(t,e,n)=>{const r=G(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Wy(t))return{};const i=Hy(r[s]);!t[i]&&n&&(t[i]=new n),Object.prototype.hasOwnProperty.call(t,i)?t=t[i]:t={},++s}return Wy(t)?{}:{obj:t,k:Hy(r[s])}},Ky=(t,e,n)=>{const{obj:r,k:s}=So(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=So(t,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=So(t,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},tj=(t,e,n,r)=>{const{obj:s,k:i}=So(t,e,Object);s[i]=s[i]||[],s[i].push(n)},wu=(t,e)=>{const{obj:n,k:r}=So(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},nj=(t,e,n)=>{const r=wu(t,n);return r!==void 0?r:wu(e,n)},zx=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?G(t[r])||t[r]instanceof String||G(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):zx(t[r],e[r],n):t[r]=e[r]);return t},Ts=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const sj=t=>G(t)?t.replace(/[&<>"'\/]/g,e=>rj[e]):t;class ij{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const oj=[" ",",","?","!",";"],aj=new ij(20),lj=(t,e,n)=>{e=e||"",n=n||"";const r=oj.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=aj.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(t);if(!i){const o=t.indexOf(n);o>0&&!s.test(t.substring(0,o))&&(i=!0)}return i},Yh=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let l=i;l<r.length;++l)if(l!==i&&(a+=n),a+=r[l],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<r.length-1)continue;i+=l-i+1;break}s=o}return s},ra=t=>t==null?void 0:t.replace("_","-"),uj={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,r;(r=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||r.call(n,console,e)}};class bu{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||uj,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(G(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new bu(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new bu(this.logger,e)}}var hn=new bu;class ac{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[e,...n])})}}class qy extends ac{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,s={}){var u,c;const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,n],r&&(Array.isArray(r)?a.push(...r):G(r)&&i?a.push(...r.split(i)):a.push(r)));const l=wu(this.data,a);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=a[0],n=a[1],r=a.slice(2).join(".")),l||!o||!G(r)?l:Yh((c=(u=this.data)==null?void 0:u[e])==null?void 0:c[n],r,i)}addResource(e,n,r,s,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),Ky(this.data,a,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r,s={silent:!1}){for(const i in r)(G(r[i])||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i,o={silent:!1,skipCopy:!1}){let a=[e,n];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=wu(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?zx(l,r,i):l={...l,...r},Ky(this.data,a,l),o.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Hx={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{var o;e=((o=this.processors[i])==null?void 0:o.process(e,n,r,s))??e}),e}};const Wx=Symbol("i18next/PATH_KEY");function cj(){const t=[],e=Object.create(null);let n;return e.get=(r,s)=>{var i;return(i=n==null?void 0:n.revoke)==null||i.call(n),s===Wx?t:(t.push(s),n=Proxy.revocable(r,e),n.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Qh(t,e){const{[Wx]:n}=t(cj());return n.join((e==null?void 0:e.keySeparator)??".")}const Gy={},sd=t=>!G(t)&&typeof t!="boolean"&&typeof t!="number";class Su extends ac{constructor(e,n={}){super(),ZN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
137i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const s=this.resolve(e,r);if((s==null?void 0:s.res)===void 0)return!1;const i=sd(s.res);return!(r.returnObjects===!1&&i)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!lj(e,r,s);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:G(i)?[i]:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return{key:e,namespaces:G(i)?[i]:i}}translate(e,n,r){let s=typeof n=="object"?{...n}:n;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=Qh(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=s.lng||this.language,h=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return h?i?{res:`${u}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:a;const f=this.resolve(e,s);let p=f==null?void 0:f.res;const m=(f==null?void 0:f.usedKey)||a,w=(f==null?void 0:f.exactUsedKey)||a,g=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!G(s.count),x=Su.hasDefaultValue(s),E=S?this.pluralResolver.getSuffix(d,s.count,s):"",T=s.ordinal&&S?this.pluralResolver.getSuffix(d,s.count,{ordinal:!1}):"",C=S&&!s.ordinal&&s.count===0,P=C&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${E}`]||s[`defaultValue${T}`]||s.defaultValue;let R=p;v&&!p&&x&&(R=P);const H=sd(R),B=Object.prototype.toString.apply(R);if(v&&R&&H&&g.indexOf(B)<0&&!(G(y)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,R,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=K,f.usedParams=this.getUsedParamsDetails(s),f):K}if(o){const K=Array.isArray(R),N=K?[]:{},J=K?w:m;for(const V in R)if(Object.prototype.hasOwnProperty.call(R,V)){const $=`${J}${o}${V}`;x&&!p?N[V]=this.translate($,{...s,defaultValue:sd(P)?P[V]:void 0,joinArrays:!1,ns:l}):N[V]=this.translate($,{...s,joinArrays:!1,ns:l}),N[V]===$&&(N[V]=R[V])}p=N}}else if(v&&G(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,e,s,r));else{let K=!1,N=!1;!this.isValidLookup(p)&&x&&(K=!0,p=P),this.isValidLookup(p)||(N=!0,p=a);const V=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:p,$=x&&P!==p&&this.options.updateMissing;if(N||K||$){if(this.logger.log($?"updateKey":"missingKey",d,u,a,$?P:p),o){const j=this.resolve(a,{...s,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let j=0;j<O.length;j++)_.push(O[j]);else this.options.saveMissingTo==="all"?_=this.languageUtils.toResolveHierarchy(s.lng||this.language):_.push(s.lng||this.language);const D=(j,z,Y)=>{var Fe;const ie=x&&Y!==p?Y:V;this.options.missingKeyHandler?this.options.missingKeyHandler(j,u,z,ie,$,s
vendor: 27,507 bytes, line 137
137):(Fe=this.backendConnector)!=null&&Fe.saveMissing&&this.backendConnector.saveMissing(j,u,z,ie,$,s),this.emit("missingKey",j,u,z,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?_.forEach(j=>{const z=this.pluralResolver.getSuffixes(j,s);C&&s[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(Y=>{D([j],a+Y,s[`defaultValue${Y}`]||P)})}):D(_,a,P))}p=this.extendTranslation(p,e,s,f,r),N&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${a}`),(N||K)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${a}`:a,K?p:void 0,s))}return i?(f.res=p,f.usedParams=this.getUsedParamsDetails(s),f):p}extendTranslation(e,n,r,s,i){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=G(e)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const f=e.match(this.interpolator.nestingRegexp);d=f&&f.length}let h=r.replace&&!G(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||s.usedLng,r),c){const f=e.match(this.interpolator.nestingRegexp),p=f&&f.length;d<p&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(i==null?void 0:i[0])===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,a=G(o)?[o]:o;return e!=null&&(a!=null&&a.length)&&r.applyPostProcessor!==!1&&(e=Hx.handle(a,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,s,i,o,a;return G(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;s=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=n.count!==void 0&&!G(n.count),f=h&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(G(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(w=>{var g,y;this.isValidLookup(r)||(a=w,!Gy[`${m[0]}-${w}`]&&((g=this.utils)!=null&&g.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(Gy[`${m[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(v=>{var E;if(this.isValidLookup(r))return;o=v;const S=[c];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(S,c,v,w,n);else{let T;h&&(T=this.pluralResolver.getSuffix(v,n.count,n));const C=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&T.indexOf(P)===0&&S.push(c+T.replace(P,this.options.pluralSeparator)),S.push(c+T),f&&S.push(c+C)),p){const R=`${c}${this.options.contextSeparator||"_"}${n.context}`;S.push(R),h&&(n.ordinal&&T.indexOf(P)===0&&S.push(R+T.replace(P,this.options.pluralSeparator)),S.push(R+T),f&&S.push(R+C))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(v,w,x,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,s={}){var i;return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!G(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class Jy{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hn.create("languageUtils")}getScriptPartFromCode(e){if(e=ra(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=ra(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(G(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),G(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return G(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):G(e)&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Yy={zero:0,one:1,two:2,few:3,many:4,other:5},Qy={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class dj{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=hn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=ra(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Qy;if(!e.match(/-|_/))return Qy;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Yy[s]-Yy[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n,r={}){const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const Xy=(t,e,n,r=".",s=!0)=>{let i=nj(t,e,n);return!i&&s&&G(n)&&(i=Yh(t,n,r),i===void 0&&(i=Yh(e,n,r))),i},id=t=>t.replace(/\$/g,"$$$$");class hj{constructor(e={}){var n;this.logger=hn.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:w,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=n!==void 0?n:sj,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Ts(i):o||"{{",this.suffix=a?Ts(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Ts(h):f||Ts("$t("),this.nestingSuffix=p?Ts(p):m||Ts(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=g||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,s){var f;let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=Xy(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...s,...n,interpolationkey:p}):y}const m=p.split(this.formatSeparator),w=m.shift().trim(),g=m.join(this.formatSeparator).trim();return this.format(Xy(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...s,...n,interpolationkey:w})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((f=s==null?void 0:s.interpolation)==null?void 0:f.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>id(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?id(this.escape(p)):id(p)}].forEach(p=>{for(a=0;i=p.regex.exec(e);){const m=i[1].trim();if(o=u(m),o===void 0)if(typeof c=="function"){const g=c(e,i,s);o=G(g)?g:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),o="";else!G(o)&&!this.useRawValueToEscape&&(o=zy(o));const w=p.safeValue(o);if(e=e.replace(i[0],w),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n,r={}){let s,i,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,o);const f=h.match(/'/g),p=h.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!p||p.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];o={...r},o=o.replace&&!G(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!G(i))return i;G(i)||(i=zy(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),l.length&&(i=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const fj=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},Zy=t=>{const e={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=e[o];return a||(a=t(ra(r),s),e[o]=a),a(n)}},pj=t=>(e,n,r)=>t(ra(n),r)(e);class mj{constructor(e={}){this.logger=hn.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Zy:pj;this.formats={number:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i});return a=>o.format(a)}),currency:r((s,i)=>{const o=new Intl.NumberFormat(s,{...i,style:"currency"});return a=>o.format(a)}),datetime:r((s,i)=>{const o=new Intl.DateTimeFormat(s,{...i});return a=>o.format(a)}),relativetime:r((s,i)=>{const o=new Intl.RelativeTimeFormat(s,{...i});return a=>o.format(a,i.range||"day")}),list:r((s,i)=>{const o=new Intl.ListFormat(s,{...i});return a=>o.format(a)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Zy(n)}format(e,n,r,s={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{var d;const{formatName:u,formatOptions:c}=fj(l);if(this.formats[u]){let h=a;try{const f=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},p=f.locale||f.lng||s.locale||s.lng||r;h=this.formats[u](a,p,{...c,...s,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const gj=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class yj extends ac{constructor(e,n,r,s={}){var i,o;super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=hn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(e,n,r,s){const i={},o={},a={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const h=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,c=!1,o[h]===void 0&&(o[h]=!0),i[h]===void 0&&(i[h]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const s=e.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const a={};this.queue.forEach(l=>{tj(l.loaded,[i],o),gj(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,s=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,i*2,o)},i);return}o(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,n,a)}prepareLoading(e,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();G(e)&&(e=this.languageUtils.toResolveHierarchy(e)),G(n)&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,n,r,s,i,o={},a=()=>{}){var l,u,c,d,h;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const f={...o,isUpdate:i},p=this.backend.create.bind(this.backend);if(p.length<6)try{let m;p.length===5?m=p(e,n,r,s,f):m=p(e,n,r,s),m&&typeof m.then=="function"?m.then(w=>a(null,w)).catch(a):a(null,m)}catch(m){a(m)}else p(e,n,r,s,a,f)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const ev=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),G(t[1])&&(e.defaultValue=t[1]),G(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),tv=t=>{var e,n;return G(t.ns)&&(t.ns=[t.ns]),G(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),G(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((n=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:n.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},ul=()=>{},vj=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class xo extends ac{constructor(e={},n){if(super(),this.options=tv(e),this.services={},this.logger=hn,this.modules={external:[]},vj(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(G(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=ev();this.options={...r,...this.options,...tv(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?hn.init(s(this.modules.logger),this.options):hn.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=mj;const c=new Jy(this.options);this.store=new qy(this.options.resources,this.options);const d=this.services;d.logger=hn,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new dj(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=s(u),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new hj(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new yj(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Su(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ul),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const a=Xi(),l=()=>{const u=(c,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(c,d)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,n=ul){var i,o;let r=n;const s=G(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,u=>l(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,n,r){const s=Xi();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=ul),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Hx.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Xi();this.emit("languageChanging",e);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(a,(...u)=>this.t(...u))},o=a=>{var c,d;!e&&!a&&this.services.languageDetector&&(a=[]);const l=G(a)?a:a&&a[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(G(a)?[a]:a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),
vendor: 5,763 bytes, line 137
137(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,h=>{i(h,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,r){const s=(i,o,...a)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(a)):l={...o},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(i)?c=i.map(d=>(typeof d=="function"&&(d=Qh(d,{...this.options,...o})),`${l.keyPrefix}${u}${d}`)):(typeof i=="function"&&(i=Qh(i,{...this.options,...o})),c=l.keyPrefix?`${l.keyPrefix}${u}${i}`:i),this.t(c,l)};return G(e)?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=r,s}t(...e){var n;return(n=this.translator)==null?void 0:n.translate(...e)}exists(...e){var n;return(n=this.translator)==null?void 0:n.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,n){const r=Xi();return this.options.ns?(G(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Xi();G(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new Jy(ev());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new xo(e,n);return r.createInstance=xo.createInstance,r}cloneInstance(e={},n=ul){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new xo(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,d)=>(c[d]={...l[u][d]},c),l[u]),l),{});i.store=new qy(a,s),i.services.resourceStore=i.store}return i.translator=new Su(i.services,s),i.translator.on("*",(a,...l)=>{i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rt=xo.createInstance();rt.createInstance;rt.dir;rt.init;rt.loadResources;rt.reloadResources;rt.use;rt.changeLanguage;rt.getFixedT;rt.t;rt.exists;rt.setDefaultNamespace;rt.hasLoadedNamespace;rt.loadNamespaces;rt.loadLanguages;const wj=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,bj={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Sj=t=>bj[t],xj=t=>t.replace(wj,Sj);let Xh={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xj};const Ej=(t={})=>{Xh={...Xh,...t}},KU=()=>Xh;let Kx;const Tj=t=>{Kx=t},qU=()=>Kx,Cj={type:"3rdParty",init(t){Ej(t.options.react),Tj(t)}},_j={archa:"Archa",manual:"Manual do Participante",logout:"Sair"},kj={home:"Página inicial",winners:"Projetos Vencedores",sponsors:"Patrocinadores",map:"Mapa do Evento",benfeitoria:"Benfeitoria",canalSeguro:"Canal Seguro",buyTicket:"Comprar Ingresso",accessPlatform:"Acessar Plataforma",quote:"Contrate um projeto de arquitetura",programacao:"Programação"}
137,Aj={ministry:"Ministério da Cultura apresenta",subtitle:"Promovendo a cultura e arquitetura brasileira como bem acessível, relevante e necessário para a vida cotidiana da população.",date:"25 de Março a 30 de Abril de 2026",location:"Parque Ibirapuera, São Paulo - SP"},Pj={text:"PROMOVENDO A CULTURA E ARQUITETURA BRASILEIRA COMO BEM ACESSÍVEL, RELEVANTE E NECESSÁRIO PARA A VIDA COTIDIANA DA POPULAÇÃO."},Rj={title:"SOBRE A BAB",text1:"A BAB (Bienal de Arquitetura Brasileira) é um evento cultural que celebra a produção arquitetônica nacional, aproximando a arquitetura da vida real. Ela nasce com o propósito de democratizar o acesso à arquitetura no Brasil, apresentando-a como uma ferramenta prática, cultural e sensível para transformar o cotidiano.",text2:"Criada em São Paulo e feita para todo o Brasil, a BAB é mais do que uma mostra, ela será uma experiência imersiva e educativa, reunindo diferentes vozes, territórios e formas de habitar, com espaços que misturam ambientações reais, ativações sensoriais, exposições de marcas e novos talentos."},Oj={p1_title:"ARQUITETURA PARA TODOS",p1_text:"A arquitetura deve ser acessível e presente no dia a dia, mostrando seu poder de transformar espaços e vidas.",p2_title:"TRANSFORMAR COM PROJETO",p2_text:"O projeto arquitetônico é essencial em qualquer mudança, unindo necessidade, estética e funcionalidade.",p3_title:"UM NOVO OLHAR PARA O BRASIL",p3_text:"Todo espaço pode ganhar mais valor quando planejado por um arquiteto qualificado, tornando o Brasil mais consciente e planejado."},Lj={p1_title:"CULTURA E EDUCAÇÃO",p1_text:"Cultura e educação despertam curiosidade e aproximam o público do universo da arquitetura.",p2_title:"INOVAÇÃO QUE APROXIMA",p2_text:"Tecnologia e novas ferramentas democratizam o acesso a projetos de qualidade e soluções criativas.",p3_title:"BRASILIDADE EM CADA TRAÇO",p3_text:"Celebramos a diversidade estética brasileira, conectando arquitetura, cores, materiais e modos de habitar."},Ij={title:`OS VENCEDORES DA
138CONCORRÊNCIA BAB`,button:"Conheça os projetos vencedores",text1:"A concorrência de arquitetura da BAB chegou ao fim, e os projetos vencedores já foram definidos. Após um processo aberto, colaborativo e criterioso, organizado pela plataforma Archa, profissionais de todo o país apresentaram propostas que revelam a pluralidade da arquitetura brasileira contemporânea.",text2:"Agora, esses times passam a representar seus respectivos estados no Pavilhão Brasil, criando ambientes que expressam não apenas identidades regionais, mas também a riqueza dos biomas brasileiros — da Amaz
138ônia ao Pampa, do Cerrado à Mata Atlântica, da Caatinga ao Pantanal.",text3:"Para que essas ideias saiam do papel e ganhem forma, cada projeto conta com o apoio do público. Acreditamos que a construção do Pavilhão Brasil é um processo coletivo — e todos podem fazer parte dessa realização."},Nj={title:`APOIE OS PROJETOS DA
139BIENAL DE ARQUITETURA
140BRASILEIRA`,text1:"Para viabilizar os projetos selecionados, a BAB criou uma página exclusiva na Benfeitoria. É por meio dela que você pode conhecer cada projeto, entender seus conceitos e apoiar diretamente os arquitetos que irão representar os estados pelos ambientes do Pavilhão Brasil.",text2:"Ao contribuir, você ajuda a transformar ideias em espaços reais, fortalecendo a arquitetura como expressão cultural, social e territorial.",button:"Apoie os projetos da BAB"},jj={title:`PROFISSIONAIS E
141INDÚSTRIA`,text1:"A BAB é um ponto de encontro entre quem projeta e quem produz.",text2:"De um lado, profissionais de arquitetura e design de interiores; do outro, marcas que investem em inovação e acreditam no poder do projeto e na arquitetura.",text3:"Juntos, constroem uma narrativa sobre o Brasil criativo, técnico e humano.",stat1:"110K VISITANTES",stat2:"15 PATROCINADORES PRINCIPAIS",stat3:"PALCOS PARA PALESTRAS E EVENTOS",stat4:"MAIS DE 40 ESCRITÓRIOS DE ARQUITETURA ENVOLVIDOS"},Dj={title:"NOTÍCIAS E CONTEÚDO",subtitle1:"Espaço dedicado à difusão de ideias, projetos e protagonistas da arquitetura brasileira.",subtitle2:"Publicações sobre concursos, entrevistas, bastidores, referências e matérias especiais que ajudam a formar repertório e aproximar o público da prática arquitetônica."},Mj={title:"CONTATO",sponsor:"QUERO PATROCINAR",partnership:"PARCERIAS",press:"JORNALISTA / IMPRENSA"},$j={tagline:"PROMOVENDO A CULTURA E ARQUITETURA BRASILEIRA COMO BEM ACESSÍVEL E NECESSÁRIO PARA A POPULAÇÃO.",quickLinks:"LINKS RÁPIDOS",home:"Home",aboutBab:"Sobre a BAB",eventMap:"Mapa do Evento",supportBenfeitoria:"Apoie na Benfeitoria",usefulInfo:"INFORMAÇÕES ÚTEIS",buyTickets:"Comprar Ingressos",contact:"CONTATO",copyright:"© 2026 Bienal de Arquitetura Brasileira. Todos os direitos reservados.",leiRouanet:"Realizado com recursos da Lei Federal de Incentivo à Cultura (Lei Rouanet - Lei 8.313/91)",privacy:"Política de Privacidade",terms:"Termos de Serviço",accessibility:"Acessibilidade"},Bj={title:"Receba notícias exclusivas da Bienal de Arquitetura Brasileira",description:"Assine nossa newsletter e acompanhe as principais atualizações, eventos e comunicados oficiais da BAB.",emailLabel:"Insira seu e-mail",emailPlaceholder:"seuendereç[email protected]",selectLabel:"Selecione uma opção",optArchitect:"Sou Arquiteto/Designer",optBrand:"Sou marca e quero apoiar",optPress:"Sou jornalista / imprensa",optVisitor:"Sou visitante",button:"QUERO ME INSCREVER"},Uj={floor:"TÉRREO — ÁREA EXTERNA"},Fj={visitors:"VISITANTES",sponsors:"PATROCINADORES PRINCIPAIS",stages:"PALCOS PARA PALESTRAS E EVENTOS",supporters:"APOIADORES INSTITUCIONAIS",offices:"ESCRITÓRIOS DE ARQUITETURA ENVOLVIDOS"},Vj={title:"Confira o Projeto do Masterplan da BAB",description:"O Estudio Leonardo Zanatta foi o vencedor do concurso do masterplan e criou um conceito de projeto masterplan da primeira edição da Bienal de Arquitetura Brasileira. Um território comum em que cada estado possa falar sobre si mesmo, dissolvendo as fronteiras invisíveis que nos separam e olhando para o que nos une.",button:"Assista o Vídeo do Projeto"},zj={title:"OS VENCEDORES DA CONCORRÊNCIA BAB",button:"Conheça os projetos vencedores",text1:"Cada ambiente do Pavilhão Brasil (PACUBRA) foi escolhido por meio de um concurso promovido pela Archa, que convidou arquitetos de todo o país a transformar seus territórios, culturas e biomas em arquitetura. A iniciativa buscou reunir diferentes olhares e experiências, valorizando a diversidade regional e a riqueza das identidades locais por meio do espaço construído.",text2:"Cada projeto nasce desse processo coletivo de escuta, criação e representação, no qual referências culturais, saberes tradicionais, técnicas construtivas e contextos ambientais 
141se traduzem em propostas arquitetônicas únicas. O resultado é um conjunto de ambientes que não apenas ocupam o pavilhão, mas contam histórias, conectam pessoas e revelam a pluralidade do Brasil através da arquitetura contemporânea."},Hj={title:"EXPLORE O BRASIL ATRAVÉS DOS SEUS BIOMAS",text1:"Do frescor da Amazônia ao horizonte dos Pampas, a BAB reuniu talentos de todas as regiões para criar pavilhões que traduzem a alma do nosso país. Navegue pelo nosso mapa exclusivo e conheça cada projeto, estado e detalhe das instalações que compõem o Pavilhão Brasil.",button:"Explorar o mapa do evento"},Wj={title:"Contato e Parcerias",architect:"Sou arquiteto/designer/criativo e quero apoiar",brand:"Sou marca e quero apoiar",press:"Sou jornalista / imprensa"},Kj={pageTitle:"Patrocinadores",pageSubtitle:"Conheça os patrocinadores que tornam a Bienal de Arquitetura Brasileira possível.",wantToSponsor:"Quero Patrocinar",partnerships:"Parcerias",realizacao:"Realização",pronac:"Projeto viabilizado pelo Programa Nacional de Apoio à Cultura (PRONAC) — Lei 8.313/91",mantenedores:"Mantenedores",patrocinadores:"Patrocinadores",apoiadores:"Apoiadores"},qj={selectorTitle:"Biomas Brasileiros no Pacubra",selectorSubtitle:"Os biomas brasileiros revelam modos únicos de viver e construir. Explore como a arquitetura traduz cada território, suas narrativas e identidades.",selectorCta:"Escolha um bioma e conheça os projetos que o representam:",supportProject:"Apoiar Projeto",comingSoon:"Em breve",descricao:{amazonia:"Arquiteturas do bioma Amazônia que expressam território, cultura e saberes ancestrais, afirmando preservação, pertencimento e continuidade da vida.",cerrado:"Arquiteturas do Cerrado expressam resistência e adaptação, conectando sol, terra e ancestralidade a visões de cotidiano e futuro.",caatinga:"Arquiteturas da Caatinga transformam escassez em inteligência construtiva, celebrando o viver sertanejo, a cultura popular e a potência do semiárido.","mata-atlantica":"Arquiteturas da Mata Atlântica equilibram memória, paisagem e contemporaneidade, dialogando com patrimônio, natureza e modos de viver em transformação.",pampa:"Arquiteturas do Pampa valorizam afeto, pertencimento e o morar coletivo, expressando tradição, cotidiano e identidade cultural do Sul.",pantanal:"Arquiteturas do Pantanal expressam fluidez, equilíbrio e cuidado ambiental, em profunda relação com o tempo, o clima e o território."}},Gj={title:"404",text:"Página não encontrada",button:"Voltar ao Início"},Jj={pageTitle:"Canal Seguro BAB — Denúncia Anônima",metaDescription:"Canal seguro para denúncias anônimas na Bienal de Arquitetura Brasileira.",title:"Canal Seguro BAB",subtitle:"Canal de denúncias anônimas e seguras"},Yj={header:_j,nav:kj,hero:Aj,tagline:Pj,about:Rj,pilares1:Oj,pilares2:Lj,vencedores:Ij,apoie:Nj,profissionais:jj,noticias:Dj,contato:Mj,footer:$j,newsletter:Bj,map:Uj,numbers:Fj,masterplan:Vj,contests:zj,pavilions:Hj,contact:Wj,patrocinadores:Kj,biomas:qj,notfound:Gj,canalSeguro:Jj},Qj={archa:"Archa",manual:"Participant's Manual",logout:"Logout"},Xj={home:"Home",winners:"Winning Projects",sponsors:"Sponsors",map:"Event Map",benfeitoria:"Benfeitoria",canalSeguro:"Safe Channel",buyTicket:"Buy Ticket",accessPlatform:"Access Platform",quote:"Hire an architecture project",programacao:"Schedule"},Zj={ministry:"Ministry of Culture presents",subtitle:"Promoting Brazilian culture and architecture as an accessible, relevant and necessary asset for the daily life of the population.",date:"March 25 to April 30, 2026",location:"Ibirapuera Park, São Paulo - SP"},eD={text:"PROMOTING BRAZILIAN CULTURE AND ARCHITECTURE AS AN ACCESSIBLE, RELEVANT AND NECESSARY ASSET FOR THE DAILY LIFE OF THE POPULATION."},tD={title:"ABOUT BAB",text1:"BAB (Brazilian Architecture Biennial) is a cultural event that celebrates national architectural production, bringing architecture closer to real life. It was created with the purpose of democratizing access to architecture in Brazil, presenting it as a practical, cultural and sensitive tool to transform everyday life.",text2:"Created in São Paulo and made for all of Brazil, BAB is more than an exhibition, it will be an immersive and educational experience, bringing together different voices, territories and ways of living, with spaces that mix real environments, sensory activations, brand exhibitions and new talents."},nD={p1_title:"ARCHITECTURE FOR ALL",p1_text:"Architecture must be accessible and present in daily life, showing its power to transform space
141s and lives.",p2_title:"TRANSFORM THROUGH DESIGN",p2_text:"Architectural design is essential in any change, uniting necessity, aesthetics and functionality.",p3_title:"A NEW PERSPECTIVE ON BRAZIL",p3_text:"Every space can gain more value when planned by a qualified architect, making Brazil more conscious and planned."},rD={p1_title:"CULTURE AND EDUCATION",p1_text:"Culture and education spark curiosity and bring the public closer to the world of architecture.",p2_title:"INNOVATION THAT CONNECTS",p2_text:"Technology and new tools democratize access to quality projects and creative solutions.",p3_title:"BRAZILIANNESS IN EVERY LINE",p3_text:"We celebrate Brazilian aesthetic diversity, connecting architecture, colors, materials and ways of living."},sD={title:`BAB COMPETITION
142WINNERS`,button:"Discover the winning projects",text1:"The BAB architecture competition has come to an end, and the winning projects have been defined. After an open, collaborative and rigorous process, organized by the Archa platform, professionals from across the country presented proposals that reveal the plurality of contemporary Brazilian architecture.",text2:"Now, these teams represent their respective states in the Brazil Pavilion, creating environments that express not only regional identities but also the richness of Brazilian biomes — from the Amazon to the Pampas, from the Cerrado to the Atlantic Forest, from the Caatinga to the Pantanal.",text3:"For these ideas to come off the paper and take shape, each project relies on public support. We believe that building the Brazil Pavilion is a collective process — and everyone can be part of this achievement."},iD={title:`SUPPORT THE PROJECTS OF THE
143BRAZILIAN ARCHITECTURE
144BIENNIAL`,text1:"To make the selected projects viable, BAB created an exclusive page on Benfeitoria. Through it, you can learn about each project, understand their concepts and directly support the architects who will represent the states in the Brazil Pavilion spaces.",text2:"By contributing, you help transform ideas into real spaces, strengthening architecture as a cultural, social and territorial expression.",button:"Support BAB projects"},oD={title:`PROFESSIONALS &
145INDUSTRY`,text1:"BAB is a meeting point between those who design and those who produce.",text2:"On one side, architecture and interior design professionals; on the other, brands that invest in innovation and believe in the power of design and architecture.",text3:"Together, they build a narrative about creative, technical and human Brazil.",stat1:"110K VISITORS",stat2:"15 MAIN SPONSORS",stat3:"STAGES FOR LECTURES AND EVENTS",stat4:"MORE THAN 40 ARCHITECTURE OFFICES INVOLVED"},aD={title:"NEWS & CONTENT",subtitle1:"A space dedicated to spreading ideas, projects and protagonists of Brazilian architecture.",subtitle2:"Publications about competitions, interviews, behind the scenes, references and special articles that help build repertoire and bring the public closer to architectural practice."},lD={title:"CONTACT",sponsor:"I WANT TO SPONSOR",partnership:"PARTNERSHIPS",press:"JOURNALIST / PRESS"},uD={tagline:"PROMOTING BRAZILIAN CULTURE AND ARCHITECTURE AS AN ACCESSIBLE AND NECESSARY ASSET FOR THE POPULATION.",quickLinks:"QUICK LINKS",home:"Home",aboutBab:"About BAB",eventMap:"Event Map",supportBenfeitoria:"Support on Benfeitoria",usefulInfo:"USEFUL INFO",buyTickets:"Buy Tickets",contact:"CONTACT",copyright:"© 2026 Brazilian Architecture Biennial. All rights reserved.",leiRouanet:"Made possible by the Federal Cultural Incentive Law (Lei Rouanet - Law 8.313/91)",privacy:"Privacy Policy",terms:"Terms of Service",accessibility:"Accessibility"},cD={title:"Get exclusive news from the Brazilian Architecture Biennial",description:"Subscribe to our newsletter and follow the main updates, events and official announcements from BAB.",emailLabel:"Enter your email",emailPlaceholder:"[email protected]",selectLabel:"Select an option",optArchitect:"I'm an Architect/Designer",optBrand:"I'm a brand and want to support",optPress:"I'm a journalist / press",optVisitor:"I'm a visitor",button:"I WANT TO SUBSCRIBE"},dD={floor:"GROUND FLOOR — OUTDOOR AREA"},hD={visitors:"VISITORS",sponsors:"MAIN SPONSORS",stages:"STAGES FOR LECTURES AND EVENTS",supporters:"INSTITUTIONAL SUPPORTERS",offices:"ARCHITECTURE OFFICES INVOLVED"},fD={title:"Check out the BAB Masterplan Project",description:"Estudio Leonardo Zanatta was the winner of the masterplan competition and created a masterplan project concept for the first edition of the Brazilian Architecture Biennial. A common territory where each state can speak about itself, dissolving the invisible borders that separate us and looking at what unites us.",button:"Watch the Project Video"},pD={title:"BAB COMPETITION WINNERS",button:"Discover the winning projects",text1:"Each space in the Brazil Pavilion (PACUBRA) was chosen through a competition organized by Archa, which invited architects from across the country to transform their territories, cultures and biomes into architecture. The initiative sought to bring together different perspectives and experiences, valuing regional diversity and the richness of local identities through the built environment.",text2:"Each project is born from this collective process of listening, creation and representation, in 
145which cultural references, traditional knowledge, construction techniques and environmental contexts are translated into unique architectural proposals. The result is a set of spaces that not only occupy the pavilion but tell stories, connect people and reveal Brazil's plurality through contemporary architecture."},mD={title:"EXPLORE BRAZIL THROUGH ITS BIOMES",text1:"From the freshness of the Amazon to the horizon of the Pampas, BAB brought together talents from all regions to create pavilions that translate the soul of our country. Navigate our exclusive map and discover each project, state and detail of the installations that make up the Brazil Pavilion.",button:"Explore the event map"},gD={title:"Contact and Partnerships",architect:"I'm an architect/designer/creative and want to support",brand:"I'm a brand and want to support",press:"I'm a journalist / press"},yD={pageTitle:"Sponsors",pageSubtitle:"Meet the sponsors that make the Brazilian Architecture Biennial possible.",wantToSponsor:"I Want to Sponsor",partnerships:"Partnerships",realizacao:"Production",pronac:"Made possible by the National Program for Culture Support (PRONAC) — Law 8.313/91",mantenedores:"Maintainers",patrocinadores:"Sponsors",apoiadores:"Supporters"},vD={selectorTitle:"Brazilian Biomes at Pacubra",selectorSubtitle:"Brazilian biomes reveal unique ways of living and building. Explore how architecture translates each territory, its narratives and identities.",selectorCta:"Choose a biome and discover the projects that represent it:",supportProject:"Support Project",comingSoon:"Coming soon",descricao:{amazonia:"Architectures of the Amazon biome that express territory, culture and ancestral knowledge, affirming preservation, belonging and the continuity of life.",cerrado:"Cerrado architectures express resistance and adaptation, connecting sun, earth and ancestry to visions of everyday life and the future.",caatinga:"Caatinga architectures transform scarcity into constructive intelligence, celebrating the sertanejo way of life, popular culture and the power of the semi-arid region.","mata-atlantica":"Atlantic Forest architectures balance memory, landscape and contemporaneity, dialoguing with heritage, nature and evolving ways of living.",pampa:"Pampa architectures value affection, belonging and collective living, expressing tradition, daily life and the cultural identity of southern Brazil.",pantanal:"Pantanal architectures express fluidity, balance and environmental care, in a deep relationship with time, climate and territory."}},wD={title:"404",text:"Page not found",button:"Back to Home"},bD={pageTitle:"Safe Channel BAB — Anonymous Report",metaDescription:"Secure channel for anonymous reports at the Brazilian Architecture Biennial.",title:"Safe Channel BAB",subtitle:"Anonymous and secure reporting channel"},SD={header:Qj,nav:Xj,hero:Zj,tagline:eD,about:tD,pilares1:nD,pilares2:rD,vencedores:sD,apoie:iD,profissionais:oD,noticias:aD,contato:lD,footer:uD,newsletter:cD,map:dD,numbers:hD,masterplan:fD,contests:pD,pavilions:mD,contact:gD,patrocinadores:yD,biomas:vD,notfound:wD,canalSeguro:bD};rt.use(Cj).init({resources:{pt:{translation:Yj},en:{translation:SD}},lng:"pt",fallbackLng:"pt",interpolation:{escapeValue:!1}});function xD(){const t=new Set(["bienaldearquiteturabrasileira.com","www.bienaldearquiteturabrasileira.com"]);function e(s){try{return s.startsWith("http://")||s.startsWith("https://")?new URL(s):new URL(s,"https://bienaldearquiteturabrasileira.com")}catch{return null}}function n(s){const i=e(s);if(!i)return"";const o=i.hostname,a=o==="proxy.bienaldearquiteturabrasileira.com",l=t.has(o);if(!a&&!l)return"";const u=i.pathname.split("/").filter(Boolean);return u[0]==="p"&&u[1]?`https://bienaldearquiteturabrasileira.com/${u[1]}${i.search}${i.hash}`:u[0]==="bienal-de-arquitetura-brasileira"&&u[1]?`https://bienaldearquiteturabrasileira.com/${u[1]}${i.search}${i.hash}`:u[0]?`https://bienaldearquiteturabrasileira.com/${u[0]}${i.search}${i.hash}`:"https://bienaldearquiteturabrasileira.com/"}const r=s=>{if(s.origin!=="https://proxy.bienaldearquiteturabrasileira.com")return;const i=s.data;if(!i||i.type!=="BAB_NAVIGATE_TOP")return;const o=typeof i.href=="string"?i.href:typeof i.url=="string"?i.url:"";if(!o)return;const a=n(o);a&&window.location.href!==a&&window.location.assign(a)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}function ED(t){const[e,n]=b.useState(0),r=t.length;return b.useEffect(()=>{let s=!1;return t.forEach(i=>
vendor: 9,642 bytes, line 145
145{const o=new Image;o.onload=o.onerror=()=>{s||n(a=>a+1)},o.src=i}),()=>{s=!0}},[]),{allLoaded:e>=r,progress:r>0?Math.round(e/r*100):100}}const qx=b.createContext({});function TD(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const Gx=typeof window<"u",CD=Gx?b.useLayoutEffect:b.useEffect,Bp=b.createContext(null);function Up(t,e){t.indexOf(e)===-1&&t.push(e)}function xu(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const vn=(t,e,n)=>n>e?e:n<t?t:n;let lc=()=>{},Ci=()=>{};const Dn={},Jx=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Yx(t){return typeof t=="object"&&t!==null}const Qx=t=>/^0[^.\s]+$/u.test(t);function Xx(t){let e;return()=>(e===void 0&&(e=t()),e)}const Rt=t=>t,_D=(t,e)=>n=>e(t(n)),Ea=(...t)=>t.reduce(_D),sa=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Fp{constructor(){this.subscriptions=[]}add(e){return Up(this.subscriptions,e),()=>xu(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ot=t=>t*1e3,At=t=>t/1e3;function Zx(t,e){return e?t*(1e3/e):0}const eE=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,kD=1e-7,AD=12;function PD(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=eE(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>kD&&++a<AD);return o}function Ta(t,e,n,r){if(t===e&&n===r)return Rt;const s=i=>PD(i,0,1,t,n);return i=>i===0||i===1?i:eE(s(i),e,r)}const tE=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,nE=t=>e=>1-t(1-e),rE=Ta(.33,1.53,.69,.99),Vp=nE(rE),sE=tE(Vp),iE=t=>(t*=2)<1?.5*Vp(t):.5*(2-Math.pow(2,-10*(t-1))),zp=t=>1-Math.sin(Math.acos(t)),oE=nE(zp),aE=tE(zp),RD=Ta(.42,0,1,1),OD=Ta(0,0,.58,1),lE=Ta(.42,0,.58,1),LD=t=>Array.isArray(t)&&typeof t[0]!="number",uE=t=>Array.isArray(t)&&typeof t[0]=="number",nv={linear:Rt,easeIn:RD,easeInOut:lE,easeOut:OD,circIn:zp,circInOut:aE,circOut:oE,backIn:Vp,backInOut:sE,backOut:rE,anticipate:iE},ID=t=>typeof t=="string",rv=t=>{if(uE(t)){Ci(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,r,s]=t;return Ta(e,n,r,s)}else if(ID(t))return Ci(nv[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),nv[t];return t},cl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],sv={value:null,addProjectionMetrics:null};function ND(t,e){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 u(d){o.has(d)&&(c.schedule(d),t()),l++,d(a)}const c={schedule:(d,h=!1,f=!1)=>{const m=f&&s?n:r;return h&&o.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),e&&sv.value&&sv.value.frameloop[e].push(l),l=0,n.clear(),s=!1,i&&(i=!1,c.process(d))}};return c}const jD=40;function cE(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=cl.reduce((v,S)=>(v[S]=ND(i,e?S:void 0),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=o,m=()=>{const v=Dn.useManualTiming?s.timestamp:performance.now();n=!1,Dn.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,jD),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),h.process(s),f.process(s),p.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(m))},w=()=>{n=!0,r=!0,s.isProcessing||t(m)};return{schedule:cl.reduce((v,S)=>{const x=o[S];return v[S]=(E,T=!1,C=!1)=>(n||w(),x.schedule(E,T,C)),v},{}),cancel:v=>{for(let S=0;S<cl.length;S++)o[cl[S]].cancel(v)},state:s,steps:o}}const{schedule:ue,cancel:_r,state:$e,steps:od}=cE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Rt,!0);let Ol;function DD(){Ol=void 0}const Xe={now:()=>(Ol===void 0&&Xe.set($e.isProcessing||Dn.useManualTiming?$e.timestamp:performance.now()),Ol),set:t=>{Ol=t,queueMicrotask(DD)}},dE=t=>e=>typeof e=="string"&&e.startsWith(t),hE=dE("--"),MD=dE("var(--"),Hp=t=>MD(t)?$D.test(t.split("/*")[0].trim()):!1,$D=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function iv(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const ji={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ia={...ji,transform:t=>vn(0,1,t)},dl={...ji,default:1},Eo=t=>Math.round(t*1e5)/1e5,Wp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function BD(t){return t==null}const UD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kp=(t,e)=>n=>!!(typeof n=="string"&&UD.test(n)&&n.startsWith(t)||e&&!BD(n)&&Object.prototype.hasOwnProperty.call(n,e)),fE=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Wp);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},FD=t=>vn(0,255,t),ad={...ji,transform:t=>Math.round(FD(t))},Hr={test:Kp("rgb","red"),parse:fE("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ad.transform(t)+", "+ad.transform(e)+", "+ad.transform(n)+", "+Eo(ia.transform(r))+")"};function VD(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Zh={test:Kp("#"),parse:VD,transform:Hr.transform},Ca=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Gn=Ca("deg"),mn=Ca("%"),U=Ca("px"),zD=Ca("vh"),HD=Ca("vw"),ov={...mn,parse:t=>mn.parse(t)/100,transform:t=>mn.transform(t*100)},Hs={test:Kp("hsl","hue"),parse:fE("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+mn.transform(Eo(e))+", "+mn.transform(Eo(n))+", "+Eo(ia.transform(r))+")"},Ce={test:t=>Hr.test(t)||Zh.test(t)||Hs.test(t),parse:t=>Hr.test(t)?Hr.parse(t):Hs.test(t)?Hs.parse(t):Zh.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Hr.transform(t):Hs.transform(t),getAnimatableNone:t=>{const e=Ce.parse(t);return e.alpha=0,Ce.transform(e)}},WD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function KD(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Wp))==null?void 0:e.length)||0)+(((n=t.match(WD))==null?void 0:n.length)||0)>0}const pE="number",mE="color",qD="var",GD="var(",av="${}",JD=/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 oa(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(JD,l=>(Ce.test(l)?(r.color.push(i),s.push(mE),n.push(Ce.parse(l))):l.startsWith(GD)?(r.var.push(i),s.push(qD),n.push(l)):(r.number.push(i),s.push(pE),n.push(parseFloat(l))),++i,av)).split(av);return{values:n,split:a,indexes:r,types:s}}function gE(t){return oa(t).values}function yE(t){const{split:e,types:n}=oa(t),r=e.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],s[o]!==void 0){const a=n[o];a===pE?i+=Eo(s[o]):a===mE?i+=Ce.transform(s[o]):i+=s[o]}return i}}const YD=t=>typeof t=="number"?0:Ce.test(t)?Ce.getAnimatableNone(t):t;function QD(t){const e=gE(t);return yE(t)(e.map(YD))}const Gt={test:KD,parse:gE,createTransformer:yE,getAnimatableNone:QD};function ld(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function XD({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=ld(l,a,t+1/3),i=ld(l,a,t),o=ld(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Eu(t,e){return n=>n>0?e:t}const ye=(t,e,n)=>t+(e-t)*n,ud=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},ZD=[Zh,Hr,Hs],eM=t=>ZD.find(e=>e.test(t));function lv(t){const e=eM(t);if(lc(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Hs&&(n=XD(n)),n}const uv=(t,e)=>{const n=lv(t),r=lv(e);if(!n||!r)return Eu(t,e);const s={...n};return i=>(s.red=ud(n.red,r.red,i),s.green=ud(n.green,r.green,i),s.blue=ud(n.blue,r.blue,i),s.alpha=ye(n.alpha,r.alpha,i),Hr.transform(s))},ef=new Set(["none","hidden"]);function tM(t,e){return ef.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function nM(t,e){return n=>ye(t,e,n)}function qp(t){return typeof t=="number"?nM:typeof t=="string"?Hp(t)?Eu:Ce.test(t)?uv:iM:Array.isArray(t)?vE:typeof t=="object"?Ce.test(t)?uv:rM:Eu}function vE(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>qp(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function rM(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=qp(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function sM(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],o=t.indexes[i][r[i]],a=t.values[o]??0;n[s]=a,r[i]++}return n}const iM=(t,e)=>{const n=Gt.createTransformer(e),r=oa(t),s=oa(e);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?ef.has(t)&&!s.values.length||ef.has(e)&&!r.values.length?tM(t,e):Ea(vE(sM(r,s),s.values),n):(lc(!0,`Complex values '${t}' and '${e}
145' 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"),Eu(t,e))};function wE(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?ye(t,e,n):qp(t)(t,e)}const oM=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ue.update(e,n),stop:()=>_r(e),now:()=>$e.isProcessing?$e.timestamp:Xe.now()}},bE=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Tu=2e4;function Gp(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Tu;)e+=n,r=t.next(e);return e>=Tu?1/0:e}function aM(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(Gp(r),Tu);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:At(s)}}const lM=5;function SE(t,e,n){const r=Math.max(e-lM,0);return Zx(n-t(r),e-r)}const me={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},cd=.001;function uM({duration:t=me.duration,bounce:e=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let s,i;lc(t<=Ot(me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=vn(me.minDamping,me.maxDamping,o),t=vn(me.minDuration,me.maxDuration,At(t)),o<1?(s=u=>{const c=u*o,d=c*t,h=c-n,f=tf(u,o),p=Math.exp(-d);return cd-h/f*p},i=u=>{const d=u*o*t,h=d*n+n,f=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-d),m=tf(Math.pow(u,2),o);return(-s(u)+cd>0?-1:1)*((h-f)*p)/m}):(s=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-cd+c*d},i=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=dM(s,i,a);if(t=Ot(t),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const cM=12;function dM(t,e,n){let r=n;for(let s=1;s<cM;s++)r=r-t(r)/e(r);return r}function tf(t,e){return t*Math.sqrt(1-e*e)}const hM=["duration","bounce"],fM=["stiffness","damping","mass"];function cv(t,e){return e.some(n=>t[n]!==void 0)}function pM(t){let e={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...t};if(!cv(t,fM)&&cv(t,hM))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*vn(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:me.mass,stiffness:s,damping:i}}else{const n=uM({...t,velocity:0});e={...e,...n,mass:me.mass},e.isResolvedFromDuration=!0}return e}function Cu(t=me.visualDuration,e=me.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;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:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:f}=pM({...n,velocity:-At(n.velocity||0)}),p=h||0,m=u/(2*Math.sqrt(l*c)),w=o-i,g=At(Math.sqrt(l/c)),y=Math.abs(w)<5;r||(r=y?me.restSpeed.granular:me.restSpeed.default),s||(s=y?me.restDelta.granular:me.restDelta.default);let v;if(m<1){const x=tf(g,m);v=E=>{const T=Math.exp(-m*g*E);return o-T*((p+m*g*w)/x*Math.sin(x*E)+w*Math.cos(x*E))}}else if(m===1)v=x=>o-Math.exp(-g*x)*(w+(p+g*w)*x);else{const x=g*Math.sqrt(m*m-1);v=E=>{const T=Math.exp(-m*g*E),C=Math.min(x*E,300);return o-T*((p+m*g*w)*Math.sinh(C)+x*w*Math.cosh(C))/x}}const S={calculatedDuration:f&&d||null,next:x=>{const E=v(x);if(f)a.done=x>=d;else{let T=x===0?p:0;m<1&&(T=x===0?Ot(p):SE(v,x,E));const C=Math.abs(T)<=r,P=Math.abs(o-E)<=s;a.done=C&&P}return a.value=a.done?o:E,a},toString:()=>{const x=Math.min(Gp(S),Tu),E=bE(T=>S.next(x*T).value,x,30);return x+"ms "+E},toTransition:()=>{}};return S}Cu.applyToOptions=t=>{const e=aM(t,100,Cu);return t.ease=e.ease,t.duration=Ot(e.duration),t.type="keyframes",t};function nf({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],h={done:!1,value:d},f=C=>a!==void 0&&C<a||l!==void 0&&C>l,p=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*e;const w=d+m,g=o===void 0?w:o(w);g!==w&&(m=g-d);const y=C=>-m*Math.exp(-C/r),v=C=>g+y(C),S=C=>{const P=y(C),R=v(C);h.done=Math.abs(P)<=u,h.value=h.done?g:R};let x,E;const T=C=>{f(h.value)&&(x=C,E=Cu({keyframes:[h.value,p(h.value)],velocity:SE(v,C,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:C=>{let P=!1;return!E&&x===void 0&&(P=!0,S(C),T(C)),x!==void 0&&C>=x?E.next(C-x):(!P&&S(C),h)}}}function mM(t,e,n){const r=[],s=n||Dn.mix||wE,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Rt:e;a=Ea(l,a)}r.push(a)}return r}function gM(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(Ci(i===e.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=mM(e,r,s),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const h=sa(t[d],t[d+1],c);return a[d](h)};return n?c=>u(vn(t[0],t[i-1],c)):u}function yM(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=sa(0,e,r);t.push(ye(n,1,s))}}function vM(t){const e=[0];return yM(e,t.length-1),e}function wM(t,e){return t.map(n=>n*e)}function bM(t,e){return t.map(()=>e||lE).splice(0,t.length-1)}function To({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=LD(r)?r.map(rv):rv(r),i={done:!1,value:e[0]},o=wM(n&&n.length===e.length?n:vM(e),t),a=gM(o,e,{ease:Array.isArray(s)?s:bM(e,s)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const SM=t=>t!==null;function Jp(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(SM),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const xM={decay:nf,inertia:nf,tween:To,keyframes:To,spring:Cu};function xE(t){typeof t.type=="string"&&(t.type=xM[t.type])}class Yp{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const EM=t=>t/100;class Qp extends Yp{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Xe.now()&&this.tick(Xe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;xE(e);const{type:n=To,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const l=n||To;l!==To&&typeof a[0]!="number"&&(this.mixKeyframes=Ea(EM,wE(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Gp(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,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:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,S=r;if(d){const C=Math.min(this.currentTime,s)/a;let P=Math.floor(C),R=C%1;!R&&C>=1&&(R=1),R===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(h==="reverse"?(R=1-R,f&&(R-=f/a)):h==="mirror"&&(S=o)),v=vn(0,1,R)*a}const x=y?{done:!1,value:c[0]}:S.next(v);
145i&&(x.value=i(x.value));let{done:E}=x;!y&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return T&&p!==nf&&(x.value=Jp(c,this.options,w,this.speed)),m&&m(x.value),T&&this.finish(),x}then(e,n){return this.finished.then(e,n)}get duration(){return At(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+At(e)}get time(){return At(this.currentTime)}set time(e){var n;e=Ot(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Xe.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=At(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=oM,startTime:n}=this.options;this.driver||(this.driver=e(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(Xe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function TM(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Wr=t=>t*180/Math.PI,rf=t=>{const e=Wr(Math.atan2(t[1],t[0]));return sf(e)},CM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:rf,rotateZ:rf,skewX:t=>Wr(Math.atan(t[1])),skewY:t=>Wr(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},sf=t=>(t=t%360,t<0&&(t+=360),t),dv=rf,hv=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),fv=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),_M={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hv,scaleY:fv,scale:t=>(hv(t)+fv(t))/2,rotateX:t=>sf(Wr(Math.atan2(t[6],t[5]))),rotateY:t=>sf(Wr(Math.atan2(-t[2],t[0]))),rotateZ:dv,rotate:dv,skewX:t=>Wr(Math.atan(t[4])),skewY:t=>Wr(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function of(t){return t.includes("scale")?1:0}function af(t,e){if(!t||t==="none")return of(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=_M,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=CM,s=a}if(!s)return of(e);const i=r[e],o=s[1].split(",").map(AM);return typeof i=="function"?i(o):o[i]}const kM=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return af(n,e)};function AM(t){return parseFloat(t.trim())}const Di=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mi=new Set(Di),pv=t=>t===ji||t===U,PM=new Set(["x","y","z"]),RM=Di.filter(t=>!PM.has(t));function OM(t){const e=[];return RM.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const cr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>af(e,"x"),y:(t,{transform:e})=>af(e,"y")};cr.translateX=cr.x;cr.translateY=cr.y;
vendor: 1,908 bytes, line 145
145const Zr=new Set;let lf=!1,uf=!1,cf=!1;function EE(){if(uf){const t=Array.from(Zr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=OM(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uf=!1,lf=!1,Zr.forEach(t=>t.complete(cf)),Zr.clear()}function TE(){Zr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(uf=!0)})}function LM(){cf=!0,TE(),EE(),cf=!1}class Xp{constructor(e,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Zr.add(this),lf||(lf=!0,ue.read(TE),ue.resolveKeyframes(EE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&i===void 0&&s.set(e[0])}TM(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Zr.delete(this)}cancel(){this.state==="scheduled"&&(Zr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const IM=t=>t.startsWith("--");function NM(t,e,n){IM(e)?t.style.setProperty(e,n):t.style[e]=n}const jM={};function CE(t,e){const n=Xx(t);return()=>jM[e]??n()}const DM=CE(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_E=CE(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 5,100 bytes, line 145
145,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),oo=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,mv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:oo([0,.65,.55,1]),circOut:oo([.55,0,1,.45]),backIn:oo([.31,.01,.66,-.59]),backOut:oo([.33,1.53,.69,.99])};function kE(t,e){if(t)return typeof t=="function"?_E()?bE(t,e):"ease-out":uE(t)?oo(t):Array.isArray(t)?t.map(n=>kE(n,e)||mv.easeOut):mv[t]}function MM(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=kE(a,s);Array.isArray(d)&&(c.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 u&&(h.pseudoElement=u),t.animate(c,h)}function AE(t){return typeof t=="function"&&"applyToOptions"in t}function $M({type:t,...e}){return AE(t)&&_E()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class PE extends Yp{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,Ci(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=$M(e);this.animation=MM(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=Jp(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):NM(n,r,c),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 e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return At(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+At(e)}get time(){return At(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ot(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&DM()?(this.animation.timeline=e,Rt):n(this)}}const RE={anticipate:iE,backInOut:sE,circInOut:aE};function BM(t){return t in RE}function UM(t){typeof t.ease=="string"&&BM(t.ease)&&(t.ease=RE[t.ease])}const dd=10;class FM extends PE{constructor(e){UM(e),xE(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Qp({...o,autoplay:!1}),l=Math.max(dd,Xe.now()-this.startTime),u=vn(0,dd,l-dd);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const gv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Gt.test(t)||t==="0")&&!t.startsWith("url("));function VM(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function zM(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=gv(s,e),a=gv(i,e);return lc(o===a,`You are trying to animate ${e} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:VM(t)||(n==="spring"||AE(n))&&r}function df(t){t.duration=0,t.type="keyframes"}const HM=new Set(["opacity","clipPath","filter","transform"]),WM=Xx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function KM(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return WM()&&n&&HM.has(n)&&(n!=="transform"||!u)&&!l&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const qM=40;class GM extends Yp{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:
145o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var m,w;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=Xe.now();const h={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...d},f=(c==null?void 0:c.KeyframeResolver)||Xp;this.keyframeResolver=new f(a,(m,w,g)=>this.onKeyframesResolved(m,w,h,!g),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,r,s){var w,g;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Xe.now(),zM(e,i,o,a)||((Dn.instantAnimations||!l)&&(c==null||c(Jp(e,r,n))),e[0]=e[e.length-1],df(r),r.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>qM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},f=!u&&KM(h),p=(g=(w=h.motionValue)==null?void 0:w.owner)==null?void 0:g.current,m=f?new FM({...h,element:p}):new Qp(h);m.finished.then(()=>{this.notifyFinished()}).catch(Rt),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),LM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function OE(t,e,n,r=0,s=1){const i=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const JM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YM(t){const e=JM.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}const QM=4;function LE(t,e,n=1){Ci(n<=QM,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=YM(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return Jx(o)?parseFloat(o):o}return Hp(s)?LE(s,e,n+1):s}const XM={type:"spring",stiffness:500,damping:25,restSpeed:10},ZM=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),e$={type:"keyframes",duration:.8},t$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},n$=(t,{keyframes:e})=>e.length>2?e$:Mi.has(t)?t.startsWith("scale")?ZM(e[1]):XM:t$,r$=t=>t!==null;function s$(t,{repeat:e,repeatType:n="loop"},r){const s=t.filter(r$),i=e&&n!=="loop"&&e%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function IE(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function Zp(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?IE(n,t):n}function i$({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const em=(t,e,n,r={},s,i)=>o=>{const a=Zp(r,t)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ot(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};i$(a)||Object.assign(c,n$(t,c)),c.duration&&(c.duration=Ot(c.duration)),c.repeatDelay&&(c.repeatDelay=Ot(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(df(c),c.delay===0&&(
vendor: 3,588 bytes, line 145
145d=!0)),(Dn.instantAnimations||Dn.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,df(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!i&&e.get()!==void 0){const h=s$(c.keyframes,a);if(h!==void 0){ue.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new Qp(c):new GM(c)};function yv(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function tm(t,e,n,r){if(typeof e=="function"){const[s,i]=yv(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=yv(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function oi(t,e,n){const r=t.getProps();return tm(r,e,n!==void 0?n:r.custom,t)}const NE=new Set(["width","height","top","left","right","bottom",...Di]),vv=30,o$=t=>!isNaN(parseFloat(t));class a${constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Xe.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(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Xe.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=o$(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Fp);const r=this.events[e].add(n);return e==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Xe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>vv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vv);return Zx(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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 e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _i(t,e){return new a$(t,e)}const hf=t=>Array.isArray(t);function l$(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,_i(n))}function u$(t){return hf(t)?t[t.length-1]||0:t}function c$(t,e){const n=oi(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};
vendor: 4,698 bytes, line 145
145for(const o in i){const a=u$(i[o]);l$(t,o,a)}}const qe=t=>!!(t&&t.getVelocity);function d$(t){return!!(qe(t)&&t.add)}function ff(t,e){const n=t.getValue("willChange");if(d$(n))return n.add(e);if(!n&&Dn.WillChange){const r=new Dn.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function nm(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const h$="framerAppearId",jE="data-"+nm(h$);function DE(t){return t.props[jE]}function f$({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function ME(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();i=i?IE(i,l):l;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const c=[],d=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const f=t.getValue(h,t.latestValues[h]??null),p=a[h];if(p===void 0||d&&f$(d,h))continue;const m={delay:n,...Zp(i||{},h)},w=f.get();if(w!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===w&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const S=DE(t);if(S){const x=window.MotionHandoffAnimation(S,h,ue);x!==null&&(m.startTime=x,g=!0)}}ff(t,h);const y=u??t.shouldReduceMotion;f.start(em(h,f,p,y&&NE.has(h)?{type:!1}:m,t,g));const v=f.animation;v&&c.push(v)}if(o){const h=()=>ue.update(()=>{o&&c$(t,o)});c.length?Promise.all(c).then(h):h()}return c}function pf(t,e,n={}){var l;const r=oi(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(ME(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:h}=s;return p$(t,e,u,c,d,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function p$(t,e,n=0,r=0,s=0,i=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(pf(l,e,{...o,delay:n+(typeof r=="function"?0:r)+OE(t.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function m$(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>pf(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=pf(t,e,n);else{const s=typeof e=="function"?oi(t,e,n.custom):e;r=Promise.all(ME(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const g$={test:t=>t==="auto",parse:t=>t},$E=t=>e=>e.test(t),BE=[ji,U,mn,Gn,HD,zD,g$],wv=t=>BE.find($E(t));function y$(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Qx(t):!0}const v$=new Set(["brightness","contrast","saturate","opacity"]);function w$(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Wp)||[];if(!r)return t;const s=n.replace(r,"");let i=v$.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const b$=/\b([a-z-]*)\(.*?\)/gu,mf={...Gt,getAnimatableNone:t=>{const e=t.match(b$);return e?e.map(w$).join(" "):t}},gf={...Gt,getAnimatableNone:t=>{const e=Gt.parse(t);return Gt.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},bv={...ji,transform:Math.round},S$={rotate:Gn,rotateX:Gn,rotateY:Gn,rotateZ:Gn,scale:dl,scaleX:dl,scaleY:dl,scaleZ:dl,skew:Gn,skewX:Gn,skewY:Gn,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:ia,originX:ov,originY:ov,originZ:U},rm={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,top:U,right:U,bottom:U,left:U,inset:U,insetBlock:U,insetBlockStart:U,insetBlockEnd:U,insetInline:U,insetInlineStart:U,insetInlineEnd:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,paddingBlock:U,paddingBlockStart:U,paddingBlockEnd:U,paddingInline:U,paddingInlineStart:U,paddingInlineEnd:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,marginBlock:U,marginBlockStart:U,marginBlockEnd:U,marginInline:U,marginInlineStart:U,marginInlineEnd:U,fontSize:U,backgroundPositionX:U,backgroundPositionY:U,...S$,zIndex:bv,fillOpacity:ia,strokeOpacity:ia,numOctaves:bv},x$={...rm,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:mf,WebkitFilter:mf,mask:gf,WebkitMask:gf},UE=t=>x$[t],E$=new Set([mf,gf]);function FE(t,e){let n=UE(t);return E$.has(n)||(n=Gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,717 bytes, line 145
145const T$=new Set(["auto","none","0"]);function C$(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!T$.has(i)&&oa(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=FE(n,s)}class _$ extends Xp{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let d=e[c];if(typeof d=="string"&&(d=d.trim(),Hp(d))){const h=LE(d,n.current);h!==void 0&&(e[c]=h),c===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!NE.has(r)||e.length!==2)return;const[s,i]=e,o=wv(s),a=wv(i),l=iv(s),u=iv(i);if(l!==u&&cr[r]){this.needsMeasurement=!0;return}if(o!==a)if(pv(o)&&pv(a))for(let c=0;c<e.length;c++){const d=e[c];typeof d=="string"&&(e[c]=parseFloat(d))}else cr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||y$(e[s]))&&r.push(s);r.length&&C$(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=cr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 10,874 bytes, line 145
145h(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const k$=new Set(["opacity","clipPath","filter","transform"]);function VE(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const zE=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function A$(t){return Yx(t)&&"offsetHeight"in t}const{schedule:sm,cancel:GU}=cE(queueMicrotask,!1),$t={x:!1,y:!1};function HE(){return $t.x||$t.y}function P$(t){return t==="x"||t==="y"?$t[t]?null:($t[t]=!0,()=>{$t[t]=!1}):$t.x||$t.y?null:($t.x=$t.y=!0,()=>{$t.x=$t.y=!1})}function WE(t,e){const n=VE(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function R$(t){return!(t.pointerType==="touch"||HE())}function O$(t,e,n={}){const[r,s,i]=WE(t,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},d=w=>{u&&(u(w),u=void 0),c()},h=w=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(w))},f=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},p=w=>{if(w.pointerType!=="touch"){if(a){l=!0;return}d(w)}},m=w=>{if(!R$(w))return;l=!1;const g=e(o,w);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",p,s))};o.addEventListener("pointerenter",m,s),o.addEventListener("pointerdown",f,s)}),i}const KE=(t,e)=>e?t===e?!0:KE(t,e.parentElement):!1,im=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,L$=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function I$(t){return L$.has(t.tagName)||t.isContentEditable===!0}const N$=new Set(["INPUT","SELECT","TEXTAREA"]);function j$(t){return N$.has(t.tagName)||t.isContentEditable===!0}const Ll=new WeakSet;function Sv(t){return e=>{e.key==="Enter"&&t(e)}}function hd(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const D$=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Sv(()=>{if(Ll.has(n))return;hd(n,"down");const s=Sv(()=>{hd(n,"up")}),i=()=>hd(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function xv(t){return im(t)&&!HE()}const Ev=new WeakSet;function M$(t,e,n={}){const[r,s,i]=WE(t,n),o=a=>{const l=a.currentTarget;if(!xv(a)||Ev.has(a))return;Ll.add(l),n.stopPropagation&&Ev.add(a);const u=e(l,a),c=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Ll.has(l)&&Ll.delete(l),xv(f)&&typeof u=="function"&&u(f,{success:p})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||KE(l,f.target))},h=f=>{c(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),A$(a)&&(a.addEventListener("focus",u=>D$(u,s)),!I$(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function om(t){return Yx(t)&&"ownerSVGElement"in t}const Il=new WeakMap;let Jn;const qE=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:om(r)&&"getBBox"in r?r.getBBox()[e]:r[n],$$=qE("inline","width","offsetWidth"),B$=qE("block","height","offsetHeight");function U$({target:t,borderBoxSize:e}){var n;(n=Il.get(t))==null||n.forEach(r=>{r(t,{get width(){return $$(t,e)},get height(){return B$(t,e)}})})}function F$(t){t.forEach(U$)}function V$(){typeof ResizeObserver>"u"||(Jn=new ResizeObserver(F$))}function z$(t,e){Jn||V$();const n=VE(t);return n.forEach(r=>{let s=Il.get(r);s||(s=new Set,Il.set(r,s)),s.add(e),Jn==null||Jn.observe(r)}),()=>{n.forEach(r=>{const s=Il.get(r);s==null||s.delete(e),s!=null&&s.size||Jn==null||Jn.unobserve(r)})}}const Nl=new Set;let Ws;function H$(){Ws=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nl.forEach(e=>e(t))},window.addEventListener("resize",Ws)}function W$(t){return Nl.add(t),Ws||H$(),()=>{Nl.delete(t),!Nl.size&&typeof Ws=="function"&&(window.removeEventListener("resize",Ws),Ws=void 0)}}function Tv(t,e){return typeof t=="function"?W$(t):z$(t,e)}function K$(t){return om(t)&&t.tagName==="svg"}const q$=[...BE,Ce,Gt],G$=t=>q$.find($E(t)),Cv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ks=()=>({x:Cv(),y:Cv()}),_v=()=>({min:0,max:0}),Ae=()=>({x:_v(),y:_v()}),J$=new WeakMap;function uc(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function aa(t){return typeof t=="string"||Array.isArray(t)}const am=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lm=["initial",...am];function cc(t){return uc(t.animate)||lm.some(e=>aa(t[e]))}function GE(t){return!!(cc(t)||t.variants)}function Y$(t,e,n){for(const r in e){const s=e[r],i=n[r];if(qe(s))t.addValue(r,s);else if(qe(i))t.addValue(r,_i(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,_i(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const yf={current:null},JE={current:!1},Q$=typeof window<"u";function X$(){if(JE.current=!0,!!Q$)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>yf.current=t.matches;t.addEventListener("change",e),e()}else yf.current=!1}const kv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _u={};function YE(t){_u=t}function Z$(){return _u}class eB{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,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=Xp,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=Xe.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ue.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=cc(n),this.isVariantNode=GE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];u[f]!==void 0&&qe(p)&&p.set(u[f])}}mount(e){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=e,J$.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),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:(JE.current||X$(),this.shouldReduceMotion=yf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),_r(this.notifyUpdate),_r(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.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(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&k$.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new PE({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:Ot(c)}),h=o(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}const r=Mi.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in _u){const n=_u[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];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):Ae()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<kv.length;r++){const s=kv[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Y$(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
vendor: 4,884 bytes, line 145
145addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=_i(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Jx(r)||Qx(r))?r=parseFloat(r):!G$(r)&&Gt.test(n)&&(r=FE(e,n)),this.setBaseTarget(e,qe(r)?r.get():r)),qe(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=tm(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!qe(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Fp),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){sm.render(this.render)}}class QE extends eB{constructor(){super(...arguments),this.KeyframeResolver=_$}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;qe(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Rr{constructor(e){this.isMounted=!1,this.node=e}update(){}}function XE({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function tB({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function nB(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function fd(t){return t===void 0||t===1}function vf({scale:t,scaleX:e,scaleY:n}){return!fd(t)||!fd(e)||!fd(n)}function $r(t){return vf(t)||ZE(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ZE(t){return Av(t.x)||Av(t.y)}function Av(t){return t&&t!=="0%"}function ku(t,e,n){const r=t-n,s=e*r;return n+s}function Pv(t,e,n,r,s){return s!==void 0&&(t=ku(t,s,r)),ku(t,n,r)+e}function wf(t,e=0,n=1,r,s){t.min=Pv(t.min,e,n,r,s),t.max=Pv(t.max,e,n,r,s)}function eT(t,{x:e,y:n}){wf(t.x,e.translate,e.scale,e.originPoint),wf(t.y,n.translate,n.scale,n.originPoint)}const Rv=.999999999999,Ov=1.0000000000001;function rB(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Gs(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,eT(t,o)),r&&$r(i.latestValues)&&Gs(t,i.latestValues))}e.x<Ov&&e.x>Rv&&(e.x=1),e.y<Ov&&e.y>Rv&&(e.y=1)}function qs(t,e){t.min=t.min+e,t.max=t.max+e}function Lv(t,e,n,r,s=.5){const i=ye(t.min,t.max,s);wf(t,e,n,i,r)}function Gs(t,e){Lv(t.x,e.x,e.scaleX,e.scale,e.originX),Lv(t.y,e.y,e.scaleY,e.scale,e.originY)}function tT(t,e){return XE(nB(t.getBoundingClientRect(),e))}function sB(t,e,n){const r=tT(t,n),{scroll:s}=e;return s&&(qs(r.x,s.offset.x),qs(r.y,s.offset.y)),r}const iB={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},oB=Di.length;function aB(t,e,n){let r="",s=!0;for(let i=0;i<oB;i++){const o=Di[i],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=zE(a,rm[o]);if(!l){s=!1;const c=iB[o]||o;r+=`${c}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function um(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Mi.has(l)){o=!0;continue}else if(hE(l)){s[l]=u;continue}else{const c=zE(u,rm[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(e.transform||(o||n?r.transform=aB(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}function nT(t,{style:e,vars:n}
vendor: 3,794 bytes, line 145
145,r,s){const i=t.style;let o;for(o in e)i[o]=e[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Iv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Zi={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(U.test(t))t=parseFloat(t);else return t;const n=Iv(t,e.target.x),r=Iv(t,e.target.y);return`${n}% ${r}%`}},lB={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=Gt.parse(t);if(s.length>5)return r;const i=Gt.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const u=ye(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},bf={borderRadius:{...Zi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zi,borderTopRightRadius:Zi,borderBottomLeftRadius:Zi,borderBottomRightRadius:Zi,boxShadow:lB};function rT(t,{layout:e,layoutId:n}){return Mi.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!bf[t]||t==="opacity")}function cm(t,e,n){var o;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const a in r)(qe(r[a])||s&&qe(s[a])||rT(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function uB(t){return window.getComputedStyle(t)}class cB extends QE{constructor(){super(...arguments),this.type="html",this.renderInstance=nT}readValueFromInstance(e,n){var r;if(Mi.has(n))return(r=this.projection)!=null&&r.isProjecting?of(n):kM(e,n);{const s=uB(e),i=(hE(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return tT(e,n)}build(e,n,r){um(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return cm(e,n,r)}}const dB={offset:"stroke-dashoffset",array:"stroke-dasharray"},hB={offset:"strokeDashoffset",array:"strokeDasharray"};function fB(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?dB:hB;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const pB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function sT(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,c){if(um(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h}=t;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=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const f of pB)d[f]!==void 0&&(h[f]=d[f],delete d[f]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&fB(d,s,i,o,!1)}const iT=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"]),oT=t=>typeof t=="string"&&t.toLowerCase()==="svg";function mB(t,e,n,r){nT(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(iT.has(s)?s:nm(s),e.attrs[s])}function aT(t,e,n){const r=cm(t,e,n);for(const s in t)if(qe(t[s])||qe(e[s])){const i=Di.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class gB extends QE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ae}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Mi.has(n)){const r=UE(n);return r&&r.default||0}return n=iT.has(n)?n:nm(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return aT(e,n,r)}build(e,n,r){sT(e,n,this.isSVGTag,r.transformTemplate,r.style)}
vendor: 20,609 bytes, line 145
145renderInstance(e,n,r,s){mB(e,n,r,s)}mount(e){this.isSVGTag=oT(e.tagName),super.mount(e)}}const yB=lm.length;function lT(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?lT(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<yB;n++){const r=lm[n],s=t.props[r];(aa(s)||s===!1)&&(e[r]=s)}return e}function uT(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const vB=[...am].reverse(),wB=am.length;function bB(t){return e=>Promise.all(e.map(({animation:n,options:r})=>m$(t,n,r)))}function SB(t){let e=bB(t),n=Nv(),r=!0;const s=l=>(u,c)=>{var h;const d=oi(t,c,l==="exit"?(h=t.presenceContext)==null?void 0:h.custom:void 0);if(d){const{transition:f,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function i(l){e=l(t)}function o(l){const{props:u}=t,c=lT(t.parent)||{},d=[],h=new Set;let f={},p=1/0;for(let w=0;w<wB;w++){const g=vB[w],y=n[g],v=u[g]!==void 0?u[g]:c[g],S=aa(v),x=g===l?y.isActive:null;x===!1&&(p=w);let E=v===c[g]&&v!==u[g]&&S;if(E&&r&&t.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...f},!y.isActive&&x===null||!v&&!y.prevProp||uc(v)||typeof v=="boolean")continue;if(g==="exit"&&y.isActive&&x!==!0){y.prevResolvedValues&&(f={...f,...y.prevResolvedValues});continue}const T=xB(y.prevProp,v);let C=T||g===l&&y.isActive&&!E&&S||w>p&&S,P=!1;const R=Array.isArray(v)?v:[v];let H=R.reduce(s(g),{});x===!1&&(H={});const{prevResolvedValues:B={}}=y,K={...B,...H},N=$=>{C=!0,h.has($)&&(P=!0,h.delete($)),y.needsAnimating[$]=!0;const _=t.getValue($);_&&(_.liveStyle=!1)};for(const $ in K){const _=H[$],O=B[$];if(f.hasOwnProperty($))continue;let D=!1;hf(_)&&hf(O)?D=!uT(_,O):D=_!==O,D?_!=null?N($):h.add($):_!==void 0&&h.has($)?N($):y.protectedKeys[$]=!0}y.prevProp=v,y.prevResolvedValues=H,y.isActive&&(f={...f,...H}),r&&t.blockInitialAnimation&&(C=!1);const J=E&&T;C&&(!J||P)&&d.push(...R.map($=>{const _={type:g};if(typeof $=="string"&&r&&!J&&t.manuallyAnimateOnMount&&t.parent){const{parent:O}=t,D=oi(O,$);if(O.enteringChildren&&D){const{delayChildren:j}=D.transition||{};_.delay=OE(O.enteringChildren,t,j)}}return{animation:$,options:_}}))}if(h.size){const w={};if(typeof u.initial!="boolean"){const g=oi(t,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(w.transition=g.transition)}h.forEach(g=>{const y=t.getBaseTarget(g),v=t.getValue(g);v&&(v.liveStyle=!0),w[g]=y??null}),d.push({animation:w})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(h=>{var f;return(f=h.animationState)==null?void 0:f.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Nv()}}}function xB(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!uT(e,t):!1}function Nr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nv(){return{animate:Nr(!0),whileInView:Nr(),whileHover:Nr(),whileTap:Nr(),whileDrag:Nr(),whileFocus:Nr(),exit:Nr()}}function jv(t,e){t.min=e.min,t.max=e.max}function Dt(t,e){jv(t.x,e.x),jv(t.y,e.y)}function Dv(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const cT=1e-4,EB=1-cT,TB=1+cT,dT=.01,CB=0-dT,_B=0+dT;function Ze(t){return t.max-t.min}function kB(t,e,n){return Math.abs(t-e)<=n}function Mv(t,e,n,r=.5){t.origin=r,t.originPoint=ye(e.min,e.max,t.origin),t.scale=Ze(n)/Ze(e),t.translate=ye(n.min,n.max,t.origin)-t.originPoint,(t.scale>=EB&&t.scale<=TB||isNaN(t.scale))&&(t.scale=1),(t.translate>=CB&&t.translate<=_B||isNaN(t.translate))&&(t.translate=0)}function Co(t,e,n,r){Mv(t.x,e.x,n.x,r?r.originX:void 0),Mv(t.y,e.y,n.y,r?r.originY:void 0)}function $v(t,e,n){t.min=n.min+e.min,t.max=t.min+Ze(e)}function AB(t,e,n){$v(t.x,e.x,n.x),$v(t.y,e.y,n.y)}function Bv(t,e,n){t.min=e.min-n.min,t.max=t.min+Ze(e)}function Au(t,e,n){Bv(t.x,e.x,n.x),Bv(t.y,e.y,n.y)}function Uv(t,e,n,r,s){return t-=e,t=ku(t,1/n,r),s!==void 0&&(t=ku(t,1/s,r)),t}function PB(t,e=0,n=1,r=.5,s,i=t,o=t){if(mn.test(e)&&(e=parseFloat(e),e=ye(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=ye(i.min,i.max,r);t===i&&(a-=e),t.min=Uv(t.min,e,n,a,s),t.max=Uv(t.max,e,n,a,s)}function Fv(t,e,[n,r,s],i,o){PB(t,e[n],e[r],e[s],e.scale,i,o)}const RB=["x","scaleX","originX"],OB=["y","scaleY","originY"];function Vv(t,e,n,r){Fv(t.x,e,RB,n?n.x:void 0,r?r.x:void 0),Fv(t.y,e,OB,n?n.y:void 0,r?r.y:void 0)}function zv(t){return t.translate===0&&t.scale===1}function hT(t){return zv(t.x)&&zv(t.y)}function Hv(t,e){return t.min===e.min&&t.max===e.max}function LB(t,e){return Hv(t.x,e.x)&&Hv(t.y,e.y)}function Wv(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function fT(t,e){return Wv(t.x,e.x)&&Wv(t.y,e.y)}function Kv(t){return Ze(t.x)/Ze(t.y)}function qv(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function sn(t){return[t("x"),t("y")]}function IB(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const pT=["TopLeft","TopRight","BottomLeft","BottomRight"],NB=pT.length,Gv=t=>typeof t=="string"?parseFloat(t):t,Jv=t=>typeof t=="number"||U.test(t);function jB(t,e,n,r,s,i){s?(t.opacity=ye(0,n.opacity??1,DB(r)),t.opacityExit=ye(e.opacity??1,0,MB(r))):i&&(t.opacity=ye(e.opacity??1,n.opacity??1,r));for(let o=0;o<NB;o++){const a=`border${pT[o]}Radius`;let l=Yv(e,a),u=Yv(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Jv(l)===Jv(u)?(t[a]=Math.max(ye(Gv(l),Gv(u),r),0),(mn.test(u)||mn.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=ye(e.rotate||0,n.rotate||0,r))}function Yv(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const DB=mT(0,.5,oE),MB=mT(.5,.95,Rt);function mT(t,e,n){return r=>r<t?0:r>e?1:n(sa(t,e,r))}function $B(t,e,n){const r=qe(t)?t:_i(t);return r.start(em("",r,e,n)),r.animation}function la(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const BB=(t,e)=>t.depth-e.depth;class UB{constructor(){this.children=[],this.isDirty=!1}add(e){Up(this.children,e),this.isDirty=!0}remove(e){xu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(BB),this.isDirty=!1,this.children.forEach(e)}}function FB(t,e){const n=Xe.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(_r(r),t(i-e))};return ue.setup(r,!0),()=>_r(r)}function jl(t){return qe(t)?t.get():t}class VB{constructor(){this.members=[]}add(e){Up(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;s&&s.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&xu(this.members,r)}e.scheduleRender()}remove(e){if(xu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s],o=i.instance;if(i.isPresent!==!1&&(!o||o.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender();const s=r.options.layoutDependency,i=e.options.layoutDependency;if(!(s!==void 0&&i!==void 0&&s===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:a}=e.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Dl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},pd=["","X","Y","Z"],zB=1e3;let HB=0;function md(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function gT(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=DE(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&gT(r)}function yT({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=HB++,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(qB),this.nodes.forEach(QB),this.nodes.forEach(XB),this.nodes.forEach(GB)},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 UB)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Fp),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=om(o)&&!K$(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;ue.read(()=>{d=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=FB(h,250),Dl.hasAnimatedSinceResize&&(Dl.hasAnimatedSinceResize=!1,this.nodes.forEach(Zv)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||r2,{onLayoutAnimationStart:m,onLayoutAnimationComplete:w}=u.getProps(),g=!this.targetLayout||!fT(this.targetLayout,f),y=!d&&h;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Zp(p,"layout"),onPlay:m,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,y)}else d||Zv(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(),_r(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(ZB),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&&gT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(YB),this.nodes.forEach(WB),this.nodes.forEach(KB)):this.nodes.forEach(Xv),this.clearAllSnapshots();const a=Xe.now();$e.delta=vn(0,1e3/60,a-$e.timestamp),$e.timestamp=a,$e.isProcessing=!0,od.update.process($e),od.preRender.process($e),od.render.process($e),$e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JB),this.sharedNodes.forEach(e2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ze(this.snapshot.measuredBox.x)&&!Ze(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=Ae(),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&&!hT(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||$r(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),s2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ae();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(i2))){const{scroll:c}=this.root;c&&(qs(a.x,c.offset.x),qs(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Ae();if(Dt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:h}=c;c!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Dt(a,o),qs(a.x,d.offset.x),qs(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Ae();Dt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Gs(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),$r(c.latestValues)&&Gs(l,c.latestValues)}return $r(this.latestValues)&&Gs(l,this.latestValues),l}removeTransform(o){const a=Ae();Dt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!$r(u.latestValues))continue;vf(u.latestValues)&&u.updateSnapshot();const c=Ae(),d=u.measurePageBox();Dt(c,d),Vv(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return $r(this.latestValues)&&Vv(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!==$e.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:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=$e.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ae(),this.targetWithTransforms=Ae()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),AB(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Dt(this.target,this.layout.layoutBox),eT(this.target,this.targetDelta)):Dt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!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||vf(this.parent.latestValues)||ZE(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=Ae(),this.relativeTargetOrigin=Ae(),Au(this.relativeTargetOrigin,a,l),Dt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&
vendor: 5,299 bytes, line 145
145(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$e.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Dt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;rB(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=Ae());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dv(this.prevProjectionDelta.x,this.projectionDelta.x),Dv(this.prevProjectionDelta.y,this.projectionDelta.y)),Co(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!qv(this.projectionDelta.x,this.prevProjectionDelta.x)||!qv(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=Ks(),this.projectionDelta=Ks(),this.projectionDeltaWithTransform=Ks()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Ks();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ae(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,w=this.getStack(),g=!w||w.members.length<=1,y=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(n2));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const x=S/1e3;e0(d.x,o.x,x),e0(d.y,o.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Au(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),t2(this.relativeTarget,this.relativeTargetOrigin,h,x),v&&LB(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Ae()),Dt(v,this.relativeTarget)),m&&(this.animationValues=c,jB(c,u,this.latestValues,x,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(_r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{Dl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_i(0)),this.motionValue.jump(0,!1),this.currentAnimation=$B(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},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(zB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&vT(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ae();const d=Ze(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=Ze(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Dt(a,l),Gs(a,c),Co(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new VB),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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 u=this.getStack();u&&u.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}
vendor: 14,745 bytes, line 145
145resetSkewAndRotation(){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 u={};l.z&&md("z",o,u,this.animationValues);for(let c=0;c<pd.length;c++)md(`rotate${pd[c]}`,o,u,this.animationValues),md(`skew${pd[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);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=jl(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=jl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!$r(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=IB(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:h,y:f}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in bf){if(c[p]===void 0)continue;const{correct:m,applyTo:w,isCSSVariable:g}=bf[p],y=d==="none"?c[p]:m(c[p],u);if(w){const v=w.length;for(let S=0;S<v;S++)o[w[S]]=y}else g?this.options.visualElement.renderState.vars[p]=y:o[p]=y}this.options.layoutId&&(o.pointerEvents=u===this?jl(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(Qv),this.root.sharedNodes.clear()}}}function WB(t){t.updateLayout()}function KB(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?sn(d=>{const h=o?e.measuredBox[d]:e.layoutBox[d],f=Ze(h);h.min=r[d].min,h.max=h.min+f}):vT(i,e.layoutBox,r)&&sn(d=>{const h=o?e.measuredBox[d]:e.layoutBox[d],f=Ze(r[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=Ks();Co(a,r,e.layoutBox);const l=Ks();o?Co(l,t.applyTransform(s,!0),e.measuredBox):Co(l,r,e.layoutBox);const u=!hT(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=Ae();Au(p,e.layoutBox,h.layoutBox);const m=Ae();Au(m,r,f.layoutBox),fT(p,m)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function qB(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function GB(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function JB(t){t.clearSnapshot()}function Qv(t){t.clearMeasurements()}function Xv(t){t.isLayoutDirty=!1}function YB(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Zv(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function QB(t){t.resolveTargetDelta()}function XB(t){t.calcProjection()}function ZB(t){t.resetSkewAndRotation()}function e2(t){t.removeLeadSnapshot()}function e0(t,e,n){t.translate=ye(e.translate,0,n),t.scale=ye(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function t0(t,e,n,r){t.min=ye(e.min,n.min,r),t.max=ye(e.max,n.max,r)}function t2(t,e,n,r){t0(t.x,e.x,n.x,r),t0(t.y,e.y,n.y,r)}function n2(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const r2={duration:.45,ease:[.4,0,.1,1]},n0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),r0=n0("applewebkit/")&&!n0("chrome/")?Math.round:Rt;function s0(t){t.min=r0(t.min),t.max=r0(t.max)}function s2(t){s0(t.x),s0(t.y)}function vT(t,e,n){return t==="position"||t==="preserve-aspect"&&!kB(Kv(e),Kv(n),.2)}function i2(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const o2=yT({attachResizeListener:(t,e)=>la(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),gd={current:void 0},wT=yT({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!gd.current){const t=new o2({});t.mount(window),t.setOptions({layoutScroll:!0}),gd.current=t}return gd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),bT=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function a2(t=!0){const e=b.useContext(Bp);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=b.useId();b.useEffect(()=>{if(t)return s(i)},[t]);const o=b.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,o]:[!0]}const ST=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 o0=!1;function l2(){if(o0)return;const t={};for(const e in i0)t[e]={isEnabled:n=>i0[e].some(r=>!!n[r])};YE(t),o0=!0}function xT(){return l2(),Z$()}function u2(t){const e=xT();for(const n in t)e[n]={...e[n],...t[n]};YE(e)}const c2=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 Pu(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||c2.has(t)}let ET=t=>!Pu(t);function d2(t){typeof t=="function"&&(ET=e=>e.startsWith("on")?!Pu(e):t(e))}try{d2(require("@emotion/is-prop-valid").default)}catch{}function h2(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||(ET(s)||n===!0&&Pu(s)||!e&&!Pu(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const dc=b.createContext({});function f2(t,e){if(cc(t)){const{initial:n,animate:r}=t;return{initial:n===!1||aa(n)?n:void 0,animate:aa(r)?r:void 0}}return t.inherit!==!1?e:{}}function p2(t){const{initial:e,animate:n}=f2(t,b.useContext(dc));return b.useMemo(()=>({initial:e,animate:n}),[a0(e),a0(n)])}function a0(t){return Array.isArray(t)?t.join(" "):t}const dm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function TT(t,e,n){for(const r in e)!qe(e[r])&&!rT(r,n)&&(t[r]=e[r])}function m2({transformTemplate:t},e){return b.useMemo(()=>{const n=dm();return um(n,e,t),Object.assign({},n.vars,n.style)},[e])}function g2(t,e){const n=t.style||{},r={};return TT(r,n,t),Object.assign(r,m2(t,e)),r}function y2(t,e){const n={},r=g2(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const CT=()=>({...dm(),attrs:{}});function v2(t,e,n,r){const s=b.useMemo(()=>{const i=CT();return sT(i,e,oT(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};TT(i,t.style,t),s.style={...i,...s.style}}return s}const w2=["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 hm(t){return typeof t!="string"||t.includes("-")?!1:!!(w2.indexOf(t)>-1||/[A-Z]/u.test(t))}function b2(t,e,n,{latestValues:r},s,i=!1,o){const l=(o??hm(t)?v2:y2)(e,r,s,t),u=h2(e,typeof t=="string",i),c=t!==b.Fragment?{...u,...l,ref:n}:{},{children:d}=e,h=b.useMemo(()=>qe(d)?d.get():d,[d]);return b.createElement(t,{...c,children:h})}function S2({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:x2(n,r,s,t),renderState:e()}}function x2(t,e,n,r){const s={},i=r(t,{});for(const h in i)s[h]=jl(i[h]);let{initial:o,animate:a}=t;const l=cc(t),u=GE(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!uc(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=tm(t,h[f]);if(p){const{transitionEnd:m,transition:w,...g}=p;for(const y in g){let v=g[y];if(Array.isArray(v)){const S=c?v.length-1:0;v=v[S]}v!==null&&(s[y]=v)}for(const y in m)s[y]=m[y]}}}return s}const _T=t=>(e,n)=>{const r=b.useContext(dc),s=b.useContext(Bp),i=()=>S2(t,e,r,s);return n?i():TD(i)},E2=_T({scrapeMotionValuesFromProps:cm,createRenderState:dm}),T2=_T({scrapeMotionValuesFromProps:aT,createRenderState:CT}),C2=Symbol.for("motionComponentSymbol");function _2(t,e,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var a;i&&((a=t.onMount)==null||a.call(t,i)),e&&(i?e.mount(i):e.unmount());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)},[e])}const kT=b.createContext({});function Rs(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function k2(t,e,n,r,s,i){var v,S;const{visualElement:o}=b.useContext(dc),a=b.useContext(ST),l=b.useContext(Bp),u=b.useContext(bT),c=u.reducedMotion,d=u.skipAnimations,h=b.useRef(null),f=b.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:i}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,m=b.useContext(kT);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&A2(h.current,n,s,m);const w=b.useRef(!1);b.useInsertionEffect(()=>{p&&w.current&&p.update(n,l)});const g=n[jE],y=b.useRef(!!g&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,g)));return CD(()=>{f.current=!0,p&&(w.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),y.current&&p.animationState&&p.animationState.animateChanges())}),b.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,g)}),y.current=!1),p.enteringChildren=void 0)}),p}function A2(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:AT(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Rs(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function AT(t){if(t)return t.options.allowProjection!==!1?t.projection:AT(t.parent)}function yd(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&u2(r);const i=n?n==="svg":hm(t),o=i?T2:E2;function a(u,c){let d;const h={...b.useContext(bT),...u,layoutId:P2(u)},{isStatic:f}=h,p=p2(u),m=o(u,f);if(!f&&Gx){R2();const w=O2(h);d=w.MeasureLayout,p.visualElement=k2(t,m,h,s,w.ProjectionNode,i)}return k.jsxs(dc.Provider,{value:p,children:[d&&p.visualElement?k.jsx(d,{visualElement:p.visualElement,...h}):null,b2(t,u,_2(m,p.visualElement,c),m,f,e,i)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=b.forwardRef(a);return l[C2]=t,l}function P2({layoutId:t}){const e=b.useContext(qx).id;return e&&t!==void 0?e+"-"+t:t}function R2(t,e){b.useContext(ST).strict}function O2(t){const e=xT(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function L2(t,e){if(typeof Proxy>"u")return yd;const n=new Map,r=(i,o)=>yd(i,o,t,e),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,yd(o,void 0,t,e)),n.get(o))})}const I2=(t,e)=>e.isSVG??hm(t)?new gB(e):new cB(e,{allowProjection:t!==b.Fragment});class N2 extends Rr{constructor(e){super(e),e.animationState||(e.animationState=SB(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();uc(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let j2=0;class D2 extends Rr{constructor(){super(...arguments),this.id=j2++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};
vendor: 16,607 bytes, line 145
145n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const M2={animation:{Feature:N2},exit:{Feature:D2}};function _a(t){return{point:{x:t.pageX,y:t.pageY}}}const $2=t=>e=>im(e)&&t(e,_a(e));function _o(t,e,n,r){return la(t,e,$2(n),r)}const PT=({current:t})=>t?t.ownerDocument.defaultView:null,l0=(t,e)=>Math.abs(t-e);function B2(t,e){const n=l0(t.x,e.x),r=l0(t.y,e.y);return Math.sqrt(n**2+r**2)}const u0=new Set(["auto","scroll"]);class RT{constructor(e,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.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;const f=wd(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=B2(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:w}=f,{timestamp:g}=$e;this.history.push({...w,timestamp:g});const{onStart:y,onMove:v}=this.handlers;p||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=vd(p,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:m,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=wd(f.type==="pointercancel"?this.lastMoveEventInfo:vd(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,y),w&&w(f,y)},!im(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=_a(e),u=vd(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=$e;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(e,wd(u,this.history)),this.removeListeners=Ea(_o(this.contextWindow,"pointermove",this.handlePointerMove),_o(this.contextWindow,"pointerup",this.handlePointerUp),_o(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(u0.has(r.overflowX)||u0.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(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.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(e,s),ue.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_r(this.updatePoint)}}function vd(t,e){return e?{point:e(t.point)}:t}function c0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function wd({point:t},e){return{point:t,delta:c0(t,OT(e)),offset:c0(t,U2(e)),velocity:F2(e,.1)}}function U2(t){return t[0]}function OT(t){return t[t.length-1]}function F2(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=OT(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Ot(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>Ot(e)*2&&(r=t[1]);const i=At(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 V2(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?ye(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?ye(n,t,r.max):Math.min(t,n)),t}function d0(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function z2(t,{top:e,left:n,bottom:r,right:s}){return{x:d0(t.x,n,s),y:d0(t.y,e,r)}}function h0(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function H2(t,e){return{x:h0(t.x,e.x),y:h0(t.y,e.y)}}function W2(t,e){let n=.5;const r=Ze(t),s=Ze(e);return s>r?n=sa(e.min,e.max-r,t.min):r>s&&(n=sa(t.min,t.max-s,e.min)),vn(0,1,n)}function K2(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Sf=.35;function q2(t=Sf){return t===!1?t=0:t===!0&&(t=Sf),{x:f0(t,"left","right"),y:f0(t,"top","bottom")}}function f0(t,e,n){return{min:p0(t,e),max:p0(t,n)}}function p0(t,e){return typeof t=="number"?t:t[e]||0}const G2=new WeakMap;class J2{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ae(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(_a(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=P$(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),sn(g=>{let y=this.getAxisMotionValue(g).get()||0;if(mn.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[g];S&&(y=Ze(S)*(parseFloat(y)/100))}}this.originPoint[g]=y}),m&&ue.update(()=>m(d,h),!1,!0),ff(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:w}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=h;if(p&&this.currentDirection===null){this.currentDirection=Q2(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,g),this.updateAxis("y",h.point,g),this.visualElement.render(),w&&ue.update(()=>w(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new RT(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:PT(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||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&&ue.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.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(e,n,r){const{drag:s}=this.getProps();if(!r||!hl(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=V2(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:e,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;e&&Rs(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=z2(r.layoutBox,e):this.constraints=!1,this.elastic=q2(n),s!==this.constraints&&!Rs(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&sn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=K2(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Rs(e))return!1;const r=e.current;Ci(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=sB(r,s.root,this.visualElement.getTransformPagePoint());let o=H2(s.layout.layoutBox,i);if(n){const a=n(tB(o));this.hasMutatedConstraints=!!a,a&&(o=XE(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=sn(c=>{if(!hl(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,p={type:"inertia",velocity:r?e[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return ff(this.visualElement,e),r.start(em(e,r,0,n,this.visualElement,!1))}stopAnimation(){sn(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){sn(n=>{const{drag:r}=this.getProps();if(!hl(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(e[n]-ye(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};sn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=W2({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(),sn(o=>{if(!hl(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ye(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;G2.set(this.visualElement,this);const e=this.visualElement.current,n=_o(e,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),h=u.target,f=h!==e&&j$(h);c&&d&&!f&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();Rs(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Y2(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(s);const a=la(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(sn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Sf,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function m0(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Y2(t,e,n){const r=Tv(t,m0(n)),s=Tv(e,m0(n));return()=>{r(),s()}}function hl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Q2(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class X2 extends Rr{constructor(e){super(e),this.removeGroupControls=Rt,this.removeListeners=Rt,this.controls=new J2(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Rt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const bd=t=>(e,n)=>{t&&ue.update(()=>t(e,n),!1,!0)};class Z2 extends Rr{constructor(){super(...arguments),this.removePointerDownListener=Rt}onPointerDown(e){this.session=new RT(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:PT(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:bd(e),onStart:bd(n),onMove:bd(r),onEnd:(i,o)=>{delete this.session,s&&ue.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=_o(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Sd=!1;class eU extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Sd&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Sd=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),sm.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;Sd=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function LT(t){const[e,n]=a2(),r=b.useContext(qx);return k.jsx(eU,{...t,layoutGroup:r,switchLayoutGroup:b.useContext(kT),isPresent:e,safeToRemove:n})}const tU={pan:{Feature:Z2},drag:{Feature:X2,ProjectionNode:wT,MeasureLayout:LT}};function g0(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ue.postRender(()=>i(e,_a(e)))}class nU extends Rr{mount(){const{current:e}=this.node;e&&(this.unmount=O$(e,(n,r)=>(g0(this.node,r,"Start"),s=>g0(this.node,s,"End"))))}unmount(){}}class rU extends Rr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=Ea(la(this.node.current,"focus",()=>this.onFocus()),la(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function y0(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ue.postRender(()=>i(e,_a(e)))}class sU extends Rr{mount(){const{current:e}=this.node;if(!e)return;
vendor: 2,347 bytes, line 145
145const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=M$(e,(s,i)=>(y0(this.node,i,"Start"),(o,{success:a})=>y0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const xf=new WeakMap,xd=new WeakMap,iU=t=>{const e=xf.get(t.target);e&&e(t)},oU=t=>{t.forEach(iU)};function aU({root:t,...e}){const n=t||document;xd.has(n)||xd.set(n,{});const r=xd.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(oU,{root:t,...e})),r[s]}function lU(t,e,n){const r=aU(e);return xf.set(t,n),r.observe(t),()=>{xf.delete(t),r.unobserve(t)}}const uU={some:0,all:1};class cU extends Rr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:uU[s]},a=l=>{const{isIntersecting:u}=l;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:c,onViewportLeave:d}=this.node.getProps(),h=u?c:d;h&&h(l)};return lU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(dU(e,n))&&this.startObserver()}unmount(){}}function dU({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const hU={inView:{Feature:cU},tap:{Feature:sU},focus:{Feature:rU},hover:{Feature:nU}},fU={layout:{ProjectionNode:wT,MeasureLayout:LT}},pU={...M2,...hU,...tU,...fU},Ed=L2(pU,I2),mU=({progress:t})=>k.jsxs("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-primary",children:[k.jsx(Ed.img,{src:"/lovable-uploads/4b253173-464a-41c7-b927-62b6fc1a00a0.png",alt:"BAB",className:"w-24 h-24 mb-8",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.5}}),k.jsx("div",{className:"w-48 h-1 bg-accent/20 rounded-full overflow-hidden",children:k.jsx(Ed.div,{className:"h-full bg-accent rounded-full",initial:{width:0},animate:{width:`${t}%`},transition:{duration:.3,ease:"easeOut"}})}),k.jsx(Ed.p,{className:"mt-4 font-mono text-accent/60 text-xs tracking-widest uppercase",initial:{opacity:0}
145,animate:{opacity:1},transition:{delay:.3},children:"Carregando..."})]}),gU=()=>{const{pathname:t}=Sa();return b.useEffect(()=>{window.scrollTo(0,0)},[t]),null},yU="/assets/praia-design-bab-DXnFETFZ.png",vU="/assets/mapa-terreo-2-DrMh9xRi.png",wU="/assets/bienal26-banner-BjhswiGc.png",bU="/assets/bab-banner-DsV17d3C.png",SU="/assets/hero-bg-CgzbGVIk.png",xU="/assets/bab-icon-BIbAiM80.png",EU="/assets/bab-logo-Cg5f_Y2I.png",TU="/assets/bab-text-JoXIk32e.png",CU="/assets/bab-logo-pink-DJYp9lws.png",_U="/assets/bab-text-pink-CSjcJ2bo.png",kU="/assets/masterplan-DiZjSzYu.png",AU=b.lazy(()=>va(()=>import("./Index-tkwKhFl9.js"),__vite__mapDeps([0,1]))),PU=b.lazy(()=>va(()=>import("./SimuladorBienalDeArquitetura-tXwHv_Dt.js"),__vite__mapDeps([2,1]))),RU=b.lazy(()=>va(()=>import("./ProjetosVencedores-C2j3QlTW.js"),__vite__mapDeps([3,1]))),OU=b.lazy(()=>va(()=>import("./Patrocinadores-C33WEJcm.js"),__vite__mapDeps([4,1]))),LU=b.lazy(()=>va(()=>import("./NotFound-B6_SUDLN.js"),__vite__mapDeps([5,1]))),IU=[yU,vU,wU,bU,SU,xU,EU,TU,CU,_U,kU],v0=new CR,NU=[],jU=()=>{const t=window.location.pathname.toLowerCase().replace(/\/+$/,"")||"/";return NU.some(e=>t===e)},DU=()=>k.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#0D2F27]",children:k.jsx("div",{className:"w-8 h-8 border-2 border-white/30 border-t-white rounded-full animate-spin"})}),MU=()=>{const t=jU(),{allLoaded:e,progress:n}=ED(t?[]:IU);return b.useEffect(()=>xD(),[]),e?k.jsx(ty,{client:v0,children:k.jsx(Gh,{children:k.jsx(TN,{children:k.jsxs(nR,{children:[k.jsx(eA,{}),k.jsx(PA,{}),k.jsxs(xO,{children:[k.jsx(gU,{}),k.jsx(b.Suspense,{fallback:k.jsx(DU,{}),children:k.jsxs(mO,{children:[k.jsx(Cs,{path:"/",element:k.jsx(AU,{})}),k.jsx(Cs,{path:"/projetos-vencedores",element:k.jsx(RU,{})}),k.jsx(Cs,{path:"/simulador-bienal-de-arquitetura",element:k.jsx(PU,{})}),k.jsx(Cs,{path:"/patrocinadores",element:k.jsx(OU,{})}),k.jsx(Cs,{path:"*",element:k.jsx(LU,{})})]})})]})]})})})}):k.jsx(ty,{client:v0,children:k.jsx(Gh,{children:k.jsx(mU,{progress:n})})})};Ub(document.getElementById("root")).render(k.jsx(MU,{}));export{WU as H,qx as L,bT as M,Bp as P,vk as X,wU as a,bU as b,yk as c,CU as d,_U as e,qU as f,KU as g,TD as h,A$ as i,k as j,a2 as k,CD as l,Ed as m,us as n,HU as o,EU as p,b as r,Sa as u};

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.