vendor: 4,765 bytes, lines 1-9
1var $h=e=>{throw TypeError(e)};var Yl=(e,t,r)=>t.has(e)||$h("Cannot "+r);var j=(e,t,r)=>(Yl(e,t,"read from private field"),r?r.call(e):t.get(e)),se=(e,t,r)=>t.has(e)?$h("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Q=(e,t,r,n)=>(Yl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Me=(e,t,r)=>(Yl(e,t,"access private method"),r);var Ii=(e,t,r,n)=>({set _(s){Q(e,t,s,r)},get _(){return j(e,t,n)}});function ix(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function pm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mm={exports:{}},dl={},gm={exports:{}},te={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var xi=Symbol.for("react.element"),ax=Symbol.for("react.portal"),lx=Symbol.for("react.fragment"),cx=Symbol.for("react.strict_mode"),ux=Symbol.for("react.profiler"),dx=Symbol.for("react.provider"),hx=Symbol.for("react.context"),fx=Symbol.for("react.forward_ref"),px=Symbol.for("react.suspense"),mx=Symbol.for("react.memo"),gx=Symbol.for("react.lazy"),Dh=Symbol.iterator;function vx(e){return e===null||typeof e!="object"?null:(e=Dh&&e[Dh]||e["@@iterator"],typeof e=="function"?e:null)}var vm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ym=Object.assign,xm={};function Xs(e,t,r){this.props=e,this.context=t,this.refs=xm,this.updater=r||vm}Xs.prototype.isReactComponent={};Xs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Xs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wm(){}wm.prototype=Xs.prototype;function ld(e,t,r){this.props=e,this.context=t,this.refs=xm,this.updater=r||vm}var cd=ld.prototype=new wm;cd.constructor=ld;ym(cd,Xs.prototype);cd.isPureReactComponent=!0;var Lh=Array.isArray,bm=Object.prototype.hasOwnProperty,ud={current:null},_m={key:!0,ref:!0,__self:!0,__source:!0};function km(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)bm.call(t,n)&&!_m.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:xi,type:e,key:o,ref:i,props:s,_owner:ud.current}}function yx(e,t){return{$$typeof:xi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function dd(e){return typeof e=="object"&&e!==null&&e.$$typeof===xi}function xx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Mh=/\/+/g;function Xl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xx(""+e.key):t.toString(36)}function pa(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case xi:case ax:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+Xl(i,0):n,Lh(s)?(r="",e!=null&&(r=e.replace(Mh,"$&/")+"/"),pa(s,t,r,"",function(u){return u})):s!=null&&(dd(s)&&(s=yx(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Mh,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Lh(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+Xl(o,a);i+=pa(o,t,r,l,s)}else if(l=vx(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;
vendor: 4,159 bytes, lines 9-17
9)o=o.value,l=n+Xl(o,a++),i+=pa(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function $i(e,t,r){if(e==null)return e;var n=[],s=0;return pa(e,n,"","",function(o){return t.call(r,o,s++)}),n}function wx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Qe={current:null},ma={transition:null},bx={ReactCurrentDispatcher:Qe,ReactCurrentBatchConfig:ma,ReactCurrentOwner:ud};function Sm(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:$i,forEach:function(e,t,r){$i(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return $i(e,function(){t++}),t},toArray:function(e){return $i(e,function(t){return t})||[]},only:function(e){if(!dd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=Xs;te.Fragment=lx;te.Profiler=ux;te.PureComponent=ld;te.StrictMode=cx;te.Suspense=px;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bx;te.act=Sm;te.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=ym({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=ud.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)bm.call(t,l)&&!_m.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:xi,type:e.type,key:s,ref:o,props:n,_owner:i}};te.createContext=function(e){return e={$$typeof:hx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:dx,_context:e},e.Consumer=e};te.createElement=km;te.createFactory=function(e){var t=km.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:fx,render:e}};te.isValidElement=dd;te.lazy=function(e){return{$$typeof:gx,_payload:{_status:-1,_result:e},_init:wx}};te.memo=function(e,t){return{$$typeof:mx,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=ma.transition;ma.transition={};try{e()}finally{ma.transition=t}};te.unstable_act=Sm;te.useCallback=function(e,t){return Qe.current.useCallback(e,t)};te.useContext=function(e){return Qe.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return Qe.current.useDeferredValue(e)};te.useEffect=function(e,t){return Qe.current.useEffect(e,t)};te.useId=function(){return Qe.current.useId()};te.useImperativeHandle=function(e,t,r){return Qe.current.useImperativeHandle(e,t,r)};te.useInsertionEffect=function(e,t){return Qe.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return Qe.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return Qe.current.useMemo(e,t)};te.useReducer=function(e,t,r){return Qe.current.useReducer(e,t,r)};te.useRef=function(e){return Qe.current.useRef(e)};te.useState=function(e){return Qe.current.useState(e)};te.useSyncExternalStore=function(e,t,r){return Qe.current.useSyncExternalStore(e,t,r)};te.useTransition=function(){return Qe.current.useTransition()};te.version="18.3.1";gm.exports=te;var b=gm.exports;const R=pm(b),hd=ix({__proto__:null,default:R},[b]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var _x=b,kx=Symbol.for("react.element"),Sx=Symbol.for("react.fragment"),Ex=Object.prototype.hasOwnProperty,Cx=_x.__SECRET_INT
vendor: 8,826 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jx={key:!0,ref:!0,__self:!0,__source:!0};function Em(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)Ex.call(t,n)&&!jx.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:kx,type:e,key:o,ref:i,props:s,_owner:Cx.current}}dl.Fragment=Sx;dl.jsx=Em;dl.jsxs=Em;mm.exports=dl;var c=mm.exports,Cm={exports:{}},pt={},jm={exports:{}},Nm={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(C,T){var L=C.length;C.push(T);e:for(;0<L;){var z=L-1>>>1,B=C[z];if(0<s(B,T))C[z]=T,C[L]=B,L=z;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var T=C[0],L=C.pop();if(L!==T){C[0]=L;e:for(var z=0,B=C.length,Y=B>>>1;z<Y;){var Z=2*(z+1)-1,ve=C[Z],Te=Z+1,re=C[Te];if(0>s(ve,L))Te<B&&0>s(re,ve)?(C[z]=re,C[Te]=L,z=Te):(C[z]=ve,C[Z]=L,z=Z);else if(Te<B&&0>s(re,L))C[z]=re,C[Te]=L,z=Te;else break e}}return T}function s(C,T){var L=C.sortIndex-T.sortIndex;return L!==0?L:C.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],d=1,h=null,p=3,f=!1,w=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(C){for(var T=r(u);T!==null;){if(T.callback===null)n(u);else if(T.startTime<=C)n(u),T.sortIndex=T.expirationTime,t(l,T);else break;T=r(u)}}function _(C){if(y=!1,m(C),!w)if(r(l)!==null)w=!0,W(k);else{var T=r(u);T!==null&&K(_,T.startTime-C)}}function k(C,T){w=!1,y&&(y=!1,v(N),N=-1),f=!0;var L=p;try{for(m(T),h=r(l);h!==null&&(!(h.expirationTime>T)||C&&!q());){var z=h.callback;if(typeof z=="function"){h.callback=null,p=h.priorityLevel;var B=z(h.expirationTime<=T);T=e.unstable_now(),typeof B=="function"?h.callback=B:h===r(l)&&n(l),m(T)}else n(l);h=r(l)}if(h!==null)var Y=!0;else{var Z=r(u);Z!==null&&K(_,Z.startTime-T),Y=!1}return Y}finally{h=null,p=L,f=!1}}var S=!1,E=null,N=-1,A=5,O=-1;function q(){return!(e.unstable_now()-O<A)}function D(){if(E!==null){var C=e.unstable_now();O=C;var T=!0;try{T=E(!0,C)}finally{T?H():(S=!1,E=null)}}else S=!1}var H;if(typeof g=="function")H=function(){g(D)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,X=$.port2;$.port1.onmessage=D,H=function(){X.postMessage(null)}}else H=function(){x(D,0)};function W(C){E=C,S||(S=!0,H())}function K(C,T){N=x(function(){C(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){w||f||(w=!0,W(k))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(p){case 1:case 2:case 3:var T=3;break;default:T=p}var L=p;p=T;try{return C()}finally{p=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,T){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var L=p;p=C;try{return T()}finally{p=L}},e.unstable_scheduleCallback=function(C,T,L){var z=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?z+L:z):L=z,C){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=L+B,C={id:d++,callback:T,priorityLevel:C,startTime:L,expirationTime:B,sortIndex:-1},L>z?(C.sortIndex=L,t(u,C),r(l)===null&&C===r(u)&&(y?(v(N),N=-1):y=!0,K(_,L-z))):(C.sortIndex=B,t(l,C),w||f||(w=!0,W(k))),C},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(C){var T=p;return function(){var L=p;p=T;try{return C.apply(this,arguments)}finally{p=L}}}})(Nm);jm.exports=Nm;var Nx=jm.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var Tx=b,ht=Nx;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Tm=new Set,Uo={};function Zn(e,t){zs(e,t),zs(e+"Capture",t)}function zs(e,t){for(Uo[e]=t,e=0;e<t.length;e++)Tm.add(t[e])}var Er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fc=Object.prototype.hasOwnProperty,Rx=/^[: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]*$/,Fh={},Bh={};function Ax(e){return Fc.call(Bh,e)?!0:Fc.call(Fh,e)?!1:Rx.test(e)?Bh[e]=!0:(Fh[e]=!0,!1)}function Px(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ox(e,t,r,n){if(t===null||typeof t>"u"||Px(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Je(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new Je(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Le[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var fd=/[\-:]([a-z])/g;function pd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
33-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fd,pd);Le[t]=new Je(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fd,pd);Le[t]=new Je(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fd,pd);Le[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function md(e,t,r,n){var s=Le.hasOwnProperty(t)?Le[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ox(t,r,s,n)&&(r=null),n||s===null?Ax(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ar=Tx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Di=Symbol.for("react.element"),fs=Symbol.for("react.portal"),ps=Symbol.for("react.fragment"),gd=Symbol.for("react.strict_mode"),Bc=Symbol.for("react.profiler"),Rm=Symbol.for("react.provider"),Am=Symbol.for("react.context"),vd=Symbol.for("react.forward_ref"),Uc=Symbol.for("react.suspense"),qc=Symbol.for("react.suspense_list"),yd=Symbol.for("react.memo"),Vr=Symbol.for("react.lazy"),Pm=Symbol.for("react.offscreen"),Uh=Symbol.iterator;function lo(e){return e===null||typeof e!="object"?null:(e=Uh&&e[Uh]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,Zl;function _o(e){if(Zl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Zl=t&&t[1]||""}return` 34`+Zl+e}var ec=!1;function tc(e,t){if(!e||ec)return"";ec=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),o=n.stack.split(` 36`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=` 37`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{ec=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?_o(e):""}function Ix(e){switch(e.tag){case 5:return _o(e.type);case 16:return _o("Lazy");case 13:return _o("Suspense");case 19:return _o("SuspenseList");case 0:case 2:case 15:return e=tc(e.type,!1),e;case 11:return e=tc(e.type.render,!1),e;case 1:return e=tc(e.type,!0),e;default:return""}}function zc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ps:return"Fragment";case fs:return"Portal";case Bc:return"Profiler";case gd:return"StrictMode";case Uc:return"Suspense";case qc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Am:return(e.displayName||"Context")+".Consumer";case Rm:return(e._context.displayName||"Context")+".Provider";case vd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yd:return t=e.displayName||null,t!==null?t:zc(e.type)||"Memo";case Vr:t=e._payload,e=e._init;try{return zc(e(t))}catch{}}return null}function $x(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zc(t);case 8:return t===gd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}
vendor: 11,686 bytes, line 37
37function Om(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dx(e){var t=Om(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Li(e){e._valueTracker||(e._valueTracker=Dx(e))}function Im(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Om(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Ra(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Vc(e,t){var r=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function qh(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=fn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $m(e,t){t=t.checked,t!=null&&md(e,"checked",t,!1)}function Hc(e,t){$m(e,t);var r=fn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Wc(e,t.type,fn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zh(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Wc(e,t,r){(t!=="number"||Ra(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ko=Array.isArray;function Cs(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+fn(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Kc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Vh(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(P(92));if(ko(r)){if(1<r.length)throw Error(P(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:fn(r)}}function Dm(e,t){var r=fn(t.value),n=fn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Hh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Lm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Lm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mi,Mm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Mi=Mi||document.createElement("div"),Mi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var No={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},Lx=["Webkit","ms","Moz","O"];Object.keys(No).forEach(function(e){Lx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),No[t]=No[e]})});function Fm(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||No.hasOwnProperty(e)&&No[e]?(""+t).trim():t+"px"}function Bm(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Fm(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Mx=ge({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 Qc(e,t){if(t){if(Mx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Jc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yc=null;function xd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xc=null,js=null,Ns=null;function Wh(e){if(e=_i(e)){if(typeof Xc!="function")throw Error(P(280));var t=e.stateNode;t&&(t=gl(t),Xc(e.stateNode,e.type,t))}}function Um(e){js?Ns?Ns.push(e):Ns=[e]:js=e}function qm(){if(js){var e=js,t=Ns;if(Ns=js=null,Wh(e),t)for(e=0;e<t.length;e++)Wh(t[e])}}function zm(e,t){return e(t)}function Vm(){}var rc=!1;function Hm(e,t,r){if(rc)return e(t,r);rc=!0;try{return zm(e,t,r)}finally{rc=!1,(js!==null||Ns!==null)&&(Vm(),qm())}}function zo(e,t){var r=e.stateNode;if(r===null)return null;var n=gl(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(P(231,t,typeof r));return r}var Zc=!1;if(Er)try{var co={};Object.defineProperty(co,"passive",{get:function(){Zc=!0}}),window.addEventListener("test",co,co),window.removeEventListener("test",co,co)}catch{Zc=!1}function Fx(e,t,r,n,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var To=!1,Aa=null,Pa=!1,eu=null,Bx={onError:function(e){To=!0,Aa=e}};function Ux(e,t,r,n,s,o,i,a,l){To=!1,Aa=null,Fx.apply(Bx,arguments)}function qx(e,t,r,n,s,o,i,a,l){if(Ux.apply(this,arguments),To){if(To){var u=Aa;To=!1,Aa=null}else throw Error(P(198));Pa||(Pa=!0,eu=u)}}function es(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Wm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Kh(e){if(es(e)!==e)throw Error(P(188))}function zx(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(P(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return Kh(s),e;if(o===n)return Kh(s),t;o=o.sibling}throw Error(P(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?e:t}function Km(e){return e=zx(e),e!==null?Gm(e):null}function Gm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gm(e);if(t!==null)return t;e=e.sibling}return null}var Qm=ht.unstable_scheduleCallback,Gh=ht.unstable_cancelCallback,Vx=ht.unstable_shouldYield,Hx=ht.unstable_requestPaint,be=ht.unstable_now,Wx=ht.unstable_getCurrentPriorityLevel,wd=ht.unstable_ImmediatePriority,Jm=ht.unstable_UserBlockingPriority,Oa=ht.unstable_NormalPriority,Kx=ht.unstable_LowPriority,Ym=ht.unstable_IdlePriority,hl=null,nr=null;function Gx(e){if(nr&&typeof nr.onCommitFiberRoot=="function")try{nr.onCommitFiberRoot(hl,e,void 0,(e.current.flags&128)===128)}catch{}}var Lt=Math.clz32?Math.clz32:Yx,Qx=Math.log,Jx=Math.LN2;function Yx(e){return e>>>=0,e===0?32:31-(Qx(e)/Jx|0)|0}var Fi=64,Bi=4194304;function So(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ia(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=So(a):(o&=i,o!==0&&(n=So(o)))}else i=r&~s,i!==0?n=So(i):o!==0&&(n=So(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Lt(t),s=1<<r,n|=e[r],t&=~s;return n}function Xx(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zx(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Lt(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=Xx(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function tu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Xm(){var e=Fi;return Fi<<=1,!(Fi&4194240)&&(Fi=64),e}function nc(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 3,030 bytes, line 37
37function wi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=r}function ew(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Lt(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function bd(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Lt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var oe=0;function Zm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var eg,_d,tg,rg,ng,ru=!1,Ui=[],sn=null,on=null,an=null,Vo=new Map,Ho=new Map,Wr=[],tw="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 Qh(e,t){switch(e){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":Vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function uo(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=_i(t),t!==null&&_d(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function rw(e,t,r,n,s){switch(t){case"focusin":return sn=uo(sn,e,t,r,n,s),!0;case"dragenter":return on=uo(on,e,t,r,n,s),!0;case"mouseover":return an=uo(an,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Vo.set(o,uo(Vo.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Ho.set(o,uo(Ho.get(o)||null,e,t,r,n,s)),!0}return!1}function sg(e){var t=In(e.target);if(t!==null){var r=es(t);if(r!==null){if(t=r.tag,t===13){if(t=Wm(r),t!==null){e.blockedOn=t,ng(e.priority,function(){tg(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ga(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=nu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Yc=n,r.target.dispatchEvent(n),Yc=null}else return t=_i(r),t!==null&&_d(t),e.blockedOn=r,!1;t.shift()}return!0}function Jh(e,t,r){ga(e)&&r.delete(t)}function nw(){ru=!1,sn!==null&&ga(sn)&&(sn=null),on!==null&&ga(on)&&(on=null),an!==null&&ga(an)&&(an=null),Vo.forEach(Jh),Ho.forEach(Jh)}function ho(e,t){e.blockedOn===t&&(e.blockedOn=null,ru||(ru=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,nw)))}function Wo(e){function t(s){return ho(s,e)}if(0<Ui.length){ho(Ui[0],e);for(var r=1;r<Ui.length;r++){var n=Ui[r];n.blockedOn===e&&(n.blockedOn=null)}}for(sn!==null&&ho(sn,e),on!==null&&ho(on,e),an!==null&&ho(an,e),Vo.forEach(t),Ho.forEac
vendor: 11,085 bytes, line 37
37h(t),r=0;r<Wr.length;r++)n=Wr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Wr.length&&(r=Wr[0],r.blockedOn===null);)sg(r),r.blockedOn===null&&Wr.shift()}var Ts=Ar.ReactCurrentBatchConfig,$a=!0;function sw(e,t,r,n){var s=oe,o=Ts.transition;Ts.transition=null;try{oe=1,kd(e,t,r,n)}finally{oe=s,Ts.transition=o}}function ow(e,t,r,n){var s=oe,o=Ts.transition;Ts.transition=null;try{oe=4,kd(e,t,r,n)}finally{oe=s,Ts.transition=o}}function kd(e,t,r,n){if($a){var s=nu(e,t,r,n);if(s===null)fc(e,t,n,Da,r),Qh(e,n);else if(rw(s,e,t,r,n))n.stopPropagation();else if(Qh(e,n),t&4&&-1<tw.indexOf(e)){for(;s!==null;){var o=_i(s);if(o!==null&&eg(o),o=nu(e,t,r,n),o===null&&fc(e,t,n,Da,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else fc(e,t,n,null,r)}}var Da=null;function nu(e,t,r,n){if(Da=null,e=xd(n),e=In(e),e!==null)if(t=es(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Wm(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Da=e,null}function og(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Wx()){case wd:return 1;case Jm:return 4;case Oa:case Kx:return 16;case Ym:return 536870912;default:return 16}default:return 16}}var tn=null,Sd=null,va=null;function ig(){if(va)return va;var e,t=Sd,r=t.length,n,s="value"in tn?tn.value:tn.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return va=s.slice(e,1<n?1-n:void 0)}function ya(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qi(){return!0}function Yh(){return!1}function mt(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?qi:Yh,this.isPropagationStopped=Yh,this}return ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=qi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=qi)},persist:function(){},isPersistent:qi}),t}var Zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ed=mt(Zs),bi=ge({},Zs,{view:0,detail:0}),iw=mt(bi),sc,oc,fo,fl=ge({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fo&&(fo&&e.type==="mousemove"?(sc=e.screenX-fo.screenX,oc=e.screenY-fo.screenY):oc=sc=0,fo=e),sc)},movementY:function(e){return"movementY"in e?e.movementY:oc}}),Xh=mt(fl),aw=ge({},fl,{dataTransfer:0}),lw=mt(aw),cw=ge({},bi,{relatedTarget:0}),ic=mt(cw),uw=ge({},Zs,{animationName:0,elapsedTime:0,pseudoElement:0}),dw=mt(uw),hw=ge({},Zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fw=mt(hw),pw=ge({},Zs,{data:0}),Zh=mt(pw),mw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gw={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"},vw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vw[e])?!!t[e]:!1}function Cd(){return yw}var xw=ge({},bi,{key:function(e){if(e.key){var t=mw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cd,charCode:function(e){return e.type==="keypress"?ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ww=mt(xw),bw=ge({},fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ef=mt(bw),_w=ge({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cd}),kw=mt(_w),Sw=ge({},Zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ew=mt(Sw),Cw=ge({},fl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jw=mt(Cw),Nw=[9,13,27,32],jd=Er&&"CompositionEvent"in window,Ro=null;Er&&"documentMode"in document&&(Ro=document.documentMode);var Tw=Er&&"TextEvent"in window&&!Ro,ag=Er&&(!jd||Ro&&8<Ro&&11>=Ro),tf=" ",rf=!1;function lg(e,t){switch(e){case"keyup":return Nw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ms=!1;function Rw(e,t){switch(e){case"compositionend":return cg(t);case"keypress":return t.which!==32?null:(rf=!0,tf);case"textInput":return e=t.data,e===tf&&rf?null:e;default:return null}}function Aw(e,t){if(ms)return e==="compositionend"||!jd&&lg(e,t)?(e=ig(),va=Sd=tn=null,ms=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ag&&t.locale!=="ko"?null:t.data;default:return null}}var Pw={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 nf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Pw[e.type]:t==="textarea"}function ug(e,t,r,n){Um(n),t=La(t,"onChange"),0<t.length&&(r=new Ed("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ao=null,Ko=null;function Ow(e){bg(e,0)}function pl(e){var t=ys(e);if(Im(t))return e}function Iw(e,t){if(e==="change")return t}var dg=!1;if(Er){var ac;if(Er){var lc="oninput"in document;if(!lc){var sf=document.createElement("div");sf.setAttribute("oninput","return;"),lc=typeof sf.oninput=="function"}ac=lc}else ac=!1;dg=ac&&(!document.documentMode||9<document.documentMode)}function of(){Ao&&(Ao.detachEvent("onpropertychange",hg),Ko=Ao=null)}function hg(e){if(e.propertyName==="value"&&pl(Ko)){var t=[];ug(t,Ko,e,xd(e)),Hm(Ow,t)}}function $w(e,t,r){e==="focusin"?(of(),Ao=t,Ko=r,Ao.attachEvent("onpropertychange",hg)):e==="focusout"&&of()}function Dw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pl(Ko)}function Lw(e,t){if(e==="click")return pl(t)}function Mw(e,t){if(e==="input"||e==="change")return pl(t)}function Fw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ft=typeof Object.is=="function"?Object.is:Fw;function Go(e,t){if(Ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Fc.call(t,s)||!Ft(e[s],t[s]))return!1}return!0}function af(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lf(e,t){var r=af(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=af(r)}}function fg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pg(){for(var e=window,t=Ra();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ra(e.document)}return t}function Nd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Bw(e){var t=pg(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&fg(r.ownerDocument.documentElement,r)){if(n!==null&&Nd(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=lf(r,o);var i=lf(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Uw=Er&&"documentMode"in document&&11>
vendor: 4,874 bytes, line 37
37=document.documentMode,gs=null,su=null,Po=null,ou=!1;function cf(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ou||gs==null||gs!==Ra(n)||(n=gs,"selectionStart"in n&&Nd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Po&&Go(Po,n)||(Po=n,n=La(su,"onSelect"),0<n.length&&(t=new Ed("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=gs)))}function zi(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var vs={animationend:zi("Animation","AnimationEnd"),animationiteration:zi("Animation","AnimationIteration"),animationstart:zi("Animation","AnimationStart"),transitionend:zi("Transition","TransitionEnd")},cc={},mg={};Er&&(mg=document.createElement("div").style,"AnimationEvent"in window||(delete vs.animationend.animation,delete vs.animationiteration.animation,delete vs.animationstart.animation),"TransitionEvent"in window||delete vs.transitionend.transition);function ml(e){if(cc[e])return cc[e];if(!vs[e])return e;var t=vs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in mg)return cc[e]=t[r];return e}var gg=ml("animationend"),vg=ml("animationiteration"),yg=ml("animationstart"),xg=ml("transitionend"),wg=new Map,uf="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 yn(e,t){wg.set(e,t),Zn(t,[e])}for(var uc=0;uc<uf.length;uc++){var dc=uf[uc],qw=dc.toLowerCase(),zw=dc[0].toUpperCase()+dc.slice(1);yn(qw,"on"+zw)}yn(gg,"onAnimationEnd");yn(vg,"onAnimationIteration");yn(yg,"onAnimationStart");yn("dblclick","onDoubleClick");yn("focusin","onFocus");yn("focusout","onBlur");yn(xg,"onTransitionEnd");zs("onMouseEnter",["mouseout","mouseover"]);zs("onMouseLeave",["mouseout","mouseover"]);zs("onPointerEnter",["pointerout","pointerover"]);zs("onPointerLeave",["pointerout","pointerover"]);Zn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eo="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(" "),Vw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eo));function df(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,qx(n,t,void 0,e),e.currentTarget=null}function bg(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;df(s,a,u),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;df(s,a,u),o=l}}}if(Pa)throw e=eu,Pa=!1,eu=null,e}function ue(e,t){var r=t[uu];r===void 0&&(r=t[uu]=new Set);var n=e+"__bubble";r.has(n)||(_g(t,e,2,!1),r.add(n))}function hc(e,t,r){var n=0;t&&(n|=4),_g(r,e,n,t)}var Vi="_reactListening"+Math.random().toString(36).slice(2);function Qo(e){if(!e[Vi]){e[Vi]=!0,Tm.forEach(function(r){r!=="selectionchange"&&(Vw.has(r)||hc(r,!1,e),hc(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vi]||(t[Vi]=!0,hc("selectionchange",!1,t))}}function _g(e,t,r,n){switch(og(t)){case 1:var s=sw;break;case 4:s=ow;break;default:s=kd}r=s.bind(null,t,r,e),s=void 0,!Zc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function fc(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;
vendor: 21,713 bytes, lines 37-38
37if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=In(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}Hm(function(){var u=o,d=xd(r),h=[];e:{var p=wg.get(e);if(p!==void 0){var f=Ed,w=e;switch(e){case"keypress":if(ya(r)===0)break e;case"keydown":case"keyup":f=ww;break;case"focusin":w="focus",f=ic;break;case"focusout":w="blur",f=ic;break;case"beforeblur":case"afterblur":f=ic;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Xh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=lw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=kw;break;case gg:case vg:case yg:f=dw;break;case xg:f=Ew;break;case"scroll":f=iw;break;case"wheel":f=jw;break;case"copy":case"cut":case"paste":f=fw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=ef}var y=(t&4)!==0,x=!y&&e==="scroll",v=y?p!==null?p+"Capture":null:p;y=[];for(var g=u,m;g!==null;){m=g;var _=m.stateNode;if(m.tag===5&&_!==null&&(m=_,v!==null&&(_=zo(g,v),_!=null&&y.push(Jo(g,_,m)))),x)break;g=g.return}0<y.length&&(p=new f(p,w,null,r,d),h.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==Yc&&(w=r.relatedTarget||r.fromElement)&&(In(w)||w[Cr]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(w=r.relatedTarget||r.toElement,f=u,w=w?In(w):null,w!==null&&(x=es(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(f=null,w=u),f!==w)){if(y=Xh,_="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=ef,_="onPointerLeave",v="onPointerEnter",g="pointer"),x=f==null?p:ys(f),m=w==null?p:ys(w),p=new y(_,g+"leave",f,r,d),p.target=x,p.relatedTarget=m,_=null,In(d)===u&&(y=new y(v,g+"enter",w,r,d),y.target=m,y.relatedTarget=x,_=y),x=_,f&&w)t:{for(y=f,v=w,g=0,m=y;m;m=rs(m))g++;for(m=0,_=v;_;_=rs(_))m++;for(;0<g-m;)y=rs(y),g--;for(;0<m-g;)v=rs(v),m--;for(;g--;){if(y===v||v!==null&&y===v.alternate)break t;y=rs(y),v=rs(v)}y=null}else y=null;f!==null&&hf(h,p,f,y,!1),w!==null&&x!==null&&hf(h,x,w,y,!0)}}e:{if(p=u?ys(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var k=Iw;else if(nf(p))if(dg)k=Mw;else{k=Dw;var S=$w}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=Lw);if(k&&(k=k(e,u))){ug(h,k,r,d);break e}S&&S(e,p,u),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Wc(p,"number",p.value)}switch(S=u?ys(u):window,e){case"focusin":(nf(S)||S.contentEditable==="true")&&(gs=S,su=u,Po=null);break;case"focusout":Po=su=gs=null;break;case"mousedown":ou=!0;break;case"contextmenu":case"mouseup":case"dragend":ou=!1,cf(h,r,d);break;case"selectionchange":if(Uw)break;case"keydown":case"keyup":cf(h,r,d)}var E;if(jd)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ms?lg(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(ag&&r.locale!=="ko"&&(ms||N!=="onCompositionStart"?N==="onCompositionEnd"&&ms&&(E=ig()):(tn=d,Sd="value"in tn?tn.value:tn.textContent,ms=!0)),S=La(u,N),0<S.length&&(N=new Zh(N,e,null,r,d),h.push({event:N,listeners:S}),E?N.data=E:(E=cg(r),E!==null&&(N.data=E)))),(E=Tw?Rw(e,r):Aw(e,r))&&(u=La(u,"onBeforeInput"),0<u.length&&(d=new Zh("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=E))}bg(h,t)})}function Jo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function La(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=zo(e,r),o!=null&&n.unshift(Jo(e,o,s)),o=zo(e,t),o!=null&&n.push(Jo(e,o,s))),e=e.return}return n}function rs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hf(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=zo(r,o),l!=null&&i.unshift(Jo(r,l,a))):s||(l=zo(r,o),l!=null&&i.push(Jo(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var Hw=/\r\n?/g,Ww=/\u0000|\uFFFD/g;function ff(e){return(typeof e=="string"?e:""+e).replace(Hw,` 38`).replace(Ww,"")}function Hi(e,t,r){if(t=ff(t),ff(e)!==t&&r)throw Error(P(425))}function Ma(){}var iu=null,au=null;function lu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cu=typeof setTimeout=="function"?setTimeout:void 0,Kw=typeof clearTimeout=="function"?clearTimeout:void 0,pf=typeof Promise=="function"?Promise:void 0,Gw=typeof queueMicrotask=="function"?queueMicrotask:typeof pf<"u"?function(e){return pf.resolve(null).then(e).catch(Qw)}:cu;function Qw(e){setTimeout(function(){throw e})}function pc(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Wo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Wo(t)}function ln(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var eo=Math.random().toString(36).slice(2),tr="__reactFiber$"+eo,Yo="__reactProps$"+eo,Cr="__reactContainer$"+eo,uu="__reactEvents$"+eo,Jw="__reactListeners$"+eo,Yw="__reactHandles$"+eo;function In(e){var t=e[tr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Cr]||r[tr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=mf(e);e!==null;){if(r=e[tr])return r;e=mf(e)}return t}e=r,r=e.parentNode}return null}function _i(e){return e=e[tr]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ys(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function gl(e){return e[Yo]||null}var du=[],xs=-1;function xn(e){return{current:e}}function de(e){0>xs||(e.current=du[xs],du[xs]=null,xs--)}function le(e,t){xs++,du[xs]=e.current,e.current=t}var pn={},ze=xn(pn),rt=xn(!1),Kn=pn;function Vs(e,t){var r=e.type.contextTypes;if(!r)return pn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function nt(e){return e=e.childContextTypes,e!=null}function Fa(){de(rt),de(ze)}function gf(e,t,r){if(ze.current!==pn)throw Error(P(168));le(ze,t),le(rt,r)}function kg(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(P(108,$x(e)||"Unknown",s));return ge({},r,n)}function Ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pn,Kn=ze.current,le(ze,e),le(rt,rt.current),!0}function vf(e,t,r){var n=e.stateNode;if(!n)throw Error(P(169));r?(e=kg(e,t,Kn),n.__reactInternalMemoizedMergedChildContext=e,de(rt),de(ze),le(ze,e)):de(rt),le(rt,r)}var wr=null,vl=!1,mc=!1;function Sg(e){wr===null?wr=[e]:wr.push(e)}function Xw(e){vl=!0,Sg(e)}function wn(){if(!mc&&wr!==null){mc=!0;var e=0,t=oe;try{var r=wr;for(oe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}wr=null,vl=!1}catch(s){throw wr!==null&&(wr=wr.slice(e+1)),Qm(wd,wn),s}finally{oe=t,mc=!1}}return null}var ws=[],bs=0,Ua=null,qa=0,vt=[],yt=0,Gn=null,_r=1,kr="";function Tn(e,t){ws[bs++]=qa,ws[bs++]=Ua,Ua=e,qa=t}function Eg(e,t,r){vt[yt++]=_r,vt[yt++]=kr,vt[yt++]=Gn,Gn=e;var n=_r;e=kr;var s=32-Lt(n)-1;n&=~(1<<s),r+=1;var o=32-Lt(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,_r=1<<32-Lt(t)+s|r<<s|n,kr=o+e}else _r=1<<o|r<<s|n,kr=e}function Td(e){e.return!==null&&(Tn(e,1),Eg(e,1,0))}function Rd(e){for(;e===Ua;)Ua=ws[--bs],ws[bs]=null,qa=ws[--bs],ws[bs]=null;for(;e===Gn;)Gn=vt[--yt],vt[yt]=null,kr=vt[--yt],vt[yt]=null,_r=vt[--yt],vt[yt]=null}var ut=null,ct=null,fe=!1,Dt=null;function Cg(e,t){var r=xt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function yf(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ut=e,ct=ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Gn!==null?{id:_r,overflow:kr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=xt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ut=e,ct=null,!0):!1;default:return!1}}function hu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fu(e){if(fe){var t=ct;if(t){var r=t;if(!yf(e,t)){if(hu(e))throw Error(P(418));t=ln(r.nextSibling);var n=ut;t&&yf(e,t)?Cg(n,r):(e.flags=e.flags&-4097|2,fe=!1,ut=e)}}else{if(hu(e))throw Error(P(418));e.flags=e.flags&-4097|2,fe=!1,ut=e}}}function xf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function Wi(e){if(e!==ut)return!1;if(!fe)return xf(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!lu(e.type,e.memoizedProps)),t&&(t=ct)){if(hu(e))throw jg(),Error(P(418));for(;t;)Cg(e,t),t=ln(t.nextSibling)}if(xf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ct=ln(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=ut?ln(e.stateNode.nextSibling):null;return!0}function jg(){for(var e=ct;e;)e=ln(e.nextSibling)}function Hs(){ct=ut=null,fe=!1}function Ad(e){Dt===null?Dt=[e]:Dt.push(e)}var Zw=Ar.ReactCurrentBatchConfig;function po(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(P(309));var n=r.stateNode}if(!n)throw Error(P(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,e))}return e}function Ki(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function wf(e){var t=e._init;return t(e._payload)}function Ng(e){function t(v,g){if(e){var m=v.deletions;m===null?(v.deletions=[g],v.flags|=16):m.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function n(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=hn(v,g),v.index=0,v.sibling=null,v}function o(v,g,m){return v.index=m,e?(m=v.alternate,m!==null?(m=m.index,m<g?(v.flags|=2,g):m):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,m,_){return g===null||g.tag!==6?(g=_c(m,v.mode,_),g.return=v,g):(g=s(g,m),g.return=v,g)}function l(v,g,m,_){var k=m.type;return k===ps?d(v,g,m.props.children,_,m.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Vr&&wf(k)===g.type)?(_=s(g,m.props),_.ref=po(v,g,m),_.return=v,_):(_=Ea(m.type,m.key,m.props,null,v.mode,_),_.ref=po(v,g,m),_.return=v,_)}function u(v,g,m,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=kc(m,v.mode,_),g.return=v,g):(g=s(g,m.children||[]),g.return=v,g)}function d(v,g,m,_,k){return g===null||g.tag!==7?(g=Hn(m,v.mode,_,k),g.return=v,g):(g=s(g,m),g.return=v,g)}function h(v,g,m){if(typeof g=="string"&&g!==""||typeof g=="number")return g=_c(""+g,v.mode,m),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Di:return m=Ea(g.type,g.key,g.props,null,v.mode,m),m.ref=po(v,null,g),m.return=v,m;case fs:return g=kc(g,v.mode,m),g.return=v,g;case Vr:var _=g._init;return h(v,_(g._payload),m)}if(ko(g)||lo(g))return g=Hn(g,v.mode,m,null),g.return=v,g;Ki(v,g)}return null}function p(v,g,m,_){var k=g!==null?g.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return k!==null?null:a(v,g,""+m,_);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Di:return m.key===k?l(v,g,m,_):null;case fs:return m.key===k?u(v,g,m,_):null;case Vr:return k=m._init,p(v,g,k(m._payload),_)}if(ko(m)||lo(m))return k!==null?null:d(v,g,m,_,null);Ki(v,m)}return null}function f(v,g,m,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(m)||null,a(g,v,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Di:return v=v.get(_.key===null?m:_.key)||null,l(g,v,_,k);case fs:return v=v.get(_.key===null?m:_.key)||null,u(g,v,_,k);case Vr:var S=_._init;return f(v,g,m,S(_._payload),k)}if(ko(_)||lo(_))return v=v.get(m)||null,d(g,v,_,k,null);Ki(g,_)}return null}function w(v,g,m,_){for(var k=null,S=null,E=g,N=g=0,A=null;E!==null&&N<m.length;N++){E.index>N?(A=E,E=null):A=E.sibling;var O=p(v,E,m[N],_);if(O===null){E===null&&(E=A);break}e&&E&&O.alternate===null&&t(v,E),g=o(O,g,N),S===null?k=O:S.sibling=O,S=O,E=A}if(N===m.length)return r(v,E),fe&&Tn(v,N),k;if(E===null){for(;N<m.length;N++)E=h(v,m[N],_),E!==null&&(g=o(E,g,N),S===null?k=E:S.sibling=E,S=E);return fe&&Tn(v,N),k}for(E=n(v,E);N<m.length;N++)A=f(E,v,N,m[N],_),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?N:A.key),g=o(A,g,N),S===null?k=A:S.sibling=A,S=A);return e&&E.forEach(function(q){return t(v,q)}),fe&&Tn(v,N),k}function y(v,g,m,_){var k=lo(m);if(typeof k!="function")throw Error(P(150));if(m=k.call(m),m==null)throw Error(P(151));for(var S=k=null,E=g,N=g=0,A=null,O=m.next();E!==null&&!O.done;N++,O=m.next()){E.index>N?(A=E,E=null):A=E.sibling;var q=p(v,E,O.value,_);if(q===null){E===null&&(E=A);break}e&&E&&q.alternate===null&&t(v,E),g=o(q,g,N),S===null?k=q:S.sibling=q,S=q,E=A}if(O.done)return r(v,E),fe&&Tn(v,N),k;if(E===null){for(;!O.done;N++,O=m.next())O=h(v,O.value,_),O!==null&&(g=o(O,g,N),S===null?k=O:S.sibling=O,S=O);return fe&&Tn(v,N),k}for(E=n(v,E);!O.done;N++,O=m.next())O=f(E,v,N,O.value,_),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?N:O.key),g=o(O,g,N),S===null?k=O:S.sibling=O,S=O);return e&&E.forEach(function(D){return t(v,D)}),fe&&Tn(v,N),k}function x(v,g,m,_){if(typeof m=="object"&&m!==null&&m.type===ps&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Di:e:{for(var k=m.key,S=g;S!==null;){if(S.key===k){if(k=m.type,k===ps){if(S.tag===7){r(v,S.sibling),g=s(S,m.props.children),g.return=v,v=g;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Vr&&wf(k)===S.type){r(v,S.sibling),g=s(S,m.props),g.ref=po(v,S,m),g.return=v,v=g;break e}r(v,S);break}else t(v,S);S=S.sibling}m.type===ps?(g=Hn(m.props.children,v.mode,_,m.key),g.return=v,v=g):(_=Ea(m.type,m.key,m.props,null,v.mode,_),_.ref=po(v,g,m),_.return=v,v=_)}return i(v);case fs:e:{for(S=m.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===m.containerInfo&&g.stateNode.implementation===m.implementation){r(v,g.sibling),g=s(g,m.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=kc(m,v.mode,_),g.return=v,v=g}return i(v);case Vr:return S=m._init,x(v,g,S(m._payload),_)}if(ko(m))return w(v,g,m,_);if(lo(m))return y(v,g,m,_);Ki(v,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,g!==null&&g.tag===6?(r(v,g.sibling),g=s(g,m),g.return=v,v=g):(r(v,g),g=_c(m,v.mode,_),g.return=v,v=g),i(v)):r(v,g)}return x}var Ws=Ng(!0),Tg=Ng(!1),za=xn(null),Va=null,_s=null,Pd=null;function Od(){Pd=_s=Va=null}function Id(e){var t=za.current;de(za),e._currentValue=t}function pu(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Rs(e,t){Va=e,Pd=_s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tt=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(Pd!==e)if(e={context:e,memoizedValue:t,next:null},_s===null){if(Va===null)throw Error(P(308));_s=e,Va.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return t}var $n=null;function $d(e){$n===null?$n=[e]:$n.push(e)}function Rg(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,$d(t)):(r.next=s.next,s.next=r),t.interleaved=r,jr(e,n)}function jr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Hr=!1;function Dd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ag(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Sr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ne&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,jr(e,r)}return s=n.interleaved,s===null?(t.next=t,$d(n)):(t.next=s.next,s.next=t),n.interleaved=t,jr(e,r)}function xa(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,bd(e,r)}}function bf(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ha(e,t,r,n){var s=e.updateQueue;Hr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var h=s.baseState;i=0,d=u=l=null,a=o;do{var p=a.lane,f=a.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(p=t,f=r,y.tag){case 1:if(w=y.payload,typeof w=="function"){h=w.call(f,h,p);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,p=typeof w=="function"?w.call(f,h,p):w,p==null)break e;h=ge({},h,p);break e;case 2:Hr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=f,l=h):d=d.next=f,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Jn|=i,e.lanes=i,e.memoizedState=h}}function _f(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(P(191,s));s.call(n)}}}var ki={},sr=xn(ki),Xo=xn(ki),Zo=xn(ki);function Dn(e){if(e===ki)throw Error(P(174));return e}function Ld(e,t){switch(le(Zo,t),le(Xo,e),le(sr,ki),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gc(t,e)}de(sr),le(sr,t)}function Ks(){de(sr),de(Xo),de(Zo)}function Pg(e){Dn(Zo.current);var t=Dn(sr.current),r=Gc(t,e.type);t!==r&&(le(Xo,e),le(sr,r))}function Md(e){Xo.current===e&&(de(sr),de(Xo))}var pe=xn(0);function Wa(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gc=[];function Fd(){for(var e=0;e<gc.length;e++)gc[e]._workInProgressVersionPrimary=null;gc.length=0}var wa=Ar.ReactCurrentDispatcher,vc=Ar.ReactCurrentBatchConfig,Qn=0,me=null,Ee=null,Re=null,Ka=!1,Oo=!1,ei=0,eb=0;function Fe(){throw Error(P(321))}function Bd(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ft(e[r],t[r]))return!1;return!0}function Ud(e,t,r,n,s,o){if(Qn=o,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,wa.current=e===null||e.memoizedState===null?sb:ob,e=r(n,s),Oo){o=0;
vendor: 6,592 bytes, line 38
38do{if(Oo=!1,ei=0,25<=o)throw Error(P(301));o+=1,Re=Ee=null,t.updateQueue=null,wa.current=ib,e=r(n,s)}while(Oo)}if(wa.current=Ga,t=Ee!==null&&Ee.next!==null,Qn=0,Re=Ee=me=null,Ka=!1,t)throw Error(P(300));return e}function qd(){var e=ei!==0;return ei=0,e}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Re===null?me.memoizedState=Re=e:Re=Re.next=e,Re}function _t(){if(Ee===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Re===null?me.memoizedState:Re.next;if(t!==null)Re=t,Ee=e;else{if(e===null)throw Error(P(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Re===null?me.memoizedState=Re=e:Re=Re.next=e}return Re}function ti(e,t){return typeof t=="function"?t(e):t}function yc(e){var t=_t(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=Ee,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,u=o;do{var d=u.lane;if((Qn&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,i=n):l=l.next=h,me.lanes|=d,Jn|=d}u=u.next}while(u!==null&&u!==o);l===null?i=n:l.next=a,Ft(n,t.memoizedState)||(tt=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,me.lanes|=o,Jn|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function xc(e){var t=_t(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Ft(o,t.memoizedState)||(tt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Og(){}function Ig(e,t){var r=me,n=_t(),s=t(),o=!Ft(n.memoizedState,s);if(o&&(n.memoizedState=s,tt=!0),n=n.queue,zd(Lg.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Re!==null&&Re.memoizedState.tag&1){if(r.flags|=2048,ri(9,Dg.bind(null,r,n,s,t),void 0,null),Ae===null)throw Error(P(349));Qn&30||$g(r,t,s)}return s}function $g(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Dg(e,t,r,n){t.value=r,t.getSnapshot=n,Mg(t)&&Fg(e)}function Lg(e,t,r){return r(function(){Mg(t)&&Fg(e)})}function Mg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ft(e,r)}catch{return!0}}function Fg(e){var t=jr(e,1);t!==null&&Mt(t,e,1,-1)}function kf(e){var t=Qt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:e},t.queue=e,e=e.dispatch=nb.bind(null,me,e),[t.memoizedState,e]}function ri(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Bg(){return _t().memoizedState}function ba(e,t,r,n){var s=Qt();me.flags|=e,s.memoizedState=ri(1|t,r,void 0,n===void 0?null:n)}function yl(e,t,r,n){var s=_t();n=n===void 0?null:n;var o=void 0;if(Ee!==null){var i=Ee.memoizedState;if(o=i.destroy,n!==null&&Bd(n,i.deps)){s.memoizedState=ri(t,r,o,n);return}}me.flags|=e,s.memoizedState=ri(1|t,r,o,n)}function Sf(e,t){return ba(8390656,8,e,t)}function zd(e,t){return yl(2048,8,e,t)}function Ug(e,t){return yl(4,2,e,t)}function qg(e,t){return yl(4,4,e,t)}function zg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vg(e,t,r){return r=r!=null?r.concat([e]):null,yl(4,4,zg.bind(null,t,e),r)}function Vd(){}function Hg(e,t){var r=_t();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Bd(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Wg(e,t){var r=_t();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Bd(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Kg(e,t,r){return Qn&21?(Ft(r,t)||(r=Xm(),me.lanes|=r,Jn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,tt=!0),e.memoizedState=r)}function tb(e,t){var r=oe;oe=r!==0&&4>r?r:4,e(!0);var n=vc.transition;vc.transition={};try{e(!1),t()}finally{oe=r,vc.transition=n}}function Gg(){return _t().memoizedState}function rb(e,t,r){var n=dn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Qg(e))Jg(t,r);else if(r=Rg(e,t,r,n),r!==null){var s=Ge();Mt(r,e,n,s),Yg(r,t,n)}}function nb(e,t,r){var n=dn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Qg(e))Jg(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,Ft(a,i)){var l=t.interleaved;l===null?(s.next=s,$d(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Rg(e,t,s,n),r!==null&&(s=Ge(),Mt(r,e,n,s),Yg(r,t,n))}}function Qg(e){var t=e.alternate;return e===me||t!==null&&t===me}function Jg(e,t){Oo=Ka=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Yg(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,bd(e,r)}}var Ga={readContext:bt,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},sb={readContext:bt,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Sf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ba(4194308,4,zg.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ba(4194308,4,e,t)},useInsertionEffect:function(e,t){return ba(4,2,e,t)},useMemo:function(e,t){var r=Qt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Qt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=rb.bind(null,me,e),[n.memoizedState,e]}
vendor: 5,922 bytes, lines 38-40
38,useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:kf,useDebugValue:Vd,useDeferredValue:function(e){return Qt().memoizedState=e},useTransition:function(){var e=kf(!1),t=e[0];return e=tb.bind(null,e[1]),Qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=me,s=Qt();if(fe){if(r===void 0)throw Error(P(407));r=r()}else{if(r=t(),Ae===null)throw Error(P(349));Qn&30||$g(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Sf(Lg.bind(null,n,o,e),[e]),n.flags|=2048,ri(9,Dg.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Qt(),t=Ae.identifierPrefix;if(fe){var r=kr,n=_r;r=(n&~(1<<32-Lt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ei++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=eb++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ob={readContext:bt,useCallback:Hg,useContext:bt,useEffect:zd,useImperativeHandle:Vg,useInsertionEffect:Ug,useLayoutEffect:qg,useMemo:Wg,useReducer:yc,useRef:Bg,useState:function(){return yc(ti)},useDebugValue:Vd,useDeferredValue:function(e){var t=_t();return Kg(t,Ee.memoizedState,e)},useTransition:function(){var e=yc(ti)[0],t=_t().memoizedState;return[e,t]},useMutableSource:Og,useSyncExternalStore:Ig,useId:Gg,unstable_isNewReconciler:!1},ib={readContext:bt,useCallback:Hg,useContext:bt,useEffect:zd,useImperativeHandle:Vg,useInsertionEffect:Ug,useLayoutEffect:qg,useMemo:Wg,useReducer:xc,useRef:Bg,useState:function(){return xc(ti)},useDebugValue:Vd,useDeferredValue:function(e){var t=_t();return Ee===null?t.memoizedState=e:Kg(t,Ee.memoizedState,e)},useTransition:function(){var e=xc(ti)[0],t=_t().memoizedState;return[e,t]},useMutableSource:Og,useSyncExternalStore:Ig,useId:Gg,unstable_isNewReconciler:!1};function Rt(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function mu(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ge({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var xl={isMounted:function(e){return(e=e._reactInternals)?es(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ge(),s=dn(e),o=Sr(n,s);o.payload=t,r!=null&&(o.callback=r),t=cn(e,o,s),t!==null&&(Mt(t,e,s,n),xa(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ge(),s=dn(e),o=Sr(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=cn(e,o,s),t!==null&&(Mt(t,e,s,n),xa(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ge(),n=dn(e),s=Sr(r,n);s.tag=2,t!=null&&(s.callback=t),t=cn(e,s,n),t!==null&&(Mt(t,e,n,r),xa(t,e,n))}};function Ef(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!Go(r,n)||!Go(s,o):!0}function Xg(e,t,r){var n=!1,s=pn,o=t.contextType;return typeof o=="object"&&o!==null?o=bt(o):(s=nt(t)?Kn:ze.current,n=t.contextTypes,o=(n=n!=null)?Vs(e,s):pn),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Cf(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&xl.enqueueReplaceState(t,t.state,null)}function gu(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Dd(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=bt(o):(o=nt(t)?Kn:ze.current,s.context=Vs(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(mu(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&xl.enqueueReplaceState(s,s.state,null),Ha(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Gs(e,t){try{var r="",n=t;do r+=Ix(n),n=n.return;while(n);var s=r}catch(o){s=` 39Error generating stack: `+o.message+` 40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function wc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function vu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var ab=typeof WeakMap=="function"?WeakMap:Map;function Zg(e,t,r){r=Sr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ja||(Ja=!0,ju=n),vu(e,t)},r}function ev(e,t,r){r=Sr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){vu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){vu(e,t),typeof n!="function"&&(un===null?un=new Set([this]):un.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function jf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new ab;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=bb.bind(null,e,t,r),t.then(e,e))}function Nf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Tf(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Sr(-1,1),t.tag=2,cn(r,t,1))),r.lanes|=1),e)}var lb=Ar.ReactCurrentOwner,tt=!1;function We(e,t,r,n){t.child=e===null?Tg(t,null,r,n):Ws(t,e.child,r,n)}function Rf(e,t,r,n,s){r=r.render;var o=t.ref;
vendor: 6,220 bytes, line 40
40return Rs(t,s),n=Ud(e,t,r,n,o,s),r=qd(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Nr(e,t,s)):(fe&&r&&Td(t),t.flags|=1,We(e,t,n,s),t.child)}function Af(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Xd(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,tv(e,t,o,n,s)):(e=Ea(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:Go,r(i,n)&&e.ref===t.ref)return Nr(e,t,s)}return t.flags|=1,e=hn(o,n),e.ref=t.ref,e.return=t,t.child=e}function tv(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Go(o,n)&&e.ref===t.ref)if(tt=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(tt=!0);else return t.lanes=e.lanes,Nr(e,t,s)}return yu(e,t,r,n,s)}function rv(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(Ss,it),it|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(Ss,it),it|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,le(Ss,it),it|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,le(Ss,it),it|=n;return We(e,t,s,r),t.child}function nv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function yu(e,t,r,n,s){var o=nt(r)?Kn:ze.current;return o=Vs(t,o),Rs(t,s),r=Ud(e,t,r,n,o,s),n=qd(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Nr(e,t,s)):(fe&&n&&Td(t),t.flags|=1,We(e,t,r,s),t.child)}function Pf(e,t,r,n,s){if(nt(r)){var o=!0;Ba(t)}else o=!1;if(Rs(t,s),t.stateNode===null)_a(e,t),Xg(t,r,n),gu(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=bt(u):(u=nt(r)?Kn:ze.current,u=Vs(t,u));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Cf(t,i,n,u),Hr=!1;var p=t.memoizedState;i.state=p,Ha(t,n,i,s),l=t.memoizedState,a!==n||p!==l||rt.current||Hr?(typeof d=="function"&&(mu(t,r,d,n),l=t.memoizedState),(a=Hr||Ef(t,r,a,n,p,l,u))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=u,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Ag(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Rt(t.type,a),i.props=u,h=t.pendingProps,p=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=bt(l):(l=nt(r)?Kn:ze.current,l=Vs(t,l));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==h||p!==l)&&Cf(t,i,n,l),Hr=!1,p=t.memoizedState,i.state=p,Ha(t,n,i,s);var w=t.memoizedState;a!==h||p!==w||rt.current||Hr?(typeof f=="function"&&(mu(t,r,f,n),w=t.memoizedState),(u=Hr||Ef(t,r,u,n,p,w,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,w,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,w,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),i.props=n,i.state=w,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return xu(e,t,r,n,o,s)}function xu(e,t,r,n,s,o){nv(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&vf(t,r,!1),Nr(e,t,o);n=t.stateNode,lb.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Ws(t,e.child,null,o),t.child=Ws(t,null,a,o)):We(e,t,a,o),t.memoizedState=n.state,s&&vf(t,r,!0),t.child}function sv(e){var t=e.stateNode;t.pendingContext?gf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gf(e,t.context,!1),Ld(e,t.containerInfo)}function Of(e,t,r,n,s){return Hs(),Ad(s),t.flags|=256,We(e,t,r,n),t.child}var wu={dehydrated:null,treeContext:null,retryLane:0};function bu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ov(e,t,r){var n=t.pendingProps,s=pe.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),le(pe,s&1),e===null)return fu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=_l(i,n,0,null),e=Hn(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=bu(r),t.memoizedState=wu,e):Hd(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return cb(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=hn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=hn(a,o):(o=Hn(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?bu(r):{base
vendor: 8,213 bytes, line 40
40Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=wu,n}return o=e.child,e=o.sibling,n=hn(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Hd(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Gi(e,t,r,n){return n!==null&&Ad(n),Ws(t,e.child,null,r),e=Hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cb(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=wc(Error(P(422))),Gi(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=_l({mode:"visible",children:n.children},s,0,null),o=Hn(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Ws(t,e.child,null,i),t.child.memoizedState=bu(i),t.memoizedState=wu,o);if(!(t.mode&1))return Gi(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(P(419)),n=wc(o,n,void 0),Gi(e,t,i,n)}if(a=(i&e.childLanes)!==0,tt||a){if(n=Ae,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,jr(e,s),Mt(n,e,s,-1))}return Yd(),n=wc(Error(P(421))),Gi(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=_b.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,ct=ln(s.nextSibling),ut=t,fe=!0,Dt=null,e!==null&&(vt[yt++]=_r,vt[yt++]=kr,vt[yt++]=Gn,_r=e.id,kr=e.overflow,Gn=t),t=Hd(t,n.children),t.flags|=4096,t)}function If(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),pu(e.return,t,r)}function bc(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function iv(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(We(e,t,n.children,r),n=pe.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&If(e,r,t);else if(e.tag===19)If(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(le(pe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Wa(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),bc(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wa(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}bc(t,!0,r,null,o);break;case"together":bc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _a(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,r=hn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=hn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function ub(e,t,r){switch(t.tag){case 3:sv(t),Hs();break;case 5:Pg(t);break;case 1:nt(t.type)&&Ba(t);break;case 4:Ld(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;le(za,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(le(pe,pe.current&1),t.flags|=128,null):r&t.child.childLanes?ov(e,t,r):(le(pe,pe.current&1),e=Nr(e,t,r),e!==null?e.sibling:null);le(pe,pe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return iv(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),le(pe,pe.current),n)break;return null;case 22:case 23:return t.lanes=0,rv(e,t,r)}return Nr(e,t,r)}var av,_u,lv,cv;av=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};_u=function(){};lv=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Dn(sr.current);var o=null;switch(r){case"input":s=Vc(e,s),n=Vc(e,n),o=[];break;case"select":s=ge({},s,{value:void 0}),n=ge({},n,{value:void 0}),o=[];break;case"textarea":s=Kc(e,s),n=Kc(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Ma)}Qc(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Uo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Uo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};cv=function(e,t,r,n){r!==n&&(t.flags|=4)};function mo(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function db(e,t,r){var n=t.pendingProps;switch(Rd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return nt(t.type)&&Fa(),Be(t),null;case 3:return n=t.stateNode,Ks(),de(rt),de(ze),Fd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dt!==null&&(Ru(Dt),Dt=null))),_u(e,t),Be(t),null;case 5:Md(t);var s=Dn(Zo.current);if(r=t.type,e!==null&&t.stateNode!=null)lv(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(P(166));return Be(t),null}if(e=Dn(sr.current),Wi(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[tr]=t,n[Yo]=o,e=(t.mode&1)!==0,r){case"dialog":ue("cancel",n),ue("close",n);break;case"iframe":case"object":case"embed":ue("load",n);break;case"video":case"audio":for(s=0;s<Eo.length;s++)ue(Eo[s],n);break;case"source":ue("error",n);break;case"img":case"image":case"link":ue("error",n),ue("load",n);break;case"details":ue("toggle",n);break;case"input":qh(n,o),ue("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},ue("invalid",n);break;case"textarea":Vh(n,o),ue("invalid",n)}Qc(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];
vendor: 31,695 bytes, line 40
40i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&Hi(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Hi(n.textContent,a,e),s=["children",""+a]):Uo.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ue("scroll",n)}switch(r){case"input":Li(n),zh(n,o,!0);break;case"textarea":Li(n),Hh(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Ma)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Lm(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[tr]=t,e[Yo]=n,av(e,t,!1,!1),t.stateNode=e;e:{switch(i=Jc(r,n),r){case"dialog":ue("cancel",e),ue("close",e),s=n;break;case"iframe":case"object":case"embed":ue("load",e),s=n;break;case"video":case"audio":for(s=0;s<Eo.length;s++)ue(Eo[s],e);s=n;break;case"source":ue("error",e),s=n;break;case"img":case"image":case"link":ue("error",e),ue("load",e),s=n;break;case"details":ue("toggle",e),s=n;break;case"input":qh(e,n),s=Vc(e,n),ue("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ge({},n,{value:void 0}),ue("invalid",e);break;case"textarea":Vh(e,n),s=Kc(e,n),ue("invalid",e);break;default:s=n}Qc(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?Bm(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Mm(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&qo(e,l):typeof l=="number"&&qo(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Uo.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ue("scroll",e):l!=null&&md(e,o,l,i))}switch(r){case"input":Li(e),zh(e,n,!1);break;case"textarea":Li(e),Hh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+fn(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Cs(e,!!n.multiple,o,!1):n.defaultValue!=null&&Cs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ma)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Be(t),null;case 6:if(e&&t.stateNode!=null)cv(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(r=Dn(Zo.current),Dn(sr.current),Wi(t)){if(n=t.stateNode,r=t.memoizedProps,n[tr]=t,(o=n.nodeValue!==r)&&(e=ut,e!==null))switch(e.tag){case 3:Hi(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hi(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[tr]=t,t.stateNode=n}return Be(t),null;case 13:if(de(pe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&ct!==null&&t.mode&1&&!(t.flags&128))jg(),Hs(),t.flags|=98560,o=!1;else if(o=Wi(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(P(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(P(317));o[tr]=t}else Hs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Be(t),o=!1}else Dt!==null&&(Ru(Dt),Dt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||pe.current&1?Ce===0&&(Ce=3):Yd())),t.updateQueue!==null&&(t.flags|=4),Be(t),null);case 4:return Ks(),_u(e,t),e===null&&Qo(t.stateNode.containerInfo),Be(t),null;case 10:return Id(t.type._context),Be(t),null;case 17:return nt(t.type)&&Fa(),Be(t),null;case 19:if(de(pe),o=t.memoizedState,o===null)return Be(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)mo(o,!1);else{if(Ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Wa(e),i!==null){for(t.flags|=128,mo(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return le(pe,pe.current&1|2),t.child}e=e.sibling}o.tail!==null&&be()>Qs&&(t.flags|=128,n=!0,mo(o,!1),t.lanes=4194304)}else{if(!n)if(e=Wa(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),mo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!fe)return Be(t),null}else 2*be()-o.renderingStartTime>Qs&&r!==1073741824&&(t.flags|=128,n=!0,mo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=be(),t.sibling=null,r=pe.current,le(pe,n?r&1|2:r&1),t):(Be(t),null);case 22:case 23:return Jd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?it&1073741824&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function hb(e,t){switch(Rd(t),t.tag){case 1:return nt(t.type)&&Fa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ks(),de(rt),de(ze),Fd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Md(t),null;case 13:if(de(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(pe),null;case 4:return Ks(),null;case 10:return Id(t.type._context),null;case 22:case 23:return Jd(),null;case 24:return null;default:return null}}var Qi=!1,qe=!1,fb=typeof WeakSet=="function"?WeakSet:Set,M=null;function ks(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){we(e,t,n)}else r.current=null}function ku(e,t,r){try{r()}catch(n){we(e,t,n)}}var $f=!1;function pb(e,t){if(iu=$a,e=pg(),Nd(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(a=i+s),h!==o||n!==0&&h.nodeType!==3||(l=i+n),h.nodeType===3&&(i+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===e)break t;if(p===r&&++u===s&&(a=i),p===o&&++d===n&&(l=i),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(au={focusedElem:e,selectionRange:r},$a=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,x=w.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:Rt(t.type,y),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(_){we(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=$f,$f=!1,w}function Io(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&ku(t,r,o)}s=s.next}while(s!==n)}}function wl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Su(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function uv(e){var t=e.alternate;t!==null&&(e.alternate=null,uv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tr],delete t[Yo],delete t[uu],delete t[Jw],delete t[Yw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dv(e){return e.tag===5||e.tag===3||e.tag===4}function Df(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Eu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ma));else if(n!==4&&(e=e.child,e!==null))for(Eu(e,t,r),e=e.sibling;e!==null;)Eu(e,t,r),e=e.sibling}function Cu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Cu(e,t,r),e=e.sibling;e!==null;)Cu(e,t,r),e=e.sibling}var $e=null,$t=!1;function Br(e,t,r){for(r=r.child;r!==null;)hv(e,t,r),r=r.sibling}function hv(e,t,r){if(nr&&typeof nr.onCommitFiberUnmount=="function")try{nr.onCommitFiberUnmount(hl,r)}catch{}switch(r.tag){case 5:qe||ks(r,t);case 6:var n=$e,s=$t;$e=null,Br(e,t,r),$e=n,$t=s,$e!==null&&($t?(e=$e,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):$e.removeChild(r.stateNode));break;case 18:$e!==null&&($t?(e=$e,r=r.stateNode,e.nodeType===8?pc(e.parentNode,r):e.nodeType===1&&pc(e,r),Wo(e)):pc($e,r.stateNode));break;case 4:n=$e,s=$t,$e=r.stateNode.containerInfo,$t=!0,Br(e,t,r),$e=n,$t=s;break;case 0:case 11:case 14:case 15:if(!qe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ku(r,t,i),s=s.next}while(s!==n)}Br(e,t,r);break;case 1:if(!qe&&(ks(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){we(r,t,a)}Br(e,t,r);break;case 21:Br(e,t,r);break;case 22:r.mode&1?(qe=(n=qe)||r.memoizedState!==null,Br(e,t,r),qe=n):Br(e,t,r);break;default:Br(e,t,r)}}function Lf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new fb),t.forEach(function(n){var s=kb.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function jt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:$e=a.stateNode,$t=!1;break e;case 3:$e=a.stateNode.containerInfo,$t=!0;break e;case 4:$e=a.stateNode.containerInfo,$t=!0;break e}a=a.return}if($e===null)throw Error(P(160));hv(o,i,s),$e=null,$t=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){we(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)fv(t,e),t=t.sibling}function fv(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(t,e),Kt(e),n&4){try{Io(3,e,e.return),wl(3,e)}catch(y){we(e,e.return,y)}try{Io(5,e,e.return)}catch(y){we(e,e.return,y)}}break;case 1:jt(t,e),Kt(e),n&512&&r!==null&&ks(r,r.return);break;case 5:if(jt(t,e),Kt(e),n&512&&r!==null&&ks(r,r.return),e.flags&32){var s=e.stateNode;try{qo(s,"")}catch(y){we(e,e.return,y)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&$m(s,o),Jc(a,i);var u=Jc(a,o);for(i=0;i<l.length;i+=2){var d=l[i],h=l[i+1];d==="style"?Bm(s,h):d==="dangerouslySetInnerHTML"?Mm(s,h):d==="children"?qo(s,h):md(s,d,h,u)}switch(a){case"input":Hc(s,o);break;case"textarea":Dm(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var f=o.value;f!=null?Cs(s,!!o.multiple,f,!1):p!==!!o.multiple&&(o.defaultValue!=null?Cs(s,!!o.multiple,o.defaultValue,!0):Cs(s,!!o.multiple,o.multiple?[]:"",!1))}s[Yo]=o}catch(y){we(e,e.return,y)}}break;case 6:if(jt(t,e),Kt(e),n&4){if(e.stateNode===null)throw Error(P(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){we(e,e.return,y)}}break;case 3:if(jt(t,e),Kt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Wo(t.containerInfo)}catch(y){we(e,e.return,y)}break;case 4:jt(t,e),Kt(e);break;case 13:jt(t,e),Kt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Gd=be())),n&4&&Lf(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(qe=(u=qe)||d,jt(t,e),qe=u):jt(t,e),Kt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(M=e,d=e.child;d!==null;){for(h=M=d;M!==null;){switch(p=M,f=p.child,p.tag){case 0:case 11:case 14:case 15:Io(4,p,p.return);break;case 1:ks(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){we(n,r,y)}}break;case 5:ks(p,p.return);break;case 22:if(p.memoizedState!==null){Ff(h);continue}}f!==null?(f.return=p,M=f):Ff(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=h.stateNode,l=h.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Fm("display",i))}catch(y){we(e,e.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){we(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:jt(t,e),Kt(e),n&4&&Lf(e);break;case 21:break;default:jt(t,e),Kt(e)}}function Kt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(dv(r)){var n=r;break e}r=r.return}throw Error(P(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(qo(s,""),n.flags&=-33);var o=Df(e);Cu(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Df(e);Eu(e,a,i);break;default:throw Error(P(161))}}catch(l){we(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function mb(e,t,r){M=e,pv(e)}function pv(e,t,r){for(var n=(e.mode&1)!==0;M!==null;){var s=M,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Qi;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||qe;a=Qi;var u=qe;if(Qi=i,(qe=l)&&!u)for(M=s;M!==null;)i=M,l=i.child,i.tag===22&&i.memoizedState!==null?Bf(s):l!==null?(l.return=i,M=l):Bf(s);for(;o!==null;)M=o,pv(o),o=o.sibling;M=s,Qi=a,qe=u}Mf(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,M=o):Mf(e)}}function Mf(e){for(;M!==null;){var t=M;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qe||wl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!qe)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Rt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&_f(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}_f(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Wo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}qe||t.flags&512&&Su(t)}catch(p){we(t,t.return,p)}}if(t===e){M=null;break}if(r=t.sibling,r!==null){r.return=t.return,M=r;break}M=t.return}}function Ff(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var r=t.sibling;if(r!==null){r.return=t.return,M=r;break}M=t.return}}function Bf(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{wl(4,t)}catch(l){we(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){we(t,s,l)}}var o=t.return;try{Su(t)}catch(l){we(t,o,l)}break;case 5:var i=t.return;try{Su(t)}catch(l){we(t,i,l)}}}catch(l){we(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var gb=Math.ceil,Qa=Ar.ReactCurrentDispatcher,Wd=Ar.ReactCurrentOwner,wt=Ar.ReactCurrentBatchConfig,ne=0,Ae=null,Se=null,De=0,it=0,Ss=xn(0),Ce=0,ni=null,Jn=0,bl=0,Kd=0,$o=null,et=null,Gd=0,Qs=1/0,vr=null,Ja=!1,ju=null,un=null,Ji=!1,rn=null,Ya=0,Do=0,Nu=null,ka=-1,Sa=0;function Ge(){return ne&6?be():ka!==-1?ka:ka=be()}function dn(e){return e.mode&1?ne&2&&De!==0?De&-De:Zw.transition!==null?(Sa===0&&(Sa=Xm()),Sa):(e=oe,e!==0||(e=window.event,e=e===void 0?16:og(e.type)),e):1}function Mt(e,t,r,n){if(50<Do)throw Do=0,Nu=null,Error(P(185));wi(e,r,n),(!(ne&2)||e!==Ae)&&(e===Ae&&(!(ne&2)&&(bl|=r),Ce===4&&Kr(e,De)),st(e,n),r===1&&ne===0&&!(t.mode&1)&&(Qs=be()+500,vl&&wn()))}function st(e,t){var r=e.callbackNode;Zx(e,t);var n=Ia(e,e===Ae?De:0);if(n===0)r!==null&&Gh(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Gh(r),t===1)e.tag===0?Xw(Uf.bind(null,e)):Sg(Uf.bind(null,e)),Gw(function(){!(ne&6)&&wn()}),r=null;else{switch(Zm(n)){case 1:r=wd;break;case 4:r=Jm;break;case 16:r=Oa;break;case 536870912:r=Ym;break;default:r=Oa}r=_v(r,mv.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function mv(e,t){if(ka=-1,Sa=0,ne&6)throw Error(P(327));var r=e.callbackNode;if(As()&&e.callbackNode!==r)return null;var n=Ia(e,e===Ae?De:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Xa(e,n);else{t=n;var s=ne;ne|=2;var o=vv();(Ae!==e||De!==t)&&(vr=null,Qs=be()+500,Vn(e,t));do try{xb();break}catch(a){gv(e,a)}while(!0);Od(),Qa.current=o,ne=s,Se!==null?t=0:(Ae=null,De=0,t=Ce)}if(t!==0){if(t===2&&(s=tu(e),s!==0&&(n=s,t=Tu(e,s))),t===1)throw r=ni,Vn(e,0),Kr(e,n),st(e,be()),r;if(t===6)Kr(e,n);else{if(s=e.current.alternate,!(n&30)&&!vb(s)&&(t=Xa(e,n),t===2&&(o=tu(e),o!==0&&(n=o,t=Tu(e,o))),t===1))throw r=ni,Vn(e,0),Kr(e,n),st(e,be()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(P(345));case 2:Rn(e,et,vr);break;case 3:if(Kr(e,n),(n&130023424)===n&&(t=Gd+500-be(),10<t)){if(Ia(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ge(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=cu(Rn.bind(null,e,et,vr),t);break}Rn(e,et,vr);break;case 4:if(Kr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-Lt(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=be()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*gb(n/1960))-n,10<n){e.timeoutHandle=cu(Rn.bind(null,e,et,vr),n);break}Rn(e,et,vr);break;case 5:Rn(e,et,vr);break;default:throw Error(P(329))}}}return st(e,be()),e.callbackNode===r?mv.bind(null,e):null}function Tu(e,t){var r=$o;return e.current.memoizedState.isDehydrated&&(Vn(e,t).flags|=256),e=Xa(e,t),e!==2&&(t=et,et=r,t!==null&&Ru(t)),e}function Ru(e){et===null?et=e:et.push.apply(et,e)}function vb(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!Ft(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kr(e,t){for(t&=~Kd,t&=~bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Lt(t),n=1<<r;e[r]=-1,t&=~n}}function Uf(e){if(ne&6)throw Error(P(327));As();var t=Ia(e,0);if(!(t&1))return st(e,be()),null;var r=Xa(e,t);if(e.tag!==0&&r===2){var n=tu(e);n!==0&&(t=n,r=Tu(e,n))}if(r===1)throw r=ni,Vn(e,0),Kr(e,t),st(e,be()),r;if(r===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rn(e,et,vr),st(e,be()),null}function Qd(e,t){var r=ne;ne|=1;try{return e(t)}finally{ne=r,ne===0&&(Qs=be()+500,vl&&wn())}}function Yn(e){rn!==null&&rn.tag===0&&!(ne&6)&&As();var t=ne;ne|=1;var r=wt.transition,n=oe;try{if(wt.transition=null,oe=1,e)return e()}finally{oe=n,wt.transition=r,ne=t,!(ne&6)&&wn()}}function Jd(){it=Ss.current,de(Ss)}function Vn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Kw(r)),Se!==null)for(r=Se.return;r!==null;){var n=r;switch(Rd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Fa();break;case 3:Ks(),de(rt),de(ze),Fd();break;case 5:Md(n);break;case 4:Ks();break;case 13:de(pe);break;case 19:de(pe);break;case 10:Id(n.type._context);break;case 22:case 23:Jd()}r=r.return}if(Ae=e,Se=e=hn(e.current,null),De=it=t,Ce=0,ni=null,Kd=bl=Jn=0,et=$o=null,$n!==null){for(t=0;t<$n.length;t++)if(r=$n[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}$n=null}return e}function gv(e,t){do{var r=Se;try{if(Od(),wa.current=Ga,Ka){for(var n=me.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ka=!1}if(Qn=0,Re=Ee=me=null,Oo=!1,ei=0,Wd.current=null,r===null||r.return===null){Ce=1,ni=t,Se=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=De,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=Nf(i);if(f!==null){f.flags&=-257,Tf(f,i,a,o,t),f.mode&1&&jf(o,u,t),t=f,l=u;var w=t.updateQueue;if(w===null){var y=new Set;y.add(l),t.updateQueue=y}else w.add(l);break e}else{if(!(t&1)){jf(o,u,t),Yd();break e}l=Error(P(426))}}else if(fe&&a.mode&1){var x=Nf(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Tf(x,i,a,o,t),Ad(Gs(l,a));break e}}o=l=Gs(l,a),Ce!==4&&(Ce=2),$o===null?$o=[o]:$o.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Zg(o,l,t);bf(o,v);break e;case 1:a=l;var g=o.type,m=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(un===null||!un.has(m)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=ev(o,a,t);bf(o,_);break e}}o=o.return}while(o!==null)}xv(r)}catch(k){t=k,Se===r&&r!==null&&(Se=r=r.return);continue}break}while(!0)}function vv(){var e=Qa.current;return Qa.current=Ga,e===null?Ga:e}function Yd(){(Ce===0||Ce===3||Ce===2)&&(Ce=4),Ae===null||!(Jn&268435455)&&!(bl&268435455)||Kr(Ae,De)}function Xa(e,t){var r=ne;ne|=2;var n=vv();(Ae!==e||De!==t)&&(vr=null,Vn(e,t));do try{yb();break}catch(s){gv(e,s)}while(!0);if(Od(),ne=r,Qa.current=n,Se!==null)throw Error(P(261));return Ae=null,De=0,Ce}function yb(){for(;Se!==null;)yv(Se)}function xb(){for(;Se!==null&&!Vx();)yv(Se)}function yv(e){var t=bv(e.alternate,e,it);e.memoizedProps=e.pendingProps,t===null?xv(e):Se=t,Wd.current=null}function xv(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=hb(r,t),r!==null){r.flags&=32767,Se=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ce=6,Se=null;return}}else if(r=db(r,t,it),r!==null){Se=r;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ce===0&&(Ce=5)}function Rn(e,t,r){var n=oe,s=wt.transition;try{wt.transition=null,oe=1,wb(e,t,r,n)}finally{wt.transition=s,oe=n}return null}function wb(e,t,r,n){do As();while(rn!==null);if(ne&6)throw Error(P(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(ew(e,o),e===Ae&&(Se=Ae=null,De=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ji||(Ji=!0,_v(Oa,function(){return As(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=wt.transition,wt.transition=null;var i=oe;oe=1;var a=ne;ne|=4,Wd.current=null,pb(e,r),fv(r,e),Bw(au),$a=!!iu,au=iu=null,e.current=r,mb(r),Hx(),ne=a,oe=i,wt.transition=o}else e.current=r;if(Ji&&(Ji=!1,rn=e,Ya=s),o=e.pendingLanes,o===0&&(un=null),Gx(r.stateNode),st(e,be()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Ja)throw Ja=!1,e=ju,ju=null,e;return Ya&1&&e.tag!==0&&As(),o=e.pendingLanes,o&1?e===Nu?Do++:(Do=0,Nu=e):Do=0,wn(),null}function As(){if(rn!==null){var e=Zm(Ya),t=wt.transition,r=oe;try{if(wt.transition=null,oe=16>e?16:e,rn===null)var n=!1;else{if(e=rn,rn=null,Ya=0,ne&6)throw Error(P(331));var s=ne;for(ne|=4,M=e.current;M!==null;){var o=M,i=o.child;if(M.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(M=u;M!==null;){var d=M;switch(d.tag){case 0:case 11:case 15:Io(8,d,o)}var h=d.child;if(h!==null)h.return=d,M=h;else for(;M!==null;){d=M;var p=d.sibling,f=d.return;if(uv(d),d===u){M=null;break}if(p!==null){p.return=f,M=p;break}M=f}}}var w=o.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var x=y.sibling;y.sibling=null,y=x}while(y!==null)}}M=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,M=i;else e:for(;M!==null;){if(o=M,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Io(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,M=v;break e}M=o.return}}var g=e.current;for(M=g;M!==null;){i=M;var m=i.child;if(i.subtreeFlags&2064&&m!==null)m.return=i,M=m;else e:for(i=g;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:wl(9,a)}}catch(k){we(a,a.return,k)}if(a===i){M=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,M=_;break e}M=a.return}}if(ne=s,wn(),nr&&typeof nr.onPostCommitFiberRoot=="function")try{nr.onPostCommitFiberRoot(hl,e)}catch{}n=!0}return n}finally{oe=r,wt.transition=t}}return!1}function qf(e,t,r){t=Gs(r,t),t=Zg(e,t,1),e=cn(e,t,1),t=Ge(),e!==null&&(wi(e,1,t),st(e,t))}function we(e,t,r){if(e.tag===3)qf(e,e,r);else for(;t!==null;){if(t.tag===3){qf(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(un===null||!un.has(n))){e=Gs(r,e),e=ev(t,e,1),t=cn(t,e,1),e=Ge(),t!==null&&(wi(t,1,e),st(t,e));break}}t=t.return}}function bb(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ge(),e.pingedLanes|=e.suspendedLanes&r,Ae===e&&(De&r)===r&&(Ce===4||Ce===3&&(De&130023424)===De&&500>be()-Gd?Vn(e,0):Kd|=r),st(e,t)}function wv(e,t){t===0&&(e.mode&1?(t=Bi,Bi<<=1,!(Bi&130023424)&&(Bi=4194304)):t=1);var r=Ge();e=jr(e,t),e!==null&&(wi(e,t,r),st(e,r))}function _b(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),wv(e,r)}function kb(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(P(314))}n!==null&&n.delete(t),wv(e,r)}var bv;bv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)tt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return tt=!1,ub(e,t,r);tt=!!(e.flags&131072)}else tt=!1,fe&&t.flags&1048576&&Eg(t,qa,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;_a(e,t),e=t.pendingProps;var s=Vs(t,ze.current);Rs(t,r),s=Ud(null,t,n,e,s,r);var o=qd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nt(n)?(o=!0,Ba(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Dd(t),s.updater=xl,t.stateNode=s,s._reactInternals=t,gu(t,n,e,r),t=xu(null,t,n,!0,o,r)):(t.tag=0,fe&&o&&Td(t),We(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(_a(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=Eb(n),e=Rt(n,e),s){case 0:t=yu(null,t,n,e,r);break e;case 1:t=Pf(null,t,n,e,r);break e;case 11:t=Rf(null,t,n,e,r);break e;case 14:t=Af(null,t,n,Rt(n.type,e),r);break e}throw Error(P(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),yu(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),Pf(e,t,n,s,r);case 3:e:{if(sv(t),e===null)throw Error(P(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Ag(e,t),Ha(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Gs(Error(P(423)),t),t=Of(e,t,n,r,s);break e}else if(n!==s){s=Gs(Error(P(424)),t),t=Of(e,t,n,r,s);break e}else for(ct=ln(t.stateNode.containerInfo.firstChild),ut=t,fe=!0,Dt=null,r=Tg(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hs(),n===s){t=Nr(e,t,r);break e}We(e,t,n,r)}t=t.child}return t;case 5:return Pg(t),e===null&&fu(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,lu(n,s)?i=null:o!==null&&lu(n,o)&&(t.flags|=32),nv(e,t),We(e,t,i,r),t.child;case 6:return e===null&&fu(t),null;case 13:return ov(e,t,r);case 4:return Ld(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ws(t,null,n,r):We(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),Rf(e,t,n,s,r);case 7:return We(e,t,t.pendingProps,r),t.child;case 8:return We(e,t,t.pendingProps.children,r),t.child;case 12:return We(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,le(za,n._currentValue),n._currentValue=i,o!==null)if(Ft(o.value,i)){if(o.children===s.children&&!rt.current){t=Nr(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Sr(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),pu(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(P(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),pu(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}We(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Rs(t,r),s=bt(s),n=n(s),t.flags|=1,We(e,t,n,r),t.child;case 14:return n=t.type,s=Rt(n,t.pendingProps),s=Rt(n.type,s),Af(e,t,n,s,r);case 15:return tv(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Rt(n,s),_a(e,t),t.tag=1,nt(n)?(e=!0,Ba(t)):e=!1,Rs(t,r),Xg(t,n,s),gu(t,n,s,r),xu(null,t,n,!0,e,r);case 19:return iv(e,t,r);case 22:return rv(e,t,r)}throw Error(P(156,t.tag))};function _v(e,t){return Qm(e,t)}function Sb(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 9,637 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,r,n){return new Sb(e,t,r,n)}function Xd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Eb(e){if(typeof e=="function")return Xd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vd)return 11;if(e===yd)return 14}return 2}function hn(e,t){var r=e.alternate;return r===null?(r=xt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ea(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")Xd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ps:return Hn(r.children,s,o,t);case gd:i=8,s|=8;break;case Bc:return e=xt(12,r,t,s|2),e.elementType=Bc,e.lanes=o,e;case Uc:return e=xt(13,r,t,s),e.elementType=Uc,e.lanes=o,e;case qc:return e=xt(19,r,t,s),e.elementType=qc,e.lanes=o,e;case Pm:return _l(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rm:i=10;break e;case Am:i=9;break e;case vd:i=11;break e;case yd:i=14;break e;case Vr:i=16,n=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=xt(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Hn(e,t,r,n){return e=xt(7,e,n,t),e.lanes=r,e}function _l(e,t,r,n){return e=xt(22,e,n,t),e.elementType=Pm,e.lanes=r,e.stateNode={isHidden:!1},e}function _c(e,t,r){return e=xt(6,e,null,t),e.lanes=r,e}function kc(e,t,r){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cb(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nc(0),this.expirationTimes=nc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nc(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Zd(e,t,r,n,s,o,i,a,l){return e=new Cb(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=xt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dd(o),e}function jb(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fs,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function kv(e){if(!e)return pn;e=e._reactInternals;e:{if(es(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var r=e.type;if(nt(r))return kg(e,r,t)}return t}function Sv(e,t,r,n,s,o,i,a,l){return e=Zd(r,n,!0,e,s,o,i,a,l),e.context=kv(null),r=e.current,n=Ge(),s=dn(r),o=Sr(n,s),o.callback=t??null,cn(r,o,s),e.current.lanes=s,wi(e,s,n),st(e,n),e}function kl(e,t,r,n){var s=t.current,o=Ge(),i=dn(s);return r=kv(r),t.context===null?t.context=r:t.pendingContext=r,t=Sr(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=cn(s,t,i),e!==null&&(Mt(e,s,i,o),xa(e,s,i)),i}function Za(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function eh(e,t){zf(e,t),(e=e.alternate)&&zf(e,t)}function Nb(){return null}var Ev=typeof reportError=="function"?reportError:function(e){console.error(e)};function th(e){this._internalRoot=e}Sl.prototype.render=th.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));kl(e,t,null,null)};Sl.prototype.unmount=th.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yn(function(){kl(null,e,null,null)}),t[Cr]=null}};function Sl(e){this._internalRoot=e}Sl.prototype.unstable_scheduleHydration=function(e){if(e){var t=rg();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Wr.length&&t!==0&&t<Wr[r].priority;r++);Wr.splice(r,0,e),r===0&&sg(e)}};function rh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function El(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Vf(){}function Tb(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=Za(i);o.call(u)}}var i=Sv(t,n,e,0,null,!1,!1,"",Vf);return e._reactRootContainer=i,e[Cr]=i.current,Qo(e.nodeType===8?e.parentNode:e),Yn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Za(l);a.call(u)}}var l=Zd(e,0,!1,null,null,!1,!1,"",Vf);return e._reactRootContainer=l,e[Cr]=l.current,Qo(e.nodeType===8?e.parentNode:e),Yn(function(){kl(t,l,r,n)}),l}function Cl(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Za(i);a.call(l)}}kl(t,i,e,s)}else i=Tb(r,t,e,s,n);return Za(i)}eg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=So(t.pendingLanes);r!==0&&(bd(t,r|1),st(t,be()),!(ne&6)&&(Qs=be()+500,wn()))}break;case 13:Yn(function(){var n=jr(e,1);if(n!==null){var s=Ge();Mt(n,e,1,s)}}),eh(e,1)}};_d=function(e){if(e.tag===13){var t=jr(e,134217728);if(t!==null){var r=Ge();Mt(t,e,134217728,r)}eh(e,134217728)}};tg=function(e){if(e.tag===13){var t=dn(e),r=jr(e,t);if(r!==null){var n=Ge();Mt(r,e,t,n)}eh(e,t)}};rg=function(){return oe};ng=function(e,t){var r=oe;try{return oe=e,t()}finally{oe=r}};Xc=function(e,t,r){switch(t){case"input":if(Hc(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=gl(n);if(!s)throw Error(P(90));Im(n),Hc(n,s)}}}break;case"textarea":Dm(e,r);break;case"select":t=r.value,t!=null&&Cs(e,!!r.multiple,t,!1)}};zm=Qd;Vm=Yn;var Rb={usingClientEntryPoint:!1,Events:[_i,ys,gl,Um,qm,Qd]},go={findFiberByHostInstance:In,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ab={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ar.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Km(e),e===null?null:e.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||Nb,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 Yi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yi.isDisabled&&Yi.supportsFiber)try{hl=Yi.inject(Ab),nr=Yi}catch{}}pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rb;pt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rh(t))throw Error(P(200));return jb(e,t,null,r)};pt.createRoot=function(e,t){if(!rh(e))throw Error(P(299));var r=!1,n="",s=Ev;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Zd(e,1,!1,null,null,r,!1,n,s),e[Cr]=t.current,Qo(e.nodeType===8?e.parentNode:e),new th(t)};pt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=Km(t),e=e===null?null:e.stateNode,e};pt.flushSync=function(e){return Yn(e)};pt.hydrate=function(e,t,r){if(!El(t))throw Error(P(200));return Cl(null,e,t,!0,r)};pt.hydrateRoot=function(e,t,r){if(!rh(e))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=Ev;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Sv(t,null,e,1,r??null,s,!1,o,i),e[Cr]=t.current,Qo(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Sl(t)};pt.render=function(e,t,r){if(!El(t))throw Error(P(200));return Cl(null,e,t,!1,r)};pt.unmountComponentAtNode=function(e){if(!El(e))throw Error(P(40));return e._reactRootContainer?(Yn(function(){Cl(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};pt.unstable_batchedUpdates=Qd;pt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!El(r))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return Cl(e,t,r,!1,n)};
vendor: 23,012 bytes, line 40
40pt.version="18.3.1-next-f1338f8080-20240426";function Cv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Cv)}catch(e){console.error(e)}}Cv(),Cm.exports=pt;var Si=Cm.exports;const jv=pm(Si);var Nv,Hf=Si;Nv=Hf.createRoot,Hf.hydrateRoot;var jl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nl=typeof window>"u"||"Deno"in globalThis;function At(){}function Pb(e,t){return typeof e=="function"?e(t):e}function Ob(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ib(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Au(e,t){return typeof e=="function"?e(t):e}function $b(e,t){return typeof e=="function"?e(t):e}function Wf(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==nh(i,t.options))return!1}else if(!oi(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function Kf(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(si(t.options.mutationKey)!==si(o))return!1}else if(!oi(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function nh(e,t){return((t==null?void 0:t.queryKeyHashFn)||si)(e)}function si(e){return JSON.stringify(e,(t,r)=>Pu(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function oi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>oi(e[r],t[r])):!1}function Tv(e,t){if(e===t)return e;const r=Gf(e)&&Gf(t);if(r||Pu(e)&&Pu(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{},l=new Set(n);let u=0;for(let d=0;d<i;d++){const h=r?d:o[d];(!r&&l.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,u++):(a[h]=Tv(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&u++)}return s===i&&u===s?e:a}return t}function Gf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pu(e){if(!Qf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Qf(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Qf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Db(e){return new Promise(t=>{setTimeout(t,e)})}function Lb(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Tv(e,t):t}function Mb(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Fb(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var sh=Symbol();function Rv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===sh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Mn,Jr,$s,im,Bb=(im=class extends jl{constructor(){super();se(this,Mn);se(this,Jr);se(this,$s);Q(this,$s,t=>{if(!Nl&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){j(this,Jr)||this.setEventListener(j(this,$s))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Jr))==null||t.call(this),Q(this,Jr,void 0))}setEventListener(t){var r;Q(this,$s,t),(r=j(this,Jr))==null||r.call(this),Q(this,Jr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){j(this,Mn)!==t&&(Q(this,Mn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof j(this,Mn)=="boolean"?j(this,Mn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Mn=new WeakMap,Jr=new WeakMap,$s=new WeakMap,im),Av=new Bb,Ds,Yr,Ls,am,Ub=(am=class extends jl{constructor(){super();se(this,Ds,!0);se(this,Yr);se(this,Ls);Q(this,Ls,t=>{if(!Nl&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){j(this,Yr)||this.setEventListener(j(this,Ls))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Yr))==null||t.call(this),Q(this,Yr,void 0))}setEventListener(t){var r;Q(this,Ls,t),(r=j(this,Yr))==null||r.call(this),Q(this,Yr,t(this.setOnline.bind(this)))}setOnline(t){j(this,Ds)!==t&&(Q(this,Ds,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return j(this,Ds)}},Ds=new WeakMap,Yr=new WeakMap,Ls=new WeakMap,am),el=new Ub;function qb(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function zb(e){return Math.min(1e3*2**e,3e4)}function Pv(e){return(e??"online")==="online"?el.isOnline():!0}var Ov=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Sc(e){return e instanceof Ov}function Iv(e){let t=!1,r=0,n=!1,s;const o=qb(),i=y=>{var x;n||(p(new Ov(y)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Av.isFocused()&&(e.networkMode==="always"||el.isOnline())&&e.canRun(),d=()=>Pv(e.networkMode)&&e.canRun(),h=y=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,y),s==null||s(),o.resolve(y))},p=y=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,y),s==null||s(),o.reject(y))},f=()=>new Promise(y=>{var x;s=v=>{(n||u())&&y(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;s=void 0,n||(y=e.onContinue)==null||y.call(e)}),w=()=>{if(n)return;let y;const x=r===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(h).catch(v=>{var S;if(n)return;const g=e.retry??(Nl?0:3),m=e.retryDelay??zb,_=typeof m=="function"?m(r,v):m,k=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!k){p(v);return}r++,(S=e.onFail)==null||S.call(e,r,v),Db(_).then(()=>u()?void 0:f()).then(()=>{t?p(v):w()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?w():f().then(w),o)}}var Vb=e=>setTimeout(e,0);function Hb(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=Vb;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ke=Hb(),Fn,lm,$v=(lm=class{constructor(){se(this,Fn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ob(this.gcTime)&&Q(this,Fn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Nl?1/0:5*60*1e3))}clearGcTimeout(){j(this,Fn)&&(clearTimeout(j(this,Fn)),Q(this,Fn,void 0))}},Fn=new WeakMap,lm),Ms,Bn,gt,Un,Ue,vi,qn,Ot,mr,cm,Wb=(cm=class extends $v{constructor(t){super();se(this,Ot);se(this,Ms);se(this,Bn);se(this,gt);se(this,Un);se(this,Ue);se(this,vi);se(this,qn);Q(this,qn,!1),Q(this,vi,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,Un,t.client),Q(this,gt,j(this,Un).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,Ms,Gb(this.options)),this.state=t.state??j(this,Ms),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,Ue))==null?void 0:t.promise}setOptions(t){this.options={...j(this,vi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,gt).remove(this)}setData(t,r){const n=Lb(this.state.data,t,this.options);return Me(this,Ot,mr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Me(this,Ot,mr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=j(this,Ue))==null?void 0:n.promise;return(s=j(this,Ue))==null||s.cancel(t),r?r.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Ms))}isActive(){return this.observers.some(t=>$b(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Au(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ib(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=j(this,Ue))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=j(this,Ue))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,gt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(j(this,Ue)&&(j(this,qn)?j(this,Ue).cancel({revert:!0}):j(this,Ue).cancelRetry()),this.scheduleGc()),j(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,Ot,mr).call(this,{type:"invalidate"})}fetch(t,r){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(j(this,Ue))return j(this,Ue).continueRetry(),j(this,Ue).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Q(this,qn,!0),n.signal)})},o=()=>{const p=Rv(this.options,r),w=(()=>{const y={client:j(this,Un),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return Q(this,qn,!1),this.options.persister?this.options.persister(p,w,this):p(w)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:j(this,Un),state:this.state,fetchFn:o};return s(p),p})();(u=this.options.behavior)==null||u.onFetch(a,this),Q(this,Bn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Me(this,Ot,mr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,w,y,x;Sc(p)&&p.silent||Me(this,Ot,mr).call(this,{type:"error",error:p}),Sc(p)||((w=(f=j(this,gt).config).onError)==null||w.call(f,p,this),(x=(y=j(this,gt).config).onSettled)==null||x.call(y,this.state.data,p,this)),this.scheduleGc()};return Q(this,Ue,Iv({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,w,y,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){l(v);return}(w=(f=j(this,gt).config).onSuccess)==null||w.call(f,p,this),(x=(y=j(this,gt).config).onSettled)==null||x.call(y,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{Me(this,Ot,mr).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Me(this,Ot,mr).call(this,{type:"pause"})},onContinue:()=>{Me(this,Ot,mr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,Ue).start()}},Ms=new WeakMap,Bn=new WeakMap,gt=new WeakMap,Un=new WeakMap,Ue=new WeakMap,vi=new WeakMap,qn=new WeakMap,Ot=new WeakSet,mr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Kb(n.data,this.options),fetchMeta:t.meta??null};case"success":return Q(this,Bn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Sc(s)&&s.revert&&j(this,Bn)?{...j(this,Bn),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ke.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),j(this,gt).notify({query:this,type:"updated",action:t})})},cm);function Kb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Gb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Yt,um,Qb=(um=class extends jl{constructor(t={}){super();se(this,Yt);this.config=t,Q(this,Yt,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??nh(s,r);let i=this.get(o);return i||(i=new Wb({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){j(this,Yt).has(t.queryHash)||(j(this,Yt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=j(this,Yt).get(t.queryHash);r&&(t.destroy(),r===t&&j(this,Yt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,Yt).get(t)}getAll(){return[...j(this,Yt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Wf(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Wf(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yt=new WeakMap,um),Xt,He,zn,Zt,zr,dm,Jb=(dm=class extends $v{constructor(t){super();se(this,Zt);se(this,Xt);se(this,He);se(this,zn);this.mutationId=t.mutationId,Q(this,He,t.mutationCache),Q(this,Xt,[]),this.state=t.state||Yb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Xt).includes(t)||(j(this,Xt).push(t),this.clearGcTimeout(),j(this,He).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,Xt,j(this,Xt).filter(r=>r!==t)),this.scheduleGc(),j(this,He).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Xt).length||(this.state.status==="pending"?this.scheduleGc():j(this,He).remove(this))}continue(){var t;return((t=j(this,zn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,d,h,p,f,w,y,x,v,g,m,_,k,S,E,N;const r=()=>{Me(this,Zt,zr).call(this,{type:"continue"})};Q(this,zn,Iv({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{Me(this,Zt,zr).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{Me(this,Zt,zr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,He).canRun(this)}));const n=this.state.status==="pending",s=!j(this,zn).canStart();try{if(n)r();else{Me(this,Zt,zr).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=j(this,He).config).onMutate)==null?void 0:i.call(o,t,this));const O=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));O!==this.state.context&&Me(this,Zt,zr).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const A=await j(this,zn).start();return await((d=(u=j(this,He).config).onSuccess)==null?void 0:d.call(u,A,t,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,A,t,this.state.context)),await((w=(f=j(this,He).config).onSettled)==null?void 0:w.call(f,A,null,this.state.variables,this.state.context,this)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,A,null,t,this.state.context)),Me(this,Zt,zr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((g=(v=j(this,He).config).onError)==null?void 0:g.call(v,A,t,this.state.context,this)),await((_=(m=this.options).onError)==null?void 0:_.call(m,A,t,this.state.context)),await((S=(k=j(this,He).config).onSettled)==null?void 0:S.call(k,void 0,A,this.state.variables,this.state.context,this)),await((N=(E=this.options).onSettled)==null?void 0:N.call(E,void 0,A,t,this.state.context)),A}finally{Me(this,Zt,zr).call(this,{type:"error",error:A})}}finally{j(this,He).runNext(this)}}},Xt=new WeakMap,He=new WeakMap,zn=new WeakMap,Zt=new WeakSet,zr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ke.batch(()=>{j(this,Xt).forEach(n=>{n.onMutationUpdate(t)}),j(this,He).notify({mutation:this,type:"updated",action:t})})},dm);function Yb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var br,It,yi,hm,Xb=(hm=class extends jl{constructor(t={}){super();se(this,br);se(this,It);se(this,yi);this.config=t,Q(this,br,new Set),Q(this,It,new Map),Q(this,yi,0)}build(t,r,n){const s=new Jb({mutationCache:this,mutationId:++Ii(this,yi)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){j(this,br).add(t);const r=Xi(t);if(typeof r=="string"){const n=j(this,It).get(r);n?n.push(t):j(this,It).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,br).delete(t)){const r=Xi(t);if(typeof r=="string"){const n=j(this,It).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&j(this,It).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Xi(t);if(typeof r=="string"){const n=j(this,It).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Xi(t);if(typeof r=="string"){const s=(n=j(this,It).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ke.batch(()=>{j(this,br).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,br).clear(),j(this,It).clear()})}getAll(){return Array.from(j(this,br))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Kf(r,n))}findAll(t={}){return this.getAll().filter(r=>Kf(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ke.batch(()=>Promise.all(t.map(r=>r.continue().catch(At))))}},br=new WeakMap,It=new WeakMap,yi=new WeakMap,hm);function Xi(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Jf(e){return{onFetch:(t,r)=>{var d,h,p,f,w;const n=t.options,s=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,o=((f=t.state.data)==null?void 0:f.pages)||[],i=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const x=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},v=Rv(t.options,t.fetchOptions),g=async(m,_,k)=>{if(y)return Promise.reject();if(_==null&&m.pages.length)return Promise.resolve(m);const E=(()=>{const q={client:t.client,queryKey:t.queryKey,pageParam:_,direction:k?"backward":"forward",meta:t.options.meta};return x(q),q})(),N=await v(E),{maxPages:A}=t.options,O=k?Fb:Mb;return{pages:O(m.pages,N,A),pageParams:O(m.pageParams,_,A)}};if(s&&o.length){const m=s==="backward",_=m?Zb:Yf,k={pages:o,pageParams:i},S=_(n,k);a=await g(k,S,m)}else{const m=e??o.length;do{const _=l===0?i[0]??n.initialPageParam:Yf(n,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<m)}return a};t.options.persister?t.fetchFn=()=>{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Yf(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Zb(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ye,Xr,Zr,Fs,Bs,en,Us,qs,fm,e1=(fm=class{constructor(e={}){se(this,ye);se(this,Xr);se(this,Zr);se(this,Fs);se(this,Bs);se(this,en);se(this,Us);se(this,qs);Q(this,ye,e.queryCache||new Qb),Q(this,Xr,e.mutationCache||new Xb),Q(this,Zr,e.defaultOptions||{}),Q(this,Fs,new Map),Q(this,Bs,new Map),Q(this,en,0)}mount(){Ii(this,en)._++,j(this,en)===1&&(Q(this,Us,Av.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,ye).onFocus())})),Q(this,qs,el.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,ye).onOnline())})))}unmount(){var e,t;Ii(this,en)._--,j(this,en)===0&&((e=j(this,Us))==null||e.call(this),Q(this,Us,void 0),(t=j(this,qs))==null||t.call(this),Q(this,qs,void 0))}isFetching(e){return j(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Xr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=j(this,ye).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=j(this,ye).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Au
40(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return j(this,ye).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=j(this,ye).get(n.queryHash),o=s==null?void 0:s.state.data,i=Pb(t,o);if(i!==void 0)return j(this,ye).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>j(this,ye).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=j(this,ye).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=j(this,ye);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=j(this,ye);return Ke.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ke.batch(()=>j(this,ye).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(At).catch(At)}invalidateQueries(e,t={}){return Ke.batch(()=>(j(this,ye).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ke.batch(()=>j(this,ye).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(At)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(At)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=j(this,ye).build(this,t);
40return r.isStaleByTime(Au(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(At).catch(At)}fetchInfiniteQuery(e){return e.behavior=Jf(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(At).catch(At)}ensureInfiniteQueryData(e){return e.behavior=Jf(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return el.isOnline()?j(this,Xr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,ye)}getMutationCache(){return j(this,Xr)}getDefaultOptions(){return j(this,Zr)}setDefaultOptions(e){Q(this,Zr,e)}setQueryDefaults(e,t){j(this,Fs).set(si(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,Fs).values()],r={};return t.forEach(n=>{oi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){j(this,Bs).set(si(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,Bs).values()],r={};return t.forEach(n=>{oi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,Zr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=nh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===sh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Zr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,ye).clear(),j(this,Xr).clear()}},ye=new WeakMap,Xr=new WeakMap,Zr=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,en=new WeakMap,Us=new WeakMap,qs=new WeakMap,fm),t1=b.createContext(void 0),r1=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(t1.Provider,{value:e,children:t}));/** 41 * @remix-run/router v1.23.0 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ii.apply(this,arguments)}var nn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(nn||(nn={}));const Xf="popstate";function n1(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return Ou("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Lv(s)}return o1(t,r,null,e)}function je(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Dv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function s1(){return Math.random().toString(36).substr(2,8)}function Zf(e,t){return{usr:e.state,key:e.key,idx:t}}function Ou(e,t,r,n){return r===void 0&&(r=null),ii({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?to(t):t,{state:r,key:t&&t.key||n||s1()})}function Lv(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function to(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function o1(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=nn.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(ii({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function h(){a=nn.Pop;let x=d(),v=x==null?null:x-u;u=x,l&&l({action:a,location:y.location,delta:v})}function p(x,v){a=nn.Push;let g=Ou(y.location,x,v);u=d()+1;let m=Zf(g,u),_=y.createHref(g);try{i.pushState(m,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(_)}o&&l&&l({action:a,location:y.location,delta:1})}function f(x,v){a=nn.Replace;let g=Ou(y.location,x,v);u=d();let m=Zf(g,u),_=y.createHref(g);i.replaceState(m,"",_),o&&l&&l({action:a,location:y.location,delta:0})}function w(x){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof x=="str
49ing"?x:Lv(x);return g=g.replace(/ $/,"%20"),je(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let y={get action(){return a},get location(){return e(s,i)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Xf,h),l=x,()=>{s.removeEventListener(Xf,h),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let v=w(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(x){return i.go(x)}};return y}var ep;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ep||(ep={}));function i1(e,t,r){return r===void 0&&(r="/"),a1(e,t,r,!1)}function a1(e,t,r,n){let s=typeof t=="string"?to(t):t,o=Bv(s.pathname||"/",r);if(o==null)return null;let i=Mv(e);l1(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=x1(o);a=v1(i[l],u,n)}return a}function Mv(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(je(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Wn([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(je(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Mv(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:m1(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Fv(o.path))s(o,i,l)}),t}function Fv(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=Fv(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function l1(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:g1(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const c1=/^:[\w-]+$/,u1=3,d1=2,h1=1,f1=10,p1=-2,tp=e=>e==="*";function m1(e,t){let r=e.split("/"),n=r.length;return r.some(tp)&&(n+=p1),t&&(n+=d1),r.filter(s=>!tp(s)).reduce((s,o)=>s+(c1.test(o)?u1:o===""?h1:f1),n)}function g1(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function v1(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",h=rp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),p=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=rp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 8,702 bytes, lines 49-58
49Object.assign(s,h.params),i.push({params:s,pathname:Wn([o,h.pathname]),pathnameBase:E1(Wn([o,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(o=Wn([o,h.pathnameBase]))}return i}function rp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=y1(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let y=a[h]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[h];return f&&!w?u[p]=void 0:u[p]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function y1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Dv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function x1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Bv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function w1(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?to(e):e;return{pathname:r?r.startsWith("/")?r:b1(r,t):t,search:C1(n),hash:j1(s)}}function b1(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Ec(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function _1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function k1(e,t){let r=_1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function S1(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=to(e):(s=ii({},e),je(!s.pathname||!s.pathname.includes("?"),Ec("?","pathname","search",s)),je(!s.pathname||!s.pathname.includes("#"),Ec("#","pathname","hash",s)),je(!s.search||!s.search.includes("#"),Ec("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let h=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=w1(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Wn=e=>e.join("/").replace(/\/\/+/g,"/"),E1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),C1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,j1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function N1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Uv=["post","put","patch","delete"];new Set(Uv);const T1=["get",...Uv];new Set(T1);/** 50 * React Router v6.30.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ai.apply(this,arguments)}const oh=b.createContext(null),R1=b.createContext(null),Tl=b.createContext(null),Rl=b.createContext(null),ro=b.createContext({outlet:null,matches:[],isDataRoute:!1}),qv=b.createContext(null);function Al(){return b.useContext(Rl)!=null}function Pl(){return Al()||je(!1),b.useContext(Rl).location}function zv(e){b.useContext(Tl).static||b.useLayoutEffect(e)}function A1(){let{isDataRoute:e}=b.useContext(ro);return e?V1():P1()}function P1(){Al()||je(!1);let e=b.useContext(oh),{basename:t,future:r,navigator:n}=b.useContext(Tl),{matches:s}=b.useContext(ro),{pathname:o}=Pl(),i=JSON.stringify(k1(s,r.v7_relativeSplatPath)),a=b.useRef(!1);return zv(()=>{a.current=!0}),b.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let h=S1(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Wn([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,i,o,e])}function O1(e,t){return I1(e,t)}function I1(e,t,r,n){Al()||je(!1);let{navigator:s}=b.useContext(Tl),{matches:o}=b.useContext(ro),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=Pl(),d;if(t){var h;let x=typeof t=="string"?to(t):t;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||je(!1),d=x}else d=u;let p=d.pathname||"/",f=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=i1(e,{pathname:f}),y=F1(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Wn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Wn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r,n);return t&&y?b.createElement(Rl.Provider,{value:{location:ai({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:nn.Pop}},y):y}function $1(){let e=z1(),t=N1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:s},r):null,null)}const D1=b.createElement($1,null);class L1 extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(ro.Provider,{value:this.props.routeContext},b.createElement(qv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function M1(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext(oh);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(ro.Provider,{value:t},n)}function F1(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||je(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:p,errors:f}=r,w=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||w){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,h,p)=>{let f,w=!1,y=null,x=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||D1,l&&(u<0&&p===0?(w=!0,x=null):u===p&&(w=!0,x=h.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,p+1)),g=()=>{let m;return f?m=y:w?m=x:h.route.Component?m=b.createElement(h.route.Component,null):h.route.element?m=h.route.element:m=d,b.createElement(M1,{match:h,routeC
58ontext:{outlet:d,matches:v,isDataRoute:r!=null},children:m})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(L1,{location:r.location,revalidation:r.revalidation,component:y,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var Vv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Vv||{}),tl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tl||{});function B1(e){let t=b.useContext(oh);return t||je(!1),t}function U1(e){let t=b.useContext(R1);return t||je(!1),t}function q1(e){let t=b.useContext(ro);return t||je(!1),t}function Hv(e){let t=q1(),r=t.matches[t.matches.length-1];return r.route.id||je(!1),r.route.id}function z1(){var e;let t=b.useContext(qv),r=U1(tl.UseRouteError),n=Hv(tl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function V1(){let{router:e}=B1(Vv.UseNavigateStable),t=Hv(tl.UseNavigateStable),r=b.useRef(!1);return zv(()=>{r.current=!0}),b.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ai({fromRouteId:t},o)))},[e,t])}function H1(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function gr(e){je(!1)}function W1(e){let{basename:t="/",children:r=null,location:n,navigationType:s=nn.Pop,navigator:o,static:i=!1,future:a}=e;Al()&&je(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:o,static:i,future:ai({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=to(n));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:w="default"}=n,y=b.useMemo(()=>{let x=Bv(d,l);return x==null?null:{location:{pathname:x,search:h,hash:p,state:f,key:w},navigationType:s}},[l,d,h,p,f,w,s]);return y==null?null:b.createElement(Tl.Provider,{value:u},b.createElement(Rl.Provider,{children:r,value:y}))}function K1(e){let{children:t,location:r}=e;return O1(Iu(t),r)}new Promise(()=>{});function Iu(e,t){t===void 0&&(t=[]);let r=[];return b.Children.forEach(e,(n,s)=>{if(!b.isValidElement(n))return;let o=[...t,s];if(n.type===b.Fragment){r.push.apply(r,Iu(n.props.children,o));return}n.type!==gr&&je(!1),!n.props.index||!n.props.children||je(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Iu(n.props.children,o)),r.push(i)}),r}/** 59 * React Router DOM v6.30.1 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */function $u(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function G1(e,t){let r=$u(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const Q1="6";try{window.__reactRouterVersion=Q1}catch{}const J1="startTransition",np=hd[J1];function Y1(e){let{basename:t,children:r,future:n,window:s}=e,o=b.useRef();o.current==null&&(o.current=n1({window:s,v5Compat:!0}));let i=o.current,[a,l]=b.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},d=b.useCallback(h=>{u&&np?np(()=>l(h)):l(h)},[l,u]);return b.useLayoutEffect(()=>i.listen(d),[i,d]),b.useEffect(()=>H1(n),[n]),b.createElement(W1,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}var sp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(sp||(sp={}));var op;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(op||(op={}));function X1(e){let t=b.useRef($u(e)),r=b.useRef(!1),n=Pl(),s=b.useMemo(()=>G1(n.search,r.current?null:t.current),[n.search]),o=A1(),i=b.useCallback((a,l)=>{const u=$u(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,l)},[o,s]);return[s,i]}var ip=["light","dark"],Z1="(prefers-color-scheme: dark)",e_=b.createContext(void 0),t_={setTheme:e=>{},themes:[]},r_=()=>{var e;return(e=b.useContext(e_))!=null?e:t_};b.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let u=o==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?ip.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(w,y=!1,x=!0)=>{let v=i?i[w]:w,g=y?w+"|| ''":`'${v}'`,m="";return s&&x&&!y&&ip.includes(w)&&(m+=`d.style.colorScheme = '${w}';`),r==="class"?y||v?m+=`c.add(${g})`:m+="null":v&&(m+=`d[s](n,${g})`),m},f=e?`!function(){${d}${p(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${Z1}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${u?"":"else{"+p(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${h}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var n_=e=>{switch(e){case"success":return i_;case"info":return l_;case"warning":return a_;case"error":return c_;default:return null}},s_=Array(12).fill(0),o_=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(
67Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},s_.map((r,n)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),i_=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),a_=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.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"})),l_=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),c_=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),u_=R.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"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),d_=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Du=1,h_=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Du++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
67this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async l=>{if(o=["resolve",l],R.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(p_(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Du++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ze=new h_,f_=(e,t)=>{let r=(t==null?void 0:t.id)||Du++;return Ze.addToast({title:e,...t,id:r}),r},p_=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",m_=f_,g_=()=>Ze.toasts,v_=()=>Ze.getActiveToasts();Object.assign(m_,{success:Ze.success,info:Ze.info,warning:Ze.warning,error:Ze.error,custom:Ze.custom,message:Ze.message,promise:Ze.promise,dismiss:Ze.dismiss,loading:Ze.loading},{getHistory:g_,getToasts:v_});function y_(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}y_(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 68`);function Zi(e){return e.label!==void 0}var x_=3,w_="32px",b_="16px",ap=4e3,__=356,k_=14,S_=20,E_=200;function Nt(...e){return e.filter(Boolean).join(" ")}function C_(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var j_=e=>{var t,r,n,s,o,i,a,l,u,d,h;let{invert:p,toast:f,unstyled:w,interacting:y,setHeights:x,visibleToasts:v,heights:g,index:m,toasts:_,expanded:k,removeToast:S,defaultRichColors:E,closeButton:N,style:A,cancelButtonStyle:O,actionButtonStyle:q,className:D="",descriptionClassName:H="",duration:$,position:X,gap:W,loadingIcon:K,expandByDefault:C,classNames:T,icons:L,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:B}=e,[Y,Z]=R.useState(null),[ve,Te]=R.useState(null),[re,ur]=R.useState(!1),[zt,dr]=R.useState(!1),[Vt,hr]=R.useState(!1),[kt,I]=R.useState(!1),[ee,Pe]=R.useState(!1),[bn,Ir]=R.useState(0),[fr,Ni]=R.useState(0),_n=R.useRef(f.duration||$||ap),Ti=R.useRef(null),Ht=R.useRef(null),Ri=m===0,Ai=m+1<=v,Ve=f.type,Wt=f.dismissible!==!1,kn=f.className||"",Ql=f.descriptionClassName||"",$r=R.useMemo(()=>g.findIndex(G=>G.toastId===f.id)||0,[g,f.id]),Sn=R.useMemo(()=>{var G;return(G=f.closeButton)!=null?G:N},[f.closeButton,N]),Pi=R.useMemo(()=>f.duration||$||ap,[f.duration,$]),En=R.useRef(0),Dr=R.useRef(0),Oi=R.useRef(0),ts=R.useRef(null),[rx,nx]=X.split("-"),Oh=R.useMemo(()=>g.reduce((G,ie,he)=>he>=$r?G:G+ie.height,0),[g,$r]),Ih=d_(),sx=f.invert||p,Jl=Ve==="loading";Dr.current=R.useMemo(()=>$r*W+Oh,[$r,Oh]),R.useEffect(()=>{_n.current=Pi},[Pi]),R.useEffect(()=>{ur(!0)},[]),R.useEffect(()=>{let G=Ht.current;if(G){let ie=G.getBoundingClientRect().height;return Ni(ie),x(he=>[{toastId:f.id,height:ie,position:f.position},...he]),()=>x(he=>he.filter(St=>St.toastId!==f.id))}},[x,f.id]),R.useLayoutEffect(()=>{if(!re)return;let G=Ht.current,ie=G.style.height;G.style.height="auto";let he=G.getBoundingClientRect().height;G.style.height=ie,Ni(he),x(St=>St.find(Et=>Et.toastId===f.id)?St.map(Et=>Et.toastId===f.id?{...Et,height:he}:Et):[{toastId:f.id,height:he,position:f.position},...St])},[re,f.title,f.description,x,f.id]);let Lr=R.useCallback(()=>{dr(!0),Ir(Dr.current),x(G=>G.filter(ie=>ie.toastId!==f.id)),setTimeout(()=>{S(f)},E_)},[f,S,x,Dr]);R.useEffect(()=>{if(f.promise&&Ve==="loading"||f.duration===1/0||f.type==="loading")return;let G;return k||y||B&&Ih?(()=>{if(Oi.current<En.current){let ie=new Date().getTime()-En.current;_n.current=_n.current-ie}
68Oi.current=new Date().getTime()})():_n.current!==1/0&&(En.current=new Date().getTime(),G=setTimeout(()=>{var ie;(ie=f.onAutoClose)==null||ie.call(f,f),Lr()},_n.current)),()=>clearTimeout(G)},[k,y,f,Ve,B,Ih,Lr]),R.useEffect(()=>{f.delete&&Lr()},[Lr,f.delete]);function ox(){var G,ie,he;return L!=null&&L.loading?R.createElement("div",{className:Nt(T==null?void 0:T.loader,(G=f==null?void 0:f.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":Ve==="loading"},L.loading):K?R.createElement("div",{className:Nt(T==null?void 0:T.loader,(ie=f==null?void 0:f.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Ve==="loading"},K):R.createElement(o_,{className:Nt(T==null?void 0:T.loader,(he=f==null?void 0:f.classNames)==null?void 0:he.loader),visible:Ve==="loading"})}return R.createElement("li",{tabIndex:0,ref:Ht,className:Nt(D,kn,T==null?void 0:T.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Ve],(r=f==null?void 0:f.classNames)==null?void 0:r[Ve]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:E,"data-styled":!(f.jsx||f.unstyled||w),"data-mounted":re,"data-
68promise":!!f.promise,"data-swiped":ee,"data-removed":zt,"data-visible":Ai,"data-y-position":rx,"data-x-position":nx,"data-index":m,"data-front":Ri,"data-swiping":Vt,"data-dismissible":Wt,"data-type":Ve,"data-invert":sx,"data-swipe-out":kt,"data-swipe-direction":ve,"data-expanded":!!(k||C&&re),style:{"--index":m,"--toasts-before":m,"--z-index":_.length-m,"--offset":`${zt?bn:Dr.current}px`,"--initial-height":C?"auto":`${fr}px`,...A,...f.style},onDragEnd:()=>{hr(!1),Z(null),ts.current=null},onPointerDown:G=>{Jl||!Wt||(Ti.current=new Date,Ir(Dr.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(hr(!0),ts.current={x:G.clientX,y:G.clientY}))},onPointerUp:()=>{var G,ie,he,St;if(kt||!Wt)return;ts.current=null;let Et=Number(((G=Ht.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mr=Number(((ie=Ht.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Cn=new Date().getTime()-((he=Ti.current)==null?void 0:he.getTime()),Ct=Y==="x"?Et:Mr,Fr=Math.abs(Ct)/Cn;if(Math.abs(Ct)>=S_||Fr>.11){Ir(Dr.current),(St=f.onDismiss)==null||St.call(f,f),Te(Y==="x"?Et>0?"right":"left":Mr>0?"down":"up"),Lr(),I(!0),Pe(!1);return}hr(!1),Z(null)},onPointerMove:G=>{var ie,he,St,Et;if(!ts.current||!Wt||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;let Mr=G.clientY-ts.current.y,Cn=G.clientX-ts.current.x,Ct=(he=e.swipeDirections)!=null?he:C_(X);!Y&&(Math.abs(Cn)>1||Math.abs(Mr)>1)&&Z(Math.abs(Cn)>Math.abs(Mr)?"x":"y");let Fr={x:0,y:0};Y==="y"?(Ct.includes("top")||Ct.includes("bottom"))&&(Ct.includes("top")&&Mr<0||Ct.includes("bottom")&&Mr>0)&&(Fr.y=Mr):Y==="x"&&(Ct.includes("left")||Ct.includes("right"))&&(Ct.includes("left")&&Cn<0||Ct.includes("right")&&Cn>0)&&(Fr.x=Cn),(Math.abs(Fr.x)>0||Math.abs(Fr.y)>0)&&Pe(!0),(St=Ht.current)==null||St.style.setProperty("--swipe-amount-x",`${Fr.x}px`),(Et=Ht.current)==null||Et.style.setProperty("--swipe-amount-y",`${Fr.y}px`)}},Sn&&!f.jsx?R.createElement("button",{"aria-label":z,"data-disabled":Jl,"data-close-button":!0,onClick:Jl||!Wt?()=>{}:()=>{var G;Lr(),(G=f.onDismiss)==null||G.call(f,f)},className:Nt(T==null?void 0:T.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(o=L==null?void 0:L.close)!=null?o:u_):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:R.createElement(R.Fragment,null,Ve||f.icon||f.promise?R.createElement("div",{"data-icon":"",className:Nt(T==null?void 0:T.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ox():null,f.type!=="loading"?f.icon||(L==null?void 0:L[Ve])||n_(Ve):null):null,R.createElement("div",{"data-content":"",className:Nt(T==null?void 0:T.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:Nt(T==null?void 0:T.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?R.createElement("div",{"data-description":"",className:Nt(H,Ql,T==null?void 0:T.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&Zi(f.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||O,onClick:G=>{var ie,he;Zi(f.cancel)&&Wt&&((he=(ie=f.cancel).onClick)==null||he.call(ie,G),Lr())},className:Nt(T==null?void 0:T.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&Zi(f.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||q,onClick:G=>{var ie,he;Zi(f.action)&&((he=(ie=f.action).onClick)==null||he.call(ie,G),!G.defaultPrevented&&Lr())},className:Nt(T==null?void 0:T.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function lp(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function N_(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?b_:w_;function l(u){["top","right","bottom","left"].forEach(d=>{r[`${i}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${i}-${u}`]=a:r[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var T_=b.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:h,duration:p,style:f,visibleToasts:w=x_,toastOptions:y,dir:x=lp(),gap:v=k_,loadingIcon:g,icons:m,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}
68=e,[S,E]=R.useState([]),N=R.useMemo(()=>Array.from(new Set([n].concat(S.filter(B=>B.position).map(B=>B.position)))),[S,n]),[A,O]=R.useState([]),[q,D]=R.useState(!1),[H,$]=R.useState(!1),[X,W]=R.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=R.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=R.useRef(null),L=R.useRef(!1),z=R.useCallback(B=>{E(Y=>{var Z;return(Z=Y.find(ve=>ve.id===B.id))!=null&&Z.delete||Ze.dismiss(B.id),Y.filter(({id:ve})=>ve!==B.id)})},[]);return R.useEffect(()=>Ze.subscribe(B=>{if(B.dismiss){E(Y=>Y.map(Z=>Z.id===B.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{jv.flushSync(()=>{E(Y=>{let Z=Y.findIndex(ve=>ve.id===B.id);return Z!==-1?[...Y.slice(0,Z),{...Y[Z],...B},...Y.slice(Z+1)]:[B,...Y]})})})}),[]),R.useEffect(()=>{if(d!=="system"){W(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:Y})=>{W(Y?"dark":"light")})}catch{B.addListener(({matches:Z})=>{try{W(Z?"dark":"light")}catch(ve){console.error(ve)}})}},[d]),R.useEffect(()=>{S.length<=1&&D(!1)},[S]),R.useEffect(()=>{let B=Y=>{var Z,ve;s.every(Te=>Y[Te]||Y.code===Te)&&(D(!0),(Z=K.current)==null||Z.focus()),Y.code==="Escape"&&(document.activeElement===K.current||(ve=K.current)!=null&&ve.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),R.useEffect(()=>{if(K.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,L.current=!1)}},[K.current]),R.createElement("section",{ref:t,"aria-label":`${_} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((B,Y)=>{var Z;let[ve,Te]=B.split("-");return S.length?R.createElement("ol",{key:B,dir:x==="auto"?lp():x,tabIndex:-1,ref:K,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":ve,"data-lifted":q&&S.length>1&&!o,"data-x-position":Te,style:{"--front-toast-height":`${((Z=A[0])==null?void 0:Z.height)||0}px`,"--width":`${__}px`,"--gap":`${v}px`,...f,...N_(l,u)},onBlur:re=>{L.current&&!re.currentTarget.contains(re.relatedTarget)&&(L.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||L.current||(L.current=!0,T.current=re.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{H||D(!1)},onDragEnd:()=>D(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},S.filter(re=>!re.position&&Y===0||re.position===B).map((re,ur)=>{var zt,dr;return R.createElement(j_,{key:re.id,icons:m,index:ur,toast:re,defaultRichColors:h,duration:(zt=y==null?void 0:y.duration)!=null?zt:p,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:r,visibleToasts:w,closeButton:(dr=y==null?void 0:y.closeButton)!=null?dr:i,interacting:H,position:B,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:z,toasts:S.filter(Vt=>Vt.position==re.position),heights:A.filter(Vt=>Vt.position==re.position),setHeights:O,expandByDefault:o,gap:v,loadingIcon:g,expanded:q,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const R_=({...e})=>{const{theme:t="system"}=r_();return c.jsx(T_,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},A_=1,P_=1e6;let Cc=0;function O_(){return Cc=(Cc+1)%Number.MAX_SAFE_INTEGER,Cc.toString()}const jc=new Map,cp=e=>{if(jc.has(e))return;const t=setTimeout(()=>{jc.delete(e),Lo({type:"REMOVE_TOAST",toastId:e})},P_);jc.set(e,t)},I_=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,A_)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;
68return r?cp(r):e.toasts.forEach(n=>{cp(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Ca=[];let ja={toasts:[]};function Lo(e){ja=I_(ja,e),Ca.forEach(t=>{t(ja)})}function $_({...e}){const t=O_(),r=s=>Lo({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Lo({type:"DISMISS_TOAST",toastId:t});return Lo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function D_(){const[e,t]=b.useState(ja);return b.useEffect(()=>(Ca.push(t),()=>{const r=Ca.indexOf(t);r>-1&&Ca.splice(r,1)}),[e]),{...e,toast:$_,dismiss:r=>Lo({type:"DISMISS_TOAST",toastId:r})}}function _e(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function up(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wv(...e){return t=>{let r=!1;const n=e.map(s=>{const o=up(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():up(e[s],null)}}}}function ft(...e){return b.useCallback(Wv(...e),e)}function no(e,t=[]){let r=[];function n(o,i){const a=b.createContext(i),l=r.length;r=[...r,i];const u=h=>{var v;const{scope:p,children:f,...w}=h,y=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,x=b.useMemo(()=>w,Object.values(w));return c.jsx(y.Provider,{value:x,children:f})};u.displayName=o+"Provider";function d(h,p){var y;const f=((y=p==null?void 0:p[e])==null?void 0:y[l])||a,w=b.useContext(f);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=r.map(i=>b.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,L_(s,...t)]}function L_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:u})=>{const h=l(o)[`__scope${u}`];return{...a,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Lu(e){const t=M_(e),r=b.forwardRef((n,s)=>{const{children:o,...i}=n,a=b.Children.toArray(o),l=a.find(B_);if(l){const u=l.props.children,d=a.map(h=>h===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:h);return c.jsx(t,{...i,ref:s,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return c.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}function M_(e){const t=b.forwardRef((r,n)=>{const{children:s,...o}=r;if(b.isValidElement(s)){const i=q_(s),a=U_(o,s.props);return s.type!==b.Fragment&&(a.ref=n?Wv(n,i):i),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kv=Symbol("radix.slottable");function F_(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Kv,t}function B_(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kv}function U_(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function q_(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Gv(e){const t=e+"CollectionProvider",[r,n]=no(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:x,children:v}=y,g=R.useRef(null),m=R.useRef(new Map).current;return c.jsx(s,{scope:x,itemMap:m,collectionRef:g,children:v})};i.displayName=t;const a=e+"CollectionSlot",l=Lu(a),u=R.forwardRef((y,x)=>{const{scope:v,children:g}=y,m=o(a,v),_=ft(x,m.collectionRef);return c.jsx(l,{ref:_,children:g})});u.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=Lu(d),f=R.forwardRef((y,x)=>{const{scope:v,children:g,...m}=y,_=R.useRef(null),k=ft(x,_),S=o(d,v);return R.useEffect(()=>(S.itemMap.set(_,{ref:_,...m}),()=>void S.itemMap.delete(_))),c.jsx(p,{[h]:"",ref:k,children:g})});f.displayName=d;function w(y){const x=o(e+"CollectionConsumer",y);return R.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const m=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((S,E)=>m.indexOf(S.ref.current)-m.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:f},w,n]}var z_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ne=z_.reduce((e,t)=>
vendor: 8,608 bytes, line 68
68{const r=Lu(`Primitive.${t}`),n=b.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Qv(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function mn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function V_(e,t=globalThis==null?void 0:globalThis.document){const r=mn(e);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var H_="DismissableLayer",Mu="dismissableLayer.update",W_="dismissableLayer.pointerDownOutside",K_="dismissableLayer.focusOutside",dp,Jv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ih=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=b.useContext(Jv),[d,h]=b.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),w=ft(t,E=>h(E)),y=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(x),g=d?y.indexOf(d):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,_=g>=v,k=Q_(E=>{const N=E.target,A=[...u.branches].some(O=>O.contains(N));!_||A||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},p),S=J_(E=>{const N=E.target;[...u.branches].some(O=>O.contains(N))||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},p);return V_(E=>{g===u.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},p),b.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(dp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),hp(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=dp)}},[d,p,r,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),hp())},[d,u]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(Mu,E),()=>document.removeEventListener(Mu,E)},[]),c.jsx(Ne.div,{...l,ref:w,style:{pointerEvents:m?_?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,S.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,k.onPointerDownCapture)})});ih.displayName=H_;var G_="DismissableLayerBranch",Yv=b.forwardRef((e,t)=>{const r=b.useContext(Jv),n=b.useRef(null),s=ft(t,n);return b.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(Ne.div,{...e,ref:s})});Yv.displayName=G_;function Q_(e,t=globalThis==null?void 0:globalThis.document){const r=mn(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){Xv(W_,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function J_(e,t=globalThis==null?void 0:globalThis.document){const r=mn(e),n=b.useRef(!1);return b.useEffect(()=>{const s=o=>{o.target&&!n.current&&Xv(K_,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function hp(){const e=new CustomEvent(Mu);document.dispatchEvent(e)}function Xv(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Qv(s,o):s.dispatchEvent(o)}var Y_=ih,X_=Yv,ir=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Z_="Portal",Zv=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=b.useState(!1);ir(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?jv.createPortal(c.jsx(Ne.div,{...n,ref:t}),i):null});Zv.displayName=Z_;function ek(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var Ol=e=>{const{present:t,children:r}=e,n=tk(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),o=ft(n.ref,rk(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:o}):null};Ol.displayName="Presence";function tk(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),o=b.useRef("none"),i=e?"mounted":"unmounted",[a,l]=ek(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=ea(n.current);o.current=a==="mounted"?u:"none"},[a]),ir(()=>{const u=n.current,d=s.current;if(d!==e){const p=o.current,f=ea(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),ir(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=f=>{const y=ea(n.current).includes(f.animationName);if(f.target===t&&y&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=f=>{f.target===t&&(o.current=ea(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function ea(e){return(e==null?void 0:e.animationName)||"none"}function rk(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var nk=hd[" useInsertionEffect ".trim().toString()]||ir;function Il({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=sk({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const d=b.useRef(e!==void 0);b.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const u=b.useCallback(d=>{var h;if(a){const p=ok(d)?d(e):d;p!==e&&((h=i.current)==null||h.call(i,p))}else o(d)},[a,e,o,i]);return[l,u]}function sk({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),o=b.useRef(t);return nk(()=>{o.current=t},[t]),b.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function ok(e){return typeof e=="function"}var ik=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ak="VisuallyHidden",$l=b.forwardRef((e,t)=>c.jsx(Ne.span,{...e,ref:t,style:{...ik,...e.style}}));$l.displayName=ak;var lk=$l,ah="ToastProvider",[lh,ck,uk]=Gv("Toast"),[ey,xA]=no("Toast",[uk]),[dk,Dl]=ey(ah),ty=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=b.useState(null),[u,d]=b.useState(0),h=b.useRef(!1),p=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${ah}\`. Expected non-empty \`string\`.`),c.jsx(lh.Provider,{scope:t,children:c.jsx(dk,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>d(f=>f+1),[]),onToastRemove:b.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:i})})};ty.displayName=ah;var ry="ToastViewport",hk=["F8"],Fu="toast.viewportPause",Bu="toast.viewportResume",ny=b.forwardRef((e,t)=>
68{const{__scopeToast:r,hotkey:n=hk,label:s="Notifications ({hotkey})",...o}=e,i=Dl(ry,r),a=ck(r),l=b.useRef(null),u=b.useRef(null),d=b.useRef(null),h=b.useRef(null),p=ft(t,h,i.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;b.useEffect(()=>{const x=v=>{var m;n.length!==0&&n.every(_=>v[_]||v.code===_)&&((m=h.current)==null||m.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),b.useEffect(()=>{const x=l.current,v=h.current;if(w&&x&&v){const g=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Fu);v.dispatchEvent(S),i.isClosePausedRef.current=!0}},m=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(Bu);v.dispatchEvent(S),i.isClosePausedRef.current=!1}},_=S=>{!x.contains(S.relatedTarget)&&m()},k=()=>{x.contains(document.activeElement)||m()};return x.addEventListener("focusin",g),x.addEventListener("focusout",_),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",k),window.addEventListener("blur",g),window.addEventListener("focus",m),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",g),window.removeEventListener("focus",m)}}},[w,i.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:x})=>{const g=a().map(m=>{const _=m.ref.current,k=[_,...Ek(_)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?g.reverse():g).flat()},[a]);return b.useEffect(()=>{const x=h.current;if(x){const v=g=>{var k,S,E;const m=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!m){const N=document.activeElement,A=g.shiftKey;if(g.target===x&&A){(k=u.current)==null||k.focus();return}const D=y({tabbingDirection:A?"backwards":"forwards"}),H=D.findIndex($=>$===N);Nc(D.slice(H+1))?g.preventDefault():A?(S=u.current)==null||S.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[a,y]),c.jsxs(X_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx(Uu,{ref:u,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});Nc(x)}}),c.jsx(lh.Slot,{scope:r,children:c.jsx(Ne.ol,{tabIndex:-1,...o,ref:p})}),w&&c.jsx(Uu,{ref:d,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});Nc(x)}})]})});ny.displayName=ry;var sy="ToastFocusProxy",Uu=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Dl(sy,r);return c.jsx($l,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&n()}})});Uu.displayName=sy;var Ei="Toast",fk="toast.swipeStart",pk="toast.swipeMove",mk="toast.swipeCancel",gk="toast.swipeEnd",oy=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=Il({prop:n,defaultProp:s??!0,onChange:o,caller:Ei});return c.jsx(Ol,{present:r||a,children:c.jsx(xk,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:mn(e.onPause),onResume:mn(e.onResume),onSwipeStart:_e(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_e(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:_e(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:_e(e.onSwipeEnd,u=>{const{x:d,y:h}=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",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});oy.displayName=Ei;var[vk,yk]=ey(Ei,{onClose(){}}),xk=b.forwardRef((e,t)=>
68{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...w}=e,y=Dl(Ei,r),[x,v]=b.useState(null),g=ft(t,$=>v($)),m=b.useRef(null),_=b.useRef(null),k=s||y.duration,S=b.useRef(0),E=b.useRef(k),N=b.useRef(0),{onToastAdd:A,onToastRemove:O}=y,q=mn(()=>{var X;(x==null?void 0:x.contains(document.activeElement))&&((X=y.viewport)==null||X.focus()),i()}),D=b.useCallback($=>{!$||$===1/0||(window.clearTimeout(N.current),S.current=new Date().getTime(),N.current=window.setTimeout(q,$))},[q]);b.useEffect(()=>{const $=y.viewport;if($){const X=()=>{D(E.current),u==null||u()},W=()=>{const K=new Date().getTime()-S.current;E.current=E.current-K,window.clearTimeout(N.current),l==null||l()};return $.addEventListener(Fu,W),$.addEventListener(Bu,X),()=>{$.removeEventListener(Fu,W),$.removeEventListener(Bu,X)}}},[y.viewport,k,l,u,D]),b.useEffect(()=>{o&&!y.isClosePausedRef.current&&D(k)},[o,k,y.isClosePausedRef,D]),b.useEffect(()=>(A(),()=>O()),[A,O]);const H=b.useMemo(()=>x?hy(x):null,[x]);return y.viewport?c.jsxs(c.Fragment,{children:[H&&c.jsx(wk,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),c.jsx(vk,{scope:r,onClose:q,children:Si.createPortal(c.jsx(lh.ItemSlot,{scope:r,children:c.jsx(Y_,{asChild:!0,onEscapeKeyDown:_e(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||q(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Ne.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_e(e.onKeyDown,$=>{$.key==="Escape"&&(a==null||a($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:_e(e.onPointerDown,$=>{$.button===0&&(m.current={x:$.clientX,y:$.clientY})}),onPointerMove:_e(e.onPointerMove,$=>{if(!m.current)return;const X=$.clientX-m.current.x,W=$.clientY-m.current.y,K=!!_.current,C=["left","right"].includes(y.swipeDirection),T=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,L=C?T(0,X):0,z=C?0:T(0,W),B=$.pointerType==="touch"?10:2,Y={x:L,y:z},Z={originalEvent:$,delta:Y};K?(_.current=Y,ta(pk,h,Z,{discrete:!1})):fp(Y,y.swipeDirection,B)?(_.current=Y,ta(fk,d,Z,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(X)>B||Math.abs(W)>B)&&(m.current=null)}),onPointerUp:_e(e.onPointerUp,$=>{const X=_.current,W=$.target;if(W.hasPointerCapture($.pointerId)&&W.releasePointerCapture($.pointerId),_.current=null,m.current=null,X){const K=$.currentTarget,C={originalEvent:$,delta:X};fp(X,y.swipeDirection,y.swipeThreshold)?ta(gk,f,C,{discrete:!0}):ta(mk,p,C,{discrete:!0}),K.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),wk=e=>{const{__scopeToast:t,children:r,...n}=e,s=Dl(Ei,t),[o,i]=b.useState(!1),[a,l]=b.useState(!1);return kk(()=>i(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(Zv,{asChild:!0,children:c.jsx($l,{...n,children:o&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},bk="ToastTitle",iy=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ne.div,{...n,ref:t})});iy.displayName=bk;var _k="ToastDescription",ay=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ne.div,{...n,ref:t})});ay.displayName=_k;var ly="ToastAction",cy=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(dy,{altText:r,asChild:!0,children:c.jsx(ch,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ly}\`. Expected non-empty \`string\`.`),null)});cy.displayName=ly;var uy="ToastClose",ch=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=yk(uy,r);return c.jsx(dy,{asChild:!0,children:c.jsx(Ne.button,{type:"button",...n,ref:t,onClick:_e(e.onClick,s.onClose)})})});ch.displayName=uy;var dy=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Ne.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function hy(e){const t=[];
vendor: 6,898 bytes, lines 68-133
68return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Sk(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...hy(n))}}),t}function ta(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Qv(s,o):s.dispatchEvent(o)}var fp=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function kk(e=()=>{}){const t=mn(e);ir(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Sk(e){return e.nodeType===e.ELEMENT_NODE}function Ek(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Nc(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Ck=ty,fy=ny,py=oy,my=iy,gy=ay,vy=cy,yy=ch;function xy(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=xy(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function wy(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=xy(e))&&(n&&(n+=" "),n+=t);return n}const pp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mp=wy,jk=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return mp(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],h=o==null?void 0:o[u];if(d===null)return null;const p=pp(d)||pp(h);return s[u][p]}),a=r&&Object.entries(r).reduce((u,d)=>{let[h,p]=d;return p===void 0||(u[h]=p),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(w=>{let[y,x]=w;return Array.isArray(x)?x.includes({...o,...a}[y]):{...o,...a}[y]===x})?[...u,h,p]:u},[]);return mp(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 69 * @license lucide-react v0.462.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const Nk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),by=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 74 * @license lucide-react v0.462.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */var Tk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 79 * @license lucide-react v0.462.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const Rk=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>b.createElement("svg",{ref:l,...Tk,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:by("lucide",s),...a},[...i.map(([u,d])=>b.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** 84 * @license lucide-react v0.462.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const Pr=(e,t)=>{const r=b.forwardRef(({className:n,...s},o)=>b.createElement(Rk,{ref:o,iconNode:t,className:by(`lucide-${Nk(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 89 * @license lucide-react v0.462.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const Ak=Pr("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 94 * @license lucide-react v0.462.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const Pk=Pr("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 99 * @license lucide-react v0.462.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const uh=Pr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 104 * @license lucide-react v0.462.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const _y=Pr("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 109 * @license lucide-react v0.462.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const Ok=Pr("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 114 * @license lucide-react v0.462.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const Ik=Pr("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 119 * @license lucide-react v0.462.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const $k=Pr("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 124 * @license lucide-react v0.462.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const Dk=Pr("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 129 * @license lucide-react v0.462.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const Lk=Pr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,906 bytes, line 133
133],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dh="-",Mk=e=>{const t=Bk(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(dh);return a[0]===""&&a.length!==1&&a.shift(),ky(a,t)||Fk(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},ky=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?ky(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(dh);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},gp=/^\[(.+)\]$/,Fk=e=>{if(gp.test(e)){const t=gp.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Bk=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return qk(Object.entries(e.classGroups),r).forEach(([o,i])=>{qu(i,n,o,t)}),n},qu=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:vp(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(Uk(s)){qu(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{qu(i,vp(t,o),r,n)})})},vp=(e,t)=>{let r=e;return t.split(dh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Uk=e=>e.isThemeGetter,qk=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e,zk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},Sy="!",Vk=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,d=0,h;for(let x=0;x<a.length;x++){let v=a[x];if(u===0){if(v===s&&(n||a.slice(x,x+o)===t)){l.push(a.slice(d,x)),d=x+o;continue}if(v==="/"){h=x;continue}}v==="["?u++:v==="]"&&u--}const p=l.length===0?a:a.substring(d),f=p.startsWith(Sy),w=f?p.substring(1):p,y=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:y}};return r?a=>r({className:a,parseClassName:i}):i},Hk=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Wk=e=>({cache:zk(e.cacheSize),parseClassName:Vk(e),...Mk(e)}),Kk=/\s+/,Gk=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(Kk);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=r(u);let w=!!f,y=n(w?p.substring(0,f):p);if(!y){if(!w){a=u+(a.length>0?" "+a:a);continue}if(y=n(p),!y){a=u+(a.length>0?" "+a:a);continue}w=!1}const x=Hk(d).join(":"),v=h?x+Sy:x,g=v+y;if(o.includes(g))continue;o.push(g);const m=s(y,w);for(let _=0;_<m.length;++_){const k=m[_];o.push(v+k)}a=u+(a.length>0?" "+a:a)}return a};function Qk(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ey(t))&&(n&&(n+=" "),n+=r);return n}const Ey=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ey(e[n]))&&(r&&(r+=" "),r+=t);return r};function Jk(e,...t){let r,n,s,o=i;function i(l){const u=t.reduce((d,h)=>h(d),e());return r=Wk(u),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const u=n(l);if(u)return u;const d=Gk(l,r);return s(l,d),d}return function(){return o(Qk.apply(null,arguments))}}const ce=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Cy=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yk=/^\d+\/\d+$/,Xk=new Set(["px","full","screen"]),Zk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eS=/\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$/,tS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pr=e=>Ps(e)||Xk.has(e)||Yk.test(e),Ur=e=>so(e,"length",dS),Ps=e=>!!e&&!Number.isNaN(Number(e)),Tc=e=>so(e,"number",Ps),vo=e=>!!e&&Number.isInteger(Number(e)),sS=e=>e.endsWith("%")&&Ps(e.slice(0,-1)),J=e=>Cy.test(e),qr=e=>Zk.test(e),oS=new Set(["length","size","percentage"]),iS=e=>so(e,oS,jy),aS=e=>so(e,"position",jy),lS=new Set(["image","url"]),cS=e=>so(e,lS,fS),uS=e=>so(e,"",hS),yo=()=>!0,so=(e,t,r)=>{const n=Cy.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},dS=e=>eS.test(e)&&!tS.test(e),jy=()=>!1,hS=e=>rS.test(e),fS=e=>nS.test(e),pS=()=>{const e=ce("colors"),t=ce("spacing"),r=ce("blur"),n=ce("brightness"),s=ce("borderColor"),o=ce("borderRadius"),i=ce("borderSpacing"),a=ce("borderWidth"),l=ce("contrast"),u=ce("grayscale"),d=ce("hueRotate"),h=ce("invert"),p=ce("gap"),f=ce("gradientColorStops"),w=ce("gradientColorStopPositions"),y=ce("inset"),x=ce("margin"),v=ce("opacity"),g=ce("padding"),m=ce("saturate"),_=ce("scale"),k=ce("sepia"),S=ce("skew"),E=ce("space"),N=ce("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",J,t],D=()=>[J,t],H=()=>["",pr,Ur],$=()=>["auto",Ps,J],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",J],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Ps,J];return{cacheSize:500,separator:":",theme:{colors:[yo],spacing:[pr,Ur],blur:["none","",qr,J],brightness:z(),borderColor:[e],borderRadius:["n
133one","","full",qr,J],borderSpacing:D(),borderWidth:H(),contrast:z(),grayscale:T(),hueRotate:z(),invert:T(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[sS,Ur],inset:q(),margin:q(),opacity:z(),padding:D(),saturate:z(),scale:z(),sepia:T(),skew:z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[qr]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...X(),J]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vo,J]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",vo,J]}],"grid-cols":[{"grid-cols":[yo]}],"col-start-end":[{col:["auto",{span:["full",vo,J]},J]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[yo]}],"row-start-end":[{row:["auto",{span:[vo,J]},J]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[qr]},qr]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qr,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tc]}],"font-family":[{font:[yo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",Ps,Tc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pr,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pr,Ur]}],"underline-offset":[{"underline-offset":["auto",pr,J]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),aS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",iS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cS]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
vendor: 5,172 bytes, line 133
133],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:W()}],"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:["",...W()]}],"outline-offset":[{"outline-offset":[pr,J]}],"outline-w":[{outline:[pr,Ur]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[pr,Ur]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qr,uS]}],"shadow-color":[{shadow:[yo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",qr,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[m]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[vo,J]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 133
133],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",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pr,Ur,Tc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},mS=Jk(pS);function lr(...e){return mS(wy(e))}const gS=Ck,Ny=b.forwardRef(({className:e,...t},r)=>c.jsx(fy,{ref:r,className:lr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Ny.displayName=fy.displayName;const vS=jk("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"}}),Ty=b.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(py,{ref:n,className:lr(vS({variant:t}),e),...r}));Ty.displayName=py.displayName;const yS=b.forwardRef(({className:e,...t},r)=>c.jsx(vy,{ref:r,className:lr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));yS.displayName=vy.displayName;const Ry=b.forwardRef(({className:e,...t},r)=>c.jsx(yy,{ref:r,className:lr("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 13,149 bytes, line 133
133/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Lk,{className:"h-4 w-4"})}));Ry.displayName=yy.displayName;const Ay=b.forwardRef(({className:e,...t},r)=>c.jsx(my,{ref:r,className:lr("text-sm font-semibold",e),...t}));Ay.displayName=my.displayName;const Py=b.forwardRef(({className:e,...t},r)=>c.jsx(gy,{ref:r,className:lr("text-sm opacity-90",e),...t}));Py.displayName=gy.displayName;function xS(){const{toasts:e}=D_();return c.jsxs(gS,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return c.jsxs(Ty,{...o,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(Ay,{children:r}),n&&c.jsx(Py,{children:n})]}),s,c.jsx(Ry,{})]},t)}),c.jsx(Ny,{})]})}var wS=hd[" useId ".trim().toString()]||(()=>{}),bS=0;function Oy(e){const[t,r]=b.useState(wS());return ir(()=>{r(n=>n??String(bS++))},[e]),t?`radix-${t}`:""}const _S=["top","right","bottom","left"],gn=Math.min,at=Math.max,rl=Math.round,ra=Math.floor,or=e=>({x:e,y:e}),kS={left:"right",right:"left",bottom:"top",top:"bottom"},SS={start:"end",end:"start"};function zu(e,t,r){return at(e,gn(t,r))}function Tr(e,t){return typeof e=="function"?e(t):e}function Rr(e){return e.split("-")[0]}function oo(e){return e.split("-")[1]}function hh(e){return e==="x"?"y":"x"}function fh(e){return e==="y"?"height":"width"}const ES=new Set(["top","bottom"]);function rr(e){return ES.has(Rr(e))?"y":"x"}function ph(e){return hh(rr(e))}function CS(e,t,r){r===void 0&&(r=!1);const n=oo(e),s=ph(e),o=fh(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nl(i)),[i,nl(i)]}function jS(e){const t=nl(e);return[Vu(e),t,Vu(t)]}function Vu(e){return e.replace(/start|end/g,t=>SS[t])}const yp=["left","right"],xp=["right","left"],NS=["top","bottom"],TS=["bottom","top"];function RS(e,t,r){switch(e){case"top":case"bottom":return r?t?xp:yp:t?yp:xp;case"left":case"right":return t?NS:TS;default:return[]}}function AS(e,t,r,n){const s=oo(e);let o=RS(Rr(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Vu)))),o}function nl(e){return e.replace(/left|right|bottom|top/g,t=>kS[t])}function PS(e){return{top:0,right:0,bottom:0,left:0,...e}}function Iy(e){return typeof e!="number"?PS(e):{top:e,right:e,bottom:e,left:e}}function sl(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function wp(e,t,r){let{reference:n,floating:s}=e;const o=rr(t),i=ph(t),a=fh(i),l=Rr(t),u=o==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-s.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(oo(t)){case"start":f[i]-=p*(r&&u?-1:1);break;case"end":f[i]+=p*(r&&u?-1:1);break}return f}const OS=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=wp(u,n,l),p=n,f={},w=0;for(let y=0;y<a.length;y++){const{name:x,fn:v}=a[y],{x:g,y:m,data:_,reset:k}=await v({x:d,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});d=g??d,h=m??h,f={...f,[x]:{...f[x],..._}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:d,y:h}=wp(u,p,l)),y=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:f}};async function li(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=Tr(t,e),w=Iy(f),x=a[p?h==="floating"?"reference":"floating":h],v=sl(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),g=h==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,m=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(m))?await(o.getScale==null?void 0:o.getScale(m))||{x:1,y:1}:{x:1,y:1},k=sl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:m,strategy:l}):g);return{top:(v.top-k.top+w.top)/_.y,bottom:(k.bottom-v.bottom+w.bottom)/_.y,left:(v.left-k.left+w.left)/_.x,right:(k.right-v.right+w.right)/_.x}}const IS=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Tr(e,t)||{};if(u==null)return{};const h=Iy(d),p={x:r,y:n},f=ph(s),w=fh(f),y=await i.getDimensions(u),x=f==="y",v=x?"top":"left",g=x?"bottom":"right",m=x?"clientHeight":"clientWidth",_=o.reference[w]+o.reference[f]-p[f]-o.floating[w],k=p[f]-o.reference[f],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=S?S[m]:0;(!E||!await(i.isElement==null?void 0:i.isElement(S)))&&(E=a.floating[m]||o.floating[w]);const N=_/2-k/2,A=E/2-y[w]/2-1,O=gn(h[v],A),q=gn(h[g],A),D=O,H=E-y[w]-q,$=E/2-y[w]/2+N,X=zu(D,$,H),W=!l.arrow&&oo(s)!=null&&$!==X&&o.reference[w]/2-($<D?O:q)-y[w]/2<0,K=W?$<D?$-D:$-H:0;return{[f]:p[f]+K,data:{[f]:X,centerOffset:$-X-K,...W&&{alignmentOffset:K}},reset:W}}}),$S=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...x}=Tr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const v=Rr(s),g=rr(a),m=Rr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=p||(m||!y?[nl(a)]:jS(a)),S=w!=="none";!p&&S&&k.push(...AS(a,y,w,_));const E=[a,...k],N=await li(t,x),A=[];let O=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&A.push(N[v]),h){const $=CS(s,i,_);A.push(N[$[0]],N[$[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every($=>$<=0)){var q,D;const $=(((q=o.flip)==null?void 0:q.index)||0)+1,X=E[$];if(X&&(!(h==="alignment"?g!==rr(X):!1)||O.every(C=>C.overflows[0]>0&&rr(C.placement)===g)))return{data:{index:$,overflows:O},reset:{placement:X}};let W=(D=O.filter(K=>K.overflows[0]<=0).sort((K,C)=>K.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!W)switch(f){case"bestFit":{var H;const K=(H=O.filter(C=>{if(S){const T=rr(C.placement);return T===g||T==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(T=>T>0).reduce((T,L)=>T+L,0)]).sort((C,T)=>C[1]-T[1])[0])==null?void 0:H[0];K&&(W=K);break}case"initialPlacement":W=a;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function bp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _p(e){return _S.some(t=>e[t]>=0)}const DS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Tr(e,t);switch(n){case"referenceHidden":{const o=await li(t,{...s,elementContext:"reference"}),i=bp(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:_p(i)}}}case"escaped":{const o=await li(t,{...s,altBoundary:!0}),i=bp(o,r.floating);return{data:{escapedOffsets:i,escaped:_p(i)}}}default:return{}}}}},$y=new Set(["left","top"]);async function LS(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Rr(r),a=oo(r),l=rr(r)==="y",u=$y.has(i)?-1:1,d=o&&l?-1:1,h=Tr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof w=="number"&&(f=a==="end"?w*-1:w),l?{x:f*d,y:p*u}:{x:p*u,y:f*d}}const MS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await LS(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},FS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:v,y:g}=x;return{x:v,y:g}}},...l}=Tr(e,t),u={x:r,y:n},d=await li(t,l),h=rr(Rr(s)),p=hh(h);let f=u[p],w=u[h];if(o){const x=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=f+d[x],m=f-d[v];f=zu(g,f,m)}if(i){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=w+d[x],m=w-d[v];w=zu(g,w,m)}const y=a.fn({...t,[p]:f,[h]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[p]:o,[h]:i}}}}}},BS=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Tr(e,t),d={x:r,y:n},h=rr(s),p=hh(h);let f=d[p],w=d[h];const y=Tr(a,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const m=p==="y"?"height":"width",_=o.reference[p]-o.floating[m]+x.mainAxis,k=o.reference[p]+o.reference[m]-x.mainAxis;f<_?f=_:f>k&&(f=k)}if(u){var v,g;const m=p==="y"?"width":"height",_=$y.has(Rr(s)),k=o.reference[h]-o.floating[m]+(_&&((v=i.offset)==null?void 0:v[h])||0)+(_?0:x.crossAxis),S=o.reference[h]+o.reference[m]+(_?0:((g=i.offset)==null?void 0:g[h])||0)-(_?x.crossAxis:0);w<k?w=k:w>S&&(w=S)}return{[p]:f,[h]:w}}}},US=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Tr(e,t),d=await li(t,u),h=Rr(s),p=oo(s),f=rr(s)==="y",{width:w,height:y}=o.floating;let x,v;h==="top"||h==="bottom"?(x=h,v=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,x=p==="end"?"top":"bottom");const g=y-d.top-d.bottom,m=w-d.left-d.right,_=gn(y-d[x],g),k=gn(w-d[v],m),S=!t.middlewareData.shift;let E=_,N=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=m),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=g),S&&!p){const O=at(d.left,0),q=at(d.right,0),D=at(d.top,0),H=at(d.bottom,0);f?N=w-2*(O!==0||q!==0?O+q:at(d.left,d.right)):E=y-2*(D!==0||H!==0?D+H:at(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:E});const A=await i.getDimensions(a.floating);return w!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Ll(){return typeof window<"u"}function io(e){return Dy(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(Dy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dy(e){return Ll()?e instanceof Node||e instanceof dt(e).Node:!1}function Bt(e){return Ll()?e instanceof Element||e instanceof dt(e).Element:!1}function ar(e){return Ll()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function kp(e){return!Ll()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}const qS=new Set(["inline","contents"]);function Ci(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!qS.has(s)}const zS=new Set(["table","td","th"]);function VS(e){return zS.has(io(e))}const HS=[":popover-open",":modal"];function Ml(e){return HS.some(t=>{try{return e.matches(t)}catch{return!1}})}const WS=["transform","translate","scale","rotate","perspective"],KS=["transform","translate","scale","rotate","perspective","filter"],GS=["paint","layout","strict","content"];function mh(e){const t=gh(),r=Bt(e)?Ut(e):e;return WS.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||KS.some(n=>(r.willChange||"").includes(n))||GS.some(n=>(r.contain||"").includes(n))}function QS(e){let t=vn(e);for(;ar(t)&&!Js(t);){if(mh(t))return t;if(Ml(t))return null;t=vn(t)}return null}function gh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const JS=new Set(["html","body","#document"]);function Js(e){return JS.has(io(e))}function Ut(e){return dt(e).getComputedStyle(e)}function Fl(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vn(e){if(io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||kp(e)&&e.host||cr(e);return kp(t)?t.host:t}function Ly(e){const t=vn(e);return Js(t)?e.ownerDocument?e.ownerDocument.body:e.body:ar(t)&&Ci(t)?t:Ly(t)}function ci(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Ly(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=dt(s);if(o){const a=Hu(i);
vendor: 4,772 bytes, line 133
133return t.concat(i,i.visualViewport||[],Ci(s)?s:[],a&&r?ci(a):[])}return t.concat(s,ci(s,[],r))}function Hu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function My(e){const t=Ut(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=ar(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=rl(r)!==o||rl(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function vh(e){return Bt(e)?e:e.contextElement}function Os(e){const t=vh(e);if(!ar(t))return or(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=My(t);let i=(o?rl(r.width):r.width)/n,a=(o?rl(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const YS=or(0);function Fy(e){const t=dt(e);return!gh()||!t.visualViewport?YS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XS(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==dt(e)?!1:t}function Xn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=vh(e);let i=or(1);t&&(n?Bt(n)&&(i=Os(n)):i=Os(e));const a=XS(o,r,n)?Fy(o):or(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,h=s.height/i.y;if(o){const p=dt(o),f=n&&Bt(n)?dt(n):n;let w=p,y=Hu(w);for(;y&&n&&f!==w;){const x=Os(y),v=y.getBoundingClientRect(),g=Ut(y),m=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,_=v.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,h*=x.y,l+=m,u+=_,w=dt(y),y=Hu(w)}}return sl({width:d,height:h,x:l,y:u})}function yh(e,t){const r=Fl(e).scrollLeft;return t?t.left+r:Xn(cr(e)).left+r}function By(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:yh(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function ZS(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=cr(n),a=t?Ml(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=or(1);const d=or(0),h=ar(n);if((h||!h&&!o)&&((io(n)!=="body"||Ci(i))&&(l=Fl(n)),ar(n))){const f=Xn(n);u=Os(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=i&&!h&&!o?By(i,l,!0):or(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:r.y*u.y-l.scrollTop*u.y+d.y+p.y}}function eE(e){return Array.from(e.getClientRects())}function tE(e){const t=cr(e),r=Fl(e),n=e.ownerDocument.body,s=at(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=at(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+yh(e);const a=-r.scrollTop;return Ut(n).direction==="rtl"&&(i+=at(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function rE(e,t){const r=dt(e),n=cr(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=gh();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const nE=new Set(["absolute","fixed"]);function sE(e,t){const r=Xn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=ar(e)?Os(e):or(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function Sp(e,t,r){let n;if(t==="viewport")n=rE(e,r);else if(t==="document")n=tE(cr(e));else if(Bt(t))n=sE(t,r);else{const s=Fy(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return sl(n)}function Uy(e,t){const r=vn(e);return r===t||!Bt(r)||Js(r)?!1:Ut(r).position==="fixed"||Uy(r,t)}function oE(e,t){const r=t.get(e);if(r)return r;let n=ci(e,[],!1).filter(a=>Bt(a)&&io(a)!=="body"),s=null;const o=Ut(e).position==="fixed";let i=o?vn(e):e;for(;Bt(i)&&!Js(i);){const a=Ut(i),l=mh(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&nE.has(s.position)||Ci(i)&&!l&&Uy(e,i))?n=n.filter(d=>d!==i):s=a,i=vn(i)}return t.set(e,n),n}function iE(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Ml(t)?[]:oE(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((u,d)=>{const h=Sp(t,d,s);return u.top=at(h.top,u.top),u.right=gn(h.right,u.right),u.bottom=gn(h.bottom,u.bottom),u.left=at(h.left,u.left),u},Sp(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function aE(e){const{width:t,height:r}=My(e);return{width:t,height:r}}function lE(e,t,r){const n=ar(t),s=cr(t),o=r==="fixed",i=Xn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=or(0);function u(){l.x=yh(s)}if(n||!n&&!o)if((io(t)!=="body"||Ci(s))&&(a=Fl(t)),n){const f=Xn(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&u();o&&!n&&s&&u();const d=s&&!n&&!o?By(s,a):or(0),h=i.left+a.scrollLeft-l.x-d.x,p=i.top+a.scrollTop-l.y-d.y;return{x:h,y:p,width:i.width,height:i.height}}function Rc(e){return Ut(e).position==="static"}function Ep(e,t){if(!ar(e)||Ut(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return cr(e)===r&&(r=r.ownerDocument.body),r}function qy(e,t){const r=dt(e);
vendor: 8,986 bytes, line 133
133if(Ml(e))return r;if(!ar(e)){let s=vn(e);for(;s&&!Js(s);){if(Bt(s)&&!Rc(s))return s;s=vn(s)}return r}let n=Ep(e,t);for(;n&&VS(n)&&Rc(n);)n=Ep(n,t);return n&&Js(n)&&Rc(n)&&!mh(n)?r:n||QS(e)||r}const cE=async function(e){const t=this.getOffsetParent||qy,r=this.getDimensions,n=await r(e.floating);return{reference:lE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function uE(e){return Ut(e).direction==="rtl"}const dE={convertOffsetParentRelativeRectToViewportRelativeRect:ZS,getDocumentElement:cr,getClippingRect:iE,getOffsetParent:qy,getElementRects:cE,getClientRects:eE,getDimensions:aE,getScale:Os,isElement:Bt,isRTL:uE};function zy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hE(e,t){let r=null,n;const s=cr(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=u;if(a||t(),!p||!f)return;const w=ra(h),y=ra(s.clientWidth-(d+p)),x=ra(s.clientHeight-(h+f)),v=ra(d),m={rootMargin:-w+"px "+-y+"px "+-x+"px "+-v+"px",threshold:at(0,gn(1,l))||1};let _=!0;function k(S){const E=S[0].intersectionRatio;if(E!==l){if(!_)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!zy(u,e.getBoundingClientRect())&&i(),_=!1}try{r=new IntersectionObserver(k,{...m,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,m)}r.observe(e)}return i(!0),o}function fE(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=vh(e),d=s||o?[...u?ci(u):[],...ci(t)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});const h=u&&a?hE(u,r):null;let p=-1,f=null;i&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var m;(m=f)==null||m.observe(t)})),r()}),u&&!l&&f.observe(u),f.observe(t));let w,y=l?Xn(e):null;l&&x();function x(){const v=Xn(e);y&&!zy(y,v)&&r(),y=v,w=requestAnimationFrame(x)}return r(),()=>{var v;d.forEach(g=>{s&&g.removeEventListener("scroll",r),o&&g.removeEventListener("resize",r)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(w)}}const pE=MS,mE=FS,gE=$S,vE=US,yE=DS,Cp=IS,xE=BS,wE=(e,t,r)=>{const n=new Map,s={platform:dE,...r},o={...s.platform,_c:n};return OS(e,t,{...s,platform:o})};var bE=typeof document<"u",_E=function(){},Na=bE?b.useLayoutEffect:_E;function ol(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ol(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!ol(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Vy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jp(e,t){const r=Vy(e);return Math.round(t*r)/r}function Ac(e){const t=b.useRef(e);return Na(()=>{t.current=e}),t}function kE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,h]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=b.useState(n);ol(p,n)||f(n);const[w,y]=b.useState(null),[x,v]=b.useState(null),g=b.useCallback(C=>{C!==S.current&&(S.current=C,y(C))},[]),m=b.useCallback(C=>{C!==E.current&&(E.current=C,v(C))},[]),_=o||w,k=i||x,S=b.useRef(null),E=b.useRef(null),N=b.useRef(d),A=l!=null,O=Ac(l),q=Ac(s),D=Ac(u),H=b.useCallback(()=>{if(!S.current||!E.current)return;const C={placement:t,strategy:r,middleware:p};q.current&&(C.platform=q.current),wE(S.current,E.current,C).then(T=>{const L={...T,isPositioned:D.current!==!1};$.current&&!ol(N.current,L)&&(N.current=L,Si.flushSync(()=>{h(L)}))})},[p,t,r,q,D]);Na(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[u]);const $=b.useRef(!1);Na(()=>($.current=!0,()=>{$.current=!1}),[]),Na(()=>{if(_&&(S.current=_),k&&(E.current=k),_&&k){if(O.current)return O.current(_,k,H);H()}},[_,k,H,O,A]);const X=b.useMemo(()=>({reference:S,floating:E,setReference:g,setFloating:m}),[g,m]),W=b.useMemo(()=>({reference:_,floating:k}),[_,k]),K=b.useMemo(()=>{const C={position:r,left:0,top:0};if(!W.floating)return C;const T=jp(W.floating,d.x),L=jp(W.floating,d.y);return a?{...C,transform:"translate("+T+"px, "+L+"px)",...Vy(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:L}},[r,a,W.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:H,refs:X,elements:W,floatingStyles:K}),[d,H,X,W,K])}const SE=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Cp({element:n.current,padding:s}).fn(r):{}:n?Cp({element:n,padding:s}).fn(r):{}}}},EE=(e,t)=>({...pE(e),options:[e,t]}),CE=(e,t)=>({...mE(e),options:[e,t]}),jE=(e,t)=>({...xE(e),options:[e,t]}),NE=(e,t)=>({...gE(e),options:[e,t]}),TE=(e,t)=>({...vE(e),options:[e,t]}),RE=(e,t)=>({...yE(e),options:[e,t]}),AE=(e,t)=>({...SE(e),options:[e,t]});var PE="Arrow",Hy=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return c.jsx(Ne.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hy.displayName=PE;var OE=Hy;function IE(e){const[t,r]=b.useState(void 0);return ir(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Wy="Popper",[Ky,Gy]=no(Wy),[wA,Qy]=Ky(Wy),Jy="PopperAnchor",Yy=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Qy(Jy,r),i=b.useRef(null),a=ft(t,i);return b.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:c.jsx(Ne.div,{...s,ref:a})});Yy.displayName=Jy;var xh="PopperContent",[$E,DE]=Ky(xh),Xy=b.forwardRef((e,t)=>{var re,ur,zt,dr,Vt,hr;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:w,...y}=e,x=Qy(xh,r),[v,g]=b.useState(null),m=ft(t,kt=>g(kt)),[_,k]=b.useState(null),S=IE(_),E=(S==null?void 0:S.width)??0,N=(S==null?void 0:S.height)??0,A=n+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],D=q.length>0,H={padding:O,boundary:q.filter(ME),altBoundary:D},{refs:$,floatingStyles:X,placement:W,isPositioned:K,middlewareData:C}=kE({strategy:"fixed",placement:A,whileElementsMounted:(...kt)=>fE(...kt,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[EE({mainAxis:s+N,alignmentAxis:i}),l&&CE({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?jE():void 0,...H}),l&&NE({...H}),TE({...H,apply:({elements:kt,rects:I,availableWidth:ee,availableHeight:Pe})=>{const{width:bn,height:Ir}=I.reference,fr=kt.floating.style;fr.setProperty("--radix-popper-available-width",`${ee}px`),fr.setProperty("--radix-popper-available-height",`${Pe}px`),fr.setProperty("--radix-popper-anchor-width",`${bn}px`),fr.setProperty("--radix-popper-anchor-height",`${Ir}px`)}}),_&&AE({element:_,padding:a}),FE({arrowWidth:E,arrowHeight:N}),p&&RE({strategy:"referenceHidden",...H})]}),[T,L]=t0(W),z=mn(w);ir(()=>{K&&(z==null||z())},[K,z]);const B=(re=C.arrow)==null?void 0:re.x,Y=(ur=C.arrow)==null?void 0:ur.y,Z=((zt=C.arrow)==null?void 0:zt.centerOffset)!==0,[ve,Te]=b.useState();return ir(()=>{v&&Te(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:K?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(dr=C.transformOrigin)==null?void 0:dr.x,(Vt=C.transformOrigin)==null?void 0:Vt.y].join(" "),...((hr=C.hide)==null?void 0:hr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx($E,{scope:r,placedSide:T,onArrowChange:k,arrowX:B,arrowY:Y,shouldHideArrow:Z,children:c.jsx(Ne.div,{"data-side":T,"data-align":L,...y,ref:m,style:{...y.style,animation:K?void 0:"none"}})})})});Xy.displayName=xh;var Zy="PopperArrow",LE={top:"bottom",right:"left",bottom:"top",left:"r
133ight"},e0=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=DE(Zy,n),i=LE[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(OE,{...s,ref:r,style:{...s.style,display:"block"}})})});e0.displayName=Zy;function ME(e){return e!==null}var FE=e=>({name:"transformOrigin",options:e,fn(t){var x,v,g;const{placement:r,rects:n,middlewareData:s}=t,i=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=t0(r),h={start:"0%",center:"50%",end:"100%"}[d],p=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let w="",y="";return u==="bottom"?(w=i?h:`${p}px`,y=`${-l}px`):u==="top"?(w=i?h:`${p}px`,y=`${n.floating.height+l}px`):u==="right"?(w=`${-l}px`,y=i?h:`${f}px`):u==="left"&&(w=`${n.floating.width+l}px`,y=i?h:`${f}px`),{data:{x:w,y}}}});function t0(e){const[t,r="center"]=e.split("-");return[t,r]}var BE=Yy,UE=Xy,qE=e0,[Bl,bA]=no("Tooltip",[Gy]),wh=Gy(),r0="TooltipProvider",zE=700,Np="tooltip.open",[VE,n0]=Bl(r0),s0=e=>{const{__scopeTooltip:t,delayDuration:r=zE,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(VE,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:o})};s0.displayName=r0;var o0="Tooltip",[_A,Ul]=Bl(o0),Wu="TooltipTrigger",HE=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Ul(Wu,r),o=n0(Wu,r),i=wh(r),a=b.useRef(null),l=ft(t,a,s.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),h=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(BE,{asChild:!0,...i,children:c.jsx(Ne.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:_e(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:_e(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:_e(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:_e(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:_e(e.onBlur,s.onClose),onClick:_e(e.onClick,s.onClose)})})});HE.displayName=Wu;var WE="TooltipPortal",[kA,KE]=Bl(WE,{forceMount:void 0}),Ys="TooltipContent",i0=b.forwardRef((e,t)=>{const r=KE(Ys,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Ul(Ys,e.__scopeTooltip);return c.jsx(Ol,{present:n||i.open,children:i.disableHoverableContent?c.jsx(a0,{side:s,...o,ref:t}):c.jsx(GE,{side:s,...o,ref:t})})}),GE=b.forwardRef((e,t)=>{const r=Ul(Ys,e.__scopeTooltip),n=n0(Ys,e.__scopeTooltip),s=b.useRef(null),o=ft(t,s),[i,a]=b.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:h}=n,p=b.useCallback(()=>{a(null),h(!1)},[h]),f=b.useCallback((w,y)=>{const x=w.currentTarget,v={x:w.clientX,y:w.clientY},g=ZE(v,x.getBoundingClientRect()),m=eC(v,g),_=tC(y.getBoundingClientRect()),k=nC([...m,..._]);a(k),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){const w=x=>f(x,d),y=x=>f(x,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",y)}}},[l,d,f,p]),b.useEffect(()=>{if(i){const w=y=>{const x=y.target,v={x:y.clientX,y:y.clientY},g=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),m=!rC(v,i);g?p():m&&(p(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,i,u,p]),c.jsx(a0,{...e,ref:o})}),[QE,JE]=Bl(o0,{isInside:!1}),YE=F_("TooltipContent"),a0=b.forwardRef((e,t)=>
vendor: 3,753 bytes, line 133
133{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=Ul(Ys,r),u=wh(r),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(Np,d),()=>document.removeEventListener(Np,d)),[d]),b.useEffect(()=>{if(l.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),c.jsx(ih,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:c.jsxs(UE,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(YE,{children:n}),c.jsx(QE,{scope:r,isInside:!0,children:c.jsx(lk,{id:l.contentId,role:"tooltip",children:s||n})})]})})});i0.displayName=Ys;var l0="TooltipArrow",XE=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=wh(r);return JE(l0,r).isInside?null:c.jsx(qE,{...s,...n,ref:t})});XE.displayName=l0;function ZE(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function eC(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function tC(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function rC(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],u=a.x,d=a.y,h=l.x,p=l.y;d>n!=p>n&&r<(h-u)*(n-d)/(p-d)+u&&(s=!s)}return s}function nC(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),sC(t)}function sC(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var oC=s0,c0=i0;const iC=oC,aC=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(c0,{ref:n,sideOffset:t,className:lr("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));aC.displayName=c0.displayName;function lC(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(d){try{u(n.next(d))}catch(h){i(h)}}function l(d){try{u(n.throw(d))}catch(h){i(h)}}function u(d){d.done?o(d.value):s(d.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const cC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
133class bh extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class uC extends bh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Tp extends bh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Rp extends bh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ku;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ku||(Ku={}));class dC{constructor(t,{headers:r={},customFetch:n,region:s=Ku.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=cC(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return lC(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:u,signal:d,timeout:h}=n;let p={},{region:f}=n;f||(f=this.region);const w=new URL(`${this.url}/${r}`);f&&f!=="any"&&(p["x-region"]=f,w.searchParams.set("forceFunctionRegion",f));let y;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(p["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(p["Content-Type"]="application/json",y=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?y=JSON.stringify(u):y=u;let x=d;h&&(i=new AbortController,o=setTimeout(()=>i.abort(),h),d?(x=i.signal,d.addEventListener("abort",()=>i.abort())):x=i.signal);const v=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:y,signal:x}).catch(k=>{throw new uC(k)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new Tp(v);if(!v.ok)throw new Rp(v);let m=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return m==="application/json"?_=yield v.json():m==="application/octet-stream"||m==="application/pdf"?_=yield v.blob():m==="text/event-stream"?_=v:m==="multipart/form-data"?_=yield v.formData():_=yield v.text(),{data:_,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Rp||a instanceof Tp?a.context:void 0}}finally{o&&clearTimeout(o)}})}}const u0=3,Ap=e=>Math.min(1e3*2**e,3e4),hC=[520,503],d0=["GET","HEAD","OPTIONS"];var fC=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
133de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Pp(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function pC(e,t,r,n){return!(!n||r>=u0||!d0.includes(e)||!hC.includes(t))}var mC=class{constructor(e){var t,r,n,s;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,this.retryEnabled=(s=e.retry)!==null&&s!==void 0?s:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let o=(async()=>{let i=0;for(;;){const u=new Headers(r.headers);i>0&&u.set("X-Retry-Count",String(i));let d;try{d=await n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!d0.includes(r.method))throw h;if(r.retryEnabled&&i<u0){const p=Ap(i);i++,await Pp(p,r.signal);continue}throw h}if(pC(r.method,d.status,i,r.retryEnabled)){var a,l;const h=(a=(l=d.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,p=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:Ap(i);await d.text(),i++,await Pp(p,r.signal);continue}return await r.processResponse(d)}})();return this.shouldThrowOnError||(o=o.catch(i=>{var a;let l="",u="",d="";const h=i==null?void 0:i.cause;if(h){var p,f,w,y;const g=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",m=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(w=i==null?void 0:i.name)!==null&&w!==void 0?w:"FetchError"}: ${i==null?void 0:i.message}`,l+=` 134 135Caused by: ${(y=h==null?void 0:h.name)!==null&&y!==void 0?y:"Error"}: ${g}`,m&&(l+=` (${m})`),h!=null&&h.stack&&(l+=` 136${h.stack}`)}else{var x;l=(x=i==null?void 0:i.stack)!==null&&x!==void 0?x:""}const v=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${v} 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.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(u+=`. Your request URL is ${v} 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=i==null?void 0:i.name)!==null&&a!==void 0?a:"FetchError"}: ${i==null?void 0:i.message}`,details:l,hint:u,code:d},data:null,count:null,status:0,statusText:""}})),o.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,o=e.status,i=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const p=await e.text();p===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=p:n=JSON.parse(p))}const d=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");d&&h&&h.length>1&&(s=parseInt(h[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,o=406,i="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const d=await e.text();try{r=JSON.parse(d),Array.isArray(r)&&e.status===404&&(n=[],r=null,o=200,i="OK")}catch{e.status===404&&d===""?(o=204,i="No Content"):r={message:d}}if(r&&t.shouldThrowOnError)throw new fC(r)}return{success:r===null,error:r,data:n,count:s,status:o,statusText:i}}returns(){return this}overrideTypes(){return this}},gC=class extends mC{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
136explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Op=new RegExp("[,()]");var cs=class extends gC{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Op.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Op.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},vC=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:o}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=o}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(u=>/\s/.test(u)&&!o?"":(u==='"'&&(o=!o),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",i),n&&l.append("Prefer",`count=${n}`),new cs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1360){const l=[...new Set(a)].map(u=>`"${u}"`);o.searchParams.set("columns",l.join(","))}}return new cs({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const i="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new cs({method:i,url:a,headers:l,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new cs({method:n,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new cs({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function yC(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xC(e){var t=yC(e,"string");return ui(t)=="symbol"?t:t+""}function wC(e,t,r){return(t=xC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ip(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ip(Object(r),!0).forEach(function(n){wC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bC=class h0{constructor(t,{headers:r={},schema:n,fetch:s,timeout:o,urlLengthLimit:i=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=i;const l=s??globalThis.fetch;o!==void 0&&o>0?this.fetch=(u,d)=>{const h=new AbortController,p=setTimeout(()=>h.abort(),o),f=d==null?void 0:d.signal;if(f){if(f.aborted)return clearTimeout(p),l(u,d);const w=()=>{clearTimeout(p),h.abort()};return f.addEventListener("abort",w,{once:!0}),l(u,na(na({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",w)})}return l(u,na(na({},d),{},{signal:h.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new vC(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new h0(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var i;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(d)),h=n&&Object.values(r).some(d);h?(a="POST",u=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,w])=>w!==void 0).map(([f,w])=>[f,Array.isArray(w)?`{${w.join(",")}}`:`${w}
136`]).forEach(([f,w])=>{l.searchParams.append(f,w)})):(a="POST",u=r);const p=new Headers(this.headers);return h?p.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&p.set("Prefer",`count=${o}`),new cs({method:a,url:l,headers:p,schema:this.schemaName,body:u,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class _C{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 137import ws from "ws" 138new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 139 140Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const kC="2.102.1",SC=`realtime-js/${kC}`,EC="1.0.0",f0="2.0.0",CC=f0,jC=1e4,NC=100,Gr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},p0={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Gu={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class TC{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);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(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+u.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let w=new DataView(f),y=0;w.setUint8(y++,this.KINDS.userBroadcastPush),w.setUint8(y++,l.length),w.setUint8(y++,a.length),w.setUint8(y++,i.length),w.setUint8(y++,u.length),w.setUint8(y++,h.length),w.setUint8(y++,r),Array.from(l,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(a,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(i,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(u,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(h,v=>w.setUint8(y++,v.charCodeAt(0)));var x=new Uint8Array(f.byteLength+n.byteLength);return x.set(new Uint8Array(f),0),x.set(new Uint8Array(n),f.byteLength),x.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;
140const d=n.decode(t.slice(l,l+o));l=l+o;const h=n.decode(t.slice(l,l+i));l=l+i;const p=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,w={type:this.BROADCAST_EVENT,event:d,payload:f};return i>0&&(w.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var ae;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ae||(ae={}));const $p=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=RC(i,e,t,s),o),{}):{}},RC=(e,t,r,n)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?m0(o,i):Qu(i)},m0=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return IC(t,r)}switch(e){case ae.bool:return AC(t);case ae.float4:case ae.float8:case ae.int2:case ae.int4:case ae.int8:case ae.numeric:case ae.oid:return PC(t);case ae.json:case ae.jsonb:return OC(t);case ae.timestamp:return $C(t);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 Qu(t);default:return Qu(t)}},Qu=e=>e,AC=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},PC=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},OC=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},IC=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>m0(t,a))}return e},$C=e=>typeof e=="string"?e.replace(" ","T"):e,g0=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Mo=e=>typeof e=="function"?e:function(){return e},DC=typeof self<"u"?self:null,us=typeof window<"u"?window:null,Jt=DC||us||globalThis,LC="2.0.0",MC=1e4,FC=1e3,er={connecting:0,open:1,closing:2,closed:3},Ye={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},yr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Ju={longpoll:"longpoll",websocket:"websocket"},BC={complete:4},Yu="base64url.bearer.phx.",sa=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},v0=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},UC=class{constructor(e,t,r){this.state=Ye.closed,this.topic=e,this.params=Mo(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new sa(this,yr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new v0(()=>{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=Ye.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ye.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ye.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Ye.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 sa(this,yr.leave,Mo({}),this.timeout).send(),this.state=Ye.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(yr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 140
140teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ye.closed,this.bindings=[]}onClose(e){this.on(yr.close,e)}onError(e){return this.on(yr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new sa(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ye.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(yr.close,"leave")},r=new sa(this,yr.leave,Mo({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ye.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(i=>i.event===e&&this.filterBindings(i,t,r));for(let i=0;i<o.length;i++)o[i].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Ye.closed}isErrored(){return this.state===Ye.errored}isJoined(){return this.state===Ye.joined}isJoining(){return this.state===Ye.joining}isLeaving(){return this.state===Ye.leaving}},il=class{static request(e,t,r,n,s,o,i){if(Jt.XDomainRequest){let a=new Jt.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,o,i)}else if(Jt.XMLHttpRequest){let a=new Jt.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,o,i)}else{if(Jt.fetch&&Jt.AbortController)return this.fetchRequest(e,t,r,n,s,o,i);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,o,i){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Jt.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>i&&i(u)).catch(u=>{u.name==="AbortError"&&o?o():i&&i(null)}),l}static xdomainRequest(e,t,r,n,s,o,i){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);i&&i(a)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,o,i,a){e.open(t,r,!0),e.timeout=o;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===BC.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},i&&(e.ontimeout=i),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,o=e[n];typeof o=="object"?r.push(this.serialize(o,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(o))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},qC=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},ns=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Yu)&&(this.authToken=atob(t[1].slice(Yu.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=er.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Ju.websocket),"$1/"+Ju.longpoll)}endpointURL(){return il.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=er.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===er.open||this.readyState===er.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(o=>{setTimeout(()=>this.onmessage({data:o}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=er.open,this.onopen({}),this.poll();break;
140case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=qC(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 141`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=er.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let o,i=()=>{this.reqs.delete(o),n()};o=il.request(e,this.endpointURL(),t,r,this.timeout,i,a=>{this.reqs.delete(o),this.isActive()&&s(a)}),this.reqs.add(o)}},zC=class Co{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Co.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=Co.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Co.syncDiff(this.state,s,o,i),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Co.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let o=this.clone(t),i={},a={};return this.map(o,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let d=o[l];if(d){let h=u.metas.map(y=>y.phx_ref),p=d.metas.map(y=>y.phx_ref),f=u.metas.filter(y=>p.indexOf(y.phx_ref)<0),w=d.metas.filter(y=>h.indexOf(y.phx_ref)<0);f.length>0&&(i[l]=u,i[l].metas=f),w.length>0&&(a[l]=this.clone(d),a[l].metas=w)}else i[l]=u}),this.syncDiff(o,{joins:i,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:o,leaves:i}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(o,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let d=t[a].metas.map(p=>p.phx_ref),h=u.metas.filter(p=>d.indexOf(p.phx_ref)<0);t[a].metas.unshift(...h)}n(a,u,l)}),this.map(i,(a,l)=>{let u=t[a];if(!u)return;let d=l.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},oa={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,o,i]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:o,payload:i})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:o}=e,i=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+i),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(t,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>l.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(a.byteLength+o.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(o),a.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,595 bytes, line 141
141switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),i=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(i,i+n));i=i+n;let l=r.decode(e.slice(i,i+s));i=i+s;let u=r.decode(e.slice(i,i+o));i=i+o;let d=e.slice(i,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:d}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),i=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let u=r.decode(e.slice(a,a+s));a=a+s;let d=r.decode(e.slice(a,a+o));a=a+o;let h=r.decode(e.slice(a,a+i));a=a+i;let p=e.slice(a,e.byteLength),f={status:h,response:p};return{join_ref:l,ref:u,topic:d,event:yr.reply,payload:f}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),o=this.HEADER_LENGTH+2,i=r.decode(e.slice(o,o+n));o=o+n;let a=r.decode(e.slice(o,o+s));o=o+s;let l=e.slice(o,e.byteLength);return{join_ref:null,ref:null,topic:i,event:a,payload:l}}},VC=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||MC,this.transport=t.transport||Jt.WebSocket||ns,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Jt&&Jt.sessionStorage,this.establishedConnections=0,this.defaultEncoder=oa.encode.bind(oa),this.defaultDecoder=oa.decode.bind(oa),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ns?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;us&&us.addEventListener&&(us.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),r=this.connectClock)}),us.addEventListener("pageshow",n=>{r===this.connectClock&&(r=null,this.connect())}),us.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(n,s,o)=>{console.log(`${n}: ${s}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Mo(t.params||{}),this.endPoint=`${e}/${Ju.websocket}`,this.vsn=t.vsn||LC,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new v0(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ns}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=il.appendParams(il.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Mo(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ns?this.connectWithFallback(ns,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case ns:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Yu}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,o,i=this.transportName(e),a=l=>{this.log("transport",`falling back to ${i}...`,l),this.off([s,o]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${i}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),o=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),FC,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===er.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}
141triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(yr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case er.connecting:return"connecting";case er.open:return"open";case er.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new UC(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:o}=e;this.log("push",`${t} ${r} (${o}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:o,join_ref:i}=t;if(o&&o===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${o&&"("+o+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,i)&&l.trigger(n,s,o,i)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Fo{constructor(t,r){const n=WC(r);this.presence=new zC(t.getChannel(),n),this.presence.onJoin((s,o,i)=>{const a=Fo.onJoinPayload(s,o,i);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,o,i)=>{const a=Fo.onLeavePayload(s,o,i);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Fo.transformState(this.presence.state)}static transformState(t){return t=HC(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=Ta(s),r},{})}static onJoinPayload(t,r,n){const s=Dp(r),o=Ta(n);return{event:"join",key:t,currentPresences:s,newPresences:o}}static onLeavePayload(t,r,n){const s=Dp(r),o=Ta(n);return{event:"leave",key:t,currentPresences:s,leftPresences:o}}}function Ta(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function HC(e){return JSON.parse(JSON.stringify(e))}function WC(e){return(e==null?void 0:e.events)&&{events:e.events}}function Dp(e){return e!=null&&e.metas?Ta(e):[]}var Lp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Lp||(Lp={}));class KC{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Fo(this.channel.channelAdapter,r)}}class GC{constructor(t,r,n){const s=QC(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>NC){const o=this.channel.pushBuffer.shift();o.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${o.event}`,o.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===Gr.joined}isJoined(){return this.state===Gr.joined}isJoining(){return this.state===Gr.joining}isClosed(){return this.state===Gr.closed}isLeaving(){return this.state===Gr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function QC(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Mp;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Mp||(Mp={}));var Es;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Es||(Es={}));var xr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(xr||(xr={}));class Bo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new GC(this.socket.socketAdapter,t,this.params),this.presence=new KC(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=g0(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:i,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Es.PRESENCE]&&this.bindings[Es.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},p={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(xr.CHANNEL_ERROR,f)}),this._onClose(()=>t==null?void 0:t(xr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(xr.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=Gr.errored,t==null||t(xr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(xr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,o=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,i=[];for(let a=0;a<o;a++){const l=s[a],{filter:{event:u,schema:d,table:h,filter:p}}=l,f=t&&t[a];if(f&&f.event===u&&Bo.isFilterValueEqual(f.schema,d)&&Bo.isFilterValueEqual(f.table,h)&&Bo.isFilterValueEqual(f.filter,p))i.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=Gr.errored,r==null||r(xr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=i,this.state!=Gr.errored&&r&&r(xr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),o=t===Es.PRESENCE||t===Es.POSTGRES_CHANGES;if(s&&o)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
141try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_on(t,r,n){const s=t.toLocaleLowerCase(),o=this.channelAdapter.on(t,n),i={type:s,filter:r,callback:n,ref:o};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,o,i,a,l,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const p=(s=this.bindings[h])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in p){const f=p.id,w=(o=p.filter)===null||o===void 0?void 0:o.event;return f&&((i=r.ids)===null||i===void 0?void 0:i.includes(f))&&(w==="*"||(w==null?void 0:w.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(u=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return f==="*"||f===((d=r==null?void 0:r.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:o,join:i}=p0;return r&&[n,s,o,i].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:o,table:i,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:o,table:i,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=$p(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=$p(t.columns,t.old_record)),r}}class JC{constructor(t,r){this.socket=new VC(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(o=>{setTimeout(()=>
141o("timeout"),s),this.socket.disconnect(()=>{t(),o("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Gu.connecting}isDisconnecting(){return this.socket.connectionState()==Gu.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const YC={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},XC=[1e3,2e3,5e3,1e4],ZC=1e4,ej=` 142 addEventListener("message", (e) => { 143 if (e.data.event === "start") { 144 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 145 } 146 });`;class tj{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new TC,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=o=>o?(...i)=>o(...i):(...i)=>fetch(...i),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new JC(t,s),this.httpEndpoint=g0(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r} 147 148To use Realtime in Node.js, you need to provide a WebSocket implementation: 149 150Option 1: Use Node.js 22+ which has native WebSocket support 151Option 2: Install and provide the "ws" package: 152 153 npm install ws 154 155 import ws from "ws" 156 const client = new RealtimeClient(url, { 157 ...options, 158 transport: ws 159 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||Gu.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new Bo(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEac
159h(s=>{const o={access_token:r,version:SC};r&&s.updateJoinPayload(o),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(p0.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([ej],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,o,i,a,l,u,d;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const h={};h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:jC,h.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:YC.HEARTBEAT_INTERVAL,h.transport=(i=t==null?void 0:t.transport)!==null&&i!==void 0?i:_C.getWebSocketConstructor(),h.params=t==null?void 0:t.params,h.logger=t==null?void 0:t.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),h.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:y=>XC[y-1]||ZC;let p,f;const w=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:CC;switch(w){case EC:p=(y,x)=>x(JSON.stringify(y)),f=(y,x)=>x(JSON.parse(y));break;case f0:p=this.serializer.encode.bind(this.serializer),f=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=w,h.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:p,h.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:f,h.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,h.params=Object.assign(Object.assign({},h.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var di=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function rj(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function nj(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function sj(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=rj(e.baseUrl,n,s),l=await nj(e.auth),u=await t(a,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...i},body:o?JSON.stringify(o):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),p=h&&d?JSON.parse(d):d;if(!u.ok){const f=h?p:void 0,w=f==null?void 0:f.error;throw new di((w==null?void 0:w.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:f})}return{status:u.status,headers:u.headers,data:p}}}}function ia(e){return e.join("�")}var oj=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:ia(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ia(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ia(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ia(e.namespace)}`}),!0}catch(t){if(t instanceof di&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof di&&r.status===409)return;throw r}}};function ss(e){return e.join("�")}var ij=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ss(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ss(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ss(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ss(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ss(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ss(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof di&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof di&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},aj=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=sj({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new oj(this.client,t),this.tableOps=new ij(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
159async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},ql=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function zl(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Xu=class extends ql{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},y0=class extends ql{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const lj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),cj=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Zu=e=>{if(Array.isArray(e))return e.map(r=>Zu(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Zu(n)}),t},uj=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}function dj(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hj(e){var t=dj(e,"string");return hi(t)=="symbol"?t:t+""}function fj(e,t,r){return(t=hj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(r),!0).forEach(function(n){fj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Bp=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},pj=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let o=parseInt(s.status,10);Number.isFinite(o)||(o=500),s.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Xu(Bp(i),o,a,n))}).catch(()=>{const i=o+"";t(new Xu(s.statusText||`HTTP ${o} error`,o,i,n))})}else t(new y0(Bp(e),e,n))},mj=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return V(V({},s),r);if(cj(n)){var o;const i=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(i))l.toLowerCase()==="content-type"&&(a=u);s.headers=gj(i,"Content-Type",(o=a)!==null&&o!==void 0?o:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),V(V({},s),r)};function gj(e,t,r){const n=V({},e);for(const s of Object.keys(n))s.toLowerCase()===t.toLowerCase()&&delete n[s];return n[t]=r,n}async function xo(e,t,r,n,s,o,i){return new Promise((a,l)=>{e(r,mj(t,n,s,o)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(i==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>pj(u,l,n,i))})}function x0(e="storage"){return{get:async(t,r,n,s)=>xo(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,o)=>xo(t,"POST",r,s,o,n,e),put:async(t,r,n,s,o)=>xo(t,"PUT",r,s,o,n,e),head:async(t,r,n,s)=>xo(t,"HEAD",r,V(V({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,o)=>xo(t,"DELETE",r,s,o,n,e)}}const vj=x0("storage"),{get:fi,post:Pt,put:ed,head:yj,remove:_h}=vj,lt=x0("vectors");var ao=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([s,o])=>[s.toLowerCase(),o])),this.fetch=lj(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=V(V({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(zl(r))return{data:null,error:r};throw r}}},xj=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zl(t))return{data:null,error:t};throw t}}};let w0;w0=Symbol.toStringTag;var wj=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[w0]="BlobDownloadBuilder",this.promise=null}asStream(){return new xj(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zl(t))return{data:null,error:t};throw t}}};const bj={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Up={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var _j=class extends ao{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let o;const i=V(V({},Up),n);let a=V(V({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",s.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),l&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers&&(a=V(V({},a),n.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?ed:Pt)(s.fetch,`${s.url}/object/${d}`,o,V({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),a=new URL(s.url+`/object/upload/sign/${i}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=V(V({},Up),n),d=V(V({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:o,fullPath:(await ed(s.fetch,a.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=V({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Pt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),a=i.searchParams.get("token");if(!a)throw new ql("No token returned by API");return{signedUrl:i.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Pt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
159stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Pt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const o=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let i=await Pt(n.fetch,`${n.url}/object/sign/${s}`,V({expiresIn:t},o?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"",l=o&&i.signedURL.includes("/object/sign/")?i.signedURL.replace("/object/sign/","/render/image/sign/"):i.signedURL;return{signedUrl:encodeURI(`${n.url}${l}${a}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Pt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(i=>V(V({},i),{},{signedUrl:i.signedURL?encodeURI(`${n.url}${i.signedURL}${o}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=s?`?${s}`:"",i=this._getFinalPath(e),a=()=>fi(this.fetch,`${this.url}/${n}/${i}${o}`,{headers:this.headers,noResolveJson:!0},r);return new wj(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Zu(await fi(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await yj(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(zl(s)){var n;const o=s instanceof Xu?s.status:s instanceof y0?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(o!==void 0&&[400,404].includes(o))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});i!==""&&n.push(i);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await _h(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=V(V(V({},bj),t),{},{prefix:e||""});return await Pt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=V({},e);return await Pt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const kj="2.102.1",ji={"X-Client-Info":`storage-js/${kj}`};var Sj=class extends ao{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const o=s.href.replace(/\/$/,""),i=V(V({},ji),t);super(o,i,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await fi(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await fi(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Pt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await ed(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Pt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await _h(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},Ej=class extends ao{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ji),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Pt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
159{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await fi(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await _h(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!uj(e))throw new ql("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new aj({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...a)=>{try{return{data:await i.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},Cj=class extends ao{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ji),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await lt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await lt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},jj=class extends ao{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ji),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Nj=class extends ao{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ji),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await lt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Tj=class extends Nj{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Rj(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},Rj=class extends Cj{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName}))}
159async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new Aj(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Aj=class extends jj{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Pj=class extends Sj{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new _j(this.url,this.headers,e,this.fetch)}get vectors(){return new Tj(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Ej(this.url+"/iceberg",this.headers,this.fetch)}};function Vl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}const b0="2.102.1",ds=30*1e3,td=3,Pc=td*ds,Oj="http://localhost:9999",Ij="supabase.auth.token",$j={"X-Client-Info":`gotrue-js/${b0}`},rd="X-Supabase-Api-Version",_0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Dj=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Lj=10*60*1e3;class pi extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function F(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Mj extends pi{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function Fj(e){return F(e)&&e.name==="AuthApiError"}class Pn extends pi{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Or extends pi{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class ot extends Or{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function aa(e){return F(e)&&e.name==="AuthSessionMissingError"}class os extends Or{constructor(){super("Auth session or user missing","AuthInvalidToken
159ResponseError",500,void 0)}}class la extends Or{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ca extends Or{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Bj(e){return F(e)&&e.name==="AuthImplicitGrantRedirectError"}class qp extends Or{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Uj extends Or{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 nd extends Or{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Oc(e){return F(e)&&e.name==="AuthRetryableFetchError"}class zp extends Or{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class sd extends Or{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const al="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Vp=` 160\r=`.split(""),qj=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Vp.length;t+=1)e[Vp[t].charCodeAt(0)]=-2;for(let t=0;t<al.length;t+=1)e[al[t].charCodeAt(0)]=t;return e})();function Hp(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(al[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(al[n]),t.queuedBits-=6}}function k0(e,t,r){const n=qj[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Wp(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{Hj(i,n,r)};for(let i=0;i<e.length;i+=1)k0(e.charCodeAt(i),s,o);return t.join("")}function zj(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Vj(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}zj(n,t)}}function Hj(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Is(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)k0(e.charCodeAt(s),r,n);return new Uint8Array(t)}function Wj(e){const t=[];return Vj(e,r=>t.push(r)),new Uint8Array(t)}function Ln(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Hp(s,r,n)),Hp(null,r,n),t.join("")}function Kj(e){return Math.round(Date.now()/1e3)+e}function Gj(){return Symbol("auth-callback")}const Ie=()=>typeof window<"u"&&typeof document<"u",jn={tested:!1,writable:!1},S0=()=>{if(!Ie())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(jn.tested)return jn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),jn.tested=!0,jn.writable=!0}catch{jn.tested=!0,jn.writable=!1}return jn.writable};function Qj(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
160h((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const E0=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Jj=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",hs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Nn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Oe=async(e,t)=>{await e.removeItem(t)};class Hl{constructor(){this.promise=new Hl.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Hl.promiseConstructor=Promise;function ua(e){const t=e.split(".");if(t.length!==3)throw new sd("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!Dj.test(t[n]))throw new sd("JWT not in base64url format");return{header:JSON.parse(Wp(t[0])),payload:JSON.parse(Wp(t[1])),signature:Is(t[2]),raw:{header:t[0],payload:t[1]}}}async function Yj(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Xj(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function Zj(e){return("0"+e.toString(16)).substr(-2)}function eN(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,Zj).join("")}async function tN(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function rN(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await tN(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function is(e,t,r=!1){const n=eN();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await hs(e,`${t}-code-verifier`,s);const o=await rN(n);return[o,n===o?"plain":"s256"]}const nN=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function sN(e){const t=e.headers.get(rd);if(!t||!t.match(nN))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function oN(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function iN(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const aN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function as(e){if(!aN.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Ic(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function lN(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Kp(e){return JSON.parse(JSON.stringify(e))}const An=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),cN=[502,503,504];async function Gp(e){var t;if(!Jj(e))throw new nd(An(e),0);if(cN.includes(e.status))throw new nd(An(e),e.status);let r;try{r=await e.json()}catch(o){throw new Pn(An(o),o)}let n;const s=sN(e);if(s&&s.getTime()>=_0["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new zp(An(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new ot}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new zp(An(r),e.status,r.weak_password.reasons);throw new Mj(An(r),e.status||500,n)}const uN=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function U(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[rd]||(o[rd]=_0["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await dN(e,t,r+a,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function dN(e,t,r,n,s,o){const i=uN(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new nd(An(l),0)}if(a.ok||await Gp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Gp(l)}}function Tt(e){var t;let r=null;pN(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=Kj(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Qp(e){const t=Tt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Qr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function hN(e){return{data:e,error:null}}function fN(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=Vl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function Jp(e){return e}function pN(e){return e.access_token&&e.refresh_token&&e.expires_in}const $c=["global","local","others"];class mN{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=E0(n),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)}}
vendor: 4,751 bytes, line 160
160async signOut(t,r=$c[0]){if($c.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${$c.join(", ")}`);try{return await U(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(F(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await U(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Qr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Vl(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await U(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:fN,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(F(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await U(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Qr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await U(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Jp});if(d.error)throw d.error;const h=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);u[`${x}Page`]=y}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(F(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){as(t);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Qr})}catch(r){if(F(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){as(t);try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Qr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){as(t);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Qr})}catch(n){if(F(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){as(t.userId);try{const{data:r,error:n}=await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _deleteFactor(t){as(t.userId),as(t.id);try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await U(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Jp});if(d.error)throw d.error;const h=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);u[`${x}Page`]=y}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(F(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await U(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await U(this.fetch,"DELET
160E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await U(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(F(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await U(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await U(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(F(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(F(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await U(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(F(r))return{data:null,error:r};throw r}}}function Yp(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Gt={debug:!!(globalThis&&S0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class C0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Xp extends C0{}async function gN(e,t,r){Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async o=>{if(o){clearTimeout(s),Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await r()}finally{Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Xp(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Gt.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await r()}})}catch(o){if(t>0&&clearTimeout(s),(o==null?void 0:o.name)==="AbortError"&&t>0){if(n.signal.aborted)return Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async i=>{if(i){Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,i.name);try{return await r()}finally{Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,i.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw Gt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Xp(`Lock "${e}" was released because another request stole it`)}throw o}}function vN(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function j0(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
160" is invalid.`);return e.toLowerCase()}function yN(e){return parseInt(e,16)}function xN(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function wN(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:u,scheme:d,uri:h,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 161`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=j0(e.address),w=d?`${d}://${n}`:n,y=e.statement?`${e.statement} 162`:"",x=`${w} wants you to sign in with your Ethereum account: 163${f} 164 165${y}`;let v=`URI: ${h} 166Version: ${p} 167Chain ID: ${r}${i?` 168Nonce: ${i}`:""} 169Issued At: ${o.toISOString()}`;if(s&&(v+=` 170Expiration Time: ${s.toISOString()}`),a&&(v+=` 171Not Before: ${a.toISOString()}`),l&&(v+=` 172Request ID: ${l}`),u){let g=` 173Resources:`;for(const m of u){if(!m||typeof m!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${m}`);g+=` 174- ${m}`}v+=g}return`${x} 175${v}`}class ke extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class ll extends ke{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function bN({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ke({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new ke({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new ke({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new ke({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new ke({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ke({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new ke({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ke({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(N0(i)){if(o.rp.id!==i)return new ke({message:`The RP ID "${o.rp.id}
175" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new ke({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new ke({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function _N({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ke({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ke({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(N0(n)){if(r.rpId!==n)return new ke({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ke({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class kN{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const SN=new kN;function EN(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Vl(e,["challenge","user","excludeCredentials"]),o=Is(t).buffer,i=Object.assign(Object.assign({},r),{id:Is(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:o,user:i});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Is(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function CN(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Vl(e,["challenge","allowCredentials"]),s=Is(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:Is(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function jN(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ln(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ln(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function NN(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ln(new Uint8Array(s.authenticatorData)),clientDataJSON:Ln(new Uint8Array(s.clientDataJSON)),signature:Ln(new Uint8Array(s.signature)),userHandle:s.userHandle?Ln(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function N0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Zp(){var e,t;return!!(Ie()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function TN(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new ll("Browser returned unexpected credential type",t)}:{data:null,error:new ll("Empty credential response",t)}}
175catch(t){return{data:null,error:bN({error:t,options:e})}}}async function RN(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new ll("Browser returned unexpected credential type",t)}:{data:null,error:new ll("Empty credential response",t)}}catch(t){return{data:null,error:_N({error:t,options:e})}}}const AN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},PN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function cl(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const a=n[o];t(a)?n[o]=cl(a,i):n[o]=cl(i)}else n[o]=i}return n}function ON(e,t){return cl(AN,e,t||{})}function IN(e,t){return cl(PN,e,t||{})}class $N{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){var i;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const u=s??SN.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const h=n;if(h)d.name=`${d.id}:${h}`;else{const f=(await this.client.getUser()).data.user,w=((i=f==null?void 0:f.user_metadata)===null||i===void 0?void 0:i.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";d.name=`${d.id}:${w}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=ON(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:h,error:p}=await TN({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}case"request":{const d=IN(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:h,error:p}=await RN(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:p}}}}catch(a){return F(a)?{data:null,error:a}:{data:null,error:new Pn("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new pi("rpId is required for WebAuthn authentication")};try{if(!Zp())return{data:null,error:new Pn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return F(i)?{data:null,error:i}:{data:null,error:new Pn("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new pi("rpId is required for WebAuthn registration")};try{if(!Zp())return{data:null,error:new Pn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(d=>{var h;
175return(h=d.data)===null||h===void 0?void 0:h.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(i){return F(i)?{data:null,error:i}:{data:null,error:new Pn("Unexpected error in register",i)}}}}vN();const DN={url:Oj,storageKey:Ij,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:$j,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function em(e,t,r){return await r()}const ls={};class mi{get jwks(){var t,r;return(r=(t=ls[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ls[this.storageKey]=Object.assign(Object.assign({},ls[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ls[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ls[this.storageKey]=Object.assign(Object.assign({},ls[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},DN),t);if(this.storageKey=o.storageKey,this.instanceID=(r=mi.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,mi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Ie()){const i=`${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(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new mN({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=E0(o.fetch),this.lock=o.lock||em,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&Ie()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=gN:this.lock=em,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 $N(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?(o.storage?this.storage=o.storage:S0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Yp(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Yp(this.memoryStorage)),Ie()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i);try{await this._notifyAllSubscribers(i.data.event,i.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}o.skipAutoInitialize||this.initialize().catch(i=>{this._debug("#initialize()","error",i)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${b0}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Ie()&&(r=Qj(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ie()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),Bj(o)){const l=(t=o.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return F(r)?this._returnResult({error:r}):this._returnResult({error:new Pn("Unexpected error during initialization",r)}
175)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Tt}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(F(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:d,password:h,options:p}=t;let f=null,w=null;this.flowType==="pkce"&&([f,w]=await is(this.storage,this.storageKey)),o=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:w},xform:Tt})}else if("phone"in t){const{phone:d,password:h,options:p}=t;o=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Tt})}else throw new la("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await Oe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(await Oe(this.storage,`${this.storageKey}-code-verifier`),F(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:a}=t;r=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Qp})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Qp})}else throw new la("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new os;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,a,l,u,d,h,p;let f,w;if("message"in t)f=t.message,w=t.signature;else{const{chain:y,wallet:x,statement:v,options:g}=t;let m;if(Ie())if(typeof x=="object")m=x;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")m=A.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");m=x}const _=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),k=await m.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=j0(k[0]);let E=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const A=await m.request({method:"eth_chainId"});E=yN(A)}const N={domain:_.host,address:S,statement:v,uri:_.href,version:"1",chainId:E,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=g==null?void 0:g.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=wN(N),w=await m.request({method:"personal_sign",params:[xN(f),S]})}try{const{data:y,error:x}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:w}
175,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Tt});if(x)throw x;if(!y||!y.session||!y.user){const v=new os;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:x})}catch(y){if(F(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var r,n,s,o,i,a,l,u,d,h,p,f;let w,y;if("message"in t)w=t.message,y=t.signature;else{const{chain:x,wallet:v,statement:g,options:m}=t;let _;if(Ie())if(typeof v=="object")_=v;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))_=S.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=v}const k=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const S=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},m==null?void 0:m.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),g?{statement:g}:null));let E;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")E=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)E=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)w=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),y=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${k.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=m==null?void 0:m.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=m==null?void 0:m.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${m.signInWithSolana.notBefore}`]:[],...!((i=m==null?void 0:m.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${m.signInWithSolana.expirationTime}`]:[],...!((a=m==null?void 0:m.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${m.signInWithSolana.chainId}`]:[],...!((l=m==null?void 0:m.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${m.signInWithSolana.nonce}`]:[],...!((u=m==null?void 0:m.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${m.signInWithSolana.requestId}`]:[],...!((h=(d=m==null?void 0:m.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...m.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 176`);const S=await _.signMessage(new TextEncoder().encode(w),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=S}}try{const{data:x,error:v}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Ln(y)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Tt});if(v)throw v;if(!x||!x.session||!x.user){const g=new os;return this._returnResult({data:{user:null,session:null},error:g})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:v})}
176catch(x){if(F(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await Nn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new Uj;const{data:o,error:i}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Tt});if(await Oe(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new os;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await Oe(this.storage,`${this.storageKey}-code-verifier`),F(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,a=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Tt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new os;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await is(this.storage,this.storageKey));const{error:h}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:d}=await U(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:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new la("You must provide either an email or phone number.")}catch(a){if(await Oe(this.storage,`${this.storageKey}-code-verifier`),F(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Tt});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,u=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await is(this.storage,this.storageKey));const u=await U(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:hN});return!((o=u.data)===null||o===void 0)&&o.url&&Ie()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Oe(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 t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new ot;const{error:s}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(F(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:i}=await U(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:a}=await U(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new la("You must provide either an email or phone number and a type")}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Nn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
176id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Pc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await Nn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=Ic()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=lN(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Qr}):await this._useSession(async r=>{var n,s,o;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ot}:await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Qr})})}catch(r){if(F(r))return aa(r)&&(await this._removeSession(),await Oe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new ot;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await is(this.storage,this.storageKey));const{data:u,error:d}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:Qr});if(d)throw d;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await Oe(this.storage,`${this.storageKey}-code-verifier`),F(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ot;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=ua(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(F(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new ot;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(F(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Ie())throw new ca("No browser detected.");
176if(t.error||t.error_description||t.error_code)throw new ca(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new qp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ca("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new qp("No code detected.");const{data:g,error:m}=await this._exchangeCodeForSession(t.code);if(m)throw m;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:u}=t;if(!o||!a||!i||!u)throw new ca("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let p=d+h;l&&(p=parseInt(l));const f=p-d;f*1e3<=ds&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const w=p-h;d-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,p,d):d-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,p,d);const{data:y,error:x}=await this._getUser(o);if(x)throw x;const v={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:p,refresh_token:i,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(n){if(F(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Nn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o&&!aa(o))return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(Fj(a)&&(a.status===404||a.status===401||a.status===403)||aa(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Oe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=Gj(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),aa(o)?console.warn(o):console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await is(this.storage,this.storageKey,!0));try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await Oe(this.storage,`${this.storageKey}-code-verifier`),F(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,a,l,u,d;const{data:h,error:p}=o;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await U(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Ie()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(F(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:u,nonce:d}=t,h=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:Tt}),{data:p,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new os}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await Oe(this.storage,`${this.storageKey}-code-verifier`),F(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;
176return await U(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Xj(async s=>(s>0&&await Yj(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Tt})),(s,o)=>{const i=200*Math.pow(2,s);return o&&Oc(o)&&Date.now()+i-n<ds})}catch(n){if(this._debug(r,"error",n),F(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Ie()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Nn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await Nn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await hs(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:Ic()}else if(s&&!s.user&&!s.user){const i=await Nn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Oe(this.storage,this.storageKey+"-user"),await hs(this.storage,this.storageKey,s)):s.user=Ic()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Pc;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${Pc}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),Oc(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new ot;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Hl;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new ot;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),F(o)){const i={data:null,error:o};return Oc(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Oe(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await hs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Kp(s);await hs(this.storage,this.storageKey,o)}else{const s=Kp(r);await hs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Oe(this.storage,this.storageKey),await Oe(this.storage,this.storageKey+"-code-verifier"),await Oe(this.storage,this.storageKey+"-user"),this.userStorage&&await Oe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ie()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
176catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ds);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/ds);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ds}ms, refresh threshold is ${td} ticks`),s<=td&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof C0)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ie()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await is(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await U(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await U(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?jN(t.webauthn.credential_response):NN(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data:a}=i;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:EN(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:CN(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,o;if(t)try{const{payload:f}=ua(t);let w=null;f.aal&&(w=f.aal);let y=w;const{data:{user:x},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const m=f.amr||[];return{data:{currentLevel:w,nextLevel:y,currentAuthenticationMethods:m},error:null}}catch(f){if(F(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:i},error:a}
176=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=ua(i.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((o=(s=i.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(d="aal2");const p=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await U(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new ot})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const i=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&Ie()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const i=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&Ie()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await U(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ot})})}catch(t){if(F(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await U(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ot})})}catch(r){if(F(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+Lj>s)return n;const{data:o,error:i}=await U(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:w}
176=await this.getSession();if(w||!f.session)return this._returnResult({data:null,error:w});n=f.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=ua(n);r!=null&&r.allowExpired||oN(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:o,header:s,signature:i},error:null}}const d=iN(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,i,Wj(`${a}.${l}`)))throw new sd("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(F(n))return this._returnResult({data:null,error:n});throw n}}}mi.nextInstanceID={};const LN=mi,MN="2.102.1";let jo="";typeof Deno<"u"?jo="deno":typeof document<"u"?jo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?jo="react-native":jo="node";const FN={"X-Client-Info":`supabase-js-${jo}/${MN}`},BN={headers:FN},UN={schema:"public"},qN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},zN={};function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function VN(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HN(e){var t=VN(e,"string");return gi(t)=="symbol"?t:t+""}function WN(e,t,r){return(t=HN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tm(Object(r),!0).forEach(function(n){WN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const KN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GN=()=>Headers,QN=(e,t,r)=>{const n=KN(r),s=GN();return async(o,i)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(o,xe(xe({},i),{},{headers:u}))}};function JN(e){return e.endsWith("/")?e:e+"/"}function YN(e,t){var r,n;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:u,realtime:d,global:h}=t,p={db:xe(xe({},l),s),auth:xe(xe({},u),o),realtime:xe(xe({},d),i),storage:{},global:xe(xe(xe({},h),a),{},{headers:xe(xe({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function XN(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(JN(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var ZN=class extends LN{constructor(e){super(e)}},eT=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=XN(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,a={db:UN,realtime:zN,auth:xe(xe({},qN),{},{storageKey:i}),global:BN},l=YN(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} 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=QN(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(xe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new bC(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new Pj(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new dC(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
176channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:i,lock:a,debug:l,throwOnError:u},d,h){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ZN({url:this.authUrl.href,headers:xe(xe({},p),d),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:a,debug:l,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new tj(this.realtimeUrl.href,xe(xe({},e),{},{params:xe(xe({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const tT=(e,t,r)=>new eT(e,t,r);function rT(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}rT()&&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 nT="https://ltqbfzmrvvrlzcifftxr.supabase.co",sT="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imx0cWJmem1ydnZybHpjaWZmdHhyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzM5NDIzMDEsImV4cCI6MjA4OTUxODMwMX0._mUhv0VCX5bs6w1cJBmatOXsPfJEc7eiDz_lrCqNVvs",On=tT(nT,sT),od=[{question:"Qual é o faturamento da sua empresa?",options:[{label:"A",text:"Até R$ 50 mil/mês",value:"ate_50k"},{label:"B",text:"R$ 50 mil a R$ 150 mil/mês",value:"50k_150k"},{label:"C",text:"R$ 150 mil a R$ 500 mil/mês",value:"150k_500k"},{label:"D",text:"R$ 500 mil a R$ 1 milhão/mês",value:"500k_1M"},{label:"E",text:"Acima de R$ 1 milhão/mês",value:"acima_1M"}]},{question:"Há quanto tempo sua empresa está constituÃda?",options:[{label:"A",text:"Menos de 1 ano",value:"menos_1"},{label:"B",text:"1 a 2 anos",value:"1_2"},{label:"C",text:"2 a 5 anos",value:"2_5"},{label:"D",text:"Mais de 5 anos",value:"mais_5"}]},{question:"Sua empresa tem alguma restrição ativa?",options:[{label:"A",text:"Sim, restrição financeira: cheque devolvido, protesto em cartório, nome negativado no Serasa/SPC ou ação de cobrança",value:"restricao_financeira"},{label:"B",text:"Sim, imposto atrasado: dÃvidas com Receita Federal, Estadual ou Municipal",value:"imposto_atrasado"},{label:"C",text:"Sim, os dois",value:"ambos"},{label:"D",text:"Não tenho restrições",value:"nenhuma"}]},{question:"Quanto você retira da empresa por mês?",options:[{label:"A",text:"Até R$ 5 mil",value:"ate_5k"},{label:"B",text:"R$ 5 mil a R$ 15 mil",value:"5k_15k"},{label:"C",text:"R$ 15 mil a R$ 30 mil",value:"15k_30k"},{label:"D",text:"Acima de R$ 30 mil",value:"acima_30k"}]},{question:"Quanto sua empresa paga de parcelas mensais hoje? Some tudo: bancos, fintechs, cooperativas.",options:[{label:"A",text:"Não tenho parcelas",value:"nenhuma"},{label:"B",text:"Até R$ 5 mil/mês",value:"ate_5k"},{label:"C",text:"R$ 5 mil a R$ 10 mil/mês",value:"5k_10k"},{label:"D",text:"R$ 10 mil a R$ 15 mil/mês",value:"10k_15k"},{label:"E",text:"R$ 15 mil a R$ 20 mil/mês",value:"15k_20k"},{label:"F",text:"Acima de R$ 20 mil/mês",value:"acima_20k"}]}],wo=od.length,T0={0:{ate_50k:2,"50k_150k":5,"150k_500k":7,"500k_1M":9,acima_1M:10},1:{menos_1:2,"1_2":4,"2_5":7,mais_5:10}
176,2:{restricao_financeira:1,imposto_atrasado:1,ambos:1,nenhuma:10},3:{ate_5k:2,"5k_15k":5,"15k_30k":8,acima_30k:10},4:{acima_20k:1,"15k_20k":3,"10k_15k":5,"5k_10k":7,ate_5k:9,nenhuma:10}},R0=[.15,.15,.25,.2,.25],oT=["Faturamento","Tempo de empresa","Restrições ativas","Retirada mensal","Pressão da dÃvida"],iT={ate_5k:2500,"5k_15k":1e4,"15k_30k":22500,acima_30k:35e3},A0={nenhuma:0,ate_5k:3500,"5k_10k":7500,"10k_15k":12500,"15k_20k":17500,acima_20k:25e3};function aT(e){return e.reduce((t,r,n)=>{var s;return r===null?t:t+(((s=T0[n])==null?void 0:s[r])||0)*R0[n]},0)}function lT(e){const t=e[2];return t==="restricao_financeira"||t==="imposto_atrasado"||t==="ambos"}function cT(e,t){return t||e<3?"Situação crÃtica":e>=8.5?"Alta robustez":e>=7?"Boa estrutura":e>=5?"Estrutura moderada":"Estrutura frágil"}function uT(e,t){return t||e<3?"text-red-500":e>=7?"text-[#0F6E56]":e>=5?"text-yellow-500":"text-orange-500"}function dT(e,t){return t||e<3?"bg-red-100 text-red-700 border-red-200":e>=7?"bg-emerald-100 text-emerald-700 border-emerald-200":e>=5?"bg-yellow-100 text-yellow-700 border-yellow-200":"bg-orange-100 text-orange-700 border-orange-200"}function hT(e,t){return t||e<3?"Nesse momento, uma instituição financeira identificaria restrições que inviabilizariam a análise antes mesmo de avaliar o mérito da operação.":e>=8.5?"Sua empresa apresenta indicadores sólidos. Uma instituição financeira tenderia a analisar sua operação com interesse.":e>=7?"Sua empresa tem uma base relevante. Há pontos que podem ser fortalecidos antes de avançar para uma operação.":e>=5?"Sua empresa tem potencial, mas alguns indicadores precisam de atenção. Ir ao banco sem isso ajustado pode gerar registros negativos no seu histórico.":"Seu perfil apresenta fragilidades que uma instituição financeira identificaria antes mesmo de avaliar o mérito da operação."}function fT(e,t){return t||e<3?"Seu resultado indica restrições que precisam ser resolvidas antes de qualquer operação de crédito. Mas toda situação tem um caminho de saÃda. O Scanner Financeiro entrega um mapa com o que precisa ser regularizado, em qual ordem priorizar e o que esperar em cada etapa. Nossa equipe passou 15 anos dentro das instituições financeiras e conhece como cada tipo de restrição é tratada no sistema. Por R$ 97, você sai sabendo exatamente o que fazer e por onde começar.":e>=8.5?"Sua empresa está bem posicionada para crédito. O Scanner Financeiro aprofunda esse diagnóstico e identifica qual tipo de operação faz mais sentido para o seu perfil entre nossas instituições bancárias parceiras. Nossa equipe é liderada por especialistas que passaram 15 anos dentro dos bancos, do outro lado da mesa. Sabemos como o comitê de crédito analisa uma operação e como apresentar sua empresa da melhor forma possÃvel. Por R$ 97, você para de falar com o gerente e começa a contar com quem conhece o processo por dentro.":e>=7?"Sua empresa tem um perfil relevante para crédito. O Scanner Financeiro detalha o que ainda pesa no seu diagnóstico e mapeia o caminho mais estruturado até uma operação. Trabalhamos com uma rede de instituições bancárias parceiras e nossa equipe é liderada por especialistas com 15 anos de experiência dentro dos bancos. Sabemos qual instituição tem apetite para cada perfil e como apresentar uma operação do jeito certo. Por R$ 97, você sai com clareza sobre por onde ir.":e>=5?"Sua empresa tem potencial para crédito, mas alguns pontos precisam de atenção antes de avançar. Ir ao banco sem isso resolvido pode gerar uma negativa que fica registrada no seu histórico e dificulta operações futuras. O Scanner Financeiro mostra o que está pesando e qual tipo de operação faz sentido para o seu momento. Nossa equipe viveu 15 anos dentro dos bancos e conhece cada critério que entra na análise. Por R$ 97, você evita erros que custam caro depois.":"Seu resultado mostra que há pontos importantes a organizar antes de buscar crédito. Avançar agora sem esse preparo pode comprometer operações futuras. O Scanner Financeiro mapeia o que precisa ser ajustado e em quanto tempo sua empresa estará em melhor posição. Nossa equipe passou 15 anos analisando empresas dentro das instituições financeiras. Por R$ 97, você sai com um plano claro no lugar de uma negativa evitável."}function pT(e){const t=[],r={ate_50k:35e3,"50k_150k":1e5,"150k_500k":325e3,"500k_1M":75e4,acima_1M:12e5},n=e[0]&&r[e[0]]||35e3,s=e[4]&&A0[e[4]]||0,o=n>0?Math.round(s/n*100):0;e[3]&&iT[e[3]];const i={0:"O volume de faturamento declarado limita o porte das operações disponÃveis e o apetite das instituições para o seu perfil.",1:"Empresas com menos de 2 anos têm acesso restrito a linhas de crédito. A maioria das instituições exige histórico mÃnimo de 24 meses.",2:"Restrições com bancos, boletos não pagos ou impostos atrasad
176os impedem a análise na maioria das instituições antes mesmo de avaliar o mérito da operação. Este indicador tem peso decisivo na análise bancária.",3:"A retirada declarada em relação ao faturamento indica margem reduzida. Abaixo de 5% é sinal de alerta para o comitê de crédito.",4:`Suas parcelas mensais comprometem aproximadamente ${o}% do seu faturamento. Bancos consideram saudável até 10% e preocupante acima de 30%.`};return e.forEach((a,l)=>{var d;if(a===null)return;const u=((d=T0[l])==null?void 0:d[a])||0;u<5&&t.push({name:oT[l],score:u,weight:R0[l],text:i[l]})}),t.sort((a,l)=>l.weight-a.weight),t}const mT={ate_50k:35e3,"50k_150k":1e5,"150k_500k":325e3,"500k_1M":75e4,acima_1M:12e5};function gT(e,t){if(t)return{credit:0,caixaComprometido:!1};const r=e[0]&&mT[e[0]]||35e3,n=e[4]&&A0[e[4]]||0;if(n>r*.5)return{credit:0,caixaComprometido:!0};const o=r*.3-n;if(o<=0)return{credit:0,caixaComprometido:!0};const i=.025,l=(1-Math.pow(1+i,-24))/i;return{credit:o*l,caixaComprometido:!1}}function rm(e){return e.toLocaleString("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:0,maximumFractionDigits:0})}function vT(e,t){return t||e<5?"vermelho":e<7?"amarelo":"verde"}function yT(){const[e,t]=b.useState("quiz"),[r,n]=b.useState({nome:"",email:"",whatsapp:""}),[s,o]=b.useState(Array(wo).fill(null)),[i,a]=b.useState(Array(wo).fill("")),[l,u]=b.useState(0),[d,h]=b.useState(null),[p,f]=b.useState(!1),w=(m,_)=>{const k=[...s];k[l]=m,o(k);const S=[...i];S[l]=_,a(S),l<wo-1?u(l+1):t("form")},y=()=>{l>0&&u(l-1)},x=async m=>{if(m.preventDefault(),!r.nome||!r.email||!r.whatsapp)return;f(!0);const _=Math.round(aT(s)*10)/10,k=lT(s),S=cT(_,k),{credit:E,caixaComprometido:N}=gT(s,k),A=E>0?rm(E):"Sem capacidade estimada",O=vT(_,k);let q=crypto.randomUUID();try{const{data:D}=await On.from("mini_leads").insert({id:q,nome:r.nome,email:r.email,whatsapp:r.whatsapp,score:_,classificacao:S,credito_estimado:A,p1:s[0],p2:s[1],p3:s[2],p4:s[3],p5:s[4],prioridade:O}).select("id").single();D!=null&&D.id&&(q=D.id)}catch(D){console.error("Erro ao salvar lead:",D)}fetch("https://ltqbfzmrvvrlzcifftxr.supabase.co/functions/v1/send-alert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({evento:"mini",lead:{nome:r.nome,whatsapp:r.whatsapp,email:r.email,score:_,classificacao:S,credito_estimado:A,prioridade:O}})}).catch(()=>{}),h({score:_,classificacao:S,trava:k,credit:E,caixaComprometido:N,leadId:q}),t("result"),f(!1)},v=d?pT(s):[],g=Math.round(l/wo*100);return c.jsx("section",{id:"scanner",className:"py-20 md:py-28",style:{backgroundColor:"#0D2137"},children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6",children:[c.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white text-center mb-4",children:"Mini Diagnóstico Financeiro Empresarial"}),c.jsx("p",{className:"text-center mb-10",style:{color:"#93B0C8"},children:"Descubra como o banco enxerga sua empresa agora."}),e==="quiz"&&c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:c.jsxs("div",{className:"p-8",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsxs("span",{className:"text-sm font-medium",style:{color:"#0D2137"},children:["Pergunta ",l+1," de ",wo]}),c.jsxs("span",{className:"text-sm font-medium",style:{color:"#0F6E56"},children:[g,"%"]})]}),c.jsx("div",{className:"w-full h-2 rounded-full mb-8",style:{backgroundColor:"#E5E7EB"},children:c.jsx("div",{className:"h-2 rounded-full transition-all duration-300",style:{width:`${g}%`,backgroundColor:"#0F6E56"}})}),c.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"#0D2137"},children:od[l].question}),c.jsx("div",{className:"space-y-3 mt-4",children:od[l].options.map(m=>{const _=s[l]===m.value;return c.jsxs("button",{onClick:()=>w(m.value,m.label),className:"w-full text-left px-5 py-4 rounded-lg border-2 transition-all font-medium hover:shadow-md",style:{borderColor:_?"#0F6E56":"#E5E7EB",color:"#0D2137",backgroundColor:_?"#F0FDF9":"#F9FAFB"},onMouseEnter:k=>{_||(k.currentTarget.style.borderColor="#0F6E56",k.currentTarget.style.backgroundColor="#F0FDF9")},onMouseLeave:k=>{_||(k.currentTarget.style.borderColor="#E5E7EB",k.currentTarget.style.backgroundColor="#F9FAFB")},children:[c.jsx("span",{className:"inline-flex items-center justify-center w-8 h-8 rounded-full text-sm font-bold mr-3 text-white",style:{backgroundColor:_?"#5DCAA5":"#0F6E56"},children:_?"â":m.label}),m.text]},m.label)})}),l>
1760&&c.jsx("button",{onClick:y,className:"mt-4 w-full text-center text-sm font-medium py-2 transition-opacity hover:opacity-70",style:{color:"#6B7280"},children:"â Voltar"})]})}),e==="form"&&c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:c.jsxs("form",{onSubmit:x,className:"p-8 space-y-5",children:[c.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:"#0D2137"},children:"Para onde enviamos seu resultado?"}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"#374151"},children:"Nome completo"}),c.jsx("input",{type:"text",required:!0,value:r.nome,onChange:m=>n({...r,nome:m.target.value}),className:"w-full px-4 py-3 rounded-lg border-2 focus:outline-none focus:ring-0 transition-colors",style:{borderColor:"#E5E7EB",color:"#0D2137"},onFocus:m=>{m.currentTarget.style.borderColor="#0F6E56"},onBlur:m=>{m.currentTarget.style.borderColor="#E5E7EB"},placeholder:"Seu nome completo"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"#374151"},children:"WhatsApp"}),c.jsx("input",{type:"tel",required:!0,value:r.whatsapp,onChange:m=>n({...r,whatsapp:m.target.value}),className:"w-full px-4 py-3 rounded-lg border-2 focus:outline-none focus:ring-0 transition-colors",style:{borderColor:"#E5E7EB",color:"#0D2137"},onFocus:m=>{m.currentTarget.style.borderColor="#0F6E56"},onBlur:m=>{m.currentTarget.style.borderColor="#E5E7EB"},placeholder:"(11) 99999-9999"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"#374151"},children:"Email"}),c.jsx("input",{type:"email",required:!0,value:r.email,onChange:m=>n({...r,email:m.target.value}),className:"w-full px-4 py-3 rounded-lg border-2 focus:outline-none focus:ring-0 transition-colors",style:{borderColor:"#E5E7EB",color:"#0D2137"},onFocus:m=>{m.currentTarget.style.borderColor="#0F6E56"},onBlur:m=>{m.currentTarget.style.borderColor="#E5E7EB"},placeholder:"[email protected]"})]}),c.jsx("button",{type:"submit",disabled:p,className:"w-full font-semibold py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white",style:{backgroundColor:"#0F6E56"},children:p?"Calculando...":"Ver meu resultado"})]})}),e==="result"&&d&&c.jsxs("div",{children:[c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:p-12 text-center",children:[c.jsx("p",{className:"text-sm uppercase tracking-wider mb-4 font-medium",style:{color:"#6B7280"},children:"Seu resultado"}),c.jsx("div",{className:`text-6xl md:text-7xl font-extrabold mb-2 ${uT(d.score,d.trava)}`,children:d.score.toFixed(1)}),c.jsx("p",{className:"text-sm mb-3",style:{color:"#9CA3AF"},children:"de 10"}),c.jsx("div",{className:`inline-block rounded-full px-6 py-2 border ${dT(d.score,d.trava)}`,children:c.jsx("span",{className:"font-semibold text-lg",children:d.classificacao})})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("h4",{className:"font-semibold text-lg mb-5",style:{color:"#0D2137"},children:"O que está pesando"}),v.length>0?c.jsx("div",{className:"space-y-4",children:v.map((m,_)=>c.jsxs("div",{className:"flex gap-4 items-start",children:[c.jsx("span",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-red-100 text-red-600 text-sm font-bold flex items-center justify-center",children:_+1}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",style:{color:"#0D2137"},children:m.name}),c.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#6B7280"},children:m.text})]})]},_))}):c.jsx("p",{className:"leading-relaxed",style:{color:"#4B5563"},children:"Seus indicadores estão dentro das faixas esperadas."})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("h4",{className:"font-semibold text-lg mb-3",style:{color:"#0D2137"},children:"Como o banco lê essa empresa"}),c.jsx("p",{className:"leading-relaxed",style:{color:"#4B5563"},children:hT(d.score,d.trava)})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("h4",{className:"font-semibold text-lg mb-3",style:{color:"#0D2137"},children:"Capacidade estimada de crédito"}),d.credit>0?c.jsxs("div",{className:"rounded-lg p-5",style:{backgroundColor:"#F0FDF9",border:"1px solid #D1FAE5"},children:[c.jsx("p",{className:"text-2xl font-bold mb-1",style:{color:"#0F6E56"},children:rm(d.credit)}),c.jsx("p",{className:"text-sm",style:{color:"#6B7280"},children:"Faixa estimada com base nos seus indicadores. O valor real depende de análise documental completa."})]}):d.caixaComprometido?c.jsx("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-5",children:c.jsx("p",{className:"text-orange-700 font-semibold mb-1",children:"Sua empresa está com o caixa comprometido acima da capacidade de absorver novas parcelas. O próximo passo não é buscar mais crédito. à reestruturar o que já existe."})}):c.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-5",children:[c.jsx("p",{className:"text-orange-700 font-semibold mb-1",children:"Com as restrições atuais, a capacidade de crédito não é
176calculada."}),c.jsx("p",{className:"text-sm",style:{color:"#6B7280"},children:"Regularize os pontos indicados acima para desbloquear sua estimativa."})]})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("p",{className:"leading-relaxed mb-6",style:{color:"#4B5563"},children:fT(d.score,d.trava)}),c.jsx("a",{href:"/scanner-venda",className:"inline-block w-full text-center font-semibold px-8 py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white whitespace-nowrap",style:{backgroundColor:"#0F6E56"},children:"Quero meu Scanner completo"})]})}),c.jsx("p",{className:"text-xs text-center mt-6 leading-relaxed",style:{color:"#93B0C8"},children:"Os resultados apresentados são baseados exclusivamente nas informações declaradas pelo usuário e têm caráter orientativo. Não substituem uma análise documental completa nem constituem oferta ou garantia de crédito."})]})]})})}var Wl="Collapsible",[xT,P0]=no(Wl),[wT,kh]=xT(Wl),O0=b.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[l,u]=Il({prop:n,defaultProp:s??!1,onChange:i,caller:Wl});return c.jsx(wT,{scope:r,disabled:o,contentId:Oy(),open:l,onOpenToggle:b.useCallback(()=>u(d=>!d),[u]),children:c.jsx(Ne.div,{"data-state":Eh(l),"data-disabled":o?"":void 0,...a,ref:t})})});O0.displayName=Wl;var I0="CollapsibleTrigger",$0=b.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=kh(I0,r);return c.jsx(Ne.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Eh(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:_e(e.onClick,s.onOpenToggle)})});$0.displayName=I0;var Sh="CollapsibleContent",D0=b.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=kh(Sh,e.__scopeCollapsible);return c.jsx(Ol,{present:r||s.open,children:({present:o})=>c.jsx(bT,{...n,ref:t,present:o})})});D0.displayName=Sh;var bT=b.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...o}=e,i=kh(Sh,r),[a,l]=b.useState(n),u=b.useRef(null),d=ft(t,u),h=b.useRef(0),p=h.current,f=b.useRef(0),w=f.current,y=i.open||a,x=b.useRef(y),v=b.useRef(void 0);return b.useEffect(()=>{const g=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(g)},[]),ir(()=>{const g=u.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const m=g.getBoundingClientRect();h.current=m.height,f.current=m.width,x.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(n)}},[i.open,n]),c.jsx(Ne.div,{"data-state":Eh(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!y,...o,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:y&&s})});function Eh(e){return e?"open":"closed"}var _T=O0,kT=$0,ST=D0,ET=b.createContext(void 0);function CT(e){const t=b.useContext(ET);return e||t||"ltr"}var qt="Accordion",jT=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ch,NT,TT]=Gv(qt),[Kl,SA]=no(qt,[TT,P0]),jh=P0(),L0=R.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,o=n;return c.jsx(Ch.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?c.jsx(OT,{...o,ref:t}):c.jsx(PT,{...s,ref:t})})});L0.displayName=qt;var[M0,RT]=Kl(qt),[F0,AT]=Kl(qt,{collapsible:!1}),PT=R.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,l]=Il({prop:r,defaultProp:n??"",onChange:s,caller:qt});return c.jsx(M0,{scope:e.__scopeAccordion,value:R.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:R.useCallback(()=>o&&l(""),[o,l]),children:c.jsx(F0,{scope:e.__scopeAccordion,collapsible:o,children:c.jsx(B0,{...i,ref:t})})})}),OT=R.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...o}=e,[i,a]=Il({prop:r,defaultProp:n??[],onChange:s,caller:qt}),l=R.useCallback(d=>a((h=[])=>[...h,d]),[a]),u=R.useCallback(d=>a((h=[])=>h.filter(p=>p!==d)),[a]);return c.jsx(M0,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:c.jsx(F0,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(B0,{...o,ref:t})})})}),[IT,Gl]=Kl(qt),B0=R.forwardRef((e,t)=>
176{const{__scopeAccordion:r,disabled:n,dir:s,orientation:o="vertical",...i}=e,a=R.useRef(null),l=ft(a,t),u=NT(r),h=CT(s)==="ltr",p=_e(e.onKeyDown,f=>{var N;if(!jT.includes(f.key))return;const w=f.target,y=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),x=y.findIndex(A=>A.ref.current===w),v=y.length;if(x===-1)return;f.preventDefault();let g=x;const m=0,_=v-1,k=()=>{g=x+1,g>_&&(g=m)},S=()=>{g=x-1,g<m&&(g=_)};switch(f.key){case"Home":g=m;break;case"End":g=_;break;case"ArrowRight":o==="horizontal"&&(h?k():S());break;case"ArrowDown":o==="vertical"&&k();break;case"ArrowLeft":o==="horizontal"&&(h?S():k());break;case"ArrowUp":o==="vertical"&&S();break}const E=g%v;(N=y[E].ref.current)==null||N.focus()});return c.jsx(IT,{scope:r,disabled:n,direction:s,orientation:o,children:c.jsx(Ch.Slot,{scope:r,children:c.jsx(Ne.div,{...i,"data-orientation":o,ref:l,onKeyDown:n?void 0:p})})})}),ul="AccordionItem",[$T,Nh]=Kl(ul),U0=R.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,o=Gl(ul,r),i=RT(ul,r),a=jh(r),l=Oy(),u=n&&i.value.includes(n)||!1,d=o.disabled||e.disabled;return c.jsx($T,{scope:r,open:u,disabled:d,triggerId:l,children:c.jsx(_T,{"data-orientation":o.orientation,"data-state":K0(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:h=>{h?i.onItemOpen(n):i.onItemClose(n)}})})});U0.displayName=ul;var q0="AccordionHeader",z0=R.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Gl(qt,r),o=Nh(q0,r);return c.jsx(Ne.h3,{"data-orientation":s.orientation,"data-state":K0(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})});z0.displayName=q0;var id="AccordionTrigger",V0=R.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Gl(qt,r),o=Nh(id,r),i=AT(id,r),a=jh(r);return c.jsx(Ch.ItemSlot,{scope:r,children:c.jsx(kT,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...n,ref:t})})});V0.displayName=id;var H0="AccordionContent",W0=R.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Gl(qt,r),o=Nh(H0,r),i=jh(r);return c.jsx(ST,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});W0.displayName=H0;function K0(e){return e?"open":"closed"}var DT=L0,LT=U0,MT=z0,G0=V0,Q0=W0;const FT=DT,J0=b.forwardRef(({className:e,...t},r)=>c.jsx(LT,{ref:r,className:lr("border-b",e),...t}));J0.displayName="AccordionItem";const Y0=b.forwardRef(({className:e,children:t,...r},n)=>c.jsx(MT,{className:"flex",children:c.jsxs(G0,{ref:n,className:lr("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,c.jsx(uh,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Y0.displayName=G0.displayName;const X0=b.forwardRef(({className:e,children:t,...r},n)=>c.jsx(Q0,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:c.jsx("div",{className:lr("pb-4 pt-0",e),children:t})}));X0.displayName=Q0.displayName;const Z0=()=>{var e;(e=document.getElementById("scanner"))==null||e.scrollIntoView({behavior:"smooth"})},BT=()=>{var e;(e=document.getElementById("bdb-section"))==null||e.scrollIntoView({behavior:"smooth"})},UT=()=>c.jsx("section",{className:"bg-navy py-20 md:py-28 relative",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6 flex",children:[c.jsx("div",{className:"w-1.5 bg-green-dark rounded-full shrink-0 mr-8 hidden md:block"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-green-light text-sm font-semibold tracking-widest uppercase mb-6",children:"BASTIDORES DO BANCO · MINI DIAGNÃSTICO FINANCEIRO GRATUITO"}),c.jsxs("h1",{className:"text-3xl md:text-5xl font-extrabold leading-tight mb-4",children:[c.jsx("span",{className:"text-primary-foreground",children:"O banco já decidiu sobre sua empresa."}),c.jsx("br",{}),c.jsx("span",{className:"text-green-light",children:"Você sabe o que ele viu?"})]}),c.jsx("p",{className:"text-blue-light text-lg md:text-xl leading-relaxed max-w-2xl mb-8",children:"Em 3 minutos, descubra como o sistema financeiro realmente enxerga sua empresa e o que está travando seu acesso ao crédito que você precisa."}),c.jsx("button",{onClick:BT,className:"bg-green-dark text-[#ffffff] font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg",children:"Entender como o BDB funciona"})]})]})}),qT=[{big:"3 min",small:"para o resultado"},{big:"5",small:"perguntas"},{big:"100%",small:"gratuito"},{big:"Lógica",small:"bancária real"}],zT=()=>c.jsx("section",{className:"bg-green-dark py-6",children:c.jsx("div",{className:"container max-w-5xl mx-auto px-6 grid grid-cols-2 md:grid-cols-4 gap-6 text-center",children:qT.map(e=>c.jsxs("div",{children:[c.jsx("p",{className:"text-[#ffffff] text-2xl md:text-3xl font-extrabold",children:e.big}),c.jsx("p",{className:"text-[#ffffff]/80 text-sm",children:e.small})]},e.big))})}),VT=["Você pediu crédito e foi recusado sem uma explicação real","Você nem tentou porque achava que não ia passar","Você conseguiu mas pagou uma taxa absurda porque era o que tinha","Você não sabe se sua empresa está financeiramente forte ou frágil aos olhos do banco","Você tem um contador mas ele nunca te falou o que o banco realmente analisa"],HT=()=>c.jsx("section",{className:"py-20 md:py-28 bg-background",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6",children:[c.jsxs("h2",{className:"text-2xl md:text-4xl font-bold text-navy leading-tight mb-6",children:["Sua empresa fatura. Paga impostos. Gera empregos.",c.jsx("br",{className:"hidden md:block"})," E ainda assim o banco diz não."]}),c.jsx("p",{className:"text-muted-foreground text-lg mb-8 leading-relaxed",children:"Não é azar. Não é falta de relacionamento. à que o banco analisa sua empresa por um critério que ninguém te explicou, e você foi sem saber o que ele precisava ver."}),c.jsx("ul",{className:"space-y-4",children:VT.map(e=>c.jsxs("li",{className:"flex items-start gap-3",children:[c.jsx("span",{className:"mt-1.5 w-2.5 h-2.5 rounded-full bg-destructive shrink-0"}),c.jsx("span",{className:"text-foreground",children:e})]},e))})]})}),WT=()=>c.jsx("section",{className:"py-20 md:py-28 bg-background",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-navy text-center mb-3",children:"O custo de ir ao banco sem preparo"}),c.jsx("p",{className:"text-muted-foreground text-center text-lg mb-12 max-w-3xl mx-auto leading-relaxed",children:"A diferença entre uma operação bem estruturada e uma mal estruturada não é só a aprovação â é o quanto você paga ao longo do contrato."}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[c.jsxs("div",{className:"rounded-lg border-2 border-destructive bg-pill-red-bg p-8",children:[c.jsx("h3",{className:"text-xl font-bold text-destructive mb-6",children:"â Sem preparo"}),c.jsxs("div",{className:"space-y-3 text-foreground",children:[c.jsxs("p",{children:[c.jsx("span",{className:"font-semibold",children:"Operação:"})," R$ 300.000"]}),c.jsxs("p",{children:[c.jsx("span",{className:"font-semibold",children:"Taxa:"})," 3% ao mês"]}),c.jsxs("p",{children:[c.jsx("span",{className:"font-semibold",children:"Prazo:"})," 48 meses"]}),c.jsx("p",{className:"text-2xl font-extrabold text-destructive pt-2",children:"Total pago: R$ 589.741"})]}),c.jsx("p",{className:"mt-4 text-sm font-medium text-pill-red-text",children:"Comum para quem chega despreparado"})]}),c.jsxs("div",{className:"rounded-lg border-2 border-green-dark bg-pill-green-bg p-8",children:[c.jsx("h3",{className:"text-xl font-bold text-green-dark mb-6",children:"â
Com estruturação correta"}),c.jsxs("div",{className:"space-y-3 text-foreground",children:[c.jsxs("p",{children:[c.jsx("span",{className:"font-semibold",children:"Operação:"})," R$ 300.000"]}),c.jsxs("p",{children:[c.jsx("span",{className:"font-semibold",children:"Taxa:"})," 1,5% ao mês"]}),c.jsxs("p",{children:[c.jsx("span",{className:"font-semibold",children:"Prazo:"})," 48 meses"]}),c.jsx("p",{className:"text-2xl font-extrabold text-green-dark pt-2",children:"Total pago: R$ 435.227"})]}),c.jsx("p",{className:"mt-4 text-sm font-medium text-pill-green-text",children:"PossÃvel para quem chega preparado"})]})]}),c.jsx("div",{className:"bg-navy rounded-lg p-8 text-center mb-6",children:c.jsxs("p",{className:"text-primary-foreground text-lg md:text-xl font-semibold leading-relaxed",children:["Diferença de R$ 154.514 no mesmo contrato.",c.jsx("br",{className:"hidden md:block"})," O primeiro passo para chegar preparado é saber onde você está hoje."]})}),c.jsxs("div",{className:"text-center",children:[c.jsx("button",{onClick:Z0,className:"bg-green-dark text-[#ffffff] font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg",children:"Fazer meu Mini Diagnóstico. à grátis"}),c.jsx("p",{className:"text-muted-foreground text-xs mt-4",children:"Simulação ilustrativa. Condições reais variam conforme perfil, instituição e momento de mercado."})]})]})}),KT=()=>c.jsx("section",{className:"bg-navy py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-primary-foreground mb-6",children:"O que o banco vê e que ninguém te conta"}),c.jsx("p",{className:"text-blue-light text-lg leading-relaxed mb-6",children:"Depois de 15 anos do lado de quem aprova crédito, em bancos que atendem empresas de médio e grande porte, aprendi uma coisa: o empresário e o banco falam lÃnguas diferentes."}),c.jsxs("p",{className:"text-blue-light text-lg leading-relaxed mb-6",children:["O banco não olha só o faturamento. Ele olha a"," ",c.jsx("strong",{className:"text-primary-foreground",children:"margem operacional"}),", a"," ",c.jsx("strong",{className:"text-primary-foreground",children:"geração de caixa"}),", o"," ",c.jsx("strong",{className:"text-primary-foreground",children:"peso da dÃvida atual"})," e a"," ",c.jsx("strong",{className:"text-primary-foreground",children:"concentração dos clientes"}),"."]}),c.jsx("p",{className:"text-primary-foreground font-bold text-lg leading-relaxed",children:"O Mini Diagnóstico Financeiro calcula tudo isso em 3 minutos, do jeito que o banco calcula internamente."})]})}),GT=[{title:"Você foi recusado no banco",desc:"Quer entender o que o banco viu e o que precisa corrigir para ser aprovado na próxima tentativa."},{title:"Você quer crescer e precisa de crédito",desc:"Antes de ir ao banco, quer saber se está preparado e como se apresentar para ter mais chance de aprovação."},{title:"Você não sabe onde está",desc:"Sua empresa funciona, mas você nunca teve uma leitura financeira do ponto de vista de quem aprova crédito."},{title:"Você suspeita que tem problema",desc:"Algo no financeiro não fecha direito e você quer saber, antes do banco, se é um sinal de alerta real."}],QT=()=>c.jsx("section",{className:"bg-surface-warm py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-navy text-center mb-12",children:"Para quem é o Mini Diagnóstico"}),c.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:GT.map(e=>c.jsx("div",{className:"bg-background border border-border rounded-lg p-6",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("span",{className:"mt-1.5 w-3 h-3 rounded-full bg-green-dark shrink-0"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-semibold text-navy mb-1",children:e.title}),c.jsx("p",{className:"text-muted-foreground",children:e.desc})]})]})}
176,e.title))})]})}),JT=[{num:"1",title:"Responda 5 perguntas sobre sua empresa",desc:"Faturamento, lucro, dÃvidas, clientes. Você sabe as respostas de cabeça. Sem abrir planilha, DRE ou balanço."},{num:"2",title:"O motor calcula seu score financeiro",desc:"O sistema aplica os mesmos pesos que um analista bancário usa: margem, dÃvida, concentração, histórico. Resultado instantâneo."},{num:"3",title:"Você recebe sua leitura financeira completa",desc:"Score de 1 a 10, classificação da empresa, os fatores que mais pesaram e uma estimativa inicial de quanto crédito sua operação parece suportar."}],YT=()=>c.jsx("section",{className:"bg-surface-warm py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-navy text-center mb-3",children:"Como funciona"}),c.jsx("p",{className:"text-muted-foreground text-center text-lg mb-12",children:"Simples, rápido e sem precisar de nenhum documento."}),c.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:JT.map(e=>c.jsxs("div",{children:[c.jsx("div",{className:"w-12 h-12 rounded-md bg-green-dark text-[#ffffff] flex items-center justify-center text-xl font-bold mb-4",children:e.num}),c.jsx("h3",{className:"text-lg font-semibold text-navy mb-2",children:e.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.desc})]},e.num))})]})}),XT=[{title:"Seu score bancário inicial",desc:"Como o sistema financeiro classifica sua empresa hoje, de estrutura forte a alto risco."},{title:"O que está te travando",desc:"Os fatores que mais pesaram negativamente na sua análise e que o banco vai questionar."},{title:"Sua estimativa de crédito",desc:"Uma faixa inicial do quanto sua operação parece conseguir acessar com base nos seus indicadores."},{title:"Seu próximo passo",desc:"O que você precisa fazer: melhorar antes de ir ao banco ou já está pronto para buscar crédito."}],ZT=()=>c.jsx("section",{className:"py-20 md:py-28 bg-background",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-navy text-center mb-3",children:"O que você vai descobrir"}),c.jsx("p",{className:"text-muted-foreground text-center text-lg mb-12",children:"Em 3 minutos você terá respostas que seu contador nunca te deu e que o banco nunca vai te dar."}),c.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:XT.map(e=>c.jsxs("div",{className:"bg-background border border-border rounded-lg p-6 border-l-4 border-l-green-dark",children:[c.jsx("h3",{className:"text-lg font-semibold text-navy mb-2",children:e.title}),c.jsx("p",{className:"text-muted-foreground",children:e.desc})]},e.title))})]})}),eR=[{q:"à realmente gratuito? O que vem depois?",a:"Sim, completamente gratuito. Sem cartão, sem cadastro prévio, sem compromisso. Depois do resultado, se quiser aprofundar o diagnóstico com documentos reais e ter alguém estruturando sua operação, existe um próximo passo disponÃvel. Mas não é obrigatório."},{q:"Preciso de documentos ou planilhas para responder?",a:"Não. O Mini Diagnóstico foi desenhado para ser respondido com informações que você já sabe de cabeça â faturamento, parcelas, retirada mensal. Sem abrir nenhum documento."},{q:"O resultado é preciso ou é só uma estimativa?",a:"O resultado usa a mesma lógica que um analista bancário aplica internamente â com pesos reais para margem, endividamento, restrições e tempo de empresa. à uma leitura orientativa baseada em dados declarados, não uma análise documental completa. Para isso existe o Diagnóstico completo."},{q:"Por que confiar no método?",a:"O Mini Diagnóstico foi construÃdo por alguém que passou 15 anos dentro de bancos gerenciando carteiras Middle Market e atuando em comitês de crédito. Não é teoria de livro â é a lógica que o sistema usa aplicada do lado do empresário."},{q:"Minha empresa é pequena. Isso serve para mim?",a:"O diagnóstico foi desenhado para empresas que faturam a partir de R$ 50 mil por mês. Se sua empresa está nessa faixa, os indicadores calculados são relevantes para qualquer banco ou instituição que você queira acessar."}],tR=()=>c.jsx("section",{className:"py-20 md:py-28 bg-background",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-navy text-center mb-10",children:"Perguntas frequentes"}),c.jsx(FT,{type:"single",collapsible:!0,className:"space-y-3",children:eR.map((e,t)=>c.jsxs(J0,{value:`faq-${t}`,className:"border border-border rounded-lg px-6",children:[c.jsx(Y0,{className:"text-navy font-semibold text-left",children:e.q}),c.jsx(X0,{className:"text-muted-foreground leading-relaxed",children:e.a})]},t))})]})}),rR=()=>c.jsxs("section",{className:"bg-navy py-20 md:py-28 relative",children:[c.jsxs("div",{className:"container max-w-3xl mx-auto px-6 text-center",children:[c.jsxs("h2",{className:"text-2xl md:text-4xl font-bold leading-tight mb-6",children:[c.jsx("span",{className:"text-primary-foreground",children:"Descubra agora como o banco "}),c.jsx("span",{className:"text-green-light",children:"realmente enxerga sua empresa."})]}),c.jsx("p",{className:"text-blue-light text-lg leading-relaxed max-w-2xl mx-auto mb-8",children:"Gratuito. Sem cadastro. Resultado em 3 minutos. A única pergunta é: você prefere saber agora ou descobrir na hora da recusa?"}),c.jsx("button",{onClick:Z0,className:"bg-green-dark text-[#ffffff] font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg",children:"Fazer meu Mini Diagnóstico Financeiro agora"}),c.jsx("p",{className:"text-blue-light/60 text-sm mt-4",children:"Mais de 15 anos de experiência bancária destilados em 3 minutos."})]}),c.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1.5 bg-green-dark"})]}),nR=()=>c.jsx("footer",{className:"bg-background border-t border-border py-8",children:c.jsx("div",{className:"container max-w-4xl mx-auto px-6",children:c.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed text-center",children:"Os resultados do Mini Diagnóstico são baseados exclusivamente nas informações declaradas pelo usuário e têm caráter orientativo. Não substituem uma análise documental completa nem constituem oferta ou garantia de crédito. Bastidores do Banco â Assessoria de Crédito Corporativo."})})}),sR=()=>c.jsx("section",{id:"bdb-section",className:"py-20 md:py-28 bg-background",children:c.jsxs("div",{className:"container max-w-[680px] mx-auto px-6 text-center",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-navy mb-8",children:"Por que o Bastidores do Banco existe"}),c.jsx("p",{className:"text-muted-foreground text-base leading-relaxed mb-6",children:"O empresário brasileiro não perde crédito por falta de mérito. Perde porque o banco analisa a empresa por critérios que ninguém explica, e o empresário chega sem saber o que o sistema vai encontrar."}),c.jsx("p",{className:"text-muted-foreground text-base leading-relaxed mb-8",children:"O Bastidores do Banco nasceu para fechar esse gap. Somos uma assessoria de crédito corporativo com visão de quem esteve 15 anos do lado de dentro, nos maiores bancos do Brasil, entendendo o que o analista realmente olha antes de dizer sim ou não."}),c.jsx("p",{className:"text-green-dark text-lg md:text-xl font-bold",children:'"Seu gerente trabalha para o banco. Nós trabalhamos para você dentro dele."'})]})}),oR=()=>c.jsx("section",{className:"bg-navy py-20 md:py-28",children:c.jsx("div",{className:"container max-w-5xl mx-auto px-6",children:c.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-start gap-10",children:[c.jsx("img",{src:"/felipe-franklin.jpg",alt:"Felipe Franklin, Fundador do Bastidores do Banco",className:"w-full max-w-[380px] md:w-[380px] rounded-md object-cover shrink-0"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-green-light text-xs font-semibold tracking-widest uppercase mb-4",children:"QUEM ESTà POR TRÃS DO DIAGNÃSTICO"}),c.jsx("p",{className:"text-primary-foreground text-2xl md:text-3xl font-bold mb-1",children:"Felipe Franklin"}),c.jsx("p",{className:"text-green-light font-semibold mb-6",children:"Assessor de Crédito Corporativo · Especialista em Middle Market"}),c.jsx("p",{className:"text-blue-light text-base leading-relaxed mb-4",children:"Passei 15 anos dentro dos maiores bancos do Brasil, Sicoob Credicom e Itaú Unibanco. Gerenciei carteiras Middle Market com volume superior a R$ 150 milhões e atuei ativamente em comitês de crédito, apresentando análises completas do quadro societário, cenário econômico-financeiro e defendendo operações junto aos decisores."}),c.jsx("p",{className:"text-blue-light text-base leading-relaxed mb-8",children:"Hoje uso esse conhecimento a favor do empresário. Sei exatamente o que o analista precisa ver para dizer sim, quais indicadores pesam mais na decisão e como estruturar uma operação antes de qualquer conversa com o banco."}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[c.jsxs("div",{className:"bg-primary-foreground
176/10 rounded-md px-5 py-3 text-center",children:[c.jsx("p",{className:"text-primary-foreground font-bold text-lg",children:"15 anos"}),c.jsx("p",{className:"text-blue-light text-sm",children:"dentro dos maiores bancos do Brasil"})]}),c.jsxs("div",{className:"bg-primary-foreground/10 rounded-md px-5 py-3 text-center",children:[c.jsx("p",{className:"text-primary-foreground font-bold text-lg",children:"R$ 150MM+"}),c.jsx("p",{className:"text-blue-light text-sm",children:"carteira Middle Market gerenciada"})]}),c.jsxs("div",{className:"bg-primary-foreground/10 rounded-md px-5 py-3 text-center",children:[c.jsx("p",{className:"text-primary-foreground font-bold text-lg",children:"Sicoob + Itaú"}),c.jsx("p",{className:"text-blue-light text-sm",children:"comitês de crédito"})]})]})]})]})})}),iR=()=>c.jsxs("main",{children:[c.jsx(UT,{}),c.jsx(zT,{}),c.jsx(sR,{}),c.jsx(oR,{}),c.jsx(HT,{}),c.jsx(WT,{}),c.jsx(KT,{}),c.jsx(QT,{}),c.jsx(YT,{}),c.jsx(ZT,{}),c.jsx(yT,{}),c.jsx(tR,{}),c.jsx(rR,{}),c.jsx(nR,{})]}),aR="https://pay.kiwify.com.br/5rsScdH";function nm({children:e,className:t=""}){return c.jsx("a",{href:aR,target:"_blank",rel:"noopener noreferrer",className:`inline-block font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg text-center text-white ${t}`,style:{backgroundColor:"#0F6E56"},children:e})}function bo({question:e,answer:t}){const[r,n]=b.useState(!1);return c.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[c.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center justify-between px-6 py-5 text-left bg-background hover:bg-muted/50 transition-colors",children:[c.jsx("span",{className:"font-semibold pr-4",style:{color:"#0D2137"},children:e}),c.jsx(uh,{className:`w-5 h-5 text-muted-foreground flex-shrink-0 transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"px-6 pb-5 text-muted-foreground leading-relaxed",children:t})]})}const lR=[{title:"Como você recebe suas vendas?",desc:"Determina quais linhas de crédito estão disponÃveis para o seu perfil e quais estão fechadas antes mesmo da análise começar."},{title:"Qual o prazo médio que você dá aos seus clientes?",desc:"Revela o ciclo de caixa da operação e a qualidade dos recebimentos como eventual garantia."},{title:"Você tem imóvel ou veÃculo no nome da empresa?",desc:"Define o nÃvel de risco que o banco assume e as condições que ele pode oferecer na operação."},{title:"Qual o volume total da sua dÃvida bancária atual?",desc:"Calcula o comprometimento real do caixa antes de qualquer nova parcela entrar."},{title:"Sua receita é recorrente ou oscila todo mês?",desc:"Mede a previsibilidade do caixa e o apetite da instituição pela operação."},{title:"Você tem imposto parcelado?",desc:"Um dos maiores redutores de crédito no sistema. O banco vê isso antes de você sentar na frente do gerente."}],cR=[{icon:$k,title:"Score BDB detalhado",desc:"Classificação técnica da sua empresa na visão bancária, de estrutura crÃtica a alta robustez."},{icon:Dk,title:"O que está pesando",desc:"Todos os indicadores abaixo do esperado, ordenados por impacto, em linguagem clara."},{icon:Ik,title:"Como o banco lê sua empresa",desc:"O parecer que um analista escreveria sobre o seu negócio com base nos dados declarados."},{icon:Ok,title:"Capacidade estimada de crédito",desc:"Uma faixa inicial do quanto sua operação parece conseguir acessar com base nos seus indicadores."},{icon:Pk,title:"Perfil de operação indicado",desc:"Quais linhas fazem mais sentido para o seu momento: giro, investimento, subsidiadas ou antecipação."},{icon:Ak,title:"Próximo passo claro",desc:"O que fazer agora: melhorar antes de ir ao banco ou já está preparado para buscar crédito."}],uR=[{title:"Você quer chegar ao banco preparado",desc:"Antes de qualquer reunião com gerente, você quer saber o que o sistema vai ver e o que pode travar sua operação."},{title:"Você já foi ao banco e saiu sem resposta",desc:"Uma negativa sem explicação real. O Scanner mostra o que o banco provavelmente encontrou."},{title:"Você quer entender sua capacidade real de crédito",desc:"Não um chute. Uma estimativa calculada com os mesmos indicadores que o analista usa."},{title:"Você precisa de um diagnóstico antes de decidir",desc:"Expandir, contratar, investir. Qualquer decisão que depende de capital precisa começar aqui."}];function dR(){return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("div",{className:"w-full h-[3px]",style:{backgroundColor:"#5DCAA5"}}),c.jsx("section",{style:{backgroundColor:"#0D2137"},className:"py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6 text-center",children:[c.jsx("p",{className:"text-sm uppercase tracking-widest font-semibold mb-6",style:{color:"#5DCAA5"},children:"Bastidores do Banco · Scanner Financeiro"}),c.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold leading-tight mb-2 text-white",children:"O Mini mostrou o panorama."}),c.jsx("p",{className:"text-3xl md:text-5xl font-extrabold leading-tight mb-8",style:{color:"#5DCAA5"},children:"O Scanner entra nos detalhes que o banco realmente analisa."}),c.jsx("p",{className:"text-lg md:text-xl leading-relaxed max-w-2xl mx-auto mb-10",style:{color:"#93B0C8"},children:"O banco não aprova com 5 informações. Ele quer saber como você recebe, quem são seus clientes, o que você tem de garantia, quanto deve ao governo e qual a sua margem real. O Scanner faz exatamente isso."}),c.jsx(nm,{className:"w-full md:w-auto",children:"Quero meu Scanner Financeiro · R$ 97"}),c.jsx("p",{className:"text-sm mt-4",style:{color:"#93B0C8"},children:"Resultado instantâneo. Sem documentos. Sem espera. Garantia de 7 dias."})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-white",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-4",style:{color:"#0D2137"},children:"O que o analista pergunta antes de abrir seu dossiê"}),c.jsx("p",{className:"text-center mb-12 max-w-2xl mx-auto",style:{color:"#6B7280"},children:"Antes de avaliar qualquer operação, o sistema financeiro já respondeu essas perguntas sobre sua empresa. O Scanner responde todas elas com você, com a mesma lógica que o banco usa internamente."}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:lR.map(e=>c.jsxs("div",{className:"rounded-lg p-6 border-l-4",style:{backgroundColor:"#F4F1EB",borderLeftColor:"#5DCAA5"},children:[c.jsx("h3",{className:"font-bold text-lg mb-2",style:{color:"#0D2137"},children:e.title}),c.jsx("p",{style:{color:"#6B7280"},className:"leading-relaxed",children:e.desc})]},e.title))})]})}),c.jsx("section",{className:"py-20 md:py-24",style:{backgroundColor:"#F4F1EB"},children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-4",style:{color:"#0D2137"},children:"O que você recebe ao final"}),c.jsx("p",{className:"text-center mb-12 max-w-2xl mx-auto",style:{color:"#6B7280"},children:"Não é um número. à um diagnóstico completo com lógica bancária real."}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:cR.map(e=>c.jsxs("div",{className:"bg-white rounded-lg p-6 shadow-sm",children:[c.jsx(e.icon,{className:"w-8 h-8 mb-4",style:{color:"#5DCAA5"}}),c.jsx("h3",{className:"font-bold text-lg mb-2",style:{color:"#0D2137"},children:e.title}),c.jsx("p",{style:{color:"#6B7280"},className:"leading-relaxed",children:e.desc})]},e.title))})]})}),c.jsx("section",{style:{backgroundColor:"#0D2137"},className:"py-20 md:py-24",children:c.jsx("div",{className:"container max-w-5xl mx-auto px-6",children:c.jsxs("div",{className:"flex flex-col md:flex-row gap-10 items-center",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("img",{src:"/felipe-franklin.jpg",alt:"Felipe Franklin",className:"w-64 h-80 md:w-80 md:h-[400px] object-cover rounded-xl"})}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-white mb-2",children:"Quem construiu o Scanner"}),c.jsx("p",{className:"text-xl font-bold text-white mb-1",children:"Felipe Franklin"}),c.jsx("p",{className:"text-sm font-semibold mb-6",style:{color:"#5DCAA5"},children:"Assessor de Crédito Corporativo · Especialista em Middle Market"}),c.jsx("p",{className:"leading-relaxed mb-4",style:{color:"#93B0C8"},children:"Passei 15 anos dentro dos maiores bancos do Brasil, Sicoob Credicom e Itaú Unibanco. Gerenciei carteiras Middle Market com volume superior a R$ 150 milhões e atuei em comitês de crédito apresentando análises completas e defendendo operações."}),c.jsx("p",{className:"leading-relaxed mb-6",style:{color:"#93B0C8"},children:"Aprendi o que o banco realmente analisa antes de dizer sim ou não. O Scanner existe para que você chegue a qualquer reunião sabendo o que o analista vai ver antes mesmo de você abrir a boca."}),c.jsx("p",{className:"text-lg font-semibold mb-8",style:{color:"#5DCAA5"},children:'"Seu gerente trabalha para o banco. Nós trabalhamos para você dentro dele."'}),c.jsx("div",{className:"flex flex-wrap gap-3",children:["15 anos · dentro dos maiores bancos do Brasil","R$ 150MM+ · carteira Middle Market gerenciada","Sicoob Credicom + Itaú Unibanco · comitês de crédito"].map(e=>c.jsx("span",{className:"text-xs font-semibold px-4 py-2 rounded-full border",style:{color:"#5DCAA5",borderColor:"#5DCAA5"},children:e},e))})]})]})})}),c.jsx("section",{className:"py-20 md:py-24 bg-white",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-4",style:{color:"#0D2137"},children:"O custo de chegar despreparado ao banco"}),c.jsx("p",{className:"text-center mb-12 max-w-2xl mx-auto",style:{color:"#6B7280"},children:"A diferença não é só a aprovação. à o quanto você paga pelo mesmo dinheiro ao longo do contrato."}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:[c.jsxs("div",{className:"rounded-xl p-6 border-2",style:{backgroundColor:"#FEF2F2",borderColor:"#EF4444"},children:[c.jsx("h3",{className:"font-bold text-lg mb-4",style:{color:"#0D2137"},children:"Sem diagnóstico prévio"}),c.jsxs("div",{className:"space-y-2 mb-4",style:{color:"#374151"},children:[c.jsx("p",{children:"Operação: R$ 300.000"}),c.jsx("p",{children:"Taxa média: 3% ao mês"}),c.jsx("p",{children:"Prazo: 48 meses"}),c.jsx("p",{className:"font-bold text-xl",children:"Total pago: R$ 589.741"})]}),c.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full",style:{backgroundColor:"#FEE2E2",color:"#991B1B"},children:"Comum para quem chega sem preparo"})]}),c.jsxs("div",{className:"rounded-xl p-6 border-2",style:{backgroundColor:"#F0FDF4",borderColor:"#22C55E"},children:[c.jsx("h3",{className:"font-bold text-lg mb-4",style:{color:"#0D2137"},children:"Com Scanner Financeiro"}),c.jsxs("div",{className:"space-y-2 mb-4",style:{color:"#374151"},children:[c.jsx("p",{children:"Operação: R$ 300.000"}),c.jsx("p",{children:"Taxa possÃvel: 1,5% ao mês"}),c.jsx("p",{children:"Prazo: 48 meses"}),c.jsx("p",{className:"font-bold text-xl",children:"Total pago: R$ 435.227"})]}),c.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full",style:{backgroundColor:"#DCFCE7",color:"#166534"},children:"Para quem chega sabendo o que o banco vai ver"})]})]}),c.jsxs("div",{className:"rounded-xl p-6 text-center",style:{backgroundColor:"#0D2137"},children:[c.jsx("p",{className:"text-lg md:text-xl font-bold text-white mb-2",children:"Diferença de R$ 154.514 no mesmo contrato. O Scanner custa R$ 97. A conta é simples."}),c.jsx("p",{className:"text-xs",style:{color:"#93B0C8"},children:"Simulação ilustrativa. Condições reais variam conforme perfil, instituição e momento de mercado."})]})]})}),c.jsx("section",{className:"py-20 md:py-24",style:{backgroundColor:"#F4F1EB"},children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-12",style:{color:"#0D2137"},children:"O Scanner é para você se..."}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:uR.map(e=>c.jsxs("div",{className:"bg-white rounded-lg p-6 shadow-sm",children:[c.jsx("h3",{className:"font-bold text-lg mb-2",style:{color:"#0D2137"},children:e.title}),c.jsx("p",{style:{color:"#6B7280"},className:"leading-relaxed",children:e.desc})]},e.title))})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-white",children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-10",style:{color:"#0D2137"},children:"Perguntas frequentes"}),c.jsxs("div",{className:"space-y-4",children:[c.jsx(bo,{question:"O Scanner substitui uma análise com documentos?",answer:"Não. O Scanner usa dados declarados para entregar uma leitura inicial com lógica bancária real. Para uma análise completa com documentos, existe o Crédito Estruturado BDB, o próximo passo para quem quer estruturar uma operação de crédito de verdade."}),c.jsx(bo,{question:"Preciso ter feito o Mini Diagnóstico antes?",answer:"O Mini Diagnóstico é o ponto de partida recomendado. O Scanner aprofunda com 9 perguntas adicionais sobre garantias, recebimento e concentração de clientes, entregando um diagnóstico muito mais completo."}),c.jsx(bo,{question:"O resultado é instantâneo?",answer:"Sim. Assim que você responder as perguntas o resultado aparece na tela. Sem espera, sem envio de documentos, sem c
176ontato prévio."}),c.jsx(bo,{question:"Por que R$ 97?",answer:"Porque o conhecimento por trás do Scanner levou 15 anos para ser construÃdo dentro dos bancos. E porque R$ 97 é menos do que uma hora de consultoria financeira genérica e entrega muito mais do que isso."}),c.jsx(bo,{question:"Tem garantia?",answer:"Sim. 7 dias de garantia. Se não ficar satisfeito devolvemos 100% do valor, sem perguntas."})]})]})}),c.jsx("section",{style:{backgroundColor:"#0D2137"},className:"py-20 md:py-24",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6 text-center",children:[c.jsx("h2",{className:"text-2xl md:text-4xl font-bold text-white mb-2",children:"Você já deu o primeiro passo."}),c.jsx("p",{className:"text-2xl md:text-4xl font-bold mb-6",style:{color:"#5DCAA5"},children:"O Scanner é onde começa o trabalho real."}),c.jsx("p",{className:"mb-8",style:{color:"#93B0C8"},children:"Resultado instantâneo. Sem documentos. Sem espera."}),c.jsx(nm,{className:"w-full md:w-auto text-xl py-5",children:"Quero meu Scanner Financeiro · R$ 97"}),c.jsx("p",{className:"text-sm mt-4",style:{color:"#93B0C8"},children:"Garantia de 7 dias. Pagamento seguro via Kiwify."})]})})]})}const ad=[{key:"p7",question:"Como você recebe suas vendas?",subtitle:"Pode marcar mais de um.",multi:!0,options:[{label:"A",text:"Maquininha de cartão",value:"maquininha"},{label:"B",text:"Boleto bancário",value:"boleto"},{label:"C",text:"PIX",value:"pix"},{label:"D",text:"Transferência",value:"transferencia"},{label:"E",text:"Outros",value:"outros"}]},{key:"p8",question:"Se vende a prazo: qual o prazo médio que você dá ao cliente?",options:[{label:"A",text:"Não vendo a prazo",value:"nao_prazo"},{label:"B",text:"Até 30 dias",value:"ate_30"},{label:"C",text:"30 a 90 dias",value:"30_90"},{label:"D",text:"Acima de 90 dias",value:"acima_90"}]},{key:"p9",question:"Tem imóvel no nome da empresa ou dos sócios?",options:[{label:"A",text:"Sim, quitado",value:"quitado"},{label:"B",text:"Sim, financiado",value:"financiado"},{label:"C",text:"Não tenho",value:"nao"}]},{key:"p10",question:"Tem veÃculos, máquinas ou equipamentos relevantes?",options:[{label:"A",text:"Sim, próprios e quitados",value:"quitados"},{label:"B",text:"Sim, ainda financiados",value:"financiados"},{label:"C",text:"Não tenho",value:"nao"}]},{key:"p11",question:"Qual é o saldo total aproximado de dÃvida bancária hoje?",options:[{label:"A",text:"Não tenho",value:"nao"},{label:"B",text:"Até R$ 100 mil",value:"ate_100k"},{label:"C",text:"R$ 100 mil a R$ 500 mil",value:"100k_500k"},{label:"D",text:"Acima de R$ 500 mil",value:"acima_500k"}]},{key:"p12",question:"Sua empresa tem imposto parcelado?",options:[{label:"A",text:"Não",value:"nao"},{label:"B",text:"Sim, parcela até R$ 2 mil/mês",value:"ate_2k"},{label:"C",text:"Sim, parcela de R$ 2 mil a R$ 10 mil/mês",value:"2k_10k"},{label:"D",text:"Sim, parcela acima de R$ 10 mil/mês",value:"acima_10k"}]},{key:"p13",question:"Sua empresa tem contrato fixo ou receita recorrente previsÃvel?",options:[{label:"A",text:"Sim",value:"sim"},{label:"B",text:"Não",value:"nao"}]},{key:"p14",question:"Qual é o objetivo principal do crédito que você busca?",options:[{label:"A",text:"Capital de giro",value:"giro"},{label:"B",text:"Compra de equipamento",value:"equipamento"},{label:"C",text:"Expansão",value:"expansao"},{label:"D",text:"Substituição de dÃvida cara",value:"substituicao"},{label:"E",text:"Outro",value:"outro"}]},{key:"p15",question:"Você depende de poucos clientes para manter seu faturamento?",options:[{label:"A",text:"Sim, 1 ou 2 clientes respondem por mais da metade do que faturamos",value:"1_2"},{label:"B",text:"Sim, entre 3 e 5 clientes grandes",value:"3_5"},{label:"C",text:"Não, tenho uma carteira diversificada",value:"diversificada"}]}],da=ad.length,Th={ate_50k:35e3,"50k_150k":1e5,"150k_500k":325e3,"500k_1M":75e4,acima_1M:12e5},Rh={ate_5k:2500,"5k_15k":1e4,"15k_30k":22500,acima_30k:35e3},Ah={nenhuma:0,ate_5k:3500,"5k_10k":7500,"10k_15k":12500,"15k_20k":17500,acima_20k:25e3},Ph={nao:0,ate_2k:1500,"2k_10k":6e3,acima_10k:15e3};function hR(e,t){if(!e||!t)return 1;const r=Th[e]||25e3,s=(Rh[t]||2500)/r*100;return s>20?10:s>=10?7:s>=5?4:1}function fR(e,t,r){if(!e)return 9;const n=Th[e]||35e3,s=Ah[t||""]||0,o=Ph[r||""]||0,i=(s+o)/n*100;return i<=10?9:i<=20?7:i<=30?5:i<=50?3:1}function pR(e){return!e||e==="nao"?10:e==="ate_2k"?4:e==="2k_10k"?2:1}function mR(e){return e==="sim"?10:3}function gR(e){return!e||e==="nao"?10:e==="ate_100k"?7:e==="100k_500k"?4:1}function vR(e){return e==="restricao_financeira"||e==="imposto_atrasad
176o"||e==="ambos"?1:10}function yR(e){return e==="1_2"?1:e==="3_5"?5:10}function xR(e){if(!e)return 5;const t=e.split(","),r=t.includes("boleto");return t.length>=3?10:r?8:5}function wR(e,t){return e==="quitado"?10:e==="financiado"?7:t==="quitados"?5:t==="financiados"?4:1}const bR={menos_1:2,"1_2":4,"2_5":7,mais_5:10};function _R(e,t,r,n,s,o,i,a,l,u,d,h){const p=Th[e||""]||35e3,f=Rh[n||""]||2500,w=Ah[s||""]||0,y=Ph[u||""]||0,x=Math.round(f/p*100),v=Math.round((w+y)/p*100),g=[{name:"Pressão da dÃvida",score:fR(e,s,u),weight:.2,text:`Suas parcelas mensais e obrigações fiscais comprometem aproximadamente ${v}% do seu faturamento. Bancos consideram saudável até 10% e preocupante acima de 30%.`},{name:"Margem operacional",score:hR(e,n),weight:.2,text:`A relação entre o que você retira e o faturamento indica margem de ${x}%. Abaixo de 5% é sinal de alerta para o comitê de crédito.`},{name:"Restrição financeira",score:vR(r),weight:.15,text:"Restrições ativas impedem a análise na maioria das instituições antes mesmo de avaliar o mérito da operação."},{name:"Concentração de clientes",score:yR(h),weight:.15,text:"Dependência de poucos clientes representa risco de receita para o banco. Se o cliente principal sair, as obrigações continuam."},{name:"Tipo de recebimento",score:xR(o),weight:.15,text:"Recebimento concentrado em meios de difÃcil antecipação reduz as opções de garantia e as linhas disponÃveis para o perfil."},{name:"Garantias insuficientes",score:wR(i,a),weight:.15,text:"Ausência de garantias reais limita o acesso a linhas mais baratas e aumenta o risco percebido pela instituição."},{name:"Imposto parcelado",score:pR(u),weight:0,text:"Parcelamento de impostos sinaliza dificuldade de caixa no passado. O banco vê isso antes de qualquer análise."},{name:"Receita não recorrente",score:mR(d),weight:0,text:"Receita variável dificulta a previsão de caixa futuro. O banco prefere empresas com fluxo previsÃvel para calcular capacidade de pagamento."},{name:"DÃvida bancária alta",score:gR(l),weight:0,text:"Volume elevado de dÃvida bancária existente reduz o espaço para novas operações. O banco calcula o comprometimento total antes de oferecer mais crédito."},{name:"Tempo de empresa",score:bR[t||""]??5,weight:0,text:"Empresas com menos de 2 anos têm histórico limitado para análise. O banco precisa de mais dad
176os para calcular o risco com precisão."}],m=g.reduce((_,k)=>_+k.score*k.weight,0);return{total:Math.round(m*10)/10,indicators:g}}function ex(e){return e==="restricao_financeira"||e==="imposto_atrasado"||e==="ambos"}function kR(e,t,r,n,s,o,i,a){if(ex(n))return{credit:0,caixaComprometido:!1};const l=Rh[t||""]||2500,u=Ah[r||""]||0,d=Ph[o||""]||0,h=u+d,p=l/1.5;if(h>=p)return{credit:0,caixaComprometido:!0};const f=p-h,w=.025,x=(1-Math.pow(1+w,-24))/w;let v=f*x;return o&&o!=="nao"&&(v*=.8),s==="acima_500k"&&(v*=.7),i==="nao"&&(v*=.9),a==="1_2"&&(v*=.85),{credit:Math.round(v),caixaComprometido:!1}}function ha(e){return e.toLocaleString("pt-BR",{style:"currency",currency:"BRL",minimumFractionDigits:0,maximumFractionDigits:0})}function SR(e,t){return t?"Situação crÃtica":e>=8.5?"Alta robustez":e>=7?"Boa estrutura":e>=5?"Estrutura moderada":e>=3?"Estrutura frágil":"Situação crÃtica"}function ER(e,t){return t||e<3?"text-red-500":e>=7?"text-[#5DCAA5]":e>=5?"text-yellow-400":"text-orange-400"}function CR(e,t){return t||e<3?"Nesse momento, uma instituição financeira identificaria restrições que inviabilizariam a análise antes mesmo de avaliar o mérito da operação.":e>=8.5?"Sua empresa apresenta indicadores sólidos. Uma instituição financeira tenderia a analisar sua operação com interesse.":e>=7?"Sua empresa tem uma base relevante. Há pontos que podem ser fortalecidos antes de avançar para uma operação.":e>=5?"Sua empresa tem potencial, mas alguns indicadores precisam de atenção. Ir ao banco sem isso ajustado pode gerar registros negativos no seu histórico.":"Seu perfil apresenta fragilidades que uma instituição financeira identificaria antes mesmo de avaliar o mérito da operação."}function jR(e,t){return t||e<3?"Seu resultado indica restrições que precisam ser resolvidas antes de qualquer operação de crédito. Mas toda situação tem um caminho de saÃda. O Scanner Financeiro entrega um mapa com o que precisa ser regularizado, em qual ordem priorizar e o que esperar em cada etapa. Nossa equipe passou 15 anos dentro das instituições financeiras e conhece como cada tipo de restrição é tratada no sistema.":e>=8.5?"Sua empresa está bem posicionada para crédito. O Scanner Financeiro aprofunda esse diagnóstico e identifica qual tipo de operação faz mais sentido para o seu perfil entre nossas instituições bancárias parceiras. Nossa equipe é liderada por especialistas que passaram 15 anos dentro dos bancos, do outro lado da mesa. Sabemos como o comitê de crédito analisa uma operação e como apresentar sua empresa da melhor forma possÃvel.":e>=7?"Sua empresa tem um perfil relevante para crédito. O Scanner Financeiro detalha o que ainda pesa no seu diagnóstico e mapeia o caminho mais estruturado até uma operação. Trabalhamos com uma rede de instituições bancárias parceiras e nossa equipe é liderada por especialistas com 15 anos de experiência dentro dos bancos. Sabemos qual instituição tem apetite para cada perfil e como apresentar uma operação do jeito certo.":e>=5?"Sua empresa tem potencial para crédito, mas alguns pontos precisam de atenção antes de avançar. Ir ao banco sem isso resolvido pode gerar uma negativa que fica registrada no seu histórico e dificulta operações futuras. O Scanner Financeiro mostra o que está pesando e qual tipo de operação faz sentido para o seu momento. Nossa equipe viveu 15 anos dentro dos bancos e conhece cada critério que entra na análise.":"Seu resultado mostra que há pontos importantes a organizar antes de buscar crédito. Avançar agora sem esse preparo pode comprometer operações futuras. O Scanner Financeiro mapeia o que precisa ser ajustado e em quanto tempo sua empresa estará em melhor posição. Nossa equipe passou 15 anos analisando empresas dentro das instituições financeiras."}function NR(e){return{giro:"Capital de giro",equipamento:"Aquisição de equipamento",expansao:"Expansão",substituicao:"Substituição de dÃvida",outro:"Outro"}[e||""]||"Não informado"}function TR(e,t){return t||e<5?"vermelho":e<7?"amarelo":"verde"}const Dc=[{id:"not_ready",text:"Não estou pronto para tomar crédito ainda",type:"message",response:"Faz sentido. Quando quiser entender o que falta para estar pronto, a gente está aqui."},{id:"own_bank",text:"Prefiro resolver pelo meu banco de relacionamento",type:"message",response:"Seu gerente não vota no comitê de crédito. Quem aprova é o analista, e ele vê apenas o que chega documentado. Se mudar de ideia, a gente está aqui."},{id:"doubts_docs",text:"Tenho dúvidas sobre o envio de documentos e os custos",type:"form",response:""},{id:"understand_more",text:"Quero entender melhor antes de decidir",type:"form",response:""},{id:"other",text:"Outro motivo",type:"form_open",response:""}];function RR(){var kt;const[e]=X1(),t=e.get("id"),[r,n]=b.useState(!0),[s,o]=b.useState(null),[i,a]=b.useState(!1),[l,u]=b.useState(0),[d,h]=b.useState({}),[p,f]=b.useState([]),[w,y]=b.useState("loading"),[x,v]=b.useState(null),[g,m]=b.useState(!1),[_,k]=b.useState(!1),S=b.useRef(!1),[E,N]=b.useState(null),[A,O]=b.useState(null),[q,D]=b.useState(null),[H,$]=b.useState({nome:"",whatsapp:"",texto:""}),[X,W]=b.useState(!1),[K,C]=b.useState(!1),[T,L]=b.useState(!1);b.useEffect(()=>{if(!t){a(!0),y("notfound"),n(!1);return}(async()=>{const{data:I,error:ee}=await On.from("mini_leads").select("id, nome, whatsapp, email, p1, p2, p3, p4, p5").eq("id",t).single();ee||!I?(a(!0),y("notfound")):(o(I),y("quiz")),n(!1)})()},[t]),b.useEffect(()=>{if(w!=="result"||g||S.current)return;const I=Pe=>
176{Pe.clientY<=0&&!S.current&&!g&&(S.current=!0,k(!0))},ee=()=>{!S.current&&!g&&(S.current=!0,k(!0),window.history.pushState(null,"",window.location.href))};return document.addEventListener("mouseleave",I),window.history.pushState(null,"",window.location.href),window.addEventListener("popstate",ee),()=>{document.removeEventListener("mouseleave",I),window.removeEventListener("popstate",ee)}},[w,g]);const z=ad[l],B=Math.round(l/da*100),Y=()=>{if(l>0){const I=ad[l-1];I.multi&&d[I.key]?f(d[I.key].split(",")):f([]),u(l-1)}},Z=I=>{const ee=z.key,Pe={...d,[ee]:I};h(Pe),l<da-1?u(l+1):re(Pe)},ve=I=>{f(ee=>ee.includes(I)?ee.filter(Pe=>Pe!==I):[...ee,I])},Te=()=>{if(p.length===0)return;const I=z.key,ee={...d,[I]:p.join(",")};h(ee),f([]),l<da-1?u(l+1):re(ee)},re=async I=>{if(!s)return;const ee=s.p1,Pe=s.p2,bn=s.p3,Ir=s.p4,fr=s.p5,Ni=I.p7||null,_n=I.p9||null,Ti=I.p10||null,Ht=I.p11||null,Ri=I.p12||null,Ai=I.p13||null,Ve=I.p15||null,Wt=ex(bn),{total:kn,indicators:Ql}=_R(ee,Pe,bn,Ir,fr,Ni,_n,Ti,Ht,Ri,Ai,Ve),$r=SR(kn,Wt),{credit:Sn,caixaComprometido:Pi}=kR(ee,Ir,fr,bn,Ht,Ri,Ai,Ve),En=NR(I.p14||null),Dr=TR(kn,Wt);v({score:kn,classificacao:$r,trava:Wt,credit:Sn,caixaComprometido:Pi,indicators:Ql,perfil:En}),y("result");try{await On.from("mini_leads").update({p7:I.p7||null,p8:I.p8||null,p9:I.p9||null,p10:I.p10||null,p11:I.p11||null,p12:I.p12||null,p13:I.p13||null,p14:I.p14||null,p15:I.p15||null,score_scanner:kn,classificacao_scanner:$r,credito_scanner:Sn>0?ha(Sn):"Sem capacidade",perfil_operacao:En,prioridade:Dr,scanner_completo:!0}).eq("id",s.id)}catch(Oi){console.error("Erro ao atualizar lead:",Oi)}fetch("https://ltqbfzmrvvrlzcifftxr.supabase.co/functions/v1/send-alert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({evento:"scanner",lead:{nome:s.nome,whatsapp:s.whatsapp,email:s.email,score_scanner:kn,classificacao_scanner:$r,credito_scanner:Sn>0?ha(Sn):"Sem capacidade",perfil_operacao:En}})}).catch(()=>{})},ur=async()=>{if(!s||!x)return;m(!0);try{await On.from("mini_leads").update({solicitou_contato:!0,contato_at:new Date().toISOString()}).eq("id",s.id)}catch(ee){console.error("Erro ao registrar contato:",ee)}const I=encodeURIComponent(`Olá, fiz o Scanner Financeiro do Bastidores do Banco. Meu score foi ${x.score.toFixed(1)} (${x.classificacao}). Gostaria de falar com um especialista.`);window.open(`https://wa.me/5531991836492?text=${I}`,"_blank")},zt=I=>{N(I.id),I.type==="message"?(O(I.response),D(null)):(O(null),D(I.type))},dr=async()=>{var ee;if(!H.nome||!H.whatsapp||!s)return;const I=E==="other"?`Outro: ${H.texto}`:((ee=Dc.find(Pe=>Pe.id===E))==null?void 0:ee.text)||"";try{await On.from("mini_leads").update({objecao:I,solicitou_contato:!0}).eq("id",s.id)}catch(Pe){console.error(Pe)}W(!0)},Vt=async()=>{if(!t){L(!0);return}try{const{error:I}=await On.from("mini_leads").update({solicitou_contato:!0,contato_at:new Date().toISOString()}).eq("id",t);if(I){L(!0);return}C(!0),fetch("https://ltqbfzmrvvrlzcifftxr.supabase.co/functions/v1/send-alert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({evento:"especialista",lead:{nome:s==null?void 0:s.nome,whatsapp:s==null?void 0:s.whatsapp,email:s==null?void 0:s.email,score_scanner:x==null?void 0:x.score,credito_scanner:(x==null?void 0:x.credit)!=null&&x.credit>0?ha(x.credit):"Sem capacidade"}})}).catch(()=>{})}catch{L(!0)}};if(r||w==="loading")return c.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"#0D2137"},children:c.jsx("p",{className:"text-lg",style:{color:"#93B0C8"},children:"Carregando..."})});if(w==="notfound")return c.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"#0D2137"},children:c.jsxs("div",{className:"text-center max-w-md px-6",children:[c.jsx("h1",{className:"text-2xl font-bold text-white mb-4",children:"Parece que você ainda não fez o Mini Diagnóstico."}),c.jsx("p",{className:"mb-8",style:{color:"#93B0C8"},children:"Ele é o primeiro passo."}),c.jsx("a",{href:"/",className:"inline-block font-semibold px-8 py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white",style:{backgroundColor:"#0F6E56"},children:"Fazer o Mini Diagnóstico"})]})});if(w==="quiz")return c.jsx("div",{className:"min-h-screen",style:{backgroundColor:"#0D2137"},children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6 py-16",children:[l===0&&s&&c.jsxs("div",{className:"text-center mb-10",children:[c.jsx("p",{style:{color:"#5DCAA5"},className:"text-sm uppercase tracking-widest font-semibold mb-3",children:"Scanner Financeiro"}),c.jsxs("h1",{className:"text-2xl md:text-3xl font-bold text-white mb-2",children:["Olá, ",s.nome.split(" ")[0],". Vamos aprofundar seu diagnóstico."]}),c.jsx("p",{style:{color:"#93B0C8"},children:"Agora vamos aprofundar a análise com perguntas adicionais."})]}),c.jsxs("div",{className:"mb-8",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsxs("span",{className:"text-sm",style:{color:"#93B0C8"},children:["Pergunta ",l+1," de ",da]}),c.jsxs("span",{className:"text-sm",style:{color:"#5DCAA5"},children:[B,"%"]})]}),c.jsx("div",{className:"w-full h-2 rounded-full",style:{backgroundColor:"rgba(255,255,255,0.1)"},children:c.jsx("div",{className:"h-2 rounded-full transition-all duration-300",style:{width:`${B}%`,backgroundColor:"#0F6E56"}})})]}),c.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[c.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"#0D2137"},children:z.question}),z.subtitle&&c.jsx("p",{className:"text-sm mb-4",style:{color:"#6B7280"},children:z.subtitle}),z.multi?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"space-y-3 mt-4",children:z.options.map(I=>{const ee=p.includes(I.value);return c.jsxs("button",{onClick:()=>
176ve(I.value),className:`w-full text-left px-5 py-4 rounded-lg border-2 transition-all font-medium ${ee?"border-[#0F6E56] bg-[#F0FDF9]":"border-gray-200 bg-gray-50 hover:border-[#0F6E56] hover:bg-[#F0FDF9]"}`,style:{color:"#0D2137"},children:[c.jsx("span",{className:"inline-flex items-center justify-center w-8 h-8 rounded-full text-sm font-bold mr-3 text-white",style:{backgroundColor:ee?"#5DCAA5":"#0F6E56"},children:ee?"â":I.label}),I.text]},I.value)})}),c.jsx("button",{onClick:Te,disabled:p.length===0,className:"mt-6 w-full font-semibold py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white disabled:opacity-40",style:{backgroundColor:"#0F6E56"},children:"Continuar"}),l>0&&c.jsx("button",{onClick:Y,className:"mt-4 w-full text-center text-sm font-medium py-2 transition-opacity hover:opacity-70",style:{color:"#93B0C8"},children:"â Voltar"})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"space-y-3 mt-4",children:z.options.map(I=>{const ee=d[z.key]===I.value;return c.jsxs("button",{onClick:()=>Z(I.value),className:`w-full text-left px-5 py-4 rounded-lg border-2 transition-all font-medium ${ee?"border-[#0F6E56] bg-[#F0FDF9]":"border-gray-200 bg-gray-50 hover:border-[#0F6E56] hover:bg-[#F0FDF9]"}`,style:{color:"#0D2137"},children:[c.jsx("span",{className:"inline-flex items-center justify-center w-8 h-8 rounded-full text-sm font-bold mr-3 text-white",style:{backgroundColor:ee?"#5DCAA5":"#0F6E56"},children:ee?"â":I.label}),I.text]},I.value)})}),l>
1760&&c.jsx("button",{onClick:Y,className:"mt-4 w-full text-center text-sm font-medium py-2 transition-opacity hover:opacity-70",style:{color:"#93B0C8"},children:"â Voltar"})]})]})]})});if(!x)return null;const hr=x.indicators.filter(I=>I.score<5).sort((I,ee)=>ee.weight-I.weight);return c.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"#0D2137"},children:[c.jsxs("div",{className:"container max-w-2xl mx-auto px-6 py-16",children:[c.jsx("p",{style:{color:"#5DCAA5"},className:"text-sm uppercase tracking-widest font-semibold text-center mb-3",children:"Scanner Financeiro · Resultado"}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:p-12 text-center",children:[c.jsx("p",{className:"text-sm uppercase tracking-wider mb-4 font-medium",style:{color:"#6B7280"},children:"Seu score completo"}),c.jsx("div",{className:`text-6xl md:text-7xl font-extrabold mb-2 ${ER(x.score,x.trava)}`,children:x.score.toFixed(1)}),c.jsx("p",{className:"text-sm mb-3",style:{color:"#9CA3AF"},children:"de 10"}),c.jsx("div",{className:"inline-block rounded-full px-6 py-2 mb-4 border",style:{backgroundColor:x.trava||x.score<3?"#FEF2F2":x.score>=7?"#F0FDF9":x.score>=5?"#FFFBEB":"#FFF7ED",borderColor:x.trava||x.score<3?"#FECACA":x.score>=7?"#D1FAE5":x.score>=5?"#FDE68A":"#FED7AA",color:x.trava||x.score<3?"#DC2626":x.score>=7?"#0F6E56":x.score>=5?"#D97706":"#EA580C"},children:c.jsx("span",{className:"font-semibold text-lg",children:x.classificacao})}),c.jsxs("p",{className:"text-sm",style:{color:"#6B7280"},children:["Perfil de operação: ",c.jsx("strong",{style:{color:"#0D2137"},children:x.perfil})]})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("h4",{className:"font-semibold text-lg mb-5",style:{color:"#0D2137"},children:"O que está pesando"}),hr.length>0?c.jsx("div",{className:"space-y-4",children:hr.map((I,ee)=>c.jsxs("div",{className:"flex gap-4 items-start",children:[c.jsx("span",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-red-100 text-red-600 text-sm font-bold flex items-center justify-center",children:ee+1}),c.jsxs("div",{children:[c.jsx("p",{className:"font-semibold",style:{color:"#0D2137"},children:I.name}),c.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#6B7280"},children:I.text})]})]},ee))}):c.jsx("p",{className:"leading-relaxed",style:{color:"#4B5563"},children:"Seus indicadores estão dentro das faixas esperadas pelo sistema bancário."})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("h4",{className:"font-semibold text-lg mb-3",style:{color:"#0D2137"},children:"Como o banco lê essa empresa"}),c.jsx("p",{className:"leading-relaxed",style:{color:"#4B5563"},children:CR(x.score,x.trava)})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("h4",{className:"font-semibold text-lg mb-3",style:{color:"#0D2137"},children:"Capacidade estimada de crédito"}),x.credit>0?c.jsxs("div",{className:"rounded-lg p-5",style:{backgroundColor:"#F0FDF9",border:"1px solid #D1FAE5"},children:[c.jsx("p",{className:"text-2xl font-bold mb-1",style:{color:"#0F6E56"},children:ha(x.credit)}),c.jsx("p",{className:"text-sm",style:{color:"#6B7280"},children:"Estimativa com base nos indicadores declarados e redutores aplicad
176os. Análise documental pode ajustar esse valor."})]}):x.caixaComprometido?c.jsx("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-5",children:c.jsx("p",{className:"text-orange-700 font-semibold mb-1",children:"Sua empresa está com o caixa comprometido acima da capacidade de absorver novas parcelas. O próximo passo não é buscar mais crédito. à reestruturar o que já existe."})}):c.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-5",children:[c.jsx("p",{className:"text-orange-700 font-semibold mb-1",children:"Com as restrições atuais, a capacidade de crédito não é calculada."}),c.jsx("p",{className:"text-sm",style:{color:"#6B7280"},children:"Regularize os pontos indicados para desbloquear sua estimativa."})]})]})}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsxs("div",{className:"p-8 md:px-12",children:[c.jsx("p",{className:"leading-relaxed",style:{color:"#4B5563"},children:jR(x.score,x.trava)}),x.caixaComprometido&&c.jsx("p",{className:"leading-relaxed mt-4 font-medium",style:{color:"#4B5563"},children:"Seu perfil indica necessidade de reestruturação de passivo antes de qualquer nova operação. Isso é resolvÃvel. à exatamente o tipo de situação que estruturamos."})]})}),x.score>3&&!x.trava&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"my-10",children:c.jsx("div",{className:"w-full h-[2px]",style:{backgroundColor:"#5DCAA5"}})}),c.jsxs("div",{className:"rounded-xl overflow-hidden",style:{backgroundColor:"#0D2137"},children:[c.jsxs("div",{className:"p-8 md:p-12 text-center",children:[c.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-white mb-3",children:"Você já sabe onde está. A pergunta agora é: quem vai trabalhar pela sua operação?"}),c.jsx("p",{className:"text-lg font-semibold",style:{color:"#5DCAA5"},children:"Existem três caminhos. Apenas um está do seu lado."})]}),c.jsx("div",{className:"px-6 md:px-12 pb-10",children:c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsxs("div",{className:"rounded-lg p-6 border",style:{backgroundColor:"rgba(255,255,255,0.05)",borderColor:"#EF4444"},children:[c.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:"rgba(239,68,68,0.15)"},children:c.jsx("svg",{className:"w-5 h-5",style:{color:"#EF4444"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})}),c.jsx("h4",{className:"text-white font-bold text-lg mb-2",children:"Banco tradicional"}),c.jsx("p",{className:"text-sm leading-relaxed mb-4",style:{color:"#93B0C8"},children:"Você paga entre R$ 139 e R$ 349 por mês para ter um gerente que trabalha para o banco. Ele não vota no comitê de crédito. Quem vota é o analista que nunca te viu."}),c.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full",style:{backgroundColor:"rgba(239,68,68,0.15)",color:"#EF4444"},children:"Trabalha para o banco"})]}),c.jsxs("div",{className:"rounded-lg p-6 border",style:{backgroundColor:"rgba(255,255,255,0.05)",borderColor:"#EAB308"},children:[c.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:"rgba(234,179,8,0.15)"},children:c.jsx("svg",{className:"w-5 h-5",style:{color:"#EAB308"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),c.jsx("h4",{className:"text-white font-bold text-lg mb-2",children:"Banco digital"}),c.jsx("p",{className:"text-sm leading-relaxed mb-4",style:{color:"#93B0C8"},children:"Você não paga manutenção. Mas quando precisa de crédito, fala com uma IA ou chatbot que não conhece seu negócio, seu setor nem o apetite de cada banco nesse momento."}),c.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full",style:{backgroundColor:"rgba(234,179,8,0.15)",color:"#EAB308"},children:"Não te conhece"})]}),c.jsxs("div",{className:"rounded-lg p-6 border",style:{backgroundColor:"rgba(255,255,255,0.05)",borderColor:"#5DCAA5"},children:[c.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:"rgba(93,202,165,0.15)"},children:c.jsx("svg",{className:"w-5 h-5",style:{color:"#5DCAA5"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})})}),c.jsx("h4",{className:"text-white font-bold text-lg mb-2",children:"Crédito Estruturado BDB"}),c.jsx("p",{className:"text-3xl font-bold mb-3",style:{color:"#5DCAA5"},children:"R$ 497"}),c.jsx("p",{className:"text-sm leading-relaxed mb-4",style:{color:"#93B0C8"},children:"Uma única vez. Alguém que passou 15 anos dentro dos maiores bancos do Brasil trabalhando pela sua operação. Sabemos qual banco tem apetite para o seu perfil hoje e como você precisa chegar lá."}),c.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full",style:{backgroundColor:"rgba(93,202,165,0.15)",color:"#5DCAA5"},children:"Trabalha para você"})]})]})}),c.jsxs("div",{className:"px-6 md:px-12 pb-10",children:[c.jsx("h4",{className:"text-xl font-bold text-white mb-6",children:"O que o Crédito Estruturado BDB inclui"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[{title:"Análise documental completa",desc:"Documentos contábeis e financeiros analisados com lógica bancária real."},{title:"História e contexto do negócio",desc:"Aprofundamento na trajetória da empresa, momento atual e onde quer chegar."},{title:"Cenário atual e projetado",desc:"O que o banco vai ver na análise de capacidade futura."}
176,{title:"Definição do valor e do objetivo",desc:"Quanto precisa, para que e qual estrutura faz mais sentido."},{title:"Capacidade dos sócios",desc:"Avaliação da capacidade pessoal dos sócios para amparar o risco quando necessário."},{title:"Bacen SCR e Serasa",desc:"Abertura completa do endividamento atual e consulta de restrições de mercado."},{title:"Mapeamento de recebimentos",desc:"Identificação dos meios de recebimento como garantia potencial na operação."},{title:"Conexão com instituições parceiras",desc:"Qual banco tem apetite para o seu perfil hoje, qual linha faz sentido e como estruturar a defesa da operação."}].map(I=>c.jsxs("div",{className:"flex gap-3 items-start",children:[c.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center mt-0.5",style:{backgroundColor:"rgba(93,202,165,0.2)"},children:c.jsx("svg",{className:"w-3.5 h-3.5",style:{color:"#5DCAA5"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white font-semibold text-sm",children:I.title}),c.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#93B0C8"},children:I.desc})]})]},I.title))})]}),c.jsxs("div",{className:"px-6 md:px-12 pb-10",children:[c.jsx("h4",{className:"text-xl font-bold text-white mb-6",children:"Quanto você já pagou para ter alguém que não trabalha para você?"}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[c.jsxs("div",{className:"rounded-lg p-6 border",style:{backgroundColor:"rgba(255,255,255,0.05)",borderColor:"#EF4444"},children:[c.jsx("h5",{className:"text-white font-bold mb-2",children:"Gerente do banco tradicional"}),c.jsx("p",{className:"text-sm mb-2",style:{color:"#93B0C8"},children:"12 meses x R$ 249/mês (média conta PJ banco tradicional)"}),c.jsx("p",{className:"text-2xl font-bold text-white mb-2",children:"R$ 2.988/ano"}),c.jsx("p",{className:"text-xs",style:{color:"#93B0C8"},children:"Para ter um gerente que preenche formulário e torce para dar certo."})]}),c.jsxs("div",{className:"rounded-lg p-6 border",style:{backgroundColor:"rgba(255,255,255,0.05)",borderColor:"#5DCAA5"},children:[c.jsx("h5",{className:"text-white font-bold mb-2",children:"Crédito Estruturado BDB"}),c.jsx("p",{className:"text-sm mb-2",style:{color:"#93B0C8"},children:"Uma única vez"}),c.jsx("p",{className:"text-2xl font-bold mb-2",style:{color:"#5DCAA5"},children:"R$ 497"}),c.jsx("p",{className:"text-xs",style:{color:"#93B0C8"},children:"Para ter alguém que conhece o processo por dentro trabalhando pela sua operação."})]})]}),c.jsx("div",{className:"rounded-lg p-5 text-center",style:{backgroundColor:"rgba(93,202,165,0.1)"},children:c.jsx("p",{className:"text-white font-semibold",children:"Menos do que 2 meses de manutenção de conta. Com entrega real, não esperança."})})]}),c.jsxs("div",{className:"px-6 md:px-12 pb-12 text-center",children:[c.jsx("h4",{className:"text-xl md:text-2xl font-bold text-white mb-2",children:"Seu diagnóstico está pronto. O próximo passo é estruturar sua operação."}),c.jsx("p",{className:"mb-6",style:{color:"#93B0C8"},children:"Um especialista entra em contato para apresentar o Crédito Estruturado BDB e avaliar se faz sentido para o seu momento."}),K?c.jsx("div",{className:"rounded-lg p-6",style:{backgroundColor:"rgba(93,202,165,0.15)"},children:c.jsx("p",{className:"font-semibold",style:{color:"#5DCAA5"},children:"Recebemos sua solicitação. Um especialista do BDB entra em contato em breve pelo WhatsApp cadastrado no seu diagnóstico."})}):T?c.jsx("div",{className:"rounded-lg p-6",style:{backgroundColor:"rgba(255,255,255,0.05)"},children:c.jsx("p",{style:{color:"#93B0C8"},children:"Para falar com um especialista, acesse bastidoresdobanco.com.br ou nos chame no WhatsApp."})}):c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:Vt,className:"w-full md:w-auto font-semibold px-10 py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white",style:{backgroundColor:"#0F6E56"},children:"Quero que um especialista entre em contato"}),c.jsx("p",{className:"text-sm mt-4",style:{color:"#93B0C8"},children:"Sem compromisso. Sem formulário. Usamos o contato que você já cadastrou."})]})]})]})]}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden mb-4",children:c.jsx("div",{className:"p-8 md:px-12",children:x.score>=3&&!x.trava||x.caixaComprometido?c.jsx("button",{onClick:ur,className:"w-full font-semibold py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white",style:{backgroundColor:"#0F6E56"},children:"Falar com um especialista"}):c.jsxs("div",{className:"text-center",children:[c.jsx("p",{className:"leading-relaxed mb-4",style:{color:"#4B5563"},children:"Seu mapa de saÃda está sendo preparado. Em breve nossa equipe entrará em contato com orientações especÃficas para o seu cenário."}),c.jsx("button",{onClick:ur,className:"w-full font-semibold py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white border border-gray-200 bg-gray-100",style:{color:"#0D2137"},children:"Quero falar com alguém mesmo assim"})]})})}),c.jsx("p",{className:"text-xs text-center mt-8 leading-relaxed",style:{color:"#93B0C8"},children:"Os resultados apresentados são baseados exclusivamente nas informações declaradas pelo usuário e têm caráter orientativo. Não substituem uma análise documental completa nem constituem oferta ou garantia de crédito."})]}),_&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},children:c.jsxs("div",{className:"bg-white rounded-xl shadow-2xl max-w-lg w-full mx-4 relative max-h-[90vh] overflow-y-auto",children:[c.jsx("button",{onClick:()=>k(!1),className:"absolute top-4 right-4 w-8 h-8 rounded-full flex items-center justify-center text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors",children:"â"}),c.jsx("div",{className:"p-8",children:X?c.jsxs("div",{className:"text-center py-6",children:[c.jsx("div",{className:"w-16 h-16 rounded-full mx-auto mb-4 flex items-center justify-center",style:{backgroundColor:"#F0FDF9"},children:c.jsx("span",{className:"text-2xl",children:"â"})}),c.jsx("p",{className:"font-semibold text-lg",style:{color:"#0D2137"},children:"Recebemos sua solicitação!"}),c.jsx("p",{className:"text-sm mt-2",style:{color:"#6B7280"},children:"Nossa equipe entrará em contato em breve."})]}):c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"text-xl font-bold mb-2 pr-8",style:{color:"#0D2137"},children:"Antes de ir, nos ajuda com uma coisa rápida?"}),c.jsx("p",{className:"text-sm mb-6",style:{color:"#6B7280"},children:"O que fez você não querer avançar agora?"}),E?A?c.jsx("div",{className:"rounded-lg p-5",style:{backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB"},children:c.jsx("p",{className:"leading-relaxed",style:{color:"#4B5563"},children:A})}):c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:"#F0FDF9",border:"1px solid #D1FAE5"},children:c.jsx("p",{className:"text-sm font-medium",style:{color:"#0F6E56"},children:(kt=Dc.find(I=>I.id===E))==null?void 0:kt.text})}),q==="form_open"&&c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"#374151"},children:"Conte-nos mais"}),c.jsx("textarea",{value:H.texto,onChange:I=>$({...H,texto:I.target.value}),className:"w-full px-4 py-3 rounded-lg border-2 border-gray-200 focus:outline-none focus:border-[#0F6E56] transition-colors resize-none",style:{color:"#0D2137"},rows:3,placeholder:"Escreva aqui..."})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"#374151"},children:"Nome"}),c.jsx("input",{type:"text",value:H.nome,onChange:I=>$({...H,nome:I.target.value}),className:"w-full px-4 py-3 rounded-lg border-2 border-gray-200 focus:outline-none focus:border-[#0F6E56] transition-colors",style:{color:"#0D2137"},placeholder:"Seu nome"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"#374151"},children:"WhatsApp"}),c.jsx("input",{type:"tel",value:H.whatsapp,onChange:I=>$({...H,whatsapp:I.target.value}),className:"w-full px-4 py-3 rounded-lg border-2 border-gray-200 focus:outline-none focus:border-[#0F6E56] transition-colors",style:{color:"#0D2137"},placeholder:"(11) 99999-9999"})]}),c.jsx("button",{onClick:dr,disabled:!H.nome||!H.whatsapp,className:"w-full font-semibold py-4 rounded-lg hover:opacity-90 transition-opacity text-lg text-white disabled:opacity-40",style:{backgroundColor:"#0F6E56"},children:"Quero ser contactado"})]}):c.jsx("div",{className:"space-y-3",children:Dc.map(I=>c.jsx("button",{onClick:()=>zt(I),className:"w-full text-left px-5 py-4 rounded-lg border-2 border-gray-200 bg-gray-50 hover:border-[#0F6E56] hover:bg-[#F0FDF9] transition-all font-medium text-sm",style:{color:"#0D2137"},children:I.text},I.id))})]})})]})})]})}const AR="https://tally.so/r/b5OoPe";function PR(){return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("section",{className:"bg-navy py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6 text-center",children:[c.jsx(_y,{className:"w-20 h-20 text-green-light mx-auto mb-8",strokeWidth:1.5}),c.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold text-primary-foreground leading-tight mb-4",children:"Compra confirmada!"}),c.jsx("p",{className:"text-blue-light text-lg md:text-xl leading-relaxed",children:"Seu Scanner Financeiro está em andamento."})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-surface-warm",children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6 text-center",children:[c.jsx("p",{className:"text-navy text-lg md:text-xl leading-relaxed mb-10",children:"Agora precisamos de algumas informações para calcular seu diagnóstico. Leva cerca de 5 minutos e você não vai precisar de nenhum documento â só de números que você já sabe de cabeça."}),c.jsx("a",{href:AR,target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-green-dark text-primary-foreground font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg whitespace-nowrap",children:"Preencher meu formulário agora"}),c.jsxs("p",{className:"text-muted-foreground mt-8 leading-relaxed",children:["Após o envio do formulário, você recebe seu diagnóstico em até 24 horas.",c.jsx("br",{}
176),"Qualquer dúvida fale pelo WhatsApp:"," ",c.jsx("a",{href:"https://wa.me/5531991836492",target:"_blank",rel:"noopener noreferrer",className:"text-green-dark font-semibold hover:underline",children:"(31) 99183-6492"})]})]})})]})}const sm="https://wa.me/5531991836492",OR="https://tally.so/r/b5O0Y0";function IR(){return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("section",{className:"bg-navy py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6 text-center",children:[c.jsx(_y,{className:"w-20 h-20 text-green-light mx-auto mb-8",strokeWidth:1.5}),c.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold text-primary-foreground leading-tight mb-4",children:"Ficha recebida!"}),c.jsx("p",{className:"text-blue-light text-lg md:text-xl leading-relaxed",children:"Seu Raio-X Financeiro está em andamento."})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-surface-warm",children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy text-center mb-10",children:"O que acontece agora"}),c.jsx("div",{className:"space-y-6 mb-12",children:["Verifique se os documentos estão na pasta do Google Drive que você compartilhou e se o acesso está liberado para qualquer pessoa com o link.","Assim que confirmarmos o acesso aos arquivos, seu Raio-X será entregue em até 48 horas.",c.jsxs(c.Fragment,{children:["Se precisar de ajuda fale pelo WhatsApp:"," ",c.jsx("a",{href:sm,target:"_blank",rel:"noopener noreferrer",className:"text-green-dark font-semibold hover:underline",children:"(31) 99183-6492"})," ","â resposta em até 2 horas em dias úteis."]})].map((e,t)=>c.jsxs("div",{className:"flex gap-4 items-start",children:[c.jsx("span",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-green-dark text-primary-foreground text-lg font-bold flex items-center justify-center",children:t+1}),c.jsx("p",{className:"text-navy text-lg leading-relaxed pt-1",children:e})]},t))}),c.jsxs("div",{className:"text-center",children:[c.jsx("a",{href:OR,target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-green-dark text-primary-foreground font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg whitespace-nowrap",children:"Preencher minha ficha agora"}),c.jsx("p",{className:"text-muted-foreground mt-6 leading-relaxed",children:"Leva cerca de 5 minutos. Tenha em mãos o link da pasta do Google Drive com seus documentos."})]}),c.jsx("div",{className:"text-center mt-8",children:c.jsx("a",{href:sm,target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-green-dark text-primary-foreground font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg whitespace-nowrap",children:"Falar no WhatsApp"})})]})})]})}const $R="https://pay.kiwify.com.br/6XY1kMu";function Lc({children:e,className:t=""}){return c.jsx("a",{href:$R,target:"_blank",rel:"noopener noreferrer",className:`inline-block bg-green-dark text-primary-foreground font-semibold px-8 py-4 rounded-md hover:opacity-90 transition-opacity text-lg text-center whitespace-nowrap ${t}`,children:e})}function fa({question:e,answer:t}){const[r,n]=b.useState(!1);return c.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[c.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center justify-between px-6 py-5 text-left bg-background hover:bg-muted/50 transition-colors",children:[c.jsx("span",{className:"font-semibold text-navy pr-4",children:e}),c.jsx(uh,{className:`w-5 h-5 text-muted-foreground flex-shrink-0 transition-transform ${r?"rotate-180":""}`})]}),r&&c.jsx("div",{className:"px-6 pb-5 text-muted-foreground leading-relaxed",children:t})]})}function DR(){return c.jsxs("div",{className:"min-h-screen bg-background",children:[c.jsx("section",{className:"bg-navy text-primary-foreground py-20 md:py-28",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6 text-center",children:[c.jsx("p",{className:"text-green-light text-sm uppercase tracking-widest font-semibold mb-6",children:"Bastidores do Banco · Raio-X Financeiro"}),c.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold leading-tight mb-6",children:"Você sabe exatamente o que o banco vai ver na sua empresa?"}),c.jsx("p",{className:"text-blue-light text-lg md:text-xl leading-relaxed max-w-2xl mx-auto mb-10",children:"O Raio-X Financeiro analisa 21 indicadores com base nos seus documentos reais e entrega o parecer que um analista bancário montaria sobre sua empresa, com o que está travando e o plano de correção por prioridade."}),c.jsx(Lc,{className:"w-full md:w-auto",children:"Quero meu Raio-X Financeiro · R$ 1.497"}),c.jsx("p",{className:"text-blue-light/70 text-sm mt-4",children:"Entrega em até 48 horas após o envio dos documentos."})]})}),c.jsx("section",{className:"bg-green-dark py-14",children:c.jsx("div",{className:"container max-w-4xl mx-auto px-6",children:c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 text-center text-primary-foreground",children:[{num:"21",label:"indicadores analisados"},{num:"6",label:"blocos de análise"},{num:"48h",label:"prazo de entrega"},{num:"15 anos",label:"de experiência bancária"}].map(e=>c.jsxs("div",{children:[c.jsx("p",{className:"text-4xl md:text-5xl font-extrabold mb-1",children:e.num}),c.jsx("p",{className:"text-sm opacity-90",children:e.label})]},e.label))})})}),c.jsx("section",{className:"py-20 md:py-24 bg-background",children:c.jsxs("div",{className:"container max-w-4xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy text-center mb-12",children:"O que você recebe no Raio-X"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[{title:"Score BDB 0 a 100",desc:"Sua posição financeira calculada com os mesmos critérios que os bancos usam internamente."},{title:"21 indicadores em 6 blocos",desc:"Receita, resultado, caixa, dÃvida, risco estrutural e capacidade de crédito analisados com seus números reais."},{title:"Travas identificadas",desc:"Os pontos especÃficos que estão bloqueando sua aprovação hoje e o impacto de cada um."},{title:"Capacidade real de crédito",desc:"Quanto sua empresa suporta em crédito novo calculado com fórmula financeira real, não estimativa."},{title:"Parecer bancário simulado",desc:"Como um analista descreveria sua empresa para o comitê de crédito."},{title:"Plano de correção por prioridade",desc:"O que corrigir primeiro, em qual ordem e com prazo estimado para cada ajuste."}].map(e=>c.jsxs("div",{className:"border-l-4 border-green-dark bg-surface-warm rounded-lg p-6",children:[c.jsx("h3",{className:"font-bold text-navy text-lg mb-2",children:e.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.desc})]},e.title))})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-surface-warm",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy text-center mb-12",children:"Como funciona"}),c.jsx("div",{className:"space-y-8",children:[{num:"1",title:"Você compra e preenche a ficha",desc:"Após o pagamento você recebe uma ficha com perguntas sobre sua empresa e o link para envio dos documentos pelo Google Drive. Leva cerca de 5 minutos."},{num:"2",title:"Analisamos com metodologia bancária",desc:"Calculamos os 21 indicadores com as fórmulas que os bancos usam internamente. Cada dado é marcado como validado, estimado ou não comprovado, preservando a integridade do diagnóstico."}
176,{num:"3",title:"Você recebe o relatório em até 48 horas",desc:"PDF completo com score, indicadores, travas identificadas, parecer bancário e plano de correção."}].map(e=>c.jsxs("div",{className:"flex gap-5 items-start",children:[c.jsx("span",{className:"flex-shrink-0 w-12 h-12 rounded-lg bg-green-dark text-primary-foreground text-xl font-bold flex items-center justify-center",children:e.num}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-navy text-lg mb-1",children:e.title}),c.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.desc})]})]},e.num))})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-background",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy text-center mb-10",children:"O Raio-X é para você se..."}),c.jsx("ul",{className:"space-y-5 max-w-2xl mx-auto",children:["Você fez o Scanner Financeiro e quer entender em profundidade o que está travando seu crédito.","Você quer levar um diagnóstico sério para uma reunião no banco.","Você precisa saber exatamente onde melhorar antes de buscar crédito.","Você quer entender a saúde financeira real da sua empresa com base em documentos."].map(e=>c.jsxs("li",{className:"flex gap-3 items-start",children:[c.jsx("span",{className:"flex-shrink-0 w-2.5 h-2.5 rounded-full bg-green-dark mt-2"}),c.jsx("span",{className:"text-navy text-lg leading-relaxed",children:e})]},e))})]})}),c.jsx("section",{className:"bg-navy py-20 md:py-24",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6 text-center",children:[c.jsx("div",{className:"w-20 h-20 rounded-full bg-green-dark text-primary-foreground text-2xl font-bold flex items-center justify-center mx-auto mb-8",children:"FF"}),c.jsx("blockquote",{className:"text-blue-light text-lg md:text-xl leading-relaxed italic max-w-2xl mx-auto mb-6",children:'"Trabalhei 15 anos aprovando e recusando crédito para empresas. Sei exatamente o que um analista olha, o que o preocupa e o que faz ele dizer sim. O Raio-X entrega essa leitura com base nos seus documentos reais."'}),c.jsx("p",{className:"text-green-light font-semibold",children:"Felipe Franklin â Fun
176dador, Bastidores do Banco"})]})}),c.jsx("section",{className:"bg-navy py-20 md:py-24",children:c.jsxs("div",{className:"container max-w-xl mx-auto px-6 text-center",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-primary-foreground mb-6",children:"Investimento"}),c.jsx("span",{className:"inline-block bg-green-dark/20 border border-green-dark/40 text-green-light text-sm font-semibold px-4 py-1.5 rounded-full mb-6",children:"Análise completa"}),c.jsx("p",{className:"text-5xl md:text-6xl font-extrabold text-green-light mb-4",children:"R$ 1.497"}),c.jsx("p",{className:"text-primary-foreground leading-relaxed mb-8 max-w-md mx-auto",children:"Relatório completo entregue em até 48 horas após o envio dos documentos."}),c.jsx(Lc,{className:"w-full md:w-auto",children:"Quero meu Raio-X Financeiro agora"}),c.jsx("p",{className:"text-blue-light/70 text-sm mt-4",children:"Pagamento seguro processado pela Kiwify."})]})}),c.jsx("section",{className:"py-20 md:py-24 bg-background",children:c.jsxs("div",{className:"container max-w-2xl mx-auto px-6",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy text-center mb-10",children:"Perguntas frequentes"}),c.jsxs("div",{className:"space-y-4",children:[c.jsx(fa,{question:"O que recebo após o pagamento?",answer:"Você recebe uma ficha para preencher com informações sobre sua empresa e o link para envio dos documentos pelo Google Drive. Após o envio e confirmação do acesso, o relatório é entregue em até 48 horas."}),c.jsx(fa,{question:"Quais documentos são necessários?",answer:"Aceitamos documentação contábil completa ou gerencial. A lista detalhada é enviada após a compra com base no seu perfil."}),c.jsx(fa,{question:"Qual a diferença entre o Raio-X e o Scanner Financeiro?",answer:"O Scanner Financeiro usa dados informados por você e entrega uma leitura inicial. O Raio-X analisa seus documentos reais com 21 indicadores e entrega um diagnóstico completo com parecer bancário e plano de correção."}),c.jsx(fa,{question:"E se eu não ficar satisfeito?",answer:"Entre em contato pelo WhatsApp (31) 99183-6492 e analisamos cada caso."})]})]})}),c.jsx("section",{className:"bg-navy py-20 md:py-24",children:c.jsxs("div",{className:"container max-w-3xl mx-auto px-6 text-center",children:[c.jsxs("h2",{className:"text-2xl md:text-4xl font-bold text-primary-foreground mb-4",children:["Descubra agora"," ",c.jsx("span",{className:"text-green-light",children:"o que o banco realmente vê"})," ","na sua empresa."]}),c.jsx("p",{className:"text-blue-light text-lg leading-relaxed mb-8",children:"Com base nos seus documentos. Com a lógica de quem aprova crédito há 15 anos."}),c.jsx(Lc,{className:"w-full md:w-auto",children:"Quero meu Raio-X Financeiro · R$ 1.497"})]})})]})}const LR=()=>{const e=Pl();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),c.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),c.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},MR="bdb2025",Mc="bdb_admin_auth",FR={ate_50k:"Até R$ 50 mil/mês","50k_150k":"R$ 50 mil a R$ 150 mil/mês","150k_500k":"R$ 150 mil a R$ 500 mil/mês","500k_1M":"R$ 500 mil a R$ 1 milhão/mês",acima_1M:"Acima de R$ 1 milhão/mês"},BR={menos_1:"Menos de 1 ano","1_2":"1 a 2 anos","2_5":"2 a 5 anos",mais_5:"Mais de 5 anos"},UR={financeira:"Sim, restrição financeira",imposto:"Sim, imposto atrasado",ambos:"Sim, os dois",nenhuma:"Não tem restrições"},qR={ate_5k:"Até R$ 5 mil","5k_15k":"R$ 5 mil a R$ 15 mil","15k_30k":"R$ 15 mil a R$ 30 mil",acima_30k:"Acima de R$ 30 mil"},zR={nenhuma:"Não tenho parcelas",ate_5k:"Até R$ 5 mil/mês","5k_10k":"R$ 5 mil a R$ 10 mil/mês","10k_15k":"R$ 10 mil a R$ 15 mil/mês","15k_20k":"R$ 15 mil a R$ 20 mil/mês",acima_20k:"Acima de R$ 20 mil/mês"},VR={maquininha:"Maquininha de cartão",boleto:"Boleto bancário",pix:"PIX",transferencia:"Transferência",outros:"Outros"},HR={nao_vende:"Não vende a prazo",ate_30:"Até 30 dias","30_90":"30 a 90 dias",acima_90:"Acima de 90 dias"},WR={quitado:"Sim, quitado",financiado:"Sim, financiado",nao:"Não tem"},KR={proprio_quitado:"Sim, próprios e quitados",financiado:"Sim, ainda financiados",nao:"Não tem"},GR={nao_tem:"Não tem",ate_100k:"Até R$ 100 mil","100k_500k":"R$ 100 mil a R$ 500 mil",acima_500k:"Acima de R$ 500 mil"},QR={nao:"Não",ate_2k:"Sim, até R$ 2 mil/mês","2k_10k":"Sim, R$ 2 mil a R$ 10 mil/mês",acima_10k:"Sim, acima de R$ 10 mil/mês"},JR={sim:"Sim",nao:"Não"},YR={giro:"Capital de giro",equipamento:"Compra de equipamento",expansao:"Expansão",substituicao:"Substituição de dÃvida cara",outro:"Outro"},XR={"1_2":"1 ou 2 clientes respondem por mais da metade","3_5":"Entre 3 e 5 clientes grandes",diversificada:"Carteira diversificada"},ZR={0:{ate_50k:2,"50k_150k":5,"150k_500k":7,"500k_1M":9,acima_1M:10},1:{menos_1:2,"1_2":4,"2_5":7,mais_5:10}
176,2:{restricao_financeira:1,imposto_atrasado:1,ambos:1,nenhuma:10},3:{ate_5k:2,"5k_15k":5,"15k_30k":8,acima_30k:10},4:{acima_20k:1,"15k_20k":3,"10k_15k":5,"5k_10k":7,ate_5k:9,nenhuma:10}},eA=[.15,.15,.25,.2,.25],tA=["Faturamento","Tempo de empresa","Restrição ativa","Retirada","Pressão da dÃvida"];function rA(e){const t=[e.p1,e.p2,e.p3,e.p4,e.p5],r=[];return t.forEach((n,s)=>{var i;if(!n)return;const o=((i=ZR[s])==null?void 0:i[n])||0;o<5&&r.push({name:tA[s],score:o,weight:eA[s]})}),r.sort((n,s)=>s.weight-n.weight),r}const tx={ate_50k:35e3,"50k_150k":1e5,"150k_500k":325e3,"500k_1M":75e4,acima_1M:12e5},nA={ate_5k:2500,"5k_15k":1e4,"15k_30k":22500,acima_30k:35e3},sA={nenhuma:0,ate_5k:3500,"5k_10k":7500,"10k_15k":12500,"15k_20k":17500,acima_20k:25e3},oA={menos_1:2,"1_2":4,"2_5":7,mais_5:10};function iA(e,t){if(!e||!t)return 1;const r=tx[e]||25e3,s=(nA[t]||2500)/r*100;return s>20?10:s>=10?7:s>=5?4:1}function aA(e,t){if(!e||!t)return 9;const r=tx[e]||35e3,s=(sA[t]||0)/r*100;return s<=10?9:s<=20?7:s<=30?5:s<=50?3:1}function lA(e){return e==="restricao_financeira"||e==="imposto_atrasado"||e==="ambos"?1:10}function cA(e){return e==="1_2"?1:e==="3_5"?5:10}function uA(e){if(!e)return 5;const t=e.split(",");return t.length>=3?10:t.includes("boleto")?8:5}function dA(e,t){return e==="quitado"?10:e==="financiado"?7:t==="quitados"?5:t==="financiados"?4:1}function hA(e){return[{name:"Pressão da dÃvida",score:aA(e.p1,e.p5),weight:.2},{name:"Margem operacional",score:iA(e.p1,e.p4),weight:.2},{name:"Restrição financeira",score:lA(e.p3),weight:.15},{name:"Concentração de clientes",score:cA(e.p15),weight:.15},{name:"Tipo de recebimento",score:uA(e.p7),weight:.15},{name:"Garantias disponÃveis",score:dA(e.p9,e.p10),weight:.15},{name:"Tempo de empresa",score:oA[e.p2||""]??5,weight:0}].filter(r=>r.score<5).sort((r,n)=>n.weight-r.weight)}function Xe(e,t){return t?e[t]||t:"â"}function fA(e){if(!e)return"â";const t=new Date(e),r=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),s=t.getFullYear(),o=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0");return`${r}/${n}/${s} ${o}:${i}`}function pA({p:e}){const t=e==="verde"?"#22c55e":e==="amarelo"?"#eab308":e==="vermelho"?"#ef4444":"#9ca3af";return c.jsx("span",{style:{display:"inline-block",width:12,height:12,borderRadius:"50%",backgroundColor:t}})}function om({v:e}){return c.jsx("span",{children:e?"â
":"â"})}function mA(){const[e,t]=b.useState(()=>sessionStorage.getItem(Mc)==="true"),[r,n]=b.useState(""),[s,o]=b.useState(!1),[i,a]=b.useState([]),[l,u]=b.useState(!1),[d,h]=b.useState(new Set),[p,f]=b.useState("all"),w=()=>{r===MR?(sessionStorage.setItem(Mc,"true"),t(!0),o(!1)):o(!0)},y=()=>{sessionStorage.removeItem(Mc),t(!1),n("")};b.useEffect(()=>{e&&(u(!0),On.from("mini_leads").select("*").order("created_at",{ascending:!1}).then(({data:m})=>{a(m||[]),u(!1)}))},[e]);const x=b.useMemo(()=>p==="all"?i:p==="especialista"?i.filter(m=>m.solicitou_contato):p==="scanner"?i.filter(m=>m.scanner_completo):i.filter(m=>m.prioridade===p),[i,p]),v=m=>{h(_=>{const k=new Set(_);return k.has(m)?k.delete(m):k.add(m),k})};if(!e)return c.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{background:"#F4F1EB"},children:c.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8 w-full max-w-sm",style:{color:"#0D2137"},children:[c.jsx("h1",{className:"text-2xl font-bold mb-6 text-center",children:"BDB Admin"}),c.jsx("input",{type:"password",placeholder:"Senha",value:r,onChange:m=>{n(m.target.value),o(!1)},onKeyDown:m=>m.key==="Enter"&&w(),className:"w-full border rounded-lg px-4 py-3 mb-3 text-base outline-none focus:ring-2",style:{borderColor:s?"#ef4444":"#d1d5db",focusRingColor:"#0F6E56"}}),s&&c.jsx("p",{className:"text-sm mb-3",style:{color:"#ef4444"},children:"Senha incorreta."}),c.jsx("button",{onClick:w,className:"w-full py-3 rounded-lg text-white font-semibold text-base",style:{background:"#0F6E56"},children:"Entrar"})]})});const g=[{label:"Todos",value:"all"},{label:"Solicitou especialista",value:"especialista"},{label:"Scanner completo",value:"scanner"},{label:"ð¢ Verde",value:"verde"},{label:"ð¡ Amarelo",value:"amarelo"},{label:"ð´ Vermelho",value:"vermelho"}];return c.jsxs("div",{className:"min-h-screen",style:{background:"#F4F1EB",color:"#0D2137"},children:[c.jsxs("header",{className:"flex items-center justify-between px-6 py-4 bg-white shadow-sm",children:[c.jsx("span",{className:"text-xl font-bold",style:{color:"#0D2137"},children:"BDB Admin"}),c.jsx("button",{onClick:y,className:"px-4 py-2 rounded-lg text-sm font-medium border",style:{borderColor:"#0D2137",color:"#0D2137"},children:"Sair"})]}),c.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-6",children:[c.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:g.map(m=>c.jsx("button",{onClick:()=>f(m.value),className:"px-4 py-2 rounded-full text-sm font-medium transition-colors",style:{background:p===m.value?"#0F6E56":"#fff",color:p===m.value?"#fff":"#0D2137",border:`1px solid ${p===m.value?"#0F6E56":"#d1d5db"}`},children:m.label},m.value))}),c.jsxs("p",{className:"text-sm mb-4",style:{color:"#6b7280"},children:[x.length," lead(s)"]}),l?c.jsx("p",{className:"text-center py-12",children:"Carregando..."}):x.length===0?c.jsx("p",{className:"text-center py-12",style:{color:"#6b7280"},children:"Nenhum lead encontrado."}):c.jsx("div",{className:"space-y-3",children:x.map(m=>{const _=d.has(m.id),k=m.whatsapp?`https://wa.me/55${m.whatsapp.replace(/\D/g,"")}`:null;return c.jsxs("div",{className:"bg-white rounded-xl shadow-sm overflow-hidden",children:[c.jsxs("button",{onClick:()=>v(m.id),className:"w-full text-left px-5 py-4 flex items-center gap-4 flex-wrap hover:bg-gray-50 transition-colors",children:[c.jsx(pA,{p:m.prioridade}),c.jsx("span",{className:"text-xs font-mono",style:{color:"#6b7280"},children:fA(m.created_at)}),c.jsx("span",{className:"font-semibold",children:m.nome||"â"}),k&&c.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",onClick:S=>S.stopPropagation(),className:"text-sm underline",style:{color:"#0F6E56"},children:m.whatsapp}),c.jsx("span",{className:"text-sm",style:{color:"#6b7280"},children:m.email||""}),c.jsxs("span",{className:"ml-auto flex items-center gap-3 text-xs",children:[c.jsxs("span",{children:["Scanner: ",c.jsx(om,{v:m.scanner_completo})]}),c.jsxs("span",{children:["Especialista: ",c.jsx(om,{v:m.solicitou_contato})]}),c.jsx("span",{className:"text-lg",children:_?"â²":"â¼"})]})]}),_&&c.jsxs("div",{className:"px-5 pb-5 border-t",style:{borderColor:"#e5e7eb"},children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 py-4",children:[c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs font-semibold uppercase mb-1",style:{color:"#6b7280"},children:"Resultado Mini"}),c.jsxs("p",{children:["Score: ",c.jsx("strong",{children:m.score??"â"})]}),c.jsxs("p",{children:["Classificação: ",c.jsx("strong",{children:m.classificacao||"â"})]}),c.jsxs("p",{children:["Crédito estimado: ",c.jsx("strong",{children:m.credito_estimado||"â"})]})]}),m.scanner_completo&&c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs font-semibold uppercase mb-1",style:{color:"#6b7280"},children:"Resultado Scanner"}),m.score_scanner!=null&&c.jsxs("p",{children:["Score: ",c.jsx("strong",{children:m.score_scanner})]}),m.classificacao_scanner&&c.jsxs("p",{children:["Classificação: ",c.jsx("strong",{children:m.classificacao_scanner})]}),m.credito_scanner&&c.jsxs("p",{children:["Crédito estimado: ",c.jsx("strong",{children:m.credito_scanner})]})]})]}),c.jsxs("div",{className:"py-4 border-t",style:{borderColor:"#e5e7eb"},children:[c.jsx("h4",{className:"text-xs font-semibold uppercase mb-3",style:{color:"#6b7280"},children:"O que estava pesando â Mini"}),(()=>{const S=rA(m);return S.length>0?c.jsx("div",{className:"space-y-1 text-sm",children:S.map((E,N)=>c.jsxs("p",{children:["â ï¸ ",c.jsx("strong",{children:E.name})," â Score: ",E.score,"/10"]},N))}):c.jsx("p",{className:"text-sm",style:{color:"#6b7280"},children:"Nenhum indicador abaixo de 5."})})()]}),m.scanner_completo&&c.jsxs("div",{className:"py-4 border-t",style:{borderColor:"#e5e7eb"},children:[c.jsx("h4",{className:"text-xs font-semibold uppercase mb-3",style:{color:"#6b7280"},children:"O que estava pesando â Scanner"}),(()=>{const S=hA(m);return S.length>0?c.jsx("div",{className:"space-y-1 text-sm",children:S.map((E,N)=>c.jsxs("p",{children:["â ï¸ ",c.jsx("strong",{children:E.name})," â Score: ",E.score,"/10"]},N))}):c.jsx("p",{className:"text-sm",style:{color:"#6b7280"},children:"Nenhum indicador abaixo de 5."})})()]}),c.jsxs("div",{className:"py-4 border-t",style:{borderColor:"#e5e7eb"},children:[c.jsx("h4",{className:"text-xs font-semibold uppercase mb-3",style:{color:"#6b7280"},children:"Respostas do Mini (P1âP5)"}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"P1 â Faturamento:"})," ",Xe(FR,m.p1)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P2 â Tempo de empresa:"})," ",Xe(BR,m.p2)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P3 â Restrições:"})," ",Xe(UR,m.p3)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P4 â Retirada mensal:"})," ",Xe(qR,m.p4)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P5 â Parcelas mensais:"})," ",Xe(zR,m.p5)]})]})]}),m.scanner_completo&&c.jsxs("div",{className:"py-4 border-t",style:{borderColor:"#e5e7eb"},children:[c.jsx("h4",{className:"text-xs font-semibold uppercase mb-3",style:{color:"#6b7280"},children:"Respostas do Scanner (P6âP14)"}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"P6 â Recebimento vendas:"})," ",Xe(VR,m.p7)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P7 â Prazo ao cliente:"})," ",Xe(HR,m.p8)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P8 â Imóvel:"})," ",Xe(WR,m.p9)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P9 â VeÃculos/equip.:"})," ",Xe(KR,m.p10)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P10 â DÃvida bancária:"})," ",Xe(GR,m.p11)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P11 â Imposto parcelado:"})," ",Xe(QR,m.p12)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P12 â Receita recorrente:"})," ",Xe(JR,m.p13)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P13 â Objetivo crédito:"})," ",Xe(YR,m.p14)]}),c.jsxs("p",{children:[c.jsx("strong",{children:"P14 â Concentração clientes:"})," ",Xe(XR,m.p15)]})]})]})]})]},m.id)})})]})]})}const gA=new e1,vA=()=>c.jsx(r1,{client:gA,children:c.jsxs(iC,{children:[c.jsx(xS,{}),c.jsx(R_,{}),c.jsx(Y1,{children:c.jsxs(K1,{children:[c.jsx(gr,{path:"/",element:c.jsx(iR,{})}),c.jsx(gr,{path:"/scanner",element:c.jsx(RR,{})}
176),c.jsx(gr,{path:"/scanner-venda",element:c.jsx(dR,{})}),c.jsx(gr,{path:"/obrigado",element:c.jsx(PR,{})}),c.jsx(gr,{path:"/raio-x",element:c.jsx(DR,{})}),c.jsx(gr,{path:"/obrigado-raio-x",element:c.jsx(IR,{})}),c.jsx(gr,{path:"/admin",element:c.jsx(mA,{})}),c.jsx(gr,{path:"*",element:c.jsx(LR,{})})]})})]})});Nv(document.getElementById("root")).render(c.jsx(vA,{}));
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.