vendor: 8,210 bytes, lines 1-9
1var Rh=e=>{throw TypeError(e)};var Jl=(e,t,r)=>t.has(e)||Rh("Cannot "+r);var T=(e,t,r)=>(Jl(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?Rh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),K=(e,t,r,n)=>(Jl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(Jl(e,t,"access private method"),r);var Ri=(e,t,r,n)=>({set _(s){K(e,t,s,r)},get _(){return T(e,t,n)}});function qw(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 wm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xm={exports:{}},fl={},bm={exports:{}},X={};/** 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 vi=Symbol.for("react.element"),Kw=Symbol.for("react.portal"),Gw=Symbol.for("react.fragment"),Jw=Symbol.for("react.strict_mode"),Qw=Symbol.for("react.profiler"),Yw=Symbol.for("react.provider"),Xw=Symbol.for("react.context"),Zw=Symbol.for("react.forward_ref"),e0=Symbol.for("react.suspense"),t0=Symbol.for("react.memo"),r0=Symbol.for("react.lazy"),Ph=Symbol.iterator;function n0(e){return e===null||typeof e!="object"?null:(e=Ph&&e[Ph]||e["@@iterator"],typeof e=="function"?e:null)}var km={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_m=Object.assign,Sm={};function Ys(e,t,r){this.props=e,this.context=t,this.refs=Sm,this.updater=r||km}Ys.prototype.isReactComponent={};Ys.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")};Ys.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Em(){}Em.prototype=Ys.prototype;function od(e,t,r){this.props=e,this.context=t,this.refs=Sm,this.updater=r||km}var id=od.prototype=new Em;id.constructor=od;_m(id,Ys.prototype);id.isPureReactComponent=!0;var Ah=Array.isArray,Tm=Object.prototype.hasOwnProperty,ad={current:null},Cm={key:!0,ref:!0,__self:!0,__source:!0};function jm(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)Tm.call(t,n)&&!Cm.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:vi,type:e,key:o,ref:i,props:s,_owner:ad.current}}function s0(e,t){return{$$typeof:vi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ld(e){return typeof e=="object"&&e!==null&&e.$$typeof===vi}function o0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Oh=/\/+/g;function Ql(e,t){return typeof e=="object"&&e!==null&&e.key!=null?o0(""+e.key):t.toString(36)}function da(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 vi:case Kw:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+Ql(i,0):n,Ah(s)?(r="",e!=null&&(r=e.replace(Oh,"$&/")+"/"),da(s,t,r,"",function(u){return u})):s!=null&&(ld(s)&&(s=s0(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Oh,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Ah(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+Ql(o,a);i+=da(o,t,r,l,s)}else if(l=n0(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+Ql(o,a++),i+=da(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 Pi(e,t,r){if(e==null)return e;var n=[],s=0;return da(e,n,"","",function(o){return t.call(r,o,s++)}),n}function i0(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},ha={transition:null},a0={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:ha,ReactCurrentOwner:ad};function Nm(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:Pi,forEach:function(e,t,r){Pi(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Pi(e,function(){t++}),t},toArray:function(e){return Pi(e,function(t){return t})||[]},only:function(e){if(!ld(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Ys;X.Fragment=Gw;X.Profiler=Qw;X.PureComponent=od;X.StrictMode=Jw;X.Suspense=e0;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=a0;X.act=Nm;X.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=_m({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=ad.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Tm.call(t,l)&&!Cm.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:vi,type:e.type,key:s,ref:o,props:n,_owner:i}};X.createContext=function(e){return e={$$typeof:Xw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Yw,_context:e},e.Consumer=e};X.createElement=jm;X.createFactory=function(e){var t=jm.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:Zw,render:e}};X.isValidElement=ld;X.lazy=function(e){return{$$typeof:r0,_payload:{_status:-1,_result:e},_init:i0}};X.memo=function(e,t){return{$$typeof:t0,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=ha.transition;ha.transition={};try{e()}finally{ha.transition=t}};X.unstable_act=Nm;X.useCallback=function(e,t){return qe.current.useCallback(e,t)};X.useContext=function(e){return qe.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};X.useEffect=function(e,t){return qe.current.useEffect(e,t)};X.useId=function(){return qe.current.useId()};X.useImperativeHandle=function(e,t,r){return qe.current.useImperativeHandle(e,t,r)};X.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return qe.current.useMemo(e,t)};X.useReducer=function(e,t,r){return qe.current.useReducer(e,t,r)};X.useRef=function(e){return qe.current.useRef(e)};
vendor: 6,881 bytes, lines 9-33
9X.useState=function(e){return qe.current.useState(e)};X.useSyncExternalStore=function(e,t,r){return qe.current.useSyncExternalStore(e,t,r)};X.useTransition=function(){return qe.current.useTransition()};X.version="18.3.1";bm.exports=X;var b=bm.exports;const I=wm(b),Rm=qw({__proto__:null,default:I},[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 l0=b,u0=Symbol.for("react.element"),c0=Symbol.for("react.fragment"),d0=Object.prototype.hasOwnProperty,h0=l0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f0={key:!0,ref:!0,__self:!0,__source:!0};function Pm(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)d0.call(t,n)&&!f0.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:u0,type:e,key:o,ref:i,props:s,_owner:h0.current}}fl.Fragment=c0;fl.jsx=Pm;fl.jsxs=Pm;xm.exports=fl;var c=xm.exports,Am={exports:{}},ct={},Om={exports:{}},Im={};/** 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,j){var M=C.length;C.push(j);e:for(;0<M;){var J=M-1>>>1,W=C[J];if(0<s(W,j))C[J]=j,C[M]=W,M=J;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var j=C[0],M=C.pop();if(M!==j){C[0]=M;e:for(var J=0,W=C.length,Y=W>>>1;J<Y;){var Z=2*(J+1)-1,be=C[Z],Le=Z+1,re=C[Le];if(0>s(be,M))Le<W&&0>s(re,be)?(C[J]=re,C[Le]=M,J=Le):(C[J]=be,C[Z]=M,J=Z);else if(Le<W&&0>s(re,M))C[J]=re,C[Le]=M,J=Le;else break e}}return j}function s(C,j){var M=C.sortIndex-j.sortIndex;return M!==0?M:C.id-j.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,v=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(C){for(var j=r(u);j!==null;){if(j.callback===null)n(u);else if(j.startTime<=C)n(u),j.sortIndex=j.expirationTime,t(l,j);else break;j=r(u)}}function k(C){if(v=!1,g(C),!w)if(r(l)!==null)w=!0,V(_);else{var j=r(u);j!==null&&z(k,j.startTime-C)}}function _(C,j){w=!1,v&&(v=!1,y(N),N=-1),f=!0;var M=p;try{for(g(j),h=r(l);h!==null&&(!(h.expirationTime>j)||C&&!D());){var J=h.callback;if(typeof J=="function"){h.callback=null,p=h.priorityLevel;var W=J(h.expirationTime<=j);j=e.unstable_now(),typeof W=="function"?h.callback=W:h===r(l)&&n(l),g(j)}else n(l);h=r(l)}if(h!==null)var Y=!0;else{var Z=r(u);Z!==null&&z(k,Z.startTime-j),Y=!1}return Y}finally{h=null,p=M,f=!1}}var S=!1,E=null,N=-1,A=5,O=-1;function D(){return!(e.unstable_now()-O<A)}function R(){if(E!==null){var C=e.unstable_now();O=C;var j=!0;try{j=E(!0,C)}finally{j?B():(S=!1,E=null)}}else S=!1}var B;if(typeof m=="function")B=function(){m(R)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,G=L.port2;L.port1.onmessage=R,B=function(){G.postMessage(null)}}else B=function(){x(R,0)};function V(C){E=C,S||(S=!0,B())}function z(C,j){N=x(function(){C(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){w||f||(w=!0,V(_))},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 j=3;break;default:j=p}var M=p;p=j;try{return C()}finally{p=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,j){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=p;p=C;try{return j()}finally{p=M}},e.unstable_scheduleCallback=function(C,j,M){var J=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?J+M:J):M=J,C){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=M+W,C={id:d++,callback:j,priorityLevel:C,startTime:M,expirationTime:W,sortIndex:-1},M>J?(C.sortIndex=M,t(u,C),r(l)===null&&C===r(u)&&(v?(y(N),N=-1):v=!0,z(k,M-J))):(C.sortIndex=W,t(l,C),w||f||(w=!0,V(_))),C},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(C){var j=p;return function(){var M=p;p=j;try{return C.apply(this,arguments)}finally{p=M}}}})(Im);Om.exports=Im;var p0=Om.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 m0=b,ut=p0;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 Lm=new Set,Fo={};function Hn(e,t){zs(e,t),zs(e+"Capture",t)}function zs(e,t){for(Fo[e]=t,e=0;e<t.length;e++)Lm.add(t[e])}var pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Du=Object.prototype.hasOwnProperty,g0=/^[: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]*$/,Ih={},Lh={};function y0(e){return Du.call(Lh,e)?!0:Du.call(Ih,e)?!1:g0.test(e)?Lh[e]=!0:(Ih[e]=!0,!1)}function v0(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 w0(e,t,r,n){if(t===null||typeof t>"u"||v0(e,t,r,n))return!0;
vendor: 5,200 bytes, lines 33-34
33if(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 Ke(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 Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new Ke(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new Ke(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new Ke(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new Ke(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){Ie[e]=new Ke(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new Ke(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new Ke(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new Ke(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new Ke(e,5,!1,e.toLowerCase(),null,!1,!1)});var ud=/[\-:]([a-z])/g;function cd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ud,cd);Ie[t]=new Ke(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(ud,cd);Ie[t]=new Ke(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(ud,cd);Ie[t]=new Ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new Ke(e,1,!1,e.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new Ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ie[e]=new Ke(e,1,!1,e.toLowerCase(),null,!0,!0)});function dd(e,t,r,n){var s=Ie.hasOwnProperty(t)?Ie[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(w0(t,r,s,n)&&(r=null),n||s===null?y0(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 xr=m0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ai=Symbol.for("react.element"),ds=Symbol.for("react.portal"),hs=Symbol.for("react.fragment"),hd=Symbol.for("react.strict_mode"),Mu=Symbol.for("react.profiler"),$m=Symbol.for("react.provider"),Dm=Symbol.for("react.context"),fd=Symbol.for("react.forward_ref"),Uu=Symbol.for("react.suspense"),Fu=Symbol.for("react.suspense_list"),pd=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),Mm=Symbol.for("react.offscreen"),$h=Symbol.iterator;function lo(e){return e===null||typeof e!="object"?null:(e=$h&&e[$h]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,Yl;function bo(e){if(Yl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Yl=t&&t[1]||""}return` 34`+Yl+e}var Xl=!1;function Zl(e,t){if(!e||Xl)return"";Xl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 16,752 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),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{Xl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?bo(e):""}function x0(e){switch(e.tag){case 5:return bo(e.type);case 16:return bo("Lazy");case 13:return bo("Suspense");case 19:return bo("SuspenseList");case 0:case 2:case 15:return e=Zl(e.type,!1),e;case 11:return e=Zl(e.type.render,!1),e;case 1:return e=Zl(e.type,!0),e;default:return""}}function Bu(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 hs:return"Fragment";case ds:return"Portal";case Mu:return"Profiler";case hd:return"StrictMode";case Uu:return"Suspense";case Fu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Dm:return(e.displayName||"Context")+".Consumer";case $m:return(e._context.displayName||"Context")+".Provider";case fd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pd:return t=e.displayName||null,t!==null?t:Bu(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return Bu(e(t))}catch{}}return null}function b0(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 Bu(t);case 8:return t===hd?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Um(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k0(e){var t=Um(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 Oi(e){e._valueTracker||(e._valueTracker=k0(e))}function Fm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Um(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ja(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 zu(e,t){var r=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Dh(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=on(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 Bm(e,t){t=t.checked,t!=null&&dd(e,"checked",t,!1)}function Wu(e,t){Bm(e,t);var r=on(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")?Hu(e,t.type,r):t.hasOwnProperty("defaultValue")&&Hu(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mh(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 Hu(e,t,r){(t!=="number"||ja(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ko=Array.isArray;function Ss(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=""+on(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 Vu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Uh(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:on(r)}}function zm(e,t){var r=on(t.value),n=on(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 Fh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Wm(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 qu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ii,Hm=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(Ii=Ii||document.createElement("div"),Ii.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ii.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Co={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},_0=["Webkit","ms","Moz","O"];Object.keys(Co).forEach(function(e){_0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Co[t]=Co[e]})});function Vm(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Co.hasOwnProperty(e)&&Co[e]?(""+t).trim():t+"px"}function qm(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Vm(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var S0=me({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 Ku(e,t){if(t){if(S0[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 Gu(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 Ju=null;function md(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qu=null,Es=null,Ts=null;function Bh(e){if(e=bi(e)){if(typeof Qu!="function")throw Error(P(280));var t=e.stateNode;t&&(t=vl(t),Qu(e.stateNode,e.type,t))}}function Km(e){Es?Ts?Ts.push(e):Ts=[e]:Es=e}function Gm(){if(Es){var e=Es,t=Ts;if(Ts=Es=null,Bh(e),t)for(e=0;e<t.length;e++)Bh(t[e])}}function Jm(e,t){return e(t)}function Qm(){}var eu=!1;function Ym(e,t,r){if(eu)return e(t,r);eu=!0;try{return Jm(e,t,r)}finally{eu=!1,(Es!==null||Ts!==null)&&(Qm(),Gm())}}function zo(e,t){var r=e.stateNode;if(r===null)return null;var n=vl(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 Yu=!1;if(pr)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Yu=!1}function E0(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 jo=!1,Na=null,Ra=!1,Xu=null,T0={onError:function(e){jo=!0,Na=e}};function C0(e,t,r,n,s,o,i,a,l){jo=!1,Na=null,E0.apply(T0,arguments)}function j0(e,t,r,n,s,o,i,a,l){if(C0.apply(this,arguments),jo){if(jo){var u=Na;jo=!1,Na=null}else throw Error(P(198));Ra||(Ra=!0,Xu=u)}}function Vn(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 Xm(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 zh(e){if(Vn(e)!==e)throw Error(P(188))}function N0(e){var t=e.alternate;if(!t){if(t=Vn(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 zh(s),e;if(o===n)return zh(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 Zm(e){return e=N0(e),e!==null?eg(e):null}function eg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=eg(e);if(t!==null)return t;e=e.sibling}return null}var tg=ut.unstable_scheduleCallback,Wh=ut.unstable_cancelCallback,R0=ut.unstable_shouldYield,P0=ut.unstable_requestPaint,we=ut.unstable_now,A0=ut.unstable_getCurrentPriorityLevel,gd=ut.unstable_ImmediatePriority,rg=ut.unstable_UserBlockingPriority,Pa=ut.unstable_NormalPriority,O0=ut.unstable_LowPriority,ng=ut.unstable_IdlePriority,pl=null,Xt=null;function I0(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(pl,e,void 0,(e.current.flags&128)===128)}catch{}}var $t=Math.clz32?Math.clz32:D0,L0=Math.log,$0=Math.LN2;function D0(e){return e>>>=0,e===0?32:31-(L0(e)/$0|0)|0}var Li=64,$i=4194304;function _o(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 Aa(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=_o(a):(o&=i,o!==0&&(n=_o(o)))}else i=r&~s,i!==0?n=_o(i):o!==0&&(n=_o(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-$t(t),s=1<<r,n|=e[r],t&=~s;return n}function M0(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 U0(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-$t(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=M0(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Zu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function sg(){var e=Li;return Li<<=1,!(Li&4194240)&&(Li=64),e}function tu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function wi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$t(t),e[t]=r}function F0(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-$t(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function yd(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-$t(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ne=0;function og(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ig,vd,ag,lg,ug,ec=!1,Di=[],Qr=null,Yr=null,Xr=null,Wo=new Map,Ho=new Map,Mr=[],B0="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 Hh(e,t){switch(e){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Yr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":Wo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function co(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=bi(t),t!==null&&vd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function z0(e,t,r,n,s){switch(t){case"focusin":return Qr=co(Qr,e,t,r,n,s),!0;case"dragenter":return Yr=co(Yr,e,t,r,n,s),!0;case"mouseover":return Xr=co(Xr,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Wo.set(o,co(Wo.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Ho.set(o,co(Ho.get(o)||null,e,t,r,n,s)),!0}return!1}function cg(e){var t=Tn(e.target);if(t!==null){var r=Vn(t);if(r!==null){if(t=r.tag,t===13){if(t=Xm(r),t!==null){e.blockedOn=t,ug(e.priority,function(){ag(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 fa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=tc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ju=n,r.target.dispatchEvent(n),Ju=null}else return t=bi(r),t!==null&&vd(t),e.blockedOn=r,!1;t.shift()}return!0}function Vh(e,t,r){fa(e)&&r.delete(t)}function W0(){ec=!1,Qr!==null&&fa(Qr)&&(Qr=null),Yr!==null&&fa(Yr)&&(Yr=null),Xr!==null&&fa(Xr)&&(Xr=null),Wo.forEach(Vh),Ho.forEac
vendor: 11,826 bytes, line 37
37h(Vh)}function ho(e,t){e.blockedOn===t&&(e.blockedOn=null,ec||(ec=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,W0)))}function Vo(e){function t(s){return ho(s,e)}if(0<Di.length){ho(Di[0],e);for(var r=1;r<Di.length;r++){var n=Di[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Qr!==null&&ho(Qr,e),Yr!==null&&ho(Yr,e),Xr!==null&&ho(Xr,e),Wo.forEach(t),Ho.forEach(t),r=0;r<Mr.length;r++)n=Mr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Mr.length&&(r=Mr[0],r.blockedOn===null);)cg(r),r.blockedOn===null&&Mr.shift()}var Cs=xr.ReactCurrentBatchConfig,Oa=!0;function H0(e,t,r,n){var s=ne,o=Cs.transition;Cs.transition=null;try{ne=1,wd(e,t,r,n)}finally{ne=s,Cs.transition=o}}function V0(e,t,r,n){var s=ne,o=Cs.transition;Cs.transition=null;try{ne=4,wd(e,t,r,n)}finally{ne=s,Cs.transition=o}}function wd(e,t,r,n){if(Oa){var s=tc(e,t,r,n);if(s===null)du(e,t,n,Ia,r),Hh(e,n);else if(z0(s,e,t,r,n))n.stopPropagation();else if(Hh(e,n),t&4&&-1<B0.indexOf(e)){for(;s!==null;){var o=bi(s);if(o!==null&&ig(o),o=tc(e,t,r,n),o===null&&du(e,t,n,Ia,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else du(e,t,n,null,r)}}var Ia=null;function tc(e,t,r,n){if(Ia=null,e=md(n),e=Tn(e),e!==null)if(t=Vn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Xm(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 Ia=e,null}function dg(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(A0()){case gd:return 1;case rg:return 4;case Pa:case O0:return 16;case ng:return 536870912;default:return 16}default:return 16}}var Kr=null,xd=null,pa=null;function hg(){if(pa)return pa;var e,t=xd,r=t.length,n,s="value"in Kr?Kr.value:Kr.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 pa=s.slice(e,1<n?1-n:void 0)}function ma(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 Mi(){return!0}function qh(){return!1}function dt(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)?Mi:qh,this.isPropagationStopped=qh,this}return me(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=Mi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Mi)},persist:function(){},isPersistent:Mi}),t}var Xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bd=dt(Xs),xi=me({},Xs,{view:0,detail:0}),q0=dt(xi),ru,nu,fo,ml=me({},xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kd,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"?(ru=e.screenX-fo.screenX,nu=e.screenY-fo.screenY):nu=ru=0,fo=e),ru)},movementY:function(e){return"movementY"in e?e.movementY:nu}}),Kh=dt(ml),K0=me({},ml,{dataTransfer:0}),G0=dt(K0),J0=me({},xi,{relatedTarget:0}),su=dt(J0),Q0=me({},Xs,{animationName:0,elapsedTime:0,pseudoElement:0}),Y0=dt(Q0),X0=me({},Xs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Z0=dt(X0),ex=me({},Xs,{data:0}),Gh=dt(ex),tx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rx={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"},nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nx[e])?!!t[e]:!1}function kd(){return sx}var ox=me({},xi,{key:function(e){if(e.key){var t=tx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ma(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kd,charCode:function(e){return e.type==="keypress"?ma(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ma(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ix=dt(ox),ax=me({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jh=dt(ax),lx=me({},xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kd}),ux=dt(lx),cx=me({},Xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),dx=dt(cx),hx=me({},ml,{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}),fx=dt(hx),px=[9,13,27,32],_d=pr&&"CompositionEvent"in window,No=null;pr&&"documentMode"in document&&(No=document.documentMode);var mx=pr&&"TextEvent"in window&&!No,fg=pr&&(!_d||No&&8<No&&11>=No),Qh=" ",Yh=!1;function pg(e,t){switch(e){case"keyup":return px.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fs=!1;function gx(e,t){switch(e){case"compositionend":return mg(t);case"keypress":return t.which!==32?null:(Yh=!0,Qh);case"textInput":return e=t.data,e===Qh&&Yh?null:e;default:return null}}function yx(e,t){if(fs)return e==="compositionend"||!_d&&pg(e,t)?(e=hg(),pa=xd=Kr=null,fs=!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 fg&&t.locale!=="ko"?null:t.data;default:return null}}var vx={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 Xh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vx[e.type]:t==="textarea"}function gg(e,t,r,n){Km(n),t=La(t,"onChange"),0<t.length&&(r=new bd("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ro=null,qo=null;function wx(e){Cg(e,0)}function gl(e){var t=gs(e);if(Fm(t))return e}function xx(e,t){if(e==="change")return t}var yg=!1;if(pr){var ou;if(pr){var iu="oninput"in document;if(!iu){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),iu=typeof Zh.oninput=="function"}ou=iu}else ou=!1;yg=ou&&(!document.documentMode||9<document.documentMode)}function ef(){Ro&&(Ro.detachEvent("onpropertychange",vg),qo=Ro=null)}function vg(e){if(e.propertyName==="value"&&gl(qo)){var t=[];gg(t,qo,e,md(e)),Ym(wx,t)}}function bx(e,t,r){e==="focusin"?(ef(),Ro=t,qo=r,Ro.attachEvent("onpropertychange",vg)):e==="focusout"&&ef()}function kx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gl(qo)}function _x(e,t){if(e==="click")return gl(t)}function Sx(e,t){if(e==="input"||e==="change")return gl(t)}function Ex(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:Ex;function Ko(e,t){if(Mt(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(!Du.call(t,s)||!Mt(e[s],t[s]))return!1}return!0}function tf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rf(e,t){var r=tf(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=tf(r)}}function wg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xg(){for(var e=window,t=ja();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ja(e.document)}return t}function Sd(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 Tx(e){var t=xg(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&wg(r.ownerDocument.documentElement,r)){if(n!==null&&Sd(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=rf(r,o);var i=rf(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 Cx=pr&&"documentMode"in document&&11>=document.documentMode,ps=null,rc=null,Po=null,nc=!1;function nf(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;nc||ps==null||ps!==ja(n)||(n=ps,"selectionStart"in n&&Sd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Po&&Ko(Po,n)||(Po=n,n=La(rc,"onSelect"),0<n.length&&(t=new bd("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=ps)))}function Ui(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ms={animationend:Ui("Animation","AnimationEnd"),animationiteration:Ui("Animation","AnimationIteration"),animationstart:Ui("Animation","AnimationStart"),transitionend:Ui("Transition","TransitionEnd")},au={},bg={};pr&&(bg=document.createElement("div").style,"AnimationEvent"in window||(delete ms.animationend.animation,delete ms.animationiteration.animation,delete ms.animationstart.animation),"TransitionEvent"in window||delete ms.transitionend.transition);function yl(e){if(au[e])return au[e];if(!ms[e])return e;var t=ms[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in bg)return au[e]=t[r];return e}var kg=yl("animationend"),_g=yl("animationiteration"),Sg=yl("animationstart"),Eg=yl("transitionend"),Tg=new Map,sf="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 hn(e,t){Tg.set(e,t),Hn(t,[e])}for(var lu=0;lu<sf.length;lu++){var uu=sf[lu],jx=uu.toLowerCase(),Nx=uu[0].toUpperCase()+uu.slice(1);hn(jx,"on"+Nx)}hn(kg,"onAnimationEnd");hn(_g,"onAnimationIteration");hn(Sg,"onAnimationStart");hn("dblclick","onDoubleClick");hn("focusin","onFocus");hn("focusout","onBlur");hn(Eg,"onTransitionEnd");zs("onMouseEnter",["mouseout","mouseover"]);zs("onMouseLeave",["mouseout","mouseover"]);zs("onPointerEnter",["pointerout","pointerover"]);zs("onPointerLeave",["pointerout","pointerover"]);Hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var So="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(" "),Rx=new Set("cancel close invalid load scroll toggle".split(" ").concat(So));function of(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,j0(n,t,void 0,e),e.currentTarget=null}function Cg(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;of(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;of(s,a,u),o=l}}}if(Ra)throw e=Xu,Ra=!1,Xu=null,e}function le(e,t){var r=t[lc];r===void 0&&(r=t[lc]=new Set);var n=e+"__bubble";r.has(n)||(jg(t,e,2,!1),r.add(n))}function cu(e,t,r){var n=0;t&&(n|=4),jg(r,e,n,t)}var Fi="_reactListening"+Math.random().toString(36).slice(2);function Go(e){if(!e[Fi]){e[Fi]=!0,Lm.forEach(function(r){r!=="selectionchange"&&(Rx.has(r)||cu(r,!1,e),cu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fi]||(t[Fi]=!0,cu("selectionchange",!1,t))}}function jg(e,t,r,n){switch(dg(t)){case 1:var s=H0;break;case 4:s=V0;break;default:s=wd}r=s.bind(null,t,r,e),s=void 0,!Yu||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 du(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: 22,525 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=Tn(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}Ym(function(){var u=o,d=md(r),h=[];e:{var p=Tg.get(e);if(p!==void 0){var f=bd,w=e;switch(e){case"keypress":if(ma(r)===0)break e;case"keydown":case"keyup":f=ix;break;case"focusin":w="focus",f=su;break;case"focusout":w="blur",f=su;break;case"beforeblur":case"afterblur":f=su;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=Kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=G0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=ux;break;case kg:case _g:case Sg:f=Y0;break;case Eg:f=dx;break;case"scroll":f=q0;break;case"wheel":f=fx;break;case"copy":case"cut":case"paste":f=Z0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Jh}var v=(t&4)!==0,x=!v&&e==="scroll",y=v?p!==null?p+"Capture":null:p;v=[];for(var m=u,g;m!==null;){g=m;var k=g.stateNode;if(g.tag===5&&k!==null&&(g=k,y!==null&&(k=zo(m,y),k!=null&&v.push(Jo(m,k,g)))),x)break;m=m.return}0<v.length&&(p=new f(p,w,null,r,d),h.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==Ju&&(w=r.relatedTarget||r.fromElement)&&(Tn(w)||w[mr]))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?Tn(w):null,w!==null&&(x=Vn(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(f=null,w=u),f!==w)){if(v=Kh,k="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=Jh,k="onPointerLeave",y="onPointerEnter",m="pointer"),x=f==null?p:gs(f),g=w==null?p:gs(w),p=new v(k,m+"leave",f,r,d),p.target=x,p.relatedTarget=g,k=null,Tn(d)===u&&(v=new v(y,m+"enter",w,r,d),v.target=g,v.relatedTarget=x,k=v),x=k,f&&w)t:{for(v=f,y=w,m=0,g=v;g;g=es(g))m++;for(g=0,k=y;k;k=es(k))g++;for(;0<m-g;)v=es(v),m--;for(;0<g-m;)y=es(y),g--;for(;m--;){if(v===y||y!==null&&v===y.alternate)break t;v=es(v),y=es(y)}v=null}else v=null;f!==null&&af(h,p,f,v,!1),w!==null&&x!==null&&af(h,x,w,v,!0)}}e:{if(p=u?gs(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var _=xx;else if(Xh(p))if(yg)_=Sx;else{_=kx;var S=bx}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=_x);if(_&&(_=_(e,u))){gg(h,_,r,d);break e}S&&S(e,p,u),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Hu(p,"number",p.value)}switch(S=u?gs(u):window,e){case"focusin":(Xh(S)||S.contentEditable==="true")&&(ps=S,rc=u,Po=null);break;case"focusout":Po=rc=ps=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,nf(h,r,d);break;case"selectionchange":if(Cx)break;case"keydown":case"keyup":nf(h,r,d)}var E;if(_d)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 fs?pg(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(fg&&r.locale!=="ko"&&(fs||N!=="onCompositionStart"?N==="onCompositionEnd"&&fs&&(E=hg()):(Kr=d,xd="value"in Kr?Kr.value:Kr.textContent,fs=!0)),S=La(u,N),0<S.length&&(N=new Gh(N,e,null,r,d),h.push({event:N,listeners:S}),E?N.data=E:(E=mg(r),E!==null&&(N.data=E)))),(E=mx?gx(e,r):yx(e,r))&&(u=La(u,"onBeforeInput"),0<u.length&&(d=new Gh("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=E))}Cg(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 es(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function af(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 Px=/\r\n?/g,Ax=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(Px,` 38`).replace(Ax,"")}function Bi(e,t,r){if(t=lf(t),lf(e)!==t&&r)throw Error(P(425))}function $a(){}var sc=null,oc=null;function ic(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 ac=typeof setTimeout=="function"?setTimeout:void 0,Ox=typeof clearTimeout=="function"?clearTimeout:void 0,uf=typeof Promise=="function"?Promise:void 0,Ix=typeof queueMicrotask=="function"?queueMicrotask:typeof uf<"u"?function(e){return uf.resolve(null).then(e).catch(Lx)}:ac;function Lx(e){setTimeout(function(){throw e})}function hu(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),Vo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Vo(t)}function Zr(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 cf(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 Zs=Math.random().toString(36).slice(2),Qt="__reactFiber$"+Zs,Qo="__reactProps$"+Zs,mr="__reactContainer$"+Zs,lc="__reactEvents$"+Zs,$x="__reactListeners$"+Zs,Dx="__reactHandles$"+Zs;function Tn(e){var t=e[Qt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[mr]||r[Qt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=cf(e);e!==null;){if(r=e[Qt])return r;e=cf(e)}return t}e=r,r=e.parentNode}return null}function bi(e){return e=e[Qt]||e[mr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function vl(e){return e[Qo]||null}var uc=[],ys=-1;function fn(e){return{current:e}}function ue(e){0>ys||(e.current=uc[ys],uc[ys]=null,ys--)}function ie(e,t){ys++,uc[ys]=e.current,e.current=t}var an={},Be=fn(an),Xe=fn(!1),Mn=an;function Ws(e,t){var r=e.type.contextTypes;if(!r)return an;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 Ze(e){return e=e.childContextTypes,e!=null}function Da(){ue(Xe),ue(Be)}function df(e,t,r){if(Be.current!==an)throw Error(P(168));ie(Be,t),ie(Xe,r)}function Ng(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,b0(e)||"Unknown",s));return me({},r,n)}function Ma(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,Mn=Be.current,ie(Be,e),ie(Xe,Xe.current),!0}function hf(e,t,r){var n=e.stateNode;if(!n)throw Error(P(169));r?(e=Ng(e,t,Mn),n.__reactInternalMemoizedMergedChildContext=e,ue(Xe),ue(Be),ie(Be,e)):ue(Xe),ie(Xe,r)}var ur=null,wl=!1,fu=!1;function Rg(e){ur===null?ur=[e]:ur.push(e)}function Mx(e){wl=!0,Rg(e)}function pn(){if(!fu&&ur!==null){fu=!0;var e=0,t=ne;try{var r=ur;for(ne=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ur=null,wl=!1}catch(s){throw ur!==null&&(ur=ur.slice(e+1)),tg(gd,pn),s}finally{ne=t,fu=!1}}return null}var vs=[],ws=0,Ua=null,Fa=0,gt=[],yt=0,Un=null,dr=1,hr="";function _n(e,t){vs[ws++]=Fa,vs[ws++]=Ua,Ua=e,Fa=t}function Pg(e,t,r){gt[yt++]=dr,gt[yt++]=hr,gt[yt++]=Un,Un=e;var n=dr;e=hr;var s=32-$t(n)-1;n&=~(1<<s),r+=1;var o=32-$t(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,dr=1<<32-$t(t)+s|r<<s|n,hr=o+e}else dr=1<<o|r<<s|n,hr=e}function Ed(e){e.return!==null&&(_n(e,1),Pg(e,1,0))}function Td(e){for(;e===Ua;)Ua=vs[--ws],vs[ws]=null,Fa=vs[--ws],vs[ws]=null;for(;e===Un;)Un=gt[--yt],gt[yt]=null,hr=gt[--yt],gt[yt]=null,dr=gt[--yt],gt[yt]=null}var it=null,ot=null,he=!1,It=null;function Ag(e,t){var r=vt(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 ff(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,it=e,ot=Zr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,it=e,ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Un!==null?{id:dr,overflow:hr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=vt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,it=e,ot=null,!0):!1;default:return!1}}function cc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function dc(e){if(he){var t=ot;if(t){var r=t;if(!ff(e,t)){if(cc(e))throw Error(P(418));t=Zr(r.nextSibling);var n=it;t&&ff(e,t)?Ag(n,r):(e.flags=e.flags&-4097|2,he=!1,it=e)}}else{if(cc(e))throw Error(P(418));e.flags=e.flags&-4097|2,he=!1,it=e}}}function pf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;it=e}function zi(e){if(e!==it)return!1;if(!he)return pf(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ic(e.type,e.memoizedProps)),t&&(t=ot)){if(cc(e))throw Og(),Error(P(418));for(;t;)Ag(e,t),t=Zr(t.nextSibling)}if(pf(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){ot=Zr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ot=null}}else ot=it?Zr(e.stateNode.nextSibling):null;return!0}function Og(){for(var e=ot;e;)e=Zr(e.nextSibling)}function Hs(){ot=it=null,he=!1}function Cd(e){It===null?It=[e]:It.push(e)}var Ux=xr.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 Wi(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mf(e){var t=e._init;return t(e._payload)}function Ig(e){function t(y,m){if(e){var g=y.deletions;g===null?(y.deletions=[m],y.flags|=16):g.push(m)}}function r(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function n(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function s(y,m){return y=nn(y,m),y.index=0,y.sibling=null,y}function o(y,m,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<m?(y.flags|=2,m):g):(y.flags|=2,m)):(y.flags|=1048576,m)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,m,g,k){return m===null||m.tag!==6?(m=xu(g,y.mode,k),m.return=y,m):(m=s(m,g),m.return=y,m)}function l(y,m,g,k){var _=g.type;return _===hs?d(y,m,g.props.children,k,g.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===$r&&mf(_)===m.type)?(k=s(m,g.props),k.ref=po(y,m,g),k.return=y,k):(k=ka(g.type,g.key,g.props,null,y.mode,k),k.ref=po(y,m,g),k.return=y,k)}function u(y,m,g,k){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=bu(g,y.mode,k),m.return=y,m):(m=s(m,g.children||[]),m.return=y,m)}function d(y,m,g,k,_){return m===null||m.tag!==7?(m=Dn(g,y.mode,k,_),m.return=y,m):(m=s(m,g),m.return=y,m)}function h(y,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=xu(""+m,y.mode,g),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ai:return g=ka(m.type,m.key,m.props,null,y.mode,g),g.ref=po(y,null,m),g.return=y,g;case ds:return m=bu(m,y.mode,g),m.return=y,m;case $r:var k=m._init;return h(y,k(m._payload),g)}if(ko(m)||lo(m))return m=Dn(m,y.mode,g,null),m.return=y,m;Wi(y,m)}return null}function p(y,m,g,k){var _=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:a(y,m,""+g,k);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ai:return g.key===_?l(y,m,g,k):null;case ds:return g.key===_?u(y,m,g,k):null;case $r:return _=g._init,p(y,m,_(g._payload),k)}if(ko(g)||lo(g))return _!==null?null:d(y,m,g,k,null);Wi(y,g)}return null}function f(y,m,g,k,_){if(typeof k=="string"&&k!==""||typeof k=="number")return y=y.get(g)||null,a(m,y,""+k,_);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Ai:return y=y.get(k.key===null?g:k.key)||null,l(m,y,k,_);case ds:return y=y.get(k.key===null?g:k.key)||null,u(m,y,k,_);case $r:var S=k._init;return f(y,m,g,S(k._payload),_)}if(ko(k)||lo(k))return y=y.get(g)||null,d(m,y,k,_,null);Wi(m,k)}return null}function w(y,m,g,k){for(var _=null,S=null,E=m,N=m=0,A=null;E!==null&&N<g.length;N++){E.index>N?(A=E,E=null):A=E.sibling;var O=p(y,E,g[N],k);if(O===null){E===null&&(E=A);break}e&&E&&O.alternate===null&&t(y,E),m=o(O,m,N),S===null?_=O:S.sibling=O,S=O,E=A}if(N===g.length)return r(y,E),he&&_n(y,N),_;if(E===null){for(;N<g.length;N++)E=h(y,g[N],k),E!==null&&(m=o(E,m,N),S===null?_=E:S.sibling=E,S=E);return he&&_n(y,N),_}for(E=n(y,E);N<g.length;N++)A=f(E,y,N,g[N],k),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?N:A.key),m=o(A,m,N),S===null?_=A:S.sibling=A,S=A);return e&&E.forEach(function(D){return t(y,D)}),he&&_n(y,N),_}function v(y,m,g,k){var _=lo(g);if(typeof _!="function")throw Error(P(150));if(g=_.call(g),g==null)throw Error(P(151));for(var S=_=null,E=m,N=m=0,A=null,O=g.next();E!==null&&!O.done;N++,O=g.next()){E.index>N?(A=E,E=null):A=E.sibling;var D=p(y,E,O.value,k);if(D===null){E===null&&(E=A);break}e&&E&&D.alternate===null&&t(y,E),m=o(D,m,N),S===null?_=D:S.sibling=D,S=D,E=A}if(O.done)return r(y,E),he&&_n(y,N),_;if(E===null){for(;!O.done;N++,O=g.next())O=h(y,O.value,k),O!==null&&(m=o(O,m,N),S===null?_=O:S.sibling=O,S=O);return he&&_n(y,N),_}for(E=n(y,E);!O.done;N++,O=g.next())O=f(E,y,N,O.value,k),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?N:O.key),m=o(O,m,N),S===null?_=O:S.sibling=O,S=O);return e&&E.forEach(function(R){return t(y,R)}),he&&_n(y,N),_}function x(y,m,g,k){if(typeof g=="object"&&g!==null&&g.type===hs&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Ai:e:{for(var _=g.key,S=m;S!==null;){if(S.key===_){if(_=g.type,_===hs){if(S.tag===7){r(y,S.sibling),m=s(S,g.props.children),m.return=y,y=m;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===$r&&mf(_)===S.type){r(y,S.sibling),m=s(S,g.props),m.ref=po(y,S,g),m.return=y,y=m;break e}r(y,S);break}else t(y,S);S=S.sibling}g.type===hs?(m=Dn(g.props.children,y.mode,k,g.key),m.return=y,y=m):(k=ka(g.type,g.key,g.props,null,y.mode,k),k.ref=po(y,m,g),k.return=y,y=k)}return i(y);case ds:e:{for(S=g.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){r(y,m.sibling),m=s(m,g.children||[]),m.return=y,y=m;break e}else{r(y,m);break}else t(y,m);m=m.sibling}m=bu(g,y.mode,k),m.return=y,y=m}return i(y);case $r:return S=g._init,x(y,m,S(g._payload),k)}if(ko(g))return w(y,m,g,k);if(lo(g))return v(y,m,g,k);Wi(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(r(y,m.sibling),m=s(m,g),m.return=y,y=m):(r(y,m),m=xu(g,y.mode,k),m.return=y,y=m),i(y)):r(y,m)}return x}var Vs=Ig(!0),Lg=Ig(!1),Ba=fn(null),za=null,xs=null,jd=null;function Nd(){jd=xs=za=null}function Rd(e){var t=Ba.current;ue(Ba),e._currentValue=t}function hc(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 js(e,t){za=e,jd=xs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function xt(e){var t=e._currentValue;if(jd!==e)if(e={context:e,memoizedValue:t,next:null},xs===null){if(za===null)throw Error(P(308));xs=e,za.dependencies={lanes:0,firstContext:e}}else xs=xs.next=e;return t}var Cn=null;function Pd(e){Cn===null?Cn=[e]:Cn.push(e)}function $g(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Pd(t)):(r.next=s.next,s.next=r),t.interleaved=r,gr(e,n)}function gr(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 Dr=!1;function Ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dg(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 fr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function en(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ee&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,gr(e,r)}return s=n.interleaved,s===null?(t.next=t,Pd(n)):(t.next=s.next,s.next=t),n.interleaved=t,gr(e,r)}function ga(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,yd(e,r)}}function gf(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 Wa(e,t,r,n){var s=e.updateQueue;Dr=!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,v=a;switch(p=t,f=r,v.tag){case 1:if(w=v.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=v.payload,p=typeof w=="function"?w.call(f,h,p):w,p==null)break e;h=me({},h,p);break e;case 2:Dr=!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);Bn|=i,e.lanes=i,e.memoizedState=h}}function yf(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={},Zt=fn(ki),Yo=fn(ki),Xo=fn(ki);function jn(e){if(e===ki)throw Error(P(174));return e}function Od(e,t){switch(ie(Xo,t),ie(Yo,e),ie(Zt,ki),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qu(t,e)}ue(Zt),ie(Zt,t)}function qs(){ue(Zt),ue(Yo),ue(Xo)}function Mg(e){jn(Xo.current);var t=jn(Zt.current),r=qu(t,e.type);t!==r&&(ie(Yo,e),ie(Zt,r))}function Id(e){Yo.current===e&&(ue(Zt),ue(Yo))}var fe=fn(0);function Ha(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 pu=[];function Ld(){for(var e=0;e<pu.length;e++)pu[e]._workInProgressVersionPrimary=null;pu.length=0}var ya=xr.ReactCurrentDispatcher,mu=xr.ReactCurrentBatchConfig,Fn=0,pe=null,Se=null,je=null,Va=!1,Ao=!1,Zo=0,Fx=0;function De(){throw Error(P(321))}function $d(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Mt(e[r],t[r]))return!1;return!0}function Dd(e,t,r,n,s,o){if(Fn=o,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ya.current=e===null||e.memoizedState===null?Hx:Vx,e=r(n,s),Ao){o=0;do{if(Ao=!1,Zo=0,25<=o)throw Error(P(301));o+=1,je=Se=null,t.updateQueue=null,ya.current=qx,e=r(n,s)}while(Ao)}if(ya.current=qa,t=Se!==null&&Se.next!==null,Fn=0,je=Se=pe=null,Va=!1,t)throw Error(P(300));return e}function Md(){var e=Zo!==0;return Zo=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?pe.memoizedState=je=e:je=je.next=e,je}function bt(){if(Se===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=je===null?pe.memoizedState:je.next;if(t!==null)je=t,Se=e;else{if(e===null)throw Error(P(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},je===null?pe.memoizedState=je=e:je=je.next=e}return je}function ei(e,t){return typeof t=="function"?t(e):t}
vendor: 5,780 bytes, line 38
38function gu(e){var t=bt(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=Se,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((Fn&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,pe.lanes|=d,Bn|=d}u=u.next}while(u!==null&&u!==o);l===null?i=n:l.next=a,Mt(n,t.memoizedState)||(Ye=!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,pe.lanes|=o,Bn|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function yu(e){var t=bt(),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);Mt(o,t.memoizedState)||(Ye=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Ug(){}function Fg(e,t){var r=pe,n=bt(),s=t(),o=!Mt(n.memoizedState,s);if(o&&(n.memoizedState=s,Ye=!0),n=n.queue,Ud(Wg.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||je!==null&&je.memoizedState.tag&1){if(r.flags|=2048,ti(9,zg.bind(null,r,n,s,t),void 0,null),Ne===null)throw Error(P(349));Fn&30||Bg(r,t,s)}return s}function Bg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function zg(e,t,r,n){t.value=r,t.getSnapshot=n,Hg(t)&&Vg(e)}function Wg(e,t,r){return r(function(){Hg(t)&&Vg(e)})}function Hg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Mt(e,r)}catch{return!0}}function Vg(e){var t=gr(e,1);t!==null&&Dt(t,e,1,-1)}function vf(e){var t=Ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:e},t.queue=e,e=e.dispatch=Wx.bind(null,pe,e),[t.memoizedState,e]}function ti(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.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 qg(){return bt().memoizedState}function va(e,t,r,n){var s=Ht();pe.flags|=e,s.memoizedState=ti(1|t,r,void 0,n===void 0?null:n)}function xl(e,t,r,n){var s=bt();n=n===void 0?null:n;var o=void 0;if(Se!==null){var i=Se.memoizedState;if(o=i.destroy,n!==null&&$d(n,i.deps)){s.memoizedState=ti(t,r,o,n);return}}pe.flags|=e,s.memoizedState=ti(1|t,r,o,n)}function wf(e,t){return va(8390656,8,e,t)}function Ud(e,t){return xl(2048,8,e,t)}function Kg(e,t){return xl(4,2,e,t)}function Gg(e,t){return xl(4,4,e,t)}function Jg(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 Qg(e,t,r){return r=r!=null?r.concat([e]):null,xl(4,4,Jg.bind(null,t,e),r)}function Fd(){}function Yg(e,t){var r=bt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&$d(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Xg(e,t){var r=bt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&$d(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Zg(e,t,r){return Fn&21?(Mt(r,t)||(r=sg(),pe.lanes|=r,Bn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ye=!0),e.memoizedState=r)}function Bx(e,t){var r=ne;ne=r!==0&&4>r?r:4,e(!0);var n=mu.transition;mu.transition={};try{e(!1),t()}finally{ne=r,mu.transition=n}}function ey(){return bt().memoizedState}function zx(e,t,r){var n=rn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ty(e))ry(t,r);else if(r=$g(e,t,r,n),r!==null){var s=Ve();Dt(r,e,n,s),ny(r,t,n)}}function Wx(e,t,r){var n=rn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ty(e))ry(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,Mt(a,i)){var l=t.interleaved;l===null?(s.next=s,Pd(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=$g(e,t,s,n),r!==null&&(s=Ve(),Dt(r,e,n,s),ny(r,t,n))}}function ty(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function ry(e,t){Ao=Va=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ny(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,yd(e,r)}}var qa={readContext:xt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},Hx={readContext:xt,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:wf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,va(4194308,4,Jg.bind(null,t,e),r)},useLayoutEffect:function(e,t){return va(4194308,4,e,t)},useInsertionEffect:function(e,t){return va(4,2,e,t)},useMemo:function(e,t){var r=Ht();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ht();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=zx.bind(null,pe,e),[n.memoizedState,e]}
vendor: 5,922 bytes, lines 38-40
38,useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:vf,useDebugValue:Fd,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=vf(!1),t=e[0];return e=Bx.bind(null,e[1]),Ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pe,s=Ht();if(he){if(r===void 0)throw Error(P(407));r=r()}else{if(r=t(),Ne===null)throw Error(P(349));Fn&30||Bg(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,wf(Wg.bind(null,n,o,e),[e]),n.flags|=2048,ti(9,zg.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Ht(),t=Ne.identifierPrefix;if(he){var r=hr,n=dr;r=(n&~(1<<32-$t(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Zo++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Fx++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Vx={readContext:xt,useCallback:Yg,useContext:xt,useEffect:Ud,useImperativeHandle:Qg,useInsertionEffect:Kg,useLayoutEffect:Gg,useMemo:Xg,useReducer:gu,useRef:qg,useState:function(){return gu(ei)},useDebugValue:Fd,useDeferredValue:function(e){var t=bt();return Zg(t,Se.memoizedState,e)},useTransition:function(){var e=gu(ei)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Ug,useSyncExternalStore:Fg,useId:ey,unstable_isNewReconciler:!1},qx={readContext:xt,useCallback:Yg,useContext:xt,useEffect:Ud,useImperativeHandle:Qg,useInsertionEffect:Kg,useLayoutEffect:Gg,useMemo:Xg,useReducer:yu,useRef:qg,useState:function(){return yu(ei)},useDebugValue:Fd,useDeferredValue:function(e){var t=bt();return Se===null?t.memoizedState=e:Zg(t,Se.memoizedState,e)},useTransition:function(){var e=yu(ei)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Ug,useSyncExternalStore:Fg,useId:ey,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function fc(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:me({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bl={isMounted:function(e){return(e=e._reactInternals)?Vn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ve(),s=rn(e),o=fr(n,s);o.payload=t,r!=null&&(o.callback=r),t=en(e,o,s),t!==null&&(Dt(t,e,s,n),ga(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ve(),s=rn(e),o=fr(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=en(e,o,s),t!==null&&(Dt(t,e,s,n),ga(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ve(),n=rn(e),s=fr(r,n);s.tag=2,t!=null&&(s.callback=t),t=en(e,s,n),t!==null&&(Dt(t,e,n,r),ga(t,e,n))}};function xf(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?!Ko(r,n)||!Ko(s,o):!0}function sy(e,t,r){var n=!1,s=an,o=t.contextType;return typeof o=="object"&&o!==null?o=xt(o):(s=Ze(t)?Mn:Be.current,n=t.contextTypes,o=(n=n!=null)?Ws(e,s):an),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function bf(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&&bl.enqueueReplaceState(t,t.state,null)}function pc(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Ad(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=xt(o):(o=Ze(t)?Mn:Be.current,s.context=Ws(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(fc(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&&bl.enqueueReplaceState(s,s.state,null),Wa(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ks(e,t){try{var r="",n=t;do r+=x0(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 vu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function mc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Kx=typeof WeakMap=="function"?WeakMap:Map;function oy(e,t,r){r=fr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ga||(Ga=!0,Ec=n),mc(e,t)},r}function iy(e,t,r){r=fr(-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(){mc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){mc(e,t),typeof n!="function"&&(tn===null?tn=new Set([this]):tn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function kf(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Kx;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=ab.bind(null,e,t,r),t.then(e,e))}function _f(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 Sf(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=fr(-1,1),t.tag=2,en(r,t,1))),r.lanes|=1),e)}var Gx=xr.ReactCurrentOwner,Ye=!1;function We(e,t,r,n){t.child=e===null?Lg(t,null,r,n):Vs(t,e.child,r,n)}function Ef(e,t,r,n,s){r=r.render;var o=t.ref;
vendor: 6,220 bytes, line 40
40return js(t,s),n=Dd(e,t,r,n,o,s),r=Md(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yr(e,t,s)):(he&&r&&Ed(t),t.flags|=1,We(e,t,n,s),t.child)}function Tf(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Gd(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,ay(e,t,o,n,s)):(e=ka(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:Ko,r(i,n)&&e.ref===t.ref)return yr(e,t,s)}return t.flags|=1,e=nn(o,n),e.ref=t.ref,e.return=t,t.child=e}function ay(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Ko(o,n)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,yr(e,t,s)}return gc(e,t,r,n,s)}function ly(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},ie(ks,rt),rt|=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,ie(ks,rt),rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ie(ks,rt),rt|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,ie(ks,rt),rt|=n;return We(e,t,s,r),t.child}function uy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function gc(e,t,r,n,s){var o=Ze(r)?Mn:Be.current;return o=Ws(t,o),js(t,s),r=Dd(e,t,r,n,o,s),n=Md(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,yr(e,t,s)):(he&&n&&Ed(t),t.flags|=1,We(e,t,r,s),t.child)}function Cf(e,t,r,n,s){if(Ze(r)){var o=!0;Ma(t)}else o=!1;if(js(t,s),t.stateNode===null)wa(e,t),sy(t,r,n),pc(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=xt(u):(u=Ze(r)?Mn:Be.current,u=Ws(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)&&bf(t,i,n,u),Dr=!1;var p=t.memoizedState;i.state=p,Wa(t,n,i,s),l=t.memoizedState,a!==n||p!==l||Xe.current||Dr?(typeof d=="function"&&(fc(t,r,d,n),l=t.memoizedState),(a=Dr||xf(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,Dg(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:jt(t.type,a),i.props=u,h=t.pendingProps,p=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=xt(l):(l=Ze(r)?Mn:Be.current,l=Ws(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)&&bf(t,i,n,l),Dr=!1,p=t.memoizedState,i.state=p,Wa(t,n,i,s);var w=t.memoizedState;a!==h||p!==w||Xe.current||Dr?(typeof f=="function"&&(fc(t,r,f,n),w=t.memoizedState),(u=Dr||xf(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 yc(e,t,r,n,o,s)}function yc(e,t,r,n,s,o){uy(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&hf(t,r,!1),yr(e,t,o);n=t.stateNode,Gx.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Vs(t,e.child,null,o),t.child=Vs(t,null,a,o)):We(e,t,a,o),t.memoizedState=n.state,s&&hf(t,r,!0),t.child}function cy(e){var t=e.stateNode;t.pendingContext?df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&df(e,t.context,!1),Od(e,t.containerInfo)}function jf(e,t,r,n,s){return Hs(),Cd(s),t.flags|=256,We(e,t,r,n),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0};function wc(e){return{baseLanes:e,cachePool:null,transitions:null}}function dy(e,t,r){var n=t.pendingProps,s=fe.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),ie(fe,s&1),e===null)return dc(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=Sl(i,n,0,null),e=Dn(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=wc(r),t.memoizedState=vc,e):Bd(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Jx(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=nn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=nn(a,o):(o=Dn(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?wc(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=vc,n}return o=e.child,e=o.sibling,n=nn(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 Bd(e,t){return t=Sl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hi(e,t,r,n){return n!==null&&Cd(n),Vs(t,e.child,null,r),e=Bd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jx(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=vu(Error(P(422))),Hi(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Sl({mode:"visible",children:n.children},s,0,null),o=Dn(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Vs(t,e.child,null,i),t.child.memoizedState=wc(i),t.memoizedState=vc,o);if(!(t.mode&1))return Hi(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=vu(o,n,void 0),Hi(e,t,i,n)}if(a=(i&e.childLanes)!==0,Ye||a){if(n=Ne,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,gr(e,s),Dt(n,e,s,-1))}return Kd(),n=vu(Error(P(421))),Hi(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=lb.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,ot=Zr(s.nextSibling),it=t,he=!0,It=null,e!==null&&(gt[yt++]=dr,gt[yt++]=hr,gt[yt++]=Un,dr=e.id,hr=e.overflow,Un=t),t=Bd(t,n.children),t.flags|=4096,t)}function Nf(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),hc(e.return,t,r)}function wu(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 hy(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(We(e,t,n.children,r),n=fe.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&&Nf(e,r,t);else if(e.tag===19)Nf(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(ie(fe,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&&Ha(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),wu(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&&Ha(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}wu(t,!0,r,null,o);break;case"together":wu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function yr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Bn|=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=nn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=nn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Qx(e,t,r){switch(t.tag){case 3:cy(t),Hs();break;case 5:Mg(t);break;case 1:Ze(t.type)&&Ma(t);break;case 4:Od(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ie(Ba,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ie(fe,fe.current&1),t.flags|=128,null):r&t.child.childLanes?dy(e,t,r):(ie(fe,fe.current&1),e=yr(e,t,r),e!==null?e.sibling:null);ie(fe,fe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return hy(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ie(fe,fe.current),n)break;return null;case 22:case 23:return t.lanes=0,ly(e,t,r)}return yr(e,t,r)}var fy,xc,py,my;fy=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}};xc=function(){};py=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,jn(Zt.current);var o=null;switch(r){case"input":s=zu(e,s),n=zu(e,n),o=[];break;case"select":s=me({},s,{value:void 0}),n=me({},n,{value:void 0}),o=[];break;case"textarea":s=Vu(e,s),n=Vu(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=$a)}Ku(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"&&(Fo.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"&&(Fo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&le("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)}};my=function(e,t,r,n){r!==n&&(t.flags|=4)};function mo(e,t){if(!he)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 Me(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 Yx(e,t,r){var n=t.pendingProps;switch(Td(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Ze(t.type)&&Da(),Me(t),null;case 3:return n=t.stateNode,qs(),ue(Xe),ue(Be),Ld(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,It!==null&&(jc(It),It=null))),xc(e,t),Me(t),null;case 5:Id(t);var s=jn(Xo.current);if(r=t.type,e!==null&&t.stateNode!=null)py(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 Me(t),null}if(e=jn(Zt.current),zi(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Qt]=t,n[Qo]=o,e=(t.mode&1)!==0,r){case"dialog":le("cancel",n),le("close",n);break;case"iframe":case"object":case"embed":le("load",n);break;case"video":case"audio":for(s=0;s<So.length;s++)le(So[s],n);break;case"source":le("error",n);break;case"img":case"image":case"link":le("error",n),le("load",n);break;case"details":le("toggle",n);break;case"input":Dh(n,o),le("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},le("invalid",n);break;case"textarea":Uh(n,o),le("invalid",n)}Ku(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&&Bi(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Bi(n.textContent,a,e),s=["children",""+a]):Fo.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&le("scroll",n)}switch(r){case"input":Oi(n),Mh(n,o,!0);break;case"textarea":Oi(n),Fh(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=$a)}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=Wm(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[Qt]=t,e[Qo]=n,fy(e,t,!1,!1),t.stateNode=e;e:{switch(i=Gu(r,n),r){case"dialog":le("cancel",e),le("close",e),s=n;break;case"iframe":case"object":case"embed":le("load",e),s=n;break;case"video":case"audio":for(s=0;s<So.length;s++)le(So[s],e);s=n;break;case"source":le("error",e),s=n;break;case"img":case"image":case"link":le("error",e),le("load",e),s=n;break;case"details":le("toggle",e),s=n;break;case"input":Dh(e,n),s=zu(e,n),le("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=me({},n,{value:void 0}),le("invalid",e);break;case"textarea":Uh(e,n),s=Vu(e,n),le("invalid",e);break;default:s=n}Ku(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?qm(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Hm(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Bo(e,l):typeof l=="number"&&Bo(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Fo.hasOwnProperty(o)?l!=null&&o==="onScroll"&&le("scroll",e):l!=null&&dd(e,o,l,i))}switch(r){case"input":Oi(e),Mh(e,n,!1);break;case"textarea":Oi(e),Fh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+on(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Ss(e,!!n.multiple,o,!1):n.defaultValue!=null&&Ss(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=$a)}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 Me(t),null;case 6:if(e&&t.stateNode!=null)my(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(r=jn(Xo.current),jn(Zt.current),zi(t)){if(n=t.stateNode,r=t.memoizedProps,n[Qt]=t,(o=n.nodeValue!==r)&&(e=it,e!==null))switch(e.tag){case 3:Bi(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Bi(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Qt]=t,t.stateNode=n}return Me(t),null;case 13:if(ue(fe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&ot!==null&&t.mode&1&&!(t.flags&128))Og(),Hs(),t.flags|=98560,o=!1;else if(o=zi(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[Qt]=t}else Hs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),o=!1}else It!==null&&(jc(It),It=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||fe.current&1?Te===0&&(Te=3):Kd())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return qs(),xc(e,t),e===null&&Go(t.stateNode.containerInfo),Me(t),null;case 10:return Rd(t.type._context),Me(t),null;case 17:return Ze(t.type)&&Da(),Me(t),null;case 19:if(ue(fe),o=t.memoizedState,o===null)return Me(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)mo(o,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ha(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 ie(fe,fe.current&1|2),t.child}e=e.sibling}o.tail!==null&&we()>Gs&&(t.flags|=128,n=!0,mo(o,!1),t.lanes=4194304)}else{if(!n)if(e=Ha(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&&!he)return Me(t),null}else 2*we()-o.renderingStartTime>Gs&&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=we(),t.sibling=null,r=fe.current,ie(fe,n?r&1|2:r&1),t):(Me(t),null);case 22:case 23:return qd(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?rt&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Xx(e,t){switch(Td(t),t.tag){case 1:return Ze(t.type)&&Da(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qs(),ue(Xe),ue(Be),Ld(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Id(t),null;case 13:if(ue(fe),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 ue(fe),null;case 4:return qs(),null;case 10:return Rd(t.type._context),null;case 22:case 23:return qd(),null;case 24:return null;default:return null}}var Vi=!1,Fe=!1,Zx=typeof WeakSet=="function"?WeakSet:Set,U=null;function bs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ve(e,t,n)}else r.current=null}function bc(e,t,r){try{r()}catch(n){ve(e,t,n)}}var Rf=!1;function eb(e,t){if(sc=Oa,e=xg(),Sd(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(oc={focusedElem:e,selectionRange:r},Oa=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;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 v=w.memoizedProps,x=w.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:jt(t.type,v),x);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(k){ve(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return w=Rf,Rf=!1,w}function Oo(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&&bc(t,r,o)}s=s.next}while(s!==n)}}function kl(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 kc(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 gy(e){var t=e.alternate;t!==null&&(e.alternate=null,gy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qt],delete t[Qo],delete t[lc],delete t[$x],delete t[Dx])),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 yy(e){return e.tag===5||e.tag===3||e.tag===4}function Pf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yy(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 _c(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=$a));else if(n!==4&&(e=e.child,e!==null))for(_c(e,t,r),e=e.sibling;e!==null;)_c(e,t,r),e=e.sibling}function Sc(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(Sc(e,t,r),e=e.sibling;e!==null;)Sc(e,t,r),e=e.sibling}var Ae=null,Ot=!1;function Pr(e,t,r){for(r=r.child;r!==null;)vy(e,t,r),r=r.sibling}function vy(e,t,r){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(pl,r)}catch{}switch(r.tag){case 5:Fe||bs(r,t);case 6:var n=Ae,s=Ot;Ae=null,Pr(e,t,r),Ae=n,Ot=s,Ae!==null&&(Ot?(e=Ae,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ae.removeChild(r.stateNode));break;case 18:Ae!==null&&(Ot?(e=Ae,r=r.stateNode,e.nodeType===8?hu(e.parentNode,r):e.nodeType===1&&hu(e,r),Vo(e)):hu(Ae,r.stateNode));break;case 4:n=Ae,s=Ot,Ae=r.stateNode.containerInfo,Ot=!0,Pr(e,t,r),Ae=n,Ot=s;break;case 0:case 11:case 14:case 15:if(!Fe&&(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)&&bc(r,t,i),s=s.next}while(s!==n)}Pr(e,t,r);break;case 1:if(!Fe&&(bs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ve(r,t,a)}Pr(e,t,r);break;case 21:Pr(e,t,r);break;case 22:r.mode&1?(Fe=(n=Fe)||r.memoizedState!==null,Pr(e,t,r),Fe=n):Pr(e,t,r);break;default:Pr(e,t,r)}}function Af(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Zx),t.forEach(function(n){var s=ub.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Et(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:Ae=a.stateNode,Ot=!1;break e;case 3:Ae=a.stateNode.containerInfo,Ot=!0;break e;case 4:Ae=a.stateNode.containerInfo,Ot=!0;break e}a=a.return}if(Ae===null)throw Error(P(160));vy(o,i,s),Ae=null,Ot=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ve(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wy(t,e),t=t.sibling}function wy(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),zt(e),n&4){try{Oo(3,e,e.return),kl(3,e)}catch(v){ve(e,e.return,v)}try{Oo(5,e,e.return)}catch(v){ve(e,e.return,v)}}break;case 1:Et(t,e),zt(e),n&512&&r!==null&&bs(r,r.return);break;case 5:if(Et(t,e),zt(e),n&512&&r!==null&&bs(r,r.return),e.flags&32){var s=e.stateNode;try{Bo(s,"")}catch(v){ve(e,e.return,v)}}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&&Bm(s,o),Gu(a,i);var u=Gu(a,o);for(i=0;i<l.length;i+=2){var d=l[i],h=l[i+1];d==="style"?qm(s,h):d==="dangerouslySetInnerHTML"?Hm(s,h):d==="children"?Bo(s,h):dd(s,d,h,u)}switch(a){case"input":Wu(s,o);break;case"textarea":zm(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var f=o.value;f!=null?Ss(s,!!o.multiple,f,!1):p!==!!o.multiple&&(o.defaultValue!=null?Ss(s,!!o.multiple,o.defaultValue,!0):Ss(s,!!o.multiple,o.multiple?[]:"",!1))}s[Qo]=o}catch(v){ve(e,e.return,v)}}break;case 6:if(Et(t,e),zt(e),n&4){if(e.stateNode===null)throw Error(P(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){ve(e,e.return,v)}}break;case 3:if(Et(t,e),zt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Vo(t.containerInfo)}catch(v){ve(e,e.return,v)}break;case 4:Et(t,e),zt(e);break;case 13:Et(t,e),zt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Hd=we())),n&4&&Af(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Fe=(u=Fe)||d,Et(t,e),Fe=u):Et(t,e),zt(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(U=e,d=e.child;d!==null;){for(h=U=d;U!==null;){switch(p=U,f=p.child,p.tag){case 0:case 11:case 14:case 15:Oo(4,p,p.return);break;case 1:bs(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(v){ve(n,r,v)}}break;case 5:bs(p,p.return);break;case 22:if(p.memoizedState!==null){If(h);continue}}f!==null?(f.return=p,U=f):If(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=Vm("display",i))}catch(v){ve(e,e.return,v)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(v){ve(e,e.return,v)}}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:Et(t,e),zt(e),n&4&&Af(e);break;case 21:break;default:Et(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(yy(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&&(Bo(s,""),n.flags&=-33);var o=Pf(e);Sc(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Pf(e);_c(e,a,i);break;default:throw Error(P(161))}}catch(l){ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tb(e,t,r){U=e,xy(e)}function xy(e,t,r){for(var n=(e.mode&1)!==0;U!==null;){var s=U,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Vi;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Fe;a=Vi;var u=Fe;if(Vi=i,(Fe=l)&&!u)for(U=s;U!==null;)i=U,l=i.child,i.tag===22&&i.memoizedState!==null?Lf(s):l!==null?(l.return=i,U=l):Lf(s);for(;o!==null;)U=o,xy(o),o=o.sibling;U=s,Vi=a,Fe=u}Of(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,U=o):Of(e)}}function Of(e){for(;U!==null;){var t=U;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Fe||kl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Fe)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:jt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&yf(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}yf(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&&Vo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}Fe||t.flags&512&&kc(t)}catch(p){ve(t,t.return,p)}}if(t===e){U=null;break}if(r=t.sibling,r!==null){r.return=t.return,U=r;break}U=t.return}}function If(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var r=t.sibling;if(r!==null){r.return=t.return,U=r;break}U=t.return}}function Lf(e){for(;U!==null;){var t=U;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{kl(4,t)}catch(l){ve(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){ve(t,s,l)}}var o=t.return;try{kc(t)}catch(l){ve(t,o,l)}break;case 5:var i=t.return;try{kc(t)}catch(l){ve(t,i,l)}}}catch(l){ve(t,t.return,l)}if(t===e){U=null;break}var a=t.sibling;if(a!==null){a.return=t.return,U=a;break}U=t.return}}var rb=Math.ceil,Ka=xr.ReactCurrentDispatcher,zd=xr.ReactCurrentOwner,wt=xr.ReactCurrentBatchConfig,ee=0,Ne=null,_e=null,Oe=0,rt=0,ks=fn(0),Te=0,ri=null,Bn=0,_l=0,Wd=0,Io=null,Qe=null,Hd=0,Gs=1/0,ir=null,Ga=!1,Ec=null,tn=null,qi=!1,Gr=null,Ja=0,Lo=0,Tc=null,xa=-1,ba=0;function Ve(){return ee&6?we():xa!==-1?xa:xa=we()}function rn(e){return e.mode&1?ee&2&&Oe!==0?Oe&-Oe:Ux.transition!==null?(ba===0&&(ba=sg()),ba):(e=ne,e!==0||(e=window.event,e=e===void 0?16:dg(e.type)),e):1}function Dt(e,t,r,n){if(50<Lo)throw Lo=0,Tc=null,Error(P(185));wi(e,r,n),(!(ee&2)||e!==Ne)&&(e===Ne&&(!(ee&2)&&(_l|=r),Te===4&&Ur(e,Oe)),et(e,n),r===1&&ee===0&&!(t.mode&1)&&(Gs=we()+500,wl&&pn()))}function et(e,t){var r=e.callbackNode;U0(e,t);var n=Aa(e,e===Ne?Oe:0);if(n===0)r!==null&&Wh(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Wh(r),t===1)e.tag===0?Mx($f.bind(null,e)):Rg($f.bind(null,e)),Ix(function(){!(ee&6)&&pn()}),r=null;else{switch(og(n)){case 1:r=gd;break;case 4:r=rg;break;case 16:r=Pa;break;case 536870912:r=ng;break;default:r=Pa}r=jy(r,by.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function by(e,t){if(xa=-1,ba=0,ee&6)throw Error(P(327));var r=e.callbackNode;if(Ns()&&e.callbackNode!==r)return null;var n=Aa(e,e===Ne?Oe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Qa(e,n);else{t=n;var s=ee;ee|=2;var o=_y();(Ne!==e||Oe!==t)&&(ir=null,Gs=we()+500,$n(e,t));do try{ob();break}catch(a){ky(e,a)}while(!0);Nd(),Ka.current=o,ee=s,_e!==null?t=0:(Ne=null,Oe=0,t=Te)}if(t!==0){if(t===2&&(s=Zu(e),s!==0&&(n=s,t=Cc(e,s))),t===1)throw r=ri,$n(e,0),Ur(e,n),et(e,we()),r;if(t===6)Ur(e,n);else{if(s=e.current.alternate,!(n&30)&&!nb(s)&&(t=Qa(e,n),t===2&&(o=Zu(e),o!==0&&(n=o,t=Cc(e,o))),t===1))throw r=ri,$n(e,0),Ur(e,n),et(e,we()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(P(345));case 2:Sn(e,Qe,ir);break;case 3:if(Ur(e,n),(n&130023424)===n&&(t=Hd+500-we(),10<t)){if(Aa(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ve(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ac(Sn.bind(null,e,Qe,ir),t);break}Sn(e,Qe,ir);break;case 4:if(Ur(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-$t(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=we()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*rb(n/1960))-n,10<n){e.timeoutHandle=ac(Sn.bind(null,e,Qe,ir),n);break}Sn(e,Qe,ir);break;case 5:Sn(e,Qe,ir);break;default:throw Error(P(329))}}}return et(e,we()),e.callbackNode===r?by.bind(null,e):null}function Cc(e,t){var r=Io;return e.current.memoizedState.isDehydrated&&($n(e,t).flags|=256),e=Qa(e,t),e!==2&&(t=Qe,Qe=r,t!==null&&jc(t)),e}function jc(e){Qe===null?Qe=e:Qe.push.apply(Qe,e)}function nb(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(!Mt(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 Ur(e,t){for(t&=~Wd,t&=~_l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-$t(t),n=1<<r;e[r]=-1,t&=~n}}function $f(e){if(ee&6)throw Error(P(327));Ns();var t=Aa(e,0);if(!(t&1))return et(e,we()),null;var r=Qa(e,t);if(e.tag!==0&&r===2){var n=Zu(e);n!==0&&(t=n,r=Cc(e,n))}if(r===1)throw r=ri,$n(e,0),Ur(e,t),et(e,we()),r;if(r===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sn(e,Qe,ir),et(e,we()),null}function Vd(e,t){var r=ee;ee|=1;try{return e(t)}finally{ee=r,ee===0&&(Gs=we()+500,wl&&pn())}}function zn(e){Gr!==null&&Gr.tag===0&&!(ee&6)&&Ns();var t=ee;ee|=1;var r=wt.transition,n=ne;try{if(wt.transition=null,ne=1,e)return e()}finally{ne=n,wt.transition=r,ee=t,!(ee&6)&&pn()}}function qd(){rt=ks.current,ue(ks)}function $n(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ox(r)),_e!==null)for(r=_e.return;r!==null;){var n=r;switch(Td(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Da();break;case 3:qs(),ue(Xe),ue(Be),Ld();break;case 5:Id(n);break;case 4:qs();break;case 13:ue(fe);break;case 19:ue(fe);break;case 10:Rd(n.type._context);break;case 22:case 23:qd()}r=r.return}if(Ne=e,_e=e=nn(e.current,null),Oe=rt=t,Te=0,ri=null,Wd=_l=Bn=0,Qe=Io=null,Cn!==null){for(t=0;t<Cn.length;t++)if(r=Cn[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}Cn=null}return e}function ky(e,t){do{var r=_e;try{if(Nd(),ya.current=qa,Va){for(var n=pe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Va=!1}if(Fn=0,je=Se=pe=null,Ao=!1,Zo=0,zd.current=null,r===null||r.return===null){Te=1,ri=t,_e=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=Oe,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=_f(i);if(f!==null){f.flags&=-257,Sf(f,i,a,o,t),f.mode&1&&kf(o,u,t),t=f,l=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(l),t.updateQueue=v}else w.add(l);break e}else{if(!(t&1)){kf(o,u,t),Kd();break e}l=Error(P(426))}}else if(he&&a.mode&1){var x=_f(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Sf(x,i,a,o,t),Cd(Ks(l,a));break e}}o=l=Ks(l,a),Te!==4&&(Te=2),Io===null?Io=[o]:Io.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=oy(o,l,t);gf(o,y);break e;case 1:a=l;var m=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(tn===null||!tn.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=iy(o,a,t);gf(o,k);break e}}o=o.return}while(o!==null)}Ey(r)}catch(_){t=_,_e===r&&r!==null&&(_e=r=r.return);continue}break}while(!0)}function _y(){var e=Ka.current;return Ka.current=qa,e===null?qa:e}function Kd(){(Te===0||Te===3||Te===2)&&(Te=4),Ne===null||!(Bn&268435455)&&!(_l&268435455)||Ur(Ne,Oe)}function Qa(e,t){var r=ee;ee|=2;var n=_y();(Ne!==e||Oe!==t)&&(ir=null,$n(e,t));do try{sb();break}catch(s){ky(e,s)}while(!0);if(Nd(),ee=r,Ka.current=n,_e!==null)throw Error(P(261));return Ne=null,Oe=0,Te}function sb(){for(;_e!==null;)Sy(_e)}function ob(){for(;_e!==null&&!R0();)Sy(_e)}function Sy(e){var t=Cy(e.alternate,e,rt);e.memoizedProps=e.pendingProps,t===null?Ey(e):_e=t,zd.current=null}function Ey(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Xx(r,t),r!==null){r.flags&=32767,_e=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,_e=null;return}}else if(r=Yx(r,t,rt),r!==null){_e=r;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Te===0&&(Te=5)}function Sn(e,t,r){var n=ne,s=wt.transition;try{wt.transition=null,ne=1,ib(e,t,r,n)}finally{wt.transition=s,ne=n}return null}function ib(e,t,r,n){do Ns();while(Gr!==null);if(ee&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(F0(e,o),e===Ne&&(_e=Ne=null,Oe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||qi||(qi=!0,jy(Pa,function(){return Ns(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=wt.transition,wt.transition=null;var i=ne;ne=1;var a=ee;ee|=4,zd.current=null,eb(e,r),wy(r,e),Tx(oc),Oa=!!sc,oc=sc=null,e.current=r,tb(r),P0(),ee=a,ne=i,wt.transition=o}else e.current=r;if(qi&&(qi=!1,Gr=e,Ja=s),o=e.pendingLanes,o===0&&(tn=null),I0(r.stateNode),et(e,we()),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(Ga)throw Ga=!1,e=Ec,Ec=null,e;return Ja&1&&e.tag!==0&&Ns(),o=e.pendingLanes,o&1?e===Tc?Lo++:(Lo=0,Tc=e):Lo=0,pn(),null}function Ns(){if(Gr!==null){var e=og(Ja),t=wt.transition,r=ne;try{if(wt.transition=null,ne=16>e?16:e,Gr===null)var n=!1;else{if(e=Gr,Gr=null,Ja=0,ee&6)throw Error(P(331));var s=ee;for(ee|=4,U=e.current;U!==null;){var o=U,i=o.child;if(U.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(U=u;U!==null;){var d=U;switch(d.tag){case 0:case 11:case 15:Oo(8,d,o)}var h=d.child;if(h!==null)h.return=d,U=h;else for(;U!==null;){d=U;var p=d.sibling,f=d.return;if(gy(d),d===u){U=null;break}if(p!==null){p.return=f,U=p;break}U=f}}}var w=o.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}U=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,U=i;else e:for(;U!==null;){if(o=U,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Oo(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,U=y;break e}U=o.return}}var m=e.current;for(U=m;U!==null;){i=U;var g=i.child;if(i.subtreeFlags&2064&&g!==null)g.return=i,U=g;else e:for(i=m;U!==null;){if(a=U,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:kl(9,a)}}catch(_){ve(a,a.return,_)}if(a===i){U=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,U=k;break e}U=a.return}}if(ee=s,pn(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(pl,e)}catch{}n=!0}return n}finally{ne=r,wt.transition=t}}return!1}function Df(e,t,r){t=Ks(r,t),t=oy(e,t,1),e=en(e,t,1),t=Ve(),e!==null&&(wi(e,1,t),et(e,t))}function ve(e,t,r){if(e.tag===3)Df(e,e,r);else for(;t!==null;){if(t.tag===3){Df(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(tn===null||!tn.has(n))){e=Ks(r,e),e=iy(t,e,1),t=en(t,e,1),e=Ve(),t!==null&&(wi(t,1,e),et(t,e));break}}t=t.return}}function ab(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ve(),e.pingedLanes|=e.suspendedLanes&r,Ne===e&&(Oe&r)===r&&(Te===4||Te===3&&(Oe&130023424)===Oe&&500>we()-Hd?$n(e,0):Wd|=r),et(e,t)}function Ty(e,t){t===0&&(e.mode&1?(t=$i,$i<<=1,!($i&130023424)&&($i=4194304)):t=1);var r=Ve();e=gr(e,t),e!==null&&(wi(e,t,r),et(e,r))}function lb(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Ty(e,r)}function ub(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),Ty(e,r)}var Cy;Cy=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)Ye=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ye=!1,Qx(e,t,r);Ye=!!(e.flags&131072)}else Ye=!1,he&&t.flags&1048576&&Pg(t,Fa,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;wa(e,t),e=t.pendingProps;var s=Ws(t,Be.current);js(t,r),s=Dd(null,t,n,e,s,r);var o=Md();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,Ze(n)?(o=!0,Ma(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ad(t),s.updater=bl,t.stateNode=s,s._reactInternals=t,pc(t,n,e,r),t=yc(null,t,n,!0,o,r)):(t.tag=0,he&&o&&Ed(t),We(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(wa(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=db(n),e=jt(n,e),s){case 0:t=gc(null,t,n,e,r);break e;case 1:t=Cf(null,t,n,e,r);break e;case 11:t=Ef(null,t,n,e,r);break e;case 14:t=Tf(null,t,n,jt(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:jt(n,s),gc(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),Cf(e,t,n,s,r);case 3:e:{if(cy(t),e===null)throw Error(P(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Dg(e,t),Wa(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=Ks(Error(P(423)),t),t=jf(e,t,n,r,s);break e}else if(n!==s){s=Ks(Error(P(424)),t),t=jf(e,t,n,r,s);break e}else for(ot=Zr(t.stateNode.containerInfo.firstChild),it=t,he=!0,It=null,r=Lg(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hs(),n===s){t=yr(e,t,r);break e}We(e,t,n,r)}t=t.child}return t;case 5:return Mg(t),e===null&&dc(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,ic(n,s)?i=null:o!==null&&ic(n,o)&&(t.flags|=32),uy(e,t),We(e,t,i,r),t.child;case 6:return e===null&&dc(t),null;case 13:return dy(e,t,r);case 4:return Od(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Vs(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:jt(n,s),Ef(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,ie(Ba,n._currentValue),n._currentValue=i,o!==null)if(Mt(o.value,i)){if(o.children===s.children&&!Xe.current){t=yr(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=fr(-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),hc(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),hc(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,js(t,r),s=xt(s),n=n(s),t.flags|=1,We(e,t,n,r),t.child;case 14:return n=t.type,s=jt(n,t.pendingProps),s=jt(n.type,s),Tf(e,t,n,s,r);case 15:return ay(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:jt(n,s),wa(e,t),t.tag=1,Ze(n)?(e=!0,Ma(t)):e=!1,js(t,r),sy(t,n,s),pc(t,n,s,r),yc(null,t,n,!0,e,r);case 19:return hy(e,t,r);case 22:return ly(e,t,r)}throw Error(P(156,t.tag))};function jy(e,t){return tg(e,t)}function cb(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,566 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 vt(e,t,r,n){return new cb(e,t,r,n)}function Gd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function db(e){if(typeof e=="function")return Gd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fd)return 11;if(e===pd)return 14}return 2}function nn(e,t){var r=e.alternate;return r===null?(r=vt(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 ka(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")Gd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case hs:return Dn(r.children,s,o,t);case hd:i=8,s|=8;break;case Mu:return e=vt(12,r,t,s|2),e.elementType=Mu,e.lanes=o,e;case Uu:return e=vt(13,r,t,s),e.elementType=Uu,e.lanes=o,e;case Fu:return e=vt(19,r,t,s),e.elementType=Fu,e.lanes=o,e;case Mm:return Sl(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $m:i=10;break e;case Dm:i=9;break e;case fd:i=11;break e;case pd:i=14;break e;case $r:i=16,n=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=vt(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Dn(e,t,r,n){return e=vt(7,e,n,t),e.lanes=r,e}function Sl(e,t,r,n){return e=vt(22,e,n,t),e.elementType=Mm,e.lanes=r,e.stateNode={isHidden:!1},e}function xu(e,t,r){return e=vt(6,e,null,t),e.lanes=r,e}function bu(e,t,r){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hb(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=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Jd(e,t,r,n,s,o,i,a,l){return e=new hb(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ad(o),e}function fb(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ds,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Ny(e){if(!e)return an;e=e._reactInternals;e:{if(Vn(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(Ze(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(Ze(r))return Ng(e,r,t)}return t}function Ry(e,t,r,n,s,o,i,a,l){return e=Jd(r,n,!0,e,s,o,i,a,l),e.context=Ny(null),r=e.current,n=Ve(),s=rn(r),o=fr(n,s),o.callback=t??null,en(r,o,s),e.current.lanes=s,wi(e,s,n),et(e,n),e}function El(e,t,r,n){var s=t.current,o=Ve(),i=rn(s);return r=Ny(r),t.context===null?t.context=r:t.pendingContext=r,t=fr(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=en(s,t,i),e!==null&&(Dt(e,s,i,o),ga(e,s,i)),i}function Ya(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 Mf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Qd(e,t){Mf(e,t),(e=e.alternate)&&Mf(e,t)}function pb(){return null}var Py=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yd(e){this._internalRoot=e}Tl.prototype.render=Yd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));El(e,t,null,null)};Tl.prototype.unmount=Yd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zn(function(){El(null,e,null,null)}),t[mr]=null}};function Tl(e){this._internalRoot=e}Tl.prototype.unstable_scheduleHydration=function(e){if(e){var t=lg();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Mr.length&&t!==0&&t<Mr[r].priority;r++);Mr.splice(r,0,e),r===0&&cg(e)}};function Xd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uf(){}function mb(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=Ya(i);o.call(u)}}var i=Ry(t,n,e,0,null,!1,!1,"",Uf);return e._reactRootContainer=i,e[mr]=i.current,Go(e.nodeType===8?e.parentNode:e),zn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Ya(l);a.call(u)}}var l=Jd(e,0,!1,null,null,!1,!1,"",Uf);return e._reactRootContainer=l,e[mr]=l.current,Go(e.nodeType===8?e.parentNode:e),zn(function(){El(t,l,r,n)}),l}function jl(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=Ya(i);a.call(l)}}El(t,i,e,s)}else i=mb(r,t,e,s,n);return Ya(i)}ig=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=_o(t.pendingLanes);r!==0&&(yd(t,r|1),et(t,we()),!(ee&6)&&(Gs=we()+500,pn()))}break;case 13:zn(function(){var n=gr(e,1);if(n!==null){var s=Ve();Dt(n,e,1,s)}}),Qd(e,1)}};vd=function(e){if(e.tag===13){var t=gr(e,134217728);if(t!==null){var r=Ve();Dt(t,e,134217728,r)}Qd(e,134217728)}};ag=function(e){if(e.tag===13){var t=rn(e),r=gr(e,t);if(r!==null){var n=Ve();Dt(r,e,t,n)}Qd(e,t)}};lg=function(){return ne};ug=function(e,t){var r=ne;try{return ne=e,t()}finally{ne=r}};Qu=function(e,t,r){switch(t){case"input":if(Wu(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=vl(n);if(!s)throw Error(P(90));Fm(n),Wu(n,s)}}}break;case"textarea":zm(e,r);break;case"select":t=r.value,t!=null&&Ss(e,!!r.multiple,t,!1)}};Jm=Vd;Qm=zn;var gb={usingClientEntryPoint:!1,Events:[bi,gs,vl,Km,Gm,Vd]},go={findFiberByHostInstance:Tn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},yb={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:xr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zm(e),e===null?null:e.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||pb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ki.isDisabled&&Ki.supportsFiber)try{pl=Ki.inject(yb),Xt=Ki}catch{}}ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gb;ct.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xd(t))throw Error(P(200));return fb(e,t,null,r)};ct.createRoot=function(e,t){if(!Xd(e))throw Error(P(299));var r=!1,n="",s=Py;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Jd(e,1,!1,null,null,r,!1,n,s),e[mr]=t.current,Go(e.nodeType===8?e.parentNode:e),new Yd(t)};ct.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=Zm(t),e=e===null?null:e.stateNode,e};ct.flushSync=function(e){return zn(e)};ct.hydrate=function(e,t,r){if(!Cl(t))throw Error(P(200));return jl(null,e,t,!0,r)};ct.hydrateRoot=function(e,t,r){if(!Xd(e))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=Py;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Ry(t,null,e,1,r??null,s,!1,o,i),e[mr]=t.current,Go(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 Tl(t)};ct.render=function(e,t,r){if(!Cl(t))throw Error(P(200));return jl(null,e,t,!1,r)};ct.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(P(40));return e._reactRootContainer?(zn(function(){jl(null,null,e,!1,function(){e._reactRootContainer=null,e[mr]=null})}),!0):!1};ct.unstable_batchedUpdates=Vd;ct.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Cl(r))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return jl(e,t,r,!1,n)};ct.version="18.3.1-next-f1338f8080-20240426";function Ay(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ay)}catch(e){console.error(e)}}Ay(),Am.exports=ct;var _i=Am.exports;const Oy=wm(_i);var Iy,Ff=_i;Iy=Ff.createRoot,Ff.hydrateRoot;const vb=1,wb=1e6;let ku=0;function xb(){return ku=(ku+1)%Number.MAX_SAFE_INTEGER,ku.toString()}const _u=new Map,Bf=e=>{if(_u.has(e))return;const t=setTimeout(()=>{_u.delete(e),$o({type:"REMOVE_TOAST",toastId:e})},wb);_u.set(e,t)},bb=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,vb)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Bf(r):e.toasts.forEach(n=>{Bf(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,558 bytes, line 40
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},_a=[];let Sa={toasts:[]};function $o(e){Sa=bb(Sa,e),_a.forEach(t=>{t(Sa)})}function kb({...e}){const t=xb(),r=s=>$o({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>$o({type:"DISMISS_TOAST",toastId:t});return $o({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Zd(){const[e,t]=b.useState(Sa);return b.useEffect(()=>(_a.push(t),()=>{const r=_a.indexOf(t);r>-1&&_a.splice(r,1)}),[e]),{...e,toast:kb,dismiss:r=>$o({type:"DISMISS_TOAST",toastId:r})}}function Ee(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 zf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ly(...e){return t=>{let r=!1;const n=e.map(s=>{const o=zf(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():zf(e[s],null)}}}}function Ut(...e){return b.useCallback(Ly(...e),e)}function Nl(e,t=[]){let r=[];function n(o,i){const a=b.createContext(i),l=r.length;r=[...r,i];const u=h=>{var y;const{scope:p,children:f,...w}=h,v=((y=p==null?void 0:p[e])==null?void 0:y[l])||a,x=b.useMemo(()=>w,Object.values(w));return c.jsx(v.Provider,{value:x,children:f})};u.displayName=o+"Provider";function d(h,p){var v;const f=((v=p==null?void 0:p[e])==null?void 0:v[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,_b(s,...t)]}function _b(...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 Nc(e){const t=Sb(e),r=b.forwardRef((n,s)=>{const{children:o,...i}=n,a=b.Children.toArray(o),l=a.find(Tb);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 Sb(e){const t=b.forwardRef((r,n)=>{const{children:s,...o}=r;if(b.isValidElement(s)){const i=jb(s),a=Cb(o,s.props);return s.type!==b.Fragment&&(a.ref=n?Ly(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 $y=Symbol("radix.slottable");function Eb(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=$y,t}function Tb(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$y}function Cb(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 jb(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 Nb(e){const t=e+"CollectionProvider",[r,n]=Nl(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:x,children:y}=v,m=I.useRef(null),g=I.useRef(new Map).current;return c.jsx(s,{scope:x,itemMap:g,collectionRef:m,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=Nc(a),u=I.forwardRef((v,x)=>{const{scope:y,children:m}=v,g=o(a,y),k=Ut(x,g.collectionRef);return c.jsx(l,{ref:k,children:m})});u.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=Nc(d),f=I.forwardRef((v,x)=>{const{scope:y,children:m,...g}=v,k=I.useRef(null),_=Ut(x,k),S=o(d,y);return I.useEffect(()=>(S.itemMap.set(k,{ref:k,...g}),()=>void S.itemMap.delete(k))),c.jsx(p,{[h]:"",ref:_,children:m})});f.displayName=d;function w(v){const x=o(e+"CollectionConsumer",v);return I.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const g=Array.from(m.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((S,E)=>g.indexOf(S.ref.current)-g.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:f},w,n]}var Rb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=Rb.reduce((e,t)=>{const r=Nc(`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 Dy(e,t){e&&_i.flushSync(()=>e.dispatchEvent(t))}function ln(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 Pb(e,t=globalThis==null?void 0:globalThis.document){const r=ln(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 Ab="DismissableLayer",Rc="dismissableLayer.update",Ob="dismissableLayer.pointerDownOutside",Ib="dismissableLayer.focusOutside",Wf,My=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eh=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=b.useContext(My),[d,h]=b.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),w=Ut(t,E=>h(E)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(x),m=d?v.indexOf(d):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,k=m>=y,_=$b(E=>{const N=E.target,A=[...u.branches].some(O=>O.contains(N));!k||A||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},p),S=Db(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 Pb(E=>{m===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&&(Wf=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Hf(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Wf)}},[d,p,r,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Hf())},[d,u]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(Rc,E),()=>document.removeEventListener(Rc,E)},[]),c.jsx(tt.div,{...l,ref:w,style:{pointerEvents:g?k?"auto":"none":void 0,...e.style},onFocusCapture:Ee(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ee(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ee(e.onPointerDownCapture,_.onPointerDownCapture)})});eh.displayName=Ab;var Lb="DismissableLayerBranch",Uy=b.forwardRef((e,t)=>{const r=b.useContext(My),n=b.useRef(null),s=Ut(t,n);return b.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(tt.div,{...e,ref:s})});Uy.displayName=Lb;function $b(e,t=globalThis==null?void 0:globalThis.document){const r=ln(e),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){Fy(Ob,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 Db(e,t=globalThis==null?void 0:globalThis.document){const r=ln(e),n=b.useRef(!1);return b.useEffect(()=>{const s=o=>{o.target&&!n.current&&Fy(Ib,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 Hf(){const e=new CustomEvent(Rc);document.dispatchEvent(e)}function Fy(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?Dy(s,o):s.dispatchEvent(o)}var Mb=eh,Ub=Uy,un=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Fb="Portal",By=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=b.useState(!1);un(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Oy.createPortal(c.jsx(tt.div,{...n,ref:t}),i):null});By.displayName=Fb;function Bb(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var th=e=>{const{present:t,children:r}=e,n=zb(t),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),o=Ut(n.ref,Wb(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:o}):null};th.displayName="Presence";function zb(e){const[t,r]=b.useState(),n=b.useRef(null),s=b.useRef(e),o=b.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Bb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Gi(n.current);o.current=a==="mounted"?u:"none"},[a]),un(()=>{const u=n.current,d=s.current;if(d!==e){const p=o.current,f=Gi(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]),un(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=f=>{const v=Gi(n.current).includes(f.animationName);if(f.target===t&&v&&(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=Gi(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 Gi(e){return(e==null?void 0:e.animationName)||"none"}function Wb(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 Hb=Rm[" useInsertionEffect ".trim().toString()]||un;function Vb({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=qb({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=Kb(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 qb({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),s=b.useRef(r),o=b.useRef(t);return Hb(()=>{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 Kb(e){return typeof e=="function"}var Gb=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"}),Jb="VisuallyHidden",Rl=b.forwardRef((e,t)=>c.jsx(tt.span,{...e,ref:t,style:{...Gb,...e.style}}));Rl.displayName=Jb;var Qb=Rl,rh="ToastProvider",[nh,Yb,Xb]=Nb("Toast"),[zy,fN]=Nl("Toast",[Xb]),[Zb,Pl]=zy(rh),Wy=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 \`${rh}\`. Expected non-empty \`string\`.`),c.jsx(nh.Provider,{scope:t,children:c.jsx(Zb,{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})})};Wy.displayName=rh;var Hy="ToastViewport",ek=["F8"],Pc="toast.viewportPause",Ac="toast.viewportResume",Vy=b.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=ek,label:s="Notifications ({hotkey})",...o}=e,i=Pl(Hy,r),a=Yb(r),l=b.useRef(null),u=b.useRef(null),d=b.useRef(null),h=b.useRef(null),p=Ut(t,h,i.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;b.useEffect(()=>{const x=y=>{var g;n.length!==0&&n.every(k=>y[k]||y.code===k)&&((g=h.current)==null||g.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),b.useEffect(()=>{const x=l.current,y=h.current;if(w&&x&&y){const m=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Pc);y.dispatchEvent(S),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(Ac);y.dispatchEvent(S),i.isClosePausedRef.current=!1}},k=S=>{!x.contains(S.relatedTarget)&&g()},_=()=>{x.contains(document.activeElement)||g()};return x.addEventListener("focusin",m),x.addEventListener("focusout",k),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",_),window.addEventListener("blur",m),window.addEventListener("focus",g),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",k),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",_),window.removeEventListener("blur",m),window.removeEventListener("focus",g)}}},[w,i.isClosePausedRef]);const v=b.useCallback(({tabbingDirection:x})=>{const m=a().map(g=>{const k=g.ref.current,_=[k,...fk(k)];return x==="forwards"?_:_.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return b.useEffect(()=>{const x=h.current;if(x){const y=m=>{var _,S,E;const g=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!g){const N=document.activeElement,A=m.shiftKey;if(m.target===x&&A){(_=u.current)==null||_.focus();return}const R=v({tabbingDirection:A?"backwards":"forwards"}),B=R.findIndex(L=>L===N);Su(R.slice(B+1))?m.preventDefault():A?(S=u.current)==null||S.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,v]),c.jsxs(Ub,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx(Oc,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});Su(x)}}),c.jsx(nh.Slot,{scope:r,children:c.jsx(tt.ol,{tabIndex:-1,...o,ref:p})}),w&&c.jsx(Oc,{ref:d,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});Su(x)}})]})});Vy.displayName=Hy;var qy="ToastFocusProxy",Oc=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Pl(qy,r);return c.jsx(Rl,{"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()}})});Oc.displayName=qy;var Si="Toast",tk="toast.swipeStart",rk="toast.swipeMove",nk="toast.swipeCancel",sk="toast.swipeEnd",Ky=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=Vb({prop:n,defaultProp:s??!0,onChange:o,caller:Si});return c.jsx(th,{present:r||a,children:c.jsx(ak,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:ln(e.onPause),onResume:ln(e.onResume),onSwipeStart:Ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ee(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:Ee(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:Ee(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)})})})});Ky.displayName=Si;var[ok,ik]=zy(Si,{onClose(){}}),ak=b.forwardRef((e,t)=>
40{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,v=Pl(Si,r),[x,y]=b.useState(null),m=Ut(t,L=>y(L)),g=b.useRef(null),k=b.useRef(null),_=s||v.duration,S=b.useRef(0),E=b.useRef(_),N=b.useRef(0),{onToastAdd:A,onToastRemove:O}=v,D=ln(()=>{var G;(x==null?void 0:x.contains(document.activeElement))&&((G=v.viewport)==null||G.focus()),i()}),R=b.useCallback(L=>{!L||L===1/0||(window.clearTimeout(N.current),S.current=new Date().getTime(),N.current=window.setTimeout(D,L))},[D]);b.useEffect(()=>{const L=v.viewport;if(L){const G=()=>{R(E.current),u==null||u()},V=()=>{const z=new Date().getTime()-S.current;E.current=E.current-z,window.clearTimeout(N.current),l==null||l()};return L.addEventListener(Pc,V),L.addEventListener(Ac,G),()=>{L.removeEventListener(Pc,V),L.removeEventListener(Ac,G)}}},[v.viewport,_,l,u,R]),b.useEffect(()=>{o&&!v.isClosePausedRef.current&&R(_)},[o,_,v.isClosePausedRef,R]),b.useEffect(()=>(A(),()=>O()),[A,O]);const B=b.useMemo(()=>x?ev(x):null,[x]);return v.viewport?c.jsxs(c.Fragment,{children:[B&&c.jsx(lk,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),c.jsx(ok,{scope:r,onClose:D,children:_i.createPortal(c.jsx(nh.ItemSlot,{scope:r,children:c.jsx(Mb,{asChild:!0,onEscapeKeyDown:Ee(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||D(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(tt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...w,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ee(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:Ee(e.onPointerDown,L=>{L.button===0&&(g.current={x:L.clientX,y:L.clientY})}),onPointerMove:Ee(e.onPointerMove,L=>{if(!g.current)return;const G=L.clientX-g.current.x,V=L.clientY-g.current.y,z=!!k.current,C=["left","right"].includes(v.swipeDirection),j=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,M=C?j(0,G):0,J=C?0:j(0,V),W=L.pointerType==="touch"?10:2,Y={x:M,y:J},Z={originalEvent:L,delta:Y};z?(k.current=Y,Ji(rk,h,Z,{discrete:!1})):Vf(Y,v.swipeDirection,W)?(k.current=Y,Ji(tk,d,Z,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(G)>W||Math.abs(V)>W)&&(g.current=null)}),onPointerUp:Ee(e.onPointerUp,L=>{const G=k.current,V=L.target;if(V.hasPointerCapture(L.pointerId)&&V.releasePointerCapture(L.pointerId),k.current=null,g.current=null,G){const z=L.currentTarget,C={originalEvent:L,delta:G};Vf(G,v.swipeDirection,v.swipeThreshold)?Ji(sk,f,C,{discrete:!0}):Ji(nk,p,C,{discrete:!0}),z.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),lk=e=>{const{__scopeToast:t,children:r,...n}=e,s=Pl(Si,t),[o,i]=b.useState(!1),[a,l]=b.useState(!1);return dk(()=>i(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(By,{asChild:!0,children:c.jsx(Rl,{...n,children:o&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},uk="ToastTitle",Gy=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(tt.div,{...n,ref:t})});Gy.displayName=uk;var ck="ToastDescription",Jy=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(tt.div,{...n,ref:t})});Jy.displayName=ck;var Qy="ToastAction",Yy=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(Zy,{altText:r,asChild:!0,children:c.jsx(sh,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Qy}\`. Expected non-empty \`string\`.`),null)});Yy.displayName=Qy;var Xy="ToastClose",sh=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=ik(Xy,r);return c.jsx(Zy,{asChild:!0,children:c.jsx(tt.button,{type:"button",...n,ref:t,onClick:Ee(e.onClick,s.onClose)})})});sh.displayName=Xy;var Zy=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(tt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function ev(e){const t=[];
vendor: 6,884 bytes, lines 40-105
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),hk(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(...ev(n))}}),t}function Ji(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?Dy(s,o):s.dispatchEvent(o)}var Vf=(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 dk(e=()=>{}){const t=ln(e);un(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function hk(e){return e.nodeType===e.ELEMENT_NODE}function fk(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 Su(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var pk=Wy,tv=Vy,rv=Ky,nv=Gy,sv=Jy,ov=Yy,iv=sh;function av(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=av(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function lv(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=av(e))&&(n&&(n+=" "),n+=t);return n}const qf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kf=lv,mk=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Kf(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=qf(d)||qf(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[v,x]=w;return Array.isArray(x)?x.includes({...o,...a}[v]):{...o,...a}[v]===x})?[...u,h,p]:u},[]);return Kf(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const gk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uv=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var yk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const vk=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,...yk,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:uv("lucide",s),...a},[...i.map(([u,d])=>b.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const br=(e,t)=>{const r=b.forwardRef(({className:n,...s},o)=>b.createElement(vk,{ref:o,iconNode:t,className:uv(`lucide-${gk(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const mn=br("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const at=br("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const wk=br("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const xk=br("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const cv=br("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Xa=br("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const bk=br("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const Gf=br("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const kk=br("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,361 bytes, line 105
105],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),oh="-",_k=e=>{const t=Ek(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(oh);return a[0]===""&&a.length!==1&&a.shift(),dv(a,t)||Sk(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},dv=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?dv(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(oh);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Jf=/^\[(.+)\]$/,Sk=e=>{if(Jf.test(e)){const t=Jf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ek=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Ck(Object.entries(e.classGroups),r).forEach(([o,i])=>{Ic(i,n,o,t)}),n},Ic=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Qf(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(Tk(s)){Ic(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Ic(i,Qf(t,o),r,n)})})},Qf=(e,t)=>{let r=e;return t.split(oh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Tk=e=>e.isThemeGetter,Ck=(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,jk=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)}}},hv="!",Nk=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 y=a[x];if(u===0){if(y===s&&(n||a.slice(x,x+o)===t)){l.push(a.slice(d,x)),d=x+o;continue}if(y==="/"){h=x;continue}}y==="["?u++:y==="]"&&u--}const p=l.length===0?a:a.substring(d),f=p.startsWith(hv),w=f?p.substring(1):p,v=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:i}):i},Rk=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},Pk=e=>({cache:jk(e.cacheSize),parseClassName:Nk(e),..._k(e)}),Ak=/\s+/,Ok=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(Ak);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,v=n(w?p.substring(0,f):p);if(!v){if(!w){a=u+(a.length>0?" "+a:a);continue}if(v=n(p),!v){a=u+(a.length>0?" "+a:a);continue}w=!1}const x=Rk(d).join(":"),y=h?x+hv:x,m=y+v;if(o.includes(m))continue;o.push(m);const g=s(v,w);for(let k=0;k<g.length;++k){const _=g[k];o.push(y+_)}a=u+(a.length>0?" "+a:a)}return a};function Ik(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=fv(t))&&(n&&(n+=" "),n+=r);return n}const fv=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=fv(e[n]))&&(r&&(r+=" "),r+=t);return r};function Lk(e,...t){let r,n,s,o=i;function i(l){const u=t.reduce((d,h)=>h(d),e());return r=Pk(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=Ok(l,r);return s(l,d),d}return function(){return o(Ik.apply(null,arguments))}}const ae=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},pv=/^\[(?:([a-z-]+):)?(.+)\]$/i,$k=/^\d+\/\d+$/,Dk=new Set(["px","full","screen"]),Mk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uk=/\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$/,Fk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>Rs(e)||Dk.has(e)||$k.test(e),Ar=e=>eo(e,"length",Qk),Rs=e=>!!e&&!Number.isNaN(Number(e)),Eu=e=>eo(e,"number",Rs),yo=e=>!!e&&Number.isInteger(Number(e)),Wk=e=>e.endsWith("%")&&Rs(e.slice(0,-1)),Q=e=>pv.test(e),Or=e=>Mk.test(e),Hk=new Set(["length","size","percentage"]),Vk=e=>eo(e,Hk,mv),qk=e=>eo(e,"position",mv),Kk=new Set(["image","url"]),Gk=e=>eo(e,Kk,Xk),Jk=e=>eo(e,"",Yk),vo=()=>!0,eo=(e,t,r)=>{const n=pv.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Qk=e=>Uk.test(e)&&!Fk.test(e),mv=()=>!1,Yk=e=>Bk.test(e),Xk=e=>zk.test(e),Zk=()=>{const e=ae("colors"),t=ae("spacing"),r=ae("blur"),n=ae("brightness"),s=ae("borderColor"),o=ae("borderRadius"),i=ae("borderSpacing"),a=ae("borderWidth"),l=ae("contrast"),u=ae("grayscale"),d=ae("hueRotate"),h=ae("invert"),p=ae("gap"),f=ae("gradientColorStops"),w=ae("gradientColorStopPositions"),v=ae("inset"),x=ae("margin"),y=ae("opacity"),m=ae("padding"),g=ae("saturate"),k=ae("scale"),_=ae("sepia"),S=ae("skew"),E=ae("space"),N=ae("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Q,t],R=()=>[Q,t],B=()=>["",nr,Ar],L=()=>["auto",Rs,Q],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],
vendor: 12,499 bytes, line 105
105V=()=>["solid","dashed","dotted","double","none"],z=()=>["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"],j=()=>["","0",Q],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Rs,Q];return{cacheSize:500,separator:":",theme:{colors:[vo],spacing:[nr,Ar],blur:["none","",Or,Q],brightness:J(),borderColor:[e],borderRadius:["none","","full",Or,Q],borderSpacing:R(),borderWidth:B(),contrast:J(),grayscale:j(),hueRotate:J(),invert:j(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[Wk,Ar],inset:D(),margin:D(),opacity:J(),padding:R(),saturate:J(),scale:J(),sepia:j(),skew:J(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[Or]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Q]}],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:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yo,Q]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",yo,Q]}],"grid-cols":[{"grid-cols":[vo]}],"col-start-end":[{col:["auto",{span:["full",yo,Q]},Q]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[vo]}],"row-start-end":[{row:["auto",{span:[yo,Q]},Q]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],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:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[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",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[Or]},Or]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Or,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Eu]}],"font-family":[{font:[vo]}],"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",Q]}],"line-clamp":[{"line-clamp":["none",Rs,Eu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nr,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nr,Ar]}],"underline-offset":[{"underline-offset":["auto",nr,Q]}],"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:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],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",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),qk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Vk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Gk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"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":[y]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:V()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[nr,Q]}],"outline-w":[{outline:[nr,Ar]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[nr,Ar]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Or,Jk]}],"shadow-color":[{shadow:[vo]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Or,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[g]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",Q]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yo,Q]}],"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",Q]}],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",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nr,Ar,Eu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
105none"]}]},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"]}}},e1=Lk(Zk);function qn(...e){return e1(lv(e))}const t1=pk,gv=b.forwardRef(({className:e,...t},r)=>c.jsx(tv,{ref:r,className:qn("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}));gv.displayName=tv.displayName;const r1=mk("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"}}),yv=b.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(rv,{ref:n,className:qn(r1({variant:t}),e),...r}));yv.displayName=rv.displayName;const n1=b.forwardRef(({className:e,...t},r)=>c.jsx(ov,{ref:r,className:qn("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}));n1.displayName=ov.displayName;const vv=b.forwardRef(({className:e,...t},r)=>c.jsx(iv,{ref:r,className:qn("absolute right-2 top-2 rounded-md p-1 text-foreground
105/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(kk,{className:"h-4 w-4"})}));vv.displayName=iv.displayName;const wv=b.forwardRef(({className:e,...t},r)=>c.jsx(nv,{ref:r,className:qn("text-sm font-semibold",e),...t}));wv.displayName=nv.displayName;const xv=b.forwardRef(({className:e,...t},r)=>c.jsx(sv,{ref:r,className:qn("text-sm opacity-90",e),...t}));xv.displayName=sv.displayName;function s1(){const{toasts:e}=Zd();return c.jsxs(t1,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return c.jsxs(yv,{...o,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(wv,{children:r}),n&&c.jsx(xv,{children:n})]}),s,c.jsx(vv,{})]},t)}),c.jsx(gv,{})]})}var Yf=["light","dark"],o1="(prefers-color-scheme: dark)",i1=b.createContext(void 0),a1={setTheme:e=>{},themes:[]},l1=()=>{var e;return(e=b.useContext(i1))!=null?e:a1};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?Yf.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,v=!1,x=!0)=>{let y=i?i[w]:w,m=v?w+"|| ''":`'${y}'`,g="";return s&&x&&!v&&Yf.includes(w)&&(g+=`d.style.colorScheme = '${w}';`),r==="class"?v||y?g+=`c.add(${m})`:g+="null":y&&(g+=`d[s](n,${m})`),g},f=e?`!function(){${d}${p(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${o1}',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 u1=e=>{switch(e){case"success":return h1;case"info":return p1;case"warning":return f1;case"error":return m1;default:return null}},c1=Array(12).fill(0),d1=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},c1.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),h1=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),f1=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),p1=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),m1=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),g1=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),y1=()=>
105{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Lc=1,v1=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:Lc++,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)=>
105this.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],I.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(x1(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)||Lc++;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}},Je=new v1,w1=(e,t)=>{let r=(t==null?void 0:t.id)||Lc++;return Je.addToast({title:e,...t,id:r}),r},x1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",b1=w1,k1=()=>Je.toasts,_1=()=>Je.getActiveToasts();Object.assign(b1,{success:Je.success,info:Je.info,warning:Je.warning,error:Je.error,custom:Je.custom,message:Je.message,promise:Je.promise,dismiss:Je.dismiss,loading:Je.loading},{getHistory:k1,getToasts:_1});function S1(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))}S1(`: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;
105left: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}
105: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%);
105--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%)} 106`);function Qi(e){return e.label!==void 0}var E1=3,T1="32px",C1="16px",Xf=4e3,j1=356,N1=14,R1=20,P1=200;function Tt(...e){return e.filter(Boolean).join(" ")}function A1(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var O1=e=>{var t,r,n,s,o,i,a,l,u,d,h;let{invert:p,toast:f,unstyled:w,interacting:v,setHeights:x,visibleToasts:y,heights:m,index:g,toasts:k,expanded:_,removeToast:S,defaultRichColors:E,closeButton:N,style:A,cancelButtonStyle:O,actionButtonStyle:D,className:R="",descriptionClassName:B="",duration:L,position:G,gap:V,loadingIcon:z,expandByDefault:C,classNames:j,icons:M,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:W}
106=e,[Y,Z]=I.useState(null),[be,Le]=I.useState(null),[re,Gn]=I.useState(!1),[Er,vn]=I.useState(!1),[Tr,Jn]=I.useState(!1),[Cr,Ci]=I.useState(!1),[Vl,ji]=I.useState(!1),[ql,io]=I.useState(0),[Qn,Sh]=I.useState(0),ao=I.useRef(f.duration||L||Xf),Eh=I.useRef(null),wn=I.useRef(null),Dw=g===0,Mw=g+1<=y,ht=f.type,Yn=f.dismissible!==!1,Uw=f.className||"",Fw=f.descriptionClassName||"",Ni=I.useMemo(()=>m.findIndex(q=>q.toastId===f.id)||0,[m,f.id]),Bw=I.useMemo(()=>{var q;return(q=f.closeButton)!=null?q:N},[f.closeButton,N]),Th=I.useMemo(()=>f.duration||L||Xf,[f.duration,L]),Kl=I.useRef(0),Xn=I.useRef(0),Ch=I.useRef(0),Zn=I.useRef(null),[zw,Ww]=G.split("-"),jh=I.useMemo(()=>m.reduce((q,se,de)=>de>=Ni?q:q+se.height,0),[m,Ni]),Nh=y1(),Hw=f.invert||p,Gl=ht==="loading";Xn.current=I.useMemo(()=>Ni*V+jh,[Ni,jh]),I.useEffect(()=>{ao.current=Th},[Th]),I.useEffect(()=>{Gn(!0)},[]),I.useEffect(()=>{let q=wn.current;if(q){let se=q.getBoundingClientRect().height;return Sh(se),x(de=>[{toastId:f.id,height:se,position:f.position},...de]),()=>x(de=>de.filter(kt=>kt.toastId!==f.id))}},[x,f.id]),I.useLayoutEffect(()=>{if(!re)return;let q=wn.current,se=q.style.height;q.style.height="auto";let de=q.getBoundingClientRect().height;q.style.height=se,Sh(de),x(kt=>kt.find(_t=>_t.toastId===f.id)?kt.map(_t=>_t.toastId===f.id?{..._t,height:de}:_t):[{toastId:f.id,height:de,position:f.position},...kt])},[re,f.title,f.description,x,f.id]);let jr=I.useCallback(()=>{vn(!0),io(Xn.current),x(q=>q.filter(se=>se.toastId!==f.id)),setTimeout(()=>{S(f)},P1)},[f,S,x,Xn]);I.useEffect(()=>{if(f.promise&&ht==="loading"||f.duration===1/0||f.type==="loading")return;let q;return _||v||W&&Nh?(()=>{if(Ch.current<Kl.current){let se=new Date().getTime()-Kl.current;ao.current=ao.current-se}Ch.current=new Date().getTime()})():ao.current!==1/0&&(Kl.current=new Date().getTime(),q=setTimeout(()=>{var se;(se=f.onAutoClose)==null||se.call(f,f),jr()},ao.current)),()=>clearTimeout(q)},[_,v,f,ht,W,Nh,jr]),I.useEffect(()=>{f.delete&&jr()},[jr,f.delete]);function Vw(){var q,se,de;return M!=null&&M.loading?I.createElement("div",{className:Tt(j==null?void 0:j.loader,(q=f==null?void 0:f.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":ht==="loading"},M.loading):z?I.createElement("div",{className:Tt(j==null?void 0:j.loader,(se=f==null?void 0:f.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":ht==="loading"},z):I.createElement(d1,{className:Tt(j==null?void 0:j.loader,(de=f==null?void 0:f.classNames)==null?void 0:de.loader),visible:ht==="loading"})}return I.createElement("li",{tabIndex:0,ref:wn,className:Tt(R,Uw,j==null?void 0:j.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[ht],(r=f==null?void 0:f.classNames)==null?void 0:r[ht]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:E,"data-styled":!(f.jsx||f.unstyled||w),"data-mounted":re,"data-
106promise":!!f.promise,"data-swiped":Vl,"data-removed":Er,"data-visible":Mw,"data-y-position":zw,"data-x-position":Ww,"data-index":g,"data-front":Dw,"data-swiping":Tr,"data-dismissible":Yn,"data-type":ht,"data-invert":Hw,"data-swipe-out":Cr,"data-swipe-direction":be,"data-expanded":!!(_||C&&re),style:{"--index":g,"--toasts-before":g,"--z-index":k.length-g,"--offset":`${Er?ql:Xn.current}px`,"--initial-height":C?"auto":`${Qn}px`,...A,...f.style},onDragEnd:()=>{Jn(!1),Z(null),Zn.current=null},onPointerDown:q=>{Gl||!Yn||(Eh.current=new Date,io(Xn.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(Jn(!0),Zn.current={x:q.clientX,y:q.clientY}))},onPointerUp:()=>{var q,se,de,kt;if(Cr||!Yn)return;Zn.current=null;let _t=Number(((q=wn.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nr=Number(((se=wn.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xn=new Date().getTime()-((de=Eh.current)==null?void 0:de.getTime()),St=Y==="x"?_t:Nr,Rr=Math.abs(St)/xn;if(Math.abs(St)>=R1||Rr>.11){io(Xn.current),(kt=f.onDismiss)==null||kt.call(f,f),Le(Y==="x"?_t>0?"right":"left":Nr>0?"down":"up"),jr(),Ci(!0),ji(!1);return}Jn(!1),Z(null)},onPointerMove:q=>{var se,de,kt,_t;if(!Zn.current||!Yn||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;let Nr=q.clientY-Zn.current.y,xn=q.clientX-Zn.current.x,St=(de=e.swipeDirections)!=null?de:A1(G);!Y&&(Math.abs(xn)>1||Math.abs(Nr)>1)&&Z(Math.abs(xn)>Math.abs(Nr)?"x":"y");let Rr={x:0,y:0};Y==="y"?(St.includes("top")||St.includes("bottom"))&&(St.includes("top")&&Nr<0||St.includes("bottom")&&Nr>0)&&(Rr.y=Nr):Y==="x"&&(St.includes("left")||St.includes("right"))&&(St.includes("left")&&xn<0||St.includes("right")&&xn>0)&&(Rr.x=xn),(Math.abs(Rr.x)>0||Math.abs(Rr.y)>0)&&ji(!0),(kt=wn.current)==null||kt.style.setProperty("--swipe-amount-x",`${Rr.x}px`),(_t=wn.current)==null||_t.style.setProperty("--swipe-amount-y",`${Rr.y}px`)}},Bw&&!f.jsx?I.createElement("button",{"aria-label":J,"data-disabled":Gl,"data-close-button":!0,onClick:Gl||!Yn?()=>{}:()=>{var q;jr(),(q=f.onDismiss)==null||q.call(f,f)},className:Tt(j==null?void 0:j.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(o=M==null?void 0:M.close)!=null?o:g1):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:I.createElement(I.Fragment,null,ht||f.icon||f.promise?I.createElement("div",{"data-icon":"",className:Tt(j==null?void 0:j.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Vw():null,f.type!=="loading"?f.icon||(M==null?void 0:M[ht])||u1(ht):null):null,I.createElement("div",{"data-content":"",className:Tt(j==null?void 0:j.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Tt(j==null?void 0:j.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?I.createElement("div",{"data-description":"",className:Tt(B,Fw,j==null?void 0:j.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&&Qi(f.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||O,onClick:q=>{var se,de;Qi(f.cancel)&&Yn&&((de=(se=f.cancel).onClick)==null||de.call(se,q),jr())},className:Tt(j==null?void 0:j.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&&Qi(f.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:q=>{var se,de;Qi(f.action)&&((de=(se=f.action).onClick)==null||de.call(se,q),!q.defaultPrevented&&jr())},className:Tt(j==null?void 0:j.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Zf(){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 I1(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?C1:T1;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 L1=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=E1,toastOptions:v,dir:x=Zf(),gap:y=N1,loadingIcon:m,icons:g,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:_}=e,[S,E]=I.useState([]),N=I.useMemo(()=>Array.from(new Set([n].concat(S.filter(W=>W.position).map(W=>
vendor: 4,170 bytes, line 106
106W.position)))),[S,n]),[A,O]=I.useState([]),[D,R]=I.useState(!1),[B,L]=I.useState(!1),[G,V]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=I.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=I.useRef(null),M=I.useRef(!1),J=I.useCallback(W=>{E(Y=>{var Z;return(Z=Y.find(be=>be.id===W.id))!=null&&Z.delete||Je.dismiss(W.id),Y.filter(({id:be})=>be!==W.id)})},[]);return I.useEffect(()=>Je.subscribe(W=>{if(W.dismiss){E(Y=>Y.map(Z=>Z.id===W.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{Oy.flushSync(()=>{E(Y=>{let Z=Y.findIndex(be=>be.id===W.id);return Z!==-1?[...Y.slice(0,Z),{...Y[Z],...W},...Y.slice(Z+1)]:[W,...Y]})})})}),[]),I.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:Y})=>{V(Y?"dark":"light")})}catch{W.addListener(({matches:Z})=>{try{V(Z?"dark":"light")}catch(be){console.error(be)}})}},[d]),I.useEffect(()=>{S.length<=1&&R(!1)},[S]),I.useEffect(()=>{let W=Y=>{var Z,be;s.every(Le=>Y[Le]||Y.code===Le)&&(R(!0),(Z=z.current)==null||Z.focus()),Y.code==="Escape"&&(document.activeElement===z.current||(be=z.current)!=null&&be.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),I.useEffect(()=>{if(z.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,M.current=!1)}},[z.current]),I.createElement("section",{ref:t,"aria-label":`${k} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((W,Y)=>{var Z;let[be,Le]=W.split("-");return S.length?I.createElement("ol",{key:W,dir:x==="auto"?Zf():x,tabIndex:-1,ref:z,className:a,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":be,"data-lifted":D&&S.length>1&&!o,"data-x-position":Le,style:{"--front-toast-height":`${((Z=A[0])==null?void 0:Z.height)||0}px`,"--width":`${j1}px`,"--gap":`${y}px`,...f,...I1(l,u)},onBlur:re=>{M.current&&!re.currentTarget.contains(re.relatedTarget)&&(M.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||M.current||(M.current=!0,j.current=re.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{B||R(!1)},onDragEnd:()=>R(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},S.filter(re=>!re.position&&Y===0||re.position===W).map((re,Gn)=>{var Er,vn;return I.createElement(O1,{key:re.id,icons:g,index:Gn,toast:re,defaultRichColors:h,duration:(Er=v==null?void 0:v.duration)!=null?Er:p,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:w,closeButton:(vn=v==null?void 0:v.closeButton)!=null?vn:i,interacting:B,position:W,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:J,toasts:S.filter(Tr=>Tr.position==re.position),heights:A.filter(Tr=>Tr.position==re.position),setHeights:O,expandByDefault:o,gap:y,loadingIcon:m,expanded:D,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const $1=({...e})=>{const{theme:t="system"}=l1();return c.jsx(L1,{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})},D1=["top","right","bottom","left"],cn=Math.min,nt=Math.max,Za=Math.round,Yi=Math.floor,er=e=>({x:e,y:e}
vendor: 11,921 bytes, line 106
106),M1={left:"right",right:"left",bottom:"top",top:"bottom"},U1={start:"end",end:"start"};function $c(e,t,r){return nt(e,cn(t,r))}function vr(e,t){return typeof e=="function"?e(t):e}function wr(e){return e.split("-")[0]}function to(e){return e.split("-")[1]}function ih(e){return e==="x"?"y":"x"}function ah(e){return e==="y"?"height":"width"}const F1=new Set(["top","bottom"]);function Yt(e){return F1.has(wr(e))?"y":"x"}function lh(e){return ih(Yt(e))}function B1(e,t,r){r===void 0&&(r=!1);const n=to(e),s=lh(e),o=ah(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=el(i)),[i,el(i)]}function z1(e){const t=el(e);return[Dc(e),t,Dc(t)]}function Dc(e){return e.replace(/start|end/g,t=>U1[t])}const ep=["left","right"],tp=["right","left"],W1=["top","bottom"],H1=["bottom","top"];function V1(e,t,r){switch(e){case"top":case"bottom":return r?t?tp:ep:t?ep:tp;case"left":case"right":return t?W1:H1;default:return[]}}function q1(e,t,r,n){const s=to(e);let o=V1(wr(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Dc)))),o}function el(e){return e.replace(/left|right|bottom|top/g,t=>M1[t])}function K1(e){return{top:0,right:0,bottom:0,left:0,...e}}function bv(e){return typeof e!="number"?K1(e):{top:e,right:e,bottom:e,left:e}}function tl(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 rp(e,t,r){let{reference:n,floating:s}=e;const o=Yt(t),i=lh(t),a=ah(i),l=wr(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(to(t)){case"start":f[i]-=p*(r&&u?-1:1);break;case"end":f[i]+=p*(r&&u?-1:1);break}return f}const G1=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}=rp(u,n,l),p=n,f={},w=0;for(let v=0;v<a.length;v++){const{name:x,fn:y}=a[v],{x:m,y:g,data:k,reset:_}=await y({x:d,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});d=m??d,h=g??h,f={...f,[x]:{...f[x],...k}},_&&w<=50&&(w++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(u=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:d,y:h}=rp(u,p,l)),v=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:f}};async function ni(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}=vr(t,e),w=bv(f),x=a[p?h==="floating"?"reference":"floating":h],y=tl(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})),m=h==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},_=tl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:g,strategy:l}):m);return{top:(y.top-_.top+w.top)/k.y,bottom:(_.bottom-y.bottom+w.bottom)/k.y,left:(y.left-_.left+w.left)/k.x,right:(_.right-y.right+w.right)/k.x}}const J1=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}=vr(e,t)||{};if(u==null)return{};const h=bv(d),p={x:r,y:n},f=lh(s),w=ah(f),v=await i.getDimensions(u),x=f==="y",y=x?"top":"left",m=x?"bottom":"right",g=x?"clientHeight":"clientWidth",k=o.reference[w]+o.reference[f]-p[f]-o.floating[w],_=p[f]-o.reference[f],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=S?S[g]:0;(!E||!await(i.isElement==null?void 0:i.isElement(S)))&&(E=a.floating[g]||o.floating[w]);const N=k/2-_/2,A=E/2-v[w]/2-1,O=cn(h[y],A),D=cn(h[m],A),R=O,B=E-v[w]-D,L=E/2-v[w]/2+N,G=$c(R,L,B),V=!l.arrow&&to(s)!=null&&L!==G&&o.reference[w]/2-(L<R?O:D)-v[w]/2<0,z=V?L<R?L-R:L-B:0;return{[f]:p[f]+z,data:{[f]:G,centerOffset:L-G-z,...V&&{alignmentOffset:z}},reset:V}}}),Q1=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:v=!0,...x}=vr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const y=wr(s),m=Yt(a),g=wr(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(g||!v?[el(a)]:z1(a)),S=w!=="none";!p&&S&&_.push(...q1(a,v,w,k));const E=[a,..._],N=await ni(t,x),A=[];let O=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&A.push(N[y]),h){const L=B1(s,i,k);A.push(N[L[0]],N[L[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(L=>L<=0)){var D,R;const L=(((D=o.flip)==null?void 0:D.index)||0)+1,G=E[L];if(G&&(!(h==="alignment"?m!==Yt(G):!1)||O.every(C=>C.overflows[0]>0&&Yt(C.placement)===m)))return{data:{index:L,overflows:O},reset:{placement:G}};let V=(R=O.filter(z=>z.overflows[0]<=0).sort((z,C)=>z.overflows[1]-C.overflows[1])[0])==null?void 0:R.placement;if(!V)switch(f){case"bestFit":{var B;const z=(B=O.filter(C=>{if(S){const j=Yt(C.placement);return j===m||j==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(j=>j>0).reduce((j,M)=>j+M,0)]).sort((C,j)=>C[1]-j[1])[0])==null?void 0:B[0];z&&(V=z);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function np(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sp(e){return D1.some(t=>e[t]>=0)}const Y1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=vr(e,t);switch(n){case"referenceHidden":{const o=await ni(t,{...s,elementContext:"reference"}),i=np(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:sp(i)}}}case"escaped":{const o=await ni(t,{...s,altBoundary:!0}),i=np(o,r.floating);return{data:{escapedOffsets:i,escaped:sp(i)}}}default:return{}}}}},kv=new Set(["left","top"]);async function X1(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=wr(r),a=to(r),l=Yt(r)==="y",u=kv.has(i)?-1:1,d=o&&l?-1:1,h=vr(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 Z1=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 X1(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}}}}},e_=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:y,y:m}=x;return{x:y,y:m}}},...l}=vr(e,t),u={x:r,y:n},d=await ni(t,l),h=Yt(wr(s)),p=ih(h);let f=u[p],w=u[h];if(o){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",m=f+d[x],g=f-d[y];f=$c(m,f,g)}if(i){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",m=w+d[x],g=w-d[y];w=$c(m,w,g)}const v=a.fn({...t,[p]:f,[h]:w});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:o,[h]:i}}}}}},t_=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}=vr(e,t),d={x:r,y:n},h=Yt(s),p=ih(h);let f=d[p],w=d[h];const v=vr(a,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const g=p==="y"?"height":"width",k=o.reference[p]-o.floating[g]+x.mainAxis,_=o.reference[p]+o.reference[g]-x.mainAxis;f<k?f=k:f>_&&(f=_)}if(u){var y,m;const g=p==="y"?"width":"height",k=kv.has(wr(s)),_=o.reference[h]-o.floating[g]+(k&&((y=i.offset)==null?void 0:y[h])||0)+(k?0:x.crossAxis),S=o.reference[h]+o.reference[g]+(k?0:((m=i.offset)==null?void 0:m[h])||0)-(k?x.crossAxis:0);w<_?w=_:w>S&&(w=S)}return{[p]:f,[h]:w}}}},r_=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}=vr(e,t),d=await ni(t,u),h=wr(s),p=to(s),f=Yt(s)==="y",{width:w,height:v}=o.floating;let x,y;h==="top"||h==="bottom"?(x=h,y=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,x=p==="end"?"top":"bottom");const m=v-d.top-d.bottom,g=w-d.left-d.right,k=cn(v-d[x],m),_=cn(w-d[y],g),S=!t.middlewareData.shift;let E=k,N=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=g),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=m),S&&!p){const O=nt(d.left,0),D=nt(d.right,0),R=nt(d.top,0),B=nt(d.bottom,0);f?N=w-2*(O!==0||D!==0?O+D:nt(d.left,d.right)):E=v-2*(R!==0||B!==0?R+B:nt(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:E});const A=await i.getDimensions(a.floating);return w!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function Al(){return typeof window<"u"}function ro(e){return _v(e)?(e.nodeName||"").toLowerCase():"#document"}function lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rr(e){var t;return(t=(_v(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _v(e){return Al()?e instanceof Node||e instanceof lt(e).Node:!1}function Ft(e){return Al()?e instanceof Element||e instanceof lt(e).Element:!1}function tr(e){return Al()?e instanceof HTMLElement||e instanceof lt(e).HTMLElement:!1}function op(e){return!Al()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lt(e).ShadowRoot}const n_=new Set(["inline","contents"]);function Ei(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!n_.has(s)}const s_=new Set(["table","td","th"]);function o_(e){return s_.has(ro(e))}const i_=[":popover-open",":modal"];function Ol(e){return i_.some(t=>{try{return e.matches(t)}catch{return!1}})}const a_=["transform","translate","scale","rotate","perspective"],l_=["transform","translate","scale","rotate","perspective","filter"],u_=["paint","layout","strict","content"];function uh(e){const t=ch(),r=Ft(e)?Bt(e):e;return a_.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)||l_.some(n=>(r.willChange||"").includes(n))||u_.some(n=>(r.contain||"").includes(n))}function c_(e){let t=dn(e);for(;tr(t)&&!Js(t);){if(uh(t))return t;if(Ol(t))return null;t=dn(t)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const d_=new Set(["html","body","#document"]);function Js(e){return d_.has(ro(e))}function Bt(e){return lt(e).getComputedStyle(e)}function Il(e){return Ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dn(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||op(e)&&e.host||rr(e);return op(t)?t.host:t}function Sv(e){const t=dn(e);return Js(t)?e.ownerDocument?e.ownerDocument.body:e.body:tr(t)&&Ei(t)?t:Sv(t)}function si(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sv(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=lt(s);if(o){const a=Mc(i);
vendor: 4,919 bytes, line 106
106return t.concat(i,i.visualViewport||[],Ei(s)?s:[],a&&r?si(a):[])}return t.concat(s,si(s,[],r))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ev(e){const t=Bt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=tr(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=Za(r)!==o||Za(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function dh(e){return Ft(e)?e:e.contextElement}function Ps(e){const t=dh(e);if(!tr(t))return er(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Ev(t);let i=(o?Za(r.width):r.width)/n,a=(o?Za(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const h_=er(0);function Tv(e){const t=lt(e);return!ch()||!t.visualViewport?h_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f_(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==lt(e)?!1:t}function Wn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=dh(e);let i=er(1);t&&(n?Ft(n)&&(i=Ps(n)):i=Ps(e));const a=f_(o,r,n)?Tv(o):er(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=lt(o),f=n&&Ft(n)?lt(n):n;let w=p,v=Mc(w);for(;v&&n&&f!==w;){const x=Ps(v),y=v.getBoundingClientRect(),m=Bt(v),g=y.left+(v.clientLeft+parseFloat(m.paddingLeft))*x.x,k=y.top+(v.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,h*=x.y,l+=g,u+=k,w=lt(v),v=Mc(w)}}return tl({width:d,height:h,x:l,y:u})}function hh(e,t){const r=Il(e).scrollLeft;return t?t.left+r:Wn(rr(e)).left+r}function Cv(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:hh(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function p_(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=rr(n),a=t?Ol(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=er(1);const d=er(0),h=tr(n);if((h||!h&&!o)&&((ro(n)!=="body"||Ei(i))&&(l=Il(n)),tr(n))){const f=Wn(n);u=Ps(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const p=i&&!h&&!o?Cv(i,l,!0):er(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 m_(e){return Array.from(e.getClientRects())}function g_(e){const t=rr(e),r=Il(e),n=e.ownerDocument.body,s=nt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=nt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+hh(e);const a=-r.scrollTop;return Bt(n).direction==="rtl"&&(i+=nt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function y_(e,t){const r=lt(e),n=rr(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=ch();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const v_=new Set(["absolute","fixed"]);function w_(e,t){const r=Wn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=tr(e)?Ps(e):er(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 ip(e,t,r){let n;if(t==="viewport")n=y_(e,r);else if(t==="document")n=g_(rr(e));else if(Ft(t))n=w_(t,r);else{const s=Tv(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return tl(n)}function jv(e,t){const r=dn(e);return r===t||!Ft(r)||Js(r)?!1:Bt(r).position==="fixed"||jv(r,t)}function x_(e,t){const r=t.get(e);if(r)return r;let n=si(e,[],!1).filter(a=>Ft(a)&&ro(a)!=="body"),s=null;const o=Bt(e).position==="fixed";let i=o?dn(e):e;for(;Ft(i)&&!Js(i);){const a=Bt(i),l=uh(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&v_.has(s.position)||Ei(i)&&!l&&jv(e,i))?n=n.filter(d=>d!==i):s=a,i=dn(i)}return t.set(e,n),n}function b_(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Ol(t)?[]:x_(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((u,d)=>{const h=ip(t,d,s);return u.top=nt(h.top,u.top),u.right=cn(h.right,u.right),u.bottom=cn(h.bottom,u.bottom),u.left=nt(h.left,u.left),u},ip(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function k_(e){const{width:t,height:r}=Ev(e);return{width:t,height:r}}function __(e,t,r){const n=tr(t),s=rr(t),o=r==="fixed",i=Wn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=er(0);function u(){l.x=hh(s)}if(n||!n&&!o)if((ro(t)!=="body"||Ei(s))&&(a=Il(t)),n){const f=Wn(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?Cv(s,a):er(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 Tu(e){return Bt(e).position==="static"}function ap(e,t){if(!tr(e)||Bt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rr(e)===r&&(r=r.ownerDocument.body),r}function Nv(e,t){const r=lt(e);if(Ol(e))return r;if(!tr(e)){let s=dn(e);for(;s&&!Js(s);){if(Ft(s)&&!Tu(s))return s;s=dn(s)}return r}let n=ap(e,t);for(;n&&o_(n)&&Tu(n);)n=ap(n,t);
vendor: 8,841 bytes, line 106
106return n&&Js(n)&&Tu(n)&&!uh(n)?r:n||c_(e)||r}const S_=async function(e){const t=this.getOffsetParent||Nv,r=this.getDimensions,n=await r(e.floating);return{reference:__(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function E_(e){return Bt(e).direction==="rtl"}const T_={convertOffsetParentRelativeRectToViewportRelativeRect:p_,getDocumentElement:rr,getClippingRect:b_,getOffsetParent:Nv,getElementRects:S_,getClientRects:m_,getDimensions:k_,getScale:Ps,isElement:Ft,isRTL:E_};function Rv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C_(e,t){let r=null,n;const s=rr(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=Yi(h),v=Yi(s.clientWidth-(d+p)),x=Yi(s.clientHeight-(h+f)),y=Yi(d),g={rootMargin:-w+"px "+-v+"px "+-x+"px "+-y+"px",threshold:nt(0,cn(1,l))||1};let k=!0;function _(S){const E=S[0].intersectionRatio;if(E!==l){if(!k)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Rv(u,e.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(_,{...g,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,g)}r.observe(e)}return i(!0),o}function j_(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=dh(e),d=s||o?[...u?si(u):[],...si(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",r,{passive:!0}),o&&y.addEventListener("resize",r)});const h=u&&a?C_(u,r):null;let p=-1,f=null;i&&(f=new ResizeObserver(y=>{let[m]=y;m&&m.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var g;(g=f)==null||g.observe(t)})),r()}),u&&!l&&f.observe(u),f.observe(t));let w,v=l?Wn(e):null;l&&x();function x(){const y=Wn(e);v&&!Rv(v,y)&&r(),v=y,w=requestAnimationFrame(x)}return r(),()=>{var y;d.forEach(m=>{s&&m.removeEventListener("scroll",r),o&&m.removeEventListener("resize",r)}),h==null||h(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(w)}}const N_=Z1,R_=e_,P_=Q1,A_=r_,O_=Y1,lp=J1,I_=t_,L_=(e,t,r)=>{const n=new Map,s={platform:T_,...r},o={...s.platform,_c:n};return G1(e,t,{...s,platform:o})};var $_=typeof document<"u",D_=function(){},Ea=$_?b.useLayoutEffect:D_;function rl(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(!rl(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)&&!rl(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Pv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function up(e,t){const r=Pv(e);return Math.round(t*r)/r}function Cu(e){const t=b.useRef(e);return Ea(()=>{t.current=e}),t}function M_(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);rl(p,n)||f(n);const[w,v]=b.useState(null),[x,y]=b.useState(null),m=b.useCallback(C=>{C!==S.current&&(S.current=C,v(C))},[]),g=b.useCallback(C=>{C!==E.current&&(E.current=C,y(C))},[]),k=o||w,_=i||x,S=b.useRef(null),E=b.useRef(null),N=b.useRef(d),A=l!=null,O=Cu(l),D=Cu(s),R=Cu(u),B=b.useCallback(()=>{if(!S.current||!E.current)return;const C={placement:t,strategy:r,middleware:p};D.current&&(C.platform=D.current),L_(S.current,E.current,C).then(j=>{const M={...j,isPositioned:R.current!==!1};L.current&&!rl(N.current,M)&&(N.current=M,_i.flushSync(()=>{h(M)}))})},[p,t,r,D,R]);Ea(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[u]);const L=b.useRef(!1);Ea(()=>(L.current=!0,()=>{L.current=!1}),[]),Ea(()=>{if(k&&(S.current=k),_&&(E.current=_),k&&_){if(O.current)return O.current(k,_,B);B()}},[k,_,B,O,A]);const G=b.useMemo(()=>({reference:S,floating:E,setReference:m,setFloating:g}),[m,g]),V=b.useMemo(()=>({reference:k,floating:_}),[k,_]),z=b.useMemo(()=>{const C={position:r,left:0,top:0};if(!V.floating)return C;const j=up(V.floating,d.x),M=up(V.floating,d.y);return a?{...C,transform:"translate("+j+"px, "+M+"px)",...Pv(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:j,top:M}},[r,a,V.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:B,refs:G,elements:V,floatingStyles:z}),[d,B,G,V,z])}const U_=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?lp({element:n.current,padding:s}).fn(r):{}:n?lp({element:n,padding:s}).fn(r):{}}}},F_=(e,t)=>({...N_(e),options:[e,t]}),B_=(e,t)=>({...R_(e),options:[e,t]}),z_=(e,t)=>({...I_(e),options:[e,t]}),W_=(e,t)=>({...P_(e),options:[e,t]}),H_=(e,t)=>({...A_(e),options:[e,t]}),V_=(e,t)=>({...O_(e),options:[e,t]}),q_=(e,t)=>({...U_(e),options:[e,t]});var K_="Arrow",Av=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return c.jsx(tt.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"})})});Av.displayName=K_;var G_=Av;function J_(e){const[t,r]=b.useState(void 0);return un(()=>{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 Ov="Popper",[Iv,Lv]=Nl(Ov),[pN,$v]=Iv(Ov),Dv="PopperAnchor",Mv=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=$v(Dv,r),i=b.useRef(null),a=Ut(t,i);return b.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:c.jsx(tt.div,{...s,ref:a})});Mv.displayName=Dv;var fh="PopperContent",[Q_,Y_]=Iv(fh),Uv=b.forwardRef((e,t)=>{var re,Gn,Er,vn,Tr,Jn;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,...v}=e,x=$v(fh,r),[y,m]=b.useState(null),g=Ut(t,Cr=>m(Cr)),[k,_]=b.useState(null),S=J_(k),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},D=Array.isArray(u)?u:[u],R=D.length>0,B={padding:O,boundary:D.filter(Z_),altBoundary:R},{refs:L,floatingStyles:G,placement:V,isPositioned:z,middlewareData:C}=M_({strategy:"fixed",placement:A,whileElementsMounted:(...Cr)=>j_(...Cr,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[F_({mainAxis:s+N,alignmentAxis:i}),l&&B_({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?z_():void 0,...B}),l&&W_({...B}),H_({...B,apply:({elements:Cr,rects:Ci,availableWidth:Vl,availableHeight:ji})=>{const{width:ql,height:io}=Ci.reference,Qn=Cr.floating.style;Qn.setProperty("--radix-popper-available-width",`${Vl}px`),Qn.setProperty("--radix-popper-available-height",`${ji}px`),Qn.setProperty("--radix-popper-anchor-width",`${ql}px`),Qn.setProperty("--radix-popper-anchor-height",`${io}px`)}}),k&&q_({element:k,padding:a}),eS({arrowWidth:E,arrowHeight:N}),p&&V_({strategy:"referenceHidden",...B})]}),[j,M]=zv(V),J=ln(w);un(()=>{z&&(J==null||J())},[z,J]);const W=(re=C.arrow)==null?void 0:re.x,Y=(Gn=C.arrow)==null?void 0:Gn.y,Z=((Er=C.arrow)==null?void 0:Er.centerOffset)!==0,[be,Le]=b.useState();return un(()=>{y&&Le(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:z?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(vn=C.transformOrigin)==null?void 0:vn.x,(Tr=C.transformOrigin)==null?void 0:Tr.y].join(" "),...((Jn=C.hide)==null?void 0:Jn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Q_,{scope:r,placedSide:j,onArrowChange:_,arrowX:W,arrowY:Y,shouldHideArrow:Z,children:c.jsx(tt.div,{"data-side":j,"data-align":M,...v,ref:g,style:{...v.style,animation:z?void 0:"none"}})})})});Uv.displayName=fh;var Fv="PopperArrow",X_={top:"bottom",right:"left",bottom:"top",left:"r
106ight"},Bv=b.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=Y_(Fv,n),i=X_[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(G_,{...s,ref:r,style:{...s.style,display:"block"}})})});Bv.displayName=Fv;function Z_(e){return e!==null}var eS=e=>({name:"transformOrigin",options:e,fn(t){var x,y,m;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]=zv(r),h={start:"0%",center:"50%",end:"100%"}[d],p=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,f=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let w="",v="";return u==="bottom"?(w=i?h:`${p}px`,v=`${-l}px`):u==="top"?(w=i?h:`${p}px`,v=`${n.floating.height+l}px`):u==="right"?(w=`${-l}px`,v=i?h:`${f}px`):u==="left"&&(w=`${n.floating.width+l}px`,v=i?h:`${f}px`),{data:{x:w,y:v}}}});function zv(e){const[t,r="center"]=e.split("-");return[t,r]}var tS=Mv,rS=Uv,nS=Bv,[Ll,mN]=Nl("Tooltip",[Lv]),ph=Lv(),Wv="TooltipProvider",sS=700,cp="tooltip.open",[oS,Hv]=Ll(Wv),Vv=e=>{const{__scopeTooltip:t,delayDuration:r=sS,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(oS,{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})};Vv.displayName=Wv;var qv="Tooltip",[gN,$l]=Ll(qv),Uc="TooltipTrigger",iS=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=$l(Uc,r),o=Hv(Uc,r),i=ph(r),a=b.useRef(null),l=Ut(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(tS,{asChild:!0,...i,children:c.jsx(tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Ee(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ee(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:Ee(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Ee(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:Ee(e.onBlur,s.onClose),onClick:Ee(e.onClick,s.onClose)})})});iS.displayName=Uc;var aS="TooltipPortal",[yN,lS]=Ll(aS,{forceMount:void 0}),Qs="TooltipContent",Kv=b.forwardRef((e,t)=>{const r=lS(Qs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=$l(Qs,e.__scopeTooltip);return c.jsx(th,{present:n||i.open,children:i.disableHoverableContent?c.jsx(Gv,{side:s,...o,ref:t}):c.jsx(uS,{side:s,...o,ref:t})})}),uS=b.forwardRef((e,t)=>{const r=$l(Qs,e.__scopeTooltip),n=Hv(Qs,e.__scopeTooltip),s=b.useRef(null),o=Ut(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,v)=>{const x=w.currentTarget,y={x:w.clientX,y:w.clientY},m=pS(y,x.getBoundingClientRect()),g=mS(y,m),k=gS(v.getBoundingClientRect()),_=vS([...g,...k]);a(_),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){const w=x=>f(x,d),v=x=>f(x,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",v)}}},[l,d,f,p]),b.useEffect(()=>{if(i){const w=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},m=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),g=!yS(y,i);m?p():g&&(p(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,i,u,p]),c.jsx(Gv,{...e,ref:o})}),[cS,dS]=Ll(qv,{isInside:!1}),hS=Eb("TooltipContent"),Gv=b.forwardRef((e,t)=>
vendor: 5,135 bytes, line 106
106{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=$l(Qs,r),u=ph(r),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(cp,d),()=>document.removeEventListener(cp,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(eh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:c.jsxs(rS,{"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(hS,{children:n}),c.jsx(cS,{scope:r,isInside:!0,children:c.jsx(Qb,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Kv.displayName=Qs;var Jv="TooltipArrow",fS=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=ph(r);return dS(Jv,r).isInside?null:c.jsx(nS,{...s,...n,ref:t})});fS.displayName=Jv;function pS(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 mS(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 gS(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 yS(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 vS(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),wS(t)}function wS(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 xS=Vv,Qv=Kv;const bS=xS,kS=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Qv,{ref:n,sideOffset:t,className:qn("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}));kS.displayName=Qv.displayName;var Dl=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(){}},Ml=typeof window>"u"||"Deno"in globalThis;function Nt(){}function _S(e,t){return typeof e=="function"?e(t):e}function SS(e){return typeof e=="number"&&e>=0&&e!==1/0}function ES(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fc(e,t){return typeof e=="function"?e(t):e}function TS(e,t){return typeof e=="function"?e(t):e}function dp(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==mh(i,t.options))return!1}else if(!ii(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 hp(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(oi(t.options.mutationKey)!==oi(o))return!1}else if(!ii(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function mh(e,t){return((t==null?void 0:t.queryKeyHashFn)||oi)(e)}function oi(e){return JSON.stringify(e,(t,r)=>Bc(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function ii(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ii(e[r],t[r])):!1}function Yv(e,t){if(e===t)return e;const r=fp(e)&&fp(t);if(r||Bc(e)&&Bc(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];
vendor: 21,729 bytes, line 106
106(!r&&l.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,u++):(a[h]=Yv(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&u++)}return s===i&&u===s?e:a}return t}function fp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bc(e){if(!pp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!pp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function pp(e){return Object.prototype.toString.call(e)==="[object Object]"}function CS(e){return new Promise(t=>{setTimeout(t,e)})}function jS(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Yv(e,t):t}function NS(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function RS(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var gh=Symbol();function Xv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===gh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Rn,zr,Is,dm,PS=(dm=class extends Dl{constructor(){super();te(this,Rn);te(this,zr);te(this,Is);K(this,Is,t=>{if(!Ml&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,zr)||this.setEventListener(T(this,Is))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,zr))==null||t.call(this),K(this,zr,void 0))}setEventListener(t){var r;K(this,Is,t),(r=T(this,zr))==null||r.call(this),K(this,zr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){T(this,Rn)!==t&&(K(this,Rn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof T(this,Rn)=="boolean"?T(this,Rn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rn=new WeakMap,zr=new WeakMap,Is=new WeakMap,dm),Zv=new PS,Ls,Wr,$s,hm,AS=(hm=class extends Dl{constructor(){super();te(this,Ls,!0);te(this,Wr);te(this,$s);K(this,$s,t=>{if(!Ml&&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(){T(this,Wr)||this.setEventListener(T(this,$s))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Wr))==null||t.call(this),K(this,Wr,void 0))}setEventListener(t){var r;K(this,$s,t),(r=T(this,Wr))==null||r.call(this),K(this,Wr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ls)!==t&&(K(this,Ls,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return T(this,Ls)}},Ls=new WeakMap,Wr=new WeakMap,$s=new WeakMap,hm),nl=new AS;function OS(){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 IS(e){return Math.min(1e3*2**e,3e4)}function ew(e){return(e??"online")==="online"?nl.isOnline():!0}var tw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ju(e){return e instanceof tw}function rw(e){let t=!1,r=0,n=!1,s;const o=OS(),i=v=>{var x;n||(p(new tw(v)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Zv.isFocused()&&(e.networkMode==="always"||nl.isOnline())&&e.canRun(),d=()=>ew(e.networkMode)&&e.canRun(),h=v=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,v),s==null||s(),o.resolve(v))},p=v=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,v),s==null||s(),o.reject(v))},f=()=>new Promise(v=>{var x;s=y=>{(n||u())&&v(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;s=void 0,n||(v=e.onContinue)==null||v.call(e)}),w=()=>{if(n)return;let v;const x=r===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(h).catch(y=>{var S;if(n)return;const m=e.retry??(Ml?0:3),g=e.retryDelay??IS,k=typeof g=="function"?g(r,y):g,_=m===!0||typeof m=="number"&&r<m||typeof m=="function"&&m(r,y);if(t||!_){p(y);return}r++,(S=e.onFail)==null||S.call(e,r,y),CS(k).then(()=>u()?void 0:f()).then(()=>{t?p(y):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 LS=e=>setTimeout(e,0);function $S(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=LS;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 He=$S(),Pn,fm,nw=(fm=class{constructor(){te(this,Pn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),SS(this.gcTime)&&K(this,Pn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ml?1/0:5*60*1e3))}clearGcTimeout(){T(this,Pn)&&(clearTimeout(T(this,Pn)),K(this,Pn,void 0))}},Pn=new WeakMap,fm),Ds,An,mt,On,Ue,gi,In,Pt,or,pm,DS=(pm=class extends nw{constructor(t){super();te(this,Pt);te(this,Ds);te(this,An);te(this,mt);te(this,On);te(this,Ue);te(this,gi);te(this,In);K(this,In,!1),K(this,gi,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,On,t.client),K(this,mt,T(this,On).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Ds,US(this.options)),this.state=t.state??T(this,Ds),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Ue))==null?void 0:t.promise}setOptions(t){this.options={...T(this,gi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,mt).remove(this)}setData(t,r){const n=jS(this.state.data,t,this.options);return $e(this,Pt,or).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){$e(this,Pt,or).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=T(this,Ue))==null?void 0:n.promise;return(s=T(this,Ue))==null||s.cancel(t),r?r.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Ds))}isActive(){return this.observers.some(t=>TS(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===gh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Fc(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:!ES(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Ue))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Ue))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(T(this,Ue)&&(T(this,In)?T(this,Ue).cancel({revert:!0}):T(this,Ue).cancelRetry()),this.scheduleGc()),T(this,mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Pt,or).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(T(this,Ue))return T(this,Ue).continueRetry(),T(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:()=>(K(this,In,!0),n.signal)})},o=()=>{const p=Xv(this.options,r),w=(()=>{const v={client:T(this,On),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return K(this,In,!1),this.options.persister?this.options.persister(p,w,this):p(w)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,On),state:this.state,fetchFn:o};return s(p),p})();(u=this.options.behavior)==null||u.onFetch(a,this),K(this,An,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&$e(this,Pt,or).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var f,w,v,x;ju(p)&&p.silent||$e(this,Pt,or).call(this,{type:"error",error:p}),ju(p)||((w=(f=T(this,mt).config).onError)==null||w.call(f,p,this),(x=(v=T(this,mt).config).onSettled)==null||x.call(v,this.state.data,p,this)),this.scheduleGc()};return K(this,Ue,rw({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,w,v,x;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(y){l(y);return}(w=(f=T(this,mt).config).onSuccess)==null||w.call(f,p,this),(x=(v=T(this,mt).config).onSettled)==null||x.call(v,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{$e(this,Pt,or).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{$e(this,Pt,or).call(this,{type:"pause"})},onContinue:()=>{$e(this,Pt,or).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,Ue).start()}},Ds=new WeakMap,An=new WeakMap,mt=new WeakMap,On=new WeakMap,Ue=new WeakMap,gi=new WeakMap,In=new WeakMap,Pt=new WeakSet,or=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,...MS(n.data,this.options),fetchMeta:t.meta??null};case"success":return K(this,An,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 ju(s)&&s.revert&&T(this,An)?{...T(this,An),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),He.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),T(this,mt).notify({query:this,type:"updated",action:t})})},pm);function MS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ew(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function US(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 qt,mm,FS=(mm=class extends Dl{constructor(t={}){super();te(this,qt);this.config=t,K(this,qt,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??mh(s,r);let i=this.get(o);return i||(i=new DS({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){T(this,qt).has(t.queryHash)||(T(this,qt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=T(this,qt).get(t.queryHash);r&&(t.destroy(),r===t&&T(this,qt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,qt).get(t)}getAll(){return[...T(this,qt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>dp(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>dp(t,n)):r}notify(t){He.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},qt=new WeakMap,mm),Kt,ze,Ln,Gt,Lr,gm,BS=(gm=class extends nw{constructor(t){super();te(this,Gt);te(this,Kt);te(this,ze);te(this,Ln);this.mutationId=t.mutationId,K(this,ze,t.mutationCache),K(this,Kt,[]),this.state=t.state||zS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Kt).includes(t)||(T(this,Kt).push(t),this.clearGcTimeout(),T(this,ze).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,Kt,T(this,Kt).filter(r=>r!==t)),this.scheduleGc(),T(this,ze).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Kt).length||(this.state.status==="pending"?this.scheduleGc():T(this,ze).remove(this))}continue(){var t;return((t=T(this,Ln))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,d,h,p,f,w,v,x,y,m,g,k,_,S,E,N;const r=()=>{$e(this,Gt,Lr).call(this,{type:"continue"})};K(this,Ln,rw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{$e(this,Gt,Lr).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{$e(this,Gt,Lr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ze).canRun(this)}));const n=this.state.status==="pending",s=!T(this,Ln).canStart();try{if(n)r();else{$e(this,Gt,Lr).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=T(this,ze).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&&$e(this,Gt,Lr).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const A=await T(this,Ln).start();return await((d=(u=T(this,ze).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=T(this,ze).config).onSettled)==null?void 0:w.call(f,A,null,this.state.variables,this.state.context,this)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,A,null,t,this.state.context)),$e(this,Gt,Lr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((m=(y=T(this,ze).config).onError)==null?void 0:m.call(y,A,t,this.state.context,this)),await((k=(g=this.options).onError)==null?void 0:k.call(g,A,t,this.state.context)),await((S=(_=T(this,ze).config).onSettled)==null?void 0:S.call(_,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{$e(this,Gt,Lr).call(this,{type:"error",error:A})}}finally{T(this,ze).runNext(this)}}},Kt=new WeakMap,ze=new WeakMap,Ln=new WeakMap,Gt=new WeakSet,Lr=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),He.batch(()=>{T(this,Kt).forEach(n=>{n.onMutationUpdate(t)}),T(this,ze).notify({mutation:this,type:"updated",action:t})})},gm);function zS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,At,yi,ym,WS=(ym=class extends Dl{constructor(t={}){super();te(this,cr);te(this,At);te(this,yi);this.config=t,K(this,cr,new Set),K(this,At,new Map),K(this,yi,0)}build(t,r,n){const s=new BS({mutationCache:this,mutationId:++Ri(this,yi)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){T(this,cr).add(t);const r=Xi(t);if(typeof r=="string"){const n=T(this,At).get(r);n?n.push(t):T(this,At).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,cr).delete(t)){const r=Xi(t);if(typeof r=="string"){const n=T(this,At).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&T(this,At).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Xi(t);if(typeof r=="string"){const n=T(this,At).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=T(this,At).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(){He.batch(()=>{T(this,cr).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,cr).clear(),T(this,At).clear()})}getAll(){return Array.from(T(this,cr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>hp(r,n))}findAll(t={}){return this.getAll().filter(r=>hp(t,r))}notify(t){He.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return He.batch(()=>Promise.all(t.map(r=>r.continue().catch(Nt))))}},cr=new WeakMap,At=new WeakMap,yi=new WeakMap,ym);function Xi(e){var t;return(t=e.options.scope)==null?void 0:t.id}function mp(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 v=!1;const x=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},y=Xv(t.options,t.fetchOptions),m=async(g,k,_)=>{if(v)return Promise.reject();if(k==null&&g.pages.length)return Promise.resolve(g);const E=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:k,direction:_?"backward":"forward",meta:t.options.meta};return x(D),D})(),N=await y(E),{maxPages:A}=t.options,O=_?RS:NS;return{pages:O(g.pages,N,A),pageParams:O(g.pageParams,k,A)}};if(s&&o.length){const g=s==="backward",k=g?HS:gp,_={pages:o,pageParams:i},S=k(n,_);a=await m(_,S,g)}else{const g=e??o.length;do{const k=l===0?i[0]??n.initialPageParam:gp(n,a);if(l>0&&k==null)break;a=await m(a,k),l++}while(l<g)}return a};t.options.persister?t.fetchFn=()=>{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function gp(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 HS(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 ge,Hr,Vr,Ms,Us,qr,Fs,Bs,vm,VS=(vm=class{constructor(e={}){te(this,ge);te(this,Hr);te(this,Vr);te(this,Ms);te(this,Us);te(this,qr);te(this,Fs);te(this,Bs);K(this,ge,e.queryCache||new FS),K(this,Hr,e.mutationCache||new WS),K(this,Vr,e.defaultOptions||{}),K(this,Ms,new Map),K(this,Us,new Map),K(this,qr,0)}mount(){Ri(this,qr)._++,T(this,qr)===1&&(K(this,Fs,Zv.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ge).onFocus())})),K(this,Bs,nl.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ge).onOnline())})))}unmount(){var e,t;Ri(this,qr)._--,T(this,qr)===0&&((e=T(this,Fs))==null||e.call(this),K(this,Fs,void 0),(t=T(this,Bs))==null||t.call(this),K(this,Bs,void 0))}isFetching(e){return T(this,ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Hr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,ge).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=T(this,ge).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Fc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return T(this,ge).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=T(this,ge).get(n.queryHash),o=s==null?void 0:s.state.data,i=_S(t,o);if(i!==void 0)return T(this,ge).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return He.batch(()=>T(this,ge).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,ge).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=T(this,ge);He.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=T(this,ge);return He.batch(()=>(r.findAll(e).forEach(n=>
106{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=He.batch(()=>T(this,ge).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return He.batch(()=>(T(this,ge).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=He.batch(()=>T(this,ge).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(Nt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=T(this,ge).build(this,t);return r.isStaleByTime(Fc(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=mp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=mp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nl.isOnline()?T(this,Hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,ge)}getMutationCache(){return T(this,Hr)}getDefaultOptions(){return T(this,Vr)}setDefaultOptions(e){K(this,Vr,e)}setQueryDefaults(e,t){T(this,Ms).set(oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Ms).values()],r={};return t.forEach(n=>{ii(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){T(this,Us).set(oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,Us).values()],r={};return t.forEach(n=>{ii(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=mh(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===gh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,ge).clear(),T(this,Hr).clear()}},ge=new WeakMap,Hr=new WeakMap,Vr=new WeakMap,Ms=new WeakMap,Us=new WeakMap,qr=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,vm),qS=b.createContext(void 0),KS=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(qS.Provider,{value:e,children:t}));/** 107 * @remix-run/router v1.23.3 108 * 109 * Copyright (c) Remix Software Inc. 110 * 111 * This source code is licensed under the MIT license found in the 112 * LICENSE.md file in the root directory of this source tree. 113 * 114 * @license MIT 115 */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)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ai.apply(null,arguments)}var Jr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Jr||(Jr={}));const yp="popstate";function GS(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return zc("",{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:sl(s)}return QS(t,r,null,e)}function xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JS(){return Math.random().toString(36).substr(2,8)}function vp(e,t){return{usr:e.state,key:e.key,idx:t}}function zc(e,t,r,n){return r===void 0&&(r=null),ai({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?no(t):t,{state:r,key:t&&t.key||n||JS()})}function sl(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 no(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 QS(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=Jr.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(ai({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function h(){a=Jr.Pop;let x=d(),y=x==null?null:x-u;u=x,l&&l({action:a,location:v.location,delta:y})}function p(x,y){a=Jr.Push;let m=zc(v.location,x,y);u=d()+1;let g=vp(m,u),k=v.createHref(m);try{i.pushState(g,"",k)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(k)}o&&l&&l({action:a,location:v.location,delta:1})}function f(x,y){a=Jr.Replace;let m=zc(v.location,x,y);u=d();let g=vp(m,u),k=v.createHref(m);i.replaceState(g,"",k),o&&l&&l({action:a,location:v.location,delta:0})}function w(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof x=="str
115ing"?x:sl(x);return m=m.replace(/ $/,"%20"),xe(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let v={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(yp,h),l=x,()=>{s.removeEventListener(yp,h),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let y=w(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:f,go(x){return i.go(x)}};return v}var wp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wp||(wp={}));function YS(e,t,r){return r===void 0&&(r="/"),XS(e,t,r,!1)}function XS(e,t,r,n){let s=typeof t=="string"?no(t):t,o=vh(s.pathname||"/",r);if(o==null)return null;let i=sw(e);ZS(i);let a=null,l=cE(o);for(let u=0;a==null&&u<i.length;++u)a=lE(i[u],l,n);return a}function sw(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("/")&&(xe(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=sn([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(xe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),sw(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:iE(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 ow(o.path))s(o,i,l)}),t}function ow(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=ow(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 ZS(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:aE(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const eE=/^:[\w-]+$/,tE=3,rE=2,nE=1,sE=10,oE=-2,xp=e=>e==="*";function iE(e,t){let r=e.split("/"),n=r.length;return r.some(xp)&&(n+=oE),t&&(n+=rE),r.filter(s=>!xp(s)).reduce((s,o)=>s+(eE.test(o)?tE:o===""?nE:sE),n)}function aE(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 lE(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=bp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),p=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=bp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;
vendor: 4,345 bytes, lines 115-124
115Object.assign(s,h.params),i.push({params:s,pathname:sn([o,h.pathname]),pathnameBase:mE(sn([o,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(o=sn([o,h.pathnameBase]))}return i}function bp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=uE(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 v=a[h]||"";i=o.slice(0,o.length-v.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 uE(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),yh(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 cE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yh(!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 vh(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)||"/"}const dE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hE=e=>dE.test(e);function fE(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?no(e):e,o;if(r)if(hE(r))o=r;else{if(r.includes("//")){let i=r;r=iw(r),yh(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+r))}r.startsWith("/")?o=kp(r.substring(1),"/"):o=kp(r,t)}else o=t;return{pathname:o,search:gE(n),hash:yE(s)}}function kp(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 Nu(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 pE(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wh(e,t){let r=pE(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function xh(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=no(e):(s=ai({},e),xe(!s.pathname||!s.pathname.includes("?"),Nu("?","pathname","search",s)),xe(!s.pathname||!s.pathname.includes("#"),Nu("#","pathname","hash",s)),xe(!s.search||!s.search.includes("#"),Nu("#","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=fE(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const iw=e=>e.replace(/\/\/+/g,"/"),sn=e=>iw(e.join("/")),mE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function vE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const aw=["post","put","patch","delete"];new Set(aw);const wE=["get",...aw];new Set(wE);/** 116 * React Router v6.30.4 117 * 118 * Copyright (c) Remix Software Inc. 119 * 120 * This source code is licensed under the MIT license found in the 121 * LICENSE.md file in the root directory of this source tree. 122 * 123 * @license MIT 124 */function li(){return li=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
vendor: 8,758 bytes, lines 124-133
124).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},li.apply(null,arguments)}const bh=b.createContext(null),xE=b.createContext(null),gn=b.createContext(null),Ul=b.createContext(null),yn=b.createContext({outlet:null,matches:[],isDataRoute:!1}),lw=b.createContext(null);function bE(e,t){let{relative:r}=t===void 0?{}:t;so()||xe(!1);let{basename:n,navigator:s}=b.useContext(gn),{hash:o,pathname:i,search:a}=cw(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:sn([n,i])),s.createHref({pathname:l,search:a,hash:o})}function so(){return b.useContext(Ul)!=null}function kr(){return so()||xe(!1),b.useContext(Ul).location}function uw(e){b.useContext(gn).static||b.useLayoutEffect(e)}function Fl(){let{isDataRoute:e}=b.useContext(yn);return e?IE():kE()}function kE(){so()||xe(!1);let e=b.useContext(bh),{basename:t,future:r,navigator:n}=b.useContext(gn),{matches:s}=b.useContext(yn),{pathname:o}=kr(),i=JSON.stringify(wh(s,r.v7_relativeSplatPath)),a=b.useRef(!1);return uw(()=>{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=xh(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:sn([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,i,o,e])}function cw(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=b.useContext(gn),{matches:s}=b.useContext(yn),{pathname:o}=kr(),i=JSON.stringify(wh(s,n.v7_relativeSplatPath));return b.useMemo(()=>xh(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function _E(e,t){return SE(e,t)}function SE(e,t,r,n){so()||xe(!1);let{navigator:s}=b.useContext(gn),{matches:o}=b.useContext(yn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=kr(),d;if(t){var h;let x=typeof t=="string"?no(t):t;l==="/"||(h=x.pathname)!=null&&h.startsWith(l)||xe(!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=YS(e,{pathname:f}),v=NE(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:sn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:sn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r,n);return t&&v?b.createElement(Ul.Provider,{value:{location:li({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Jr.Pop}},v):v}function EE(){let e=OE(),t=vE(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 TE=b.createElement(EE,null);class CE 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(yn.Provider,{value:this.props.routeContext},b.createElement(lw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jE(e){let{routeContext:t,match:r,children:n}=e,s=b.useContext(bh);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(yn.Provider,{value:t},n)}function NE(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||xe(!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,v=null,x=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,v=h.route.errorElement||TE,l&&(u<0&&p===0?(w=!0,x=null):u===p&&(w=!0,x=h.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,p+1)),m=()=>{let g;return f?g=v:w?g=x:h.route.Component?g=b.createElement(h.route.Component,null):h.route.element?g=h.route.element:g=d,b.createElement(jE,{match:h,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:g})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(CE,{location:r.location,revalidation:r.revalidation,component:v,error:f,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):m()},null)}var dw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(dw||{}),ol=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}(ol||{});function RE(e){let t=b.useContext(bh);return t||xe(!1),t}function PE(e){let t=b.useContext(xE);return t||xe(!1),t}function AE(e){let t=b.useContext(yn);return t||xe(!1),t}function hw(e){let t=AE(),r=t.matches[t.matches.length-1];return r.route.id||xe(!1),r.route.id}function OE(){var e;let t=b.useContext(lw),r=PE(ol.UseRouteError),n=hw(ol.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function IE(){let{router:e}=RE(dw.UseNavigateStable),t=hw(ol.UseNavigateStable),r=b.useRef(!1);return uw(()=>{r.current=!0}),b.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,li({fromRouteId:t},o)))},[e,t])}function LE(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function $E(e){let{to:t,replace:r,state:n,relative:s}=e;so()||xe(!1);let{future:o,static:i}=b.useContext(gn),{matches:a}=b.useContext(yn),{pathname:l}=kr(),u=Fl(),d=xh(t,wh(a,o.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(d);return b.useEffect(()=>u(JSON.parse(h),{replace:r,state:n,relative:s}),[u,h,s,r,n]),null}function ft(e){xe(!1)}function DE(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Jr.Pop,navigator:o,static:i=!1,future:a}=e;so()&&xe(!1);let l=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:o,static:i,future:li({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=no(n));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:w="default"}=n,v=b.useMemo(()=>{let x=vh(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 v==null?null:b.createElement(gn.Provider,{value:u},b.createElement(Ul.Provider,{children:r,value:v}))}function ME(e){let{children:t,location:r}=e;return _E(Wc(t),r)}new Promise(()=>{});function Wc(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,Wc(n.props.children,o));return}n.type!==ft&&xe(!1),!n.props.index||!n.props.children||xe(!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=Wc(n.props.children,o)),r.push(i)}),r}/** 125 * React Router DOM v6.30.4 126 * 127 * Copyright (c) Remix Software Inc. 128 * 129 * This source code is licensed under the MIT license found in the 130 * LICENSE.md file in the root directory of this source tree. 131 * 132 * @license MIT 133 */function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
133).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hc.apply(null,arguments)}function UE(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function FE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BE(e,t){return e.button===0&&(!t||t==="_self")&&!FE(e)}function Vc(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 zE(e,t){let r=Vc(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const WE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],HE="6";try{window.__reactRouterVersion=HE}catch{}const VE="startTransition",_p=Rm[VE];function qE(e){let{basename:t,children:r,future:n,window:s}=e,o=b.useRef();o.current==null&&(o.current=GS({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&&_p?_p(()=>l(h)):l(h)},[l,u]);return b.useLayoutEffect(()=>i.listen(d),[i,d]),b.useEffect(()=>LE(n),[n]),b.createElement(DE,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const KE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",GE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ce=b.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:d,viewTransition:h}=t,p=UE(t,WE),{basename:f}=b.useContext(gn),w,v=!1;if(typeof u=="string"&&GE.test(u)&&(w=u,KE))try{let g=new URL(window.location.href),k=u.startsWith("//")?new URL(g.protocol+u):new URL(u),_=vh(k.pathname,f);k.origin===g.origin&&_!=null?u=_+k.search+k.hash:v=!0}catch{}let x=bE(u,{relative:s}),y=JE(u,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:h});function m(g){n&&n(g),g.defaultPrevented||y(g)}return b.createElement("a",Hc({},p,{href:w||x,onClick:v||o?n:m,ref:r,target:l}))});var Sp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Sp||(Sp={}));var Ep;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ep||(Ep={}));function JE(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=Fl(),u=kr(),d=cw(e,{relative:i});return b.useCallback(h=>{if(BE(h,r)){h.preventDefault();let p=n!==void 0?n:sl(u)===sl(d);l(e,{replace:p,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[u,l,d,n,s,r,e,o,i,a])}function QE(e){let t=b.useRef(Vc(e)),r=b.useRef(!1),n=kr(),s=b.useMemo(()=>zE(n.search,r.current?null:t.current),[n.search]),o=Fl(),i=b.useCallback((a,l)=>{const u=Vc(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,l)},[o,s]);return[s,i]}const Ru=[{name:"cream",background:"40 33% 97%",foreground:"0 0% 11%",muted:"0 0% 45%",border:"0 0% 85%"},{name:"parchment",background:"36 35% 93%",foreground:"24 12% 15%",muted:"24 8% 45%",border:"24 8% 78%"},{name:"stone",background:"38 20% 89%",foreground:"0 0% 11%",muted:"0 0% 45%",border:"0 0% 75%"},{name:"ink",background:"0 0% 11%",foreground:"40 33% 97%",muted:"0 0% 60%",border:"0 0% 22%"},{name:"forest night",background:"150 30% 14%",foreground:"40 18% 90%",muted:"150 10% 55%",border:"150 15% 25%"},{name:"slate",background:"210 10% 20%",foreground:"40 20% 96%",muted:"210 5% 55%",border:"210 5% 32%"},{name:"espresso",background:"24 12% 15%",foreground:"36 27% 95%",muted:"24 8% 55%",border:"24 8% 28%"}],fw=b.createContext(null),YE=({children:e})=>{const[t,r]=b.useState(0),n=b.useCallback(()=>{r(s=>{const o=(s+1)%Ru.length,i=Ru[o];return document.documentElement.style.setProperty("--background",i.background),document.documentElement.style.setProperty("--foreground",i.foreground),document.documentElement.style.setProperty("--card",i.background),document.documentElement.style.setProperty("--card-foreground",i.foreground),document.documentElement.style.setProperty("--popover",i.background),document.documentElement.style.setProperty("--popover-foreground",i.foreground),document.documentElement.style.setProperty("--muted-foreground",i.muted),document.documentElement.style.setProperty("--border",i.border),document.documentElement.style.setProperty("--input",i.border),o})},[]);return c.jsx(fw.Provider,{value:{cycleTheme:n,themeName:Ru[t].name,isDark:t>=3},children:e})},XE=()=>{const e=b.useContext(fw);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e},ZE="/assets/unpen-logo-Dubg1c0t.png",eT="/assets/unpen-logo-light-CZkq4vex.png",_r=({className:e=""})=>{const{isDark:t}=XE();return c.jsx("img",{src:t?eT:ZE,alt:"Unpen Creative AI",className:`block h-[42px] w-auto shrink-0 select-none ${e}`,draggable:!1})},Kn=()=>c.jsx("footer",{className:"px-5 py-3 border-t-2 border-foreground",children:c.jsxs("nav",{"aria-label":"Footer",className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",children:[c.jsx(ce,{to:"/about",className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground transition-colors",children:"About"}),c.jsx(ce,{to:"/work-with-us",className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground transition-colors",children:"Services"}),c.jsx(ce,{to:"/privacy",className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground transition-colors",children:"Privacy"})]})}),pw="/assets/jacqueline-headshot-full-BojxJqVs.jpg",tT=()=>(b.useEffect(()=>{document.title="Unpen Creative AI · AI systems that make your business money"},[]),c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex items-center justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col",children:[c.jsx("header",{className:"px-5 py-4 border-b-2 border-foreground",children:c.jsx(_r,{})}),c.jsxs("section",{className:"px-5 py-6 bg-foreground text-background",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-background/70 mb-3",children:"Applied AI for owner-led businesses"}),c.jsx("h1",{className:"text-[24px] leading-[1.12] font-extrabold tracking-tight",children:"Bring me the business problem you haven't figured out yet."}),c.jsx("p",{className:"mt-4 text-[13.5px] leading-relaxed",children:"I work directly with established owners and lean teams to sort out the operational problems that pull people away from their real work. We decide where AI is useful, where it is not and get the right solution working with the business and its people."}),c.jsx("p",{className:"mt-4 text-[15px] font-bold tracking-tight",children:"If AI isn't the answer, I'll tell you."}),c.jsx(Cp,{}),c.jsx("p",{className:"mt-2 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-background/70",children:"Vancouver-based. In person or virtual."})]}),c.jsxs("section",{className:"grid grid-cols-2 border-b-2 border-foreground",children:[c.jsxs("div",{className:"px-5 py-5 border-r-2 border-foreground",children:[c.jsx("p",{className:"m-0 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"Who it's for"}),c.jsx("p",{className:"m-0 mt-2 text-[14px] font-bold leading-snug",children:"Established owners and lean teams doing important work in the real world."})]}),c.jsxs("div",{className:"px-5 py-5",children:[c.jsx("p",{className:"m-0 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"What gets better"}),c.jsx("p",{className:"m-0 mt-2 text-[14px] font-bold leading-snug",children:"Less admin, better visibility, reliable systems and room to grow."})]})]}),c.jsxs("nav",{className:"flex flex-col divide-y-2 divide-foreground border-b-2 border-foreground",children:[c.jsx(Zi,{n:"01",label:"Services",sub:"what I do. how we work together",to:"/work-with-us",primary:!0}),c.jsx(Zi,{n:"02",label:"See the work",sub:"results talk",to:"/work"}),c.jsx(Zi,{n:"03",label:"Meet the builder",sub:"founder",to:"/about",avatar:pw})]}),c.jsxs("section",{className:"border-b-2 border-foreground",children:[c.jsx("h2",{className:"m-0 px-5 pt-6 pb-3 text-[20px] leading-[1.15] font-extrabold tracking-tight",children:"Problems we help solve."}),c.jsx("p",{className:"m-0 px-5 pb-3 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"Tap the one that sounds like you"}),c.jsx("ul",{className:"m-0 p-0 list-none divide-y-2 divide-foreground border-t-2 border-foreground",children:Tp.slice(0,4).map(([e,t])=>c.jsx("li",{className:"m-0",children:c.jsx(jp,{quote:e,body:t})},e))}),c.jsxs("details",{className:"group border-t-2 border-foreground",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-4 flex items-center justify-between gap-3 hover:bg-secondary transition-colors",children:[c.jsx("span",{className:"text-[13px] font-mono font-bold uppercase tracking-[0.18em]",children:"See more problems"}),c.jsxs("span",{"aria-hidden":"true",className:"font-mono text-[16px] font-bold text-primary",children:[c.jsx("span",{className:"group-open:hidden",children:"+"}),c.jsx("span",{className:"hidden group-open:inline",children:"â"})]})]}),c.jsx("ul",{className:"m-0 p-0 list-none divide-y-2 divide-foreground border-t-2 border-foreground",children:Tp.slice(4).map(([e,t])=>c.jsx("li",{className:"m-0",children:c.jsx(jp,{quote:e,body:t})},e))})]})]}),c.jsx("nav",{className:"border-b-2 border-foreground",children:c.jsx(Zi,{n:"04",label:"Notes from the Field",
133sub:"words typed wild",to:"/thinking"})}),c.jsxs("section",{className:"px-5 py-6 bg-foreground text-background",children:[c.jsx("h2",{className:"m-0 text-[20px] leading-[1.15] font-extrabold tracking-tight",children:"What's the thing in your business you know should work better?"}),c.jsx("p",{className:"mt-3 text-[15px] font-bold",children:"Bring it to me."}),c.jsx(Cp,{}),c.jsx("p",{className:"mt-4 text-[13px] leading-relaxed",children:"You'll leave with something useful whether we work together again or not."})]}),c.jsx(Kn,{})]})})),Tp=[["The business still depends on me for everything.","The owner is still carrying decisions, approvals, information and work that should no longer require their constant involvement."],["My best people don't have enough time for the work they're actually good at.","Capable people are buried in administration, searching, rewriting, organizing, preparing information and moving things between systems."],["Our customers feel the gaps.","Slow follow-up, missed information, inconsistent communication or internal friction is affecting the customer experience."],["We have the information. Finding the answer is the problem.","Important knowledge is spread across email, documents, meetings, applications, databases and people's heads."],["Everyone is using AI differently.","The team has access to AI, but there is no shared understanding of where it belongs, what information it can use, what people should trust, or where humans still need to make the decision."],["I know there is a better way to do this. I don't know what it is yet.","The owner sees an opportunity but needs someone who can work through the ambiguity, determine what should exist and make it real."],["I have an idea I think AI makes possible.","An internal tool, better service, proprietary capability, new product or new way of operating may now be possible, but it needs to be pressure-tested before significant resources are committed."]],Cp=()=>c.jsxs(ce,{to:"/book",className:"mt-5 w-full flex items-center justify-between gap-3 px-5 py-4 bg-primary text-primary-foreground border-2 border-background hover:brightness-110 transition-all group",children:[c.jsxs("span",{children:[c.jsx("span",{className:"block text-[16px] font-bold tracking-tight",children:"Talk AI with me"}),c.jsx("span",{className:"block mt-0.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-primary-foreground/70",children:"45 minutes, free"})]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),jp=({quote:e,body:t})=>{const[r,n]=b.useState(!1);return c.jsxs("button",{type:"button",onClick:()=>n(s=>!s),"aria-expanded":r,className:"w-full text-left m-0 px-5 py-3.5 bg-transparent transition-colors hover:bg-secondary",children:[c.jsxs("span",{className:"flex items-start justify-between gap-3",children:[c.jsxs("span",{className:"text-[15px] font-bold tracking-tight leading-snug",children:["â",e,"â"]}),c.jsx("span",{"aria-hidden":"true",className:"mt-0.5 shrink-0 font-mono text-[16px] font-bold leading-none text-primary",children:r?"â":"+"})]}),r&&c.jsx("span",{className:"block mt-2 text-[13px] leading-relaxed text-foreground/80",children:t})]})},Zi=({n:e,label:t,sub:r,body:n,to:s,href:o,external:i,disabled:a,primary:l,avatar:u})=>{const d="flex flex-col justify-between px-5 py-4 transition-colors group",h=l?"bg-primary text-primary-foreground hover:brightness-110":a?"opacity-60 cursor-not-allowed":"hover:bg-secondary",p=c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between w-full",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:`font-mono text-[12px] font-bold ${l?"text-primary-foreground/80":"text-muted-foreground"}`,children:e}),c.jsxs("div",{className:"flex flex-col items-start",children:[c.jsx("span",{className:"text-[16px] font-bold tracking-tight leading-tight",children:t}),r&&c.jsx("span",{className:`mt-0.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] ${l?"text-primary-foreground/70":"text-muted-foreground"}`,children:r})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[u&&c.jsx("img",{src:u,alt:"",className:"h-8 w-8 rounded-full object-cover border border-foreground
133/20"}),c.jsx(at,{className:`h-5 w-5 transition-transform ${a?"opacity-30":"group-hover:translate-x-1"}`,strokeWidth:2.5})]})]}),n&&c.jsx("p",{className:`mt-3 text-[13px] leading-relaxed ${l?"text-primary-foreground/90":"text-foreground/80"}`,children:n})]});return a?c.jsx("div",{className:`${d} ${h}`,children:p}):i&&o?c.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:`${d} ${h}`,children:p}):s?c.jsx(ce,{to:s,className:`${d} ${h}`,children:p}):c.jsx("div",{className:`${d} ${h}`,children:p})},rT=()=>(b.useEffect(()=>{document.title="Behind Unpen · Jacqueline Alexander"},[]),c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsxs("section",{className:"px-5 py-5 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-4",children:"Behind Unpen"}),c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx("div",{className:"w-20 h-20 rounded-full overflow-hidden border-2 border-foreground shrink-0",children:c.jsx("img",{src:pw,alt:"Jacqueline Alexander",className:"w-full h-full object-cover object-center"})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("h1",{className:"m-0 text-[24px] leading-[1.1] font-extrabold tracking-tight",children:"Jacqueline Alexander"}),c.jsx("p",{className:"m-0 text-[12px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground mt-1",children:"Founder & AI Operator"})]})]})]}),c.jsxs("section",{className:"px-5 py-5 border-b-2 border-foreground",children:[c.jsx("h2",{className:"m-0 text-[20px] leading-[1.15] font-extrabold tracking-tight mb-3",children:"I like problems that don't arrive with instructions."}),c.jsxs("div",{className:"space-y-3 text-[13.5px] leading-relaxed [&_p]:m-0",children:[c.jsx("p",{children:"That's usually where I'm most useful."}),c.jsx("p",{children:"I work directly with owners and lean teams to understand what is getting in the way, decide where AI is genuinely useful and help make the right solution real."})]})]}),c.jsxs("details",{className:"group border-b-2 border-foreground",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-4 flex items-center justify-between gap-4",children:[c.jsx("h2",{className:"m-0 text-[20px] leading-[1.15] font-extrabold tracking-tight",children:"Strategy and execution belong in the same room."}),c.jsx(Rp,{})]}),c.jsxs("div",{className:"px-5 pb-5 space-y-3 text-[13.5px] leading-relaxed [&_p]:m-0",children:[c.jsx("p",{children:"A lot gets lost between the person who understands the business problem and the person building the technical solution."}),c.jsx("p",{children:"At Unpen, that gap is intentionally small."}),c.jsx("p",{children:"I work directly with you."}),c.jsx("p",{children:"I ask the questions."}),c.jsx("p",{children:"I understand the business case."}),c.jsx("p",{children:"I help decide what should exist and what should not."}),c.jsx("p",{children:"When implementation makes sense, I build alongside the owner and team so the result works in the real business and remains manageable."})]})]}),c.jsxs("details",{className:"group border-b-2 border-foreground",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-4 flex items-center justify-between gap-4",children:[c.jsx("h2",{className:"m-0 text-[20px] leading-[1.15] font-extrabold tracking-tight",children:"Nearly four years working in applied AI."}),c.jsx(Rp,{})]}),c.jsxs("div",{className:"px-5 pb-5 space-y-3 text-[13.5px] leading-relaxed [&_p]:m-0",children:[c.jsx("p",{children:"The models change."}),c.jsx("p",{children:"The tools change."}),c.jsx("p",{children:"The interfaces change."}),c.jsx("p",{children:"Things that required custom development a year ago can become a feature tomorrow."}),c.jsx("p",{children:"That has made me deliberately technology-agnostic."}),c.jsx("p",{children:"I'm not interested in forcing your business into my favourite tool."}),c.jsx("p",{children:"I'm interested in what works now, what is reliable enough to use and what gives you room to evolve."}),c.jsx("blockquote",{className:"mt-4 border-l-4 border-primary pl-4 text-[17px] font-extrabold tracking-tight leading-snug",children:"I've been doing this since before every piece of software got an AI button."})]})]}),c.jsx(Np,{n:"01",label:"Why me",sub:"Built across sales, ops, and tech. Not one lane.",href:"https://www.linkedin.com/in/alexanderjacqueline/",external:!0,icon:c.jsx(bk,{className:"h-4 w-4"})}),c.jsx(Np,{n:"02",label:"See the work",sub:"What's been built.",href:"/work"}),c.jsxs("a",{href:"/book",className:"flex items-center justify-between px-5 py-5 bg-primary text-primary-foreground hover:brightness-110 transition-colors group",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-primary-foreground
133/80",children:"â"}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:"Talk AI with me"})]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),c.jsx(Kn,{})]})})),Np=({n:e,label:t,sub:r,href:n,external:s,icon:o})=>{const i=s?{href:n,target:"_blank",rel:"noopener noreferrer"}:{href:n};return c.jsxs("a",{...i,className:"flex items-center justify-between px-5 py-5 border-b-2 border-foreground hover:bg-foreground/5 transition-colors group",children:[c.jsxs("div",{className:"flex items-baseline gap-4 min-w-0",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-muted-foreground shrink-0",children:e}),c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-[16px] font-bold tracking-tight truncate",children:t}),c.jsx("span",{className:"text-[12px] text-muted-foreground mt-0.5",children:r})]})]}),c.jsx("span",{className:"shrink-0 ml-3 text-muted-foreground group-hover:text-foreground transition-colors",children:o??c.jsx(at,{className:"h-4 w-4",strokeWidth:2.5})})]})},Rp=()=>c.jsxs("span",{"aria-hidden":"true",className:"shrink-0 font-mono text-[16px] font-bold text-primary",children:[c.jsx("span",{className:"group-open:hidden",children:"+"}),c.jsx("span",{className:"hidden group-open:inline",children:"â"})]}),nT=()=>(b.useEffect(()=>{document.title="See the work · Unpen Creative AI"},[]),c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsxs("section",{className:"px-5 py-5 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-2",children:"See the work"}),c.jsx("h1",{className:"text-[26px] leading-[1.1] font-extrabold tracking-tight",children:"See the possibilities."}),c.jsxs("p",{className:"mt-2 text-[14px] leading-snug",children:[c.jsx("span",{className:"font-bold",children:"Practical systems your team can use every day."})," Built with the team, not around them, and fitted to the business."]}),c.jsx("p",{className:"mt-2 text-[13px] leading-snug text-muted-foreground",children:"A selection of what the Unpen practice has shipped. The work saves time, improves follow-up, makes information useful and helps teams do more."})]}),c.jsxs("details",{className:"group border-b-2 border-foreground bg-secondary/30",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-5 flex items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-1",children:"What success looks like"}),c.jsx("p",{className:"text-[15px] leading-snug font-semibold",children:"How we work with clients"})]}),c.jsxs("span",{"aria-hidden":"true",className:"font-mono font-bold text-primary",children:[c.jsx("span",{className:"group-open:hidden",children:"+"}),c.jsx("span",{className:"hidden group-open:inline",children:"â"})]})]}),c.jsxs("div",{className:"px-5 pb-5",children:[c.jsx("p",{className:"mt-2 text-[13px] leading-snug",children:"We take on a small set of clients at a time and operate inside the business like an embedded AI team."}),c.jsx("p",{className:"mt-2 text-[13px] leading-snug",children:"We work across the team, including operations, marketing and leadership, and partner with internal champions to drive adoption. The practice is industry-agnostic, with experience across software, marketing, construction, real estate, healthcare, financial services and beyond."}),c.jsx("p",{className:"mt-2 text-[13px] leading-snug",children:"We identify the two or three strongest use cases, build inside the tools and systems already in place, get everyone aligned and add intelligence where it is useful. Then we deploy, manage, evolve and observe."}),c.jsx("p",{className:"mt-3 text-[13px] leading-snug font-semibold text-foreground",children:"Outcomes we deliver:"}),c.jsxs("ul",{className:"mt-1.5 space-y-1 text-[13px] leading-snug list-disc pl-4",children:[c.jsx("li",{children:"Knowledge bases that accelerate proposal creation and sales follow-up"}),c.jsx("li",{children:"Query-based systems that let teams pull from internal knowledge and act on it"}),c.jsx("li",{children:"Data normalization and intelligence projects that surface business insights"}),c.jsx("li",{children:"Follow-up that moves from days to minutes, deals closing faster, clients happier"}),c.jsx("li",{children:"Communication and administration overhead removed from the team's plate"})]}),c.jsx("p",{className:"mt-3 text-[13px] leading-snug text-muted-foreground",children:"We leave the team documented, enabled and able to evolve the systems. Then we stay involved as needed to keep things running and improving."})]})]}),c.jsx(ea,{n:"01",title:"Revenue systems",why:"The patterns we keep seeing win, scaling outbound across languages, closing talent gaps in business development, helping teams close deals, moving product innovation faster. If it doesn't tie to sales, we don't build it.",projects:[{label:"Strategic outbound process",detail
133:"Implemented a full outbound motion for a team of closers, personalized business development, tracked success, and gave reps a system they could run.",industry:"US SME SaaS"},{label:"Multilingual outbound pilot",detail:"Test pilot into a French-speaking market, built hundreds of thousands in qualified pipeline and proved the motion was repeatable across languages.",industry:"US SME SaaS"},{label:"Sales acceleration + creativity intelligence",detail:"Took proposal work from weeks to hours. Pulled the team's past wins and creative work into a system that helped them craft custom pitches, human-in-the-loop, AI layered in where it made sense, and drove adoption across the team.",industry:"UK digital marketing"},{label:"AI avatar sales content",detail:"Designed, shot, and produced reusable sales content using AI avatar and video editing tech, turning real reps into approved, on-brand assets. Provided strategy; the client team ran outreach. Educated customers, drove pipeline, closed deals, and set the stage for follow-on pilots.",industry:"National Insurance Company"}]}),c.jsx(ea,{n:"02",title:"Intelligence systems",why:"Messy data sitting everywhere, calls, docs, customer feedback, competitor moves. We clean it, structure it, and turn it into something the team can pull from to close deals and serve customers better.",projects:[{label:"Chief of Staff system",detail:"Freed up the CEO's time so she could focus on sales, and help her team do the same. Updates, briefs, and tasks surfaced automatically, no more chasing context.",industry:"Canadian startup SaaS"},{label:"Product intelligence",detail:"Pulled customer feedback, usage patterns, and success signals out of scattered tools into one view, so the team could see what was breaking, what customers wanted, and where to invest next.",industry:"Canadian startup SaaS"},{label:"Competitive intelligence",detail:"Kept the team current on their top competitors, so sales conversations landed with confidence, and reps stayed in the know when deals were on the line.",industry:"Canadian startup SaaS"},{label:"Creative + communication intelligence",detail:"Cleaned and normalized calls, recordings, inbound media, and past creative assets into searchable, structured data, so the team could pull from what already existed to move sales conversations forward.",industry:"Leadership teams"}]}),c.jsx(ea,{n:"03",title:"Applied builds",why:"Took the heavy lift out of engineering, so businesses could market-test a working application before betting big.",projects:[{label:"Compliance intelligence platform",detail:"Tackling a $1B compliance problem in Vancouver and across Canada. Built and demoed to prospective clients, saved the client hundreds of thousands versus an agency build, and let them market-test with real customers first. Currently in active development.",industry:"Real estate"},{label:"Sales qualification + internal workflows",detail:"Built sales qualification tools and internal workflows to help the owner size up jobs faster and get time back. Included testing, training, and hands-on AI enablement.",industry:"BC construction"}]}),c.jsx(ea,{n:"04",title:"AI enablement",why:c.jsxs(c.Fragment,{children:["Systems only w
133ork if the team uses them. Adoption is part of the unlock process. We never leave anyone to figure out the tools on their own. Enablement happens before every handoff, every time.",c.jsx("br",{}),c.jsx("br",{}),"Additional specific training workshops outside of this include:"]}),projects:[{label:"Applied AI workshops + SKO",detail:"Led the first applied AI workshops for the business team. Opened the conversation at their sales kickoff across sales, marketing, ops, finance, HR, CS, and the executive team, sharing applied lessons, integration opportunities, and wins we had already had with AI. Taught the team and built the business case for deeper AI tool usage and adoption.",industry:"US SME SaaS"},{label:"AI for students workshop",detail:"Created and taught a workshop on AI applications for students, covering learning, machine learning, and real-world use cases. Volunteer work for a not-for-profit organization.",industry:"Education, not-for-profit"}]}),c.jsxs(ce,{to:"/book",className:"flex items-center justify-between px-5 py-5 bg-primary text-primary-foreground hover:brightness-110 transition-colors group",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-primary-foreground/80",children:"â"}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:"Talk AI with me"})]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),c.jsx(Kn,{})]})})),ea=({n:e,title:t,why:r,projects:n})=>c.jsxs("section",{className:"border-b-2 border-foreground",children:[c.jsxs("div",{className:"px-5 py-4 bg-foreground text-background",children:[c.jsxs("div",{className:"flex items-baseline gap-3",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-background/70",children:e}),c.jsx("h2",{className:"m-0 text-[18px] font-extrabold tracking-tight leading-tight",children:t})]}),c.jsx("p",{className:"mt-1.5 text-[13px] leading-snug text-background/85",children:r})]}),c.jsx("ul",{className:"divide-y-2 divide-foreground",children:n.map(s=>c.jsx("li",{children:c.jsxs("details",{className:"group",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-3 flex items-center justify-between gap-4 hover:bg-secondary/40 transition-colors",children:[c.jsxs("span",{children:[c.jsx("span",{className:"block text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:s.industry}),c.jsx("span",{className:"block mt-1 text-[15px] font-bold tracking-tight leading-tight",children:s.label})]}),c.jsxs("span",{"aria-hidden":"true",className:"font-mono font-bold text-primary",children:[c.jsx("span",{className:"group-open:hidden",children:"+"}),c.jsx("span",{className:"hidden group-open:inline",children:"â"})]})]}),c.jsx("p",{className:"px-5 pb-4 text-[13px] leading-snug",children:s.detail})]})},s.label))})]}),sT=45,il="/book",Ir=[{key:"awareness",label:"Not enough people know us",prompt:"The right buyers don't know we exist yet.",diagnosis:"You can't sell to people who've never heard of you. The fix is getting in front of the right buyers, sharper positioning, more reach, showing up where they already are."},{key:"leads",label:"Need more leads",prompt:"Not enough good leads are coming in each month.",diagnosis:"The top of the funnel is thin or unpredictable. The fix is a repeatable engine that brings in qualified leads every week, not hoping referrals show up."},{key:"sales",label:"Want more sales",prompt:"Deals take too long, or too many go quiet.",diagnosis:"You have interest but too much of it leaks out before it closes. The fix is a tighter sales process, faster follow-up, clearer proposals, better qualification."},{key:"delivery",label:"Deliver faster and better",prompt:"Serving current customers eats the time we'd use to grow.",diagnosis:"You're capped by how much your team can deliver. The fix is taking manual work out of delivery so you can serve more customers without burning the team out."},{key:"innovation",label:"Ship new products or services faster",prompt:"New offers take too long to get out the door.",diagnosis:"The gap between idea and money is too long. The fix is shortening that loop, faster research, faster builds, faster feedback from real customers."},{key:"operations",label:"Free the team to make more money",prompt:"Admin, reporting, and repetitive work drags the team down.",diagnosis:"Your team is spending expensive hours on cheap work. The fix is pulling that work off their plates so their time goes into growth, not maintenance."}],oT=()=>{const e=Fl(),[t,r]=b.useState(Array(Ir.length).fill(null));b.useEffect(()=>{document.title="Before we talk · Unpen Creative AI";
133const m=document.createElement("meta");return m.name="robots",m.content="noindex, nofollow",document.head.appendChild(m),()=>{m.remove()}},[]);const n=t.filter(m=>m!==null).length,s=n===Ir.length,o=(m,g)=>{const k=[...t];k[m]=g,r(k)},i=()=>r(Array(Ir.length).fill(null)),a=t.map((m,g)=>({r:m??0,i:g})).filter(m=>m.r>=2).sort((m,g)=>g.r-m.r).slice(0,3).map(m=>({...Ir[m.i],rating:m.r})),l=Math.max(...t.map(m=>m??0)),u=l>=5?"urgent":l===4?"clear":l>=2?"early":"quiet",d=t.filter(m=>(m??0)>=4).length,h=t.filter(m=>(m??0)<=1).length,p=d===1&&h>=Ir.length-2?a[0]:null,f={urgent:"This is a big problem now",clear:"Here's what's costing you",early:"Some things are starting to bite",quiet:"Nothing's screaming yet"},w={urgent:"You rated something a 5. That's revenue leaking out right now. Bring this to a call and we'll start there.",early:"Nothing is on fire, but the 2s and 3s are the ones that quietly cap growth. That's usually where the cheapest wins are.",clear:"A 4 means it's already holding money back. That's a real limit and a good place to build against.",quiet:"You rated everything a 1, so there's nothing to build against yet. Maybe the real limit is something we didn't ask about. Follow the thinking, and if you want to talk it through, request a time."},v={urgent:"Request a time",clear:"Request a time",early:"Request a time",quiet:"Follow the thinking"},x={urgent:"45 minutes, no deck. Pick a time and we'll review the request, then send an invite. Your top answer comes with you.",clear:"45 minutes, no deck. Pick a time and we'll review the request, then send an invite. Your top answer comes with you.",early:"45 minutes, no deck. Small limits are often the fastest to fix. Pick a time and we'll review the request, then send an invite.",quiet:"Follow along. If the real limit is something else, requesting a time is still open."},y=()=>{u==="quiet"?e("/thinking"):e(il,{state:a[0]?{limitLabel:a[0].label,limitPrompt:a[0].prompt}:void 0})};return c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsxs("section",{className:"px-5 py-6 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-2",children:"Pre-call check"}),c.jsx("h1",{className:"text-[22px] leading-[1.15] font-extrabold tracking-tight",children:"Before we talk: take two minutes."}),c.jsx("p",{className:"mt-3 text-[13.5px] leading-relaxed text-muted-foreground",children:"See what feels harder than
133it should and what may be worth discussing when we meet. No score, no test."}),c.jsxs("a",{href:"#check",className:"mt-4 inline-flex items-center gap-2 text-[12px] font-mono font-bold uppercase tracking-[0.18em] hover:text-primary",children:["Start the 2-minute check",c.jsx(at,{className:"h-3.5 w-3.5",strokeWidth:2.5})]}),c.jsx("p",{className:"mt-3 text-[11.5px] leading-relaxed text-muted-foreground",children:"Rate each area. 1 = not a limit. 5 = biggest limit right now."})]}),c.jsx("section",{id:"check",className:"flex flex-col divide-y-2 divide-foreground scroll-mt-4",children:Ir.map((m,g)=>c.jsxs("div",{className:"px-5 py-4",children:[c.jsxs("div",{className:"flex items-baseline gap-3 mb-3",children:[c.jsxs("span",{className:"font-mono text-[12px] font-bold text-muted-foreground shrink-0",children:["0",g+1]}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-[11px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:m.label}),c.jsx("p",{className:"mt-1 text-[14px] leading-snug",children:m.prompt})]})]}),c.jsx("div",{className:"flex gap-1.5 pl-8",children:[1,2,3,4,5].map(k=>{const _=t[g]===k;return c.jsx("button",{onClick:()=>o(g,k),"aria-label":`Rate ${k}`,className:`flex-1 h-10 border-2 border-foreground text-[13px] font-mono font-bold transition-colors ${_?k>=4?"bg-primary text-primary-foreground":"bg-foreground text-background":"bg-background hover:bg-foreground
133/5"}`,children:k},k)})}),c.jsxs("div",{className:"flex justify-between pl-8 mt-1.5 text-[9px] font-mono font-bold uppercase tracking-[0.16em] text-muted-foreground",children:[c.jsx("span",{children:"Not a limit"}),c.jsx("span",{children:"Biggest limit"})]})]},m.key))}),s?c.jsxs("section",{className:"border-t-2 border-foreground",children:[c.jsxs("div",{className:"px-5 py-5 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-3",children:f[u]}),c.jsx("p",{className:"text-[14px] leading-relaxed",children:w[u]}),p&&c.jsxs("p",{className:"mt-3 text-[13px] leading-relaxed text-muted-foreground",children:["One thing stands out: everything else is calm, but"," ",c.jsx("span",{className:"text-foreground font-bold",children:p.label.toLowerCase()})," ","is rated ",p.rating,". That's the one to talk about."]}),a.length>0&&c.jsx("div",{className:"mt-4 space-y-4",children:a.map(m=>c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-baseline gap-3",children:[c.jsx("span",{className:`font-mono text-[11px] font-bold px-1.5 border-2 border-foreground ${m.rating>=4?"bg-primary text-primary-foreground":"bg-background text-muted-foreground"}`,children:m.rating}),c.jsx("span",{className:"text-[16px] font-extrabold tracking-tight",children:m.label})]}),c.jsx("p",{className:"mt-1.5 pl-8 text-[13.5px] leading-relaxed",children:m.diagnosis})]},m.key))}),c.jsx("button",{onClick:i,className:"mt-4 text-[11px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground underline underline-offset-4",children:"Retake"})]}),c.jsxs("button",{onClick:y,className:"w-full flex items-center justify-between px-5 py-5 bg-primary text-primary-foreground hover:brightness-110 transition-colors group text-left",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-primary-foreground/80",children:"â"}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:v[u]})]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),c.jsx("p",{className:"px-5 py-3 border-t-2 border-foreground text-[11px] leading-relaxed text-muted-foreground",children:x[u]}),u==="quiet"&&c.jsx("div",{className:"px-5 py-3 border-t-2 border-foreground flex flex-col gap-2",children:c.jsx(ce,{to:il,className:"text-[11px] font-mono font-bold uppercase tracking-[0.18em] hover:text-muted-foreground underline underline-offset-4",children:"Still want to talk? Request a time â"})})]}):c.jsxs("section",{className:"px-5 py-4 border-t-2 border-foreground flex items-center gap-3",children:[c.jsx("div",{className:"flex-1 h-1.5 bg-foreground
133/10 overflow-hidden",children:c.jsx("div",{className:"h-full bg-foreground transition-all",style:{width:`${n/Ir.length*100}%`}})}),c.jsxs("span",{className:"text-[10px] font-mono font-bold text-muted-foreground",children:[n,"/",Ir.length]})]}),c.jsx("footer",{className:"px-5 py-3 border-t-2 border-foreground",children:c.jsxs("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground text-center",children:["Building in Vancouver, BC · serving globally"," ",c.jsx(ce,{to:"/privacy",className:"text-muted-foreground/50 hover:text-foreground transition-colors",children:"· Privacy"})]})})]})})},iT=()=>(b.useEffect(()=>{document.title="Services · Unpen Creative AI"},[]),c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsxs("section",{className:"px-5 py-6 border-b-2 border-foreground",children:[c.jsx("p",{className:"m-0 text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-2",children:"Services"}),c.jsx("h1",{className:"m-0 text-[24px] leading-[1.12] font-extrabold tracking-tight",children:"Start with a problem."}),c.jsx(Ta,{children:c.jsx("p",{children:"Tell me what isn't working, what you wish worked differently or what you think might now be possible. We'll start there."})})]}),c.jsxs(Pu,{n:"01",title:"Talk AI with me",price:"45 minutes, free",cta:"Book a free 45-minute conversation",priceLink:!0,note:"You'll receive a short pre-call check after booking so we can make better use of the time.",children:[c.jsx("p",{children:"Bring your questions, experiments, concerns or ideas. We'll find the useful next move, if there is one."}),c.jsx("p",{className:"font-semibold",children:"This is a real conversation, not a disguised sales presentation."})]}),c.jsxs(Pu,{n:"02",title:"Get the plan",price:"One defined business outcome",note:"We'll confirm the scope and a flat fee after the free conversation. No payment until we've talked.",children:[c.jsx("p",{children:"We start with the current situation and one important business problem. I'll turn it into a practical plan covering the right tools, integrations, responsibilities, safeguards and next move."}),c.jsx("p",{className:"font-semibold",children:"Build it yourself, give it to your team, or have me make it real."})]}),c.jsxs(Pu,{n:"03",title:"Have me make it real",price:"Implementation projects from $6,000",note:"Implementation is quoted against the actual problem, scope and level of involvement required.",children:[c.jsx("p",{children:"If the plan is worth building and you want me involved, I can coordinate existing tools, integrate systems, build what is missing and document it so your team can manage what comes next."}),c.jsx("p",{className:"font-semibold",children:"The goal is to leave the business more capable than I found it."})]}),c.jsxs("details",{className:"group border-b-2 border-foreground bg-secondary",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-5 flex items-center justify-between gap-3",children:[c.jsx("h2",{className:"m-0 text-[18px] leading-[1.15] font-extrabold tracking-tight",children:"Bigger build in mind?"}),c.jsx(Pp,{})]}),c.jsx("div",{className:"px-5 pb-6",children:c.jsxs(Ta,{children:[c.jsx("p",{children:"Some opportunities are bigger than fixing an existing problem."}),c.jsx("p",{children:"An internal application, a proprietary business tool, a new AI-enabled service or a capability that creates new revenue."}),c.jsx("p",{children:"I take on selected larger builds when the business case and commitment are there."}),c.jsx("p",{className:"text-muted-foreground",children:"These projects are scoped separately."})]})})]}),c.jsxs("details",{className:"group border-b-2 border-foreground",children:[c.jsxs("summary",{className:"list-none cursor-pointer px-5 py-5 flex items-center justify-between gap-3",children:[c.jsx("h2",{className:"m-0 text-[18px] leading-[1.15] font-extrabold tracking-tight",children:"Need the team onboarded too?"}),c.jsx(Pp,{})]}),c.jsx("div",{className:"px-5 pb-6",children:c.jsxs(Ta,{children:[c.jsx("p",{className:"font-semibold",children:"Good technology with poor adoption is still a bad implementation."}),c.jsx("p",{children:"I work with your team virtually or on site to configure the tools, establish ownership, work through real use cases and help people understand and use what we build."}),c.jsx("p",{children:"Team setup and enablement can be included in an implementation."})]})})]}),c.jsxs("section",{className:"px-5 py-6 bg-foreground text-background",children:[c.jsx("p",{className:"m-0 text-[22px] leading-[1.15] font-extrabold tracking-tight",children:"Use what you have. Build what you need. Ignore what you don't."}),c.jsx(mw,{label:"Bring me a problem"})]}),c.jsx(Kn,{})]})})),Ta=({children:e})=>c.jsx("div",{className:"mt-4 space-y-3 text-[13.5px] leading-relaxed [&_p]:m-0",children:e}),Pp=()=>c.jsxs("span",{"aria-hidden":"true",className:"shrink-0 font-mono text-[16px] font-bold text-primary",children:[c.jsx("span",{className:"group-open:hidden",children:"+"}),c.jsx("span",{className:"hidden group-open:inline",children:"â"})]}),mw=({label:e,to:t=il})=>c.jsxs(ce,{to:t,className:"mt-5 w-full flex items-center justify-between gap-3 px-5 py-4 bg-primary text-primary-foreground border-2 border-foreground shadow-[4px_4px_0_0_hsl(var(--foreground))] hover:brightness-110 transition-all group",children:[c.jsx("span",{className:"text-[15px] font-bold tracking-tight",children:e}),c.jsx(at,{className:"h-5 w-5 shrink-0 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),Pu=({n:e,title:t,price:r,cta:n,note:s,to:o,priceLink:i=!1,children:a})=>c.jsxs("section",{className:"px-5 py-6 border-b-2 border-foreground",children:[c.jsx("p",{className:"m-0 text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground",children:e}),c.jsx("h2",{className:"m-0 mt-1 text-[20px] leading-[1.15] font-extrabold tracking-tight",children:t}),i?c.jsx(ce,{to:o??il,className:"mt-2 inline-flex px-2.5 py-1 border-2 border-foreground text-[11px] font-mono font-bold uppercase tracking-[0.14em] hover:bg-primary hover:text-primary-foreground transition-colors",children:r}):c.jsx("p",{className:"m-0 mt-2 inline-block px-2.5 py-1 border-2 border-foreground text-[11px] font-mono font-bold uppercase tracking-[0.14em]",children:r}),c.jsx(Ta,{children:a}),n&&c.jsx(mw,{label:n,to:o}),s&&c.jsx("p",{className:"m-0 mt-2 text-[11px] leading-relaxed text-muted-foreground",children:s})]});function aT(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 lT=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
133class kh 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 uT extends kh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Ap extends kh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Op extends kh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var qc;(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"})(qc||(qc={}));class cT{constructor(t,{headers:r={},customFetch:n,region:s=qc.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=lT(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return aT(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 v;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",v=u):typeof u=="string"?(p["Content-Type"]="text/plain",v=u):typeof FormData<"u"&&u instanceof FormData?v=u:(p["Content-Type"]="application/json",v=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?v=JSON.stringify(u):v=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 y=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:v,signal:x}).catch(_=>{throw new uT(_)}),m=y.headers.get("x-relay-error");if(m&&m==="true")throw new Ap(y);if(!y.ok)throw new Op(y);let g=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),k;return g==="application/json"?k=yield y.json():g==="application/octet-stream"||g==="application/pdf"?k=yield y.blob():g==="text/event-stream"?k=y:g==="multipart/form-data"?k=yield y.formData():k=yield y.text(),{data:k,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof Op||a instanceof Ap?a.context:void 0}}finally{o&&clearTimeout(o)}})}}const gw=3,Ip=e=>Math.min(1e3*2**e,3e4),dT=[520,503],yw=["GET","HEAD","OPTIONS"];var hT=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 Lp(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 fT(e,t,r,n){return!(!n||r>=gw||!yw.includes(e)||!dT.includes(t))}var pT=class{constructor(e){var t,r,n,s,o;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(o=e.retry)!==null&&o!==void 0?o:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const i=this.headers.get("Accept");i==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!i||i==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}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,(h,p)=>typeof p=="bigint"?p.toString():p),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!yw.includes(r.method))throw h;if(r.retryEnabled&&i<gw){const p=Ip(i);i++,await Lp(p,r.signal);continue}throw h}if(fT(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:Ip(i);await d.text(),i++,await Lp(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,v;const m=(p=h==null?void 0:h.message)!==null&&p!==void 0?p:"",g=(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: ${(v=h==null?void 0:h.name)!==null&&v!==void 0?v:"Error"}: ${m}`,g&&(l+=` (${g})`),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 y=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)",y>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((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)",y>this.urlLengthLimit&&(u+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{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:""}}
136)),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 hT(r)}return{success:r===null,error:r,data:n,count:s,status:o,statusText:i}}returns(){return this}overrideTypes(){return this}},mT=class extends pT{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}explain({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 $p=new RegExp("[,()]");var as=class extends mT{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"&&$p.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"&&$p.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])=>
136r!==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}},gT=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 as({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 as({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 as({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 as({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 as({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 yT(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 vT(e){var t=yT(e,"string");return ui(t)=="symbol"?t:t+""}function wT(e,t,r){return(t=vT(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dp(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 ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dp(Object(r),!0).forEach(function(n){wT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xT=class vw{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,ta(ta({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",w)})}return l(u,ta(ta({},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 gT(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 vw(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 as({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 bT{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const o=s.versions;if(o&&o.node){const i=o.node,a=parseInt(i.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 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.wsConstructor)return t.wsConstructor;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 kT="2.105.4",_T=`realtime-js/${kT}`,ST="1.0.0",ww="2.0.0",ET=ww,TT=1e4,CT=100,Fr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},xw={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Kc={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class jT{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),v=0;w.setUint8(v++,this.KINDS.userBroadcastPush),w.setUint8(v++,l.length),w.setUint8(v++,a.length),w.setUint8(v++,i.length),w.setUint8(v++,u.length),w.setUint8(v++,h.length),w.setUint8(v++,r),Array.from(l,y=>
140w.setUint8(v++,y.charCodeAt(0))),Array.from(a,y=>w.setUint8(v++,y.charCodeAt(0))),Array.from(i,y=>w.setUint8(v++,y.charCodeAt(0))),Array.from(u,y=>w.setUint8(v++,y.charCodeAt(0))),Array.from(h,y=>w.setUint8(v++,y.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;const 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 oe;(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"})(oe||(oe={}));const Mp=(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]=NT(i,e,t,s),o),{}):{}},NT=(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)?bw(o,i):Gc(i)},bw=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return OT(t,r)}switch(e){case oe.bool:return RT(t);case oe.float4:case oe.float8:case oe.int2:case oe.int4:case oe.int8:case oe.numeric:case oe.oid:return PT(t);case oe.json:case oe.jsonb:return AT(t);case oe.timestamp:return IT(t);case oe.abstime:case oe.date:case oe.daterange:case oe.int4range:case oe.int8range:case oe.money:case oe.reltime:case oe.text:case oe.time:case oe.timestamptz:case oe.timetz:case oe.tsrange:case oe.tstzrange:return Gc(t);default:return Gc(t)}},Gc=e=>e,RT=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},PT=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},AT=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},OT=(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=>bw(t,a))}return e},IT=e=>typeof e=="string"?e.replace(" ","T"):e,kw=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 Do=e=>typeof e=="function"?e:function(){return e},LT=typeof self<"u"?self:null,ls=typeof window<"u"?window:null,Vt=LT||ls||globalThis,$T="2.0.0",DT=1e4,MT=1e3,Jt={connecting:0,open:1,closing:2,closed:3},Ge={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ar={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Jc={longpoll:"longpoll",websocket:"websocket"},UT={complete:4},Qc="base64url.bearer.phx.",ra=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 5,632 bytes, line 140
140oks=[],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})}},_w=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))}},FT=class{constructor(e,t,r){this.state=Ge.closed,this.topic=e,this.params=Do(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ra(this,ar.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new _w(()=>{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=Ge.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Ge.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=Ge.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=Ge.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 ra(this,ar.leave,Do({}),this.timeout).send(),this.state=Ge.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ar.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ge.closed,this.bindings=[]}onClose(e){this.on(ar.close,e)}onError(e){return this.on(ar.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 ra(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=Ge.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ar.close,"leave")},r=new ra(this,ar.leave,Do({}),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=Ge.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===Ge.closed}isErrored(){return this.state===Ge.errored}isJoined(){return this.state===Ge.joined}isJoining(){return this.state===Ge.joining}isLeaving(){return this.state===Ge.leaving}},al=class{static request(e,t,r,n,s,o,i){if(Vt.XDomainRequest){let a=new Vt.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,o,i)}
vendor: 3,068 bytes, line 140
140else if(Vt.XMLHttpRequest){let a=new Vt.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,o,i)}else{if(Vt.fetch&&Vt.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),Vt.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===UT.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)}`}},BT=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)},ts=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Qc)&&(this.authToken=atob(t[1].slice(Qc.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=Jt.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Jc.websocket),"$1/"+Jc.longpoll)}endpointURL(){return al.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Jt.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Jt.open||this.readyState===Jt.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=Jt.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=BT(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=Jt.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=al.request(e,this.endpointURL(),t,r,this.timeout,i,a=>{this.reqs.delete(o),this.isActive()&&s(a)}),this.reqs.add(o)}},zT=class Eo{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=Eo.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=Eo.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=Eo.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 Eo.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(v=>v.phx_ref),p=d.metas.map(v=>v.phx_ref),f=u.metas.filter(v=>p.indexOf(v.phx_ref)<0),w=d.metas.filter(v=>h.indexOf(v.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))}},na={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,661 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:ar.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}}},WT=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||DT,this.transport=t.transport||Vt.WebSocket||ts,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Vt&&Vt.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=na.encode.bind(na),this.defaultDecoder=na.decode.bind(na),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!==ts?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ls&&ls.addEventListener&&(ls.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ls.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),ls.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,o,i)=>{console.log(`${s}: ${o}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Do(t.params||{}),this.endPoint=`${e}/${Jc.websocket}`,this.vsn=t.vsn||$T,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new _w(()=>{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 ts}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=al.appendParams(al.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=Do(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ts?this.connectWithFallback(ts,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 ts:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Qc}${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(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),MT,"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===Jt.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 141
141triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(ar.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Jt.connecting:return"connecting";case Jt.open:return"open";case Jt.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 FT(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 Mo{constructor(t,r){const n=VT(r);this.presence=new zT(t.getChannel(),n),this.presence.onJoin((s,o,i)=>{const a=Mo.onJoinPayload(s,o,i);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,o,i)=>{const a=Mo.onLeavePayload(s,o,i);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Mo.transformState(this.presence.state)}static transformState(t){return t=HT(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=Ca(s),r},{})}static onJoinPayload(t,r,n){const s=Up(r),o=Ca(n);return{event:"join",key:t,currentPresences:s,newPresences:o}}static onLeavePayload(t,r,n){const s=Up(r),o=Ca(n);return{event:"leave",key:t,currentPresences:s,leftPresences:o}}}function Ca(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function HT(e){return JSON.parse(JSON.stringify(e))}function VT(e){return(e==null?void 0:e.events)&&{events:e.events}}function Up(e){return e!=null&&e.metas?Ca(e):[]}var Fp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Fp||(Fp={}));class qT{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new Mo(this.channel.channelAdapter,r)}}function KT(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
141if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class GT{constructor(t,r,n){const s=JT(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>CT){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===Fr.joined}isJoined(){return this.state===Fr.joined}isJoining(){return this.state===Fr.joining}isClosed(){return this.state===Fr.closed}isLeaving(){return this.state===Fr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function JT(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Bp;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Bp||(Bp={}));var _s;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(_s||(_s={}));var lr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(lr||(lr={}));class Uo{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 GT(this.socket.socketAdapter,t,this.params),this.presence=new qT(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=kw(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 new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,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[_s.PRESENCE]&&this.bindings[_s.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(lr.CHANNEL_ERROR,KT(f))}),this._onClose(()=>t==null?void 0:t(lr.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(lr.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=Fr.errored;const w=Object.values(f).join(", ")||"error";t==null||t(lr.CHANNEL_ERROR,new Error(w,{cause:f}))}).receive("timeout",()=>{t==null||t(lr.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&&Uo.isFilterValueEqual(f.schema,d)&&Uo.isFilterValueEqual(f.table,h)&&Uo.isFilterValueEqual(f.filter,p))i.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=Fr.errored,r==null||r(lr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=i,this.state!=Fr.errored&&r&&r(lr.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===_s.PRESENCE||t===_s.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(new Error("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 instanceof Error&&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}=xw;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=Mp(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Mp(t.columns,t.old_record)),r}}class QT{constructor(t,r){this.socket=new WT(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()==Kc.connecting}isDisconnecting(){return this.socket.connectionState()==Kc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const zp={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},YT=[1e3,2e3,5e3,1e4],XT=1e4;function ZT(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function eC(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return ZT()}const tC=` 142 addEventListener("message", (e) => { 143 if (e.data.event === "start") { 144 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 145 } 146 });`;class rC{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 jT,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,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 QT(t,s),this.httpEndpoint=kw(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._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||Kc.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 Uo(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),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),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
159this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:_T};r&&s.updateJoinPayload(o),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(xw.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([tC],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,o,i,a,l,u,d,h,p,f;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const w={};w.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:TT,w.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:zp.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(i=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&i!==void 0?i:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:zp.HEARTBEAT_INTERVAL),w.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:bT.getWebSocketConstructor(),w.params=t==null?void 0:t.params,w.logger=t==null?void 0:t.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),w.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:eC(),w.reconnectAfterMs=(d=t==null?void 0:t.reconnectAfterMs)!==null&&d!==void 0?d:m=>YT[m-1]||XT;let v,x;const y=(h=t==null?void 0:t.vsn)!==null&&h!==void 0?h:ET;switch(y){case ST:v=(m,g)=>g(JSON.stringify(m)),x=(m,g)=>g(JSON.parse(m));break;case ww:v=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=y,w.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:v,w.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:x,w.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
159var ci=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 nC(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 sC(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 oC(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=nC(e.baseUrl,n,s),l=await sC(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 ci((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 sa(e){return e.join("�")}var iC=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:sa(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/${sa(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sa(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${sa(e.namespace)}`}),!0}catch(t){if(t instanceof ci&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof ci&&r.status===409)return;throw r}}};function rs(e){return e.join("�")}var aC=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/${rs(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/${rs(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/${rs(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/${rs(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/${rs(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/${rs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof ci&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof ci&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},lC=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=oC({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new iC(this.client,t),this.tableOps=new aC(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)}};function di(e){"@babel/helpers - typeof";return di=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},di(e)}function uC(e,t){if(di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cC(e){var t=uC(e,"string");return di(t)=="symbol"?t:t+""}function dC(e,t,r){return(t=cC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wp(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 H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(r),!0).forEach(function(n){dC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bl=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function zl(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Yc=class extends Bl{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 H({},super.toJSON())}},Sw=class extends Bl{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function ll(e,t,r){const n=H({},e),s=t.toLowerCase();for(const o of Object.keys(n))o.toLowerCase()===s&&delete n[o];return n[s]=r,n}function hC(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const fC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),pC=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)},Xc=e=>{if(Array.isArray(e))return e.map(r=>Xc(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]=Xc(n)}),t},mC=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Hp=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},gC=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let o=parseInt(String(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 Yc(Hp(i),o,a,n))}).catch(()=>{const i=o+"";t(new Yc(s.statusText||`HTTP ${o} error`,o,i,n))})}else t(new Sw(Hp(e),e,n))},yC=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return H(H({},s),r);if(pC(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=ll(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),H(H({},s),r)};async function wo(e,t,r,n,s,o,i){return new Promise((a,l)=>{e(r,yC(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=>gC(u,l,n,i))})}function Ew(e="storage"){return{get:async(t,r,n,s)=>wo(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,o)=>wo(t,"POST",r,s,o,n,e),put:async(t,r,n,s,o)=>wo(t,"PUT",r,s,o,n,e),head:async(t,r,n,s)=>wo(t,"HEAD",r,H(H({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,o)=>wo(t,"DELETE",r,s,o,n,e)}}const vC=Ew("storage"),{get:hi,post:Rt,put:Zc,head:wC,remove:_h}=vC,st=Ew("vectors");var oo=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=hC(t),this.fetch=fC(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=ll(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(zl(r))return{data:null,error:r};throw r}}},xC=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 Tw;Tw=Symbol.toStringTag;var bC=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Tw]="BlobDownloadBuilder",this.promise=null}asStream(){return new xC(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 kC={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Vp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var _C=class extends oo{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=H(H({},Vp),n);let a=H(H({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;if(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)for(const[p,f]of Object.entries(n.headers))a=ll(a,p,f);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?Zc:Rt)(s.fetch,`${s.url}/object/${d}`,o,H({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=H(H({},Vp),n);let d=H(H({},s.headers),{"x-upsert":String(u.upsert)});const h=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),h&&l.append("metadata",s.encodeMetadata(h)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),h&&!l.has("metadata")&&l.a
159ppend("metadata",s.encodeMetadata(h))):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,h&&(d["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))d=ll(d,p,f);return{path:o,fullPath:(await Zc(s.fetch,a.toString(),l,H({headers:d},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=H({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await Rt(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 Bl("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 Rt(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 Rt(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 Rt(n.fetch,`${n.url}/object/sign/${s}`,H({expiresIn:t},o?{transform:r.transform}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${i.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Rt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=new URLSearchParams;r!=null&&r.download&&o.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&o.set("cacheNonce",String(r.cacheNonce));const i=o.toString();return s.map(a=>H(H({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${i?`&${i}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const o=s.toString(),i=this._getFinalPath(e),a=()=>hi(this.fetch,`${this.url}/${n}/${i}${o?`?${o}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new bC(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Xc(await hi(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await wC(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 Yc?s.status:s instanceof Sw?(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=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),o=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}`)+(s?`?${s}`:"")}}}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=H(H(H({},kC),t),{},{prefix:e||""});return await Rt(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=H({},e);return await Rt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const SC="2.105.4",Ti={"X-Client-Info":`storage-js/${SC}`};var EC=class extends oo{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=H(H({},Ti),t);super(o,i,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await hi(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await hi(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Rt(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 Zc(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 Rt(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():""}},TC=class extends oo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},Ti),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Rt(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 hi(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(!mC(e))throw new Bl("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 lC({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}}}}})}},CC=class extends oo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},Ti),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await st.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await st.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await st.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await st.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},jC=class extends oo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},Ti),{},{"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 st.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await st.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 st.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await st.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 st.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},NC=class extends oo{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=H(H({},Ti),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await st.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await st.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await st.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await st.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},RC=class extends NC{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new PC(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)}},PC=class extends CC{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,H(H({},e),{},{vectorBucketName:r.vectorBucketName}))}
159async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,H(H({},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 AC(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},AC=class extends jC{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,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,H(H({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},OC=class extends EC{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new _C(this.url,this.headers,e,this.fetch)}get vectors(){return new RC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new TC(this.url+"/iceberg",this.headers,this.fetch)}};function Wl(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 Cw="2.105.4",us=30*1e3,ed=3,Au=ed*us,IC="http://localhost:9999",LC="supabase.auth.token",$C={"X-Client-Info":`gotrue-js/${Cw}`},td="X-Supabase-Api-Version",jw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},DC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,MC=10*60*1e3;class fi extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function $(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class UC extends fi{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function FC(e){return $(e)&&e.name==="AuthApiError"}class Lt extends fi{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Sr extends fi{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Ce extends Sr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function oa(e){return $(e)&&e.name==="AuthSessionMissingError"}class ns extends Sr{constructor(){super("Auth session or user missing","AuthInvalidToken
159ResponseError",500,void 0)}}class ia extends Sr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class aa extends Sr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function BC(e){return $(e)&&e.name==="AuthImplicitGrantRedirectError"}class qp extends Sr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class zC extends Sr{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 rd extends Sr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Ou(e){return $(e)&&e.name==="AuthRetryableFetchError"}class Kp extends Sr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class nd extends Sr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const ul="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Gp=` 160\r=`.split(""),WC=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Gp.length;t+=1)e[Gp[t].charCodeAt(0)]=-2;for(let t=0;t<ul.length;t+=1)e[ul[t].charCodeAt(0)]=t;return e})();function Jp(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(ul[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(ul[n]),t.queuedBits-=6}}function Nw(e,t,r){const n=WC[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 Qp(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{qC(i,n,r)};for(let i=0;i<e.length;i+=1)Nw(e.charCodeAt(i),s,o);return t.join("")}function HC(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 VC(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}HC(n,t)}}function qC(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 As(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Nw(e.charCodeAt(s),r,n);return new Uint8Array(t)}function KC(e){const t=[];return VC(e,r=>t.push(r)),new Uint8Array(t)}function Nn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Jp(s,r,n)),Jp(null,r,n),t.join("")}function GC(e){return Math.round(Date.now()/1e3)+e}function JC(){return Symbol("auth-callback")}const Pe=()=>typeof window<"u"&&typeof document<"u",bn={tested:!1,writable:!1},Rw=()=>{if(!Pe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(bn.tested)return bn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),bn.tested=!0,bn.writable=!0}catch{bn.tested=!0,bn.writable=!1}return bn.writable};function QC(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 Pw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YC=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",cs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},kn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Re=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 la(e){const t=e.split(".");if(t.length!==3)throw new nd("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!DC.test(t[n]))throw new nd("JWT not in base64url format");return{header:JSON.parse(Qp(t[0])),payload:JSON.parse(Qp(t[1])),signature:As(t[2]),raw:{header:t[0],payload:t[1]}}}async function XC(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ZC(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 ej(e){return("0"+e.toString(16)).substr(-2)}function tj(){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,ej).join("")}async function rj(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 nj(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 rj(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ss(e,t,r=!1){const n=tj();let s=n;r&&(s+="/recovery"),await cs(e,`${t}-code-verifier`,s);const o=await nj(n);return[o,n===o?"plain":"s256"]}const sj=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function oj(e){const t=e.headers.get(td);if(!t||!t.match(sj))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function ij(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 aj(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 lj=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function sr(e){if(!lj.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Ct(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Iu(){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 uj(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
160if(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 Yp(e){return JSON.parse(JSON.stringify(e))}const En=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},cj=[502,503,504,520,521,522,523,524,530];async function Xp(e){var t;if(!YC(e))throw new rd(En(e),0);if(cj.includes(e.status))throw new rd(En(e),e.status);let r;try{r=await e.json()}catch(o){throw new Lt(En(o),o)}let n;const s=oj(e);if(s&&s.getTime()>=jw["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 Kp(En(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Ce}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 Kp(En(r),e.status,r.weak_password.reasons);throw new UC(En(r),e.status||500,n)}const dj=(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 F(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[td]||(o[td]=jw["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 hj(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 hj(e,t,r,n,s,o){const i=dj(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new rd(En(l),0)}if(a.ok||await Xp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Xp(l)}}function pt(e){var t;let r=null;mj(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=GC(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Zp(e){const t=pt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Br(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function fj(e){return{data:e,error:null}}function pj(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=Wl(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 em(e){return e}function mj(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Lu=["global","local","others"];class gj{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=Pw(n),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=Lu[0]){if(Lu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Lu.join(", ")}`);try{return await F(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await F(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Br})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Wl(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 F(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:pj,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if($(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await F(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Br})}catch(r){if($(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 F(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:em});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 v=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);u[`${x}Page`]=v}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if($(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){sr(t);try{return await F(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Br})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){sr(t);try{return await F(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Br})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){sr(t);
160try{return await F(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Br})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){sr(t.userId);try{const{data:r,error:n}=await F(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($(r))return{data:null,error:r};throw r}}async _deleteFactor(t){sr(t.userId),sr(t.id);try{return{data:await F(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if($(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 F(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:em});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 v=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);u[`${x}Page`]=v}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if($(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await F(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await F(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await F(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await F(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await F(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if($(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await F(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await F(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await F(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await F(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){Ct(this.experimental),sr(t.userId);try{return await F(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){Ct(this.experimental),sr(t.userId),sr(t.passkeyId);
160try{return await F(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}}function tm(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Wt={debug:!!(globalThis&&Rw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Aw extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class rm extends Aw{}async function yj(e,t,r){Wt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{n.abort(),Wt.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),Wt.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await r()}finally{Wt.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw Wt.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new rm(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Wt.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&&typeof o=="object"&&"name"in o&&o.name==="AbortError"&&t>0){if(n.signal.aborted)return Wt.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){Wt.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,i.name);try{return await r()}finally{Wt.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 Wt.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new rm(`Lock "${e}" was released because another request stole it`)}throw o}}function vj(){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 Ow(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function wj(e){return parseInt(e,16)}function xj(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function bj(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}`);
160if(!((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=Ow(e.address),w=d?`${d}://${n}`:n,v=e.statement?`${e.statement} 162`:"",x=`${w} wants you to sign in with your Ethereum account: 163${f} 164 165${v}`;let y=`URI: ${h} 166Version: ${p} 167Chain ID: ${r}${i?` 168Nonce: ${i}`:""} 169Issued At: ${o.toISOString()}`;if(s&&(y+=` 170Expiration Time: ${s.toISOString()}`),a&&(y+=` 171Not Before: ${a.toISOString()}`),l&&(y+=` 172Request ID: ${l}`),u){let m=` 173Resources:`;for(const g of u){if(!g||typeof g!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${g}`);m+=` 174- ${g}`}y+=m}return`${x} 175${y}`}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}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class cl extends ke{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function kj({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(Iw(i)){if(o.rp.id!==i)return new ke({message:`The RP ID "${o.rp.id}" 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 _j({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(Iw(n)){if(r.rpId!==n)return new ke({message:`The RP ID "${r.rpId}
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==="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 Sj{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 sd=new Sj;function nm(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=Wl(e,["challenge","user","excludeCredentials"]),o=As(t).buffer,i=Object.assign(Object.assign({},r),{id:As(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:As(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function sm(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=Wl(e,["challenge","allowCredentials"]),s=As(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:As(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function om(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:Nn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Nn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function im(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:Nn(new Uint8Array(s.authenticatorData)),clientDataJSON:Nn(new Uint8Array(s.clientDataJSON)),signature:Nn(new Uint8Array(s.signature)),userHandle:s.userHandle?Nn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Iw(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function dl(){var e,t;return!!(Pe()&&"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 Lw(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cl("Browser returned unexpected credential type",t)}:{data:null,error:new cl("Empty credential response",t)}}catch(t){return{data:null,error:kj({error:t,options:e})}}}async function $w(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cl("Browser returned unexpected credential type",t)}:{data:null,error:new cl("Empty credential response",t)}}
175catch(t){return{data:null,error:_j({error:t,options:e})}}}const Ej={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Tj={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function hl(...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]=hl(a,i):n[o]=hl(i)}else n[o]=i}return n}function Cj(e,t){return hl(Ej,e,t||{})}function jj(e,t){return hl(Tj,e,t||{})}class Nj{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??sd.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=Cj(a.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:h,error:p}=await Lw({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=jj(a.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:h,error:p}=await $w(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 $(a)?{data:null,error:a}:{data:null,error:new Lt("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 fi("rpId is required for WebAuthn authentication")};try{if(!dl())return{data:null,error:new Lt("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 $(i)?{data:null,error:i}:{data:null,error:new Lt("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 fi("rpId is required for WebAuthn registration")};try{if(!dl())return{data:null,error:new Lt("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;return(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 $(i)?{data:null,error:i}:{data:null,error:new Lt("Unexpected error in register",i)}}}}vj();const Rj={url:IC,storageKey:LC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:$C,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function am(e,t,r){return await r()}const os={};class pi{get jwks(){var t,r;return(r=(t=os[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){os[this.storageKey]=Object.assign(Object.assign({},os[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=os[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){os[this.storageKey]=Object.assign(Object.assign({},os[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},Rj),t);
175if(this.storageKey=i.storageKey,this.instanceID=(r=pi.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,pi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Pe()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(n=i.experimental)!==null&&n!==void 0?n:{},this.admin=new gj({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=Pw(i.fetch),this.lock=i.lock||am,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&Pe()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=yj:this.lock=am,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 Nj(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.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:Rw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=tm(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=tm(this.memoryStorage)),Pe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}i.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Cw}) ${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(Pe()&&(r=QC(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Pe()&&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),BC(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 $(r)?this._returnResult({error:r}):this._returnResult({error:new Lt("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 F(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:pt}),{data: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($(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 ss(this.storage,this.storageKey)),o=await F(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:pt})}else if("phone"in t){const{phone:d,password:h,options:p}=t;o=await F(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:pt})}else throw new ia("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await Re(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 Re(this.storage,`${this.storageKey}-code-verifier`),$(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 F(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:Zp})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await F(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:Zp})}else throw new ia("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 ns;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($(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:v,wallet:x,statement:y,options:m}=t;let g;if(Pe())if(typeof x=="object")g=x;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")g=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"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=x}const k=new URL((r=m==null?void 0:m.url)!==null&&r!==void 0?r:window.location.href),_=await g.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=Ow(_[0]);let E=(n=m==null?void 0:m.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const A=await g.request({method:"eth_chainId"});E=wj(A)}const N={domain:k.host,address:S,statement:y,uri:k.href,version:"1",chainId:E,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=m==null?void 0:m.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=m==null?void 0:m.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=bj(N),w=await g.request({method:"personal_sign",params:[xj(f),S]})}try{const{data:v,error:x}=await F(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:pt});if(x)throw x;if(!v||!v.session||!v.user){const y=new ns;return this._returnResult({data:{user:null,session:null},error:y})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if($(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(t){var r,n,s,o,i,a,l,u,d,h,p,f;let w,v;if("message"in t)w=t.message,v=t.signature;else{const{chain:x,wallet:y,statement:m,options:g}=t;let k;if(Pe())if(typeof y=="object")k=y;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"))k=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 y!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=y}const _=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href);
175if("signIn"in k&&k.signIn){const S=await k.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),m?{statement:m}: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),v=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in k)||typeof k.signMessage!="function"||!("publicKey"in k)||typeof k!="object"||!k.publicKey||!("toBase58"in k.publicKey)||typeof k.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${_.host} wants you to sign in with your Solana account:`,k.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(n=g==null?void 0:g.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((i=g==null?void 0:g.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((u=g==null?void 0:g.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((h=(d=g==null?void 0:g.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...g.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 176`);const S=await k.signMessage(new TextEncoder().encode(w),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=S}}try{const{data:x,error:y}=await F(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Nn(v)},!((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:pt});if(y)throw y;if(!x||!x.session||!x.user){const m=new ns;return this._returnResult({data:{user:null,session:null},error:m})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}catch(x){if($(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await kn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new zC;const{data:o,error:i}=await F(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:pt});if(await Re(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new ns;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await Re(this.storage,`${this.storageKey}-code-verifier`),$(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 F(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:pt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new ns;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($(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 ss(this.storage,this.storageKey));const{error:h}=await F(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 F(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 ia("You must provide either an email or phone number.")}catch(a){if(await Re(this.storage,`${this.storageKey}-code-verifier`),$(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 F(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:pt});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($(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 ss(this.storage,this.storageKey));const u=await F(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:fj});return!((o=u.data)===null||o===void 0)&&o.url&&Pe()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Re(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Ce;const{error:s}=await F(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($(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 F(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 F(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 ia("You must provide either an email or phone number and a type")}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(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 kn(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()<Au:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await kn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=Iu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=uj(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 F(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Br}):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 Ce}:await F(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:Br})})}catch(r){if($(r))return oa(r)&&(await this._removeSession(),await Re(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 Ce;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await ss(this.storage,this.storageKey));const{data:u,error:d}=await F(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:Br});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 Re(this.storage,`${this.storageKey}-code-verifier`),$(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 Ce;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=la(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($(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 Ce;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($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!Pe())throw new aa("No browser detected.");
176if(t.error||t.error_description||t.error_code)throw new aa(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 aa("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:k}=await this._exchangeCodeForSession(t.code);if(k)throw k;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:(n=g.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:o,access_token:i,refresh_token:a,expires_in:l,expires_at:u,token_type:d}=t;if(!i||!l||!a||!d)throw new aa("No session defined in URL");const h=Math.round(Date.now()/1e3),p=parseInt(l);let f=h+p;u&&(f=parseInt(u));const w=f-h;w*1e3<=us&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${p}s`);const v=f-p;h-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,f,h):h-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,f,h);const{data:x,error:y}=await this._getUser(i);if(y)throw y;const m={provider_token:s,provider_refresh_token:o,access_token:i,expires_in:p,expires_at:f,refresh_token:a,token_type:d,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:t.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await kn(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&&!oa(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&&!(FC(a)&&(a.status===404||a.status===401||a.status===403)||oa(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Re(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=JC(),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),oa(o)?console.warn(o):console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await ss(this.storage,this.storageKey,!0));try{return await F(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 Re(this.storage,`${this.storageKey}-code-verifier`),$(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($(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 F(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 Pe()&&!(!((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($(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 F(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:pt}),{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 ns}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await Re(this.storage,`${this.storageKey}-code-verifier`),$(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 F(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($(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 ZC(async s=>(s>0&&await XC(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await F(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:pt})),(s,o)=>{const i=200*Math.pow(2,s);return o&&Ou(o)&&Date.now()+i-n<us})}catch(n){if(this._debug(r,"error",n),$(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(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),Pe()&&!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 kn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await kn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await cs(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:Iu()}else if(s&&!s.user&&!s.user){const i=await kn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Re(this.storage,this.storageKey+"-user"),await cs(this.storage,this.storageKey,s)):s.user=Iu()}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()<Au;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${Au}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),Ou(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 Ce;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 Ce;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),$(o)){const i={data:null,error:o};return Ou(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 Re(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 cs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Yp(s);await cs(this.storage,this.storageKey,o)}else{const s=Yp(r);await cs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Re(this.storage,this.storageKey),await Re(this.storage,this.storageKey+"-code-verifier"),await Re(this.storage,this.storageKey+"-user"),this.userStorage&&await Re(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Pe()&&(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(),us);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)/us);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${us}ms, refresh threshold is ${ed} ticks`),s<=ed&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof Aw)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Pe()||!(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 ss(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 F(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($(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 F(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($(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"?om(t.webauthn.credential_response):im(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await F(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($(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 F(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:nm(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:sm(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if($(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}=la(t);let w=null;f.aal&&(w=f.aal);let v=w;const{data:{user:x},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(k=>k.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(v="aal2");const g=f.amr||[];return{data:{currentLevel:w,nextLevel:v,currentAuthenticationMethods:g},error:null}}catch(f){if($(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}=la(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 F(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 Ce})})}catch(r){if($(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 Ce});const i=await F(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&&Pe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if($(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 Ce});const i=await F(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&&Pe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if($(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 F(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 Ce})})}catch(t){if($(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 F(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 Ce})})}catch(r){if($(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+MC>s)return n;const{data:o,error:i}=await F(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}}=la(n);r!=null&&r.allowExpired||ij(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=aj(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,i,KC(`${a}.${l}`)))throw new nd("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;Ct(this.experimental);try{if(!dl())return this._returnResult({data:null,error:new Lt("Browser does not support WebAuthn",null)});const{data:o,error:i}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(i||!o)return this._returnResult({data:null,error:i});const a=sm(o.options),l=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:sd.createNewAbortSignal(),{data:u,error:d}=await $w({publicKey:a,signal:l});if(d||!u)return this._returnResult({data:null,error:d??new Lt("WebAuthn ceremony failed",null)});const h=im(u);return this._verifyPasskeyAuthentication({challengeId:o.challenge_id,credential:h})}catch(o){if($(o))return this._returnResult({data:null,error:o});throw o}}async registerPasskey(t){var r,n;Ct(this.experimental);try{if(!dl())return this._returnResult({data:null,error:new Lt("Browser does not support WebAuthn",null)});const{data:s,error:o}=await this._startPasskeyRegistration();if(o||!s)return this._returnResult({data:null,error:o});const i=nm(s.options),a=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:sd.createNewAbortSignal(),{data:l,error:u}=await Lw({publicKey:i,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Lt("WebAuthn ceremony failed",null)});const d=om(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Ct(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ce});const{data:s,error:o}=await F(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})})}catch(t){if($(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Ct(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Ce});const{data:o,error:i}=await F(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:o,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;Ct(this.experimental);try{const{data:n,error:s}=await F(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){Ct(this.experimental);try{const{data:r,error:n}=await F(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:pt});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Ct(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ce});const{data:s,error:o}=await F(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})})}catch(t){if($(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Ct(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Ce});const{data:o,error:i}=await F(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:o,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){Ct(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Ce});const{error:o}
176=await F(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return o?this._returnResult({data:null,error:o}):this._returnResult({data:null,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}}pi.nextInstanceID={};const Pj=pi,Aj="2.105.4";let To="";typeof Deno<"u"?To="deno":typeof document<"u"?To="web":typeof navigator<"u"&&navigator.product==="ReactNative"?To="react-native":To="node";const Oj={"X-Client-Info":`supabase-js-${To}/${Aj}`},Ij={headers:Oj},Lj={schema:"public"},$j={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Dj={};function mi(e){"@babel/helpers - typeof";return mi=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},mi(e)}function Mj(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uj(e){var t=Mj(e,"string");return mi(t)=="symbol"?t:t+""}function Fj(e,t,r){return(t=Uj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lm(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 ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lm(Object(r),!0).forEach(function(n){Fj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const Bj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),zj=()=>Headers,Wj=(e,t,r)=>{const n=Bj(r),s=zj();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,ye(ye({},i),{},{headers:u}))}};function Hj(e){return e.endsWith("/")?e:e+"/"}function Vj(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:ye(ye({},l),s),auth:ye(ye({},u),o),realtime:ye(ye({},d),i),storage:{},global:ye(ye(ye({},h),a),{},{headers:ye(ye({},(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 qj(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(Hj(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Kj=class extends Pj{constructor(e){super(e)}},Gj=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=qj(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:Lj,realtime:Dj,auth:ye(ye({},$j),{},{storageKey:i}),global:Ij},l=Vj(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=Wj(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(ye({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},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 xT(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 OC(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new cT(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,experimental:d,lockAcquireTimeout:h,skipAutoInitialize:p},f,w){const v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Kj({url:this.authUrl.href,headers:ye(ye({},v),f),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:a,debug:l,throwOnError:u,experimental:d,fetch:w,lockAcquireTimeout:h,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new rC(this.realtimeUrl.href,ye(ye({},e),{},{params:ye(ye({},{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 Jj=(e,t,r)=>new Gj(e,t,r);function Qj(){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}Qj()&&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");function Yj(){var x,y;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(m=>e===m||e.endsWith("."+m)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((y=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:y[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&a.test(l)?[l]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d="lovable-preview-auth:result",h=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(m,g,k)=>new Promise(_=>{const S=p();let E=!1,N;const A=R=>{E||(E=!0,clearTimeout(N),window.removeEventListener("message",O),_(R))},O=R=>{if(u.indexOf(R.origin)<0)return;const B=R.data;B&&B.type===d&&B.requestId===S&&A(B)};window.addEventListener("message",O);const D={type:m,requestId:S,projectId:s,key:g};k!==void 0&&(D.value=k);for(const R of u)window.parent.postMessage(D,R);N=setTimeout(()=>A(null),h)});let w=!0;const v=250;return{getItem:async m=>{let g=await f("lovable-preview-auth:get",m);return!g&&w&&(await new Promise(k=>setTimeout(k,v)),g=await f("lovable-preview-auth:get",m)),w=!1,g&&g.ok&&typeof g.value=="string"?g.value===""?(localStorage.removeItem(m),null):g.value:localStorage.getItem(m)},setItem:(m,g)=>(localStorage.setItem(m,g),f("lovable-preview-auth:set",m,g).then(k=>{k&&k.ok&&typeof k.value=="string"&&localStorage.getItem(m)===g&&(k.value===""?localStorage.removeItem(m):localStorage.setItem(m,k.value))})),removeItem:m=>(localStorage.removeItem(m),f("lovable-preview-auth:remove",m).then(()=>{}))}}const Xj="https://yaebrzlljxfqjxrtmcuw.supabase.co",Zj="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlhZWJyemxsanhmcWp4cnRtY3V3Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg2MDQ0NTQsImV4cCI6MjA5NDE4MDQ1NH0.jhbYFc9yFniHXaFP-vlTn11qLOvM2rWaZ2GAoWnAGD0",Os=Jj(Xj,Zj,{auth:{storage:Yj(),persistSession:!0,autoRefreshToken:!0}}),ua="w-full px-3 py-3 bg-background border-2 border-foreground text-[14px] placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background",ca="block text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-1.5",xo="text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground",eN=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return""}},tN=()=>{var O;const t=kr().state??null,[r,n]=b.useState([]),[s,o]=b.useState(!0),[i,a]=b.useState(!1),[l,u]=b.useState(null),[d,h]=b.useState(null),[p,f]=b.useState(!1),[w,v]=b.useState(null),[x,y]=b.useState(null),[m,g]=b.useState({name:"",email:"",company:"",teamSize:"",engagementType:"",notes:(t==null?void 0:t.limitPrompt)??"",revenueFocus:""}),k=D=>R=>g(B=>({...B,[D]:R.target.value})),_=b.useMemo(eN,[]);b.useEffect(()=>{document.title="Request a time · Unpen Creative AI"},[]),b.useEffect(()=>{let D=!1;return(async()=>{var L;const{data:R,error:B}
176=await Os.functions.invoke("get-availability");if(!D){if(B||!(R!=null&&R.days)){a(!0),o(!1);return}n(R.days),u(((L=R.days[0])==null?void 0:L.date)??null),o(!1)}})(),()=>{D=!0}},[]);const S=D=>{const R=new Date(`${D}T12:00:00Z`);return{weekday:R.toLocaleDateString(void 0,{weekday:"short",timeZone:"UTC"}),day:R.toLocaleDateString(void 0,{day:"numeric",timeZone:"UTC"}),month:R.toLocaleDateString(void 0,{month:"short",timeZone:"UTC"})}},E=D=>new Date(D).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),N=((O=r.find(D=>D.date===l))==null?void 0:O.slots)??[],A=async D=>{var L;if(D.preventDefault(),!d)return;f(!0),v(null);const{data:R,error:B}=await Os.functions.invoke("create-booking",{body:{name:m.name.trim(),email:m.email.trim(),company:m.company.trim(),teamSize:m.teamSize,engagementType:m.engagementType,callType:"talk",notes:m.notes.trim(),revenueFocus:m.revenueFocus.trim(),startsAt:d,timezone:_}});if(B||!(R!=null&&R.id)){f(!1);let G=typeof(R==null?void 0:R.error)=="string"?R.error:"";const V=B==null?void 0:B.context;if(!G&&V&&typeof V.json=="function")try{const z=await V.clone().json();typeof(z==null?void 0:z.error)=="string"&&(G=z.error)}catch{}if(G==="slot_unavailable"||G==="slot_taken"){v("That time just went. Pick another slot and we'll take it from there.");const{data:z}=await Os.functions.invoke("get-availability");z!=null&&z.days&&(n(z.days),u(((L=z.days[0])==null?void 0:L.date)??null)),h(null);return}if(G==="invalid_input"){v("Something in the form didn't come through. Check the fields and try again.");return}v("That didn't go through on our end. Your details are still here, try again.");return}y(d),f(!1)};return c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),x?c.jsxs("section",{className:"px-5 py-10",children:[c.jsx("p",{className:`${xo} mb-2`,children:"Request sent"}),c.jsxs("h1",{className:"text-[22px] leading-[1.15] font-extrabold tracking-tight mb-3",children:["Thanks for reaching out. You asked for"," ",new Date(x).toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric"})," ","at ",E(x),"."]}),c.jsx("p",{className:"text-[13.5px] leading-relaxed text-muted-foreground",children:"We'll reply with a calendar invite, usually the same day. A confirmation of what you sent is already in your inbox. Check spam or junk if you don't see it in a few minutes. If that time stops working, just reply to it."}),c.jsxs("div",{className:"mt-6 px-4 py-4 border-2 border-foreground bg-secondary",children:[c.jsx("p",{className:"text-[13.5px] font-bold tracking-tight",children:"Before we talk: take two minutes."}),c.jsx("p",{className:"mt-1 text-[12.5px] leading-relaxed text-muted-foreground",children:"Optional, but it helps us start at the useful part."}),c.jsxs(ce,{to:"/scorecard",className:"mt-3 inline-flex items-center gap-2 text-[12px] font-mono font-bold uppercase tracking-[0.18em] hover:text-primary",children:["Start the 2-minute check",c.jsx(at,{className:"h-3.5 w-3.5",strokeWidth:2.5})]})]}),c.jsxs(ce,{to:"/",className:"mt-6 inline-flex items-center gap-2 text-[12px] font-mono font-bold uppercase tracking-[0.18em] hover:text-primary",children:["Back to start",c.jsx(at,{className:"h-3.5 w-3.5",strokeWidth:2.5})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"px-5 py-6 border-b-2 border-foreground",children:[c.jsx("p",{className:`${xo} mb-2`,children:"Talk AI with me. 45 minutes, free."}),c.jsx("h1",{className:"text-[22px] leading-[1.15] font-extrabold tracking-tight",children:"Bring your questions, experiments, frustrations and ideas."}),c.jsxs("div",{className:"mt-3 space-y-2 text-[13.5px] leading-relaxed",children:[c.jsx("p",{children:"We'll talk about how you're using AI now, what your business is trying to accomplish and where I think there may be useful opportunities."}),c.jsx("p",{children:"I'll share practical things I've learned in the field and give you ideas you can take away and try."}),c.jsx("p",{children:"There is no requirement to buy anything afterwards."})]}),c.jsxs("p",{className:"mt-3 text-[13px] leading-relaxed text-muted-foreground",children:["Tuesdays and Fridays, ",sT," minutes, no deck. Times shown in your timezone",_?` (${_})`:"","."]}
176),(t==null?void 0:t.limitLabel)&&c.jsxs("p",{className:"mt-4 px-3 py-2 border-2 border-foreground bg-secondary text-[12px] leading-relaxed",children:["From your assessment, your biggest limit is"," ",c.jsx("span",{className:"font-bold",children:t.limitLabel.toLowerCase()}),". We've carried it into the form below, edit it however you like."]})]}),c.jsxs("section",{className:"px-5 py-5 border-b-2 border-foreground",children:[c.jsx("p",{className:`${xo} mb-3`,children:"01. Choose a day"}),s?c.jsxs("div",{className:"flex items-center gap-2 py-4 text-[13px] text-muted-foreground",children:[c.jsx(Gf,{className:"h-4 w-4 animate-spin",strokeWidth:2.5}),"Checking the calendar"]}):i||r.length===0?c.jsxs("p",{className:"text-[13px] leading-relaxed text-muted-foreground",children:["No open times right now."," ",c.jsx(ce,{to:"/work-with-us",className:"underline font-semibold text-foreground",children:"Send some context instead"})," ","and we'll come back to you within 1 business day."]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",children:r.map(D=>{const R=S(D.date),B=D.date===l;return c.jsxs("button",{type:"button",onClick:()=>{u(D.date),h(null)},className:`shrink-0 w-[62px] py-2 border-2 border-foreground text-center transition-all ${B?"bg-primary text-primary-foreground shadow-[3px_3px_0_0_hsl(var(--foreground))]":"bg-background hover:bg-secondary"}`,children:[c.jsx("span",{className:"block text-[9px] font-mono font-bold uppercase tracking-[0.16em] opacity-70",children:R.weekday}),c.jsx("span",{className:"block text-[18px] font-extrabold leading-tight",children:R.day}),c.jsx("span",{className:"block text-[9px] font-mono font-bold uppercase tracking-[0.16em] opacity-70",children:R.month})]},D.date)})}),c.jsx("p",{className:`${xo} mt-5 mb-3`,children:"02. Choose a time"}),c.jsx("div",{className:"grid grid-cols-2 gap-2",children:N.map(D=>{const R=D===d;return c.jsx("button",{type:"button",onClick:()=>h(D),className:`py-2.5 border-2 border-foreground text-[13px] font-bold tracking-tight transition-all ${R?"bg-primary text-primary-foreground shadow-[3px_3px_0_0_hsl(var(--foreground))]":"bg-background hover:bg-secondary"}`,children:E(D)},D)})})]})]}),d&&c.jsxs("form",{onSubmit:A,className:"px-5 py-5 space-y-4",children:[c.jsxs("div",{className:"pb-1",children:[c.jsx("p",{className:`${xo} mb-1.5`,children:"03. Tell us about it"}),c.jsxs("p",{className:"inline-flex items-center gap-2 px-3 py-1.5 border-2 border-foreground text-[11px] font-mono font-bold uppercase tracking-[0.16em]",children:[c.jsx(wk,{className:"h-3.5 w-3.5",strokeWidth:2.5}),new Date(d).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})," ","at ",E(d)]})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"name",className:ca,children:"Name"}),c.jsx("input",{id:"name",name:"name",required:!0,value:m.name,onChange:k("name"),className:ua,placeholder:"Your name"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:ca,children:"Work email"}),c.jsx("input",{id:"email",name:"email",type:"email",required:!0,value:m.email,onChange:k("email"),className:ua,placeholder:"[email protected]"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"company",className:ca,children:"Company"}),c.jsx("input",{id:"company",name:"company",required:!0,value:m.company,onChange:k("company"),className:ua,placeholder:"Company name"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"notes",className:ca,children:"What would you like to talk about?"}),c.jsx("textarea",{id:"notes",name:"notes",rows:3,required:!0,value:m.notes,onChange:k("notes"),className:`${ua} resize-none`,placeholder:"A question, an experiment, a frustration or an idea. A line or two is plenty."})]}),c.jsx("p",{className:"text-[11.5px] leading-relaxed text-muted-foreground",children:"That's all we need. We'll reply with a calendar invite."}),w&&c.jsx("p",{className:"text-[12px] leading-relaxed font-semibold text-destructive",children:w}),c.jsxs("button",{type:"submit",disabled:p,className:"w-full flex items-center justify-between gap-3 px-5 py-4 bg-primary text-primary-foreground border-2 border-foreground shadow-[4px_4px_0_0_hsl(var(--foreground))] hover:brightness-110 transition-all group disabled:opacity-60",children:[c.jsxs("span",{className:"inline-flex items-center gap-2 text-[16px] font-bold tracking-tight",children:[p?c.jsx(Gf,{className:"h-4 w-4 animate-spin",strokeWidth:2.5}):c.jsx(xk,{className:"h-4 w-4",strokeWidth:2.5}),p?"Sending your request":"Request this time"]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]})]}),c.jsx("footer",{className:"px-5 py-4 border-t-2 border-foreground",children:c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:"Built in-house to make it easier to connect with you."})})]})]})})},rN=()=>{const{toast:e}=Zd(),[t]=QE(),[r,n]=b.useState(!1),[s,o]=b.useState(!1),i=t.get("score"),a=i?Number(i):null;b.useEffect(()=>{document.title="Explore · Unpen Creative AI"},[]);const l=async h=>{h.preventDefault(),n(!0);const p=h.target,f=new FormData(p),w={email:String(f.get("email")||"").trim(),interests:String(f.get("interests")||"").trim()||null,readiness_score:a},{error:v}
176=await Os.from("learning_signups").insert(w);if(v){console.error("Learning signup failed:",v),e({title:"Something went wrong",description:"Please try again.",variant:"destructive"}),n(!1);return}o(!0),n(!1),p.reset()},u="w-full px-3 py-3 bg-background border-2 border-foreground text-[14px] placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background",d="block text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-1.5";return c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsx("section",{className:"px-5 py-5 bg-foreground text-background border-b-2 border-foreground",children:c.jsxs("p",{className:"text-[20px] leading-[1.2] font-extrabold tracking-tight",children:["Follow the curiosity.",c.jsx("br",{}),"The work follows."]})}),c.jsxs("section",{className:"px-5 py-6 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-3",children:"What this is"}),c.jsx("p",{className:"text-[14px] leading-relaxed",children:"Notes on paying attention, seeing possibilities, and what's being built. Drop your email and tell us what you're curious about. We'll send things as they go live."})]}),s?c.jsxs("section",{className:"px-5 py-10 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-2",children:"You're in"}),c.jsx("h2",{className:"text-[22px] leading-[1.15] font-extrabold tracking-tight mb-3",children:"Got it. We'll be in touch."}),c.jsx("p",{className:"text-[14px] text-muted-foreground",children:"No spam. No funnel. Just notes."})]}):c.jsxs("form",{onSubmit:l,className:"px-5 py-5 space-y-4 border-b-2 border-foreground",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:d,children:"Email"}),c.jsx("input",{type:"email",id:"email",name:"email",required:!0,className:u,placeholder:"[email protected]"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"interests",className:d,children:"What are you curious about"}),c.jsx("textarea",{id:"interests",name:"interests",rows:4,className:`${u} resize-y min-h-[100px]`,placeholder:"What you're noticing, what's slow, what's possibleâ¦"})]}),c.jsx("button",{type:"submit",disabled:r,className:"w-full px-5 py-4 border-2 border-foreground bg-background text-foreground text-[16px] font-bold tracking-tight hover:bg-foreground hover:text-background transition-colors disabled:opacity-50",children:r?"Sendingâ¦":"Send me the notes"})]}),c.jsxs(ce,{to:"/book",className:"flex items-center justify-between px-5 py-5 bg-primary text-primary-foreground hover:brightness-110 transition-colors group",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-primary-foreground/80",children:"â"}),c.jsxs("div",{className:"flex flex-col items-start",children:[c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:"Ready to build"}),c.jsx("span",{className:"mt-0.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-primary-foreground/70",children:"Request a time"})]})]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),c.jsx(Kn,{})]})})},um="https://substack.com/@wordstypedwild",nN=()=>{const[e,t]=b.useState(null),[r,n]=b.useState(!1);return b.useEffect(()=>{document.title="Read the thinking · Words Typed Wild";let s=!1;return(async()=>{const{data:o,error:i}
176=await Os.functions.invoke("fetch-substack-posts");if(!s){if(i||!(o!=null&&o.posts)){n(!0);return}t(o.posts)}})(),()=>{s=!0}},[]),c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[520px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsxs("section",{className:"px-5 py-6 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-3",children:"Read the thinking"}),c.jsx("h1",{className:"text-[24px] leading-[1.1] font-extrabold tracking-tight",children:"Words Typed Wild"}),c.jsx("p",{className:"text-[13px] leading-relaxed font-medium text-muted-foreground mt-3",children:"Field notes on attention, capability, and possibility."})]}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs(cm,{date:"Sep 21, 2026",href:"https://substack.com/@wordstypedwild/note/c-342774125?r=26tlqs&utm_source=notes-share-action&utm_medium=web",label:"Notes from Substack",children:["What are we racing towards? Are we really RACING towards an alien-like superintelligence explosion and along the way dropping unpredictable models on the world like, let's see what happens?",c.jsx("br",{}),c.jsx("br",{}),"And if alien, how could anyone, no matter their great human intellect or AI expertise, have the hubris to say we can align any of it to human preferences? Or even preferences of life on earth?",c.jsx("br",{}),c.jsx("br",{}),"I do wonder. What about the butterflies?"]}),c.jsxs(oN,{date:"Sep 16, 2026",label:"Notes from ALL IN",children:["Unpen Creative is in Montreal this week as part of the Team BC delegation at ALL IN, Canada's largest AI event.",c.jsx("br",{}),c.jsx("br",{}),"The lineup says it all. NVIDIA, Google DeepMind, AMD, Dell, Mistral. The whole AI stack under one roof.",c.jsx("br",{}),c.jsx("br",{}),"But the talk everywhere was the same. Nobody is stuck at proof of concept. What people actually want is AI that's safe and reliable. They want to take what's already working, scale it, and keep evolving it. And they want that upside for small and medium business too, not just the big players.",c.jsx("br",{}),c.jsx("br",{}),"That's exactly the work we do with our clients. If you're at ALL IN, come find us. We help teams use AI in a way that unlimits their growth."]}),c.jsxs(cm,{date:"Aug 25, 2026",href:"https://substack.com/@wordstypedwild/note/c-321993403?r=26tlqs&utm_source=notes-share-action&utm_medium=web",label:"Notes from Substack",children:["I relate to humans. Never thought I'd be trying to make data relate more effectively to eachother. Not trying to larp as a data scientist either. Just trying to solve a problem better that's forcing me to empathize with them.",c.jsx("br",{}),c.jsx("br",{}),"Pushing past proof of concepts...understanding the why behind the what...creating strategies that allow for expansion of capabilities...",c.jsx("br",{}),c.jsx("br",{}),"MVPs are one thing. Solutioning things a user can trust in the field is very much another thing. Seems obvious in theory. Feels different when doing the connecting. Writing session complete... back to building.."]}),e===null&&!r&&c.jsxs(c.Fragment,{children:[c.jsx($u,{}),c.jsx($u,{}),c.jsx($u,{})]}),r&&c.jsxs("a",{href:um,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-5 py-5 border-b-2 border-foreground hover:bg-foreground
176/5 transition-colors group",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:"Read on Substack"}),c.jsx("span",{className:"text-[12px] text-muted-foreground mt-0.5",children:"Feed unavailable, open the publication directly"})]}),c.jsx(Xa,{className:"h-4 w-4 shrink-0 ml-3",strokeWidth:2.5})]}),e==null?void 0:e.map(s=>c.jsx(sN,{post:s},s.url))]}),c.jsxs("a",{href:um,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-5 py-5 border-b-2 border-foreground hover:bg-foreground/5 transition-colors group",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-muted-foreground",children:"â"}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:"Subscribe on Substack"})]}),c.jsx(Xa,{className:"h-4 w-4 text-muted-foreground group-hover:text-foreground transition-colors",strokeWidth:2.5})]}),c.jsxs(ce,{to:"/book",className:"flex items-center justify-between px-5 py-5 bg-primary text-primary-foreground hover:brightness-110 transition-colors group",children:[c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("span",{className:"font-mono text-[12px] font-bold text-primary-foreground/80",children:"â"}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight",children:"Request a chat"})]}),c.jsx(at,{className:"h-5 w-5 transition-transform group-hover:translate-x-1",strokeWidth:2.5})]}),c.jsx(Kn,{})]})})},sN=({post:e})=>{const t=e.publishedAt?new Date(e.publishedAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"";return c.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-start justify-between px-5 py-5 border-b-2 border-foreground hover:bg-foreground
176/5 transition-colors group",children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-[16px] font-bold tracking-tight leading-snug",children:e.title}),t&&c.jsx("span",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground mt-1",children:t}),e.excerpt&&c.jsx("span",{className:"text-[12px] text-muted-foreground mt-1.5 line-clamp-2",children:e.excerpt})]}),c.jsx(Xa,{className:"h-4 w-4 shrink-0 ml-3 mt-1 text-muted-foreground group-hover:text-foreground transition-colors",strokeWidth:2.5})]})},cm=({date:e,label:t,href:r,children:n})=>{const[s,o]=b.useState(!1);return c.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":s,onClick:()=>o(i=>!i),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),o(a=>!a))},className:"px-5 py-5 border-b-2 border-foreground bg-foreground/[0.03] hover:bg-foreground/[0.06] transition-colors cursor-pointer select-none",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsxs("span",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:["Note. ",e]}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight leading-snug mt-1 text-primary",children:t}),c.jsx("span",{className:`text-[13px] leading-relaxed text-foreground/90 mt-2 ${s?"":"line-clamp-2"}`,children:n})]}),c.jsx(cv,{className:`h-4 w-4 shrink-0 ml-3 mt-1 text-muted-foreground transition-transform duration-200 ${s?"rotate-180":""}`,strokeWidth:2.5})]}),c.jsxs("div",{className:"mt-2.5 flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:s?"Read less":"Read more"}),c.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:i=>i.stopPropagation(),className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground transition-colors",children:["Open on Substack",c.jsx(Xa,{className:"h-3 w-3",strokeWidth:2.5})]})]})]})},oN=({date:e,label:t,children:r})=>{const[n,s]=b.useState(!1);return c.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":n,onClick:()=>s(o=>!o),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),s(i=>!i))},className:"px-5 py-5 border-b-2 border-foreground bg-foreground
176/[0.03] hover:bg-foreground/[0.06] transition-colors cursor-pointer select-none",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsxs("span",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:["Note. ",e]}),c.jsx("span",{className:"text-[16px] font-bold tracking-tight leading-snug mt-1 text-primary",children:t}),c.jsx("span",{className:`text-[13px] leading-relaxed text-foreground/90 mt-2 ${n?"":"line-clamp-2"}`,children:r})]}),c.jsx(cv,{className:`h-4 w-4 shrink-0 ml-3 mt-1 text-muted-foreground transition-transform duration-200 ${n?"rotate-180":""}`,strokeWidth:2.5})]}),c.jsx("span",{className:"mt-2.5 inline-block text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground",children:n?"Read less":"Read more"})]})},$u=()=>c.jsx("div",{className:"px-5 py-5 border-b-2 border-foreground",children:c.jsxs("div",{className:"flex items-baseline gap-4",children:[c.jsx("div",{className:"h-3 w-6 bg-foreground
176/10 rounded-sm"}),c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("div",{className:"h-4 w-3/4 bg-foreground/10 rounded-sm"}),c.jsx("div",{className:"h-3 w-1/3 bg-foreground/10 rounded-sm"})]})]})}),iN="August 2026",aN=()=>{const{toast:e}=Zd(),[t,r]=b.useState(!1),[n,s]=b.useState(!1);b.useEffect(()=>{document.title="Privacy · Unpen Creative AI"},[]);const o=async a=>{a.preventDefault(),r(!0);const l=a.target,u=new FormData(l),d={email:String(u.get("email")||"").trim(),request_type:String(u.get("request_type")||"access")},{error:h}=await Os.from("privacy_requests").insert(d);if(h){console.error("Privacy request failed:",h),e({title:"Something went wrong",description:"Please try again.",variant:"destructive"}),r(!1);return}s(!0),r(!1),l.reset()},i="w-full px-3 py-2.5 bg-background border-2 border-foreground text-[13px] placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background";return c.jsx("div",{className:"min-h-[100dvh] w-full bg-background text-foreground flex justify-center p-3 sm:p-6 font-sans",children:c.jsxs("div",{className:"w-full max-w-[420px] bg-background border-2 border-foreground shadow-[6px_6px_0_0_hsl(var(--foreground))] flex flex-col self-start",children:[c.jsxs("header",{className:"px-5 py-4 border-b-2 border-foreground flex items-center justify-between",children:[c.jsx(_r,{}),c.jsxs(ce,{to:"/",className:"inline-flex items-center gap-1.5 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground hover:text-foreground",children:[c.jsx(mn,{className:"h-3 w-3",strokeWidth:2.5}),"Back"]})]}),c.jsxs("section",{className:"px-5 py-4 border-b-2 border-foreground",children:[c.jsx("p",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground mb-1.5",children:"Privacy"}),c.jsx("h1",{className:"text-[18px] leading-[1.15] font-extrabold tracking-tight",children:"We only keep what you tell us."})]}),c.jsx(is,{n:"01",label:"What we collect",children:"Only what you type into a form here, your email, and the details you add."}),c.jsx(is,{n:"02",label:"Why we collect it",children:"To reply to you, and to run the work if we end up working together."}),c.jsx(is,{n:"03",label:"What we don't do",children:"No selling, no sharing, no ad tracking, no marketing sequences, no cookies beyond what the site needs to load."}),c.jsx(is,{n:"04",label:"Where it lives",children:"In our own database on our secure backend. Access is limited to us."}),c.jsx(is,{n:"05",label:"How long we keep it",children:"While there's a live conversation. Ask us any time and we delete it."}),c.jsx(is,{n:"06",label:"Our calls",children:"Anything you share on a call stays between us. Need an NDA signed first? Just ask, we'll sign it."}),c.jsxs("details",{className:"border-b-2 border-foreground group",children:[c.jsxs("summary",{className:"px-5 py-4 flex items-center justify-between cursor-pointer list-none hover:bg-foreground
176/5 transition-colors",children:[c.jsx("span",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground",children:"07. See or delete your info"}),c.jsx("span",{className:"text-[12px] font-mono font-bold text-muted-foreground group-open:rotate-45 transition-transform",children:"+"})]}),c.jsx("div",{className:"px-5 pb-5",children:n?c.jsx("p",{className:"text-[13px] font-bold tracking-tight",children:"Got it. We'll take care of it and confirm back to you."}):c.jsxs("form",{onSubmit:o,className:"flex flex-col gap-2.5",children:[c.jsx("input",{name:"email",type:"email",required:!0,placeholder:"[email protected]","aria-label":"Your email",className:i}),c.jsxs("select",{name:"request_type",required:!0,defaultValue:"access","aria-label":"What do you want",className:i,children:[c.jsx("option",{value:"access",children:"Show me what you hold"}),c.jsx("option",{value:"delete",children:"Delete my info"})]}),c.jsx("button",{type:"submit",disabled:t,className:"w-full px-5 py-3 bg-primary text-primary-foreground text-[14px] font-bold tracking-tight hover:brightness-110 transition disabled:opacity-60",children:t?"Sendingâ¦":"Send request"})]})})]}),c.jsxs("p",{className:"m-0 px-5 py-2 text-[10px] font-mono font-bold uppercase tracking-[0.18em] text-muted-foreground text-center",children:["Updated ",iN]}),c.jsx(Kn,{})]})})},is=({n:e,label:t,children:r})=>c.jsxs("details",{className:"border-b-2 border-foreground group",children:[c.jsxs("summary",{className:"px-5 py-3 flex items-center justify-between cursor-pointer list-none hover:bg-foreground
176/5 transition-colors",children:[c.jsxs("span",{className:"text-[10px] font-mono font-bold uppercase tracking-[0.22em] text-muted-foreground",children:[e,". ",t]}),c.jsx("span",{className:"text-[12px] font-mono font-bold text-muted-foreground/60 group-open:rotate-45 transition-transform",children:"+"})]}),c.jsx("p",{className:"px-5 pb-3 text-[13px] leading-snug",children:r})]}),lN=()=>{const e=kr();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsxs("div",{className:"min-h-screen bg-background px-6 md:px-8 lg:px-12 py-8",children:[c.jsx(ce,{to:"/",className:"text-sm font-sans tracking-wide text-foreground hover:text-primary transition-colors",children:"Unpen Creative AI"}),c.jsxs("article",{className:"max-w-prose mt-16",children:[c.jsx("h1",{children:"Page not found"}),c.jsx("p",{children:"The page you're looking for doesn't exist. It might have been moved, or you may have followed a broken link."}),c.jsx("p",{children:c.jsx(ce,{to:"/",className:"link-arrow",children:"Return home"})})]})]})},uN=()=>{const{pathname:e,hash:t}=kr();return b.useEffect(()=>{t||window.scrollTo({top:0,left:0})},[e,t]),null},cN=new VS,dN=()=>c.jsx(KS,{client:cN,children:c.jsx(YE,{children:c.jsx(bS,{children:c.jsxs(qE,{children:[c.jsx(uN,{}),c.jsx(s1,{}),c.jsx($1,{}),c.jsxs(ME,{children:[c.jsx(ft,{path:"/",element:c.jsx(tT,{})}),c.jsx(ft,{path:"/about",element:c.jsx(rT,{})}),c.jsx(ft,{path:"/work",element:c.jsx(nT,{})}),c.jsx(ft,{path:"/scorecard",element:c.jsx(oT,{})}),c.jsx(ft,{path:"/work-with-us",element:c.jsx(iT,{})}),c.jsx(ft,{path:"/apply",element:c.jsx($E,{to:"/work-with-us",replace:!0})}),c.jsx(ft,{path:"/book",element:c.jsx(tN,{})}),c.jsx(ft,{path:"/explore",element:c.jsx(rN,{})}),c.jsx(ft,{path:"/thinking",element:c.jsx(nN,{})}),c.jsx(ft,{path:"/privacy",element:c.jsx(aN,{})}),c.jsx(ft,{path:"*",element:c.jsx(lN,{})})]})]})})})});Iy(document.getElementById("root")).render(c.jsx(dN,{}));
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.