PageSourceSearch

https://iowawaterscapes.com/assets/index-C5C1jZVF.js

js iowawaterscapes.com collected 2026-10-04 03:26:48 UTC 670,139 bytes, 44 lines download raw bytes

vendor: 5,059 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D11lVSeL.js","assets/FeaturableReviews-DWGTQV4l.js","assets/Counter-DNwxAc0Y.js","assets/hammer-CN_gNqSY.js","assets/sparkles-f6D7oOhl.js","assets/_slug-ClMP93FI.js","assets/BlogPostLayout-Ydq2Q58h.js","assets/about-us-DMxydk1c.js","assets/Lightbox-CNayFuey.js","assets/awards-BfqpaGlN.js","assets/StarRating-kRxF7GLY.js","assets/shield-check-D1CbTsPC.js","assets/backyard-visualizer-C6SAOt2J.js","assets/useServerFn-phaF0GS-.js","assets/BeforeAfter-Mec-ib1H.js","assets/check-DpJ4JUqf.js","assets/upload-C2uTvk_U.js","assets/bellaire-project-DMf_uQhE.js","assets/ProjectProfile-DHibBm1F.js","assets/bringing-colorado-to-iowa-BWWbixVi.js","assets/canoyer-garden-center-ankeny-B0QpYods.js","assets/DisplayLocation-tBXiascS.js","assets/canoyer-garden-center-grimes-DhcGuWC8.js","assets/careers-Bn9ryUFW.js","assets/Turnstile-wv5PnK2i.js","assets/leads.functions-Ch3BLijA.js","assets/cleaning-services-DpFewT1I.js","assets/ServicePage-BbE-5L-K.js","assets/portfolio-1.jpg.asset-DgNL-xgY.js","assets/play-CaTGPgkV.js","assets/contact-DhJ8zenH.js","assets/created-in-johnston-1H-4SXj3.js","assets/dore-project-CEKEFE79.js","assets/faq-CxgtFzme.js","assets/fountainscapes-and-pondless-water-features-B7b7o_c1.js","assets/guide-ClxruYzJ.js","assets/lighting-D5PCxkCA.js","assets/office-displays-CGBvcDgr.js","assets/our-process-BAFqXB1X.js","assets/perennial-gardens-DlZtCYB1.js","assets/pond-tours-aT52hhIb.js","assets/ponds-CAe0nRXa.js","assets/portfolio-DCsgJESM.js","assets/recreational-ponds-tHABLVEp.js","assets/repairs-vx_av8pw.js","assets/reviews-DOvTP0Te.js","assets/tranquil-backyard-escape-CQARJwrD.js","assets/transforming-outdoor-spaces-CIF1YUg-.js","assets/videos-D3AAK1Cv.js","assets/water-feature-maintenance-9azdTdbu.js","assets/admin.leads-CSUHB2c5.js","assets/blog._category._slug-DvwmeDR4.js"])))=>i.map(i=>d[i]);
2function XE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var of={exports:{}},Pi={};var Gy;function ZE(){if(Gy)return Pi;Gy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(s,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:s,key:u,ref:o!==void 0?o:null,props:c}}return Pi.Fragment=t,Pi.jsx=a,Pi.jsxs=a,Pi}var Vy;function eA(){return Vy||(Vy=1,of.exports=ZE()),of.exports}var A=eA(),lf={exports:{}},be={};var Fy;function tA(){if(Fy)return be;Fy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),w=Symbol.iterator;function b(x){return x===null||typeof x!="object"?null:(x=w&&x[w]||x["@@iterator"],typeof x=="function"?x:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,T={};function R(x,H,W){this.props=x,this.context=H,this.refs=T,this.updater=W||E}R.prototype.isReactComponent={},R.prototype.setState=function(x,H){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,H,"setState")},R.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function k(){}k.prototype=R.prototype;function j(x,H,W){this.props=x,this.context=H,this.refs=T,this.updater=W||E}var $=j.prototype=new k;$.constructor=j,S($,R.prototype),$.isPureReactComponent=!0;var K=Array.isArray;function z(){}var D={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function ee(x,H,W){var ne=W.ref;return{$$typeof:e,type:x,key:H,ref:ne!==void 0?ne:null,props:W}}function ue(x,H){return ee(x.type,H,x.props)}function V(x){return typeof x=="object"&&x!==null&&x.$$typeof===e}function F(x){var H={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(W){return H[W]})}var Z=/\/+/g;function ge(x,H){return typeof x=="object"&&x!==null&&x.key!=null?F(""+x.key):H.toString(36)}function ce(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(z,z):(x.status="pending",x.then(function(H){x.status==="pending"&&(x.status="fulfilled",x.value=H)},function(H){x.status==="pending"&&(x.status="rejected",x.reason=H)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function U(x,H,W,ne,ve){var Se=typeof x;(Se==="undefined"||Se==="boolean")&&(x=null);var pe=!1;if(x===null)pe=!0;else switch(Se){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(x.$$typeof){case e:case t:pe=!0;break;case y:return pe=x._init,U(pe(x._payload),H,W,ne,ve)}}
vendor: 17,585 bytes, lines 2-4
2if(pe)return ve=ve(x),pe=ne===""?"."+ge(x,0):ne,K(ve)?(W="",pe!=null&&(W=pe.replace(Z,"$&/")+"/"),U(ve,H,W,"",function(An){return An})):ve!=null&&(V(ve)&&(ve=ue(ve,W+(ve.key==null||x&&x.key===ve.key?"":(""+ve.key).replace(Z,"$&/")+"/")+pe)),H.push(ve)),1;pe=0;var Le=ne===""?".":ne+":";if(K(x))for(var He=0;He<x.length;He++)ne=x[He],Se=Le+ge(ne,He),pe+=U(ne,H,W,Se,ve);else if(He=b(x),typeof He=="function")for(x=He.call(x),He=0;!(ne=x.next()).done;)ne=ne.value,Se=Le+ge(ne,He++),pe+=U(ne,H,W,Se,ve);else if(Se==="object"){if(typeof x.then=="function")return U(ce(x),H,W,ne,ve);throw H=String(x),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return pe}function Y(x,H,W){if(x==null)return x;var ne=[],ve=0;return U(x,ne,"","",function(Se){return H.call(W,Se,ve++)}),ne}function he(x){if(x._status===-1){var H=x._result;H=H(),H.then(function(W){(x._status===0||x._status===-1)&&(x._status=1,x._result=W)},function(W){(x._status===0||x._status===-1)&&(x._status=2,x._result=W)}),x._status===-1&&(x._status=0,x._result=H)}if(x._status===1)return x._result.default;throw x._result}var De=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},Te={map:Y,forEach:function(x,H,W){Y(x,function(){H.apply(this,arguments)},W)},count:function(x){var H=0;return Y(x,function(){H++}),H},toArray:function(x){return Y(x,function(H){return H})||[]},only:function(x){if(!V(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return be.Activity=g,be.Children=Te,be.Component=R,be.Fragment=a,be.Profiler=o,be.PureComponent=j,be.StrictMode=s,be.Suspense=p,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,be.__COMPILER_RUNTIME={__proto__:null,c:function(x){return D.H.useMemoCache(x)}},be.cache=function(x){return function(){return x.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(x,H,W){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var ne=S({},x.props),ve=x.key;if(H!=null)for(Se in H.key!==void 0&&(ve=""+H.key),H)!J.call(H,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&H.ref===void 0||(ne[Se]=H[Se]);var Se=arguments.length-2;if(Se===1)ne.children=W;else if(1<Se){for(var pe=Array(Se),Le=0;Le<Se;Le++)pe[Le]=arguments[Le+2];ne.children=pe}return ee(x.type,ve,ne)},be.createContext=function(x){return x={$$typeof:u,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:c,_context:x},x},be.createElement=function(x,H,W){var ne,ve={},Se=null;if(H!=null)for(ne in H.key!==void 0&&(Se=""+H.key),H)J.call(H,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ve[ne]=H[ne]);var pe=arguments.length-2;if(pe===1)ve.children=W;else if(1<pe){for(var Le=Array(pe),He=0;He<pe;He++)Le[He]=arguments[He+2];ve.children=Le}if(x&&x.defaultProps)for(ne in pe=x.defaultProps,pe)ve[ne]===void 0&&(ve[ne]=pe[ne]);return ee(x,Se,ve)},be.createRef=function(){return{current:null}},be.forwardRef=function(x){return{$$typeof:f,render:x}},be.isValidElement=V,be.lazy=function(x){return{$$typeof:y,_payload:{_status:-1,_result:x},_init:he}},be.memo=function(x,H){return{$$typeof:m,type:x,compare:H===void 0?null:H}},be.startTransition=function(x){var H=D.T,W={};D.T=W;try{var ne=x(),ve=D.S;ve!==null&&ve(W,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(z,De)}catch(Se){De(Se)}finally{H!==null&&W.types!==null&&(H.types=W.types),D.T=H}},be.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},be.use=function(x){return D.H.use(x)},be.useActionState=function(x,H,W){return D.H.useActionState(x,H,W)},be.useCallback=function(x,H){return D.H.useCallback(x,H)},be.useContext=function(x){return D.H.useContext(x)},be.useDebugValue=function(){},be.useDeferredValue=function(x,H){return D.H.useDeferredValue(x,H)},be.useEffect=function(x,H){return D.H.useEffect(x,H)},be.useEffectEvent=function(x){return D.H.useEffectEvent(x)},be.useId=function(){return D.H.useId()},be.useImperativeHandle=function(x,H,W){return D.H.useImperativeHandle(x,H,W)},be.useInsertionEffect=function(x,H){return D.H.useInsertionEffect(x,H)},be.useLayoutEffect=function(x,H){return D.H.useLayoutEffect(x,H)},be.useMemo=function(x,H){return D.H.useMemo(x,H)},be.useOptimistic=function(x,H){return D.H.useOptimistic(x,H)},be.useReducer=function(x,H,W){return D.H.useReducer(x,H,W)},be.useRef=function(x){return D.H.useRef(x)},be.useState=function(x){return D.H.useState(x)},be.useSyncExternalStore=function(x,H,W){return D.H.useSyncExternalStore(x,H,W)},be.useTransition=function(){return D.H.useTransition()},be.version="19.2.5",be}var Jy;function vo(){return Jy||(Jy=1,lf.exports=tA()),lf.exports}var X=vo();const kc=XE(X);var cf={exports:{}},Ui={},uf={exports:{}},df={};var Wy;function nA(){return Wy||(Wy=1,(function(e){function t(U,Y){var he=U.length;U.push(Y);e:for(;0<he;){var De=he-1>>>1,Te=U[De];if(0<o(Te,Y))U[De]=Y,U[he]=Te,he=De;else break e}}function a(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var Y=U[0],he=U.pop();if(he!==Y){U[0]=he;e:for(var De=0,Te=U.length,x=Te>>>1;De<x;){var H=2*(De+1)-1,W=U[H],ne=H+1,ve=U[ne];if(0>o(W,he))ne<Te&&0>o(ve,W)?(U[De]=ve,U[ne]=he,De=ne):(U[De]=W,U[H]=he,De=H);else if(ne<Te&&0>o(ve,he))U[De]=ve,U[ne]=he,De=ne;else break e}}return Y}function o(U,Y){var he=U.sortIndex-Y.sortIndex;return he!==0?he:U.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],m=[],y=1,g=null,w=3,b=!1,E=!1,S=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function $(U){for(var Y=a(m);Y!==null;){if(Y.callback===null)s(m);else if(Y.startTime<=U)s(m),Y.sortIndex=Y.expirationTime,t(p,Y);else break;Y=a(m)}}function K(U){if(S=!1,$(U),!E)if(a(p)!==null)E=!0,z||(z=!0,F());else{var Y=a(m);Y!==null&&ce(K,Y.startTime-U)}}var z=!1,D=-1,J=5,ee=-1;function ue(){return T?!0:!(e.unstable_now()-ee<J)}function V(){if(T=!1,z){var U=e.unstable_now();ee=U;var Y=!0;try{e:{E=!1,S&&(S=!1,k(D),D=-1),b=!0;var he=w;try{t:{for($(U),g=a(p);g!==null&&!(g.expirationTime>U&&ue());){var De=g.callback;if(typeof De=="function"){g.callback=null,w=g.priorityLevel;var Te=De(g.expirationTime<=U);if(U=e.unstable_now(),typeof Te=="function"){g.callback=Te,$(U),Y=!0;break t}g===a(p)&&s(p),$(U)}else s(p);g=a(p)}if(g!==null)Y=!0;else{var x=a(m);x!==null&&ce(K,x.startTime-U),Y=!1}}break e}finally{g=null,w=he,b=!1}Y=void 0}}finally{Y?F():z=!1}}}var F;if(typeof j=="function")F=function(){j(V)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ge=Z.port2;Z.port1.onmessage=V,F=function(){ge.postMessage(null)}}else F=function(){R(V,0)};function ce(U,Y){D=R(function(){U(e.unstable_now())},Y)}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(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(U){switch(w){case 1:case 2:case 3:var Y=3;break;default:Y=w}var he=w;w=Y;try{return U()}finally{w=he}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(U,Y){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var he=w;w=U;try{return Y()}finally{w=he}},e.unstable_scheduleCallback=function(U,Y,he){var De=e.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?De+he:De):he=De,U){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=he+Te,U={id:y++,callback:Y,priorityLevel:U,startTime:he,expirationTime:Te,sortIndex:-1},he>De?(U.sortIndex=he,t(m,U),a(p)===null&&U===a(m)&&(S?(k(D),D=-1):S=!0,ce(K,he-De))):(U.sortIndex=Te,t(p,U),E||b||(E=!0,z||(z=!0,F()))),U},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(U){var Y=w;return function(){var he=w;w=Y;try{return U.apply(this,arguments)}finally{w=he}}}})(df)),df}var Ky;function aA(){return Ky||(Ky=1,uf.exports=nA()),uf.exports}var ff={exports:{}},bt={};var Yy;function rA(){if(Yy)return bt;Yy=1;var e=vo();function t(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,bt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return c(p,m,null,y)},bt.flushSync=function(p){var m=u.T,y=s.p;try{if(u.T=null,s.p=2,p)return p()}finally{u.T=m,s.p=y,s.d.f()}},bt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(p,m))},bt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},bt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?s.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:b}):y==="script"&&s.d.X(p,{crossOrigin:g,integrity:w,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},bt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);s.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(p)},bt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);s.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},bt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=f(m.as,m.crossOrigin);s.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(p)},bt.requestFormReset=function(p){s.d.r(p)},bt.unstable_batchedUpdates=function(p,m){return p(m)},bt.useFormState=function(p,m,y){return u.H.useFormState(p,m,y)},bt.useFormStatus=function(){return u.H.useHostTransitionStatus()},bt.version="19.2.5",bt}var Qy;function sA(){if(Qy)return ff.exports;Qy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ff.exports=rA(),ff.exports}var Xy;function iA(){if(Xy)return Ui;Xy=1;var e=aA(),t=vo(),a=sA();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var r=n,i=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(i=r.return),n=r.return;while(n)}return r.tag===3?i:null}function u(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(s(188))}function m(n){var r=n.alternate;if(!r){if(r=c(n),r===null)throw Error(s(188));return r!==n?null:n}for(var i=n,l=r;;){var d=i.return;if(d===null)break;var h=d.alternate;if(h===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===i)return p(d),n;if(h===l)return p(d),r;h=h.sibling}throw Error(s(188))}if(i.return!==l.return)i=d,l=h;else{for(var v=!1,_=d.child;_;){if(_===i){v=!0,i=d,l=h;break}if(_===l){v=!0,l=d,i=h;break}_=_.sibling}if(!v){for(_=h.child;_;){if(_===i){v=!0,i=h,l=d;break}if(_===l){v=!0,l=h,i=d;break}_=_.sibling}if(!v)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var g=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),j=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function F(n){return n===null||typeof n!="object"?null:(n=V&&n[V]||n["@@iterator"],typeof n=="function"?n:null)}var Z=Symbol.for("react.client.reference");function ge(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Z?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case K:return"Suspense";case z:return"SuspenseList";case ee:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case j:return n.displayName||"Context";case k:return(n._context.displayName||"Context")+".Consumer";case $:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return r=n.displayName||null,r!==null?r:ge(n.type)||"Memo";case J:r=n._payload,n=n._init;try{return ge(n(r))}catch{}}return null}var ce=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},De=[],Te=-1;function x(n){return{current:n}}function H(n){0>Te||(n.current=De[Te],De[Te]=null,Te--)}function W(n,r){Te++,De[Te]=n.current,n.current=r}var ne=x(null),ve=x(null),Se=x(null),pe=x(null);function Le(n,r){switch(W(Se,r),W(ve,n),W(ne,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?hy(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=hy(r),n=py(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(ne),W(ne,n)}function He(){H(ne),H(ve),H(Se)}function An(n){n.memoizedState!==null&&W(pe,n);var r=ne.current,i=py(r,n.type);r!==i&&(W(ve,n),W(ne,i))}function tr(n){ve.current===n&&(H(ne),H(ve)),pe.current===n&&(H(pe),Ni._currentValue=he)}var Pn,Hh;function nr(n){if(Pn===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Pn=r&&r[1]||"",Hh=-1<i.stack.indexOf(`
3    at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4`+Pn+n+Hh}var Hc=!1;function Gc(n,r){if(!n||Hc)return"";Hc=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(I){var P=I}Reflect.construct(n,[],G)}else{try{G.call()}catch(I){P=I}n.call(G.prototype)}}else{try{throw Error()}catch(I){P=I}(G=n())&&typeof G.catch=="function"&&G.catch(function(){})}}
vendor: 6,458 bytes, lines 4-9
4catch(I){if(I&&P&&typeof I.stack=="string")return[I.stack,P.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),v=h[0],_=h[1];if(v&&_){var C=v.split(`
5`),M=_.split(`
6`);for(d=l=0;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;for(;d<M.length&&!M[d].includes("DetermineComponentFrameRoot");)d++;if(l===C.length||d===M.length)for(l=C.length-1,d=M.length-1;1<=l&&0<=d&&C[l]!==M[d];)d--;for(;1<=l&&0<=d;l--,d--)if(C[l]!==M[d]){if(l!==1||d!==1)do if(l--,d--,0>d||C[l]!==M[d]){var B=`
7`+C[l].replace(" at new "," at ");return n.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",n.displayName)),B}while(1<=l&&0<=d);break}}}finally{Hc=!1,Error.prepareStackTrace=i}return(i=n?n.displayName||n.name:"")?nr(i):""}function x_(n,r){switch(n.tag){case 26:case 27:case 5:return nr(n.type);case 16:return nr("Lazy");case 13:return n.child!==r&&r!==null?nr("Suspense Fallback"):nr("Suspense");case 19:return nr("SuspenseList");case 0:case 15:return Gc(n.type,!1);case 11:return Gc(n.type.render,!1);case 1:return Gc(n.type,!0);case 31:return nr("Activity");default:return""}}function Gh(n){try{var r="",i=null;do r+=x_(n,i),i=n,n=n.return;while(n);return r}catch(l){return`
8Error generating stack: `+l.message+`
9`+l.stack}}var Vc=Object.prototype.hasOwnProperty,Fc=e.unstable_scheduleCallback,Jc=e.unstable_cancelCallback,k_=e.unstable_shouldYield,j_=e.unstable_requestPaint,Pt=e.unstable_now,N_=e.unstable_getCurrentPriorityLevel,Vh=e.unstable_ImmediatePriority,Fh=e.unstable_UserBlockingPriority,_o=e.unstable_NormalPriority,D_=e.unstable_LowPriority,Jh=e.unstable_IdlePriority,L_=e.log,M_=e.unstable_setDisableYieldValue,Gs=null,Ut=null;function ga(n){if(typeof L_=="function"&&M_(n),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(Gs,n)}catch{}}var It=Math.clz32?Math.clz32:I_,P_=Math.log,U_=Math.LN2;function I_(n){return n>>>=0,n===0?32:31-(P_(n)/U_|0)|0}var So=256,Eo=262144,Ao=4194304;function ar(n){var r=n&42;if(r!==0)return r;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function To(n,r,i){var l=n.pendingLanes;if(l===0)return 0;var d=0,h=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var _=l&134217727;return _!==0?(l=_&~h,l!==0?d=ar(l):(v&=_,v!==0?d=ar(v):i||(i=_&~n,i!==0&&(d=ar(i))))):(_=l&~h,_!==0?d=ar(_):v!==0?d=ar(v):i||(i=l&~n,i!==0&&(d=ar(i)))),d===0?0:r!==0&&r!==d&&(r&h)===0&&(h=d&-d,i=r&-r,h>=i||h===32&&(i&4194048)!==0)?r:d}function Vs(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function z_(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wh(){var n=Ao;return Ao<<=1,(Ao&62914560)===0&&(Ao=4194304),n}function Wc(n){for(var r=[],i=0;31>i;i++)r.push(n);return r}function Fs(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function $_(n,r,i,l,d,h){var v=n.pendingLanes;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=i,n.entangledLanes&=i,n.errorRecoveryDisabledLanes&=i,n.shellSuspendCounter=0;var _=n.entanglements,C=n.expirationTimes,M=n.hiddenUpdates;for(i=v&~i;0<i;){var B=31-It(i),G=1<<B;_[B]=0,C[B]=-1;var P=M[B];if(P!==null)for(M[B]=null,B=0;B<P.length;B++){var I=P[B];I!==null&&(I.lane&=-536870913)}i&=~G}l!==0&&Kh(n,l,0),h!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=h&~(v&~r))}function Kh(n,r,i){n.pendingLanes|=r,n.suspendedLanes&=~r;var l=31-It(r);n.entangledLanes|=r,n.entanglements[l]=n.entanglements[l]|1073741824|i&261930}function Yh(n,r){var i=n.entangledLanes|=r;for(n=n.entanglements;i;){var l=31-It(i),d=1<<l;d&r|n[l]&r&&(n[l]|=r),i&=~d}}function Qh(n,r){var i=r&-r;return i=(i&42)!==0?1:Kc(i),(i&(n.suspendedLanes|r))!==0?0:i}function Kc(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Yc(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Xh(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Uy(n.type))}function Zh(n,r){var i=Y.p;try{return Y.p=n,r()}finally{Y.p=i}}var ya=Math.random().toString(36).slice(2),ht="__reactFiber$"+ya,Rt="__reactProps$"+ya,Ur="__reactContainer$"+ya,Qc="__reactEvents$"+ya,B_="__reactListeners$"+ya,q_="__reactHandles$"+ya,ep="__reactResources$"+ya,Js="__reactMarker$"+ya;function Xc(n){delete n[ht],delete n[Rt],delete n[Qc],delete n[B_],delete n[q_]}function Ir(n){var r=n[ht];if(r)return r;for(var i=n.parentNode;i;){if(r=i[Ur]||i[ht]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(n=_y(n);n!==null;){if(i=n[ht])return i;n=_y(n)}return r}n=i,i=n.parentNode}return null}function zr(n){if(n=n[ht]||n[Ur]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Ws(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function $r(n){var r=n[ep];return r||(r=n[ep]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ct(n){n[Js]=!0}var tp=new Set,np={};function rr(n,r){Br(n,r),Br(n+"Capture",r)}function Br(n,r){for(np[n]=r,n=0;n<r.length;n++)tp.add(r[n])}var H_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 9
9037D\\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]*$"),ap={},rp={};function G_(n){return Vc.call(rp,n)?!0:Vc.call(ap,n)?!1:H_.test(n)?rp[n]=!0:(ap[n]=!0,!1)}function Ro(n,r,i){if(G_(r))if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+i)}}function Co(n,r,i){if(i===null)n.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+i)}}function Un(n,r,i,l){if(l===null)n.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttributeNS(r,i,""+l)}}function Jt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function sp(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function V_(n,r,i){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,h=l.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(n,r,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Zc(n){if(!n._valueTracker){var r=sp(n)?"checked":"value";n._valueTracker=V_(n,r,""+n[r])}}function ip(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return n&&(l=sp(n)?n.checked?"true":"false":n.value),n=l,n!==i?(r.setValue(n),!0):!1}function Oo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var F_=/[\n"\\]/g;function Wt(n){return n.replace(F_,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function eu(n,r,i,l,d,h,v,_){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Jt(r)):n.value!==""+Jt(r)&&(n.value=""+Jt(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?tu(n,v,Jt(r)):i!=null?tu(n,v,Jt(i)):l!=null&&n.removeAttribute("value"),d==null&&h!=null&&(n.defaultChecked=!!h),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.name=""+Jt(_):n.removeAttribute("name")}function op(n,r,i,l,d,h,v,_){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),r!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||r!=null)){Zc(n);return}i=i!=null?""+Jt(i):"",r=r!=null?""+Jt(r):i,_||r===n.value||(n.value=r),n.defaultValue=r}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=_?n.checked:!!l,n.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Zc(n)}function tu(n,r,i){r==="number"&&Oo(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}function qr(n,r,i,l){if(n=n.options,r){r={};for(var d=0;d<i.length;d++)r["$"+i[d]]=!0;for(i=0;i<n.length;i++)d=r.hasOwnProperty("$"+n[i].value),n[i].selected!==d&&(n[i].selected=d),d&&l&&(n[i].defaultSelected=!0)}else{for(i=""+Jt(i),r=null,d=0;d<n.length;d++){if(n[d].value===i){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}r!==null||n[d].disabled||(r=n[d])}r!==null&&(r.selected=!0)}}function lp(n,r,i){if(r!=null&&(r=""+Jt(r),r!==n.value&&(n.value=r),i==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=i!=null?""+Jt(i):""}function cp(n,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(s(92));if(ce(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=Jt(r),n.defaultValue=i,l=n.textContent,l===i&&l!==""&&l!==null&&(n.value=l),Zc(n)}function Hr(n,r){if(r){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=r;return}}n.textContent=r}var J_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function up(n,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":l?n.setProperty(r,i):typeof i!="number"||i===0||J_.has(r)?r==="float"?n.cssFloat=i:n[r]=(""+i).trim():n[r]=i+"px"}function dp(n,r,i){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in r)l=r[d],r.hasOwnProperty(d)&&i[d]!==l&&up(n,d,l)}else for(var h in r)r.hasOwnProperty(h)&&up(n,h,r[h])}function nu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 W_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),K_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xo(n){return K_.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function In(){}var au=null;function ru(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Gr=null,Vr=null;function fp(n){var r=zr(n);if(r&&(n=r.stateNode)){var i=n[Rt]||null;e:switch(n=r.stateNode,r.type){case"input":if(eu(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Wt(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==n&&l.form===n.form){var d=l[Rt]||null;if(!d)throw Error(s(90));eu(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===n.form&&ip(l)}break e;case"textarea":lp(n,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&qr(n,!!i.multiple,r,!1)}}}var su=!1;function hp(n,r,i){if(su)return n(r,i);su=!0;try{var l=n(r);return l}finally{if(su=!1,(Gr!==null||Vr!==null)&&(gl(),Gr&&(r=Gr,n=Vr,Vr=Gr=null,fp(r),n)))for(r=0;r<n.length;r++)fp(n[r])}}function Ks(n,r){var i=n.stateNode;if(i===null)return null;var l=i[Rt]||null;if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(s(231,r,typeof i));return i}var zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iu=!1;if(zn)try{var Ys={};Object.defineProperty(Ys,"passive",{get:function(){iu=!0}}),window.addEventListener("test",Ys,Ys),window.removeEventListener("test",Ys,Ys)}catch{iu=!1}var va=null,ou=null,ko=null;function pp(){if(ko)return ko;var n,r=ou,i=r.length,l,d="value"in va?va.value:va.textContent,h=d.length;for(n=0;n<i&&r[n]===d[n];n++);var v=i-n;for(l=1;l<=v&&r[i-l]===d[h-l];l++);return ko=d.slice(n,1<l?1-l:void 0)}function jo(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function No(){return!0}function mp(){return!1}function Ct(n){function r(i,l,d,h,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var _ in n)n.hasOwnProperty(_)&&(i=n[_],this[_]=i?i(h):h[_]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?No:mp,this.isPropagationStopped=mp,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=No)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=No)},persist:function(){},isPersistent:No}),r}var sr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Ct(sr),Qs=g({},sr,{view:0,detail:0}),Y_=Ct(Qs),lu,cu,Xs,Lo=g({},Qs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:du,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Xs&&(Xs&&n.type==="mousemove"?(lu=n.screenX-Xs.screenX,cu=n.screenY-Xs.screenY):cu=lu=0,Xs=n),lu)},movementY:function(n){return"movementY"in n?n.movementY:cu}}),gp=Ct(Lo),Q_=g({},Lo,{dataTransfer:0}),X_=Ct(Q_),Z_=g({},Qs,{relatedTarget:0}),uu=Ct(Z_),eS=g({},sr,{animationName:0,elapsedTime:0,pseudoElement:0}),tS=Ct(eS),nS=g({},sr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),aS=Ct(nS),rS=g({},sr,{data:0}),yp=Ct(rS),sS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iS={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"},oS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lS(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=oS[n])?!!r[n]:!1}function du(){return lS}var cS=g({},Qs,{key:function(n){if(n.key){var r=sS[n.key]||n.key;if(r!=="Unidentified")return r}
vendor: 5,186 bytes, line 9
9return n.type==="keypress"?(n=jo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?iS[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:du,charCode:function(n){return n.type==="keypress"?jo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?jo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),uS=Ct(cS),dS=g({},Lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vp=Ct(dS),fS=g({},Qs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:du}),hS=Ct(fS),pS=g({},sr,{propertyName:0,elapsedTime:0,pseudoElement:0}),mS=Ct(pS),gS=g({},Lo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),yS=Ct(gS),vS=g({},sr,{newState:0,oldState:0}),bS=Ct(vS),wS=[9,13,27,32],fu=zn&&"CompositionEvent"in window,Zs=null;zn&&"documentMode"in document&&(Zs=document.documentMode);var _S=zn&&"TextEvent"in window&&!Zs,bp=zn&&(!fu||Zs&&8<Zs&&11>=Zs),wp=" ",_p=!1;function Sp(n,r){switch(n){case"keyup":return wS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ep(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Fr=!1;function SS(n,r){switch(n){case"compositionend":return Ep(r);case"keypress":return r.which!==32?null:(_p=!0,wp);case"textInput":return n=r.data,n===wp&&_p?null:n;default:return null}}function ES(n,r){if(Fr)return n==="compositionend"||!fu&&Sp(n,r)?(n=pp(),ko=ou=va=null,Fr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return bp&&r.locale!=="ko"?null:r.data;default:return null}}var AS={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 Ap(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!AS[n.type]:r==="textarea"}function Tp(n,r,i,l){Gr?Vr?Vr.push(l):Vr=[l]:Gr=l,r=El(r,"onChange"),0<r.length&&(i=new Do("onChange","change",null,i,l),n.push({event:i,listeners:r}))}var ei=null,ti=null;function TS(n){oy(n,0)}function Mo(n){var r=Ws(n);if(ip(r))return n}function Rp(n,r){if(n==="change")return r}var Cp=!1;if(zn){var hu;if(zn){var pu="oninput"in document;if(!pu){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),pu=typeof Op.oninput=="function"}hu=pu}else hu=!1;Cp=hu&&(!document.documentMode||9<document.documentMode)}function xp(){ei&&(ei.detachEvent("onpropertychange",kp),ti=ei=null)}function kp(n){if(n.propertyName==="value"&&Mo(ti)){var r=[];Tp(r,ti,n,ru(n)),hp(TS,r)}}function RS(n,r,i){n==="focusin"?(xp(),ei=r,ti=i,ei.attachEvent("onpropertychange",kp)):n==="focusout"&&xp()}function CS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Mo(ti)}function OS(n,r){if(n==="click")return Mo(r)}function xS(n,r){if(n==="input"||n==="change")return Mo(r)}function kS(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var zt=typeof Object.is=="function"?Object.is:kS;function ni(n,r){if(zt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!Vc.call(r,d)||!zt(n[d],r[d]))return!1}return!0}function jp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Np(n,r){var i=jp(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=r&&l>=r)return{node:i,offset:r-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=jp(i)}}function Dp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Dp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Lp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Oo(n.document);r instanceof n.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)n=r.contentWindow;else break;r=Oo(n.document)}return r}function mu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var jS=zn&&"documentMode"in document&&11>=document.documentMode,Jr=null,gu=null,ai=null,yu=!1;function Mp(n,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yu||Jr==null||Jr!==Oo(l)||(l=Jr,"selectionStart"in l&&mu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focu
vendor: 18,375 bytes, line 9
9sNode:l.focusNode,focusOffset:l.focusOffset}),ai&&ni(ai,l)||(ai=l,l=El(gu,"onSelect"),0<l.length&&(r=new Do("onSelect","select",null,r,i),n.push({event:r,listeners:l}),r.target=Jr)))}function ir(n,r){var i={};return i[n.toLowerCase()]=r.toLowerCase(),i["Webkit"+n]="webkit"+r,i["Moz"+n]="moz"+r,i}var Wr={animationend:ir("Animation","AnimationEnd"),animationiteration:ir("Animation","AnimationIteration"),animationstart:ir("Animation","AnimationStart"),transitionrun:ir("Transition","TransitionRun"),transitionstart:ir("Transition","TransitionStart"),transitioncancel:ir("Transition","TransitionCancel"),transitionend:ir("Transition","TransitionEnd")},vu={},Pp={};zn&&(Pp=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function or(n){if(vu[n])return vu[n];if(!Wr[n])return n;var r=Wr[n],i;for(i in r)if(r.hasOwnProperty(i)&&i in Pp)return vu[n]=r[i];return n}var Up=or("animationend"),Ip=or("animationiteration"),zp=or("animationstart"),NS=or("transitionrun"),DS=or("transitionstart"),LS=or("transitioncancel"),$p=or("transitionend"),Bp=new Map,bu="abort auxClick beforeToggle 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(" ");bu.push("scrollEnd");function rn(n,r){Bp.set(n,r),rr(r,[n])}var Po=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Kt=[],Kr=0,wu=0;function Uo(){for(var n=Kr,r=wu=Kr=0;r<n;){var i=Kt[r];Kt[r++]=null;var l=Kt[r];Kt[r++]=null;var d=Kt[r];Kt[r++]=null;var h=Kt[r];if(Kt[r++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}h!==0&&qp(i,d,h)}}function Io(n,r,i,l){Kt[Kr++]=n,Kt[Kr++]=r,Kt[Kr++]=i,Kt[Kr++]=l,wu|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function _u(n,r,i,l){return Io(n,r,i,l),zo(n)}function lr(n,r){return Io(n,null,null,r),zo(n)}function qp(n,r,i){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i);for(var d=!1,h=n.return;h!==null;)h.childLanes|=i,l=h.alternate,l!==null&&(l.childLanes|=i),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(d=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,d&&r!==null&&(d=31-It(i),n=h.hiddenUpdates,l=n[d],l===null?n[d]=[r]:l.push(r),r.lane=i|536870912),h):null}function zo(n){if(50<Ti)throw Ti=0,kd=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Yr={};function MS(n,r,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(n,r,i,l){return new MS(n,r,i,l)}function Su(n){return n=n.prototype,!(!n||!n.isReactComponent)}function $n(n,r){var i=n.alternate;return i===null?(i=$t(n.tag,r,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=r,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&65011712,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,r=n.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function Hp(n,r){n.flags&=65011714;var i=n.alternate;return i===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,r=i.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function $o(n,r,i,l,d,h){var v=0;if(l=n,typeof n=="function")Su(n)&&(v=1);else if(typeof n=="string")v=$E(n,i,ne.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ee:return n=$t(31,i,r,d),n.elementType=ee,n.lanes=h,n;case S:return cr(i.children,d,h,r);case T:v=8,d|=24;break;case R:return n=$t(12,i,r,d|2),n.elementType=R,n.lanes=h,n;case K:return n=$t(13,i,r,d),n.elementType=K,n.lanes=h,n;case z:return n=$t(19,i,r,d),n.elementType=z,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case k:v=9;break e;case $:v=11;break e;case D:v=14;break e;case J:v=16,l=null;break e}v=29,i=Error(s(130,n===null?"null":typeof n,"")),l=null}return r=$t(v,i,r,d),r.elementType=n,r.type=l,r.lanes=h,r}function cr(n,r,i,l){return n=$t(7,n,l,r),n.lanes=i,n}function Eu(n,r,i){return n=$t(6,n,null,r),n.lanes=i,n}function Gp(n){var r=$t(18,null,null,0);return r.stateNode=n,r}function Au(n,r,i){return r=$t(4,n.children!==null?n.children:[],n.key,r),r.lanes=i,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Vp=new WeakMap;function Yt(n,r){if(typeof n=="object"&&n!==null){var i=Vp.get(n);return i!==void 0?i:(r={value:n,source:r,stack:Gh(r)},Vp.set(n,r),r)}return{value:n,source:r,stack:Gh(r)}}var Qr=[],Xr=0,Bo=null,ri=0,Qt=[],Xt=0,ba=null,Tn=1,Rn="";function Bn(n,r){Qr[Xr++]=ri,Qr[Xr++]=Bo,Bo=n,ri=r}function Fp(n,r,i){Qt[Xt++]=Tn,Qt[Xt++]=Rn,Qt[Xt++]=ba,ba=n;var l=Tn;n=Rn;var d=32-It(l)-1;l&=~(1<<d),i+=1;var h=32-It(r)+d;if(30<h){var v=d-d%5;h=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Tn=1<<32-It(r)+d|i<<d|l,Rn=h+n}else Tn=1<<h|i<<d|l,Rn=n}function Tu(n){n.return!==null&&(Bn(n,1),Fp(n,1,0))}function Ru(n){for(;n===Bo;)Bo=Qr[--Xr],Qr[Xr]=null,ri=Qr[--Xr],Qr[Xr]=null;for(;n===ba;)ba=Qt[--Xt],Qt[Xt]=null,Rn=Qt[--Xt],Qt[Xt]=null,Tn=Qt[--Xt],Qt[Xt]=null}function Jp(n,r){Qt[Xt++]=Tn,Qt[Xt++]=Rn,Qt[Xt++]=ba,Tn=r.id,Rn=r.overflow,ba=n}var pt=null,Je=null,Oe=!1,wa=null,Zt=!1,Cu=Error(s(519));function _a(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw si(Yt(r,n)),Cu}function Wp(n){var r=n.stateNode,i=n.type,l=n.memoizedProps;switch(r[ht]=n,r[Rt]=l,i){case"dialog":Ae("cancel",r),Ae("close",r);break;case"iframe":case"object":case"embed":Ae("load",r);break;case"video":case"audio":for(i=0;i<Ci.length;i++)Ae(Ci[i],r);break;case"source":Ae("error",r);break;case"img":case"image":case"link":Ae("error",r),Ae("load",r);break;case"details":Ae("toggle",r);break;case"input":Ae("invalid",r),op(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ae("invalid",r);break;case"textarea":Ae("invalid",r),cp(r,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||dy(r.textContent,i)?(l.popover!=null&&(Ae("beforetoggle",r),Ae("toggle",r)),l.onScroll!=null&&Ae("scroll",r),l.onScrollEnd!=null&&Ae("scrollend",r),l.onClick!=null&&(r.onclick=In),r=!0):r=!1,r||_a(n,!0)}function Kp(n){for(pt=n.return;pt;)switch(pt.tag){case 5:case 31:case 13:Zt=!1;return;case 27:case 3:Zt=!0;return;default:pt=pt.return}}function Zr(n){if(n!==pt)return!1;if(!Oe)return Kp(n),Oe=!0,!1;var r=n.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=n.type,i=!(i!=="form"&&i!=="button")||Vd(n.type,n.memoizedProps)),i=!i),i&&Je&&_a(n),Kp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Je=wy(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Je=wy(n)}else r===27?(r=Je,Ma(n.type)?(n=Yd,Yd=null,Je=n):Je=r):Je=pt?tn(n.stateNode.nextSibling):null;return!0}function ur(){Je=pt=null,Oe=!1}function Ou(){var n=wa;return n!==null&&(jt===null?jt=n:jt.push.apply(jt,n),wa=null),n}function si(n){wa===null?wa=[n]:wa.push(n)}var xu=x(null),dr=null,qn=null;function Sa(n,r,i){W(xu,r._currentValue),r._currentValue=i}function Hn(n){n._currentValue=xu.current,H(xu)}function ku(n,r,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),n===i)break;n=n.return}}function ju(n,r,i,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var h=d.dependencies;if(h!==null){var v=d.child;h=h.firstContext;e:for(;h!==null;){var _=h;h=d;for(var C=0;C<r.length;C++)if(_.context===r[C]){h.lanes|=i,_=h.alternate,_!==null&&(_.lanes|=i),ku(h.return,i,n),l||(v=null);break e}h=_.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(s(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),ku(v,i,n),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===n){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function es(n,r,i,l){n=null;for(var d=r,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(s(387));if(v=v.memoizedProps,v!==null){var _=d.type;zt(d.pendingProps.value,v.value)||(n!==null?n.push(_):n=[_])}}else if(d===pe.current){if(v=d.alternate,v===null)throw Error(s(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Ni):n=[Ni])}d=d.return}n!==null&&ju(r,n,i,l),r.flags|=262144}function qo(n){for(n=n.firstContext;n!==null;){if(!zt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function fr(n){dr=n,qn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function mt(n){return Yp(dr,n)}function Ho(n,r){return dr===null&&fr(n),Yp(n,r)}function Yp(n,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},qn===null){if(n===null)throw Error(s(308));qn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else qn=qn.next=r;return i}var PS=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(i,l){n.push(l)}};this.abort=function(){r.aborted=!0,n.forEach(function(i){return i()})}},US=e.unstable_scheduleCallback,IS=e.unstable_NormalPriority,tt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new PS,data:new Map,refCount:0}}function ii(n){n.refCount--,n.refCount===0&&US(IS,function(){n.controller.abort()})}var oi=null,Du=0,ts=0,ns=null;function zS(n,r){if(oi===null){var i=oi=[];Du=0,ts=Pd(),ns={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Du++,r.then(Qp,Qp),r}function Qp(){if(--Du===0&&oi!==null){ns!==null&&(ns.status="fulfilled");var n=oi;oi=null,ts=0,ns=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function $S(n,r){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return n.then(function(){l.status="fulfilled",l.value=r;for(var d=0;d<i.length;d++)(0,i[d])(r)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var Xp=U.S;U.S=function(n,r){Mg=Pt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&zS(n,r),Xp!==null&&Xp(n,r)};var hr=x(null);function Lu(){var n=hr.current;return n!==null?n:qe.pooledCache}function Go(n,r){r===null?W(hr,hr.current):W(hr,r.pool)}function Zp(){var n=Lu();return n===null?null:{parent:tt._currentValue,pool:n}}var as=Error(s(460)),Mu=Error(s(474)),Vo=Error(s(542)),Fo={then:function(){}};function em(n){return n=n.status,n==="fulfilled"||n==="rejected"}function tm(n,r,i){switch(i=n[i],i===void 0?n.push(r):i!==r&&(r.then(In,In),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,am(n),n;default:if(typeof r.status=="string")r.then(In,In);else{if(n=qe,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(l){if(r.status==="pending"){var d=r;d.status="fulfilled",d.value=l}},function(l){if(r.status==="pending"){var d=r;d.status="rejected",d.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,am(n),n}throw mr=r,as}}function pr(n){try{var r=n._init;return r(n._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(mr=i,as):i}}var mr=null;function nm(){if(mr===null)throw Error(s(459));var n=mr;return mr=null,n}function am(n){if(n===as||n===Vo)throw Error(s(483))}var rs=null,li=0;function Jo(n){var r=li;return li+=1,rs===null&&(rs=[]),tm(rs,n,r)}function ci(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Wo(n,r){throw r.$$typeof===w?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function rm(n){function r(N,O){if(n){var L=N.deletions;L===null?(N.deletions=[O],N.flags|=16):L.push(O)}}function i(N,O){if(!n)return null;for(;O!==null;)r(N,O),O=O.sibling;return null}function l(N){for(var O=new Map;N!==null;)N.key!==null?O.set(N.key,N):O.set(N.index,N),N=N.sibling;return O}function d(N,O){return N=$n(N,O),N.index=0,N.sibling=null,N}function h(N,O,L){return N.index=L,n?(L=N.alternate,L!==null?(L=L.index,L<O?(N.flags|=67108866,O):L):(N.flags|=67108866,O)):(N.flags|=1048576,O)}function v(N){return n&&N.alternate===null&&(N.flags|=67108866),N}function _(N,O,L,q){return O===null||O.tag!==6?(O=Eu(L,N.mode,q),O.return=N,O):(O=d(O,L),O.return=N,O)}function C(N,O,L,q){var de=L.type;return de===S?B(N,O,L.props.children,q,L.key):O!==null&&(O.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===J&&pr(de)===O.type)?(O=d(O,L.props),ci(O,L),O.return=N,O):(O=$o(L.type,L.key,L.props,null,N.mode,q),ci(O,L),O.return=N,O)}function M(N,O,L,q){return O===null||O.tag!==4||O.stateNode.containerInfo!==L.containerInfo||O.stateNode.implementation!==L.implementation?(O=Au(L,N.mode,q),O.return=N,O):(O=d(O,L.children||[]),O.return=N,O)}function B(N,O,L,q,de){return O===null||O.tag!==7?(O=cr(L,N.mode,q,de),O.return=N,O):(O=d(O,L),O.return=N,O)}function G(N,O,L){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Eu(""+O,N.mode,L),O.return=N,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case b:return L=$o(O.type,O.key,O.props,null,N.mode,L),ci(L,O),L.return=N,L;case E:return O=Au(O,N.mode,L),O.return=N,O;case J:return O=pr(O),G(N,O,L)}if(ce(O)||F(O))return O=cr(O,N.mode,L,null),O.return=N,O;if(typeof O.then=="function")return G(N,Jo(O),L);if(O.$$typeof===j)return G(N,Ho(N,O),L);Wo(N,O)}return null}function P(N,O,L,q){var de=O!==null?O.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return de!==null?null:_(N,O,""+L,q);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case b:return L.key===de?C(N,O,L,q):null;case E:return L.key===de?M(N,O,L,q):null;case J:return L=pr(L),P(N,O,L,q)}if(ce(L)||F(L))return de!==null?null:B(N,O,L,q,null);if(typeof L.then=="function")return P(N,O,Jo(L),q);if(L.$$typeof===j)return P(N,O,Ho(N,L),q);Wo(N,L)}return null}function I(N,O,L,q,de){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return N=N.get(L)||null,_(O,N,""+q,de);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case b:return N=N.get(q.key===null?L:q.key)||null,C(O,N,q,de);case E:return N=N.get(q.key===null?L:q.key)||null,M(O,N,q,de);case J:return q=pr(q),I(N,O,L,q,de)}if(ce(q)||F(q))return N=N.get(L)||null,B(O,N,q,de,null);if(typeof q.then=="function")return I(N,O,L,Jo(q),de);if(q.$$typeof===j)return I(N,O,L,Ho(O,q),de);Wo(O,q)}return null}function te(N,O,L,q){for(var de=null,je=null,re=O,_e=O=0,Ce=null;re!==null&&_e<L.length;_e++){re.index>_e?(Ce=re,re=null):Ce=re.sibling;var Ne=P(N,re,L[_e],q);if(Ne===null){re===null&&(re=Ce);break}n&&re&&Ne.alternate===null&&r(N,re),O=h(Ne,O,_e),je===null?de=Ne:je.sibling=Ne,je=Ne,re=Ce}if(_e===L.length)return i(N,re),Oe&&Bn(N,_e),de;if(re===null){for(;_e<L.length;_e++)re=G(N,L[_e],q),re!==null&&(O=h(re,O,_e),je===null?de=re:je.sibling=re,je=re);return Oe&&Bn(N,_e),de}for(re=l(re);_e<L.length;_e++)Ce=I(re,N,_e,L[_e],q),Ce!==null&&(n&&Ce.alternate!==null&&re.delete(Ce.key===null?_e:Ce.key),O=h(Ce,O,_e),je===null?de=Ce:je.sibling=Ce,je=Ce);return n&&re.forEach(function($a){return r(N,$a)}),Oe&&Bn(N,_e),de}function me(N,O,L,q){if(L==null)throw Error(s(151));for(var de=null,je=null,re=O,_e=O=0,Ce=null,Ne=L.next();re!==null&&!Ne.done;_e++,Ne=L.next()){re.index>_e?(Ce=re,re=null):Ce=re.sibling;var $a=P(N,re,Ne.value,q);if($a===null){re===null&&(re=Ce);break}n&&re&&$a.alternate===null&&r(N,re),O=h($a,O,_e),je===null?de=$a:je.sibling=$a,je=$a,re=Ce}if(Ne.done)return i(N,re),Oe&&Bn(N,_e),de;if(re===null){for(;!Ne.done;_e++,Ne=L.next())Ne=G(N,Ne.value,q),Ne!==null&&(O=h(Ne,O,_e),je===null?de=Ne:je.sibling=Ne,je=Ne);return Oe&&Bn(N,_e),de}for(re=l(re);!Ne.done;_e++,Ne=L.next())Ne=I(re,N,_e,Ne.value,q),Ne!==null&&(n&&Ne.alternate!==null&&re.delete(Ne.key===null?_e:Ne.key),O=h(Ne,O,_e),je===null?de=Ne:je.sibling=Ne,je=Ne);return n&&re.forEach(function(QE){return r(N,QE)}),Oe&&Bn(N,_e),de}function $e(N,O,L,q){if(typeof L=="object"&&L!==null&&L.type===S&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case b:e:{for(var de=L.key;O!==null;){if(O.key===de){if(de=L.type,de===S){if(O.tag===7){i(N,O.sibling),q=d(O,L.props.children),q.return=N,N=q;break e}}else if(O.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===J&&pr(de)===O.type){i(N,O.sibling),q=d(O,L.props),ci(q,L),q.return=N,N=q;break e}i(N,O);break}else r(N,O);O=O.sibling}L.type===S?(q=cr(L.props.children,N.mode,q,L.key),q.return=N,N=q):(q=$o(L.type,L.
vendor: 6,419 bytes, line 9
9key,L.props,null,N.mode,q),ci(q,L),q.return=N,N=q)}return v(N);case E:e:{for(de=L.key;O!==null;){if(O.key===de)if(O.tag===4&&O.stateNode.containerInfo===L.containerInfo&&O.stateNode.implementation===L.implementation){i(N,O.sibling),q=d(O,L.children||[]),q.return=N,N=q;break e}else{i(N,O);break}else r(N,O);O=O.sibling}q=Au(L,N.mode,q),q.return=N,N=q}return v(N);case J:return L=pr(L),$e(N,O,L,q)}if(ce(L))return te(N,O,L,q);if(F(L)){if(de=F(L),typeof de!="function")throw Error(s(150));return L=de.call(L),me(N,O,L,q)}if(typeof L.then=="function")return $e(N,O,Jo(L),q);if(L.$$typeof===j)return $e(N,O,Ho(N,L),q);Wo(N,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,O!==null&&O.tag===6?(i(N,O.sibling),q=d(O,L),q.return=N,N=q):(i(N,O),q=Eu(L,N.mode,q),q.return=N,N=q),v(N)):i(N,O)}return function(N,O,L,q){try{li=0;var de=$e(N,O,L,q);return rs=null,de}catch(re){if(re===as||re===Vo)throw re;var je=$t(29,re,null,N.mode);return je.lanes=q,je.return=N,je}}}var gr=rm(!0),sm=rm(!1),Ea=!1;function Pu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Aa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ta(n,r,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Me&2)!==0){var d=l.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r,r=zo(n),qp(n,null,i),r}return Io(n,l,r,i),zo(n)}function ui(n,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,i|=l,r.lanes=i,Yh(n,i)}}function Iu(n,r){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?d=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?d=h=r:h=h.next=r}else d=h=r;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=r:n.next=r,i.lastBaseUpdate=r}var zu=!1;function di(){if(zu){var n=ns;if(n!==null)throw n}}function fi(n,r,i,l){zu=!1;var d=n.updateQueue;Ea=!1;var h=d.firstBaseUpdate,v=d.lastBaseUpdate,_=d.shared.pending;if(_!==null){d.shared.pending=null;var C=_,M=C.next;C.next=null,v===null?h=M:v.next=M,v=C;var B=n.alternate;B!==null&&(B=B.updateQueue,_=B.lastBaseUpdate,_!==v&&(_===null?B.firstBaseUpdate=M:_.next=M,B.lastBaseUpdate=C))}if(h!==null){var G=d.baseState;v=0,B=M=C=null,_=h;do{var P=_.lane&-536870913,I=P!==_.lane;if(I?(Re&P)===P:(l&P)===P){P!==0&&P===ts&&(zu=!0),B!==null&&(B=B.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var te=n,me=_;P=r;var $e=i;switch(me.tag){case 1:if(te=me.payload,typeof te=="function"){G=te.call($e,G,P);break e}G=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=me.payload,P=typeof te=="function"?te.call($e,G,P):te,P==null)break e;G=g({},G,P);break e;case 2:Ea=!0}}P=_.callback,P!==null&&(n.flags|=64,I&&(n.flags|=8192),I=d.callbacks,I===null?d.callbacks=[P]:I.push(P))}else I={lane:P,tag:_.tag,payload:_.payload,callback:_.callback,next:null},B===null?(M=B=I,C=G):B=B.next=I,v|=P;if(_=_.next,_===null){if(_=d.shared.pending,_===null)break;I=_,_=I.next,I.next=null,d.lastBaseUpdate=I,d.shared.pending=null}}while(!0);B===null&&(C=G),d.baseState=C,d.firstBaseUpdate=M,d.lastBaseUpdate=B,h===null&&(d.shared.lanes=0),ka|=v,n.lanes=v,n.memoizedState=G}}function im(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function om(n,r){var i=n.callbacks;if(i!==null)for(n.callbacks=null,n=0;n<i.length;n++)im(i[n],r)}var ss=x(null),Ko=x(0);function lm(n,r){n=Xn,W(Ko,n),W(ss,r),Xn=n|r.baseLanes}function $u(){W(Ko,Xn),W(ss,ss.current)}function Bu(){Xn=Ko.current,H(ss),H(Ko)}var Bt=x(null),en=null;function Ra(n){var r=n.alternate;W(Ze,Ze.current&1),W(Bt,n),en===null&&(r===null||ss.current!==null||r.memoizedState!==null)&&(en=n)}function qu(n){W(Ze,Ze.current),W(Bt,n),en===null&&(en=n)}function cm(n){n.tag===22?(W(Ze,Ze.current),W(Bt,n),en===null&&(en=n)):Ca()}function Ca(){W(Ze,Ze.current),W(Bt,Bt.current)}function qt(n){H(Bt),en===n&&(en=null),H(Ze)}var Ze=x(0);function Yo(n){for(var r=n;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Wd(i)||Kd(i)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Gn=0,we=null,Ie=null,nt=null,Qo=!1,is=!1,yr=!1,Xo=0,hi=0,os=null,BS=0;function Ye(){throw Error(s(321))}function Hu(n,r){if(r===null)return!1;for(var i=0;i<r.length&&i<n.length;i++)if(!zt(n[i],r[i]))return!1;return!0}function Gu(n,r,i,l,d,h){return Gn=h,we=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,U.H=n===null||n.memoizedState===null?Fm:sd,yr=!1,h=i(l,d),yr=!1,is&&(h=dm(r,i,l,d)),um(n),h}function um(n){U.H=gi;var r=Ie!==null&&Ie.next!==null;if(Gn=0,nt=Ie=we=null,Qo=!1,hi=0,os=null,r)throw Error(s(300));n===null||at||(n=n.dependencies,n!==null&&qo(n)&&(at=!0))}function dm(n,r,i,l){we=n;var d=0;do{if(is&&(os=null),hi=0,is=!1,25<=d)throw Error(s(301));if(d+=1,nt=Ie=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=Jm,h=r(i,l)}while(is);return h}function qS(){var n=U.H,r=n.useState()[0];return r=typeof r.then=="function"?pi(r):r,n=n.useState()[0],(Ie!==null?Ie.memoizedState:null)!==n&&(we.flags|=1024),r}function Vu(){var n=Xo!==0;return Xo=0,n}function Fu(n,r,i){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~i}function Ju(n){if(Qo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Qo=!1}Gn=0,nt=Ie=we=null,is=!1,hi=Xo=0,os=null}function Et(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?we.memoizedState=nt=n:nt=nt.next=n,nt}
vendor: 6,556 bytes, line 9
9function et(){if(Ie===null){var n=we.alternate;n=n!==null?n.memoizedState:null}else n=Ie.next;var r=nt===null?we.memoizedState:nt.next;if(r!==null)nt=r,Ie=n;else{if(n===null)throw we.alternate===null?Error(s(467)):Error(s(310));Ie=n,n={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},nt===null?we.memoizedState=nt=n:nt=nt.next=n}return nt}function Zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pi(n){var r=hi;return hi+=1,os===null&&(os=[]),n=tm(os,n,r),r=we,(nt===null?r.memoizedState:nt.next)===null&&(r=r.alternate,U.H=r===null||r.memoizedState===null?Fm:sd),n}function el(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return pi(n);if(n.$$typeof===j)return mt(n)}throw Error(s(438,String(n)))}function Wu(n){var r=null,i=we.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=we.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(d){return d.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Zo(),we.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(n),l=0;l<n;l++)i[l]=ue;return r.index++,i}function Vn(n,r){return typeof r=="function"?r(n):r}function tl(n){var r=et();return Ku(r,Ie,n)}function Ku(n,r,i){var l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var d=n.baseQueue,h=l.pending;if(h!==null){if(d!==null){var v=d.next;d.next=h.next,h.next=v}r.baseQueue=d=h,l.pending=null}if(h=n.baseState,d===null)n.memoizedState=h;else{r=d.next;var _=v=null,C=null,M=r,B=!1;do{var G=M.lane&-536870913;if(G!==M.lane?(Re&G)===G:(Gn&G)===G){var P=M.revertLane;if(P===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),G===ts&&(B=!0);else if((Gn&P)===P){M=M.next,P===ts&&(B=!0);continue}else G={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},C===null?(_=C=G,v=h):C=C.next=G,we.lanes|=P,ka|=P;G=M.action,yr&&i(h,G),h=M.hasEagerState?M.eagerState:i(h,G)}else P={lane:G,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},C===null?(_=C=P,v=h):C=C.next=P,we.lanes|=G,ka|=G;M=M.next}while(M!==null&&M!==r);if(C===null?v=h:C.next=_,!zt(h,n.memoizedState)&&(at=!0,B&&(i=ns,i!==null)))throw i;n.memoizedState=h,n.baseState=v,n.baseQueue=C,l.lastRenderedState=h}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function Yu(n){var r=et(),i=r.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var l=i.dispatch,d=i.pending,h=r.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do h=n(h,v.action),v=v.next;while(v!==d);zt(h,r.memoizedState)||(at=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),i.lastRenderedState=h}return[h,l]}function fm(n,r,i){var l=we,d=et(),h=Oe;if(h){if(i===void 0)throw Error(s(407));i=i()}else i=r();var v=!zt((Ie||d).memoizedState,i);if(v&&(d.memoizedState=i,at=!0),d=d.queue,Zu(mm.bind(null,l,d,n),[n]),d.getSnapshot!==r||v||nt!==null&&nt.memoizedState.tag&1){if(l.flags|=2048,ls(9,{destroy:void 0},pm.bind(null,l,d,i,r),null),qe===null)throw Error(s(349));h||(Gn&127)!==0||hm(l,r,i)}return i}function hm(n,r,i){n.flags|=16384,n={getSnapshot:r,value:i},r=we.updateQueue,r===null?(r=Zo(),we.updateQueue=r,r.stores=[n]):(i=r.stores,i===null?r.stores=[n]:i.push(n))}function pm(n,r,i,l){r.value=i,r.getSnapshot=l,gm(r)&&ym(n)}function mm(n,r,i){return i(function(){gm(r)&&ym(n)})}function gm(n){var r=n.getSnapshot;n=n.value;try{var i=r();return!zt(n,i)}catch{return!0}}function ym(n){var r=lr(n,2);r!==null&&Nt(r,n,2)}function Qu(n){var r=Et();if(typeof n=="function"){var i=n;if(n=i(),yr){ga(!0);try{i()}finally{ga(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:n},r}function vm(n,r,i,l){return n.baseState=i,Ku(n,Ie,typeof l=="function"?l:Vn)}function HS(n,r,i,l,d){if(rl(n))throw Error(s(485));if(n=r.action,n!==null){var h={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};U.T!==null?i(!0):h.isTransition=!1,l(h),i=r.pending,i===null?(h.next=r.pending=h,bm(r,h)):(h.next=i.next,r.pending=i.next=h)}}function bm(n,r){var i=r.action,l=r.payload,d=n.state;if(r.isTransition){var h=U.T,v={};U.T=v;try{var _=i(d,l),C=U.S;C!==null&&C(v,_),wm(n,r,_)}catch(M){Xu(n,r,M)}finally{h!==null&&v.types!==null&&(h.types=v.types),U.T=h}}else try{h=i(d,l),wm(n,r,h)}catch(M){Xu(n,r,M)}}function wm(n,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){_m(n,r,l)},function(l){return Xu(n,r,l)}):_m(n,r,i)}function _m(n,r,i){r.status="fulfilled",r.value=i,Sm(r),n.state=i,r=n.pending,r!==null&&(i=r.next,i===r?n.pending=null:(i=i.next,r.next=i,bm(n,i)))}function Xu(n,r,i){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,Sm(r),r=r.next;while(r!==l)}n.action=null}function Sm(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Em(n,r){return r}function Am(n,r){if(Oe){var i=qe.formState;if(i!==null){e:{var l=we;if(Oe){if(Je){t:{for(var d=Je,h=Zt;d.nodeType!==8;){if(!h){d=null;break t}if(d=tn(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){Je=tn(d.nextSibling),l=d.data==="F!";break e}}_a(l)}l=!1}l&&(r=i[0])}}return i=Et(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Em,lastRenderedState:r},i.queue=l,i=Hm.bind(null,we,l),l.dispatch=i,l=Qu(!1),h=rd.bind(null,we,!1,l.queue),l=Et(),d={state:r,dispatch:null,action:n,pending:null},l.queue=d,i=HS.bind(null,we,d,h,i),d.dispatch=i,l.memoizedState=n,[r,i,!1]}function Tm(n){var r=et();return Rm(r,Ie,n)}function Rm(n,r,i){if(r=Ku(n,r,Em)[0],n=tl(Vn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=pi(r)}catch(v){throw v===as?Vo:v}else l=r;r=et();var d=r.queue,h=d.dispatch;return i!==r.memoizedState&&(we.flags|=2048,ls(9,{destroy:void 0},GS.bind(null,d,i),null)),[l,h,n]}function GS(n,r){n.action=r}function Cm(n){var r=et(),i=Ie;if(i!==null)return Rm(r,i,n);et(),r=r.memoizedState,i=et();var l=i.queue.dispatch;return i.memoizedState=n,[r,l,!1]}function ls(n,r,i,l){return n={tag:n,create:i,deps:l,inst:r,next:null},r=we.updateQueue,r===null&&(r=Zo(),we.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,r.lastEffect=n),n}
vendor: 5,291 bytes, line 9
9function Om(){return et().memoizedState}function nl(n,r,i,l){var d=Et();we.flags|=n,d.memoizedState=ls(1|r,{destroy:void 0},i,l===void 0?null:l)}function al(n,r,i,l){var d=et();l=l===void 0?null:l;var h=d.memoizedState.inst;Ie!==null&&l!==null&&Hu(l,Ie.memoizedState.deps)?d.memoizedState=ls(r,h,i,l):(we.flags|=n,d.memoizedState=ls(1|r,h,i,l))}function xm(n,r){nl(8390656,8,n,r)}function Zu(n,r){al(2048,8,n,r)}function VS(n){we.flags|=4;var r=we.updateQueue;if(r===null)r=Zo(),we.updateQueue=r,r.events=[n];else{var i=r.events;i===null?r.events=[n]:i.push(n)}}function km(n){var r=et().memoizedState;return VS({ref:r,nextImpl:n}),function(){if((Me&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function jm(n,r){return al(4,2,n,r)}function Nm(n,r){return al(4,4,n,r)}function Dm(n,r){if(typeof r=="function"){n=n();var i=r(n);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Lm(n,r,i){i=i!=null?i.concat([n]):null,al(4,4,Dm.bind(null,r,n),i)}function ed(){}function Mm(n,r){var i=et();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&Hu(r,l[1])?l[0]:(i.memoizedState=[n,r],n)}function Pm(n,r){var i=et();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&Hu(r,l[1]))return l[0];if(l=n(),yr){ga(!0);try{n()}finally{ga(!1)}}return i.memoizedState=[l,r],l}function td(n,r,i){return i===void 0||(Gn&1073741824)!==0&&(Re&261930)===0?n.memoizedState=r:(n.memoizedState=i,n=Ug(),we.lanes|=n,ka|=n,i)}function Um(n,r,i,l){return zt(i,r)?i:ss.current!==null?(n=td(n,i,l),zt(n,r)||(at=!0),n):(Gn&42)===0||(Gn&1073741824)!==0&&(Re&261930)===0?(at=!0,n.memoizedState=i):(n=Ug(),we.lanes|=n,ka|=n,r)}function Im(n,r,i,l,d){var h=Y.p;Y.p=h!==0&&8>h?h:8;var v=U.T,_={};U.T=_,rd(n,!1,r,i);try{var C=d(),M=U.S;if(M!==null&&M(_,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var B=$S(C,l);mi(n,r,B,Vt(n))}else mi(n,r,l,Vt(n))}catch(G){mi(n,r,{then:function(){},status:"rejected",reason:G},Vt())}finally{Y.p=h,v!==null&&_.types!==null&&(v.types=_.types),U.T=v}}function FS(){}function nd(n,r,i,l){if(n.tag!==5)throw Error(s(476));var d=zm(n).queue;Im(n,d,r,he,i===null?FS:function(){return $m(n),i(l)})}function zm(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:he},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:i},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function $m(n){var r=zm(n);r.next===null&&(r=n.alternate.memoizedState),mi(n,r.next.queue,{},Vt())}function ad(){return mt(Ni)}function Bm(){return et().memoizedState}function qm(){return et().memoizedState}function JS(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var i=Vt();n=Aa(i);var l=Ta(r,n,i);l!==null&&(Nt(l,r,i),ui(l,r,i)),r={cache:Nu()},n.payload=r;return}r=r.return}}function WS(n,r,i){var l=Vt();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},rl(n)?Gm(r,i):(i=_u(n,r,i,l),i!==null&&(Nt(i,n,l),Vm(i,r,l)))}function Hm(n,r,i){var l=Vt();mi(n,r,i,l)}function mi(n,r,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(rl(n))Gm(r,d);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var v=r.lastRenderedState,_=h(v,i);if(d.hasEagerState=!0,d.eagerState=_,zt(_,v))return Io(n,r,d,0),qe===null&&Uo(),!1}catch{}if(i=_u(n,r,d,l),i!==null)return Nt(i,n,l),Vm(i,r,l),!0}return!1}function rd(n,r,i,l){if(l={lane:2,revertLane:Pd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},rl(n)){if(r)throw Error(s(479))}else r=_u(n,i,l,2),r!==null&&Nt(r,n,2)}function rl(n){var r=n.alternate;return n===we||r!==null&&r===we}function Gm(n,r){is=Qo=!0;var i=n.pending;i===null?r.next=r:(r.next=i.next,i.next=r),n.pending=r}function Vm(n,r,i){if((i&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,i|=l,r.lanes=i,Yh(n,i)}}var gi={readContext:mt,use:el,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};gi.useEffectEvent=Ye;var Fm={readContext:mt,use:el,useCallback:function(n,r){return Et().memoizedState=[n,r===void 0?null:r],n},useContext:mt,useEffect:xm,useImperativeHandle:function(n,r,i){i=i!=null?i.concat([n]):null,nl(4194308,4,Dm.bind(null,r,n),i)},useLayoutEffect:function(n,r){return nl(4194308,4,n,r)},useInsertionEffect:function(n,r){nl(4,2,n,r)},useMemo:function(n,r){var i=Et();r=r===void 0?null:r;var l=n();if(yr){ga(!0);try{n()}finally{ga(!1)}}return i.memoizedState=[l,r],l},useReducer:function(n,r,i){var l=Et();if(i!==void 0){var d=i(r);if(yr){ga(!0);try{i(r)}finally{ga(!1)}}}else d=r;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=WS.bind(null,we,n),[l.memoizedState,n]}
vendor: 4,876 bytes, line 9
9,useRef:function(n){var r=Et();return n={current:n},r.memoizedState=n},useState:function(n){n=Qu(n);var r=n.queue,i=Hm.bind(null,we,r);return r.dispatch=i,[n.memoizedState,i]},useDebugValue:ed,useDeferredValue:function(n,r){var i=Et();return td(i,n,r)},useTransition:function(){var n=Qu(!1);return n=Im.bind(null,we,n.queue,!0,!1),Et().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,i){var l=we,d=Et();if(Oe){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),qe===null)throw Error(s(349));(Re&127)!==0||hm(l,r,i)}d.memoizedState=i;var h={value:i,getSnapshot:r};return d.queue=h,xm(mm.bind(null,l,h,n),[n]),l.flags|=2048,ls(9,{destroy:void 0},pm.bind(null,l,h,i,r),null),i},useId:function(){var n=Et(),r=qe.identifierPrefix;if(Oe){var i=Rn,l=Tn;i=(l&~(1<<32-It(l)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Xo++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=BS++,r="_"+r+"r_"+i.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:ad,useFormState:Am,useActionState:Am,useOptimistic:function(n){var r=Et();r.memoizedState=r.baseState=n;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=rd.bind(null,we,!0,i),i.dispatch=r,[n,r]},useMemoCache:Wu,useCacheRefresh:function(){return Et().memoizedState=JS.bind(null,we)},useEffectEvent:function(n){var r=Et(),i={impl:n};return r.memoizedState=i,function(){if((Me&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},sd={readContext:mt,use:el,useCallback:Mm,useContext:mt,useEffect:Zu,useImperativeHandle:Lm,useInsertionEffect:jm,useLayoutEffect:Nm,useMemo:Pm,useReducer:tl,useRef:Om,useState:function(){return tl(Vn)},useDebugValue:ed,useDeferredValue:function(n,r){var i=et();return Um(i,Ie.memoizedState,n,r)},useTransition:function(){var n=tl(Vn)[0],r=et().memoizedState;return[typeof n=="boolean"?n:pi(n),r]},useSyncExternalStore:fm,useId:Bm,useHostTransitionStatus:ad,useFormState:Tm,useActionState:Tm,useOptimistic:function(n,r){var i=et();return vm(i,Ie,n,r)},useMemoCache:Wu,useCacheRefresh:qm};sd.useEffectEvent=km;var Jm={readContext:mt,use:el,useCallback:Mm,useContext:mt,useEffect:Zu,useImperativeHandle:Lm,useInsertionEffect:jm,useLayoutEffect:Nm,useMemo:Pm,useReducer:Yu,useRef:Om,useState:function(){return Yu(Vn)},useDebugValue:ed,useDeferredValue:function(n,r){var i=et();return Ie===null?td(i,n,r):Um(i,Ie.memoizedState,n,r)},useTransition:function(){var n=Yu(Vn)[0],r=et().memoizedState;return[typeof n=="boolean"?n:pi(n),r]},useSyncExternalStore:fm,useId:Bm,useHostTransitionStatus:ad,useFormState:Cm,useActionState:Cm,useOptimistic:function(n,r){var i=et();return Ie!==null?vm(i,Ie,n,r):(i.baseState=n,[n,i.queue.dispatch])},useMemoCache:Wu,useCacheRefresh:qm};Jm.useEffectEvent=km;function id(n,r,i,l){r=n.memoizedState,i=i(l,r),i=i==null?r:g({},r,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var od={enqueueSetState:function(n,r,i){n=n._reactInternals;var l=Vt(),d=Aa(l);d.payload=r,i!=null&&(d.callback=i),r=Ta(n,d,l),r!==null&&(Nt(r,n,l),ui(r,n,l))},enqueueReplaceState:function(n,r,i){n=n._reactInternals;var l=Vt(),d=Aa(l);d.tag=1,d.payload=r,i!=null&&(d.callback=i),r=Ta(n,d,l),r!==null&&(Nt(r,n,l),ui(r,n,l))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var i=Vt(),l=Aa(i);l.tag=2,r!=null&&(l.callback=r),r=Ta(n,l,i),r!==null&&(Nt(r,n,i),ui(r,n,i))}};function Wm(n,r,i,l,d,h,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,h,v):r.prototype&&r.prototype.isPureReactComponent?!ni(i,l)||!ni(d,h):!0}function Km(n,r,i,l){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==n&&od.enqueueReplaceState(r,r.state,null)}function vr(n,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(n=n.defaultProps){i===r&&(i=g({},i));for(var d in n)i[d]===void 0&&(i[d]=n[d])}return i}function Ym(n){Po(n)}function Qm(n){console.error(n)}function Xm(n){Po(n)}function sl(n,r){try{var i=n.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function Zm(n,r,i){try{var l=n.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function ld(n,r,i){return i=Aa(i),i.tag=3,i.payload={element:null},i.callback=function(){sl(n,r)},i}function eg(n){return n=Aa(n),n.tag=3,n}function tg(n,r,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var h=l.value;n.payload=function(){return d(h)},n.callback=function(){Zm(r,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){Zm(r,i,l),typeof d!="function"&&(ja===null?ja=new Set([this]):ja.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}
vendor: 11,463 bytes, line 9
9function KS(n,r,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&es(r,i,d,!0),i=Bt.current,i!==null){switch(i.tag){case 31:case 13:return en===null?yl():i.alternate===null&&Qe===0&&(Qe=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===Fo?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),Dd(n,l,d)),!1;case 22:return i.flags|=65536,l===Fo?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),Dd(n,l,d)),!1}throw Error(s(435,i.tag))}return Dd(n,l,d),yl(),!1}if(Oe)return r=Bt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=d,l!==Cu&&(n=Error(s(422),{cause:l}),si(Yt(n,i)))):(l!==Cu&&(r=Error(s(423),{cause:l}),si(Yt(r,i))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=Yt(l,i),d=ld(n.stateNode,l,d),Iu(n,d),Qe!==4&&(Qe=2)),!1;var h=Error(s(520),{cause:l});if(h=Yt(h,i),Ai===null?Ai=[h]:Ai.push(h),Qe!==4&&(Qe=2),r===null)return!0;l=Yt(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,n=d&-d,i.lanes|=n,n=ld(i.stateNode,l,n),Iu(i,n),!1;case 1:if(r=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ja===null||!ja.has(h))))return i.flags|=65536,d&=-d,i.lanes|=d,d=eg(d),tg(d,n,i,l),Iu(i,d),!1}i=i.return}while(i!==null);return!1}var cd=Error(s(461)),at=!1;function gt(n,r,i,l){r.child=n===null?sm(r,null,i,l):gr(r,n.child,i,l)}function ng(n,r,i,l,d){i=i.render;var h=r.ref;if("ref"in l){var v={};for(var _ in l)_!=="ref"&&(v[_]=l[_])}else v=l;return fr(r),l=Gu(n,r,i,v,h,d),_=Vu(),n!==null&&!at?(Fu(n,r,d),Fn(n,r,d)):(Oe&&_&&Tu(r),r.flags|=1,gt(n,r,l,d),r.child)}function ag(n,r,i,l,d){if(n===null){var h=i.type;return typeof h=="function"&&!Su(h)&&h.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=h,rg(n,r,h,l,d)):(n=$o(i.type,null,l,r,r.mode,d),n.ref=r.ref,n.return=r,r.child=n)}if(h=n.child,!yd(n,d)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:ni,i(v,l)&&n.ref===r.ref)return Fn(n,r,d)}return r.flags|=1,n=$n(h,l),n.ref=r.ref,n.return=r,r.child=n}function rg(n,r,i,l,d){if(n!==null){var h=n.memoizedProps;if(ni(h,l)&&n.ref===r.ref)if(at=!1,r.pendingProps=l=h,yd(n,d))(n.flags&131072)!==0&&(at=!0);else return r.lanes=n.lanes,Fn(n,r,d)}return ud(n,r,i,l,d)}function sg(n,r,i,l){var d=l.children,h=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,n!==null){for(l=r.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~h}else l=0,r.child=null;return ig(n,r,h,i,l)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Go(r,h!==null?h.cachePool:null),h!==null?lm(r,h):$u(),cm(r);else return l=r.lanes=536870912,ig(n,r,h!==null?h.baseLanes|i:i,i,l)}else h!==null?(Go(r,h.cachePool),lm(r,h),Ca(),r.memoizedState=null):(n!==null&&Go(r,null),$u(),Ca());return gt(n,r,d,i),r.child}function yi(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function ig(n,r,i,l,d){var h=Lu();return h=h===null?null:{parent:tt._currentValue,pool:h},r.memoizedState={baseLanes:i,cachePool:h},n!==null&&Go(r,null),$u(),cm(r),n!==null&&es(n,r,l,!0),r.childLanes=d,null}function il(n,r){return r=ll({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function og(n,r,i){return gr(r,n.child,null,i),n=il(r,r.pendingProps),n.flags|=2,qt(r),r.memoizedState=null,n}function YS(n,r,i){var l=r.pendingProps,d=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Oe){if(l.mode==="hidden")return n=il(r,l),r.lanes=536870912,yi(null,n);if(qu(r),(n=Je)?(n=by(n,Zt),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ba!==null?{id:Tn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},i=Gp(n),i.return=r,r.child=i,pt=r,Je=null)):n=null,n===null)throw _a(r);return r.lanes=536870912,null}return il(r,l)}var h=n.memoizedState;if(h!==null){var v=h.dehydrated;if(qu(r),d)if(r.flags&256)r.flags&=-257,r=og(n,r,i);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(at||es(n,r,i,!1),d=(i&n.childLanes)!==0,at||d){if(l=qe,l!==null&&(v=Qh(l,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,lr(n,v),Nt(l,n,v),cd;yl(),r=og(n,r,i)}else n=h.treeContext,Je=tn(v.nextSibling),pt=r,Oe=!0,wa=null,Zt=!1,n!==null&&Jp(r,n),r=il(r,l),r.flags|=4096;return r}return n=$n(n.child,{mode:l.mode,children:l.children}),n.ref=r.ref,r.child=n,n.return=r,n}function ol(n,r){var i=r.ref;if(i===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(n===null||n.ref!==i)&&(r.flags|=4194816)}}function ud(n,r,i,l,d){return fr(r),i=Gu(n,r,i,l,void 0,d),l=Vu(),n!==null&&!at?(Fu(n,r,d),Fn(n,r,d)):(Oe&&l&&Tu(r),r.flags|=1,gt(n,r,i,d),r.child)}function lg(n,r,i,l,d,h){return fr(r),r.updateQueue=null,i=dm(r,l,i,d),um(n),l=Vu(),n!==null&&!at?(Fu(n,r,h),Fn(n,r,h)):(Oe&&l&&Tu(r),r.flags|=1,gt(n,r,i,h),r.child)}function cg(n,r,i,l,d){if(fr(r),r.stateNode===null){var h=Yr,v=i.contextType;typeof v=="object"&&v!==null&&(h=mt(v)),h=new i(l,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=od,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=l,h.state=r.memoizedState,h.refs={},Pu(r),v=i.contextType,h.context=typeof v=="object"&&v!==null?mt(v):Yr,h.state=r.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(id(r,i,v,l),h.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&od.enqueueReplaceState(h,h.state,null),fi(r,l,h,d),di(),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(n===null){h=r.stateNode;var _=r.memoizedProps,C=vr(i,_);h.props=C;var M=h.context,B=i.contextType;v=Yr,typeof B=="object"&&B!==null&&(v=mt(B));var G=i.getDerivedStateFromProps;B=typeof G=="function"||typeof h.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,B||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(_||M!==v)&&Km(r,h,l,v),Ea=!1;var P=r.memoizedState;h.state=P,fi(r,l,h,d),di(),M=r.memoizedState,_||P!==M||Ea?(typeof G=="function"&&(id(r,i,G,l),M=r.memoizedState),(C=Ea||Wm(r,i,C,l,P,M,v))?(B||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(r.flags|=4194308)):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=M),h.props=l,h.state=M,h.context=v,l=C):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{h=r.stateNode,Uu(n,r),v=r.memoizedProps,B=vr(i,v),h.props=B,G=r.pendingProps,P=h.context,M=i.contextType,C=Yr,typeof M=="object"&&M!==null&&(C=mt(M)),_=i.getDerivedStateFromProps,(M=typeof _=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==G||P!==C)&&Km(r,h,l,C),Ea=!1,P=r.memoizedState,h.state=P,fi(r,l,h,d),di();var I=r.memoizedState;v!==G||P!==I||Ea||n!==null&&n.dependencies!==null&&qo(n.dependencies)?(typeof _=="function"&&(id(r,i,_,l),I=r.memoizedState),(B=Ea||Wm(r,i,B,l,P,I,C)||n!==null&&n.dependencies!==null&&qo(n.dependencies))?(M||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,I,C),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,I,C)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=I),h.props=l,h.state=I,h.context=C,l=B):(typeof h.componentDidUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&P===n.memoizedState||(r.flags|=1024),l=!1)}return h=l,ol(n,r),l=(r.flags&128)!==0,h||l?(h=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:h.render(),r.flags|=1,n!==null&&l?(r.child=gr(r,n.child,null,d),r.child=gr(r,null,i,d)):gt(n,r,i,d),r.memoizedState=h.state,n=r.child):n=Fn(n,r,d),n}function ug(n,r,i,l){return ur(),r.flags|=256,gt(n,r,i,l),r.child}var dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fd(n){return{baseLanes:n,cachePool:Zp()}}function hd(n,r,i){return n=n!==null?n.childLanes&~i:0,r&&(n|=Gt),n}function dg(n,r,i){var l=r.pendingProps,d=!1,h=(r.flags&128)!==0,v;if((v=h)||(v=n!==null&&n.memoizedState===null?!1:(Ze.current&2)!==0),v&&(d=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(Oe){if(d?Ra(r):Ca(),(n=Je)?(n=by(n,Zt),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ba!==null?{id:Tn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},i=Gp(n),i.return=r,r.child=i,pt=r,Je=null)):n=null,n===null)throw _a(r);return Kd(n)?r.lanes=32:r.lanes=536870912,null}var _=l.children;return l=l.fallback,d?(Ca(),d=r.mode,_=ll({mode:"hidden",children:_},d),l=cr(l,d,i,null),_.return=r,l.return=r,_.sibling=l,r.child=_,l=r.child,l.memoizedState=fd(i),l.childLanes=hd(n,v,i),r.memoizedState=dd,yi(null,l)):(Ra(r),pd(r,_))}var C=n.memoizedState;if(C!==null&&(_=C.dehydrated,_!==null)){if(h)r.flags&256?(Ra(r),r.flags&=-257,r=md(n,r,i)):r.memoizedState!==null?(Ca(),r.child=n.child,r.flags|=128,r=null):(Ca(),_=l.fallback,d=r.mode,l=ll({mode:"visible",children:l.children},d),_=cr(_,d,i,null),_.flags|=2,l.return=r,_.return=r,l.sibling=_,r.child=l,gr(r,n.child,null,i),l=r.child,l.memoizedState=fd(i),l.childLanes=hd(n,v,i),r.memoizedState=dd,r=yi(null,l));else if(Ra(r),Kd(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var M=v.dgst;v=M,l=Error(s(419)),l.stack="",l.digest=v,si({value:l,source:null,stack:null}),r=md(n,r,i)}else if(at||es(n,r,i,!1),v=(i&n.childLanes)!==0,at||v){if(v=qe,v!==null&&(l=Qh(v,i),l!==0&&l!==C.retryLane))throw C.retryLane=l,lr(n,l),Nt(v,n,l),cd;Wd(_)||yl(),r=md(n,r,i)}else Wd(_)?(r.flags|=192,r.child=n.child,r=null):(n=C.treeContext,Je=tn(_.nextSibling),pt=r,Oe=!0,wa=null,Zt=!1,n!==null&&Jp(r,n),r=pd(r,l.children),r.flags|=4096);return r}return d?(Ca(),_=l.fallback,d=r.mode,C=n.child,M=C.sibling,l=$n(C,{mode:"hidden",children:l.children}),l.subtreeFlags=C.subtreeFlags&65011712,M!==null?_=$n(M,_):(_=cr(_,d,i,null),_.flags|=2),_.return=r,l.return=r,l.sibling=_,r.child=l,yi(null,l),l=r.child,_=n.child.memoizedState,_===null?_=fd(i):(d=_.cachePool,d!==null?(C=tt._currentValue,d=d.parent!==C?{parent:C,pool:C}
vendor: 4,140 bytes, line 9
9:d):d=Zp(),_={baseLanes:_.baseLanes|i,cachePool:d}),l.memoizedState=_,l.childLanes=hd(n,v,i),r.memoizedState=dd,yi(n.child,l)):(Ra(r),i=n.child,n=i.sibling,i=$n(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=i,r.memoizedState=null,i)}function pd(n,r){return r=ll({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function ll(n,r){return n=$t(22,n,null,r),n.lanes=0,n}function md(n,r,i){return gr(r,n.child,null,i),n=pd(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function fg(n,r,i){n.lanes|=r;var l=n.alternate;l!==null&&(l.lanes|=r),ku(n.return,r,i)}function gd(n,r,i,l,d,h){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:h}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=h)}function hg(n,r,i){var l=r.pendingProps,d=l.revealOrder,h=l.tail;l=l.children;var v=Ze.current,_=(v&2)!==0;if(_?(v=v&1|2,r.flags|=128):v&=1,W(Ze,v),gt(n,r,l,i),l=Oe?ri:0,!_&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&fg(n,i,r);else if(n.tag===19)fg(n,i,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(i=r.child,d=null;i!==null;)n=i.alternate,n!==null&&Yo(n)===null&&(d=i),i=i.sibling;i=d,i===null?(d=r.child,r.child=null):(d=i.sibling,i.sibling=null),gd(r,!1,d,i,h,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=r.child,r.child=null;d!==null;){if(n=d.alternate,n!==null&&Yo(n)===null){r.child=d;break}n=d.sibling,d.sibling=i,i=d,d=n}gd(r,!0,i,null,h,l);break;case"together":gd(r,!1,null,null,void 0,l);break;default:r.memoizedState=null}return r.child}function Fn(n,r,i){if(n!==null&&(r.dependencies=n.dependencies),ka|=r.lanes,(i&r.childLanes)===0)if(n!==null){if(es(n,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,i=$n(n,n.pendingProps),r.child=i,i.return=r;n.sibling!==null;)n=n.sibling,i=i.sibling=$n(n,n.pendingProps),i.return=r;i.sibling=null}return r.child}function yd(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&qo(n)))}function QS(n,r,i){switch(r.tag){case 3:Le(r,r.stateNode.containerInfo),Sa(r,tt,n.memoizedState.cache),ur();break;case 27:case 5:An(r);break;case 4:Le(r,r.stateNode.containerInfo);break;case 10:Sa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,qu(r),null;break;case 13:var l=r.memoizedState;if(l!==null)return l.dehydrated!==null?(Ra(r),r.flags|=128,null):(i&r.child.childLanes)!==0?dg(n,r,i):(Ra(r),n=Fn(n,r,i),n!==null?n.sibling:null);Ra(r);break;case 19:var d=(n.flags&128)!==0;if(l=(i&r.childLanes)!==0,l||(es(n,r,i,!1),l=(i&r.childLanes)!==0),d){if(l)return hg(n,r,i);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),W(Ze,Ze.current),l)break;return null;case 22:return r.lanes=0,sg(n,r,i,r.pendingProps);case 24:Sa(r,tt,n.memoizedState.cache)}return Fn(n,r,i)}function pg(n,r,i){if(n!==null)if(n.memoizedProps!==r.pendingProps)at=!0;else{if(!yd(n,i)&&(r.flags&128)===0)return at=!1,QS(n,r,i);at=(n.flags&131072)!==0}else at=!1,Oe&&(r.flags&1048576)!==0&&Fp(r,ri,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(n=pr(r.elementType),r.type=n,typeof n=="function")Su(n)?(l=vr(n,l),r.tag=1,r=cg(null,r,n,l,i)):(r.tag=0,r=ud(null,r,n,l,i));else{if(n!=null){var d=n.$$typeof;if(d===$){r.tag=11,r=ng(null,r,n,l,i);break e}else if(d===D){r.tag=14,r=ag(null,r,n,l,i);break e}}throw r=ge(n)||n,Error(s(306,r,""))}}return r;case 0:return ud(n,r,r.type,r.pendingProps,i);case 1:return l=r.type,d=vr(l,r.pendingProps),cg(n,r,l,d,i);case 3:e:{if(Le(r,r.stateNode.containerInfo),n===null)throw Error(s(387));l=r.pendingProps;var h=r.memoizedState;d=h.element,Uu(n,r),fi(r,l,null,i);var v=r.memoizedState;
vendor: 5,632 bytes, line 9
9if(l=v.cache,Sa(r,tt,l),l!==h.cache&&ju(r,[tt],i,!0),di(),l=v.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){r=ug(n,r,l,i);break e}else if(l!==d){d=Yt(Error(s(424)),r),si(d),r=ug(n,r,l,i);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Je=tn(n.firstChild),pt=r,Oe=!0,wa=null,Zt=!0,i=sm(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ur(),l===d){r=Fn(n,r,i);break e}gt(n,r,l,i)}r=r.child}return r;case 26:return ol(n,r),n===null?(i=Ty(r.type,null,r.pendingProps,null))?r.memoizedState=i:Oe||(i=r.type,n=r.pendingProps,l=Al(Se.current).createElement(i),l[ht]=r,l[Rt]=n,yt(l,i,n),ct(l),r.stateNode=l):r.memoizedState=Ty(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return An(r),n===null&&Oe&&(l=r.stateNode=Sy(r.type,r.pendingProps,Se.current),pt=r,Zt=!0,d=Je,Ma(r.type)?(Yd=d,Je=tn(l.firstChild)):Je=d),gt(n,r,r.pendingProps.children,i),ol(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Oe&&((d=l=Je)&&(l=CE(l,r.type,r.pendingProps,Zt),l!==null?(r.stateNode=l,pt=r,Je=tn(l.firstChild),Zt=!1,d=!0):d=!1),d||_a(r)),An(r),d=r.type,h=r.pendingProps,v=n!==null?n.memoizedProps:null,l=h.children,Vd(d,h)?l=null:v!==null&&Vd(d,v)&&(r.flags|=32),r.memoizedState!==null&&(d=Gu(n,r,qS,null,null,i),Ni._currentValue=d),ol(n,r),gt(n,r,l,i),r.child;case 6:return n===null&&Oe&&((n=i=Je)&&(i=OE(i,r.pendingProps,Zt),i!==null?(r.stateNode=i,pt=r,Je=null,n=!0):n=!1),n||_a(r)),null;case 13:return dg(n,r,i);case 4:return Le(r,r.stateNode.containerInfo),l=r.pendingProps,n===null?r.child=gr(r,null,l,i):gt(n,r,l,i),r.child;case 11:return ng(n,r,r.type,r.pendingProps,i);case 7:return gt(n,r,r.pendingProps,i),r.child;case 8:return gt(n,r,r.pendingProps.children,i),r.child;case 12:return gt(n,r,r.pendingProps.children,i),r.child;case 10:return l=r.pendingProps,Sa(r,r.type,l.value),gt(n,r,l.children,i),r.child;case 9:return d=r.type._context,l=r.pendingProps.children,fr(r),d=mt(d),l=l(d),r.flags|=1,gt(n,r,l,i),r.child;case 14:return ag(n,r,r.type,r.pendingProps,i);case 15:return rg(n,r,r.type,r.pendingProps,i);case 19:return hg(n,r,i);case 31:return YS(n,r,i);case 22:return sg(n,r,i,r.pendingProps);case 24:return fr(r),l=mt(tt),n===null?(d=Lu(),d===null&&(d=qe,h=Nu(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=i),d=h),r.memoizedState={parent:l,cache:d},Pu(r),Sa(r,tt,d)):((n.lanes&i)!==0&&(Uu(n,r),fi(r,null,null,i),di()),d=n.memoizedState,h=r.memoizedState,d.parent!==l?(d={parent:l,cache:l},r.memoizedState=d,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=d),Sa(r,tt,l)):(l=h.cache,Sa(r,tt,l),l!==d.cache&&ju(r,[tt],i,!0))),gt(n,r,r.pendingProps.children,i),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Jn(n){n.flags|=4}function vd(n,r,i,l,d){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(Bg())n.flags|=8192;else throw mr=Fo,Mu}else n.flags&=-16777217}function mg(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ky(r))if(Bg())n.flags|=8192;else throw mr=Fo,Mu}function cl(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Wh():536870912,n.lanes|=r,fs|=r)}function vi(n,r){if(!Oe)switch(n.tailMode){case"hidden":r=n.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function We(n){var r=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(r)for(var d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=i,r}function XS(n,r,i){var l=r.pendingProps;switch(Ru(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(r),null;case 1:return We(r),null;case 3:return i=r.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Hn(tt),He(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Zr(r)?Jn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Ou())),We(r),null;case 26:var d=r.type,h=r.memoizedState;return n===null?(Jn(r),h!==null?(We(r),mg(r,h)):(We(r),vd(r,d,null,l,i))):h?h!==n.memoizedState?(Jn(r),We(r),mg(r,h)):(We(r),r.flags&=-16777217):(n=n.memoizedProps,n!==l&&Jn(r),We(r),vd(r,d,n,l,i)),null;case 27:if(tr(r),i=Se.current,d=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&Jn(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return We(r),null}n=ne.current,Zr(r)?Wp(r):(n=Sy(d,l,i),r.stateNode=n,Jn(r))}return We(r),null;case 5:if(tr(r),d=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&Jn(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return We(r),null}if(h=ne.current,Zr(r))Wp(r);else{var v=Al(Se.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;
vendor: 24,322 bytes, line 9
9case"select":h=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}h[ht]=r,h[Rt]=l;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=h;e:switch(yt(h,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Jn(r)}}return We(r),vd(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,i),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&Jn(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(s(166));if(n=Se.current,Zr(r)){if(n=r.stateNode,i=r.memoizedProps,l=null,d=pt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[ht]=r,n=!!(n.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||dy(n.nodeValue,i)),n||_a(r,!0)}else n=Al(n).createTextNode(l),n[ht]=r,r.stateNode=n}return We(r),null;case 31:if(i=r.memoizedState,n===null||n.memoizedState!==null){if(l=Zr(r),i!==null){if(n===null){if(!l)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[ht]=r}else ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;We(r),n=!1}else i=Ou(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=i),n=!0;if(!n)return r.flags&256?(qt(r),r):(qt(r),null);if((r.flags&128)!==0)throw Error(s(558))}return We(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Zr(r),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(s(318));if(d=r.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[ht]=r}else ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;We(r),d=!1}else d=Ou(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return r.flags&256?(qt(r),r):(qt(r),null)}return qt(r),(r.flags&128)!==0?(r.lanes=i,r):(i=l!==null,n=n!==null&&n.memoizedState!==null,i&&(l=r.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==d&&(l.flags|=2048)),i!==n&&i&&(r.child.flags|=8192),cl(r,r.updateQueue),We(r),null);case 4:return He(),n===null&&$d(r.stateNode.containerInfo),We(r),null;case 10:return Hn(r.type),We(r),null;case 19:if(H(Ze),l=r.memoizedState,l===null)return We(r),null;if(d=(r.flags&128)!==0,h=l.rendering,h===null)if(d)vi(l,!1);else{if(Qe!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(h=Yo(n),h!==null){for(r.flags|=128,vi(l,!1),n=h.updateQueue,r.updateQueue=n,cl(r,n),r.subtreeFlags=0,n=i,i=r.child;i!==null;)Hp(i,n),i=i.sibling;return W(Ze,Ze.current&1|2),Oe&&Bn(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&Pt()>pl&&(r.flags|=128,d=!0,vi(l,!1),r.lanes=4194304)}else{if(!d)if(n=Yo(h),n!==null){if(r.flags|=128,d=!0,n=n.updateQueue,r.updateQueue=n,cl(r,n),vi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!Oe)return We(r),null}else 2*Pt()-l.renderingStartTime>pl&&i!==536870912&&(r.flags|=128,d=!0,vi(l,!1),r.lanes=4194304);l.isBackwards?(h.sibling=r.child,r.child=h):(n=l.last,n!==null?n.sibling=h:r.child=h,l.last=h)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Pt(),n.sibling=null,i=Ze.current,W(Ze,d?i&1|2:i&1),Oe&&Bn(r,l.treeForkCount),n):(We(r),null);case 22:case 23:return qt(r),Bu(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(We(r),r.subtreeFlags&6&&(r.flags|=8192)):We(r),i=r.updateQueue,i!==null&&cl(r,i.retryQueue),i=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),n!==null&&H(hr),null;case 24:return i=null,n!==null&&(i=n.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),Hn(tt),We(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function ZS(n,r){switch(Ru(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Hn(tt),He(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return tr(r),null;case 31:if(r.memoizedState!==null){if(qt(r),r.alternate===null)throw Error(s(340));ur()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(qt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ur()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return H(Ze),null;case 4:return He(),null;case 10:return Hn(r.type),null;case 22:case 23:return qt(r),Bu(),n!==null&&H(hr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Hn(tt),null;case 25:return null;default:return null}}function gg(n,r){switch(Ru(r),r.tag){case 3:Hn(tt),He();break;case 26:case 27:case 5:tr(r);break;case 4:He();break;case 31:r.memoizedState!==null&&qt(r);break;case 13:qt(r);break;case 19:H(Ze);break;case 10:Hn(r.type);break;case 22:case 23:qt(r),Bu(),n!==null&&H(hr);break;case 24:Hn(tt)}}function bi(n,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&n)===n){l=void 0;var h=i.create,v=i.inst;l=h(),v.destroy=l}i=i.next}while(i!==d)}}catch(_){Ue(r,r.return,_)}}function Oa(n,r,i){try{var l=r.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var h=d.next;l=h;do{if((l.tag&n)===n){var v=l.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,d=r;var C=i,M=_;try{M()}catch(B){Ue(d,C,B)}}}l=l.next}while(l!==h)}}catch(B){Ue(r,r.return,B)}}function yg(n){var r=n.updateQueue;if(r!==null){var i=n.stateNode;try{om(r,i)}catch(l){Ue(n,n.return,l)}}}function vg(n,r,i){i.props=vr(n.type,n.memoizedProps),i.state=n.memoizedState;try{i.componentWillUnmount()}catch(l){Ue(n,r,l)}}function wi(n,r){try{var i=n.ref;if(i!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof i=="function"?n.refCleanup=i(l):i.current=l}}catch(d){Ue(n,r,d)}}function Cn(n,r){var i=n.ref,l=n.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){Ue(n,r,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ue(n,r,d)}else i.current=null}function bg(n){var r=n.type,i=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(d){Ue(n,n.return,d)}}function bd(n,r,i){try{var l=n.stateNode;_E(l,n.type,i,r),l[Rt]=r}catch(d){Ue(n,n.return,d)}}function wg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ma(n.type)||n.tag===4}function wd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||wg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ma(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function _d(n,r,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(n,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(n),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=In));else if(l!==4&&(l===27&&Ma(n.type)&&(i=n.stateNode,r=null),n=n.child,n!==null))for(_d(n,r,i),n=n.sibling;n!==null;)_d(n,r,i),n=n.sibling}function ul(n,r,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?i.insertBefore(n,r):i.appendChild(n);else if(l!==4&&(l===27&&Ma(n.type)&&(i=n.stateNode),n=n.child,n!==null))for(ul(n,r,i),n=n.sibling;n!==null;)ul(n,r,i),n=n.sibling}function _g(n){var r=n.stateNode,i=n.memoizedProps;try{for(var l=n.type,d=r.attributes;d.length;)r.removeAttributeNode(d[0]);yt(r,l,i),r[ht]=n,r[Rt]=i}catch(h){Ue(n,n.return,h)}}var Wn=!1,rt=!1,Sd=!1,Sg=typeof WeakSet=="function"?WeakSet:Set,ut=null;function eE(n,r){if(n=n.containerInfo,Hd=jl,n=Lp(n),mu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,_=-1,C=-1,M=0,B=0,G=n,P=null;t:for(;;){for(var I;G!==i||d!==0&&G.nodeType!==3||(_=v+d),G!==h||l!==0&&G.nodeType!==3||(C=v+l),G.nodeType===3&&(v+=G.nodeValue.length),(I=G.firstChild)!==null;)P=G,G=I;for(;;){if(G===n)break t;if(P===i&&++M===d&&(_=v),P===h&&++B===l&&(C=v),(I=G.nextSibling)!==null)break;G=P,P=G.parentNode}G=I}i=_===-1||C===-1?null:{start:_,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Gd={focusedElem:n,selectionRange:i},jl=!1,ut=r;ut!==null;)if(r=ut,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,ut=n;else for(;ut!==null;){switch(r=ut,h=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(i=0;i<n.length;i++)d=n[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,i=r,d=h.memoizedProps,h=h.memoizedState,l=i.stateNode;try{var te=vr(i.type,d);n=l.getSnapshotBeforeUpdate(te,h),l.__reactInternalSnapshotBeforeUpdate=n}catch(me){Ue(i,i.return,me)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,i=n.nodeType,i===9)Jd(n);else if(i===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Jd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=r.sibling,n!==null){n.return=r.return,ut=n;break}ut=r.return}}function Eg(n,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Yn(n,i),l&4&&bi(5,i);break;case 1:if(Yn(n,i),l&4)if(n=i.stateNode,r===null)try{n.componentDidMount()}catch(v){Ue(i,i.return,v)}else{var d=vr(i.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(d,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Ue(i,i.return,v)}}l&64&&yg(i),l&512&&wi(i,i.return);break;case 3:if(Yn(n,i),l&64&&(n=i.updateQueue,n!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{om(n,r)}catch(v){Ue(i,i.return,v)}}break;case 27:r===null&&l&4&&_g(i);case 26:case 5:Yn(n,i),r===null&&l&4&&bg(i),l&512&&wi(i,i.return);break;case 12:Yn(n,i);break;case 31:Yn(n,i),l&4&&Rg(n,i);break;case 13:Yn(n,i),l&4&&Cg(n,i),l&64&&(n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(i=cE.bind(null,i),xE(n,i))));break;case 22:if(l=i.memoizedState!==null||Wn,!l){r=r!==null&&r.memoizedState!==null||rt,d=Wn;var h=rt;Wn=l,(rt=r)&&!h?Qn(n,i,(i.subtreeFlags&8772)!==0):Yn(n,i),Wn=d,rt=h}break;case 30:break;default:Yn(n,i)}}function Ag(n){var r=n.alternate;r!==null&&(n.alternate=null,Ag(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&Xc(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ke=null,Ot=!1;function Kn(n,r,i){for(i=i.child;i!==null;)Tg(n,r,i),i=i.sibling}function Tg(n,r,i){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(Gs,i)}catch{}switch(i.tag){case 26:rt||Cn(i,r),Kn(n,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:rt||Cn(i,r);var l=Ke,d=Ot;Ma(i.type)&&(Ke=i.stateNode,Ot=!1),Kn(n,r,i),xi(i.stateNode),Ke=l,Ot=d;break;case 5:rt||Cn(i,r);case 6:if(l=Ke,d=Ot,Ke=null,Kn(n,r,i),Ke=l,Ot=d,Ke!==null)if(Ot)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(i.stateNode)}catch(h){Ue(i,r,h)}else try{Ke.removeChild(i.stateNode)}catch(h){Ue(i,r,h)}break;case 18:Ke!==null&&(Ot?(n=Ke,yy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,i.stateNode),ws(n)):yy(Ke,i.stateNode));break;case 4:l=Ke,d=Ot,Ke=i.stateNode.containerInfo,Ot=!0,Kn(n,r,i),Ke=l,Ot=d;break;case 0:case 11:case 14:case 15:Oa(2,i,r),rt||Oa(4,i,r),Kn(n,r,i);break;case 1:rt||(Cn(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&vg(i,r,l)),Kn(n,r,i);break;case 21:Kn(n,r,i);break;case 22:rt=(l=rt)||i.memoizedState!==null,Kn(n,r,i),rt=l;break;default:Kn(n,r,i)}}function Rg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ws(n)}catch(i){Ue(r,r.return,i)}}}function Cg(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ws(n)}catch(i){Ue(r,r.return,i)}}function tE(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Sg),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Sg),r;default:throw Error(s(435,n.tag))}}function dl(n,r){var i=tE(n);r.forEach(function(l){if(!i.has(l)){i.add(l);var d=uE.bind(null,n,l);l.then(d,d)}})}function xt(n,r){var i=r.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],h=n,v=r,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(Ma(_.type)){Ke=_.stateNode,Ot=!1;break e}break;case 5:Ke=_.stateNode,Ot=!1;break e;case 3:case 4:Ke=_.stateNode.containerInfo,Ot=!0;break e}_=_.return}if(Ke===null)throw Error(s(160));Tg(h,v,d),Ke=null,Ot=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Og(r,n),r=r.sibling}var sn=null;function Og(n,r){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:xt(r,n),kt(n),l&4&&(Oa(3,n,n.return),bi(3,n),Oa(5,n,n.return));break;case 1:xt(r,n),kt(n),l&512&&(rt||i===null||Cn(i,i.return)),l&64&&Wn&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(i=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=sn;if(xt(r,n),kt(n),l&512&&(rt||i===null||Cn(i,i.return)),l&4){var h=i!==null?i.memoizedState:null;if(l=n.memoizedState,i===null)if(l===null)if(n.stateNode===null){e:{l=n.type,i=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":h=d.getElementsByTagName("title")[0],(!h||h[Js]||h[ht]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(l),d.head.insertBefore(h,d.querySelector("head > title"))),yt(h,l,i),h[ht]=n,ct(h),l=h;break e;case"link":var v=Oy("link","href",d).get(l+(i.href||""));if(v){for(var _=0;_<v.length;_++)if(h=v[_],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(_,1);break t}}h=d.createElement(l),yt(h,l,i),d.head.appendChild(h);break;case"meta":if(v=Oy("meta","content",d).get(l+(i.content||""))){for(_=0;_<v.length;_++)if(h=v[_],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(_,1);break t}}h=d.createElement(l),yt(h,l,i),d.head.appendChild(h);break;default:throw Error(s(468,l))}h[ht]=n,ct(h),l=h}n.stateNode=l}else xy(d,n.type,n.stateNode);else n.stateNode=Cy(d,l,n.memoizedProps);else h!==l?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,l===null?xy(d,n.type,n.stateNode):Cy(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&bd(n,n.memoizedProps,i.memoizedProps)}break;case 27:xt(r,n),kt(n),l&512&&(rt||i===null||Cn(i,i.return)),i!==null&&l&4&&bd(n,n.memoizedProps,i.memoizedProps);break;case 5:if(xt(r,n),kt(n),l&512&&(rt||i===null||Cn(i,i.return)),n.flags&32){d=n.stateNode;try{Hr(d,"")}catch(te){Ue(n,n.return,te)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,bd(n,d,i!==null?i.memoizedProps:d)),l&1024&&(Sd=!0);break;case 6:if(xt(r,n),kt(n),l&4){if(n.stateNode===null)throw Error(s(162));l=n.memoizedProps,i=n.stateNode;try{i.nodeValue=l}catch(te){Ue(n,n.return,te)}}break;case 3:if(Cl=null,d=sn,sn=Tl(r.containerInfo),xt(r,n),sn=d,kt(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{ws(r.containerInfo)}catch(te){Ue(n,n.return,te)}Sd&&(Sd=!1,xg(n));break;case 4:l=sn,sn=Tl(n.stateNode.containerInfo),xt(r,n),kt(n),sn=l;break;case 12:xt(r,n),kt(n);break;case 31:xt(r,n),kt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,dl(n,l)));break;case 13:xt(r,n),kt(n),n.child.flags&8192&&n.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(hl=Pt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,dl(n,l)));break;case 22:d=n.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,M=Wn,B=rt;if(Wn=M||d,rt=B||C,xt(r,n),rt=B,Wn=M,kt(n),l&8192)e:for(r=n.stateNode,r._visibility=d?r._visibility&-2:r._visibility|1,d&&(i===null||C||Wn||rt||br(n)),i=null,r=n;;){if(r.tag===5||r.tag===26){if(i===null){C=i=r;try{if(h=C.stateNode,d)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=C.stateNode;var G=C.memoizedProps.style,P=G!=null&&G.hasOwnProperty("display")?G.display:null;_.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(te){Ue(C,C.return,te)}}}else if(r.tag===6){if(i===null){C=r;try{C.stateNode.nodeValue=d?"":C.memoizedProps}catch(te){Ue(C,C.return,te)}}}else if(r.tag===18){if(i===null){C=r;try{var I=C.stateNode;d?vy(I,!0):vy(C.stateNode,!1)}catch(te){Ue(C,C.return,te)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;i===r&&(i=null),r=r.return}i===r&&(i=null),r.sibling.return=r.return,r=r.sibling}l&4&&(l=n.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,dl(n,i))));break;case 19:xt(r,n),kt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,dl(n,l)));break;case 30:break;case 21:break;default:xt(r,n),kt(n)}}function kt(n){var r=n.flags;if(r&2){try{for(var i,l=n.return;l!==null;){if(wg(l)){i=l;break}l=l.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var d=i.stateNode,h=wd(n);ul(n,h,d);break;case 5:var v=i.stateNode;i.flags&32&&(Hr(v,""),i.flags&=-33);var _=wd(n);ul(n,_,v);break;case 3:case 4:var C=i.stateNode.containerInfo,M=wd(n);_d(n,M,C);break;default:throw Error(s(161))}}catch(B){Ue(n,n.return,B)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function xg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;xg(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Yn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Eg(n,r.alternate,r),r=r.sibling}function br(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Oa(4,r,r.return),br(r);break;case 1:Cn(r,r.return);var i=r.stateNode;typeof i.componentWillUnmount=="function"&&vg(r,r.return,i),br(r);break;case 27:xi(r.stateNode);case 26:case 5:Cn(r,r.return),br(r);break;case 22:r.memoizedState===null&&br(r);break;case 30:br(r);break;default:br(r)}n=n.sibling}}function Qn(n,r,i){for(i=i&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var l=r.alternate,d=n,h=r,v=h.flags;switch(h.tag){case 0:case 11:case 15:Qn(d,h,i),bi(4,h);break;case 1:if(Qn(d,h,i),l=h,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(M){Ue(l,l.return,M)}if(l=h,d=l.updateQueue,d!==null){var _=l.stateNode;try{var C=d.shared.hiddenCallbacks;if(C!==null)for(d.shared.hiddenCallbacks=null,d=0;d<C.length;d++)im(C[d],_)}catch(M){Ue(l,l.return,M)}}i&&v&64&&yg(h),wi(h,h.return);break;case 27:_g(h);case 26:case 5:Qn(d,h,i),i&&l===null&&v&4&&bg(h),wi(h,h.return);break;case 12:Qn(d,h,i);break;case 31:Qn(d,h,i),i&&v&4&&Rg(d,h);break;case 13:Qn(d,h,i),i&&v&4&&Cg(d,h);break;case 22:h.memoizedState===null&&Qn(d,h,i),wi(h,h.return);break;case 30:break;default:Qn(d,h,i)}r=r.sibling}}function Ed(n,r){var i=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==i&&(n!=null&&n.refCount++,i!=null&&ii(i))}function Ad(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ii(n))}function on(n,r,i,l){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)kg(n,r,i,l),r=r.sibling}function kg(n,r,i,l){var d=r.flags;switch(r.tag){case 0:case 11:case 15:on(n,r,i,l),d&2048&&bi(9,r);break;case 1:on(n,r,i,l);break;case 3:on(n,r,i,l),d&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&ii(n)));break;case 12:if(d&2048){on(n,r,i,l),n=r.stateNode;try{var h=r.memoizedProps,v=h.id,_=h.onPostCommit;typeof _=="function"&&_(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){Ue(r,r.return,C)}}else on(n,r,i,l);break;case 31:on(n,r,i,l);break;case 13:on(n,r,i,l);break;case 23:break;case 22:h=r.stateNode,v=r.alternate,r.memoizedState!==null?h._visibility&2?on(n,r,i,l):_i(n,r):h._visibility&2?on(n,r,i,l):(h._visibility|=2,cs(n,r,i,l,(r.subtreeFlags&10256)!==0||!1)),d&2048&&Ed(v,r);break;case 24:on(n,r,i,l),d&2048&&Ad(r.alternate,r);break;default:on(n,r,i,l)}}function cs(n,r,i,l,d){for(d=d&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var h=n,v=r,_=i,C=l,M=v.flags;switch(v.tag){case 0:case 11:case 15:cs(h,v,_,C,d),bi(8,v);break;case 23:break;case 22:var B=v.stateNode;v.memoizedState!==null?B._visibility&2?cs(h,v,_,C,d):_i(h,v):(B._visibility|=2,cs(h,v,_,C,d)),d&&M&2048&&Ed(v.alternate,v);break;case 24:cs(h,v,_,C,d),d&&M&2048&&Ad(v.alternate,v);break;default:cs(h,v,_,C,d)}r=r.sibling}}function _i(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=n,l=r,d=l.flags;switch(l.tag){case 22:_i(i,l),d&2048&&Ed(l.alternate,l);break;case 24:_i(i,l),d&2048&&Ad(l.alternate,l);break;default:_i(i,l)}r=r.sibling}}var Si=8192;function us(n,r,i){if(n.subtreeFlags&Si)for(n=n.child;n!==null;)jg(n,r,i),n=n.sibling}function jg(n,r,i){switch(n.tag){case 26:us(n,r,i),n.flags&Si&&n.memoizedState!==null&&BE(i,sn,n.memoizedState,n.memoizedProps);break;case 5:us(n,r,i);break;case 3:case 4:var l=sn;sn=Tl(n.stateNode.containerInfo),us(n,r,i),sn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Si,Si=16777216,us(n,r,i),Si=l):us(n,r,i));break;default:us(n,r,i)}}function Ng(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Ei(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];ut=l,Lg(l,n)}Ng(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Dg(n),n=n.sibling}function Dg(n){switch(n.tag){case 0:case 11:case 15:Ei(n),n.flags&2048&&Oa(9,n,n.return);break;case 3:Ei(n);break;case 12:Ei(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,fl(n)):Ei(n);break;default:Ei(n)}}function fl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];ut=l,Lg(l,n)}Ng(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Oa(8,r,r.return),fl(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,fl(r));break;default:fl(r)}n=n.sibling}}function Lg(n,r){for(;ut!==null;){var i=ut;switch(i.tag){case 0:case 11:case 15:Oa(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ii(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,ut=l;else e:for(i=n;ut!==null;){l=ut;var d=l.sibling,h=l.return;if(Ag(l),l===i){ut=null;break e}if(d!==null){d.return=h,ut=d;break e}ut=h}}}var nE={getCacheForType:function(n){var r=mt(tt),i=r.data.get(n);return i===void 0&&(i=n(),r.data.set(n,i)),i}
vendor: 4,174 bytes, line 9
9,cacheSignal:function(){return mt(tt).controller.signal}},aE=typeof WeakMap=="function"?WeakMap:Map,Me=0,qe=null,Ee=null,Re=0,Pe=0,Ht=null,xa=!1,ds=!1,Td=!1,Xn=0,Qe=0,ka=0,wr=0,Rd=0,Gt=0,fs=0,Ai=null,jt=null,Cd=!1,hl=0,Mg=0,pl=1/0,ml=null,ja=null,ot=0,Na=null,hs=null,Zn=0,Od=0,xd=null,Pg=null,Ti=0,kd=null;function Vt(){return(Me&2)!==0&&Re!==0?Re&-Re:U.T!==null?Pd():Xh()}function Ug(){if(Gt===0)if((Re&536870912)===0||Oe){var n=Eo;Eo<<=1,(Eo&3932160)===0&&(Eo=262144),Gt=n}else Gt=536870912;return n=Bt.current,n!==null&&(n.flags|=32),Gt}function Nt(n,r,i){(n===qe&&(Pe===2||Pe===9)||n.cancelPendingCommit!==null)&&(ps(n,0),Da(n,Re,Gt,!1)),Fs(n,i),((Me&2)===0||n!==qe)&&(n===qe&&((Me&2)===0&&(wr|=i),Qe===4&&Da(n,Re,Gt,!1)),On(n))}function Ig(n,r,i){if((Me&6)!==0)throw Error(s(327));var l=!i&&(r&127)===0&&(r&n.expiredLanes)===0||Vs(n,r),d=l?iE(n,r):Nd(n,r,!0),h=l;do{if(d===0){ds&&!l&&Da(n,r,0,!1);break}else{if(i=n.current.alternate,h&&!rE(i)){d=Nd(n,r,!1),h=!1;continue}if(d===2){if(h=r,n.errorRecoveryDisabledLanes&h)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var _=n;d=Ai;var C=_.current.memoizedState.isDehydrated;if(C&&(ps(_,v).flags|=256),v=Nd(_,v,!1),v!==2){if(Td&&!C){_.errorRecoveryDisabledLanes|=h,wr|=h,d=4;break e}h=jt,jt=d,h!==null&&(jt===null?jt=h:jt.push.apply(jt,h))}d=v}if(h=!1,d!==2)continue}}if(d===1){ps(n,0),Da(n,r,0,!0);break}e:{switch(l=n,h=d,h){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Da(l,r,Gt,!xa);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(d=hl+300-Pt(),10<d)){if(Da(l,r,Gt,!xa),To(l,0,!0)!==0)break e;Zn=r,l.timeoutHandle=my(zg.bind(null,l,i,jt,ml,Cd,r,Gt,wr,fs,xa,h,"Throttled",-0,0),d);break e}zg(l,i,jt,ml,Cd,r,Gt,wr,fs,xa,h,null,-0,0)}}break}while(!0);On(n)}function zg(n,r,i,l,d,h,v,_,C,M,B,G,P,I){if(n.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},jg(r,h,G);var te=(h&62914560)===h?hl-Pt():(h&4194048)===h?Mg-Pt():0;if(te=qE(G,te),te!==null){Zn=h,n.cancelPendingCommit=te(Jg.bind(null,n,r,h,i,l,d,v,_,C,B,G,null,P,I)),Da(n,h,v,!M);return}}Jg(n,r,h,i,l,d,v,_,C)}function rE(n){for(var r=n;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],h=d.getSnapshot;d=d.value;try{if(!zt(h(),d))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Da(n,r,i,l){r&=~Rd,r&=~wr,n.suspendedLanes|=r,n.pingedLanes&=~r,l&&(n.warmLanes|=r),l=n.expirationTimes;for(var d=r;0<d;){var h=31-It(d),v=1<<h;l[h]=-1,d&=~v}i!==0&&Kh(n,i,r)}function gl(){return(Me&6)===0?(Ri(0),!1):!0}function jd(){if(Ee!==null){if(Pe===0)var n=Ee.return;else n=Ee,qn=dr=null,Ju(n),rs=null,li=0,n=Ee;for(;n!==null;)gg(n.alternate,n),n=n.return;Ee=null}}function ps(n,r){var i=n.timeoutHandle;i!==-1&&(n.timeoutHandle=-1,AE(i)),i=n.cancelPendingCommit,i!==null&&(n.cancelPendingCommit=null,i()),Zn=0,jd(),qe=n,Ee=i=$n(n.current,null),Re=r,Pe=0,Ht=null,xa=!1,ds=Vs(n,r),Td=!1,fs=Gt=Rd=wr=ka=Qe=0,jt=Ai=null,Cd=!1,(r&8)!==0&&(r|=r&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=r;0<l;){var d=31-It(l),h=1<<d;r|=n[d],l&=~h}return Xn=r,Uo(),i}function $g(n,r){we=null,U.H=gi,r===as||r===Vo?(r=nm(),Pe=3):r===Mu?(r=nm(),Pe=4):Pe=r===cd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ht=r,Ee===null&&(Qe=1,sl(n,Yt(r,n.current)))}function Bg(){var n=Bt.current;return n===null?!0:(Re&4194048)===Re?en===null:(Re&62914560)===Re||(Re&536870912)!==0?n===en:!1}function qg(){var n=U.H;return U.H=gi,n===null?gi:n}function Hg(){var n=U.A;return U.A=nE,n}function yl(){Qe=4,xa||(Re&4194048)!==Re&&Bt.current!==null||(ds=!0),(ka&134217727)===0&&(wr&134217727)===0||qe===null||Da(qe,Re,Gt,!1)}function Nd(n,r,i){var l=Me;Me|=2;var d=qg(),h=Hg();(qe!==n||Re!==r)&&(ml=null,ps(n,r)),r=!1;var v=Qe;
vendor: 4,128 bytes, line 9
9e:do try{if(Pe!==0&&Ee!==null){var _=Ee,C=Ht;switch(Pe){case 8:jd(),v=6;break e;case 3:case 2:case 9:case 6:Bt.current===null&&(r=!0);var M=Pe;if(Pe=0,Ht=null,ms(n,_,C,M),i&&ds){v=0;break e}break;default:M=Pe,Pe=0,Ht=null,ms(n,_,C,M)}}sE(),v=Qe;break}catch(B){$g(n,B)}while(!0);return r&&n.shellSuspendCounter++,qn=dr=null,Me=l,U.H=d,U.A=h,Ee===null&&(qe=null,Re=0,Uo()),v}function sE(){for(;Ee!==null;)Gg(Ee)}function iE(n,r){var i=Me;Me|=2;var l=qg(),d=Hg();qe!==n||Re!==r?(ml=null,pl=Pt()+500,ps(n,r)):ds=Vs(n,r);e:do try{if(Pe!==0&&Ee!==null){r=Ee;var h=Ht;t:switch(Pe){case 1:Pe=0,Ht=null,ms(n,r,h,1);break;case 2:case 9:if(em(h)){Pe=0,Ht=null,Vg(r);break}r=function(){Pe!==2&&Pe!==9||qe!==n||(Pe=7),On(n)},h.then(r,r);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:em(h)?(Pe=0,Ht=null,Vg(r)):(Pe=0,Ht=null,ms(n,r,h,7));break;case 5:var v=null;switch(Ee.tag){case 26:v=Ee.memoizedState;case 5:case 27:var _=Ee;if(v?ky(v):_.stateNode.complete){Pe=0,Ht=null;var C=_.sibling;if(C!==null)Ee=C;else{var M=_.return;M!==null?(Ee=M,vl(M)):Ee=null}break t}}Pe=0,Ht=null,ms(n,r,h,5);break;case 6:Pe=0,Ht=null,ms(n,r,h,6);break;case 8:jd(),Qe=6;break e;default:throw Error(s(462))}}oE();break}catch(B){$g(n,B)}while(!0);return qn=dr=null,U.H=l,U.A=d,Me=i,Ee!==null?0:(qe=null,Re=0,Uo(),Qe)}function oE(){for(;Ee!==null&&!k_();)Gg(Ee)}function Gg(n){var r=pg(n.alternate,n,Xn);n.memoizedProps=n.pendingProps,r===null?vl(n):Ee=r}function Vg(n){var r=n,i=r.alternate;switch(r.tag){case 15:case 0:r=lg(i,r,r.pendingProps,r.type,void 0,Re);break;case 11:r=lg(i,r,r.pendingProps,r.type.render,r.ref,Re);break;case 5:Ju(r);default:gg(i,r),r=Ee=Hp(r,Xn),r=pg(i,r,Xn)}n.memoizedProps=n.pendingProps,r===null?vl(n):Ee=r}function ms(n,r,i,l){qn=dr=null,Ju(r),rs=null,li=0;var d=r.return;try{if(KS(n,d,r,i,Re)){Qe=1,sl(n,Yt(i,n.current)),Ee=null;return}}catch(h){if(d!==null)throw Ee=d,h;Qe=1,sl(n,Yt(i,n.current)),Ee=null;return}r.flags&32768?(Oe||l===1?n=!0:ds||(Re&536870912)!==0?n=!1:(xa=n=!0,(l===2||l===9||l===3||l===6)&&(l=Bt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Fg(r,n)):vl(r)}function vl(n){var r=n;do{if((r.flags&32768)!==0){Fg(r,xa);return}n=r.return;var i=XS(r.alternate,r,Xn);if(i!==null){Ee=i;return}if(r=r.sibling,r!==null){Ee=r;return}Ee=r=n}while(r!==null);Qe===0&&(Qe=5)}function Fg(n,r){do{var i=ZS(n.alternate,n);if(i!==null){i.flags&=32767,Ee=i;return}if(i=n.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(n=n.sibling,n!==null)){Ee=n;return}Ee=n=i}while(n!==null);Qe=6,Ee=null}function Jg(n,r,i,l,d,h,v,_,C){n.cancelPendingCommit=null;do bl();while(ot!==0);if((Me&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(h=r.lanes|r.childLanes,h|=wu,$_(n,i,h,v,_,C),n===qe&&(Ee=qe=null,Re=0),hs=r,Na=n,Zn=i,Od=h,xd=d,Pg=l,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,dE(_o,function(){return Xg(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,d=Y.p,Y.p=2,v=Me,Me|=4;try{eE(n,r,i)}finally{Me=v,Y.p=d,U.T=l}}ot=1,Wg(),Kg(),Yg()}}function Wg(){if(ot===1){ot=0;var n=Na,r=hs,i=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var l=Y.p;Y.p=2;var d=Me;Me|=4;try{Og(r,n);var h=Gd,v=Lp(n.containerInfo),_=h.focusedElem,C=h.selectionRange;if(v!==_&&_&&_.ownerDocument&&Dp(_.ownerDocument.documentElement,_)){if(C!==null&&mu(_)){var M=C.start,B=C.end;if(B===void 0&&(B=M),"selectionStart"in _)_.selectionStart=M,_.selectionEnd=Math.min(B,_.value.length);else{var G=_.ownerDocument||document,P=G&&G.defaultView||window;if(P.getSelection){var I=P.getSelection(),te=_.textContent.length,me=Math.min(C.start,te),$e=C.end===void 0?me:Math.min(C.end,te);!I.extend&&me>$e&&(v=$e,$e=me,me=v);var N=Np(_,me),O=Np(_,$e);if(N&&O&&(I.rangeCount!==1||I.anchorNode!==N.node||I.anchorOffset!==N.offset||I.focusNode!==O.node||I.focusOffset!==O.offset)){var L=G.createRange();L.setStart(N.node,N.offset),I.removeAllRanges(),me>$e?(I.addRange(L),I.extend(O.node,O.offset)):(L.setEnd(O.node,O.offset),I.addRange(L))}}}}for(G=[],I=_;I=I.parentNode;
vendor: 16,631 bytes, lines 9-10
9)I.nodeType===1&&G.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<G.length;_++){var q=G[_];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}jl=!!Hd,Gd=Hd=null}finally{Me=d,Y.p=l,U.T=i}}n.current=r,ot=2}}function Kg(){if(ot===2){ot=0;var n=Na,r=hs,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var l=Y.p;Y.p=2;var d=Me;Me|=4;try{Eg(n,r.alternate,r)}finally{Me=d,Y.p=l,U.T=i}}ot=3}}function Yg(){if(ot===4||ot===3){ot=0,j_();var n=Na,r=hs,i=Zn,l=Pg;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?ot=5:(ot=0,hs=Na=null,Qg(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(ja=null),Yc(i),r=r.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(Gs,r,void 0,(r.current.flags&128)===128)}catch{}if(l!==null){r=U.T,d=Y.p,Y.p=2,U.T=null;try{for(var h=n.onRecoverableError,v=0;v<l.length;v++){var _=l[v];h(_.value,{componentStack:_.stack})}}finally{U.T=r,Y.p=d}}(Zn&3)!==0&&bl(),On(n),d=n.pendingLanes,(i&261930)!==0&&(d&42)!==0?n===kd?Ti++:(Ti=0,kd=n):Ti=0,Ri(0)}}function Qg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,ii(r)))}function bl(){return Wg(),Kg(),Yg(),Xg()}function Xg(){if(ot!==5)return!1;var n=Na,r=Od;Od=0;var i=Yc(Zn),l=U.T,d=Y.p;try{Y.p=32>i?32:i,U.T=null,i=xd,xd=null;var h=Na,v=Zn;if(ot=0,hs=Na=null,Zn=0,(Me&6)!==0)throw Error(s(331));var _=Me;if(Me|=4,Dg(h.current),kg(h,h.current,v,i),Me=_,Ri(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(Gs,h)}catch{}return!0}finally{Y.p=d,U.T=l,Qg(n,r)}}function Zg(n,r,i){r=Yt(i,r),r=ld(n.stateNode,r,2),n=Ta(n,r,2),n!==null&&(Fs(n,2),On(n))}function Ue(n,r,i){if(n.tag===3)Zg(n,n,i);else for(;r!==null;){if(r.tag===3){Zg(r,n,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ja===null||!ja.has(l))){n=Yt(i,n),i=eg(2),l=Ta(r,i,2),l!==null&&(tg(i,l,r,n),Fs(l,2),On(l));break}}r=r.return}}function Dd(n,r,i){var l=n.pingCache;if(l===null){l=n.pingCache=new aE;var d=new Set;l.set(r,d)}else d=l.get(r),d===void 0&&(d=new Set,l.set(r,d));d.has(i)||(Td=!0,d.add(i),n=lE.bind(null,n,r,i),r.then(n,n))}function lE(n,r,i){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&i,n.warmLanes&=~i,qe===n&&(Re&i)===i&&(Qe===4||Qe===3&&(Re&62914560)===Re&&300>Pt()-hl?(Me&2)===0&&ps(n,0):Rd|=i,fs===Re&&(fs=0)),On(n)}function ey(n,r){r===0&&(r=Wh()),n=lr(n,r),n!==null&&(Fs(n,r),On(n))}function cE(n){var r=n.memoizedState,i=0;r!==null&&(i=r.retryLane),ey(n,i)}function uE(n,r){var i=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(r),ey(n,i)}function dE(n,r){return Fc(n,r)}var wl=null,gs=null,Ld=!1,_l=!1,Md=!1,La=0;function On(n){n!==gs&&n.next===null&&(gs===null?wl=gs=n:gs=gs.next=n),_l=!0,Ld||(Ld=!0,hE())}function Ri(n,r){if(!Md&&_l){Md=!0;do for(var i=!1,l=wl;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var h=0;else{var v=l.suspendedLanes,_=l.pingedLanes;h=(1<<31-It(42|n)+1)-1,h&=d&~(v&~_),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,ry(l,h))}else h=Re,h=To(l,l===qe?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||Vs(l,h)||(i=!0,ry(l,h));l=l.next}while(i);Md=!1}}function fE(){ty()}function ty(){_l=Ld=!1;var n=0;La!==0&&EE()&&(n=La);for(var r=Pt(),i=null,l=wl;l!==null;){var d=l.next,h=ny(l,r);h===0?(l.next=null,i===null?wl=d:i.next=d,d===null&&(gs=i)):(i=l,(n!==0||(h&3)!==0)&&(_l=!0)),l=d}ot!==0&&ot!==5||Ri(n),La!==0&&(La=0)}function ny(n,r){for(var i=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var v=31-It(h),_=1<<v,C=d[v];C===-1?((_&i)===0||(_&l)!==0)&&(d[v]=z_(_,r)):C<=r&&(n.expiredLanes|=_),h&=~_}if(r=qe,i=Re,i=To(n,n===r?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,i===0||n===r&&(Pe===2||Pe===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Jc(l),n.callbackNode=null,n.callbackPriority=0;if((i&3)===0||Vs(n,i)){if(r=i&-i,r===n.callbackPriority)return r;switch(l!==null&&Jc(l),Yc(i)){case 2:case 8:i=Fh;break;case 32:i=_o;break;case 268435456:i=Jh;break;default:i=_o}return l=ay.bind(null,n),i=Fc(i,l),n.callbackPriority=r,n.callbackNode=i,r}return l!==null&&l!==null&&Jc(l),n.callbackPriority=2,n.callbackNode=null,2}function ay(n,r){if(ot!==0&&ot!==5)return n.callbackNode=null,n.callbackPriority=0,null;var i=n.callbackNode;if(bl()&&n.callbackNode!==i)return null;var l=Re;return l=To(n,n===qe?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(Ig(n,l,r),ny(n,Pt()),n.callbackNode!=null&&n.callbackNode===i?ay.bind(null,n):null)}function ry(n,r){if(bl())return null;Ig(n,r,!0)}function hE(){TE(function(){(Me&6)!==0?Fc(Vh,fE):ty()})}function Pd(){if(La===0){var n=ts;n===0&&(n=So,So<<=1,(So&261888)===0&&(So=256)),La=n}return La}function sy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:xo(""+n)}function iy(n,r){var i=r.ownerDocument.createElement("input");return i.name=r.name,i.value=r.value,n.id&&i.setAttribute("form",n.id),r.parentNode.insertBefore(i,r),n=new FormData(n),i.parentNode.removeChild(i),n}function pE(n,r,i,l,d){if(r==="submit"&&i&&i.stateNode===d){var h=sy((d[Rt]||null).action),v=l.submitter;v&&(r=(r=v[Rt]||null)?sy(r.formAction):v.getAttribute("formAction"),r!==null&&(h=r,v=null));var _=new Do("action","action",null,l,d);n.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(La!==0){var C=v?iy(d,v):new FormData(d);nd(i,{pending:!0,data:C,method:d.method,action:h},null,C)}}else typeof h=="function"&&(_.preventDefault(),C=v?iy(d,v):new FormData(d),nd(i,{pending:!0,data:C,method:d.method,action:h},h,C))},currentTarget:d}]})}}for(var Ud=0;Ud<bu.length;Ud++){var Id=bu[Ud],mE=Id.toLowerCase(),gE=Id[0].toUpperCase()+Id.slice(1);rn(mE,"on"+gE)}rn(Up,"onAnimationEnd"),rn(Ip,"onAnimationIteration"),rn(zp,"onAnimationStart"),rn("dblclick","onDoubleClick"),rn("focusin","onFocus"),rn("focusout","onBlur"),rn(NS,"onTransitionRun"),rn(DS,"onTransitionStart"),rn(LS,"onTransitionCancel"),rn($p,"onTransitionEnd"),Br("onMouseEnter",["mouseout","mouseover"]),Br("onMouseLeave",["mouseout","mouseover"]),Br("onPointerEnter",["pointerout","pointerover"]),Br("onPointerLeave",["pointerout","pointerover"]),rr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rr("onBeforeInput",["compositionend","keypress","textInput","paste"]),rr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),yE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function oy(n,r){r=(r&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],d=l.event;l=l.listeners;e:{var h=void 0;if(r)for(var v=l.length-1;0<=v;v--){var _=l[v],C=_.instance,M=_.currentTarget;if(_=_.listener,C!==h&&d.isPropagationStopped())break e;h=_,d.currentTarget=M;try{h(d)}catch(B){Po(B)}d.currentTarget=null,h=C}else for(v=0;v<l.length;v++){if(_=l[v],C=_.instance,M=_.currentTarget,_=_.listener,C!==h&&d.isPropagationStopped())break e;h=_,d.currentTarget=M;try{h(d)}catch(B){Po(B)}d.currentTarget=null,h=C}}}}function Ae(n,r){var i=r[Qc];i===void 0&&(i=r[Qc]=new Set);var l=n+"__bubble";i.has(l)||(ly(r,n,2,!1),i.add(l))}function zd(n,r,i){var l=0;r&&(l|=4),ly(i,n,l,r)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function $d(n){if(!n[Sl]){n[Sl]=!0,tp.forEach(function(i){i!=="selectionchange"&&(yE.has(i)||zd(i,!1,n),zd(i,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Sl]||(r[Sl]=!0,zd("selectionchange",!1,r))}}function ly(n,r,i,l){switch(Uy(r)){case 2:var d=VE;break;case 8:d=FE;break;default:d=tf}i=d.bind(null,r,i,n),d=void 0,!iu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(r,i,{capture:!0,passive:d}):n.addEventListener(r,i,!0):d!==void 0?n.addEventListener(r,i,{passive:d}):n.addEventListener(r,i,!1)}function Bd(n,r,i,l,d){var h=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var _=l.stateNode.containerInfo;if(_===d)break;if(v===4)for(v=l.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;_!==null;){if(v=Ir(_),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){l=h=v;continue e}_=_.parentNode}}l=l.return}hp(function(){var M=h,B=ru(i),G=[];e:{var P=Bp.get(n);if(P!==void 0){var I=Do,te=n;switch(n){case"keypress":if(jo(i)===0)break e;case"keydown":case"keyup":I=uS;break;case"focusin":te="focus",I=uu;break;case"focusout":te="blur",I=uu;break;case"beforeblur":case"afterblur":I=uu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=gp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=X_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=hS;break;case Up:case Ip:case zp:I=tS;break;case $p:I=mS;break;case"scroll":case"scrollend":I=Y_;break;case"wheel":I=yS;break;case"copy":case"cut":case"paste":I=aS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=vp;break;case"toggle":case"beforetoggle":I=bS}var me=(r&4)!==0,$e=!me&&(n==="scroll"||n==="scrollend"),N=me?P!==null?P+"Capture":null:P;me=[];for(var O=M,L;O!==null;){var q=O;if(L=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||L===null||N===null||(q=Ks(O,N),q!=null&&me.push(Oi(O,q,L))),$e)break;O=O.return}0<me.length&&(P=new I(P,te,null,i,B),G.push({event:P,listeners:me}))}}if((r&7)===0){e:{if(P=n==="mouseover"||n==="pointerover",I=n==="mouseout"||n==="pointerout",P&&i!==au&&(te=i.relatedTarget||i.fromElement)&&(Ir(te)||te[Ur]))break e;if((I||P)&&(P=B.window===B?B:(P=B.ownerDocument)?P.defaultView||P.parentWindow:window,I?(te=i.relatedTarget||i.toElement,I=M,te=te?Ir(te):null,te!==null&&($e=c(te),me=te.tag,te!==$e||me!==5&&me!==27&&me!==6)&&(te=null)):(I=null,te=M),I!==te)){if(me=gp,q="onMouseLeave",N="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(me=vp,q="onPointerLeave",N="onPointerEnter",O="pointer"),$e=I==null?P:Ws(I),L=te==null?P:Ws(te),P=new me(q,O+"leave",I,i,B),P.target=$e,P.relatedTarget=L,q=null,Ir(B)===M&&(me=new me(N,O+"enter",te,i,B),me.target=L,me.relatedTarget=$e,q=me),$e=q,I&&te)t:{for(me=vE,N=I,O=te,L=0,q=N;q;q=me(q))L++;q=0;for(var de=O;de;de=me(de))q++;for(;0<L-q;)N=me(N),L--;for(;0<q-L;)O=me(O),q--;for(;L--;){if(N===O||O!==null&&N===O.alternate){me=N;break t}N=me(N),O=me(O)}me=null}else me=null;I!==null&&cy(G,P,I,me,!1),te!==null&&$e!==null&&cy(G,$e,te,me,!0)}}e:{if(P=M?Ws(M):window,I=P.nodeName&&P.nodeName.toLowerCase(),I==="select"||I==="input"&&P.type==="file")var je=Rp;else if(Ap(P))if(Cp)je=xS;else{je=CS;var re=RS}else I=P.nodeName,!I||I.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?M&&nu(M.elementType)&&(je=Rp):je=OS;if(je&&(je=je(n,M))){Tp(G,je,i,B);break e}re&&re(n,P,M),n==="focusout"&&M&&P.type==="number"&&M.memoizedProps.value!=null&&tu(P,"number",P.value)}switch(re=M?Ws(M):window,n){case"focusin":(Ap(re)||re.contentEditable==="true")&&(Jr=re,gu=M,ai=null);break;case"focusout":ai=gu=Jr=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,Mp(G,i,B);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":Mp(G,i,B)}var _e;if(fu)e:{switch(n){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Fr?Sp(n,i)&&(Ce="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Ce="onCompositionStart");Ce&&(bp&&i.locale!=="ko"&&(Fr||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Fr&&(_e=pp()):(va=B,ou="value"in va?va.value:va.textContent,Fr=!0)),re=El(M,Ce),0<re.length&&(Ce=new yp(Ce,n,null,i,B),G.push({event:Ce,listeners:re}),_e?Ce.data=_e:(_e=Ep(i),_e!==null&&(Ce.data=_e)))),(_e=_S?SS(n,i):ES(n,i))&&(Ce=El(M,"onBeforeInput"),0<Ce.length&&(re=new yp("onBeforeInput","beforeinput",null,i,B),G.push({event:re,listeners:Ce}),re.data=_e)),pE(G,n,M,i,B)}oy(G,r)})}function Oi(n,r,i){return{instance:n,listener:r,currentTarget:i}}function El(n,r){for(var i=r+"Capture",l=[];n!==null;){var d=n,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=Ks(n,i),d!=null&&l.unshift(Oi(n,d,h)),d=Ks(n,r),d!=null&&l.push(Oi(n,d,h))),n.tag===3)return l;n=n.return}return[]}function vE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function cy(n,r,i,l,d){for(var h=r._reactName,v=[];i!==null&&i!==l;){var _=i,C=_.alternate,M=_.stateNode;if(_=_.tag,C!==null&&C===l)break;_!==5&&_!==26&&_!==27||M===null||(C=M,d?(M=Ks(i,h),M!=null&&v.unshift(Oi(i,M,C))):d||(M=Ks(i,h),M!=null&&v.push(Oi(i,M,C)))),i=i.return}v.length!==0&&n.push({event:r,listeners:v})}var bE=/\r\n?/g,wE=/\u0000|\uFFFD/g;function uy(n){return(typeof n=="string"?n:""+n).replace(bE,`
10`).replace(wE,"")}function dy(n,r){return r=uy(r),uy(n)===r}function ze(n,r,i,l,d,h){switch(i){case"children":typeof l=="string"?r==="body"||r==="textarea"&&l===""||Hr(n,l):(typeof l=="number"||typeof l=="bigint")&&r!=="body"&&Hr(n,""+l);break;case"className":Co(n,"class",l);break;case"tabIndex":Co(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Co(n,i,l);break;case"style":dp(n,l,h);break;case"data":if(r!=="object"){Co(n,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){n.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=xo(""+l),n.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(i==="formAction"?(r!=="input"&&ze(n,r,"name",d.name,d,null),ze(n,r,"formEncType",d.formEncType,d,null),ze(n,r,"formMethod",d.formMethod,d,null),ze(n,r,"formTarget",d.formTarget,d,null)):(ze(n,r,"encType",d.encType,d,null),ze(n,r,"method",d.method,d,null),ze(n,r,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(i);break}l=xo(""+l),n.setAttribute(i,l);break;case"onClick":l!=null&&(n.onclick=In);break;case"onScroll":l!=null&&Ae("scroll",n);break;case"onScrollEnd":l!=null&&Ae("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}i=xo(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""+l):n.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,""):n.removeAttribute(i);break;case"capture":case"download":l===!0?n.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(i,l):n.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(i,l):n.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(i):n.setAttribute(i,l);break;case"popover":Ae("beforetoggle",n),Ae("toggle",n),Ro(n,"popover",l);break;case"xlinkActuate":Un(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Un(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Un(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Un(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Un(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Un(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Un(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Un(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Un(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ro(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=W_.get(i)||i,Ro(n,i,l))}}function qd(n,r,i,l,d,h){switch(i){case"style":dp(n,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=i}}break;case"children":typeof l=="string"?Hr(n,l):(typeof l=="number"||typeof l=="bigint")&&Hr(n,""+l);break;case"onScroll":l!=null&&Ae("scroll",n);break;case"onScrollEnd":l!=null&&Ae("scrollend",n);break;case"onClick":l!=null&&(n.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!np.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),r=i.slice(2,d?i.length-7:void 0),h=n[Rt]||null,h=h!=null?h[i]:null,typeof h=="function"&&n.removeEventListener(r,h,d),typeof l=="function")){typeof h!="function"&&h!==null&&(i in n?n[i]=null:n.hasAttribute(i)&&n.removeAttribute(i)),n.addEventListener(r,l,d);break e}i in n?n[i]=l:l===!0?n.setAttribute(i,""):Ro(n,i,l)}}}function yt(n,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",n),Ae("load",n);var l=!1,d=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ze(n,r,h,v,i,null)}}d&&ze(n,r,"srcSet",i.srcSet,i,null),l&&ze(n,r,"src",i.src,i,null);return;case"input":Ae("invalid",n);var _=h=v=d=null,C=null,M=null;for(l in i)if(i.hasOwnProperty(l)){var B=i[l];if(B!=null)switch(l){case"name":d=B;break;case"type":v=B;break;case"checked":C=B;break;case"defaultChecked":M=B;break;case"value":h=B;break;case"defaultValue":_=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,r));break;default:ze(n,r,l,B,i,null)}}op(n,h,_,C,M,v,d,!1);return;case"select":Ae("invalid",n),l=v=h=null;for(d in i)if(i.hasOwnProperty(d)&&(_=i[d],_!=null))switch(d){case"value":h=_;break;case"defaultValue":v=_;break;case"multiple":l=_;default:ze(n,r,d,_,i,null)}r=h,i=v,n.multiple=!!l,r!=null?qr(n,!!l,r,!1):i!=null&&qr(n,!!l,i,!0);return;case"textarea":Ae("invalid",n),h=d=l=null;for(v in i)if(i.hasOwnProperty(v)&&(_=i[v],_!=null))switch(v){case"value":l=_;break;case"defaultValue":d=_;break;case"children":h=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:ze(n,r,v,_,i,null)}cp(n,l,d,h);return;case"option":for(C in i)i.hasOwnProperty(C)&&(l=i[C],l!=null)&&(C==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":ze(n,r,C,l,i,null));return;case"dialog":Ae("beforetoggle",n),Ae("toggle",n),Ae("cancel",n),Ae("close",n);break;case"iframe":case"object":Ae("load",n);break;case"video":case"audio":for(l=0;l<Ci.length;l++)Ae(Ci[l],n);break;case"image":Ae("error",n),Ae("load",n);break;case"details":Ae("toggle",n);break;case"embed":case"source":case"link":Ae("error",n),Ae("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in i)if(i.hasOwnProperty(M)&&(l=i[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ze(n,r,M,l,i,null)}return;default:if(nu(r)){for(B in i)i.hasOwnProperty(B)&&(l=i[B],l!==void 0&&qd(n,r,B,l,i,void 0));return}}for(_ in i)i.hasOwnProperty(_)&&(l=i[_],l!=null&&ze(n,r,_,l,i,null))}function _E(n,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,v=null,_=null,C=null,M=null,B=null;for(I in i){var G=i[I];if(i.hasOwnProperty(I)&&G!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":C=G;default:l.hasOwnProperty(I)||ze(n,r,I,null,l,G)}}for(var P in l){var I=l[P];if(G=i[P],l.hasOwnProperty(P)&&(I!=null||G!=null))switch(P){case"type":h=I;break;case"name":d=I;break;case"checked":M=I;break;case"defaultChecked":B=I;break;case"value":v=I;break;case"defaultValue":_=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(s(137,r));break;default:I!==G&&ze(n,r,P,I,l,G)}}eu(n,v,_,C,M,B,h,d);return;case"select":I=v=_=P=null;for(h in i)if(C=i[h],i.hasOwnProperty(h)&&C!=null)switch(h){case"value":break;case"multiple":I=C;default:l.hasOwnProperty(h)||ze(n,r,h,null,l,C)}for(d in l)if(h=l[d],C=i[d],l.hasOwnProperty(d)&&(h!=null||C!=null))switch(d){case"value":P=h;break;case"defaultValue":_=h;break;case"multiple":v=h;default:h!==C&&ze(n,r,d,h,l,C)}r=_,i=v,l=I,P!=null?qr(n,!!i,P,!1):!!l!=!!i&&(r!=null?qr(n,!!i,r,!0):qr(n,!!i,i?[]:"",!1));return;
vendor: 6,672 bytes, line 10
10case"textarea":I=P=null;for(_ in i)if(d=i[_],i.hasOwnProperty(_)&&d!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ze(n,r,_,null,l,d)}for(v in l)if(d=l[v],h=i[v],l.hasOwnProperty(v)&&(d!=null||h!=null))switch(v){case"value":P=d;break;case"defaultValue":I=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==h&&ze(n,r,v,d,l,h)}lp(n,P,I);return;case"option":for(var te in i)P=i[te],i.hasOwnProperty(te)&&P!=null&&!l.hasOwnProperty(te)&&(te==="selected"?n.selected=!1:ze(n,r,te,null,l,P));for(C in l)P=l[C],I=i[C],l.hasOwnProperty(C)&&P!==I&&(P!=null||I!=null)&&(C==="selected"?n.selected=P&&typeof P!="function"&&typeof P!="symbol":ze(n,r,C,P,l,I));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in i)P=i[me],i.hasOwnProperty(me)&&P!=null&&!l.hasOwnProperty(me)&&ze(n,r,me,null,l,P);for(M in l)if(P=l[M],I=i[M],l.hasOwnProperty(M)&&P!==I&&(P!=null||I!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(137,r));break;default:ze(n,r,M,P,l,I)}return;default:if(nu(r)){for(var $e in i)P=i[$e],i.hasOwnProperty($e)&&P!==void 0&&!l.hasOwnProperty($e)&&qd(n,r,$e,void 0,l,P);for(B in l)P=l[B],I=i[B],!l.hasOwnProperty(B)||P===I||P===void 0&&I===void 0||qd(n,r,B,P,l,I);return}}for(var N in i)P=i[N],i.hasOwnProperty(N)&&P!=null&&!l.hasOwnProperty(N)&&ze(n,r,N,null,l,P);for(G in l)P=l[G],I=i[G],!l.hasOwnProperty(G)||P===I||P==null&&I==null||ze(n,r,G,P,l,I)}function fy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function SE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],h=d.transferSize,v=d.initiatorType,_=d.duration;if(h&&_&&fy(v)){for(v=0,_=d.responseEnd,l+=1;l<i.length;l++){var C=i[l],M=C.startTime;if(M>_)break;var B=C.transferSize,G=C.initiatorType;B&&fy(G)&&(C=C.responseEnd,v+=B*(C<_?1:(_-M)/(C-M)))}if(--l,r+=8*(h+v)/(d.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Hd=null,Gd=null;function Al(n){return n.nodeType===9?n:n.ownerDocument}function hy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function py(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Vd(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Fd=null;function EE(){var n=window.event;return n&&n.type==="popstate"?n===Fd?!1:(Fd=n,!0):(Fd=null,!1)}var my=typeof setTimeout=="function"?setTimeout:void 0,AE=typeof clearTimeout=="function"?clearTimeout:void 0,gy=typeof Promise=="function"?Promise:void 0,TE=typeof queueMicrotask=="function"?queueMicrotask:typeof gy<"u"?function(n){return gy.resolve(null).then(n).catch(RE)}:my;function RE(n){setTimeout(function(){throw n})}function Ma(n){return n==="head"}function yy(n,r){var i=r,l=0;do{var d=i.nextSibling;if(n.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){n.removeChild(d),ws(r);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")xi(n.ownerDocument.documentElement);else if(i==="head"){i=n.ownerDocument.head,xi(i);for(var h=i.firstChild;h;){var v=h.nextSibling,_=h.nodeName;h[Js]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&xi(n.ownerDocument.body);i=d}while(i);ws(r)}function vy(n,r){var i=n;n=0;do{var l=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(n===0)break;n--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||n++;i=l}while(i)}function Jd(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Jd(i),Xc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}n.removeChild(i)}}function CE(n,r,i,l){for(;n.nodeType===1;){var d=i;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[Js])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=tn(n.nextSibling),n===null)break}return null}function OE(n,r,i){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=tn(n.nextSibling),n===null))return null;return n}function by(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=tn(n.nextSibling),n===null))return null;return n}function Wd(n){return n.data==="$?"||n.data==="$~"}function Kd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function xE(n,r){var i=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||i.readyState!=="loading")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function tn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;
vendor: 5,062 bytes, line 10
10if(r==="/$"||r==="/&")return null}}return n}var Yd=null;function wy(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"||i==="/&"){if(r===0)return tn(n.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}n=n.nextSibling}return null}function _y(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return n;r--}else i!=="/$"&&i!=="/&"||r++}n=n.previousSibling}return null}function Sy(n,r,i){switch(r=Al(i),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function xi(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);Xc(n)}var nn=new Map,Ey=new Set;function Tl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ea=Y.d;Y.d={f:kE,r:jE,D:NE,C:DE,L:LE,m:ME,X:UE,S:PE,M:IE};function kE(){var n=ea.f(),r=gl();return n||r}function jE(n){var r=zr(n);r!==null&&r.tag===5&&r.type==="form"?$m(r):ea.r(n)}var ys=typeof document>"u"?null:document;function Ay(n,r,i){var l=ys;if(l&&typeof r=="string"&&r){var d=Wt(r);d='link[rel="'+n+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Ey.has(d)||(Ey.add(d),n={rel:n,crossOrigin:i,href:r},l.querySelector(d)===null&&(r=l.createElement("link"),yt(r,"link",n),ct(r),l.head.appendChild(r)))}}function NE(n){ea.D(n),Ay("dns-prefetch",n,null)}function DE(n,r){ea.C(n,r),Ay("preconnect",n,r)}function LE(n,r,i){ea.L(n,r,i);var l=ys;if(l&&n&&r){var d='link[rel="preload"][as="'+Wt(r)+'"]';r==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+Wt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+Wt(i.imageSizes)+'"]')):d+='[href="'+Wt(n)+'"]';var h=d;switch(r){case"style":h=vs(n);break;case"script":h=bs(n)}nn.has(h)||(n=g({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:n,as:r},i),nn.set(h,n),l.querySelector(d)!==null||r==="style"&&l.querySelector(ki(h))||r==="script"&&l.querySelector(ji(h))||(r=l.createElement("link"),yt(r,"link",n),ct(r),l.head.appendChild(r)))}}function ME(n,r){ea.m(n,r);var i=ys;if(i&&n){var l=r&&typeof r.as=="string"?r.as:"script",d='link[rel="modulepreload"][as="'+Wt(l)+'"][href="'+Wt(n)+'"]',h=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=bs(n)}if(!nn.has(h)&&(n=g({rel:"modulepreload",href:n},r),nn.set(h,n),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ji(h)))return}l=i.createElement("link"),yt(l,"link",n),ct(l),i.head.appendChild(l)}}}function PE(n,r,i){ea.S(n,r,i);var l=ys;if(l&&n){var d=$r(l).hoistableStyles,h=vs(n);r=r||"default";var v=d.get(h);if(!v){var _={loading:0,preload:null};if(v=l.querySelector(ki(h)))_.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":r},i),(i=nn.get(h))&&Qd(n,i);var C=v=l.createElement("link");ct(C),yt(C,"link",n),C._p=new Promise(function(M,B){C.onload=M,C.onerror=B}),C.addEventListener("load",function(){_.loading|=1}),C.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Rl(v,r,l)}v={type:"stylesheet",instance:v,count:1,state:_},d.set(h,v)}}}function UE(n,r){ea.X(n,r);var i=ys;if(i&&n){var l=$r(i).hoistableScripts,d=bs(n),h=l.get(d);h||(h=i.querySelector(ji(d)),h||(n=g({src:n,async:!0},r),(r=nn.get(d))&&Xd(n,r),h=i.createElement("script"),ct(h),yt(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function IE(n,r){ea.M(n,r);var i=ys;if(i&&n){var l=$r(i).hoistableScripts,d=bs(n),h=l.get(d);h||(h=i.querySelector(ji(d)),h||(n=g({src:n,async:!0,type:"module"},r),(r=nn.get(d))&&Xd(n,r),h=i.createElement("script"),ct(h),yt(h,"link",n),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(d,h))}}function Ty(n,r,i,l){var d=(d=Se.current)?Tl(d):null;if(!d)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(r=vs(i.href),i=$r(d).hoistableStyles,l=i.get(r),l||(l={type:"style",instance:null,count:0,state:null},i.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){n=vs(i.href);var h=$r(d).hoistableStyles,v=h.get(n);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,v),(h=d.querySelector(ki(n)))&&!h._p&&(v.instance=h,v.state.loading=5),nn.has(n)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},nn.set(n,i),h||zE(d,n,i,v.state))),r&&l===null)throw Error(s(528,""));return v}if(r&&l!==null)throw Error(s(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?
vendor: 7,099 bytes, line 10
10(r=bs(i),i=$r(d).hoistableScripts,l=i.get(r),l||(l={type:"script",instance:null,count:0,state:null},i.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function vs(n){return'href="'+Wt(n)+'"'}function ki(n){return'link[rel="stylesheet"]['+n+"]"}function Ry(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function zE(n,r,i,l){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=n.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),yt(r,"link",i),ct(r),n.head.appendChild(r))}function bs(n){return'[src="'+Wt(n)+'"]'}function ji(n){return"script[async]"+n}function Cy(n,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+Wt(i.href)+'"]');if(l)return r.instance=l,ct(l),l;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),ct(l),yt(l,"style",d),Rl(l,i.precedence,n),r.instance=l;case"stylesheet":d=vs(i.href);var h=n.querySelector(ki(d));if(h)return r.state.loading|=4,r.instance=h,ct(h),h;l=Ry(i),(d=nn.get(d))&&Qd(l,d),h=(n.ownerDocument||n).createElement("link"),ct(h);var v=h;return v._p=new Promise(function(_,C){v.onload=_,v.onerror=C}),yt(h,"link",l),r.state.loading|=4,Rl(h,i.precedence,n),r.instance=h;case"script":return h=bs(i.src),(d=n.querySelector(ji(h)))?(r.instance=d,ct(d),d):(l=i,(d=nn.get(h))&&(l=g({},i),Xd(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),ct(d),yt(d,"link",l),n.head.appendChild(d),r.instance=d);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,Rl(l,i.precedence,n));return r.instance}function Rl(n,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,h=d,v=0;v<l.length;v++){var _=l[v];if(_.dataset.precedence===r)h=_;else if(h!==d)break}h?h.parentNode.insertBefore(n,h.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(n,r.firstChild))}function Qd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function Xd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Cl=null;function Oy(n,r,i){if(Cl===null){var l=new Map,d=Cl=new Map;d.set(i,l)}else d=Cl,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(n))return l;for(l.set(n,null),i=i.getElementsByTagName(n),d=0;d<i.length;d++){var h=i[d];if(!(h[Js]||h[ht]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(r)||"";v=n+v;var _=l.get(v);_?_.push(h):l.set(v,[h])}}return l}function xy(n,r,i){n=n.ownerDocument||n,n.head.insertBefore(i,r==="title"?n.querySelector("head > title"):null)}function $E(n,r,i){if(i===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function ky(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function BE(n,r,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=vs(l.href),h=r.querySelector(ki(d));if(h){r=h._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Ol.bind(n),r.then(n,n)),i.state.loading|=4,i.instance=h,ct(h);return}h=r.ownerDocument||r,l=Ry(l),(d=nn.get(d))&&Qd(l,d),h=h.createElement("link"),ct(h);var v=h;v._p=new Promise(function(_,C){v.onload=_,v.onerror=C}),yt(h,"link",l),i.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(n.count++,i=Ol.bind(n),r.addEventListener("load",i),r.addEventListener("error",i))}}var Zd=0;function qE(n,r){return n.stylesheets&&n.count===0&&kl(n,n.stylesheets),0<n.count||0<n.imgCount?function(i){var l=setTimeout(function(){if(n.stylesheets&&kl(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+r);0<n.imgBytes&&Zd===0&&(Zd=62500*SE());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&kl(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>Zd?50:800)+r);return n.unsuspend=i,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Ol(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var xl=null;function kl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,xl=new Map,r.forEach(HE,n),xl=null,Ol.call(n))}function HE(n,r){if(!(r.state.loading&4)){var i=xl.get(n);if(i)var l=i.get(null);else{i=new Map,xl.set(n,i);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var v=d[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=r.instance,v=d.getAttribute("data-precedence"),h=i.get(v)||l,h===l&&i.set(null,d),i.set(v,d),this.count++,l=Ol.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),h?h.parentNode.insertBefore(d,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),r.state.loading|=4}}var Ni={$$typeof:j,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function GE(n,r,i,l,d,h,v,_,C){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Wc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wc(0),this.hiddenUpdates=Wc(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function jy(n,r,i,l,d,h,v,_,C,M,B,G){return n=new GE(n,r,i,v,C,M,B,G,_),r=1,h===!0&&(r|=24),h=$t(3,null,null,r),n.current=h,h.stateNode=n,r=Nu(),r.refCount++,n.pooledCache=r,r.refCount++,h.memoizedState={element:l,isDehydrated:i,cache:r},Pu(h),n}function Ny(n){return n?(n=Yr,n):Yr}function Dy(n,r,i,l,d,h){d=Ny(d),l.context===null?l.context=d:l.pendingContext=d,l=Aa(r),l.payload={element:i}
vendor: 5,024 bytes, line 10
10,h=h===void 0?null:h,h!==null&&(l.callback=h),i=Ta(n,l,r),i!==null&&(Nt(i,n,r),ui(i,n,r))}function Ly(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<r?i:r}}function ef(n,r){Ly(n,r),(n=n.alternate)&&Ly(n,r)}function My(n){if(n.tag===13||n.tag===31){var r=lr(n,67108864);r!==null&&Nt(r,n,67108864),ef(n,67108864)}}function Py(n){if(n.tag===13||n.tag===31){var r=Vt();r=Kc(r);var i=lr(n,r);i!==null&&Nt(i,n,r),ef(n,r)}}var jl=!0;function VE(n,r,i,l){var d=U.T;U.T=null;var h=Y.p;try{Y.p=2,tf(n,r,i,l)}finally{Y.p=h,U.T=d}}function FE(n,r,i,l){var d=U.T;U.T=null;var h=Y.p;try{Y.p=8,tf(n,r,i,l)}finally{Y.p=h,U.T=d}}function tf(n,r,i,l){if(jl){var d=nf(l);if(d===null)Bd(n,r,l,Nl,i),Iy(n,l);else if(WE(d,n,r,i,l))l.stopPropagation();else if(Iy(n,l),r&4&&-1<JE.indexOf(n)){for(;d!==null;){var h=zr(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=ar(h.pendingLanes);if(v!==0){var _=h;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var C=1<<31-It(v);_.entanglements[1]|=C,v&=~C}On(h),(Me&6)===0&&(pl=Pt()+500,Ri(0))}}break;case 31:case 13:_=lr(h,2),_!==null&&Nt(_,h,2),gl(),ef(h,2)}if(h=nf(l),h===null&&Bd(n,r,l,Nl,i),h===d)break;d=h}d!==null&&l.stopPropagation()}else Bd(n,r,l,null,i)}}function nf(n){return n=ru(n),af(n)}var Nl=null;function af(n){if(Nl=null,n=Ir(n),n!==null){var r=c(n);if(r===null)n=null;else{var i=r.tag;if(i===13){if(n=u(r),n!==null)return n;n=null}else if(i===31){if(n=f(r),n!==null)return n;n=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Nl=n,null}function Uy(n){switch(n){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(N_()){case Vh:return 2;case Fh:return 8;case _o:case D_:return 32;case Jh:return 268435456;default:return 32}default:return 32}}var rf=!1,Pa=null,Ua=null,Ia=null,Di=new Map,Li=new Map,za=[],JE="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".split(" ");function Iy(n,r){switch(n){case"focusin":case"focusout":Pa=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":Di.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Li.delete(r.pointerId)}}function Mi(n,r,i,l,d,h){return n===null||n.nativeEvent!==h?(n={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:h,targetContainers:[d]},r!==null&&(r=zr(r),r!==null&&My(r)),n):(n.eventSystemFlags|=l,r=n.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),n)}function WE(n,r,i,l,d){switch(r){case"focusin":return Pa=Mi(Pa,n,r,i,l,d),!0;case"dragenter":return Ua=Mi(Ua,n,r,i,l,d),!0;case"mouseover":return Ia=Mi(Ia,n,r,i,l,d),!0;case"pointerover":var h=d.pointerId;return Di.set(h,Mi(Di.get(h)||null,n,r,i,l,d)),!0;case"gotpointercapture":return h=d.pointerId,Li.set(h,Mi(Li.get(h)||null,n,r,i,l,d)),!0}return!1}function zy(n){var r=Ir(n.target);if(r!==null){var i=c(r);if(i!==null){if(r=i.tag,r===13){if(r=u(i),r!==null){n.blockedOn=r,Zh(n.priority,function(){Py(i)});return}}else if(r===31){if(r=f(i),r!==null){n.blockedOn=r,Zh(n.priority,function(){Py(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Dl(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var i=nf(n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);au=l,i.target.dispatchEvent(l),au=null}else return r=zr(i),r!==null&&My(r),n.blockedOn=i,!1;r.shift()}return!0}function $y(n,r,i){Dl(n)&&i.delete(r)}function KE(){rf=!1,Pa!==null&&Dl(Pa)&&(Pa=null),Ua!==null&&Dl(Ua)&&(Ua=null),Ia!==null&&Dl(Ia)&&(I
10a=null),Di.forEach($y),Li.forEach($y)}function Ll(n,r){n.blockedOn===r&&(n.blockedOn=null,rf||(rf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,KE)))}var Ml=null;function By(n){Ml!==n&&(Ml=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ml===n&&(Ml=null);for(var r=0;r<n.length;r+=3){var i=n[r],l=n[r+1],d=n[r+2];if(typeof l!="function"){if(af(l||i)===null)continue;break}var h=zr(i);h!==null&&(n.splice(r,3),r-=3,nd(h,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function ws(n){function r(C){return Ll(C,n)}Pa!==null&&Ll(Pa,n),Ua!==null&&Ll(Ua,n),Ia!==null&&Ll(Ia,n),Di.forEach(r),Li.forEach(r);for(var i=0;i<za.length;i++){var l=za[i];l.blockedOn===n&&(l.blockedOn=null)}for(;0<za.length&&(i=za[0],i.blockedOn===null);)zy(i),i.blockedOn===null&&za.shift();if(i=(n.ownerDocument||n).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],h=i[l+1],v=d[Rt]||null;if(typeof h=="function")v||By(i);else if(v){var _=null;if(h&&h.hasAttribute("formAction")){if(d=h,v=h[Rt]||null)_=v.formAction;else if(af(d)!==null)continue}else _=v.action;typeof _=="function"?i[l+1]=_:(i.splice(l,3),l-=3),By(i)}}}function qy(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function r(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),d!==null&&(d(),d=null)}}}function sf(n){this._internalRoot=n}Pl.prototype.render=sf.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var i=r.current,l=Vt();Dy(i,l,n,r,null,null)},Pl.prototype.unmount=sf.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Dy(n.current,2,null,n,null,null),gl(),r[Ur]=null}};function Pl(n){this._internalRoot=n}Pl.prototype.unstable_scheduleHydration=function(n){if(n){var r=Xh();n={blockedOn:null,target:n,priority:r};for(var i=0;i<za.length&&r!==0&&r<za[i].priority;i++);za.splice(i,0,n),i===0&&zy(n)}};var Hy=t.version;if(Hy!=="19.2.5")throw Error(s(527,Hy,"19.2.5"));Y.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=m(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var YE={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ul.isDisabled&&Ul.supportsFiber)try{Gs=Ul.inject(YE),Ut=Ul}catch{}}return Ui.createRoot=function(n,r){if(!o(n))throw Error(s(299));var i=!1,l="",d=Ym,h=Qm,v=Xm;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=jy(n,1,!1,null,null,i,l,null,d,h,v,qy),n[Ur]=r.current,$d(n),new sf(r)},Ui.hydrateRoot=function(n,r,i){if(!o(n))throw Error(s(299));var l=!1,d="",h=Ym,v=Qm,_=Xm,C=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),r=jy(n,1,!0,r,i??null,l,d,C,h,v,_,qy),r.context=Ny(null),i=r.current,l=Vt(),l=Kc(l),d=Aa(l),d.callback=null,Ta(i,d,l),i=l,r.current.lanes=i,Fs(r,i),On(r),n[Ur]=r.current,$d(n),new Pl(r)},Ui.version="19.2.5",Ui}var Zy;function oA(){if(Zy)return cf.exports;Zy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),cf.exports=iA(),cf.exports}var lA=oA(),cA="__TSS_CONTEXT",zf=Symbol.for("TSS_SERVER_FUNCTION"),ev=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),uA="application/x-tss-framed",dh=()=>window.__TSS_START_OPTIONS__;function fh(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Nr(e){return e?.isNotFound===!0}function Mt(e){e.statusCode=e.statusCode||e.code||307;const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const a=new Response(null,{status:e.statusCode,headers:t});if(a.options=e,e.throw)throw a;return a}function hh(e){return e instanceof Response&&!!e.options}function X0(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Mt(e)}function dA(e){return e.replaceAll("\0","/").replaceAll("�","/").replace(/~([~0r])/g,(t,a)=>a==="0"?"\0":a==="r"?"�":a)}const tv=!1;function Ya(e){return e[e.length-1]}function Z0(e,t){return typeof e=="function"?e(t):e}const ph=Object.prototype.hasOwnProperty;function eb(e){for(const t in e)if(ph.call(e,t))return!0;return!1}const tc=()=>Object.create(null),_s=(e,t)=>Ja(e,t,!0);function Ja(e,t,a,s=0){if(e===t)return e;if(s++>500)return t;const o=Array.isArray(e)&&Array.isArray(t);if(!o&&!(dc(e)&&dc(t)))return t;const c=Object.keys(e),u=c.length,f=Object.keys(t),p=f.length;if(o?u!==e.length||p!==t.length||u&&Ya(c)!==`${u-1}`||p&&Ya(f)!==`${p-1}`:u!==Object.getOwnPropertyNames(e).length||p!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let m=0,y,g,w;if(o){for(;m<p&&(w=m,g=e[w],y=t[w],y=g===y?g:typeof g=="object"?Ja(g,y,a,s):y,y===g);m++);if(m===p&&u===p)return e}else{let E=u===p,S=!0;for(;m<p;
10m++){w=f[m],g=e[w];const T=t[w];y=g===T?g:typeof g=="object"?Ja(g,T,a,s):T,E&&=y===g&&(c[m]===w||ph.call(e,w)),S&&=Object.is(y,T),c[m]=y}if(E)return Object.getOwnPropertySymbols(e).length?t:e;if(S)return t}const b=o?f.fill(0):a?tc():{};for(let E=0;E<p;E++)w=o?E:f[E],o?(g=e[w],E>m&&(y=t[w],y=g===y?g:typeof g=="object"?Ja(g,y,a,s):y),b[w]=E<m?g:y):b[w]=c[E];return b}function dc(e){return!e||typeof e!="object"?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function vn(e,t,a,s){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let o=0,c=e.length;o<c;o++){const u=e[o],f=t[o];if(u!==f&&!vn(u,f,a,s))return!1}return!0}if(dc(e)&&dc(t)){if(a){for(const c in t)if((s||t[c]!==void 0)&&!vn(e[c],t[c],a,s))return!1;return!0}let o=0;if(s)o=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&o++;for(const c in t)if((s||t[c]!==void 0)&&(o--===0||!vn(e[c],t[c],a,s)))return!1;return o===0}return!1}function fA(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}const hA=/[\x00-\x1f\x7f"<>`{}]/g;function pA(e){return e.replace(hA,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function nv(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,a=>{try{return decodeURI(a)}catch{return a}})}return pA(t)}const mA=["http:","https:","mailto:","tel:"];function Qi(e){if(e[0]!=="/"&&e.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const tb=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function nb(e,t){if(!e)return!1;if(tb.test(e))return!0;const a=Qi(e);return a?!t.has(a):!1}const gA={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},yA=/[&><\u2028\u2029]/g;function vA(e){return e.replace(yA,t=>gA[t])}function Ii(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){const a=/%25|%5C/gi;let s=0,o;for(t="";(o=a.exec(e))!==null;)t+=nv(e.slice(s,o.index))+o[0],s=a.lastIndex;t+=nv(s?e.slice(s):e)}return t}function bA(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function wA(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function Ms(e){return e.replace(/\/{2,}/g,"/")}function ab(e){return e==="/"?e:e.replace(/^\/+/,"")}function Dn(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function rb(e){return Dn(ab(e))}function av(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function rv(e,t,a="never",s){if(t.includes("//")&&(t=Ms(t)),t.startsWith("/"))return t.length===1||a==="preserve"?t:a==="always"?t.endsWith("/")?t:`${t}/`:t.endsWith("/")?t.slice(0,-1):t;const o=t===".";let c;if(s){c=o?e:e+"\0"+t;const m=s.get(c);if(m)return m}let u;if(o)u=e.split("/");else{for(e.includes("//")&&(e=Ms(e)),u=e.split("/");u.length>1&&Ya(u)==="";)u.pop();const m=t.split("/");for(let y=0,g=m.length;y<g;y++){const w=m[y];w===""?y?y===g-1&&u.push(w):u=[w]:w===".."?u.length>1?u.pop():u=[""]:w==="."||u.push(w)}}u.length>1&&(Ya(u)===""?a==="never"&&u.pop():a==="always"&&u.push(""));const f=u.join("/"),p=(o?Ms(f):f)||"/";return c&&s&&s.set(c,p),p}function _A(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),a=new RegExp([...t.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return s=>s.replace(a,o=>t.get(o)??o)}function SA(e){return e==null||e===""}function EA(e,t,a){if(typeof t!="string")return""+(t??void 0);const s=e==="_splat";if(s&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let o=encodeURIComponent(t);return s&&(o=o.replaceAll("%2F","/")),a?a(o):o}function sv(e,t,a,s,o){const c=e.endsWith("/")?"/":"";let u="";for(const f of t){if(typeof f=="string"){u+=f;continue}const[p,m,y,g]=f,w=p===2,b=w&&g!==void 0?g+c:g;let E=a[m];if(!(p===3&&E==null)){if(o&&(o[m]=E,w&&(o["*"]=E)),w&&SA(E)){if(y==="/"&&!b)continue;E=""}u+=y+EA(m,E,s)+(b||"")}}return u+c||"/"}function fc(e){const t=new Map;let a,s;return{get(o){const c=t.get(o);if(c)return c.visited=!0,c.value},set(o,c){const u=t.get(o);if(u){u.value=c;return}if(t.size>=e){let p=a?.next().value;for(;!p||p.visited;)p?p.visited=!1:a=t.values(),p=a.next().value;p===s&&(a=void 0),t.delete(p.key)}const f={key:o,value:c,visited:!1};s=f,t.set(o,f)},clear(){t.clear(),a=void 0,s=void 0}}}function Xi(){throw new Error("Invariant failed")}const Va=4,sb=5;function AA(e){const t=e.names;if(t)return t;const a=[];
10for(const s of e)typeof s!="string"&&a.push(s[1]);return e.names=a}function TA(e,t,a){const s=e.substring(t,a);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.substring(1),"",""];const o=s.indexOf("{");if(o>=0){const c=s.indexOf("}",o),u=s.charCodeAt(o+1)===45,f=o+(u?3:2);if(c>=0&&s.charCodeAt(f-1)===36&&(!u||f<c)){const p=s.substring(f,c);return[u?3:p?1:2,p||"_splat",s.substring(0,o),e.substring(t+c+1,p?a:e.length)]}}return s}function Zi(e,t,a,s,o,c){let u=a;const f=t.fullPath??t.from,p=t.options,m=f.length,y=f.endsWith("/")?m-1:m,g=p?.caseSensitive??e,w=p?.params?.parse??p?.parseParams;let b,E=c?a-1:0;if(!s||f.includes("$")){b=c?.slice()??[];const R=Ya(b);R&&typeof R!="string"&&R[0]===2&&(b[b.length-1]=[R[0],R[1],R[2],R[3]===void 0?void 0:R[3]+f.substring(a-(f[a-2]==="/"?2:1),y)],E=m)}for(;u<m;){const R=u,k=f.indexOf("/",R);let j=k===-1?m:k;const $=TA(f,R,j);u=j+1;let K;if(typeof $=="string"){if(!s)continue;let z=$,D;g?D=s.static??=new Map:(z=$.toLowerCase(),D=s.staticInsensitive??=new Map);const J=D.get(z);if(J)K=J;else{const ee=Tr(s);K=ee,D.set(z,ee)}}else{const z=$[0];let D=$[2],J=$[3]??"";if(z===2&&(j=m,u=j+1),b&&E<j&&(E<R-1&&b.push(f.substring(E,R-1)),$[2]="/"+D,z===2&&$[3]!==void 0&&y<m&&($[3]=J.slice(0,-1)),b.push($),E=j),!s)continue;const ee=g&&!!(D||J);g||(D=D.toLowerCase(),J=J.toLowerCase());const ue=z===1?s.dynamic??=[]:z===3?s.optional??=[]:s.wildcard??=[],V=z!==2&&!w&&ue.find(F=>!F.parse&&F.caseSensitive===ee&&F.prefix===D&&F.suffix===J);if(V)K=V;else{const F=Tr(s,z,ee,D,J);K=F,ue.push(F),ue.length===2&&o?.push(ue)}}s=K}b&&E<y&&b.push(f.substring(E,y));const S=b?.slice();if(!s)return S;
10if(w&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const R=Tr(s,sb);(s.pathless??=[]).push(R),s=R}const T=(t.path||!t.children)&&!t.isRoot;if(T&&y<m){const R=Tr(s,Va);s.index=R,s=R}return s.parse=w??null,s.priority=p?.params?.priority??0,s.route||(s.data=S,T&&(s.route=t)),[s,u,S]}function ib(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Tr(e,t=0,a,s,o){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:a,prefix:s,suffix:o}}function RA(e,t){const a=Tr(),s=[];function o(c,u,f,p){const[m,y,g]=Zi(!1,c,u,f,s,p);if(c.children)for(const w of c.children)o(w,y,m,g)}for(const c of e)o(c,1,a);for(const c of s)c.sort(ib);t.masksTree=a,t.flatCache=fc(1e3)}function CA(e,t){e||="/";const a=t.flatCache.get(e);if(a!==void 0)return a;const s=mh(e,t.masksTree);return t.flatCache.set(e,s),s}function OA(e,t,a,s,o){e||="/",s||="/";const c=t?`case\0${e}`:e;let u=o.singleCache.get(c);return u||(u=Tr(),Zi(t,{from:e},1,u),o.singleCache.set(c,u)),mh(s,u,a)}function xA(e,t,a=!1){const s=a?e:`nofuzz\0${e}`,o=t.matchCache.get(s);if(o!==void 0)return o;e||="/";let c;try{c=mh(e,t.segmentTree,a)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=lb(c.route)),t.matchCache.set(s,c),c}function kA(e,t=!1){const a=Tr(),s=[],o={},c={};let u=0;function f(p,m,y,g){if(p.init(u),p.id in o&&Xi(),o[p.id]=p,u!==0&&p.path){const S=Dn(p.fullPath);(!c[S]||p.fullPath.endsWith("/"))&&(c[S]=p)}u++;const[w,b,E]=Zi(t,p,m,y,s,g);if(p._interpolation=E,p.children)for(const S of p.children)f(S,b,w,E)}f(e,1,a);for(const p of s)p.sort(ib);return{processedTree:{segmentTree:a,singleCache:fc(1e3),matchCache:fc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function mh(e,t,a=!1){const s=e.split("/"),o=NA(e,s,t,a);if(!o)return null;const[c]=ob(e,s,o);return{route:o.node.route,rawParams:c}}function ob(e,t,a){const s=jA(a.node),o=a.node.data&&AA(a.node.data),c=Object.create(null);let u=a.extract?.part??0,f=a.extract?.node??0,p=a.extract?.path??0,m=a.extract?.param??0;for(;f<s.length;u++,f++,p++){const y=s[f];if(y.kind===Va)break;if(y.kind===sb){u--,p--;continue}const g=t[u],w=p;if(g&&(p+=g.length),y.kind===1||y.kind===3){const b=o[m++];if(y.kind===3&&a.skipped&1<<f){u--,p=w-1;continue}const E=y.suffix||y.prefix?g.substring(y.prefix.length,g.length-y.suffix.length):g;(E||y.kind===1)&&(c[b]=decodeURIComponent(E))}else if(y.kind===2){const b=y,E=e.substring(w+b.prefix.length,e.length-b.suffix.length),S=decodeURIComponent(E);c["*"]=S,c._splat=S;break}}return a.rawParams&&Object.assign(c,a.rawParams),[c,{part:u,node:f,path:p,param:m}]}function lb(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function jA(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function NA(e,t,a,s){if(e==="/"&&a.index)return{node:a.index,skipped:0};const o=!Ya(t),c=o&&e!=="/",u=t.length-(o?1:0),f=[{node:a,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;f.length;){const y=f.pop(),{node:g,index:w,skipped:b,statics:E,dynamics:S,optionals:T}=y;let{extract:R,rawParams:k}=y;if(g.kind===2&&g.route&&!zl(m,y))continue;if(g.parse){if(!iv(e,t,y))continue;k=y.rawParams,R=y.extract}s&&g.route&&g.kind!==Va&&zl(p,y)&&(p=y);const j=w===u;if(j&&(g.route&&(!c||g.kind===Va||g.kind===2)&&zl(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const $=j?void 0:t[w];let K;if(j&&g.index){const z={node:g.index,index:w,skipped:b,statics:E,dynamics:S,optionals:T,extract:R,rawParams:k};let D=!0;if(g.index.parse&&(iv(e,t,z)||(D=!1)),D){if(!S&&!T&&!b&&DA(E,u))return z;zl(m,z)&&(m=z)}}if(g.wildcard)for(let z=g.wildcard.length-1;z>=0;z--){const D=g.wildcard[z],{prefix:J,suffix:ee}=D;if(!(J&&(j||!(D.caseSensitive?$:K??=$.toLowerCase()).startsWith(J)))){if(ee){if(j)continue;const ue=t.slice(w).join("/"),V=ue.slice(-ee.length);if((D.caseSensitive?V:V.toLowerCase())!==ee||ue.length-ee.length<J.length)continue}f.push({node:D,index:u,skipped:b,statics:E,dynamics:S,optionals:T,extract:R,rawParams:k})}}if(g.optional){const z=b|1<<g.depth+1;for(let D=g.optional.length-1;D>=0;D--){const J=g.optional[D];f.push({node:J,index:w,skipped:z,statics:E,dynamics:S,optionals:T,extract:R,rawParams:k})}if(!j)for(let D=g.optional.length-1;D>=0;D--){const J=g.optional[D],{prefix:ee,suffix:ue}=J;if(ee||ue){const V=J.caseSensitive?$:K??=$.toLowerCase();if(ee&&!V.startsWith(ee)||ue&&V.indexOf(ue,V.length-ue.length)<ee.length)continue}f.push({node:J,index:w+1,skipped:b,statics:E,dynamics:S,optionals:T+Il(u,w),extract:R,rawParams:k})}}if(!j&&g.dynamic&&$)for(let z=g.dynamic.length-1;z>=0;z--){const D=g.dynamic[z],{prefix:J,suffix:ee}=D;
10if(J||ee){const ue=D.caseSensitive?$:K??=$.toLowerCase();if(J&&!ue.startsWith(J)||ee&&ue.indexOf(ee,ue.length-ee.length)<J.length)continue}f.push({node:D,index:w+1,skipped:b,statics:E,dynamics:S+Il(u,w),optionals:T,extract:R,rawParams:k})}if(!j&&g.staticInsensitive){const z=g.staticInsensitive.get(K??=$.toLowerCase());z&&f.push({node:z,index:w+1,skipped:b,statics:E+Il(u,w),dynamics:S,optionals:T,extract:R,rawParams:k})}if(!j&&g.static){const z=g.static.get($);z&&f.push({node:z,index:w+1,skipped:b,statics:E+Il(u,w),dynamics:S,optionals:T,extract:R,rawParams:k})}if(g.pathless)for(let z=g.pathless.length-1;z>=0;z--){const D=g.pathless[z];f.push({node:D,index:w,skipped:b,statics:E,dynamics:S,optionals:T,extract:R,rawParams:k})}}if(m)return m;if(s&&p){let y=p.index;for(let w=0;w<p.index;w++)y+=t[w].length;const g=y===e.length?"/":e.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Il(e,t){return 2**(e-t-1)}function DA(e,t){return e===2**(t-1)-1}function iv(e,t,a){let s,o;try{[s,o]=ob(e,t,a)}catch{return null}if(a.rawParams=s,a.extract=o,!a.node.parse)return!0;try{if(a.node.parse(s)===!1)return null}catch{}return!0}function zl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Va)>(e.node.kind===Va)||t.node.kind===Va==(e.node.kind===Va)&&t.node.depth>e.node.depth))):!0}function LA(){try{return sessionStorage}catch{return}}const MA="tsr-scroll-restoration-v1_3",cb=LA();function PA(){try{return JSON.parse(cb?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Ss=PA(),ov="data-scroll-restoration-id",UA=e=>e.state.__TSR_key||e.href;function IA(e){const t=e.getAttribute(ov);if(t)return`[${ov}="${t}"]`;let a="",s=e,o;for(;o=s.parentNode;){let c=1,u=s;for(;u=u.previousElementSibling;)c++;const f=`${s.localName}:nth-child(${c})`;a=a?`${f} > ${a}`:f,s=o}return a}let $l=!1;const nc="window";function $f(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function lv(e){const t=new Set;for(const a of e){if(a===nc)continue;const s=$f(a);s&&t.add(s)}return t}function zA(e,t){const a=e.options.scrollRestoration,s=e._scroll;a&&(s.e=!0);const o=e.options.getScrollRestorationKey||UA,c=new Set,u=f=>{const p=Ss[f]||={};for(const m of c)m===document?p[nc]={scrollX,scrollY}:m.isConnected&&(p[IA(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};a&&!s.s&&(s.s=!0,$l=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f=>{$l||c.add(f.target)},!0),e.subscribe("onBeforeLoad",f=>{f.fromLocation&&u(o(f.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",u(o(e.stores.resolvedLocation.get()??e.stores.location.get()));try{cb?.setItem(MA,JSON.stringify(Ss))}catch{}}),addEventListener("pageshow",f=>{f.persisted&&(history.scrollRestoration="manual")})),!s.r&&(s.r=!0,e.subscribe("onRendered",f=>{const p=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors,y=s.n,g=s.h;let w;if(c.clear(),s.n=!0,s.h=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const b=o(f.toLocation),E=f.fromLocation&&o(f.fromLocation);if(s.e&&E&&E!==b){const S=Ss[E];if(S){let T=Ss[b];for(const R in S){if(R===nc){if(y)continue}else{const k=$f(R);if(!k||y&&m&&(w??=lv(m),w.has(k)))continue}T||(T=Ss[b]={}),T[R]??=S[R]}}}$l=!0;try{const S=f.toLocation.hash,T=f.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(y){!S&&m&&(w??=lv(m));const k=S&&T&&g,j=s.e?Ss[b]:void 0;if(j)for(const $ in j){const{scrollX:K,scrollY:z}=j[$];if($===nc){if(k)continue;scrollTo({top:z,left:K,behavior:p}),R=!0}else{const D=$f($);D&&(D.scrollLeft=K,D.scrollTop=z,w?.delete(D))}}if(!S){const $={top:0,left:0,behavior:p};if(R||scrollTo($),w)for(const K of w)K.scrollTo($)}}!R&&S&&T&&document.getElementById(S)?.scrollIntoView(T)}finally{$l=!1}}))}function ub(e,t=String){let a;for(const s in e){const o=e[s];o!==void 0&&(a||=new URLSearchParams).set(s,t(o))}return a?a.toString():""}function hf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function $A(e){const t=new URLSearchParams(e),a=Object.create(null);for(const[s,o]of t.entries()){const c=a[s];c==null?a[s]=hf(o):Array.isArray(c)?c.push(hf(o)):a[s]=[c,hf(o)]}return a}const db=/^(?:\s|["[{\d-]|fa|nu|tr)/,BA=HA(JSON.parse),qA=GA(JSON.stringify,JSON.parse);function HA(e){const t=e===JSON.parse;return a=>{a[0]==="?"&&(a=a.substring(1));const s=$A(a);for(const o in s){const c=s[o];if(typeof c=="string"){if(t&&!db.test(c))continue;try{s[o]=e(c)}catch{}}}return s}}function GA(e,t){const a=t===JSON.parse;function s(o){if(o&&typeof o=="object")try{return e(o)}catch{}
10else if(t&&typeof o=="string"){if(a&&!db.test(o))return o;try{return t(o),e(o)}catch{}}return o}return o=>{const c=ub(o,s);return c?`?${c}`:""}}const Ps="__root__";function VA(e,t,a){const s=rb(e),o=`/${s}`,c=t?o:o.toLowerCase(),u=`${c}/`,f={input:({url:p})=>{const m=t?p.pathname:p.pathname.toLowerCase();return m===c?p.pathname="/":m.startsWith(u)&&(p.pathname=p.pathname.slice(o.length)),p},output:({url:p})=>(p.pathname=Ms(`/${s}${p.pathname}`),p)};return a?{input:({url:p})=>Bf(a,f.input({url:p})),output:({url:p})=>f.output({url:fb(a,p)})}:f}function Bf(e,t){const a=e?.input?.({url:t});if(a){if(typeof a=="string")return new URL(a);if(a instanceof URL)return a}return t}function fb(e,t){const a=e?.output?.({url:t});if(a){if(typeof a=="string")return new URL(a);if(a instanceof URL)return a}return t}function FA(e,t){const{createMutableStore:a,createReadonlyStore:s,batch:o}=t,c=new Map,u=a("idle"),f=a(e),p=a(void 0),m=a([]),y=s(()=>m.get().map(S=>c.get(S).get())),g=s(()=>({status:u.get(),isLoading:u.get()==="pending",matches:y.get(),location:f.get(),resolvedLocation:p.get()}));function w(S){let T=c.get(S);return T||(T=a(void 0),c.set(S,T)),T}const b={status:u,location:f,resolvedLocation:p,ids:m,matches:y,byRoute:c,__store:g,getMatchStore:w,setMatches:E};function E(S){const T=m.get(),R=S.map(k=>k.routeId);o(()=>{wA(T,R)||m.set(R);for(const k of T)R.includes(k)||c.get(k).set(()=>{});for(const k of S){const j=w(k.routeId);j.get()!==k&&j.set(k)}})}return b}var Wa="__TSR_index",cv="popstate",uv="beforeunload",JA=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ac(e){const t=JA.exec(e);return t?"/"+e.slice(t[0].length):e}function hb(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`	
11\r`.includes(t)?"":encodeURIComponent(t))),ac(e)}function WA(e){let t=e.getLocation();const a=new Set,s=u=>{t=e.getLocation(),a.forEach(f=>f({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?s(u):t=e.getLocation()},c=async({task:u,navigateOpts:f,...p})=>{if(f?.ignoreBlocker??!1){u();return}const m=e.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const w=hc(p.path,p.state);if(await g.blockerFn({currentLocation:t,nextLocation:w,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:a,subscribe:u=>(a.add(u),()=>{a.delete(u)}),push:(u,f,p)=>{const m=t.state[Wa];f=dv(m+1,f),c({task:()=>{e.pushState(u,f),s({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:f})},replace:(u,f,p)=>{const m=t.state[Wa];f=dv(m,f),c({task:()=>{e.replaceState(u,f),s({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:f})},go:(u,f)=>{c({task:()=>{e.go(u,f?.ignoreBlocker??!1),o({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[Wa]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(m=>m!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s,_getBlockers:()=>e.getBlockers?.()??[]}}function dv(e,t){const a=gh();return{...t,key:a,__TSR_key:a,[Wa]:e}}function KA(e){const t=typeof document<"u"?window:void 0,a=t.history.pushState,s=t.history.replaceState;let o=[];const c=()=>o,u=D=>o=D,f=D=>hb(D),p=(()=>hc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=gh();t.history.replaceState({[Wa]:0,key:D,__TSR_key:D},"")}let m=p(),y,g=!1,w=!1,b=!1,E=!1;const S=()=>m;let T;const R=()=>{T&&(z._ignoreSubscribers=!0,(T[2]?t.history.pushState:t.history.replaceState)(T[1],"",T[0]),z._ignoreSubscribers=!1,T=void 0,y=void 0)},k=(D,J,ee)=>{const ue=!!T;ue||(y=m),m=hc(J,ee),T=[m.href,ee,T?.[2]||D],ue||queueMicrotask(()=>R())},j=D=>{m=p(),z.notify({type:D})},$=async()=>
11{if(E=!1,w){w=!1;return}const D=p(),J=D.state[Wa]-m.state[Wa],ee=J===1,ue=J===-1,V=!ee&&!ue||g;g=!1;const F=V?"GO":ue?"BACK":"FORWARD",Z=V?{type:"GO",index:J}:{type:ue?"BACK":"FORWARD"};if(b)b=!1;else{const ge=c();if(typeof document<"u"&&ge.length){for(const ce of ge)if(await ce.blockerFn({currentLocation:m,nextLocation:D,action:F})){w=!0,t.history.go(-J),z.notify(Z);return}}}m=p(),z.notify(Z)},K=D=>{if(E){E=!1;return}let J=!1;const ee=c();if(typeof document<"u"&&ee.length)for(const ue of ee){const V=ue.enableBeforeUnload??!0;if(V===!0){J=!0;break}if(typeof V=="function"&&V()===!0){J=!0;break}}if(J)return D.preventDefault(),D.returnValue=""},z=WA({getLocation:S,getLength:()=>t.history.length,pushState:(D,J)=>k(!0,D,J),replaceState:(D,J)=>k(!1,D,J),back:D=>(D&&(b=!0,E=!0),t.history.back()),forward:D=>{D&&(b=!0,E=!0),t.history.forward()},go:(D,J)=>{g=!0,J&&(b=!0,E=!0),t.history.go(D)},createHref:D=>f(D),flush:R,destroy:()=>{t.history.pushState=a,t.history.replaceState=s,t.removeEventListener(uv,K,{capture:!0}),t.removeEventListener(cv,$)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return z._ignoreNextBeforeUnload=D=>{E=!1;try{D=new URL(D,t.document.baseURI).href,E=/^https?:/.test(D)&&(!D.includes("#")||D.split("#")[0]!==t.location.href.split("#")[0])}catch{}},t.addEventListener(uv,K,{capture:!0}),t.addEventListener(cv,$),t.history.pushState=function(...D){const J=a.apply(t.history,D);return z._ignoreSubscribers||j("PUSH"),J},t.history.replaceState=function(...D){const J=s.apply(t.history,D);return z._ignoreSubscribers||j("REPLACE"),J},z}function hc(e,t){const a=hb(e),s=a.indexOf("#"),o=a.indexOf("?");if(!t){const c=gh();t={[Wa]:0,key:c,__TSR_key:c}}return{href:a,pathname:a.substring(0,s>0?o>0?Math.min(s,o):s:o>0?o:a.length),hash:s>-1?a.substring(s):"",search:o>-1?a.slice(o,s===-1?void 0:s):"",state:t}}function gh(){return(Math.random()+1).toString(36).substring(7)}function pf(e,t){return e.protocol!=="http:"&&e.protocol!=="https:"||e.origin!==t||!!e.username||!!e.password}function mf(e){return e.pathname+e.search+e.hash}function fv(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function YA(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function jc(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function hv({key:e,__TSR_key:t,__TSR_index:a,__hashScrollIntoViewOptions:s,...o}){return o}function pb(e){return e.findIndex(t=>t.status==="error"||t.status==="notFound"||t._notFound)+1}function QA(e,t,a,s,o,c){s&&(t=t.slice(0,s)),o&&(a=a.slice(0,o));for(const u of t){if(c&&e._tx!==c)return;a.some(f=>f.routeId===u.routeId)||e.routesById[u.routeId].options.onLeave?.(u)}for(const u of a){if(c&&e._tx!==c)return;e.routesById[u.routeId].options[t.some(f=>f.routeId===u.routeId)?"onStay":"onEnter"]?.(u)}}var XA=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async a=>(a(),!1),this.update=a=>{const s=this.options;this.options={...s,...a},this.isServer=this.options.isServer??tv??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=KA()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const o=this.options.basepath??"/",c=this.options.rewrite,u=this.basepath!==o||s?.rewrite!==c||s?.caseSensitive!==this.options.caseSensitive;if(u&&(this.basepath=o,this.rewrite=o!=="/"&&rb(o)?VA(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||tv){this.routeTree=this.options.routeTree;let f;f=this.buildRouteTree(),this.setRoutes(f)}if(this.stores)u&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const f=this.getStoreConfig(this);this.batch=f.batch,this.stores=FA(this.latestLocation,f),zA(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const a=kA(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&RA(this.options.routeMasks,a.processedTree),{...a,resolvePathCache:fc(1e3)}},this.subscribe=(a,s)=>{const o={eventType:a,fn:s};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=a=>{for(const s of this.subscribers)if(s.eventType===a.type)try{s.fn(a)}catch(o){console.error(o)}},this.parseLocation=(a,s)=>{const o=({pathname:p,search:m,hash:y,href:g},w)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const T=this.options.parseSearch(m),R=this.options.stringifySearch(T);return{href:p+R+y,publicHref:p+R+y,pathname:Ii(p),external:!1,searchStr:R,search:_s(s?.search,T),hash:Ii(y.slice(1)),state:Ja(s?.state,w)}}const b=Bf(this.rewrite,new URL(g,this.origin)),E=this.options.parseSearch(b.search),S=this.options.stringifySearch(E);return b.search=S,{href:b.href.replace(b.origin,""),publicHref:g,pathname:Ii(ac(b.pathname)),external:!!this.rewrite&&pf(b,this.origin),searchStr:S,search:_s(s?.search,E),hash:Ii(b.hash.slice(1)),state:Ja(s?.state,w)}},c=o(a,a.state),{__tempLocation:u,__tempKey:f}=c.state;if(u&&(!f||f===this.tempLocationKey)){const p=o(u,{...u.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return p.maskedLocation=c,p}return c},this.matchRoutes=(a,s,o)=>
11typeof a=="string"?this.matchRoutesInternal({pathname:a,search:s},o):this.matchRoutesInternal(a,s),this.getMatchedRoutes=a=>{const s=Object.create(null),o=xA(Dn(a),this.processedTree,!0);return o&&Object.assign(s,o.rawParams),[o?.branch||[this.routesById.__root__],s,o?.route]},this.buildLocation=a=>{{const u=this.staticLocations.get(a);if(u)return u}let s=!1;const o=(u={})=>{if(u.href){const ge=hc(u.href,{});u={...u,to:Bf(this.rewrite,new URL(ge.pathname,this.origin)).pathname,search:this.options.parseSearch(ge.search),hash:ge.hash.slice(1)}}const f=u._fromLocation||this._pendingLocation||this.latestLocation;let p;const m=()=>(s=!0,f),y=()=>(s=!0,p??=this.matchRoutesLightweight(f)),g=u.to?`${u.to}`:".",w=rv(g[0]==="/"?"":u.unsafeRelative==="path"?m().pathname:u.from??y()[1],g,this.options.trailingSlash,this.resolvePathCache),b=this.routesByPath[Dn(w)],E=w.includes("$");let S;if(b)S=b._branch??=lb(b);else if(E)S=[];else{const[ge,ce,U]=this.getMatchedRoutes(w);S=ge,this.options.notFoundRoute&&(!U||U.path!=="/"&&ce["**"])&&(S=[...S,this.options.notFoundRoute])}const T=E?b?._interpolation??Zi(!1,{fullPath:w},0):void 0;let R;for(const ge of S){const ce=ge.options.params?.stringify??ge.options.stringifyParams;if(ce){const U=y()[3];if(R??=gf(u.params,U),!eb(R))break;R===U&&(R=Object.assign(tc(),R));try{Object.assign(R,ce(R))}catch{}}}R??=gf(u.params,e1(u.params,T)?y()[3]:yf);const k=a.leaveParams?w:ac(Ii(T?sv(w,T,R,this.pathParamsDecoder):w)),j=t1(S,a._includeValidateSearch),$=()=>{let ge=y()[2];if(a._includeValidateSearch&&this.options.search?.strict){const ce={};S.forEach(U=>{if(U.options.validateSearch)try{Object.assign(ce,rc(U.options.validateSearch,{...ce,...ge}))}catch{}}),ge=ce}return ge},K=j.length?n1(j,$(),u):u.search===!0?$():typeof u.search=="function"?u.search($()):u.search||yf,z=this.options.stringifySearch(K),D=u.hash===!0?m().hash:typeof u.hash=="function"?u.hash(m().hash):u.hash||void 0,J=D?`#${D}`:"",ee=u.state?u.state===!0?m().state:typeof u.state=="function"?u.state(m().state):u.state:yf,ue=`${k}${z}${J}`;let V,F,Z=!1;if(this.rewrite){const ge=new URL(ue,this.origin),ce=ge.origin,U=fb(this.rewrite,ge);V=mf(ge),pf(U,ce)?(F=U.href,Z=!0):F=ac(mf(U))}else V=bA(ue),F=V;return{publicHref:F,href:V,pathname:k,search:K,searchStr:z,state:ee,hash:D??"",external:Z,unmaskOnReload:u.unmaskOnReload}},c=o(a);if(a.mask)c.maskedLocation=o({from:a.from,...a.mask});else if(this.options.routeMasks){const u=CA(c.pathname,this.processedTree);if(u){const f=Object.assign(tc(),u.rawParams),{from:p,params:m,...y}=u.route,g=gf(m,f);c.maskedLocation=o({from:a.from,...y,params:g})}}return!s&&a._fromLocation&&!c.maskedLocation&&this.staticLocations.set(a,c),c},this.commitLocation=async({viewTransition:a,ignoreBlocker:s,...o})=>{const c=o.maskedLocation??o;if(c.external)return pv(this,c.publicHref,{replace:o.replace,ignoreBlocker:s});let u;const f=Dn(this.latestLocation.href)===Dn(o.href)&&vn(hv(o.state),hv(this.latestLocation.state)),p=this._commitPromise;let m;const y=new Promise(g=>{m=g});if(y.resolve=()=>{m(),p?.resolve()},this._commitPromise=y,f)this.load();else{let{maskedLocation:g,hashScrollIntoView:w,...b}=o;g&&(b={...g,state:{...g.state,__tempKey:void 0,__tempLocation:{...b,search:b.searchStr,state:{...b.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(b.unmaskOnReload??this.options.unmaskOnReload??!1)&&(b.state.__tempKey=this.tempLocationKey)),b.state={...b.state,__hashScrollIntoViewOptions:w??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=a,u=o.replace?"REPLACE":"PUSH",this.history[u==="REPLACE"?"replace":"push"](b.publicHref,b.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:u}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:a,resetScroll:s,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:u,...f}={})=>{const p=this.buildLocation({...f,_includeValidateSearch:!0});this._pendingLocation=p;const m=this.commitLocation({...p,viewTransition:c,replace:a,resetScroll:s,hashScrollIntoView:o,ignoreBlocker:u});return queueMicrotask(()=>
11{this._pendingLocation===p&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:a,reloadDocument:s,href:o,publicHref:c,...u})=>{const f=o?Qi(o):void 0;if(f||s){if(a!==void 0||!o){const m=this.buildLocation({to:a,...u}),y=m.maskedLocation??m;o??=y.publicHref,c??=y.publicHref}return pv(this,!f&&c?c:o,u)}return this.buildAndCommitLocation({...u,href:o,to:a,_isNavigate:!0})},this.load=async a=>{this.updateLatestLocation(),a?.action&&(this._scroll.h=a.action.type==="PUSH"||a.action.type==="REPLACE"),await u1(this,a)},this.startViewTransition=a=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document.startViewTransition=="function"){let o;if(typeof s=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,u=this.stores.resolvedLocation.get(),f=typeof s.types=="function"?s.types(jc(c,u)):s.types;if(f===!1)return a();o={update:a,types:f}}else o=a;return document.startViewTransition(o).updateCallbackDone}return a()},this.invalidate=a=>{const s=this._committed,o=a?.filter,c=this._preloads,u=new Set,f=y=>{(!o||o(y))&&u.add(y.id)};s.forEach(f),this._cache.forEach(f),c?.forEach(y=>y.forEach(f)),this._tx?.[3].forEach(f);const p=[];for(const[y,g]of c??[])g.some(w=>u.has(w.id))&&(c.delete(y),p.push(y));const m=y=>{if(u.has(y.id)){const g=this.routesById[y.routeId],w={...y,invalid:!0,...(a?.forcePending||y.status==="error"||y.status==="notFound")&&fv(g)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,w}return y};this._committed=s.map(m);for(const[y,g]of this._cache)u.has(y)&&(g.invalid=!0,a?.forcePending&&(g.status="pending"));for(const y of u){const g=this._flights?.get(y);this._flights?.delete(y),g&&!g[2]&&p.push(g[1])}for(const y of p)y.abort();return this.shouldViewTransition=!1,this.load({sync:a?.sync})},this.resolveRedirect=a=>{const s=a.options;let o=a.headers.get("Location")||s.href;if(!o){const u=this.buildLocation(s);o=(u.maskedLocation??u).publicHref||"/"}let c;if(tb.test(o)||(c=Qi(o))&&!this.protocolAllowlist.has(c))throw new Error("Redirect blocked: unsafe protocol");if(c==="http:"||c==="https:"){const u=new URL(o);u.pathname.startsWith("//")?o=u.href:pf(u,this.origin)||(o=mf(u),c=void 0)}return c&&(s.reloadDocument=!0),s.href=o,a.headers.set("Location",o),a},this.clearCache=a=>{const s=this._cache,o=this._preloads,c=a?.filter,u=[],f=[];for(const[m,y]of s)(!c||c(y))&&(f.push(m),u.push(y));const p=[];for(const[m,y]of o??[])(!c||y.some(c))&&(p.push(m),u.push(...y));for(const m of f)s.delete(m);for(const m of p)o.delete(m);for(const m of u){const y=m._flight;m._flight=void 0,y&&!--y[2]&&(this._flights?.get(m.id)===y&&this._flights.delete(m.id),p.push(y[1]))}for(const m of p)m.abort()},this.loadRouteChunk=ua,this.preloadRoute=a=>d1(this,a),this.matchRoute=(a,s)=>{const o={...a,to:a.to?rv(a.from||"",a.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:a.params||{},leaveParams:!0},c=this.buildLocation(o),u=this.stores.status.get()==="pending";if(s?.pending&&!u)return!1;const f=s?.pending??!u?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=OA(c.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,f.pathname,this.processedTree);return!p||a.params&&!vn(p.rawParams,a.params,!0)?!1:s?.includeSearch??!0?vn(f.search,c.search,!0)?p.rawParams:!1:p.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=_A(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??qA,parseSearch:e.parseSearch??BA,protocolAllowlist:e.protocolAllowlist??mA}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Zi(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){const[a,s,o]=this.getMatchedRoutes(e.pathname);let c=a,u=!1;(o?o.path!=="/"&&s["**"]:Dn(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const f=u?a1(this.options.notFoundMode,c):void 0,p=new Array(c.length),m=this._committed,y=(w,b)=>{const E=m[b];return E?.routeId===w.id?E:w===this.options.notFoundRoute?m.find(S=>S.routeId===w.id):void 0};let g;for(let w=0;w<c.length;w++){const b=c[w],E=p[w-1];let S,T,R;{const Z=E?.search??e.search,ge=E?._strictSearch??void 0;
11try{const ce=rc(b.options.validateSearch,{...Z})??void 0;S={...Z,...ce},T={...ge,...ce}}catch(ce){let U=ce;if(ce instanceof pc||(U=new pc(ce.message,{cause:ce})),t?.throwOnError)throw U;S=Z,T={},R=U}}let k="",j="";try{k=b.options.loaderDeps?.({search:S})??"",j=k&&JSON.stringify(k)||""}catch(Z){if(t?.throwOnError)throw Z;R??=Z}const $=tc(),K=b._interpolation?sv(b.fullPath,b._interpolation,s,this.pathParamsDecoder,$):b.fullPath,z=b.id+K+j,D=y(b,w),J=this._cache.get(z)??(D?.id===z?D:void 0);g=J?._strictParams??Object.assign($,g);let ee;if(!J)try{mv(b,g)}catch(Z){if(Nr(Z)||hh(Z)?ee=Z:ee=new ZA(Z.message,{cause:Z}),t?.throwOnError)throw ee}const ue=D?"stay":"enter";let V;if(J)V={...J,cause:ue,search:_s(D?D.search:J.search,S),_strictSearch:T,searchError:R};else{const Z=fv(b)?"pending":"success";V={id:z,ssr:b.options.ssr,index:w,routeId:b.id,params:D?.params??g,_strictParams:g,pathname:K,updatedAt:Date.now(),search:D?_s(D.search,S):S,_strictSearch:T,searchError:R,status:Z,isFetching:!1,error:void 0,paramsError:ee,context:{},abortController:t?._controller??new AbortController,cause:ue,loaderDeps:D?Ja(D.loaderDeps,k):k,invalid:!1,preload:!1,staticData:b.options.staticData||{},fullPath:b.fullPath}}const F=f===b.id;V._notFound&&!F&&(V.error=void 0),V._notFound=F,p[w]=V}for(let w=0;w<p.length;w++){const b=p[w];b.params=b.cause==="stay"?_s(b.params,g):g,t?._controller&&(b.context={})}return p}matchRoutesLightweight(e){const t=Ya(this.stores.ids.get()),a=t?this.stores.byRoute.get(t).get():void 0,s=a?.id,o=this.lightweightCache.get(e);if(o&&o[0]===s)return o[1];const[c,u]=this.getMatchedRoutes(e.pathname),f=Ya(c),p={...e.search};for(const w of c)try{Object.assign(p,rc(w.options.validateSearch,p))}catch{}const m=a&&a.routeId===f.id&&a.pathname===e.pathname;let y;if(m)y=a.params;else{const w=u;for(const b of c)try{mv(b,w)}catch{}y=w}const g=[c,f.fullPath,p,y];return this.lightweightCache.set(e,[s,g]),g}};async function pv(e,t,{replace:a,ignoreBlocker:s}){if(!nb(t,e.protocolAllowlist)){if(!s){const o=e.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:a?"REPLACE":"PUSH"}))return}e.history._ignoreNextBeforeUnload?.(t),a?window.location.replace(t):window.location.href=t}}var pc=class extends Error{},ZA=class extends Error{};function rc(e,t){if(e==null)return{};if("~standard"in e){const a=e["~standard"].validate(t);if(a instanceof Promise)throw new pc("Async validation not supported");if(a.issues)throw new pc(JSON.stringify(a.issues,void 0,2),{cause:a});return a.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function gf(e,t){if(e===void 0||e===!0)return t;const a=Object.create(null);return e===!1||e===null?a:typeof e=="function"?(Object.assign(a,t),Object.assign(a,e(a))):Object.assign(a,t,e)}function e1(e,t){return typeof e=="function"?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(a=>typeof a!="string"&&!ph.call(e,a[1]))}const yf=Object.freeze({});function t1(e,t){const a=[];for(let s=0;s<e.length;s++){const o=e[s].options;if("search"in o)o.search?.middlewares&&a.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const u=({search:f,next:p})=>{const m=p(o.preSearchFilters?o.preSearchFilters.reduce((y,g)=>g(y),f):f);return o.postSearchFilters?o.postSearchFilters.reduce((y,g)=>g(y),m):m};a.push(u)}const c=o.validateSearch;if(t&&c){const u=({search:f,next:p,meta:m})=>{const y=p(f);try{const g=rc(c,y);if(m&&g)for(const w in g)w in y||(m.defaulted||=new Map).set(w,g[w]);return{...y,...g}}catch{}return y};a.push(u)}}return a}function n1(e,t,a){const s=(o,c,u)=>{if(o>=e.length){if(!a.search)return{};if(a.search===!0)return c;const p=Z0(a.search,c);return u&&(u.explicit=p),p}const f=(p,m)=>{if(m){const y=u||{};return{search:s(o+1,p,y),meta:y}}return s(o+1,p,u)};return e[o]({search:c,next:f,meta:u})};return s(0,t)}function a1(e,t){if(e!=="root"){let a;for(let s=t.length-1;s>=0;s--){const o=t[s];if(o.options.notFoundComponent)return o.id;a||=o.children&&o.id}if(a)return a}return Ps}function mv(e,t){const a=e.options.params?.parse??e.options.parseParams;a&&Object.assign(t,a(t))}function qf(e,t){return e.options[t]?.preload?.()}function r1(e,t){const a=qf(e,"component");let s=qf(e,"pendingComponent");return t&&(s?s=s.then(t):t()),a&&s?Promise.all([a,s]).then(()=>{}):a??s}function ua(e,t,a){const s=()=>t===!1?void 0:t?qf(e,t):r1(e,a),o=e._lazy;if(o)return o===!0?s():o.then(s);if(!e.lazyFn)return s();const c=e.lazyFn().then(u=>{{const{id:f,...p}=u.options;Object.assign(e.options,p),e._lazy=!0}},u=>{throw e._lazy=void 0,u});return e._lazy=c,c.then(s)}function yh(e){const t=e.findIndex(a=>a.status!=="success"||a._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function mb(e){let t=e.length;for(let a=0;a<t;a++){const s=e[a];if(s._assetEnd!==void 0){t=Math.min(t,Math.max(a+1,s._assetEnd));continue}if(s.status!=="success"||s._notFound){t=a+1;break}}return t<e.length?e.slice(0,t):e}const Ln=0,da=1,Nc=2,Tt=3,Qa=[4];function eo(e){return typeof e[0]=="number"}function fa(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((a,s)=>{const o=()=>s(t);t.addEventListener("abort",o,{once:!0}),Promise.resolve(e).then(a,s).then(()=>t.removeEventListener("abort",o))})}function yn(e,t){return e.routesById[t.routeId]}function to(e,t,a){return hh(e)?[Tt,e]:Nr(e)?(e.routeId||=a,[Nc,e]):t?(typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{c
11ause:e})),[da,e]):[Ln,e]}function vh(e,t){let a=to(t,!0,e.id);if(a[0]!==da)return a;try{e.options.onError?.(a[1])}catch(s){a=to(s,!0,e.id)}return a}function Ji(e,t,a,s,o){return o[0].signal.aborted?Qa:_h(e,t,a,vh(a,s),o)}async function s1(e,t,a,s,o,c){const[u,f]=t,p=a[0].signal,m=!!a[3];for(let y=a[6]??0;y<s;y++){const g=f[y],w=yn(e,g);g.abortController=a[0];const b=f[y-1]?.context??e.options.context??{},E={params:g.params,location:u,navigate:k=>e.navigate({...k,_fromLocation:u}),buildLocation:e.buildLocation,cause:m?"preload":g.cause,abortController:a[0],preload:m,matches:f,routeId:w.id};try{const k=g._ctx||=w.options.context?w.options.context({...E,deps:g.loaderDeps,context:b})||{}:void 0;g.context={...b,...k}}catch(k){return ca(e,g),[y,Ji(e,t,w,k,a)]}if(p.aborted)return[y,Qa];const S=g.paramsError??g.searchError;if(S!==void 0)return ca(e,g),[y,Ji(e,t,w,S,a)];const T=w.options.beforeLoad;if(!T)continue;const R=g.status;y>=c&&(g.status="pending",a[7]?.());try{no(e,g,"beforeLoad",a[0]);const k=T({...E,search:g.search,context:g.context,...e.options.additionalContext}),j=await(typeof k?.then=="function"?fa(k,p):k);if(p.aborted)return[y,Qa];const $=_h(e,t,w,to(j,!1,w.id),a);if($[0]!==Ln)return ca(e,g),[y,$];g.context={...g.context,...j}}catch(k){return ca(e,g),[y,Ji(e,t,w,k,a)]}finally{g.status=R,no(e,g,!1,a[0])}}o()}function bh(e,t,a){if(!(!a||--a[2])){if(e._flights?.get(t.id)===a){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(t)&&s[3].some(o=>o.id===t.id)&&s[3].some(o=>o.isFetching==="beforeLoad"))return;e._flights.delete(t.id)}return a[1]}}function ca(e,t){const a=t._flight;t._flight=void 0,bh(e,t,a)?.abort()}function _t(e,t,a,s){const o=[];for(const c of t)if(!a?.includes(c)){const u=c._flight;if(c._flight=void 0,s&&u?.[2]===1&&e._flights?.get(c.id)===u&&a?.some(f=>f.id===c.id))u[2]=0;else{const f=bh(e,c,u);f&&o.push(f)}}for(const c of o)c.abort()}function wh(e){for(const t of e){const a=t._flight;a&&a[2]++}}function no(e,t,a,s){if(t.isFetching=a,s&&e._tx?.[0]!==s)return;const o=e.stores.byRoute.get(t.routeId),c=o?.get();c?.id===t.id&&o.set({...c,isFetching:a})}function gb(e,t,a,s,o,c,u){const f=t[0];return{params:a.params,location:f,navigate:p=>e.navigate({...p,_fromLocation:f}),cause:u?"preload":a.cause,abortController:o,preload:u,deps:a.loaderDeps,parentMatchPromise:c,context:a.context,route:s,...e.options.additionalContext}}async function gv(e,t,a,s,o,c,u){const f=u[0],p=f.signal;if(p.aborted)return Qa;if(!o)return[Ln,void 0];let m=a._flight;no(e,a,"loader",f);try{if(!m){const y=new AbortController;m=[Promise.resolve().then(()=>o(gb(e,t,a,s,y,c,!!u[3]))).then(g=>to(g,!1,s.id),g=>to(g,!0,s.id)).then(g=>(g[0]!==Ln&&e._flights?.get(a.id)===m&&(e._flights.delete(a.id),m[2]||y.abort()),g[0]===da&&m[2]?vh(s,g[1]):g)),y,1],(e._flights??=new Map).set(a.id,m)}return a._flight=m,a.abortController=m[1],_h(e,t,s,await fa(m[0],p),u)}catch(y){if(y!==p||!p.aborted)throw y;return ca(e,a),Qa}finally{no(e,a,!1,f)}}function yv(e,t,a){t[0]!==Tt&&(e.status="success",e.error=void 0,t[0]===Ln?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=a):e.invalid=!0)}function yb(e,t,a){const s=e._cache.get(t.id);if(s!==a||e._committed.some(c=>c.id===t.id&&c._flight===t._flight))return;const o={...t,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,e._cache.set(t.id,o),s&&ca(e,s)}function vv(e,t){return t[0]===da||t[0]===Nc?{...e,status:t[0]===da?"error":"notFound",error:t[1],_flight:void 0}:e}function i1(e,t,a,s,o,c,u){const f=t[1][a],p=yn(e,f),m=!!c[3],y=e._cache.get(f.id);let g,w=!1,b;try{if(f.status==="success"&&(g=p.options.shouldReload,typeof g=="function"&&(g=g(gb(e,t,f,p,c[0],o,m))),c[0].signal.aborted&&(b=Qa)),!b)if(f.status!=="success")w=!0;else{const F=m||f.preload?p.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:p.options.staleTime??e.options.defaultStaleTime??0;w=!!(f.invalid||g||g===void 0&&Date.now()-f.updatedAt>=F&&(c[5]||f.cause==="enter"||c[2].some(Z=>Z.routeId===f.routeId&&Z.id!==f.id)))}}catch(F){f.invalid=!0,ca(e,f),b=Ji(e,t,p,F,c)}const E=p.options.loader,S=typeof E=="function",T=S?E:E?.handler,R=!m||p.options.preload!==!1;let k=R&&E?e._flights?.get(f.id):void 0;k===f._flight||b?k=void 0:k&&!w&&!m&&g===void 0?w=!0:w||(k=void 0);const j=!!(E&&w&&f.status==="success"&&!m&&!c[4]&&((S?void 0:E.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),$=w&&R,K=$&&!j&&(f.status!=="success"||!!E),z=a>=u?c[7]:void 0,D=p.lazyFn&&p._lazy!==!0?z:void 0;
11if($&&!E&&(f.invalid=!1,f.updatedAt=Date.now()),k&&k[2]++,K){const F=f._flight;f._flight=k,bh(e,f,F)?.abort(),a>=u&&(f.status="pending"),z?.()}$||(f.isFetching=!1);const J=!b&&K?gv(e,t,f,p,T,o,c).then(F=>(yv(f,F,m),F[0]===Ln&&(E&&!c[0].signal.aborted&&yb(e,f,y),a>=u&&(f.status="pending")),F)):Promise.resolve(b??[Ln,f.loaderData]),ee=(async()=>{try{const Z=ua(p,void 0,D);Z&&await fa(Z,c[0].signal)}catch(Z){if(!t[1].some((ge,ce)=>ce<=a&&(ge.status==="error"||ge.status==="notFound"||ge._notFound)))return[a,Ji(e,t,p,Z,c)]}const F=await J;K&&F[0]===Ln&&f.status==="pending"&&!c[0].signal.aborted&&(f.status="success",z?.())})();if(s.push([a,J,ee]),!j)return J.then(F=>vv(f,F));const ue={...f,status:"pending",preload:!1,_flight:k};f.invalid=!1,f.isFetching="loader";const V=gv(e,t,ue,p,T,o,c).then(F=>(f.isFetching=!1,yv(ue,F,!1),F));return(t[2]??=[]).push([a,V,ee,ue]),V.then(F=>vv(ue,F))}async function Hf(e,t,a,s,o=0){const c=a?.[1][1];let u=c?.routeId?t.findIndex(f=>f.routeId===c.routeId):a?.[0]??t.length-1;u<0&&(u=0);for(let f=u;f>=0;f--){const p=yn(e,t[f]);try{const m=ua(p,!1);m&&await fa(m,s)}catch(m){if(m===s&&s.aborted)throw m}if(p.options.notFoundComponent)return f}return c?.routeId?u:o}function jr(e,t){t[2]&&(_t(e,t[2].map(a=>a[3])),t[2]=void 0)}async function bv(e,t,a,s){let o;try{await Promise.all(e.map(c=>c[1].then(async u=>{const f=c[0];if(!(s&&f>=await s)){if(u[0]>=Tt)throw[f,u];!o&&u[0]!==Ln&&(o=[f,u],await Promise.all((a??[]).map(p=>{if(!(p[0]<=f))return p[1].then(m=>{if(m[0]===Tt)throw[p[0],m]})})))}})))}catch(c){return c}return t??o}function _h(e,t,a,s,o,c){for(;s[0]===Tt;){const u=s[1],f=u.options;try{if((f.href||u.headers.has("Location"))&&(e.resolveRedirect(u),f.reloadDocument)||(f.reloadDocument?o[3]:o[1]>=20))return s;const p=e.buildLocation({...f,_fromLocation:t[0],_includeValidateSearch:!0}),m=p.maskedLocation??p;if(m.external){const y=u.clone();return y.options={...f},y.headers.set("Location",m.publicHref),e.resolveRedirect(y),o[3]?[Tt,y]:[Tt,y,m]}return[Tt,u,p]}catch(p){s=c?[da,p]:vh(a,p),c=!0}}return s}async function vb(e,t,a,s,o,c){const u=t[1];let f=await o,p=!1;const m=u.findIndex(b=>b._notFound),y=b=>b[1][0]===Nc?Hf(e,u,b,s.signal):b[0];let g=m<0?u.length:m;if((f?.[1][0]??0)>=Tt)g=0;else if(f){g=f[2]??=await y(f);for(const b of a){if(b[0]>=g)break;const E=await b[1];if(E[0]!==Ln&&E[0]<Tt&&!("loaderData"in u[b[0]])){f=[b[0],E],g=f[2]=await y(f);break}}}for(const b of a){if(b[0]>=g)break;const E=await b[2];if(E){f=E;break}}if((f?.[1][0]??0)>=Tt){const b=f[1];if(b[0]!==Tt||b[1].options.reloadDocument||b[2])return jr(e,t),b;p=!0,f=[0,[da,new Error("Too many redirects")]]}const w=f?f[2]??await y(f):m;if(w>=0){const b=f?.[1],E=b?.[0],S=u[w],T=b?.[1],R=()=>{b&&(S._notFound=void 0,E===da?S.status="error":(T.routeId=S.routeId,S.routeId===e.routeTree.id?(S.status="success",S._notFound=!0):S.status="notFound"),S.error=T,S.isFetching=!1)};R(),b||c?.();const k=yn(e,S);try{await fa(b?Promise.resolve().then(()=>ua(k,E===da?"errorComponent":"notFoundComponent")):Promise.all([ua(k),ua(k,"notFoundComponent")]),s.signal)}catch(j){if(j===s.signal&&s.signal.aborted)return jr(e,t),Qa}b?p&&(s.abort(),await Promise.all([...a.map(j=>j[1]),...a.map(j=>j[2]),...(t[2]??[]).map(j=>j[1])]),jr(e,t),_t(e,u),R()):S.status="success"}return t}async function Sh(e,t,a,s=0,o=t[1].length){const c=t[1];for(let u=s;u<o;u++){const f=c[u],p=yn(e,f).options;if(p.head||p.scripts)try{const m={ssr:e.options.ssr,matches:c,match:f,params:f.params,loaderData:f.loaderData},[y,g]=await fa(Promise.all([p.head?.(m),p.scripts?.(m)]),a);f.meta=y?.meta,f.links=y?.links,f.headScripts=y?.scripts,f.styles=y?.styles,f.scripts=g}catch(m){if(m===a&&a.aborted)break;console.error(m)}if(f.status!=="success"||f._notFound)break}return t}async function bb(e,t,a,s){const o=[t,a],c=s[0].signal;let u;try{const f=e.stores.matches.get();let p=a.findIndex(R=>R._notFound);if(e.options.notFoundMode!=="root"&&p>=0){const R=await Hf(e,a,void 0,c,p);a[p]._notFound=void 0,a[R]._notFound=!0,p=R}let m=p<0?a.length:p+1,y=0;for(;y<m&&y!==p;){const R=a[y],k=s[2][y],j=f[y];if(k?.id!==R.id||k.status!=="success"||R.preload||j?.id!==R.id||j.status!=="success"||(y++,k._notFound||j._notFound))break}const g=[],w=s[6]??0;let b=w?Promise.resolve(a[w-1]):void 0;const E=()=>{for(let R=w;R<m&&!c.aborted;R++)b=i1(e,o,R,g,b,s,y)},S=await s1(e,o,s,m,E,y);if(S){if(s[4]=!0,m=S[0],S[1][0]===Nc){const R=await Hf(e,a,S,c);S[2]=R,m=Math.min(m,R+1)}else S[1][0]>=Tt&&(m=0);E()}if(!c.aborted&&!s[3]){const R=[];for(const[k,j]of e._flights??[])j[2]||(e._flights.delete(k),R.push(j[1]));for(const k of R)k.abort()}const T=vb(e,o,g,s[0],bv(g,S,o[2]),s[7]);
11o[2]?.length&&(o[3]=bv(o[2],void 0,void 0,T.then(R=>eo(R)?0:yh(a).length,()=>0))),u=await T}catch(f){if(jr(e,o),f===c&&c.aborted)return Qa;throw f}return eo(u)?u:Sh(e,u,c,s[6]===a.length?s[6]:0)}function Gf(e,t){if(e._tx!==t)return;const a=t[3],s=e.stores.matches.get();let o=e._pending;for(let c=0;c<a.length;c++){const u=a[c],f=u.status==="success"&&!u._notFound,p=s[c]?.id===u.id&&s[c]?.status==="pending";if(f&&!p)continue;const m=yn(e,u),y=f||u.invalid?0:m.options.pendingMs??e.options.defaultPendingMs,g=m.options.pendingComponent??e.options.defaultPendingComponent;if(!g||typeof y!="number"||y===1/0){o&&(o[0]=t,o[2]=0,o[4]=!0);return}const w=m.options.pendingMinMs??e.options.defaultPendingMinMs??0;let b=!1;if(o?.[1]===u.id?(b=o[0]!==t,o[0]=t):(clearTimeout(o?.[3]),e._pending=o=void 0),o||(e._pending=o=[t,u.id,p?Date.now()+w:t[4]+y,void 0,p||void 0,g]),o[4]&&!b&&o[5]===g)return;if(o[5]=g,!o[4]){clearTimeout(o[3]);const T=o[2]-Date.now();if(T>0){o[3]=setTimeout(()=>Gf(e,t),T);return}o[2]=0}const E=a.map(T=>({...T,_flight:void 0}));E[c].status="pending";const S=o[4]=e.startTransition(()=>e.stores.setMatches(E),E).then(T=>(T&&e._pending===o&&o[4]===S&&!o[2]&&(o[2]=Date.now()+w),T));return}}function zi(e,t){const a=e._pending;(e._tx===t||!e._tx?.[3].some(s=>s.id===a?.[1]))&&(clearTimeout(a?.[3]),e._pending=void 0)}async function wv(e,t){const a=e._pending;if(!a)return;clearTimeout(a[3]);const s=a[2]-Date.now();if(!a[4]||s<=0||!yh(t[3]).some(c=>c.id===a[1]))return;let o;try{await fa(new Promise(c=>{o=setTimeout(c,s)}),t[0].signal)}catch{}clearTimeout(o)}function wb(e,t){e._committed=t,e.stores.setMatches(t)}function o1(e,t,a,s){const o=e._committed,c=e._lifecycleEnd,u=e._cache;for(const y of a)y.preload=!1,s&&(y._assetEnd=void 0);const f=yh(a).length,p=new Map;{const y=Date.now(),g=new Set;for(let w=0;w<a.length;w++){const b=a[w];(w<f||b.status==="success")&&g.add(b.id)}for(const w of[...o,...u.values()]){if(w.status!=="success"||g.has(w.id))continue;const b=yn(e,w);!b.options.loader||y-w.updatedAt>=(w.preload?b.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:b.options.gcTime??e.options.defaultGcTime??3e5)||p.set(w.id,u.get(w.id)===w?w:{...w,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=p;const m=e._lifecycleEnd=pb(a);wb(e,a),_t(e,[...u.values(),...o].filter(y=>y._flight&&p.get(y.id)!==y),a),QA(e,o,a,c,m,t)}async function Bl(e,t){let a=e._tx;for(;a&&a!==t;)t=a,await a[5],a=e._tx}function _b(e,t,a){const s=a[1].options,o=a[2];if(!o)return e.navigate({...s,replace:!0,ignoreBlocker:!0});if(s.reloadDocument)return e.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=t[1]+1,e._pendingLocation=o;const c=e.commitLocation({...o,viewTransition:s.viewTransition,replace:!0,resetScroll:s.resetScroll,hashScrollIntoView:s.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===o&&(e._pendingLocation=void 0)}),c}async function l1(e,t,a,s,o){const c=a.map(p=>({...p}));wh(c);for(const p of s)ca(e,c[p[0]]),c[p[0]]=p[3];const u=[t[2],c];let f;try{f=await vb(e,u,s,t[0],o)}catch(p){throw _t(e,c),p}if(eo(f)){_t(e,c),f[0]===Tt&&e._tx===t&&e._committed===a&&await _b(e,t,f);return}if(await Sh(e,f,t[0].signal),e._tx!==t||e._committed!==a){_t(e,c);return}for(const p of c){const m=e._cache.get(p.id);m?._flight&&m._flight===p._flight&&(e._cache.delete(p.id),ca(e,m))}wb(e,c),_t(e,a,c)}async function c1(e,t,a,s,o,c){const u=await bb(e,t[2],t[3],[t[0],t[1],e._committed,void 0,o,a,c,s]);if(eo(u)){const g=u[0]===Tt&&e._tx===t;if((!g||u[1].options.reloadDocument)&&zi(e,t),_t(e,t[3]),t[3]=[],!g)return;if(e._tx!==t){zi(e,t);return}await _b(e,t,u);return}const f=u[1];if(e._tx===t&&await wv(e,t),e._tx!==t){zi(e,t),_t(e,f),jr(e,u);return}const p=t[2],m=jc(p,e.stores.resolvedLocation.get()),y=u[2];await e.startViewTransition(async()=>{if(e._tx===t&&await wv(e,t),e._tx!==t){zi(e,t),_t(e,f),jr(e,u);return}const g=()=>{zi(e,t),o1(e,t,f,c),e._tx===t&&(e.emit({type:"onLoad",...m}),e._tx===t&&e.emit({type:"onBeforeRouteMount",...m}))},w=await e.startTransition(g,f);if(e._tx!==t){jr(e,u);return}y?.length&&l1(e,t,f,y,u[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(p),e.stores.status.set("idle"),e._tx===t&&e.emit({type:"onResolved",...m}),w&&e._tx===t&&e.emit({type:"onRendered",...m})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function u1(e,t){const a=e._tx,s=e.stores.resolvedLocation.get(),o=s??e.stores.location.get(),c=e.latestLocation,u=e._pendingLocation,f=u?.href===c.href?u._redirects??0:0,p=e._handoff,m=p?.[0](),y=new AbortController,g=e._preflight;if(e._preflight=y,m||p?.[1](),g?.abort(),!y.signal.aborted){const $=jc(c,s);e.emit({type:"onBeforeNavigate",...$}),y.signal.aborted||e.emit({type:"onBeforeLoad",...$})}if(y.signal.aborted){await Bl(e,a);return}const w=o.href===c.href;let b=y;const E=e.matchRoutes(c,{_controller:y});wh(E);const S=m?p[1](E):void 0;if(S?b=m:m?.abort(),y.signal.aborted){_t(e,E),await Bl(e,a);return}e._preflight=void 0;let T;const R=()=>c1(e,j,w,()=>Gf(e,j),t?.sync,S),k=t?.sync?new Promise($=>
11T=$):Promise.resolve().then(R),j=[b,f,c,E,Date.now(),k.then(()=>Bl(e,j))];if(e._tx=j,a){for(const $ of e.stores.matches.get()){if(e._tx!==j)break;$.isFetching&&no(e,$,!1)}a[0].abort(),_t(e,a[3],j[3],!0)}if(e._tx!==j){_t(e,j[3]),j[3]=[],T?.(),await Bl(e,j);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(c)}),(S||!e._committed.length&&E[0]?.status!=="success"&&!E.some($=>$._notFound))&&Gf(e,j),T?.(R()),await j[5]}async function d1(e,t){let a=e.buildLocation(t);for(let s=0;;s++){const o=e._committed,c=new AbortController;let u,f,p;try{try{u=e.matchRoutes(a,{_controller:c}),wh(u),f=(e._preloads??=new Map).set(c,u),p=await bb(e,a,u,[c,s,o,!0])}finally{f&&(f=f.delete(c),_t(e,u)),c.abort()}if(!eo(p))return p[1];if(!f||p.length<3)return;a=p[2]}catch(m){Nr(m)||console.error(m);return}}}async function f1(e){const t=window.$_TSR,a=e.options.serializationAdapters;a?.length&&(t.t=new Map(a.map(V=>[V.key,V.fromSerializable])),t.buffer.forEach(V=>V())),t.initialized=!0;const s=t.router;e.ssr={manifest:s.manifest},e.options.ssr={nonce:document.querySelector('meta[property="csp-nonce"]')?.content};const o=s.matches,c=new AbortController,u=e._preflight;e._preflight=c,u?.abort();const f=()=>e._preflight===c;let p,m,y,g;try{if(await fa(e.options.hydrate?.(s.dehydratedData),c.signal),!f())return;const V=e.history.location;y=V.href,g=V.state,e.updateLatestLocation(),p=e.latestLocation,e.stores.location.set(p),m=e.matchRoutes(p,{_controller:c})}
11catch(V){if(f()&&(e._preflight=void 0),c.abort(V),V!==c.signal)throw V}if(!f())return;const w=[];let b,E=0;const S=V=>{E=Math.min(E,V+1);const F=w.splice(V);for(const Z of F)yn(e,Z).options.loader&&(Z.status==="success"||!Z.invalid&&"loaderData"in Z)&&yb(e,{...Z,status:"success",error:void 0,preload:!0},e._cache.get(Z.id));_t(e,F)},T=o.length>m.length?m.findIndex(V=>V._notFound)+1:o.length;let R=!1;for(let V=0;V<T;V++){const F=m[V],Z=o[V];if(typeof Z.i!="string"||dA(Z.i)!==F.id){b??=V;break}E=V+1;const ge=yn(e,F);if(("l"in Z||Z.s==="success"&&Z.e===void 0&&ge.options.loader)&&(F.loaderData=Z.l),F.status=Z.s,F.ssr=Z.ssr,ge.options.ssr=F.ssr,F.updatedAt=Z.u,F.error=Z.e,F._notFound||=Z.g,F.status==="error"||F.status==="notFound"||F._notFound){R=!0,w.push(F),(F.ssr===!1||F.ssr==="data-only")&&(b??=V);break}if(F.status==="pending"){b??=V;break}w.push(F),F.ssr==="data-only"&&(b??=V)}!R&&w.length===T&&T<m.length&&(b=T);const k=w.map(async V=>{try{const F=yn(e,V);return await(V._notFound?Promise.all([ua(F),ua(F,"notFoundComponent")]):ua(F,V.status==="error"?"errorComponent":V.status==="notFound"?"notFoundComponent":void 0)),!0}catch{return!1}});let j=0;try{for(;j<k.length&&await fa(k[j],c.signal);)j++}catch{return}if(!f())return;j<w.length&&S(j);const $=Math.max(b===w.length?w.length+1:w.length,j<k.length?j:E);for(let V=0;V<$;V++){const F=m[V],Z=yn(e,F),ge=m[V-1]?.context??e.options.context??{};let ce;if(Z.options.context){try{ce=F._ctx=Z.options.context({deps:F.loaderDeps,params:F.params,context:ge,location:p,navigate:U=>e.navigate({...U,_fromLocation:p}),buildLocation:e.buildLocation,cause:F.cause,abortController:c,preload:!1,matches:m,routeId:Z.id})||{}}catch{if(!f())return;if(F.status!=="error"&&F.status!=="notFound"&&!F._notFound){b=Math.min(b??V,V),S(V);break}}if(!f())return}F.context={...ge,...ce,...w[V]&&o[V].b}}if(await Sh(e,[p,m],c.signal,0,E),!f())return;const K=b!==void 0||w.length<T,z=R&&w.length===T?m:w;let D=K?m:z,J;if(K&&b!==void 0){const V=D[b];J=V.ssr==="data-only"&&E>b+1?E:void 0,D=D.slice(),D[b]={...V,status:"pending",ssr:V.ssr==="data-only"?"data-only":!1,_assetEnd:J}}const ee=()=>{const V=e.history.location;return K&&!e._tx&&V.href===y&&V.state===g&&e._committed===z&&z.length&&!c.signal.aborted?c:void 0},ue=[ee,V=>{if(e._handoff!==ue)return;e._handoff=void 0;const F=z.length;if(!V||!ee()||z.some((ce,U)=>ce.id!==V[U]?.id)){c.abort();return}let Z=J;if(Z!==void 0){for(let ce=F;ce<Z;ce++)if(m[ce]?.id!==V[ce]?.id){Z=ce>b+1?ce:void 0;break}}const ge=z.map(ce=>({...ce}));Z!==void 0&&(ge[b]._assetEnd=Z),_t(e,V.splice(0,F,...ge));for(let ce=F;ce<V.length;ce++){const U=V[ce],Y=m[ce];Y?.id===U.id&&Y._ctx&&(U._ctx=Y._ctx),U.abortController=c}return F}];e._committed=z,e._lifecycleEnd=pb(z),e._handoff=ue,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(D),e.stores.status.set("idle"),K||e.stores.resolvedLocation.set(e.stores.location.get())})}const ha=Symbol.asyncIterator,Sb=Symbol.hasInstance,Us=Symbol.isConcatSpreadable,pa=Symbol.iterator,Eb=Symbol.match,Ab=Symbol.matchAll,Tb=Symbol.replace,Rb=Symbol.search,Cb=Symbol.species,Ob=Symbol.split,xb=Symbol.toPrimitive,Is=Symbol.toStringTag,kb=Symbol.unscopables,jb={[ha]:0,[Sb]:1,[Us]:2,[pa]:3,[Eb]:4,[Ab]:5,[Tb]:6,[Rb]:7,[Cb]:8,[Ob]:9,[xb]:10,[Is]:11,[kb]:12},h1={0:ha,1:Sb,2:Us,3:pa,4:Eb,5:Ab,6:Tb,7:Rb,8:Cb,9:Ob,10:xb,11:Is,12:kb},p1={2:!0,3:!1,1:void 0,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:NaN},m1={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},g1={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function ke(e,t,a,s,o,c,u,f,p,m,y,g){return{t:e,i:t,s:a,c:s,m:o,p:c,e:u,a:f,f:p,b:m,o:y,l:g}}function Za(e){return ke(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}const Nb=Za(2),Db=Za(3),y1=Za(1),v1=Za(0),b1=Za(4),w1=Za(5),_1=Za(6),S1=Za(7),E1=64,A1=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function T1(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
12`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return}}function Lr(e){if(e.length>=E1&&!A1.test(e))return JSON.stringify(e).slice(1,-1);let t="",a=0,s;for(let o=0,c=e.length;o<c;o++)s=T1(e[o]),s&&(t+=e.slice(a,o)+s,a=o+1);return a===0?t=e:t+=e.slice(a),t}function R1(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
13`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function er(e){return typeof e=="string"&&!e.includes("\\")?e:e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,R1)}
13const C1={parsing:1,serialization:2,deserialization:3};function O1(e){return`Seroval Error (step: ${C1[e]})`}const x1=(e,t)=>O1(e);var Lb=class extends Error{constructor(e,t){super(x1(e)),this.cause=t}},_v=class extends Lb{constructor(e){super("parsing",e)}},k1=class extends Lb{constructor(e){super("deserialization",e)}};function ma(e){return`Seroval Error (specific: ${e})`}var Mr=class extends Error{constructor(e){super(ma(1)),this.value=e}},Eh=class extends Error{constructor(e){super(ma(2))}},j1=class extends Error{constructor(e){super(ma(3))}},Dc=class extends Error{constructor(e){super(ma(4))}},N1=class extends Error{constructor(e){super(ma(5)),this.value=e}},D1=class extends Error{constructor(e){super(ma(6))}},L1=class extends Error{constructor(e){super(ma(7))}},ft=class extends Error{constructor(e){super(ma(8))}},Mb=class extends Error{constructor(e){super(ma(9))}};const ql="__SEROVAL_REFS__",Pb=new Map,js=new Map;function Ub(e){return Pb.has(e)}function M1(e){return js.has(e)}function P1(e){if(Ub(e))return Pb.get(e);throw new N1(e)}function U1(e){if(M1(e))return js.get(e);throw new D1(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,ql,{value:js,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,ql,{value:js,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,ql,{value:js,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,ql,{value:js,configurable:!0,writable:!1,enumerable:!1});function Ah(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function I1(e){const t=m1[Ah(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Ib(e,t){let a=I1(e);const s=Object.getOwnPropertyNames(e);for(let o=0,c=s.length,u;o<c;o++)u=s[o],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(a=a||{},a[u]=e[u]):(a=a||{},a[u]=e[u]));return a}function zb(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function z1(e){switch(e){case Number.POSITIVE_INFINITY:return w1;case Number.NEGATIVE_INFINITY:return _1}return e!==e?S1:Object.is(e,-0)?b1:ke(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function $b(e){return ke(1,void 0,Lr(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function $1(e){return ke(3,void 0,""+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function B1(e){return ke(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function q1(e,t){const a=t.valueOf();return ke(5,e,a!==a?"":t.toISOString(),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Ba(e,t,a){return ke(36,e,a.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function H1(e,t){return ke(6,e,void 0,Lr(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function G1(e,t){return ke(17,e,jb[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function V1(e,t){return ke(18,e,Lr(P1(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function F1(e,t,a){return ke(25,e,a,Lr(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function J1(e,t,a){return ke(9,e,void 0,void 0,void 0,void 0,void 0,a,void 0,void 0,zb(t),void 0)}function W1(e,t){return ke(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}const Th=1e6;function K1(e,t,a){if(t.length>Th)throw new Mr(t);return ke(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,a,t.byteOffset,void 0,t.length)}function Y1(e,t,a){if(t.length>Th)throw new Mr(t);return ke(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,a,t.byteOffset,void 0,t.length)}function Q1(e,t,a){if(t.byteLength>Th)throw new Mr(t);return ke(20,e,void 0,void 0,void 0,void 0,void 0,void 0,a,t.byteOffset,void 0,t.byteLength)}function X1(e,t,a){return ke(13,e,Ah(t),void 0,Lr(t.message),a,void 0,void 0,void 0,void 0,void 0,void 0)}function Z1(e,t,a){return ke(14,e,Ah(t),void 0,Lr(t.message),a,void 0,void 0,void 0,void 0,void 0,void 0)}function eT(e,t){return ke(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function tT(e,t){return ke(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function nT(e,t){return ke(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function aT(e,t,a){return ke(31,e,void 0,void 0,void 0,void 0,void 0,a,t,void 0,void 0,void 0)}function rT(e,t){return ke(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function sT(e,t){return ke(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function iT(e,t){return ke(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function oT(e,t,a,s){return ke(35,e,a,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,s)}var lT=class{constructor(e,t){this.value=e,this.replacement=t}};const Rh=()=>{const e={p:0,s:0,f:0};return e.p=new Promise((t,a)=>{e.s=t,e.f=a}),e},cT=e=>t=>()=>{let a=0;const s={[e](){return s},next(){if(a>t.d)return{done:!0,value:void 0};const o=a++,c=t.v[o];if(o===t.t)throw c;return{done:o===t.d,value:c}}};return s},uT=(e,t)=>
13a=>()=>{let s=0,o=-1,c=!1;const u=[],f=[],p={finalize(y=0,g=f.length){for(;y<g;y++)f[y].s({done:!0,value:void 0})}};a.on({next(y){const g=f.shift();g&&g.s({done:!1,value:y}),u.push(y)},throw(y){const g=f.shift();g&&g.f(y),p.finalize(),o=u.length,c=!0,u.push(y)},return(y){const g=f.shift();g&&g.s({done:!0,value:y}),p.finalize(),o=u.length,u.push(y)}});const m={[e](){return m},next(){if(o===-1){const w=s++;if(w>=u.length){const b=t();return f.push(b),b.p}return{done:!1,value:u[w]}}if(s>o)return{done:!0,value:void 0};const y=s++,g=u[y];if(y!==o)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return m},dT=e=>{const t=atob(e),a=t.length,s=new Uint8Array(a);for(let o=0;o<a;o++)s[o]=t.charCodeAt(o);return s.buffer};var Bb=class{constructor(e,t,a){this.v=e,this.t=t,this.d=a}};function qb(e){return e instanceof Bb}function Hb(e,t,a){return new Bb(e,t,a)}function fT(e){const t=[];let a=-1,s=-1;const o=e[pa]();for(;;)try{const c=o.next();if(t.push(c.value),c.done){s=t.length-1;break}}catch(c){a=t.length,s=a,t.push(c);break}return Hb(t,a,s)}const hT=cT(pa);function pT(e){return hT(e)}const mT={},gT={},yT={0:{},1:{},2:{},3:{},4:{},5:{}};function Gb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vT(e,t){Gb(e,t),t.add(e)}function $i(e,t,a){Gb(e,t),t.set(e,a)}function Ns(e,t,a){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:a;throw new TypeError("Private element is not present on this object")}function Be(e,t){return e.get(Ns(e,t))}function Es(e,t,a){return e.set(Ns(e,t),a),a}var Ds=new WeakMap,na=new WeakMap,aa=new WeakMap,sc=new WeakMap,dn=new WeakMap,Bi=new WeakSet,Vb=class{constructor(){vT(this,Bi),$i(this,Ds,[]),$i(this,na,[]),$i(this,aa,!0),$i(this,sc,!1),$i(this,dn,0)}on(e){let t=Be(aa,this),a=0;if(t){for(;a<Be(dn,this)&&Be(na,this)[a];a++);if(a===Be(dn,this)){var s;Es(dn,this,(s=Be(dn,this),s++,s))}Be(na,this)[a]=e}return Ns(Bi,this,bT).call(this,e),()=>{if(Be(aa,this)&&t){for(t=!1,Be(na,this)[a]=void 0;Be(dn,this)>0&&!Be(na,this)[Be(dn,this)-1];){var o;Es(dn,this,(o=Be(dn,this),o--,o))}Be(na,this).length=Be(dn,this)}}}next(e){Be(aa,this)&&(Be(Ds,this).push(e),Ns(Bi,this,vf).call(this,e,"next"))}throw(e){Be(aa,this)&&(Be(Ds,this).push(e),Ns(Bi,this,vf).call(this,e,"throw"),Es(aa,this,!1),Es(sc,this,!1),Be(na,this).length=0)}return(e){Be(aa,this)&&(Be(Ds,this).push(e),Ns(Bi,this,vf).call(this,e,"return"),Es(aa,this,!1),Es(sc,this,!0),Be(na,this).length=0)}};function vf(e,t){for(let s=0;s<Be(dn,this);s++){var a;(a=Be(na,this)[s])===null||a===void 0||a[t](e)}}function bT(e){for(let t=0,a=Be(Ds,this).length;t<a;t++){const s=Be(Ds,this)[t];!Be(aa,this)&&t===a-1?e[Be(sc,this)?"return":"throw"](s):e.next(s)}}function Ch(e){return e instanceof Vb}function bo(){return new Vb}function wT(e,t){const a=bo(),s=e[ha]();let o=!1,c=!1;async function u(){try{for(;!o;){const f=await s.next();if(f.done){c=!0,a.return(f.value);break}a.next(f.value)}}catch(f){c=!0,a.throw(f)}}return u().catch(()=>{}),a}const _T=uT(ha,Rh);function ST(e){return _T(e)}async function ET(e){try{return[1,await e]}catch(t){return[0,t]}}function AT(e,t){var a;return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3,compactArrayBufferViews:(a=t.compactArrayBufferViews)!==null&&a!==void 0?a:!1}}function ic(e,t){e.marked.add(t)}function TT(e,t){const a=e.refs.size;return e.refs.set(t,a),a}function Lc(e,t){const a=e.refs.get(t);return a!=null?(ic(e,a),{type:1,value:B1(a)}):{type:0,value:TT(e,t)}}function Oh(e,t){const a=Lc(e,t);return a.type===1?a:Ub(t)?{type:2,value:V1(a.value,t)}:a}function Rr(e,t){const a=Oh(e,t);if(a.type!==0)return a.value;if(t in jb)return G1(a.value,t);throw new Mr(t)}function Mc(e,t){const a=Lc(e,yT[t]);return a.type===1?a.value:ke(26,a.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function RT(e){const t=Lc(e,mT);return t.type===1?t.value:ke(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,Rr(e,pa),void 0,void 0,void 0)}function CT(e){const t=Lc(e,gT);return t.type===1?t.value:ke(29,t.value,void 0,void 0,void 0,void 0,void 0,[Mc(e,1),Rr(e,ha)],void 0,void 0,void 0,void 0)}function OT(e,t,a,s){return ke(a?11:10,e,void 0,void 0,void 0,s,void 0,void 0,void 0,void 0,zb(t),void 0)}function xT(e,t,a,s){return ke(8,t,void 0,void 0,void 0,void 0,{k:a,v:s},void 0,Mc(e,0),void 0,void 0,void 0)}function xh(e,t){if(!e.compactArrayBufferViews)return t;const a=new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer,s=t.constructor;return new s(a)}function kT(e){if(typeof Buffer<"u")return Buffer.from(e).toString("base64");const t=new Uint8Array(e);if(typeof t.toBase64=="function")return t.toBase64();let a="";for(let s=0,o=t.length;s<o;s++)a+=String.fromCharCode(t[s]);return btoa(a)}function jT(e,t,a){return ke(19,t,kT(a),void 0,void 0,void 0,void 0,void 0,Mc(e,5),void 0,void 0,void 0)}function NT(e,t){return{base:AT(e,t),child:void 0}}var DT=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return lt(this._p,this.depth,e)}};async function LT(e,t,a){const s=[];for(let o=0,c=a.length;o<c;o++)o in a?s[o]=await lt(e,t,a[o]):s[o]=0;return s}async function MT(e,t,a,s){return J1(a,s,await LT(e,t,s))}async function kh(e,t,a){const s=Object.entries(a),o=[],c=[];for(let u=0,f=s.length;u<f;u++)o.push(Lr(s[u][0])),c.push(await lt(e,t,s[u][1]));return pa in a&&(o.push(Rr(e.base,pa)),c.push(tT(RT(e.base),await lt(e,t,fT(a))))),ha in a&&(o.push(Rr(e.base,ha)),c.push(nT(CT(e.base),await lt(e,t,wT(a))))),Is in a&&(o.push(Rr(e.base,Is)),c.push($b(a[Is]))),Us in a&&(o.push(Rr(e.base,Us)),c.push(a[Us]?Nb:Db)),{k:o,v:c}}
13async function bf(e,t,a,s,o){return OT(a,s,o,await kh(e,t,s))}async function PT(e,t,a,s){return W1(a,await lt(e,t,s.valueOf()))}async function UT(e,t,a,s){return s=xh(e.base,s),K1(a,s,await lt(e,t,s.buffer))}async function IT(e,t,a,s){return s=xh(e.base,s),Y1(a,s,await lt(e,t,s.buffer))}async function zT(e,t,a,s){return s=xh(e.base,s),Q1(a,s,await lt(e,t,s.buffer))}async function Sv(e,t,a,s){const o=Ib(s,e.base.features);return X1(a,s,o?await kh(e,t,o):void 0)}async function $T(e,t,a,s){const o=Ib(s,e.base.features);return Z1(a,s,o?await kh(e,t,o):void 0)}async function BT(e,t,a,s){const o=[],c=[];for(const[u,f]of s.entries())o.push(await lt(e,t,u)),c.push(await lt(e,t,f));return xT(e.base,a,o,c)}async function qT(e,t,a,s){const o=[];for(const c of s.keys())o.push(await lt(e,t,c));return eT(a,o)}async function Fb(e,t,a,s){const o=e.base.plugins;if(o)for(let c=0,u=o.length;c<u;c++){const f=o[c];if(f.parse.async&&f.test(s))return F1(a,f.tag,await f.parse.async(s,new DT(e,t),{id:a}))}}async function HT(e,t,a,s){const[o,c]=await ET(s);return ke(12,a,o,void 0,void 0,void 0,void 0,void 0,await lt(e,t,c),void 0,void 0,void 0)}function GT(e,t,a,s,o){const c=[],u=a.on({next:f=>{ic(this.base,t),lt(this,e,f).then(p=>{c.push(rT(t,p))},p=>{o(p),u()})},throw:f=>{ic(this.base,t),lt(this,e,f).then(p=>{c.push(sT(t,p)),s(c),u()},p=>{o(p),u()})},return:f=>{ic(this.base,t),lt(this,e,f).then(p=>{c.push(iT(t,p)),s(c),u()},p=>{o(p),u()})}})}async function VT(e,t,a,s){return aT(a,Mc(e.base,4),await new Promise(GT.bind(e,t,a,s)))}async function FT(e,t,a,s){const o=[];for(let c=0,u=s.v.length;c<u;c++)o[c]=await lt(e,t,s.v[c]);return oT(a,o,s.t,s.d)}async function JT(e,t,a,s){if(Array.isArray(s))return MT(e,t,a,s);if(Ch(s))return VT(e,t,a,s);if(qb(s))return FT(e,t,a,s);let o=s.constructor;if(o!==void 0&&typeof o!="function"){const f=Object.getPrototypeOf(s);o=f===null?void 0:f.constructor}if(o===lT)return lt(e,t,s.replacement);const c=await Fb(e,t,a,s);if(c)return c;switch(o){case Object:return bf(e,t,a,s,!1);case void 0:return bf(e,t,a,s,!0);case Date:return q1(a,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Sv(e,t,a,s);case Number:case Boolean:case String:case BigInt:return PT(e,t,a,s);case ArrayBuffer:return jT(e.base,a,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return UT(e,t,a,s);case DataView:return zT(e,t,a,s);case Map:return BT(e,t,a,s);case Set:return qT(e,t,a,s)}if(o===Promise||s instanceof Promise)return HT(e,t,a,s);const u=e.base.features;if(u&32&&o===RegExp)return H1(a,s);if(u&16)switch(o){case BigInt64Array:case BigUint64Array:return IT(e,t,a,s)}if(u&1&&typeof AggregateError<"u"&&(o===AggregateError||s instanceof AggregateError))return $T(e,t,a,s);if(u&64&&typeof Temporal<"u")switch(o){case Temporal.Instant:return Ba(a,0,s);case Temporal.Duration:return Ba(a,1,s);case Temporal.PlainDate:return Ba(a,2,s);case Temporal.PlainDateTime:return Ba(a,3,s);case Temporal.PlainMonthDay:return Ba(a,4,s);case Temporal.PlainTime:return Ba(a,5,s);case Temporal.PlainYearMonth:return Ba(a,6,s);case Temporal.ZonedDateTime:return Ba(a,7,s)}if(s instanceof Error)return Sv(e,t,a,s);if(pa in s||ha in s)return bf(e,t,a,s,!!o);throw new Mr(s)}async function WT(e,t,a){const s=Oh(e.base,a);if(s.type!==0)return s.value;const o=await Fb(e,t,s.value,a);if(o)return o;throw new Mr(a)}async function lt(e,t,a){if(t>=e.base.depthLimit)throw new Mb(e.base.depthLimit);switch(typeof a){case"boolean":return a?Nb:Db;case"undefined":return y1;case"string":return $b(a);case"number":return z1(a);case"bigint":return $1(a);case"object":if(a){const s=Oh(e.base,a);return s.type===0?await JT(e,t+1,s.value,a):s.value}return v1;case"symbol":return Rr(e.base,a);case"function":return WT(e,t,a);default:throw new Mr(a)}}async function KT(e,t){try{return await lt(e,0,t)}catch(a){throw a instanceof _v?a:new _v(a)}}function Jb(e,t){for(let a=0,s=t.length;a<s;a++){const o=t[a];e.has(o)||(e.add(o),o.extends&&Jb(e,o.extends))}}function Wb(e){if(e){const t=new Set;return Jb(t,e),[...t]}}function YT(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new L1(e)}}function QT(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function XT(e){switch(e){case ha:case Us:case Is:case pa:return!0;default:return!1}}const ZT=1e6,eR=512,tR=1e4,nR=2e4;function Kb(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}const aR=1e3;function rR(e,t){var a,s;const o=(a=t.maxBase64Length)!==null&&a!==void 0?a:ZT;if(!Number.isSafeInteger(o)||o<0)throw new RangeError("maxBase64Length must be a non-negative safe integer");const c=t.refs||new Map;return"types"in c||Object.assign(c,{types:new Map}),{mode:e,plugins:t.plugins,refs:c,features:(s=t.features)!==null&&s!==void 0?s:127^(t.disabledFeatures||0),depthLimit:t.depthLimit||aR,maxBase64Length:o}}
13function sR(e){return{mode:2,base:rR(2,e),child:void 0}}var iR=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Fe(this._p,this.depth,e)}};function Yb(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new ft({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function Qb(e){return!!e&&(typeof e=="object"||typeof e=="function")&&"then"in e&&typeof e.then=="function"}function oR(e,t,a){return Yb(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,a),a}function lR(e,t,a){return Yb(e.base,t),e.base.refs.set(t,a),a}function it(e,t,a){return e.mode===1?oR(e,t,a):lR(e,t,a)}function Vf(e,t,a){if(Object.hasOwn(t,a))return t[a];throw new ft(e)}function cR(e,t){return it(e,t.i,U1(er(t.s)))}function Xa(e,t){if(!Array.isArray(t))throw new ft(e)}function uR(e,t,a){const s=a.a;Xa(a,s);const o=s.length,c=it(e,a.i,new Array(o));for(let u=0,f;u<o;u++)f=s[u],f&&(c[u]=Fe(e,t,f));return Kb(c,a.o),c}function Ev(e,t,a){QT(t)?e[t]=a:Object.defineProperty(e,t,{value:a,configurable:!0,enumerable:!0,writable:!0})}function dR(e,t,a,s,o){if(typeof s=="string")Ev(a,er(s),Fe(e,t,o));else{const c=Fe(e,t,s);switch(typeof c){case"string":Ev(a,c,Fe(e,t,o));break;case"symbol":XT(c)&&(a[c]=Fe(e,t,o));break;default:throw new ft(s)}}}function Xb(e,t,a){e.base.refs.types.set(t,a)}function Pc(e,t,a,s){if(e.base.refs.types.get(a)!==s)throw new ft(t)}function Zb(e,t,a,s){const o=a.k;if(Xa(a,o),Xa(a,a.v),o.length>0)for(let c=0,u=a.v,f=o.length;c<f;c++)dR(e,t,s,o[c],u[c]);return s}function fR(e,t,a){const s=it(e,a.i,a.t===10?{}:Object.create(null));return Zb(e,t,a.p,s),Kb(s,a.o),s}function hR(e,t){return it(e,t.i,new Date(t.s))}function pR(e,t){if(!(e.base.features&64))throw new Eh(t);let a;switch(t.c){case 0:a=Temporal.Instant.from(t.s);break;case 1:a=Temporal.Duration.from(t.s);break;case 2:a=Temporal.PlainDate.from(t.s);break;case 3:a=Temporal.PlainDateTime.from(t.s);break;case 4:a=Temporal.PlainMonthDay.from(t.s);break;case 5:a=Temporal.PlainTime.from(t.s);break;case 6:a=Temporal.PlainYearMonth.from(t.s);break;case 7:a=Temporal.ZonedDateTime.from(t.s);break;default:throw new ft(t)}return it(e,t.i,a)}function mR(e,t){if(e.base.features&32){const a=er(t.c);if(a.length>nR)throw new ft(t);return it(e,t.i,new RegExp(a,t.m))}throw new Eh(t)}function gR(e,t,a){const s=it(e,a.i,new Set);Xa(a,a.a);for(let o=0,c=a.a,u=c.length;o<u;o++)s.add(Fe(e,t,c[o]));return s}function yR(e,t,a){const s=it(e,a.i,new Map);Xa(a,a.e.k),Xa(a,a.e.v);for(let o=0,c=a.e.k,u=a.e.v,f=c.length;o<f;o++)s.set(Fe(e,t,c[o]),Fe(e,t,u[o]));return s}function vR(e,t){if(typeof t.s!="string")throw new ft(t);if(t.s.length>e.base.maxBase64Length)throw new RangeError("ArrayBuffer exceeds maxBase64Length ("+e.base.maxBase64Length+")");const a=er(t.s);let s;if(a.length<eR||typeof Buffer>"u")s=dT(a);else{const o=atob(a);s=new ArrayBuffer(o.length),Buffer.from(s).write(o,"latin1")}return it(e,t.i,s)}function bR(e,t,a){var s;const o=YT(a.c),c=Fe(e,t,a.f);if(!(c instanceof ArrayBuffer))throw new ft(a);const u=(s=a.b)!==null&&s!==void 0?s:0;if(u<0||u>c.byteLength)throw new ft(a);return it(e,a.i,new o(c,u,a.l))}function wR(e,t,a){var s;const o=Fe(e,t,a.f);if(!(o instanceof ArrayBuffer))throw new ft(a);const c=(s=a.b)!==null&&s!==void 0?s:0;if(c<0||c>o.byteLength)throw new ft(a);return it(e,a.i,new DataView(o,c,a.l))}function ew(e,t,a,s){if(a.p){const o=Zb(e,t,a.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(o))}return s}function _R(e,t,a){return ew(e,t,a,it(e,a.i,new AggregateError([],er(a.m))))}function SR(e,t,a){const s=Vf(a,g1,a.s);return ew(e,t,a,it(e,a.i,new s(er(a.m))))}function ER(e,t,a){const s=Rh(),o=it(e,a.i,s.p),c=Fe(e,t,a.f);if(Qb(c))throw new ft(a.f);return a.s?s.s(c):s.f(c),o}function AR(e,t,a){return it(e,a.i,Object(Fe(e,t,a.f)))}function TR(e,t,a){const s=e.base.plugins;if(s){const o=er(a.c);for(let c=0,u=s.length;c<u;c++){const f=s[c];if(f.tag===o)return it(e,a.i,f.deserialize(a.s,new iR(e,t),{id:a.i}))}}throw new j1(a.c)}
13function RR(e,t){const a=it(e,t.i,it(e,t.s,Rh()).p);return Xb(e,t.s,22),a}function CR(e,t,a){const s=e.base.refs.get(a.i);if(s){Pc(e,a,a.i,22);const o=Fe(e,t,a.a[1]);if(Qb(o))throw new ft(a.a[1]);a.t===23?s.s(o):s.f(o);return}throw new Dc("Promise")}function OR(e,t,a){Fe(e,t,a.a[0]);const s=Fe(e,t,a.a[1]);if(!qb(s))throw new ft(a.a[1]);return pT(s)}function xR(e,t,a){Fe(e,t,a.a[0]);const s=Fe(e,t,a.a[1]);if(!Ch(s))throw new ft(a.a[1]);return ST(s)}function kR(e,t,a){const s=it(e,a.i,bo());Xb(e,a.i,31);const o=a.a;Xa(a,o);const c=o.length;if(c)for(let u=0;u<c;u++)Fe(e,t,o[u]);return s}function jR(e,t,a){const s=e.base.refs.get(a.i);if(s){Pc(e,a,a.i,31),s.next(Fe(e,t,a.f));return}throw new Dc("Stream")}function NR(e,t,a){const s=e.base.refs.get(a.i);if(s){Pc(e,a,a.i,31),s.throw(Fe(e,t,a.f));return}throw new Dc("Stream")}function DR(e,t,a){const s=e.base.refs.get(a.i);if(s){Pc(e,a,a.i,31),s.return(Fe(e,t,a.f));return}throw new Dc("Stream")}function LR(e,t,a){Fe(e,t,a.f)}function MR(e,t,a){Fe(e,t,a.a[1])}function Av(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function PR(e,t,a){Xa(a,a.a);const s=a.a.length;if(!(Av(a.s,s)&&Av(a.l,s)))throw new ft(a);const o=it(e,a.i,Hb([],a.s,a.l));for(let c=0;c<s;c++)o.v[c]=Fe(e,t,a.a[c]);return o}function Fe(e,t,a){if(t>e.base.depthLimit)throw new Mb(e.base.depthLimit);switch(t+=1,a.t){case 2:return Vf(a,p1,a.s);case 0:return Number(a.s);case 1:return er(String(a.s));case 3:if(String(a.s).length>tR)throw new ft(a);return BigInt(a.s);case 4:return e.base.refs.get(a.i);case 18:return cR(e,a);case 9:return uR(e,t,a);case 10:case 11:return fR(e,t,a);case 5:return hR(e,a);case 6:return mR(e,a);case 7:return gR(e,t,a);case 8:return yR(e,t,a);case 19:return vR(e,a);case 16:case 15:return bR(e,t,a);case 20:return wR(e,t,a);case 14:return _R(e,t,a);case 13:return SR(e,t,a);case 12:return ER(e,t,a);case 17:return Vf(a,h1,a.s);case 21:return AR(e,t,a);case 25:return TR(e,t,a);case 22:return RR(e,a);case 23:case 24:return CR(e,t,a);case 28:return OR(e,t,a);case 30:return xR(e,t,a);case 31:return kR(e,t,a);case 32:return jR(e,t,a);case 33:return NR(e,t,a);case 34:return DR(e,t,a);case 27:return LR(e,t,a);case 29:return MR(e,t,a);case 35:return PR(e,t,a);case 36:return pR(e,a);default:throw new Eh(a)}}function UR(e,t){try{return Fe(e,0,t)}catch(a){throw new k1(a)}}function IR(e,t){const a=Wb(t.plugins);return UR(sR({maxBase64Length:t.maxBase64Length,plugins:a,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function zR(e,t={}){const a=Wb(t.plugins),s=NT(1,{compactArrayBufferViews:t.compactArrayBufferViews,plugins:a,disabledFeatures:t.disabledFeatures});return{t:await KT(s,e),f:s.base.features,m:Array.from(s.base.marked)}}function $R(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,a){return{v:a.parse(e.toSerializable(t))}},async async(t,a){return{v:await a.parse(e.toSerializable(t))}},stream(t,a){return{v:a.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,a){return e.fromSerializable(a.deserialize(t.v))}}}function tw(e){if(Array.isArray(e))return e.flatMap(y=>tw(y));if(typeof e!="string")return[];const t=[];let a=0,s,o,c,u,f;const p=()=>{for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length},m=()=>(o=e.charAt(a),o!=="="&&o!==";"&&o!==",");for(;a<e.length;){for(s=a,f=!1;p();)if(o=e.charAt(a),o===","){for(c=a,a+=1,p(),u=a;a<e.length&&m();)a+=1;a<e.length&&e.charAt(a)==="="?(f=!0,a=u,t.push(e.slice(s,c)),s=a):a=c+1}else a+=1;(!f||a>=e.length)&&t.push(e.slice(s))}return t}function BR(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function qR(...e){return e.reduce((t,a)=>{const s=BR(a);if(!s)return t;for(const[o,c]of s.entries())o==="set-cookie"?tw(c).forEach(u=>t.append("set-cookie",u)):t.set(o,c);return t},new Headers)}const HR={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}};var GR=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}};function nw(e){const t=[];for(let a=0;a<e.length;a+=32768)t.push(String.fromCharCode.apply(null,e.subarray(a,a+32768)));return btoa(t.join(""))}function aw(e){const t=atob(e),a=new Uint8Array(t.length);for(let s=0;s<t.length;s++)a[s]=t.charCodeAt(s);return a}const VR=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});function FR(e){try{return"t"+VR.decode(e)}catch{return"b"+nw(e)}}const JR=new TextEncoder;function WR(e){const t=e.slice(1);return e[0]==="t"?JR.encode(t):aw(t)}function KR(e,t,a){a?.throwIfAborted();const s=bo(),o=e.getReader();let c=!0;const u=()=>{c=!1,a?.removeEventListener("abort",p),o.releaseLock()},f=m=>c?(o.cancel(m).catch(()=>{}),u(),!0):!1,p=()=>{f(a.reason)&&s.throw(a.reason)};return a?.addEventListener("abort",p),(async()=>{try{for(;c;){const{done:m,value:y}=await o.read();if(!c)return;if(m){u(),s.return(void 0);return}s.next(t(y))}}catch(m){f(m)&&s.throw(m)}})(),[s,f]}function YR(e,t){let a,s=!1;return new ReadableStream({start(o){const c=e.on({next(u){if(!s)try{o.enqueue(t(u))}catch(f){s=!0;const p=a;a=void 0,p?.(),o.error(f)}},throw(u){s||(s=!0,a=void 0,o.error(u))},return(){s||(s=!0,a=void 0,o.close())}});s?c():a=c},cancel(){const o=a;a=void 0,o?.()}})}function rw(e){return{tag:"tss/RawStream",test:t=>t instanceof GR,parse:{async:async(t,a)=>{const s=await a.parse(t.hint==="text"),[o]=KR(t.stream,t.hint==="text"?FR:nw,e);return{text:s,stream:await a.parse(o)}}},serialize:void 0,deserialize:void 0}}const QR=rw(),XR={tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(e,t){return YR(t.deserialize(e.stream),t.deserialize(e.text)?WR:aw)}},qa={},sw=e=>new ReadableStream({start(t){e.on({next(a){try{t.enqueue(a)}catch{}},throw(a){t.error(a)},return(){try{t.close()}catch{}}})}}),ZR={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===qa},parse:{sync(){return qa},async async(){return await Promise.resolve(qa)},stream(){return qa}},serialize(){return sw.toString()},deserialize(){return qa}};async function eC(e,t){try{for(;;){const a=await t.read();if(a.done){e.return(a.value),t.releaseLock();break}e.next(a.value)}}catch(a){t.releaseLock(),e.throw(a)}}function tC(e){e.cancel().catch(()=>{}),e.releaseLock()}function Tv(e){const t=bo(),a=e.getReader(),s=tC.bind(null,a);return eC(t,a).catch(s),[t,s]}const nC={tag:"seroval/plugins/web/ReadableStream",extends:[ZR],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(qa),stream:t.parse(bo())}},async async(e,t){return{factory:await t.parse(qa),stream:await t.parse(Tv(e)[0])}},stream(e,t){const[a,s]=Tv(e);return t.addCleanup(s),{factory:t.parse(qa),stream:t.parse(a)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const a=t.deserialize(e.stream);if(!a||typeof a!="object"||!Ch(a))throw new Error("Expected a stream source.");return sw(a)}};function iw(e){return[HR,e?rw(e):QR,nC]}const aC=iw();[...aC];function rC(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize:void 0,deserialize(t,a){return e(a.deserialize(t.streamId))}}}function sC(e){return[...dh()?.serializationAdapters?.map($R)??[],...e]}function ow(e){return sC(iw(e))}var Rv=new TextDecoder,xn=new Uint8Array,iC=new ByteLengthQueuingStrategy({highWaterMark:0});function oC(e){const t=e.getReader(),a=new Map;let s=0,o,c;const u=()=>{o?.(),o=void 0},f=(g,w)=>{const b=g[1];g[1]=!1,b&&(w===1?b.close():b.error(w[0]))},p=new ReadableStream({start(g){c=g},pull:u,cancel(g){const w=[g===void 0?new Error("Framed response cancelled"):g];
13s=w,u(),t.cancel(g).catch(()=>{});for(const b of a.values())f(b,w)}});function m(g){const w=a.get(g);if(w)return w;if(a.size>=1024)throw new Error("Too many raw streams");let b;const E=[new ReadableStream({start(S){b=S},cancel(){E[1]!==!1&&(E[1]=null)}},iC),b];return a.set(g,E),s!==0&&f(E,s),E}function y(g){if(g===0||g>>>0!==g)throw new RangeError("Invalid raw stream ID");return m(g)[0]}return(async()=>{let g=xn,w=0;async function b(){for(;w===g.byteLength;){g=xn,w=0;const S=await t.read();if(s!==0||S.done)return!1;g=S.value}return!0}async function E(S,T){if(S===0)return xn;if(!await b()){if(T)return;throw new Error("Incomplete frame")}if(g.byteLength-w>=S){const j=g.subarray(w,w+S);return w+=S,w===g.byteLength&&(g=xn,w=0),j}const R=new Uint8Array(S);let k=0;for(;k<S;){if(!await b())throw new Error("Incomplete frame");const j=Math.min(S-k,g.byteLength-w);R.set(g.subarray(w,w+j),k),w+=j,k+=j}return w===g.byteLength&&(g=xn,w=0),R}try{for(;s===0;){let S=await E(9,!0);if(s!==0)return;if(!S){for(const K of a.values())if(K[1])throw new Error("Incomplete raw stream");s=1,c.close();return}const T=S[0],R=(S[1]<<24|S[2]<<16|S[3]<<8|S[4])>>>0,k=(S[5]<<24|S[6]<<16|S[7]<<8|S[8])>>>0;if(S=xn,T>3||T===0!=(R===0)||k>16777216||T===2&&k!==0)throw new Error("Invalid frame");const j=T===0?void 0:m(R);if(j?.[1]===!1)throw new Error("Raw stream already ended");let $=await E(k);if(s!==0)return;if(!j){const K=Rv.decode($);for($=xn,c.enqueue(K);s===0&&c.desiredSize<=0;)await new Promise(z=>{o=z});continue}if(T===1){const K=j[1];if(K){if(-K.desiredSize>134217728){K.error(new Error(`Raw stream ${R} has too many unread bytes`)),j[1]=null,$=xn;continue}const z=$.byteLength*4<$.buffer.byteLength?$.slice():$;$=xn,K.enqueue(z)}}else f(j,T===2?1:[new Error(Rv.decode($))])}}catch(S){if(s===0){const T=[S];s=T,t.cancel(S).catch(()=>{}),c.error(S);for(const R of a.values())f(R,T)}}finally{g=xn,t.releaseLock()}})(),[p,y]}const jn=Symbol.for("TSR_DEFERRED_PROMISE");function lC(e,t){const a=e;return a[jn]||(a[jn]={status:"pending"},a.then(s=>{a[jn].status="success",a[jn].data=s}).catch(s=>{a[jn].status="error",a[jn].error={data:YA(s),__isServerError:!0}})),a}const cC="Error preloading route! ☝️";function lw(e,t){if(e)return typeof e=="string"?e:e[t]}function uC(e){return e?.scriptFormat??"module"}function dC(e,t,a){const s=fC(t),o=lw(a,"script")??s.crossOrigin;return{...uC(e)==="iife"?{rel:"preload",as:"script"}:{rel:"modulepreload"},href:s.href,...o?{crossOrigin:o}:{}}}function fC(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function Hl(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}const a=new Set;for(const s of t){const o=JSON.stringify(s);a.has(o)||(a.add(o),e.push(s))}}function hC(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function pC(e,t,a,s){const o=mb(e),c=[],u=[];for(const f of o)for(const p of Array.isArray(f.scripts)?f.scripts:[]){if(!p)continue;const{children:m,...y}=p;c.push({tag:"script",attrs:{...y,...s,nonce:a},children:m})}if(t)for(const f of o)for(const p of t.routes[f.routeId]?.scripts??[])u.push({tag:"script",attrs:{...p.attrs,nonce:a},children:p.children});return[c,u]}function mC([e,t],a){return[...e,...t]}var cw=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t,this._branch=void 0;const a=this.options,s=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Ps:this.parentRoute||Xi();let o=s?Ps:a?.path;o&&o!=="/"&&(o=ab(o));const c=a?.id||o,u=s?Ps:Ms((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const f=u==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Ms(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=u,this._fullPath=f,this._to=Dn(f)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Mt({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},gC=class extends cw{constructor(e){super(e)}};var ao;function Ff(e,t,a){try{return IR(e,t)}catch(s){throw dw(a),s}}async function uw(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function dw(e){for(const t of e)t.catch(()=>{});e.length=0}var yC=Object.prototype.hasOwnProperty;function fw(e){for(const t in e)if(yC.call(e,t))return!0;return!1}async function vC(e,t,a){ao||(ao=ow());const s=t[0],o=s.fetch??a,c=s.data instanceof FormData,u=new Headers(s.headers);if(u.set("x-tsr-serverFn","true"),c||u.set("accept",`${uA}, application/x-ndjson, application/json`),s.method==="GET"){if(c)throw new Error("FormData is not supported with GET requests");const p=await hw(s);if(p!==void 0){const m=ub({payload:p});e.includes("?")?e+=`&${m}`:e+=`?${m}`}}let f;return s.method==="POST"&&(f=await bC(s),typeof f=="string"&&u.set("content-type","application/json")),wC(()=>o(e,{method:s.method,headers:u,signal:s.signal,body:f}))}async function hw(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&fw(e.context)&&((t??={}).context=e.context),t?pw(t,e.signal):void 0}async function pw(e,t){t?.throwIfAborted();let a;try{a=await zR(e,{plugins:t?ow(t):ao})}finally{t?.throwIfAborted()}return JSON.stringify(a)}async function bC(e){if(e.data instanceof FormData){let t;return e.context&&fw(e.context)&&(t=await pw(e.context,e.signal)),t!==void 0&&e.data.set(cA,t),e.data}return hw(e)}async function wC(e){let t;try{t=await e()}catch(s){if(s instanceof Response)t=s;else throw s}if(t.headers.get("x-tss-raw")==="true")return t;const a=t.headers.get("content-type");if(a||Xi(),t.headers.get("x-tss-serialized")){let s;if(a.includes("application/x-tss-framed")){const o=/;\s*v=(\d+)/.exec(a)?.[1];if(o&&+o!=1)throw new Error(`Unsupported framed protocol version ${o}`);if(!t.body)throw new Error("No response body for framed response");const[c,u]=oC(t.body);s=await _C(c,[rC(u),...ao])}else if(a.includes("application/json")){const o=await t.json(),c=[];s=Ff(o,{plugins:ao},c),await uw(c)}if(s||Xi(),s instanceof Error)throw s;return s}if(a.includes("application/json")){const s=await t.json(),o=X0(s);if(o)throw o;if(Nr(s))throw s;return s}if(!t.ok)throw new Error(await t.text());return t}async function _C(e,t){const a=e.getReader(),s={refs:new Map,plugins:t},o=f=>{a.cancel(f).catch(()=>{})};let c;const u=[];try{const f=await a.read();if(f.done)throw new Error("Stream ended before first object");c=Ff(JSON.parse(f.value),s,u)}catch(f){throw o(f),a.releaseLock(),f}return(async()=>{const f=[];try{for(;;){const p=await a.read();if(p.done)return;Ff(JSON.parse(p.value),s,f),dw(f)}}catch(p){o(p),console.error("Stream processing error:",p)}finally{a.releaseLock()}})(),await uw(u),c}function jh(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const c=dh()?.serverFns?.fetch;return vC(t,o,c??fetch)},{url:t,serverFnMeta:{id:e},[zf]:!0}
13)}var SC={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(zf in e)?!1:!!e[zf],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>jh(e)},mc=X.use,mw=X.useLayoutEffect;function EC({promise:e}){if(mc)return mc(e);const t=lC(e);if(t[jn].status==="pending")throw t;if(t[jn].status==="error")throw t[jn].error;return t[jn].data}function AC(e){const t=A.jsx(TC,{...e});return e.fallback?A.jsx(X.Suspense,{fallback:e.fallback,children:t}):t}function TC(e){const t=EC(e);return e.children(t)}var Nh=class extends X.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){const a=e.getResetKey();return t.error&&t.resetKey!==a?{resetKey:a,error:0}:{resetKey:a}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){const e=this.state.error;return e?X.createElement(this.props.errorComponent??RC,{error:e[0],reset:this.reset}):this.props.children}};function RC({error:e}){const[t,a]=X.useState(!1);return A.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[A.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),A.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>a(s=>!s),children:t?"Hide Error":"Show Error"})]}),A.jsx("div",{style:{height:".25rem"}}),t?A.jsx("div",{children:A.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e?.message?A.jsx("code",{children:e.message}):null})}):null]})}var Cv=()=>!0,CC=()=>!1;function OC({children:e,fallback:t=null}){return A.jsx(kc.Fragment,{children:Dh()?e:t})}function Dh(e=!0){return kc.useSyncExternalStore(xC,Cv,e?CC:Cv)}function xC(){return()=>{}}var gw=X.createContext(null);function St(e){return X.useContext(gw)}var Lh=X.createContext(void 0),kC=X.createContext(void 0);function jC({update:e,notify:t,unwatched:a}){return{link:s,unlink:o,propagate:c,checkDirty:u,shallowPropagate:f};function s(m,y,g){const w=y.depsTail;if(w!==void 0&&w.dep===m)return;const b=w!==void 0?w.nextDep:y.deps;if(b!==void 0&&b.dep===m){b.version=g,y.depsTail=b;return}const E=m.subsTail;if(E!==void 0&&E.version===g&&E.sub===y)return;const S=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:w,nextDep:b,prevSub:E,nextSub:void 0};b!==void 0&&(b.prevDep=S),w!==void 0?w.nextDep=S:y.deps=S,E!==void 0?E.nextSub=S:m.subs=S}function o(m,y=m.sub){const g=m.dep,w=m.prevDep,b=m.nextDep,E=m.nextSub,S=m.prevSub;return b!==void 0?b.prevDep=w:y.depsTail=w,w!==void 0?w.nextDep=b:y.deps=b,E!==void 0?E.prevSub=S:g.subsTail=S,S!==void 0?S.nextSub=E:(g.subs=E)===void 0&&a(g),b}function c(m){let y=m.nextSub,g;e:do{const w=m.sub;let b=w.flags;if(b&60?b&12?b&4?!(b&48)&&p(m,w)?(w.flags=b|40,b&=1):b=0:w.flags=b&-9|32:b=0:w.flags=b|32,b&2&&t(w),b&1){const E=w.subs;if(E!==void 0){const S=(m=E).nextSub;S!==void 0&&(g={value:y,prev:g},y=S);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function u(m,y){let g,w=0,b=!1;e:do{const E=m.dep,S=E.flags;if(y.flags&16)b=!0;else if((S&17)===17){if(e(E)){const T=E.subs;T.nextSub!==void 0&&f(T),b=!0}}else if((S&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=E.deps,y=E,++w;continue}if(!b){const T=m.nextDep;if(T!==void 0){m=T;continue}}for(;w--;){const T=y.subs,R=T.nextSub!==void 0;if(R?(m=g.value,g=g.prev):m=T,b){if(e(y)){R&&f(T),y=m.sub;continue}b=!1}else y.flags&=-33;y=m.sub;const k=m.nextDep;if(k!==void 0){m=k;continue e}}return b}while(!0)}function f(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&t(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function NC(e,t,a){const s=typeof e=="object",o=s?e:void 0;return{next:(s?e.next:e)?.bind(o),error:(s?e.error:t)?.bind(o),c
13omplete:(s?e.complete:a)?.bind(o)}}const Jf=[];let oc=0;const{link:Ov,unlink:DC,propagate:LC,checkDirty:yw,shallowPropagate:xv}=jC({update(e){return e._update()},notify(e){Jf[Wf++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,gc(e))}});let Gl=0,Wf=0,hn,Kf=0;function MC(e){try{++Kf,e()}finally{--Kf||vw()}}function gc(e){const t=e.depsTail;let a=t!==void 0?t.nextDep:e.deps;for(;a!==void 0;)a=DC(a,e)}function vw(){if(!(Kf>0)){for(;Gl<Wf;){const e=Jf[Gl];Jf[Gl++]=void 0,e.notify()}Gl=0,Wf=0}}function kv(e,t){const a=typeof e=="function",s=e,o={_snapshot:a?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:a?0:1,get(){return hn!==void 0&&Ov(o,hn,oc),o._snapshot},subscribe(c){const u=NC(c),f={current:!1},p=PC(()=>{o.get(),f.current?(hn=void 0,u.next?.(o._snapshot)):f.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const u=hn,f=t?.compare??Object.is;if(a)hn=o,++oc,o.depsTail=void 0;else if(c===void 0)return!1;a&&(o.flags=5);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&a?s(p):c;return p===void 0||!f(p,m)?(o._snapshot=m,!0):!1}finally{hn=u,a&&(o.flags&=-5),gc(o)}}};return a?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&yw(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&xv(u)}}else c&32&&(o.flags=c&-33);return hn!==void 0&&Ov(o,hn,oc),o._snapshot}):o.set=function(c){if(o._update(c)){const u=o.subs;u!==void 0&&(LC(u),xv(u),vw())}},o}function PC(e){const t=()=>{const s=hn;hn=a,++oc,a.depsTail=void 0,a.flags=6;try{return e()}finally{hn=s,a.flags&=-5,gc(a)}},a={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const s=this.flags;s&16||s&32&&yw(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,gc(this)}};return t(),a}var wf={exports:{}},_f={},Sf={exports:{}},Ef={};var jv;function UC(){if(jv)return Ef;jv=1;var e=vo();function t(g,w){return g===w&&(g!==0||1/g===1/w)||g!==g&&w!==w}var a=typeof Object.is=="function"?Object.is:t,s=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function f(g,w){var b=w(),E=s({inst:{value:b,getSnapshot:w}}),S=E[0].inst,T=E[1];return c(function(){S.value=b,S.getSnapshot=w,p(S)&&T({inst:S})},[g,b,w]),o(function(){return p(S)&&T({inst:S}),g(function(){p(S)&&T({inst:S})})},[g]),u(b),b}function p(g){var w=g.getSnapshot;g=g.value;try{var b=w();return!a(g,b)}catch{return!0}}function m(g,w){return w()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Ef.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Ef}var Nv;function IC(){return Nv||(Nv=1,Sf.exports=UC()),Sf.exports}var Dv;function zC(){if(Dv)return _f;Dv=1;var e=vo(),t=IC();function a(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var s=typeof Object.is=="function"?Object.is:a,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,f=e.useMemo,p=e.useDebugValue;return _f.useSyncExternalStoreWithSelector=function(m,y,g,w,b){var E=c(null);if(E.current===null){var S={hasValue:!1,value:null};E.current=S}else S=E.current;E=f(function(){function R(z){if(!k){if(k=!0,j=z,z=w(z),b!==void 0&&S.hasValue){var D=S.value;if(b(D,z))return $=D}return $=z}if(D=$,s(j,z))return D;var J=w(z);return b!==void 0&&b(D,J)?(j=z,D):(j=z,$=J)}var k=!1,j,$,K=g===void 0?null:g;return[function(){return R(y())},K===null?void 0:function(){return R(K())}]},[y,g,w,b]);var T=o(m,E[0],E[1]);return u(function(){S.hasValue=!0,S.value=T},[T]),p(T),T},_f}var Lv;function $C(){return Lv||(Lv=1,wf.exports=zC()),wf.exports}var BC=$C();function qC(e,t){return e===t}function bn(e,t=s=>s,a){const s=a?.compare??qC,o=X.useCallback(u=>{const{unsubscribe:f}=e.subscribe(u);return f},[e]),c=X.useCallback(()=>e.get(),[e]);return BC.useSyncExternalStoreWithSelector(o,c,c,t,s)}var Mv={};function bw(e,t){const a=X.useRef();return s=>{const o=e?.select?e.select(s):s;return e?.structuralSharing??t.options.defaultStructuralSharing?a.current=Ja(a.current,o):o}}function Pr(e){const t=St(),a=X.useContext(e.from?kC:Lh),s=e.from??a,o=t.stores.getMatchStore(s),c=bw(e,t),u=bn(o,f=>f?c(f):Mv);if(u!==Mv)return u;(e.shouldThrow??!0)&&Xi()}function ww(e){return Pr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _w(e){const{select:t,...a}=e;return Pr({...a,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function Sw(e){return Pr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const a=e.strict===!1?t.params:t._strictParams;return e.select?e.select(a):a}})}function Ew(e){return Pr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Aw(e){const t=St();return X.useCallback(a=>t.navigate({...a,from:a.from??e?.from}),[e?.from,t])}function Tw(e){return Pr({...e,select:t=>e.select?e.select(t.context):t.context})}function HC(...e){const t=X.useRef(e),a=t.current;return e.forEach((s,o)=>{vn(a[o],s,!1,!0)||(a[o]=s)}),t.current}function Vl(e,t){e.preloadRoute(t).catch(a=>
13{console.warn(a),console.warn(cC)})}var GC={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function VC(e,t){const a=typeof e=="string"&&Qi(e);if(a)return t.has(a)?e:null}function FC(e,t,a,s,o){const c=av(e.pathname,s),u=av(t.pathname,s);return(a?.exact?c!==u:!(c.startsWith(u)&&(c.length===u.length||c[u.length]==="/")))||(a?.includeSearch??!0)&&!vn(e.search,t.search,!a?.exact,a?.explicitUndefined)?!1:a?.includeHash?o&&e.hash===t.hash:!0}function JC(e,t,a){const s=St(),o=X.useRef(null),c=X.useCallback(pe=>{if(o.current=pe,typeof t=="function")return t(pe);t&&(t.current=pe)},[t]),{activeOptions:u,to:f,preload:p,preloadDelay:m,hashScrollIntoView:y,replace:g,startTransition:w,resetScroll:b,viewTransition:E,ignoreBlocker:S,disabled:T,target:R,onClick:k,onBlur:j,onFocus:$,onMouseEnter:K,onMouseLeave:z,onTouchStart:D}=e,J=Dh(!!u?.includeHash),[ee,ue,V]=HC(e.search,e.params,u),[F,Z]=X.useMemo(()=>[e,{...e}],[s,e.from,e._fromLocation,e.hash,e.to,ee,ue,e.state,e.mask,e.unsafeRelative]),ge=X.useMemo(()=>{const pe=VC(f,s.protocolAllowlist);if(pe!==void 0){const An=[pe??void 0];return()=>An}let Le,He;return An=>{F._fromLocation||(Z._fromLocation=An);const tr=s.buildLocation(Z),Pn=XC(tr,s,T);return(!Le||Le[0]!==Pn)&&(Le=[Pn,!(T||Pn&&!Qi(Pn))&&void 0],He=[Pn,!0]),Le[1]!==void 0&&FC(An,tr,V,s.basepath,J)?He:Le}},[V,T,J,F,Z,s,f]),[ce,U]=bn(s.stores.location,ge,GC),Y=U===void 0&&ce,he=T||ce===void 0,De=X.useRef(!1),Te=e.reloadDocument||Y||he?!1:p??s.options.defaultPreload,x=m??s.options.defaultPreloadDelay??0,H=X.useCallback(pe=>{const Le=pe?.isIntersecting;if(!(Le??Te==="intent")){Le===!1&&Af(o);return}if(!x){Vl(s,F);return}Wi.has(o)||Wi.set(o,setTimeout(()=>{Wi.delete(o),Vl(s,F)},x))},[s,F,o,Te,x]);X.useEffect(()=>{if(!Te)return;Te==="render"&&!De.current&&(De.current=!0,Vl(s,F));let pe=!0,Le;return Te==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(Le=new IntersectionObserver(He=>{pe&&H(He.pop())},{rootMargin:"100px"}),Le.observe(o.current)),()=>{pe=!1,Le?.disconnect(),Af(o)}},[s,F,Te,H,o]);const W=YC(e,a);if(W.ref=t?c:o,Y)return W.href=Y,W;const ne=pe=>{const Le=R??pe.currentTarget.getAttribute("target");!he&&!(pe.metaKey||pe.altKey||pe.ctrlKey||pe.shiftKey)&&!pe.defaultPrevented&&(!Le||Le==="_self")&&pe.button===0&&(pe.preventDefault(),s.navigate({...F,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:w,viewTransition:E,ignoreBlocker:S}))},ve=()=>{Te==="intent"&&Vl(s,F)},Se=()=>{Te==="intent"&&Af(o)};return W.onClick=As(k,ne),W.onBlur=As(j,Se),W.onFocus=As($,H),W.onMouseEnter=As(K,H),W.onMouseLeave=As(z,Se),W.onTouchStart=As(D,ve),QC(W,e,U,ce,he,a)}var WC={},KC={className:"active"},Rw=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function YC(e,t){const a={};for(const s in e)Rw.has(s)||s==="type"&&t!==void 0||s==="disabled"&&t==="a"||(a[s]=e[s]);return a}function QC(e,t,a,s,o,c){const{activeProps:u,inactiveProps:f,className:p,style:m,target:y}=t,g=Z0(a?u:f,{})??(a?KC:WC);Object.assign(e,g),e.href=s,c!=="a"&&(e.disabled=o),e.target=y;const w=g.style;(m||w)&&(e.style=m&&w?{...m,...w}:m||w);const b=g.className;return(p||b)&&(e.className=p?b?`${p} ${b}`:p:b),o&&(e.role="link",e["aria-disabled"]=!0),a&&(e["data-status"]="active",e["aria-current"]="page"),e}var Wi=new WeakMap,Af=e=>{clearTimeout(Wi.get(e)),Wi.delete(e)},As=(e,t)=>e?a=>a.defaultPrevented||(e(a),a.defaultPrevented||t(a)):t;function XC(e,t,a){if(a)return;const s=e.maskedLocation??e,o=s.external?s.publicHref:t.history.createHref(s.publicHref)||"/";if(!((s.external||o!==s.publicHref)&&nb(o,t.protocolAllowlist)))return o}var Ve=X.memo(X.forwardRef((e,t)=>{const a=e._asChild||"a",s=JC(e,t,a),o=typeof e.children=="function"?e.children({isActive:s["data-status"]==="active"}):e.children;return X.createElement(a,s,o)}),ZC);function ZC(e,t){let a=0;for(const s in t)if(a++,e[s]!==t[s]&&(!Rw.has(s)||!vn(e[s],t[s],!1,!0)))return!1;for(const s in e)a--;return a===0}var eO=class extends cw{constructor(t){super(t),this.useMatch=a=>Pr({...a,from:this.id}),this.useRouteContext=a=>Tw({...a,from:this.id}),this.useSearch=a=>Ew({...a,from:this.id}),this.useParams=a=>Sw({...a,from:this.id}),this.useLoaderDeps=a=>_w({...a,from:this.id}),this.useLoaderData=a=>ww({...a,from:this.id}),this.useNavigate=()=>Aw({from:this.fullPath}),this.Link=kc.forwardRef((a,s)=>A.jsx(Ve,{ref:s,from:this.fullPath,...a}))}};function tO(e){return new eO(e)}function nO(){return e=>rO(e)}var aO=class extends gC{constructor(e){super(e),this.useMatch=t=>Pr({...t,from:this.id}),this.useRouteContext=t=>Tw({...t,from:this.id}),this.useSearch=t=>Ew({...t,from:this.id}),this.useParams=t=>Sw({...t,from:this.id}),this.useLoaderDeps=t=>_w({...t,from:this.id}),this.useLoaderData=t=>ww({...t,from:this.id}),this.useNavigate=()=>Aw({from:this.fullPath}),this.Link=kc.forwardRef((t,a)=>A.jsx(Ve,{ref:a,from:this.fullPath,...t}))}};function rO(e){return new aO(e)}function le(e){return t=>{const a=tO(t);return a.isRoot=!1,a}}function se(e,t){let a,s,o;const c=()=>(a||(o=void 0,a=e().then(f=>{a=void 0,u.preload=void 0,s=f[t??"default"]}).catch(f=>{a=void 0,o=f})),a),u=function(p){if(o){if(fA(o)&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${o.message}`;
13if(!sessionStorage.getItem(m))throw sessionStorage.setItem(m,"1"),window.location.reload(),new Promise(()=>{})}throw o}if(!s)if(mc)mc(c());else throw c();return X.createElement(s,p)};return u.preload=c,u}function sO(e){const t=St(),a=`not-found-${bn(t.stores.location,s=>s.pathname)}-${bn(t.stores.status)}`;return A.jsx(Nh,{getResetKey:()=>a,onCatch:(s,o)=>{if(Nr(s))e.onCatch?.(s,o);else throw s},errorComponent:({error:s})=>{if(Nr(s))return e.fallback?.(s);throw s},children:e.children})}function iO(){return A.jsx("p",{children:"Not Found"})}function Cw(e,t,a){return t.options.notFoundComponent?A.jsx(t.options.notFoundComponent,{...a}):e.options.defaultNotFoundComponent?A.jsx(e.options.defaultNotFoundComponent,{...a}):A.jsx(iO,{})}function Uc(e,t){const a=t?.options.pendingComponent??e.options.defaultPendingComponent;return a?A.jsx(a,{}):null}var oO=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ow=(e,t,a)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||a===!1||a==="data-only"||!e.ssr,xw=X.memo(function({routeId:t}){const a=St();return A.jsx(lO,{router:a,match:bn(a.stores.getMatchStore(t))})});function lO({router:e,match:t}){const a=e.routesById[t.routeId],s=Uc(e,a),o=a.options.errorComponent??e.options.defaultErrorComponent,c=a.options.onCatch??e.options.defaultOnCatch,u=a.isRoot?a.options.notFoundComponent??e.options.notFoundRoute?.options.component:a.options.notFoundComponent,f=t.ssr===!1||t.ssr==="data-only",p=Ow(e,a,t.ssr)&&(a.options.wrapInSuspense??s??(a.options.errorComponent?.preload||f));let m=A.jsx(cO,{match:t});f&&(m=A.jsx(OC,{fallback:s,children:m})),u&&(m=A.jsx(sO,{fallback:w=>{if(w.routeId??=t.routeId,w.routeId!==t.routeId)throw w;return X.createElement(u,w)},children:m})),o&&(m=A.jsx(Nh,{getResetKey:()=>t,errorComponent:o,onCatch:(w,b)=>{if(Nr(w))throw w.routeId??=t.routeId,w;c?.(w,b)},children:m})),p&&(m=A.jsx(X.Suspense,{fallback:s,children:m}));const y=null,g=a.isRoot?a.options.shellComponent:void 0;return A.jsx(Lh.Provider,{value:t.routeId,children:g?A.jsxs(g,{children:[m,y]}):A.jsxs(A.Fragment,{children:[m,y]})})}var cO=X.memo(function({match:t}){const a=St(),s=t.routeId,o=a.routesById[s],c=X.useMemo(()=>{const f=(o.options.remountDeps??a.options.defaultRemountDeps)?.({routeId:s,loaderDeps:t.loaderDeps,params:t._strictParams,search:t._strictSearch});return f?JSON.stringify(f):void 0},[s,t.loaderDeps,t._strictParams,t._strictSearch,o.options.remountDeps,a.options.defaultRemountDeps]),u=X.useMemo(()=>{const f=o.options.component??a.options.defaultComponent;return f?A.jsx(f,{},c):A.jsx(kw,{})},[c,o.options.component,a.options.defaultComponent]);if(t.status==="pending"){if(a.ssr&&!Ow(a,o,t.ssr))return u;if(a._tx)throw a._tx[5];return Uc(a,o)}if(t.status==="notFound")return Cw(a,o,t.error);if(t.status==="error")throw t.error;return u}),kw=X.memo(function(){const t=St(),a=X.useContext(Lh);let s,o,c;{const f=t.stores.getMatchStore(a);[s,o]=bn(f,p=>[!!p._notFound,p.error],{compare:oO}),c=bn(t.stores.ids,p=>p[p.indexOf(a)+1])}if(s)return Cw(t,t.routesById[a],o);if(!c)return null;const u=A.jsx(xw,{routeId:c});return a===Ps?A.jsx(X.Suspense,{fallback:Uc(t),children:u}):u});function jw(e,t){const a=e[1];e.length=0,a?.(t)}function uO({t:e}){const t=St(),a=t._rendered??=[];return t.startTransition=(s,o)=>new Promise(c=>{jw(a,!1),a.push(o,c),e(t),X.startTransition(s)}),mw(()=>{const s=t.history.subscribe(t.load);t.updateLatestLocation();const o=t.latestLocation,c=t.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Dn(o.publicHref)!==Dn(c.publicHref))return t.commitLocation({...c,replace:!0,ignoreBlocker:!0}),s;const u=t.stores.resolvedLocation.get();return u?.href===o.href&&u.state.__TSR_key===o.state.__TSR_key?a.push(t.stores.matches.get(),f=>{f&&t.emit({type:"onRendered",...jc(u,u)})}):t._tx||t.load({sync:!0}).catch(console.error),s},[t,t.history]),null}function dO(){const e=St(),t=e.routesById[Ps],a=Uc(e,t),s=A.jsxs(A.Fragment,{children:[A.jsx(uO,{t:X.useState()[1]}),e.ssr?A.jsx(Pv,{}):A.jsx(X.Suspense,{fallback:a,children:A.jsx(Pv,{})})]});return e.options.InnerWrap?A.jsx(e.options.InnerWrap,{children:s}):s}function Pv(){const e=St(),t=e._rendered,a=bn(e.stores.matches,u=>t[0]??u),s=a[0],o=s?.routeId;mw(()=>{t[0]===a&&jw(t,!0)},[t,a]);const c=o?A.jsx(xw,{routeId:o}):null;return e.options.disableGlobalCatchBoundary?c:A.jsx(Nh,{getResetKey:()=>s,onCatch:void 0,children:c})}var fO=e=>({createMutableStore:kv,createReadonlyStore:kv,batch:MC}),hO=e=>new pO(e),pO=class extends XA{constructor(e){super(e,fO)}};function mO({router:e,children:t,...a}){eb(a)&&e.update({...e.options,...a,context:{...e.options.context,...a.context}});const s=A.jsx(gw.Provider,{value:e,children:t});return e.options.Wrap?A.jsx(e.options.Wrap,{children:s}):s}function gO({router:e,...t}){return A.jsx(mO,{router:e,...t,children:A.jsx(dO,{})})}function Bs(e){const t=St({warn:e?.router===void 0}),a=e?.router||t;return bn(a.stores.__store,bw(e,a))}function Uv(e,t){if(t)for(const[a,s]of Object.entries(t))a!=="suppressHydrationWarning"&&s!==void 0&&s!==!1&&e.setAttribute(a,typeof s=="boolean"?"":String(s))}function Nw(e){const{attrs:t,children:a,nonce:s,preventScriptHoist:o}=e,c=X.useMemo(()=>a===void 0?void 0:{__html:a},[a]);switch(e.tag){case"title":return A.jsx("title",{...t,suppressHydrationWarning:!0,children:a});case"meta":return A.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return A.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:s,suppressHydrationWarning:!0});case"style":return e.inlineCss,A.jsx("style",{...t,dangerouslySetInnerHTML:c,nonce:s});case"script":return A.jsx(yO,{attrs:t,preventScriptHoist:o,children:a});default:return null}}function yO({attrs:e,children:t,preventScriptHoist:a}){St();const s=Dh(),o=X.useMemo(()=>t===void 0?void 0:{__html:t},[t]),c=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(X.useEffect(()=>{if(!c){if(e?.src){const u=document.createElement("a");u.href=e.src;const f=u.href;for(const m of document.scripts)if(m.src===f)return;const p=document.createElement("script");return Uv(p,e),document.head.appendChild(p),()=>p.remove()}if(typeof t=="string"){const u=typeof e?.type=="string"?e.type:"text/javascript",f=typeof e?.nonce=="string"?e.nonce:void 0;for(const m of document.scripts){if(m.hasAttribute("src"))continue;const y=m.getAttribute("type")??"text/javascript",g=m.getAttribute("nonce")??void 0;if(m.textContent===t&&y===u&&g===f)return}const p=document.createElement("script");return p.textContent=t,Uv(p,e),document.head.appendChild(p),()=>p.remove()}}},[e,t,c]),c&&typeof t=="string")return A.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:o});if(!s){if(e?.src)return A.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return A.jsx("script",{...e,dangerouslySetInnerHTML:o,suppressHydrationWarning:!0})}return null}
13function vO(e,t,a,s){a=mb(a);const o=a.map(S=>S.meta).filter(S=>S!==void 0),c=[],u={};let f;for(let S=o.length-1;S>=0;S--){const T=o[S];for(let R=T.length-1;R>=0;R--){const k=T[R];if(k)if(k.title)f||(f={tag:"title",children:k.title});else if("script:ld+json"in k)try{const j=JSON.stringify(k["script:ld+json"]);c.push({tag:"script",attrs:{type:"application/ld+json"},children:vA(j)})}catch{}else{const j=k.name??k.property;if(j){if(u[j])continue;u[j]=!0}c.push({tag:"meta",attrs:{...k,nonce:t}})}}}f&&c.push(f),t&&c.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),c.reverse();const p=a.flatMap(S=>S.links??[]).filter(S=>S!==void 0).map(S=>({tag:"link",attrs:{...S,nonce:t}})),m=e.ssr?.manifest,y=[];m&&(a.forEach(S=>{m.routes[S.routeId]?.css?.forEach(T=>{const R=hC(T);y.push({tag:"link",attrs:{rel:"stylesheet",...R,crossOrigin:lw(s,"stylesheet")??R.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),m.inlineStyle&&y.push({tag:"style",attrs:{...m.inlineStyle.attrs,nonce:t},children:m.inlineStyle.children,inlineCss:!0}));const g=[];m&&a.forEach(S=>{m.routes[S.routeId]?.preloads?.forEach(T=>{g.push({tag:"link",attrs:{...dC(m,T,s),nonce:t}})})});const w=a.flatMap(S=>S.styles??[]).filter(S=>S!==void 0).map(({children:S,...T})=>({tag:"style",attrs:{...T,nonce:t},children:S})),b=a.flatMap(S=>S.headScripts??[]).filter(S=>S!==void 0).map(({children:S,...T})=>({tag:"script",attrs:{...T,nonce:t},children:S})),E=[];return Hl(E,c),E.push(...g),Hl(E,p),E.push(...y),Hl(E,w),Hl(E,b),E}var bO=e=>{const t=St(),a=t.options.ssr?.nonce,s=X.useCallback(o=>vO(t,a,o,e),[e,a,t]);return bn(t.stores.matches,s,{compare:vn})};function wO(e){const t=bO(e.assetCrossOrigin),a=St().options.ssr?.nonce;return A.jsx(A.Fragment,{children:t.map(s=>X.createElement(Nw,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:a}))})}var _O={suppressHydrationWarning:!0},SO=()=>{const e=St(),t=e.options.ssr?.nonce,a=o=>{const c=pC(o,e.ssr?.manifest,t,_O);for(const u of c[1])if(typeof u.attrs?.src=="string"){const f=u;f.preventScriptHoist=!0}return c},s=o=>mC(a(o));return EO(bn(e.stores.matches,s,{compare:vn}))};function EO(e){return A.jsx(A.Fragment,{children:e.map((t,a)=>X.createElement(Nw,{...t,key:`tsr-scripts-${t.tag}-${a}`}))})}function Iv(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Yf(e,t){const a=Object.create(null);if(e)for(const s of Object.keys(e))Iv(s)&&(a[s]=e[s]);if(t&&typeof t=="object")for(const s of Object.keys(t))Iv(s)&&(a[s]=t[s]);return a}function Dw(e){return Object.create(null)}var Lw=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},Ki=(e,t)=>{const a=t||e||{};typeof a.method>"u"&&(a.method="GET");const s=u=>Ki(void 0,{...a,validator:u,inputValidator:u});return Object.assign(u=>Ki(void 0,{...a,...u}),{options:a,middleware:u=>{const f=[...a.middleware||[]];u.forEach(m=>{ev in m?m.options.middleware&&f.push(...m.options.middleware):f.push(m)});const p=Ki(void 0,{...a,middleware:f});return p[ev]=!0,p},validator:s,inputValidator:s,handler:(...u)=>{const[f,p]=u,m={...a,extractedFn:f,serverFn:p},y=[...m.middleware||[],RO(m)];return f.method=a.method,Object.assign(async g=>{const w=await zv(y,"client",{...f,...m,data:g?.data,headers:g?.headers,signal:g?.signal,fetch:g?.fetch,context:Dw()}),b=X0(w.error);if(b)throw b;if(w.error)throw w.error;return w.result},{...f,method:a.method,__executeServer:async g=>{const w=Lw(),b=w.contextAfterGlobalMiddlewares;return await zv(y,"server",{...f,data:g.data,method:g.method??a.method,serverFnMeta:f.serverFnMeta,context:Yf(g.context,b),request:w.request}).then(E=>({result:E.result,error:E.error,context:E.sendContext}))}})}})};async function zv(e,t,a){let s=AO([...dh()?.functionMiddleware||[],...e]);if(t==="server"){const c=Lw();c?.executedRequestMiddlewares&&(s=s.filter(u=>!c.executedRequestMiddlewares.has(u)))}const o=async c=>{const u=s.shift();if(!u)return c;try{let f="validator"in u.options?u.options.validator:void 0;!f&&"inputValidator"in u.options&&(f=u.options.inputValidator),f&&t==="server"&&(c.data=await TO(f,c.data));let p;if(t==="client"?"client"in u.options&&(p=u.options.client):"server"in u.options&&(p=u.options.server),p){const y=await p({...c,next:async(g={})=>{const w=await o({...c,...g,context:Yf(c.context,g.context),sendContext:Yf(c.sendContext,g.sendContext),headers:qR(c.headers,g.headers),_callSiteFetch:c._callSiteFetch,fetch:c._callSiteFetch??g.fetch??c.fetch,result:g.result!==void 0?g.result:g instanceof Response?g:c.result,error:g.error??c.error});if(w.error)throw w.error;return w}});if(hh(y))return{...c,error:y};if(y instanceof Response)return{...c,result:y};if(!y)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return y}return o(c)}catch(f){return{...c,error:f}}};return o({...a,headers:a.headers||{},sendContext:a.sendContext||{}
13,context:a.context||Dw(),_callSiteFetch:a.fetch})}function AO(e,t=100){const a=new Set,s=[],o=(c,u)=>{if(u>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);c.forEach(f=>{f.options.middleware&&o(f.options.middleware,u+1),a.has(f)||(a.add(f),s.push(f))})};return o(e,0),s}async function TO(e,t){if(e==null)return{};if("~standard"in e){const a=await e["~standard"].validate(t);if(a.issues)throw new Error(JSON.stringify(a.issues,void 0,2));return a.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function RO(e){return{"~types":void 0,options:{inputValidator:e.validator??e.inputValidator,client:async({next:t,sendContext:a,fetch:s,...o})=>{const c={...o,context:a,fetch:s};return t(await e.extractedFn?.(c))},server:async({next:t,...a})=>{const s=await e.serverFn?.(a);return t({...a,result:s})}}}}var Cr=(e,t)=>{const a={type:"request",...t||e},s=o=>Cr({},Object.assign(a,{validator:o,inputValidator:o}));return{options:a,middleware:o=>Cr({},Object.assign(a,{middleware:o})),validator:s,inputValidator:s,client:o=>Cr({},Object.assign(a,{client:o})),server:o=>Cr({},Object.assign(a,{server:o}))}};function Mw(e,t){for(let a=0,s=t.length;a<s;a++){const o=t[a];e.has(o)||(e.add(o),o.extends&&Mw(e,o.extends))}}var CO=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const a=new Set;Mw(a,t.serializationAdapters),t.serializationAdapters=Array.from(a)}return t},createMiddleware:Cr});const OO=Symbol.for("@supabase/supabase-js.traceContextExtractor");function xO(){return globalThis[OO]}function Ic(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(a[s[o]]=e[s[o]]);return a}function kO(e,t,a,s){function o(c){return c instanceof a?c:new a(function(u){u(c)})}return new(a||(a=Promise))(function(c,u){function f(y){try{m(s.next(y))}catch(g){u(g)}}function p(y){try{m(s.throw(y))}catch(g){u(g)}}function m(y){y.done?c(y.value):o(y.value).then(f,p)}m((s=s.apply(e,t||[])).next())})}const jO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Mh extends Error{constructor(t,a="FunctionsError",s){super(t),this.name=a,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class NO extends Mh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class $v extends Mh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Bv extends Mh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Qf;(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"})(Qf||(Qf={}));class DO{constructor(t,{headers:a={},customFetch:s,region:o=Qf.Any}={}){this.url=t,this.headers=a,this.region=o,this.fetch=jO(s)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return kO(this,arguments,void 0,function*(a,s={}){var o,c;let u,f,p;try{const{headers:m,method:y,body:g,signal:w,timeout:b}=s;let E={},{region:S}=s;S||(S=this.region);const T=new URL(`${this.url}/${a}`);S&&S!=="any"&&(E["x-region"]=S,T.searchParams.set("forceFunctionRegion",S));let R;const k=!!m&&Object.keys(m).some(J=>J.toLowerCase()==="content-type");g&&!k?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(E["Content-Type"]="application/octet-stream",R=g):typeof g=="string"?(E["Content-Type"]="text/plain",R=g):typeof FormData<"u"&&g instanceof FormData?R=g:(E["Content-Type"]="application/json",R=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?R=JSON.stringify(g):R=g;let j=w;b&&(f=new AbortController,u=setTimeout(()=>f.abort(),b),w?(j=f.signal,p=()=>f.abort(),w.addEventListener("abort",p)):j=f.signal);const $=yield this.fetch(T.toString(),{method:y||"POST",headers:Object.assign(Object.assign(Object.assign({},E),this.headers),m),body:R,signal:j}).catch(J=>{throw new NO(J)}),K=$.headers.get("x-relay-error");
13if(K&&K==="true")throw new $v($);if(!$.ok)throw new Bv($);let z=((o=$.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim().toLowerCase(),D;return z==="application/json"?D=yield $.json():z==="application/octet-stream"||z==="application/pdf"?D=yield $.blob():z==="text/event-stream"?D=$:z==="multipart/form-data"?D=yield $.formData():D=yield $.text(),{data:D,error:null,response:$}}catch(m){return{data:null,error:m,response:m instanceof Bv||m instanceof $v?m.context:void 0}}finally{u&&clearTimeout(u),p&&((c=s.signal)===null||c===void 0||c.removeEventListener("abort",p))}})}}const Pw=3,qv=e=>Math.min(1e3*2**e,3e4),LO=[520,503],Uw=["GET","HEAD","OPTIONS"];var Tf=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ro(e){"@babel/helpers - typeof";return ro=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},ro(e)}function MO(e,t){if(ro(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(ro(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PO(e){var t=MO(e,"string");return ro(t)=="symbol"?t:t+""}function UO(e,t,a){return(t=PO(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Hv(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,s)}return a}function Ls(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Hv(Object(a),!0).forEach(function(s){UO(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Hv(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Gv(e,t){return new Promise(a=>{if(t?.aborted){a();return}const s=setTimeout(()=>{t?.removeEventListener("abort",o),a()},e);function o(){clearTimeout(s),a()}t?.addEventListener("abort",o)})}function IO(e,t,a,s){return!(!s||a>=Pw||!Uw.includes(e)||!LO.includes(t))}var zO=class{constructor(e){var t,a,s,o,c;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=(a=e.isMaybeSingle)!==null&&a!==void 0?a:!1,this.shouldStripNulls=(s=e.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=e.retry)!==null&&c!==void 0?c:!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 a=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 u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const s=this.fetch;let c=(async()=>{let u=0;for(;;){const m={};a.headers.forEach((g,w)=>{m[w]=g}),u>0&&(m["X-Retry-Count"]=String(u));let y;try{y=await s(a.url.toString(),{method:a.method,headers:m,body:JSON.stringify(a.body,(g,w)=>typeof w=="bigint"?w.toString():w),signal:a.signal})}catch(g){if(g?.name==="AbortError"||g?.code==="ABORT_ERR"||!Uw.includes(a.method))throw g;if(a.retryEnabled&&u<Pw){const w=qv(u);u++,await Gv(w,a.signal);continue}throw g}if(IO(a.method,y.status,u,a.retryEnabled)){var f,p;const g=(f=(p=y.headers)===null||p===void 0?void 0:p.get("Retry-After"))!==null&&f!==void 0?f:null,w=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:qv(u);await y.text(),u++,await Gv(w,a.signal);continue}return await a.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var f;let p="",m="",y="";const g=u?.cause;if(g){var w,b,E,S;const k=(w=g?.message)!==null&&w!==void 0?w:"",j=(b=g?.code)!==null&&b!==void 0?b:"";p=`${(E=u?.name)!==null&&E!==void 0?E:"FetchError"}: ${u?.message}`,p+=`
14
15Caused by: ${(S=g?.name)!==null&&S!==void 0?S:"Error"}: ${k}`,j&&(p+=` (${j})`),g?.stack&&(p+=`
16${g.stack}`)}else{var T;p=(T=u?.stack)!==null&&T!==void 0?T:""}const R=this.url.toString().length;return u?.name==="AbortError"||u?.code==="ABORT_ERR"?(y="",m="Request was aborted (timeout or manual cancellation)",R>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${R} 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.`)):(g?.name==="HeadersOverflowError"||g?.code==="UND_ERR_HEADERS_OVERFLOW")&&(y="",m="HTTP headers exceeded server limits (typically 16KB)",R>this.urlLengthLimit&&(m+=`. Your request URL is ${R} 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:`${(f=u?.name)!==null&&f!==void 0?f:"FetchError"}: ${u?.message}`,details:p,hint:m,code:y},data:null,count:null,status:0,statusText:""}}
16)),c.then(e,t)}async processResponse(e){var t=this;let a=null,s=null,o=null,c=e.status,u=e.statusText;if(e.ok){var f,p;if(t.method!=="HEAD"){var m;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")s=b;else if(t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))s=b;else try{s=JSON.parse(b)}catch{if(a={message:b},s=null,t.shouldThrowOnError)throw new Tf({message:b,details:"",hint:"",code:""})}}const g=(f=t.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),w=(p=e.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");if(g&&w&&w.length>1&&(o=parseInt(w[1])),t.isMaybeSingle&&Array.isArray(s))if(s.length>1){if(a={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,o=null,c=406,u="Not Acceptable",t.shouldThrowOnError){var y;throw new Tf(Ls(Ls({},a),{},{hint:(y=a.hint)!==null&&y!==void 0?y:""}))}}else s.length===1?s=s[0]:s=null}else{const g=await e.text();try{a=JSON.parse(g),Array.isArray(a)&&e.status===404&&(s=[],a=null,c=200,u="OK")}catch{e.status===404&&g===""?(c=204,u="No Content"):a={message:g}}if(a&&t.shouldThrowOnError)throw new Tf(a)}return{success:a===null,error:a,data:s,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},$O=class extends zO{throwOnError(){return super.throwOnError()}select(e){let t=!1;const a=(e??"*").split("").map(s=>/\s/.test(s)&&!t?"":(s==='"'&&(t=!t),s)).join("");return this.url.searchParams.set("select",a),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:a,foreignTable:s,referencedTable:o=s}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${e}.${t?"asc":"desc"}${a===void 0?"":a?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:a=t}={}){const s=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:a,referencedTable:s=a}={}){const o=typeof s>"u"?"offset":`${s}.offset`,c=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(c,`${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:a=!1,buffers:s=!1,wal:o=!1,format:c="text"}={}){var u;const f=[e?"analyze":null,t?"verbose":null,a?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${f};`),c==="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 Vv=new RegExp("[,()]");var xs=class extends $O{throwOnError(){return super.throwOnError()}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 a=Array.from(new Set(t)).map(s=>typeof s=="string"&&Vv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${a})`),this}notIn(e,t){const a=Array.from(new Set(t)).map(s=>typeof s=="string"&&Vv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`not.in.(${a})`),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:a,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const c=a===void 0?"":`(${a})`;return this.url.searchParams.append(e,`${o}fts${c}.${t}`),this}match(e){return Object.entries(e).filter(([t,a])=>
16a!==void 0).forEach(([t,a])=>{this.url.searchParams.append(t,`eq.${a}`)}),this}not(e,t,a){return this.url.searchParams.append(e,`not.${t}.${a}`),this}or(e,{foreignTable:t,referencedTable:a=t}={}){const s=a?`${a}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,a){return this.url.searchParams.append(e,`${t}.${a}`),this}},BO=class{constructor(e,{headers:t={},schema:a,fetch:s,urlLengthLimit:o=8e3,retry:c}){this.url=e,this.headers=new Headers(t),this.schema=a,this.fetch=s,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:a=!1,count:s}=t??{},o=a?"HEAD":"GET";let c=!1;const u=(e??"*").split("").map(m=>/\s/.test(m)&&!c?"":(m==='"'&&(c=!c),m)).join(""),{url:f,headers:p}=this.cloneRequestState();return f.searchParams.set("select",u),s&&p.append("Prefer",`count=${s}`),new xs({method:o,url:f,headers:p,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:a=!0}={}){var s;const o="POST",{url:c,headers:u}=this.cloneRequestState();
16if(t&&u.append("Prefer",`count=${t}`),a||u.append("Prefer","missing=default"),Array.isArray(e)){const f=e.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(f.length>0){const p=[...new Set(f)].map(m=>`"${m}"`);c.searchParams.set("columns",p.join(","))}}return new xs({method:o,url:c,headers:u,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:a=!1,count:s,defaultToNull:o=!0}={}){var c;const u="POST",{url:f,headers:p}=this.cloneRequestState();if(p.append("Prefer",`resolution=${a?"ignore":"merge"}-duplicates`),t!==void 0&&f.searchParams.set("on_conflict",t),s&&p.append("Prefer",`count=${s}`),o||p.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((y,g)=>y.concat(Object.keys(g)),[]);if(m.length>0){const y=[...new Set(m)].map(g=>`"${g}"`);f.searchParams.set("columns",y.join(","))}}return new xs({method:u,url:f,headers:p,schema:this.schema,body:e,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var a;const s="PATCH",{url:o,headers:c}=this.cloneRequestState();return t&&c.append("Prefer",`count=${t}`),new xs({method:s,url:o,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const a="DELETE",{url:s,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new xs({method:a,url:s,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},qO=class Iw{constructor(t,{headers:a={},schema:s,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:f}={}){this.url=t,this.headers=new Headers(a),this.schemaName=s,this.urlLengthLimit=u;const p=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(m,y)=>{const g=new AbortController,w=setTimeout(()=>g.abort(),c),b=y?.signal;if(b){if(b.aborted)return clearTimeout(w),p(m,y);const E=()=>{clearTimeout(w),g.abort()};return b.addEventListener("abort",E,{once:!0}),p(m,Ls(Ls({},y),{},{signal:g.signal})).finally(()=>{clearTimeout(w),b.removeEventListener("abort",E)})}return p(m,Ls(Ls({},y),{},{signal:g.signal})).finally(()=>clearTimeout(w))}:this.fetch=p,this.retry=f}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new BO(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 Iw(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,a={},{head:s=!1,get:o=!1,count:c}={}){var u;let f;const p=new URL(`${this.url}/rpc/${t}`);let m;const y=b=>b!==null&&typeof b=="object"&&(!Array.isArray(b)||b.some(y)),g=s&&Object.values(a).some(y);g?(f="POST",m=a):s||o?(f=s?"HEAD":"GET",Object.entries(a).filter(([b,E])=>E!==void 0).map(([b,E])=>[b,Array.isArray(E)?`{${E.join(",")}}`:`${E}`]).forEach(([b,E])=>{p.searchParams.append(b,E)})):(f="POST",m=a);const w=new Headers(this.headers);return g?w.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&w.set("Prefer",`count=${c}`),new xs({method:f,url:p,headers:w,schema:this.schemaName,body:m,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class HO{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const a=globalThis;if(typeof globalThis<"u"&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};const s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};if(typeof globalThis<"u"&&typeof a.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"&&a.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 o=globalThis.process;if(o){const c=o.versions;if(c&&c.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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 a=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(a+=`
17
18Suggested solution: ${t.workaround}`),new Error(a)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const GO="2.112.3",VO=`realtime-js/${GO}`,FO="1.0.0",zw="2.0.0",JO=zw,WO=1e4,KO=100,Ha={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},$w={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Xf={connecting:"connecting",closing:"closing",closed:"closed"};class YO{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,a){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return a(this._binaryEncodeUserBroadcastPush(t));let s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return a(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(t){var a;return this._isArrayBuffer((a=t.payload)===null||a===void 0?void 0:a.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var a,s;const o=(s=(a=t.payload)===null||a===void 0?void 0:a.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var a,s;const o=(s=(a=t.payload)===null||a===void 0?void 0:a.payload)!==null&&s!==void 0?s:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,a,s){var o,c;const u=new TextEncoder,f=u.encode(t.topic),p=u.encode((o=t.ref)!==null&&o!==void 0?o:""),m=u.encode((c=t.join_ref)!==null&&c!==void 0?c:""),y=u.encode(t.payload.event),g=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},w=u.encode(Object.keys(g).length===0?"":JSON.stringify(g));if(m.length>255)throw new Error(`joinRef length ${m.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`ref length ${p.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`topic length ${f.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`userEvent length ${y.length} exceeds maximum of 255`);if(w.length>255)throw new Error(`metadata length ${w.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+m.length+p.length+f.length+y.length+w.length,E=new ArrayBuffer(this.HEADER_LENGTH+b),S=new DataView(E),T=new Uint8Array(E);let R=0;S.setUint8(R++,this.KINDS.userBroadcastPush),S.setUint8(R++,m.length),S.setUint8(R++,p.length),S.setUint8(R++,f.length),S.setUint8(R++,y.length),S.setUint8(R++,w.length),S.setUint8(R++,a),T.set(m,R),R+=m.length,T.set(p,R),R+=p.length,T.set(f,R),R+=f.length,T.set(y,R),R+=y.length,T.set(w,R),R+=w.length;var k=new Uint8Array(E.byteLength+s.byteLength);return k.set(new Uint8Array(E),0),k.set(new Uint8Array(s),E.byteLength),k.buffer}decode(t,a){if(this._isArrayBuffer(t)){let s=this._binaryDecode(t);return a(s)}if(typeof t=="string"){const s=JSON.parse(t),[o,c,u,f,p]=s;return a({join_ref:o,ref:c,topic:u,event:f,payload:p})}return a({})}_binaryDecode(t){const a=new DataView(t),s=a.getUint8(0),o=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,a,o)}_decodeUserBroadcast(t,a,s){const o=a.getUint8(1),c=a.getUint8(2),u=a.getUint8(3),f=a.getUint8(4);let p=this.HEADER_LENGTH+4;const m=s.decode(t.slice(p,p+o));p=p+o;const y=s.decode(t.slice(p,p+c));p=p+c;const g=s.decode(t.slice(p,p+u));p=p+u;const w=t.slice(p,t.byteLength),b=f===this.JSON_ENCODING?JSON.parse(s.decode(w)):w,E={type:this.BROADCAST_EVENT,event:y,payload:b};return u>0&&(E.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:E}}_isArrayBuffer(t){var a;return t instanceof ArrayBuffer||((a=t?.constructor)===null||a===void 0?void 0:a.name)==="ArrayBuffer"}_pick(t,a){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([s])=>a.includes(s)))}}var Ge;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ge||(Ge={}));const Fv=(e,t,a={})=>{var s;const o=(s=a.skipTypes)!==null&&s!==void 0?s:[];return t?Object.keys(t).reduce((c,u)=>(c[u]=QO(u,e,t,o),c),{}):{}},QO=(e,t,a,s)=>{const o=t.find(f=>f.name===e),c=o?.type,u=a[e];return c&&!s.includes(c)?Bw(c,u):Zf(u)},Bw=(e,t)=>{if(e.charAt(0)==="_"){const a=e.slice(1,e.length);return t2(t,a)}switch(e){case Ge.bool:return XO(t);case Ge.float4:case Ge.float8:case Ge.int2:case Ge.int4:case Ge.int8:case Ge.numeric:case Ge.oid:return ZO(t);case Ge.json:case Ge.jsonb:return e2(t);case Ge.timestamp:return n2(t);case Ge.abstime:case Ge.date:case Ge.daterange:case Ge.int4range:case Ge.int8range:case Ge.money:case Ge.reltime:case Ge.text:case Ge.time:case Ge.timestamptz:case Ge.timetz:case Ge.tsrange:case Ge.tstzrange:return Zf(t);default:return Zf(t)}},Zf=e=>e,XO=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},ZO=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 4,780 bytes, line 18
18if(!Number.isNaN(t))return t}return e},e2=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},t2=(e,t)=>{if(typeof e!="string")return e;const a=e.length-1,s=e[a];if(e[0]==="{"&&s==="}"){let c;const u=e.slice(1,a);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(f=>Bw(t,f))}return e},n2=e=>typeof e=="string"?e.replace(" ","T"):e,qw=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 zs=e=>typeof e=="function"?e:function(){return e},a2=typeof self<"u"?self:null,ks=typeof window<"u"?window:null,kn=a2||ks||globalThis,r2="2.0.0",s2=1e4,i2=1e3,o2=100,Nn={connecting:0,open:1,closing:2,closed:3},Dt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ra={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},eh={longpoll:"longpoll",websocket:"websocket"},l2={complete:4},th="base64url.bearer.phx.",Fl=class{constructor(e,t,a,s){this.channel=e,this.event=t,this.payload=a||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:a}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.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})}},Hw=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))}},c2=class{constructor(e,t,a){this.state=Dt.closed,this.topic=e,this.params=zs(t||{}),this.socket=a,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Fl(this,ra.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Hw(()=>{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=Dt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=Dt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Dt.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=Dt.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 Fl(this,ra.leave,zs({}),this.timeout).send(),this.state=Dt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ra.reply,(s,o)=>{this.trigger(this.replyEventName(o),s)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 18,220 bytes, lines 18-19
18teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Dt.closed,this.bindings=[]}onClose(e){this.on(ra.close,e)}onError(e){return this.on(ra.error,t=>e(t))}on(e,t){let a=this.bindingRef++;return this.bindings.push({event:e,ref:a,callback:t}),a}off(e,t){this.bindings=this.bindings.filter(a=>!(a.event===e&&(typeof t>"u"||t===a.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,a=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 s=new Fl(this,e,function(){return t},a);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Dt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ra.close,"leave")},a=new Fl(this,ra.leave,zs({}),e);return a.receive("ok",()=>t()).receive("timeout",()=>t()),a.send(),this.canPush()||a.trigger("ok",{}),a}onMessage(e,t,a){return t}filterBindings(e,t,a){return!0}isMember(e,t,a,s){return this.topic!==e?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:a,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Dt.joining,this.joinPush.resend(e))}trigger(e,t,a,s){let o=this.onMessage(e,t,a,s);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===e&&this.filterBindings(u,t,a));for(let u=0;u<c.length;u++)c[u].callback(o,a,s||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Dt.closed}isErrored(){return this.state===Dt.errored}isJoined(){return this.state===Dt.joined}isJoining(){return this.state===Dt.joining}isLeaving(){return this.state===Dt.leaving}},yc=class{static request(e,t,a,s,o,c,u){if(kn.XDomainRequest){let f=new kn.XDomainRequest;return this.xdomainRequest(f,e,t,s,o,c,u)}else if(kn.XMLHttpRequest){let f=new kn.XMLHttpRequest;return this.xhrRequest(f,e,t,a,s,o,c,u)}else{if(kn.fetch&&kn.AbortController)return this.fetchRequest(e,t,a,s,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,a,s,o,c,u){let f={method:e,headers:a,body:s},p=null;return o&&(p=new AbortController,setTimeout(()=>p.abort(),o),f.signal=p.signal),kn.fetch(t,f).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>u&&u(m)).catch(m=>{m.name==="AbortError"&&c?c():u&&u(null)}),p}static xdomainRequest(e,t,a,s,o,c,u){return e.timeout=o,e.open(t,a),e.onload=()=>{let f=this.parseJSON(e.responseText);u&&u(f)},c&&(e.ontimeout=c),e.onprogress=()=>{},e.send(s),e}static xhrRequest(e,t,a,s,o,c,u,f){e.open(t,a,!0),e.timeout=c;for(let[p,m]of Object.entries(s))e.setRequestHeader(p,m);return e.onerror=()=>f&&f(null),e.onreadystatechange=()=>{if(e.readyState===l2.complete&&f){let p=this.parseJSON(e.responseText);f(p)}},u&&(e.ontimeout=u),e.send(o),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 a=[];for(var s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let o=t?`${t}[${s}]`:s,c=e[s];typeof c=="object"?a.push(this.serialize(c,o)):a.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return a.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let a=e.match(/\?/)?"&":"?";return`${e}${a}${this.serialize(t)}`}},u2=e=>{let t="",a=new Uint8Array(e),s=a.byteLength;for(let o=0;o<s;o++)t+=String.fromCharCode(a[o]);return btoa(t)},Ts=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(th)&&(this.authToken=atob(t[1].slice(th.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=Nn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+eh.websocket),"$1/"+eh.longpoll)}endpointURL(){return yc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,a){this.close(e,t,a),this.readyState=Nn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Nn.open||this.readyState===Nn.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:a,token:s,messages:o}=t;if(a===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else a=0;switch(a){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Nn.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${a}`)}})}send(e){typeof e!="string"&&(e=u2(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,t=0){this.awaitingBatchAck=!0;const a=t+o2,s=e.slice(t,a);this.ajax("POST",{"Content-Type":"application/x-ndjson"},s.join(`
19`),()=>this.onerror("timeout"),o=>{!o||o.status!==200?(this.awaitingBatchAck=!1,this.onerror(o&&o.status),this.closeAndRetry(1011,"internal server error",!1)):a<e.length?this.batchSend(e,a):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,a){for(let o of this.reqs)o.abort();this.readyState=Nn.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:a});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(e,t,a,s,o){let c,u=()=>{this.reqs.delete(c),s()};c=yc.request(e,this.endpointURL(),t,a,this.timeout,u,f=>{this.reqs.delete(c),this.isActive()&&o(f)}),this.reqs.add(c)}},d2=class Gi{constructor(t,a={}){let s=a.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Gi.syncState(this.state,o,c,u),this.pendingDiffs.forEach(p=>{this.state=Gi.syncDiff(this.state,p,c,u)}),this.pendingDiffs=[],f()}),this.channel.on(s.diff,o=>{let{onJoin:c,onLeave:u,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Gi.syncDiff(this.state,o,c,u),f())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Gi.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,a,s,o){let c=this.toNullProtoObj(this.clone(t));a=this.toNullProtoObj(a);let u=Object.create(null),f=Object.create(null);return this.map(c,(p,m)=>{a[p]||(f[p]=m)}),this.map(a,(p,m)=>{let y=c[p];if(y){let g=m.metas.map(S=>S.phx_ref),w=y.metas.map(S=>S.phx_ref),b=m.metas.filter(S=>w.indexOf(S.phx_ref)<0),E=y.metas.filter(S=>g.indexOf(S.phx_ref)<0);b.length>0&&(u[p]=m,u[p].metas=b),E.length>0&&(f[p]=this.clone(y),f[p].metas=E)}else u[p]=m}),this.syncDiff(c,{joins:u,leaves:f},s,o)}static syncDiff(t,a,s,o){t=this.toNullProtoObj(t);let{joins:c,leaves:u}=this.clone(a);return s||(s=function(){}),o||(o=function(){}),this.map(c,(f,p)=>{let m=t[f];if(t[f]=this.clone(p),m){let y=t[f].metas.map(w=>w.phx_ref),g=m.metas.filter(w=>y.indexOf(w.phx_ref)<0);t[f].metas.unshift(...g)}s(f,m,p)}),this.map(u,(f,p)=>{let m=t[f];if(!m)return;let y=p.metas.map(g=>g.phx_ref);m.metas=m.metas.filter(g=>y.indexOf(g.phx_ref)<0),o(f,m,p),m.metas.length===0&&delete t[f]}),t}static list(t,a){return a||(a=function(s,o){return o}),this.map(t,(s,o)=>a(s,o))}static map(t,a){return Object.getOwnPropertyNames(t).map(s=>a(s,t[s]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let a=Object.create(null);return Object.getOwnPropertyNames(t).forEach(s=>{a[s]=t[s]}),a}static clone(t){return JSON.parse(JSON.stringify(t))}},Jl={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 a=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(a))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[a,s,o,c,u]=JSON.parse(e);return t({join_ref:a,ref:s,topic:o,event:c,payload:u})}},binaryEncode(e){let{join_ref:t,ref:a,event:s,topic:o,payload:c}=e,u=new TextEncoder,f=u.encode(t),p=u.encode(a),m=u.encode(o),y=u.encode(s);this.assertFieldSize(f.byteLength,"join_ref"),this.assertFieldSize(p.byteLength,"ref"),this.assertFieldSize(m.byteLength,"topic"),this.assertFieldSize(y.byteLength,"event");let g=this.META_LENGTH+f.byteLength+p.byteLength+m.byteLength+y.byteLength,w=new ArrayBuffer(this.HEADER_LENGTH+g),b=new Uint8Array(w),E=new DataView(w),S=0;E.setUint8(S++,this.KINDS.push),E.setUint8(S++,f.byteLength),E.setUint8(S++,p.byteLength),E.setUint8(S++,m.byteLength),E.setUint8(S++,y.byteLength),b.set(f,S),S+=f.byteLength,b.set(p,S),S+=p.byteLength,b.set(m,S),S+=m.byteLength,b.set(y,S),S+=y.byteLength;var T=new Uint8Array(w.byteLength+c.byteLength);return T.set(b,0),T.set(new Uint8Array(c),w.byteLength),T.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),a=t.getUint8(0),s=new TextDecoder;switch(a){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,a){let s=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,f=a.decode(e.slice(u,u+s));u=u+s;let p=a.decode(e.slice(u,u+o));u=u+o;let m=a.decode(e.slice(u,u+c));u=u+c;let y=e.slice(u,e.byteLength);return{join_ref:f,ref:null,topic:p,event:m,payload:y}},decodeReply(e,t,a){let s=t.getUint8(1),o=t.getUint8(2),c=t.getUint8(3),u=t.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,p=a.decode(e.slice(f,f+s));f=f+s;let m=a.decode(e.slice(f,f+o));f=f+o;let y=a.decode(e.slice(f,f+c));f=f+c;let g=a.decode(e.slice(f,f+u));f=f+u;let w=e.slice(f,e.byteLength),b={status:g,response:w};return{join_ref:p,ref:m,topic:y,event:ra.reply,payload:b}},decodeBroadcast(e,t,a){let s=t.getUint8(1),o=t.getUint8(2),c=this.HEADER_LENGTH+2,u=a.decode(e.slice(c,c+s));c=c+s;let f=a.decode(e.slice(c,c+o));c=c+o;let p=e.slice(c,e.byteLength);return{join_ref:null,ref:null,topic:u,event:f,payload:p}}},f2=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||s2,this.transport=t.transport||kn.WebSocket||Ts,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let a=null;try{a=kn&&kn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||a,this.establishedConnections=0,this.defaultEncoder=Jl.encode.bind(Jl),this.defaultDecoder=Jl.decode.bind(Jl),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 s=null;ks&&ks.addEventListener&&(ks.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),s=this.connectClock)}),ks.addEventListener("pageshow",o=>{s===this.connectClock&&(s=null,this.connect())}),ks.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>t.rejoinAfterMs?t.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>t.reconnectAfterMs?t.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=zs(t.params||{}),this.endPoint=`${e}/${eh.websocket}`,this.vsn=t.vsn||r2,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Hw(()=>{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&&zs(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=yc.appendParams(yc.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,a){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,a)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=zs(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ts?this.connectWithFallback(Ts,this.longPollFallbackMs):this.transportConnect())}log(e,t,a){this.logger&&this.logger(e,t,a)}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(),a=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let s=this.onMessage(o=>{o.ref===t&&(this.off([s]),e(Date.now()-a))});return!0}transportName(e){return e===Ts?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${th}${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 a=!1,s=!0,o,c,u=this.transportName(e),f=p=>{this.log("transport",`falling back to ${u}...`,p),this.off([o,c]),s=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return f("memorized");this.fallbackTimer=setTimeout(f,t),c=this.onError(p=>{this.log("transport","error",p),s&&!a&&(clearTimeout(this.fallbackTimer),f(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(a=!0,!s){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,t),this.ping(p=>{this.log("transport","connected to primary after",p),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(),i2,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,a){if(!this.conn)return e&&e();const s=this.conn;this.waitForBufferDone(s,()=>{t?s.close(t,a||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
vendor: 4,959 bytes, line 19
19,this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,a=1){if(a===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,a+1)},150*a)}waitForSocketClosed(e,t,a=1){if(a===5||e.readyState===Nn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,a+1)},150*a)}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,a=this.establishedConnections;this.triggerStateCallbacks("error",e,t,a),(t===this.transport||a>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(ra.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Nn.connecting:return"connecting";case Nn.open:return"open";case Nn.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(([a])=>e.indexOf(a)===-1)}channel(e,t={}){let a=new c2(e,t,this);return this.channels.push(a),a}push(e){if(this.hasLogger()){let{topic:t,event:a,payload:s,ref:o,join_ref:c}=e;this.log("push",`${t} ${a} (${c}, ${o})`,s)}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:a,event:s,payload:o,ref:c,join_ref:u}=t;if(c&&c===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",f)}catch(p){this.log("error","error in heartbeat callback",p)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${a} ${s} ${c&&"("+c+")"||""}`.trim(),o);for(let f=0;f<this.channels.length;f++){const p=this.channels[f];p.isMember(a,s,o,u)&&p.trigger(s,o,c,u)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([a,s])=>{try{s(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(a){this.log("error",`error triggering ${e} callbacks`,a)}}leaveOpenTopic(e){let t=this.channels.find(a=>a.topic===e&&(a.isJoined()||a.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Yi{constructor(t,a){const s=p2(a);this.presence=new d2(t.getChannel(),s),this.presence.onJoin((o,c,u)=>{const f=Yi.onJoinPayload(o,c,u);t.getChannel().trigger("presence",f)}),this.presence.onLeave((o,c,u)=>{const f=Yi.onLeavePayload(o,c,u);t.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Yi.transformState(this.presence.state)}static transformState(t){return t=h2(t),Object.getOwnPropertyNames(t).reduce((a,s)=>{const o=t[s];return a[s]=lc(o),a},{})}static onJoinPayload(t,a,s){const o=Jv(a),c=lc(s);return{event:"join",key:t,currentPresences:o,newPresences:c}}static onLeavePayload(t,a,s){const o=Jv(a),c=lc(s);return{event:"leave",key:t,currentPresences:o,leftPresences:c}}}function lc(e){return e.metas.map(t=>{const a=Object.getOwnPropertyDescriptors(t),s=Object.defineProperties({},a);return s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s})}function h2(e){return JSON.parse(JSON.stringify(e))}function p2(e){return e?.events&&{events:e.events}}function Jv(e){return e?.metas?lc(e):[]}var Wv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Wv||(Wv={}));class m2{get state(){return this.presenceAdapter.state}constructor(t,a){this.channel=t,this.presenceAdapter=new Yi(this.channel.channelAdapter,a)}}function g2(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
19if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const a=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${a}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class y2{constructor(t,a,s){const o=v2(s);this.channel=t.getSocket().channel(a,o),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,a){return this.channel.on(t,a)}off(t,a){this.channel.off(t,a)}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,a,s){let o;try{o=this.channel.push(t,a,s)}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>KO){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(t){const a=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},a),t)}canPush(){return this.socket.isConnected()&&this.state===Ha.joined}isJoined(){return this.state===Ha.joined}isJoining(){return this.state===Ha.joining}isClosed(){return this.state===Ha.closed}isLeaving(){return this.state===Ha.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function v2(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const b2=/[,()"\\]/,w2=e=>b2.test(e)||e!==e.trim(),_2=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Kv=e=>{const t=e===null?"null":String(e);return w2(t)?_2(t):t},S2=e=>e===null?"null":String(e),E2=(e,t)=>{if(e==="in"){const a=Array.isArray(t)?t:[t];if(a.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(a)).map(o=>Kv(o)).join(",")})`}return e==="is"?`is.${S2(t)}`:`${e}.${Kv(t)}`};class A2{constructor(){this.filters=[]}add(t,a,s,o=!1){const c=o?"not.":"";return this.filters.push(`${t}=${c}${E2(a,s)}`),this}eq(t,a){return this.add(t,"eq",a)}neq(t,a){return this.add(t,"neq",a)}gt(t,a){return this.add(t,"gt",a)}gte(t,a){return this.add(t,"gte",a)}lt(t,a){return this.add(t,"lt",a)}lte(t,a){return this.add(t,"lte",a)}in(t,a){return this.add(t,"in",a)}like(t,a){return this.add(t,"like",a)}ilike(t,a){return this.add(t,"ilike",a)}match(t,a){return this.add(t,"match",a)}imatch(t,a){return this.add(t,"imatch",a)}is(t,a){return this.add(t,"is",a)}isDistinct(t,a){return this.add(t,"isdistinct",a)}not(t,a,s){return this.add(t,a,s,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Yv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Yv||(Yv={}));var Ar;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ar||(Ar={}));var sa;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(sa||(sa={}));class ia{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,a={config:{}},s){var o,c;if(this.topic=t,this.params=a,this.socket=s,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},a.config),this.channelAdapter=new y2(this.socket.socketAdapter,t,this.params),this.presence=new m2(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=qw(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,a=this.timeout){var s,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:f,private:p}}=this.params,m=(o=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(b=>b.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[Ar.PRESENCE]&&this.bindings[Ar.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,g={},w={broadcast:u,presence:Object.assign(Object.assign({},f),{enabled:y}),postgres_changes:m,private:p};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(b=>{t?.(sa.CHANNEL_ERROR,g2(b))}),this._onClose(()=>t?.(sa.CLOSED)),this.updateJoinPayload(Object.assign({config:w},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(a).receive("ok",async({postgres_changes:b})=>{if(this.socket._isManualToken()||this.socket.setAuth(),b===void 0){t?.(sa.SUBSCRIBED);return}this._updatePostgresBindings(b,t)}).receive("error",b=>{this.state=Ha.errored;const E=Object.values(b).join(", ")||"error";t?.(sa.CHANNEL_ERROR,new Error(E,{cause:b}))}).receive("timeout",()=>{t?.(sa.TIMED_OUT)})}return this}_updatePostgresBindings(t,a){var s;const o=this.bindings.postgres_changes,c=(s=o?.length)!==null&&s!==void 0?s:0,u=[];for(let f=0;f<c;f++){const p=o[f],{filter:{event:m,schema:y,table:g,filter:w}}=p,b=t&&t[f];if(b&&b.event===m&&ia.isFilterValueEqual(b.schema,y)&&ia.isFilterValueEqual(b.table,g)&&ia.isFilterValueEqual(b.filter,w))u.pu
19sh(Object.assign(Object.assign({},p),{id:b.id}));else{this.unsubscribe(),this.state=Ha.errored,a?.(sa.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=Ha.errored&&a&&a(sa.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,a={}){return await this.send({type:"presence",event:"track",payload:t},a)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,a,s){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=t===Ar.PRESENCE||t===Ar.POSTGRES_CHANGES;if(o&&c)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,a,s)}async httpSend(t,a,s={}){var o;if(a==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c=a instanceof ArrayBuffer||ArrayBuffer.isView(a),u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":c?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&f.searchParams.set("private","true");const p={method:"POST",headers:u,body:c?a:JSON.stringify(a)},m=await this._fetchWithTimeout(f.toString(),p,(o=s.timeout)!==null&&o!==void 0?o:this.timeout);if(m.status===202)return{success:!0};if(m.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let y=m.statusText;try{const g=await m.json();y=g.error||g.message||y}catch{}return Promise.reject(new Error(y))}async send(t,a={}){var s,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
19in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=t,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(s=a.timeout)!==null&&s!==void 0?s:this.timeout);return await((o=m.body)===null||o===void 0?void 0:o.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,f,p;const m=this.channelAdapter.push(t.type,t,a.timeout||this.timeout);t.type==="broadcast"&&!(!((p=(f=(u=this.params)===null||u===void 0?void 0:u.config)===null||f===void 0?void 0:f.broadcast)===null||p===void 0)&&p.ack)&&c("ok"),m.receive("ok",()=>c("ok")),m.receive("error",()=>c("error")),m.receive("timeout",()=>c("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(a=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>a("ok")).receive("timeout",()=>a("timed out")).receive("error",()=>a("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,a,s){const o=new AbortController,c=setTimeout(()=>o.abort(),s),u=await this.socket.fetch(t,Object.assign(Object.assign({},a),{signal:o.signal}));return clearTimeout(c),u}_on(t,a,s){var o;const c=t.toLocaleLowerCase(),u=a?.filter;if((u instanceof A2||typeof u=="object"&&u!==null&&typeof u.build=="function")&&(a=Object.assign(Object.assign({},a),{filter:u.build()})),c===Ar.POSTGRES_CHANGES&&((o=this.bindings[c])===null||o===void 0?void 0:o.find(y=>ia.isSamePostgresFilter(y.filter,a))))return this.socket.log("error",`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,a),this;const f=this.channelAdapter.on(t,s),p={type:c,filter:a,callback:s,ref:f};return this.bindings[c]?this.bindings[c].push(p):this.bindings[c]=[p],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,a,s)=>{var o,c,u,f,p,m,y;const g=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,s))return!1;const w=(o=this.bindings[g])===null||o===void 0?void 0:o.find(b=>b.ref===t.ref);if(!w)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in w){const b=w.id,E=(c=w.filter)===null||c===void 0?void 0:c.event;return b&&((u=a.ids)===null||u===void 0?void 0:u.includes(b))&&(E==="*"||E?.toLocaleLowerCase()===((f=a.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const b=(m=(p=w?.filter)===null||p===void 0?void 0:p.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return b==="*"||b===((y=a?.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return w.type.toLocaleLowerCase()===g})}_notThisChannelEvent(t,a){const{close:s,error:o,leave:c,join:u}=$w;return a&&[s,o,c,u].includes(t)&&a!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,a,s)=>{if(typeof a=="object"&&"ids"in a){const o=a.data,{schema:c,table:u,commit_timestamp:f,type:p,errors:m}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:f,eventType:p,new:{},old:{},errors:m}),this._getPayloadRecords(o))}return a})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const a in t.bindings)for(const s of t.bindings[a])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(t,a){return(t??void 0)===(a??void 0)}static isSamePostgresFilter(t,a){var s,o,c,u;const f=(o=(s=t?.select)===null||s===void 0?void 0:s.join())!==null&&o!==void 0?o:void 0,p=(u=(c=a?.select)===null||c===void 0?void 0:c.join())!==null&&u!==void 0?u:void 0;return t?.event===a?.event&&ia.isFilterValueEqual(t?.schema,a?.schema)&&ia.isFilterValueEqual(t?.table,a?.table)&&ia.isFilterValueEqual(t?.filter,a?.filter)&&f===p}_getPayloadRecords(t){const a={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(a.new=Fv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(a.old=Fv(t.columns,t.old_record)),a}}class T2{constructor(t,a){this.socket=new f2(t,a)}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,a,s,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{t(),c("ok")},a,s)})}push(t){this.socket.push(t)}log(t,a,s){this.socket.log(t,a,s)}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()==Xf.connecting}isDisconnecting(){return this.socket.connectionState()==Xf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Qv={HEARTBEAT_INTERVAL:25e3},R2=[1e3,2e3,5e3,1e4],C2=1e4;function O2(){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 a;return(a=Array.from(e.keys())[t])!==null&&a!==void 0?a:null},removeItem(t){e.delete(t)},setItem(t,a){e.set(t,String(a))}}}function x2(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return O2()}const k2=`
20  addEventListener("message", (e) => {
21    if (e.data.event === "start") {
22      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
23    }
24  });`;class j2{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,a){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
24,this.ref=0,this.serializer=new YO,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((s=a?.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=a.params.apikey;const o=this._initializeOptions(a);this.socketAdapter=new T2(t,o),this.httpEndpoint=qw(t),this.fetch=this._resolveFetch(a?.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 a=t.message;throw new Error(`WebSocket not available: ${a}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,a){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,a)}getChannels(){return this.channels}async removeChannel(t){const a=await t.unsubscribe();return a==="ok"&&t.teardown(),a}async removeAllChannels(){const t=this.channels.map(async s=>{const o=await s.unsubscribe();return s.teardown(),o}),a=await Promise.all(t);return await this.disconnect(),a}log(t,a,s){this.socketAdapter.log(t,a,s)}connectionState(){return this.socketAdapter.connectionState()||Xf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,a={config:{}}){const s=`realtime:${t}`,o=this.getChannels().find(c=>c.topic===s);if(o)return o;{const c=new ia(`realtime:${t}`,a,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){const a=++this._authGeneration,s=this._performAuth(t,a);a===this._authGeneration&&(this._authPromise=s);try{await s}finally{this._authPromise===s&&(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(a=>a.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}
24this._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,a){let s,o=!1;if(t)s=t,o=!0;else if(this.accessToken)try{s=await this.accessToken()}catch(c){this.log("error","Error fetching access token from callback",c),s=this.accessTokenValue}else s=this.accessTokenValue;a===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:o&&(this._manuallySetToken=!0),this.accessTokenValue!=s&&(this.accessTokenValue=s,this.channels.forEach(c=>{const u={access_token:s,version:VO};c.updateJoinPayload(u),c.joinedOnce&&c.channelAdapter.isJoined()&&c.channelAdapter.push($w.access_token,{access_token:s})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(a=>{this.log("error",`Error setting auth in ${t}`,a)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(a=>{this.log("error","error waiting for auth on connect",a)}),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(a,s)=>{a!=="disconnected"&&(a=="sent"&&this._setAuthSafely(),t&&t(a,s))}}_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=a=>{this.log("worker","worker error",a.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=a=>{a.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 a;if(t)a=t;else{const s=new Blob([k2],{type:"application/javascript"});a=URL.createObjectURL(s)}return a}_initializeOptions(t){var a,s,o,c,u,f,p,m,y,g,w,b;this.worker=(a=t?.worker)!==null&&a!==void 0?a:!1,this.accessToken=(s=t?.accessToken)!==null&&s!==void 0?s:null;const E={};E.timeout=(o=t?.timeout)!==null&&o!==void 0?o:WO,E.heartbeatIntervalMs=(c=t?.heartbeatIntervalMs)!==null&&c!==void 0?c:Qv.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=t?.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((f=t?.heartbeatIntervalMs)!==null&&f!==void 0?f:Qv.HEARTBEAT_INTERVAL),E.transport=(p=t?.transport)!==null&&p!==void 0?p:HO.getWebSocketConstructor(),E.params=t?.params,E.logger=t?.logger,E.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),E.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:x2(),E.reconnectAfterMs=(y=t?.reconnectAfterMs)!==null&&y!==void 0?y:(k=>R2[k-1]||C2);let S,T;const R=(g=t?.vsn)!==null&&g!==void 0?g:JO;switch(R){case FO:S=(k,j)=>j(JSON.stringify(k)),T=(k,j)=>j(JSON.parse(k));break;case zw:S=this.serializer.encode.bind(this.serializer),T=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${E.vsn}`)}if(E.vsn=R,E.encode=(w=t?.encode)!==null&&w!==void 0?w:S,E.decode=(b=t?.decode)!==null&&b!==void 0?b:T,E.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,E.params=Object.assign(Object.assign({},E.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,E.autoSendHeartbeat=!this.worker}return E}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
24var so=class extends Error{constructor(e,t){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)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function N2(e,t,a){const s=new URL(t,e);if(a)for(const[o,c]of Object.entries(a))c!==void 0&&s.searchParams.set(o,c);return s.toString()}async function D2(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 L2(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:a,path:s,query:o,body:c,headers:u}){const f=N2(e.baseUrl,s,o),p=await D2(e.auth),m=await t(f,{method:a,headers:{...c?{"Content-Type":"application/json"}:{},...p,...u},body:c?JSON.stringify(c):void 0}),y=await m.text(),g=(m.headers.get("content-type")||"").includes("application/json"),w=g&&y?JSON.parse(y):y;if(!m.ok){const b=g?w:void 0,E=b?.error;throw new so(E?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:E?.type,icebergCode:E?.code,details:b})}return{status:m.status,headers:m.headers,data:w}}}}function Wl(e){return e.join("�")}var M2=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Wl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(e,t){const a={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:a})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Wl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Wl(e.namespace)}`}),!0}catch(t){if(t instanceof so&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(a){if(a instanceof so&&a.status===409)return;throw a}}};function Rs(e){return e.join("�")}var P2=class{constructor(e,t="",a){this.client=e,this.prefix=t,this.accessDelegation=a}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 a={};return this.accessDelegation&&(a["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables`,body:t,headers:a})).data.metadata}async updateTable(e,t){const a=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":a.data["metadata-location"],metadata:a.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?.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(a){if(a instanceof so&&a.status===404)return!1;throw a}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(a){if(a instanceof so&&a.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw a}}},U2=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const a=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=L2({baseUrl:a,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new M2(this.client,t),this.tableOps=new P2(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)}
24async 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 io(e){"@babel/helpers - typeof";return io=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},io(e)}function I2(e,t){if(io(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(io(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z2(e){var t=I2(e,"string");return io(t)=="symbol"?t:t+""}function $2(e,t,a){return(t=z2(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Xv(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,s)}return a}function fe(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Xv(Object(a),!0).forEach(function(s){$2(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Xv(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}var zc=class extends Error{constructor(e,t="storage",a,s){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=a,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function $c(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var nh=class extends zc{constructor(e,t,a,s="storage",o){super(e,s,t,a),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=a,this.code=o}toJSON(){return fe(fe({},super.toJSON()),{},{code:this.code})}},Gw=class extends zc{constructor(e,t,a="storage"){super(e,a),this.name=a==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function vc(e,t,a){const s=fe({},e),o=t.toLowerCase();for(const c of Object.keys(s))c.toLowerCase()===o&&delete s[c];return s[o]=a,s}function B2(e){const t={};for(const[a,s]of Object.entries(e))t[a.toLowerCase()]=s;return t}const q2=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),H2=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)},ah=e=>{if(Array.isArray(e))return e.map(a=>ah(a));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([a,s])=>{const o=a.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));t[o]=ah(s)}),t},G2=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Vw=e=>e.split("/").map(encodeURIComponent).join("/"),Zv=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 a=t.error;if(typeof a.message=="string")return a.message}}return JSON.stringify(e)},V2=async(e,t,a,s)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const f=u?.statusCode||u?.code||c+"";t(new nh(Zv(u),c,f,s,u?.code))}).catch(()=>{const u=c+"";t(new nh(o.statusText||`HTTP ${c} error`,c,u,s))})}
24else t(new Gw(Zv(e),e,s))},F2=(e,t,a,s)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!s)return fe(fe({},o),a);if(H2(s)){var c;const u=t?.headers||{};let f;for(const[p,m]of Object.entries(u))p.toLowerCase()==="content-type"&&(f=m);o.headers=vc(u,"Content-Type",(c=f)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(s)}else o.body=s;return t?.duplex&&(o.duplex=t.duplex),fe(fe({},o),a)};async function qi(e,t,a,s,o,c,u){return new Promise((f,p)=>{e(a,F2(t,s,o,c)).then(m=>{if(!m.ok)throw m;if(s?.noResolveJson)return m;if(u==="vectors"){const y=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!y||!y.includes("application/json"))return{}}return m.json()}).then(m=>f(m)).catch(m=>V2(m,p,s,u))})}function Fw(e="storage"){return{get:async(t,a,s,o)=>qi(t,"GET",a,s,o,void 0,e),post:async(t,a,s,o,c)=>qi(t,"POST",a,o,c,s,e),put:async(t,a,s,o,c)=>qi(t,"PUT",a,o,c,s,e),head:async(t,a,s,o)=>qi(t,"HEAD",a,fe(fe({},s),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,a,s,o,c)=>qi(t,"DELETE",a,o,c,s,e)}}const J2=Fw("storage"),{get:oo,post:pn,put:rh,head:W2,remove:lo}=J2,Ft=Fw("vectors");var Hs=class{constructor(e,t={},a,s="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=B2(t),this.fetch=q2(a),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=vc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if($c(a))return{data:null,error:a};throw a}}};let Jw;Jw=Symbol.toStringTag;var K2=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Jw]="StreamDownloadBuilder",this.promise=null}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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;
24if($c(t))return{data:null,error:t};throw t}}};let Ww;Ww=Symbol.toStringTag;var Y2=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ww]="BlobDownloadBuilder",this.promise=null}asStream(){return new K2(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($c(t))return{data:null,error:t};throw t}}};const Rf={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},e0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Q2=class extends Hs{constructor(e,t={},a,s){super(e,t,s,"storage"),this.bucketId=a}async uploadOrUpdate(e,t,a,s){var o=this;return o.handleOperation(async()=>{let c;const u=fe(fe({},e0),s);let f=fe(fe({},o.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const p=u.metadata;if(typeof Blob<"u"&&a instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),p&&c.append("metadata",o.encodeMetadata(p)),c.append("",a)):typeof FormData<"u"&&a instanceof FormData?(c=a,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),p&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(p))):(c=a,f["cache-control"]=`max-age=${u.cacheControl}`,f["content-type"]=u.contentType,p&&(f["x-metadata"]=o.toBase64(o.encodeMetadata(p))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),s?.headers)for(const[w,b]of Object.entries(s.headers))f=vc(f,w,b);const m=o._removeEmptyFolders(t),y=o._getFinalPath(m),g=await(e=="PUT"?rh:pn)(o.fetch,`${o.url}/object/${y}`,c,fe({headers:f},u?.duplex?{duplex:u.duplex}:{}));return{path:m,id:g.Id,fullPath:g.Key}})}async upload(e,t,a){return this.uploadOrUpdate("POST",e,t,a)}async uploadToSignedUrl(e,t,a,s){var o=this;const c=o._removeEmptyFolders(e),u=o._getFinalPath(c),f=new URL(o.url+`/object/upload/sign/${u}`);return f.searchParams.set("token",t),o.handleOperation(async()=>{let p;const m=fe(fe({},e0),s);let y=fe(fe({},o.headers),{"x-upsert":String(m.upsert)});const g=m.metadata;if(typeof Blob<"u"&&a instanceof Blob?(p=new FormData,p.append("cacheControl",m.cacheControl),g&&p.append("metadata",o.encodeMetadata(g)),p.append("",a)):typeof FormData<"u"&&a instanceof FormData?(p=a,p.has("cacheControl")||p.append("cacheControl",m.cacheControl),g&&!p.has("metadata")&&p.append("metadata",o.encodeMetadata(g))):(p=a,y["cache-control"]=`max-age=${m.cacheControl}`,y["content-type"]=m.contentType,g&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(g))),(typeof ReadableStream<"u"&&p instanceof ReadableStream||p&&typeof p=="object"&&"pipe"in p&&typeof p.pipe=="function")&&!m.duplex&&(m.duplex="half")),s?.headers)for(const[w,b]of Object.entries(s.headers))y=vc(y,w,b);return{path:c,fullPath:(await rh(o.fetch,f.toString(),p,fe({headers:y},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var a=this;return a.handleOperation(async()=>{let s=a._getFinalPath(e);const o=fe({},a.headers);t?.upsert&&(o["x-upsert"]="true");const c=await pn(a.fetch,`${a.url}/object/upload/sign/${s}`,{},{headers:o}),u=new URL(a.url+c.url),f=u.searchParams.get("token");if(!f)throw new zc("No token returned by API");return{signedUrl:u.toString(),path:e,token:f}})}async update(e,t,a){return this.uploadOrUpdate("PUT",e,t,a)}async move(e,t,a){var s=this;return s.handleOperation(async()=>await pn(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,de
24stinationBucket:a?.destinationBucket},{headers:s.headers}))}async copy(e,t,a){var s=this;return s.handleOperation(async()=>({path:(await pn(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,destinationBucket:a?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(e,t,a){var s=this;return s.handleOperation(async()=>{let o=s._getFinalPath(e);const c=typeof a?.transform=="object"&&a.transform!==null&&Object.keys(a.transform).length>0;let u=await pn(s.fetch,`${s.url}/object/sign/${o}`,fe({expiresIn:t},c?{transform:a.transform}:{}),{headers:s.headers});const f=new URLSearchParams;a?.download&&f.set("download",a.download===!0?"":a.download),a?.cacheNonce!=null&&f.set("cacheNonce",String(a.cacheNonce));const p=f.toString();return{signedUrl:encodeURI(`${s.url}${u.signedURL}${p?`&${p}`:""}`)}})}async createSignedUrls(e,t,a){var s=this;return s.handleOperation(async()=>{const o=await pn(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:t,paths:e},{headers:s.headers}),c=new URLSearchParams;a?.download&&c.set("download",a.download===!0?"":a.download),a?.cacheNonce!=null&&c.set("cacheNonce",String(a.cacheNonce));const u=c.toString();return o.map(f=>fe(fe({},f),{},{signedUrl:f.signedURL?encodeURI(`${s.url}${f.signedURL}${u?`&${u}`:""}`):null}))})}download(e,t,a){const s=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(o,t.transform),t?.cacheNonce!=null&&o.set("cacheNonce",String(t.cacheNonce));const c=o.toString(),u=this._getFinalPath(e),f=()=>oo(this.fetch,`${this.url}/${s}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},a);return new Y2(f,this.shouldThrowOnError)}async info(e){var t=this;const a=t._getFinalPath(e);return t.handleOperation(async()=>ah(await oo(t.fetch,`${t.url}/object/info/${a}`,{headers:t.headers})))}async exists(e){var t=this;const a=t._getFinalPath(e);try{return await W2(t.fetch,`${t.url}/object/${a}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if($c(o)){var s;const c=o instanceof nh?o.status:o instanceof Gw?(s=o.originalError)===null||s===void 0?void 0:s.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const a=this._getFinalPath(e),s=new URLSearchParams;t?.download&&s.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(s,t.transform),t?.cacheNonce!=null&&s.set("cacheNonce",String(t.cacheNonce));const o=s.toString(),c=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${a}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await lo(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,a){var s=this;return s.handleOperation(async()=>{const o=Vw(s._getFinalPath(e)),c=new URLSearchParams;t?.transformations&&c.set("transformations","true");const u=c.toString();return await lo(s.fetch,`${s.url}/cdn/${o}${u?`?${u}`:""}`,{},{headers:s.headers},a)})}async list(e,t,a){var s=this;return s.handleOperation(async()=>{const o=t?.sortBy?fe(fe({},Rf.sortBy),t.sortBy):Rf.sortBy,c=fe(fe(fe({},Rf),t),{},{sortBy:o,prefix:e||""});return await pn(s.fetch,`${s.url}/object/list/${s.bucketId}`,c,{headers:s.headers},a)})}async listV2(e,t){var a=this;return a.handleOperation(async()=>{const s=fe({},e);return await pn(a.fetch,`${a.url}/object/list-v2/${a.bucketId}`,s,{headers:a.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("qual
24ity",t.quality.toString()),e}};const X2="2.112.3",wo={"X-Client-Info":`storage-js/${X2}`};var Z2=class extends Hs{constructor(e,t={},a,s){const o=new URL(e);s?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=fe(fe({},wo),t);super(c,u,a,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const a=t.listBucketOptionsToQueryString(e);return await oo(t.fetch,`${t.url}/bucket${a}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await oo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var a=this;return a.handleOperation(async()=>await pn(a.fetch,`${a.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:a.headers}))}async updateBucket(e,t){var a=this;return a.handleOperation(async()=>await rh(a.fetch,`${a.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:a.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await pn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await lo(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,a){var s=this;return s.handleOperation(async()=>{const o=new URLSearchParams;t?.transformations&&o.set("transformations","true");const c=o.toString();return await lo(s.fetch,`${s.url}/cdn/${Vw(e)}${c?`?${c}`:""}`,{},{headers:s.headers},a)})}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():""}},ex=class extends Hs{constructor(e,t={},a){const s=e.replace(/\/$/,""),o=fe(fe({},wo),t);super(s,o,a,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await pn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const a=new URLSearchParams;e?.limit!==void 0&&a.set("limit",e.limit.toString()),e?.offset!==void 0&&a.set("offset",e.offset.toString()),e?.sortColumn&&a.set("sortColumn",e.sortColumn),e?.sortOrder&&a.set("sortOrder",e.sortOrder),e?.search&&a.set("search",e.search);const s=a.toString(),o=s?`${t.url}/bucket?${s}`:`${t.url}/bucket`;return await oo(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await lo(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!G2(e))throw new zc("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 a=new U2({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(a,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...f)=>{try{return{data:await u.apply(o,f),error:null}}catch(p){if(s)throw p;return{data:null,error:p}}}}})}},tx=class extends Hs{constructor(e,t={},a){const s=e.replace(/\/$/,""),o=fe(fe({},wo),{},{"Content-Type":"application/json"},t);super(s,o,a,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Ft.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var a=this;return a.handleOperation(async()=>await Ft.post(a.fetch,`${a.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:a.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Ft.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var a=this;return a.handleOperation(async()=>await Ft.post(a.fetch,`${a.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:a.headers})||{})}},nx=class extends Hs{constructor(e,t={},a){const s=e.replace(/\/$/,""),o=fe(fe({},wo),{},{"Content-Type":"application/json"},t);super(s,o,a,"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 Ft.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Ft.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");
24if(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 Ft.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Ft.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 Ft.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},ax=class extends Hs{constructor(e,t={},a){const s=e.replace(/\/$/,""),o=fe(fe({},wo),{},{"Content-Type":"application/json"},t);super(s,o,a,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ft.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ft.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Ft.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ft.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},rx=class extends ax{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new sx(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,a=this;return t().call(a,e)}async getBucket(e){var t=()=>super.getBucket,a=this;return t().call(a,e)}async listBuckets(e={}){var t=()=>super.listBuckets,a=this;return t().call(a,e)}async deleteBucket(e){var t=()=>super.deleteBucket,a=this;return t().call(a,e)}},sx=class extends tx{constructor(e,t,a,s){super(e,t,s),this.vectorBucketName=a}async createIndex(e){var t=()=>super.createIndex,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,a=this;return t().call(a,a.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,a=this;return t().call(a,a.vectorBucketName,e)}index(e){return new ix(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},ix=class extends nx{constructor(e,t,a,s,o){super(e,t,o),this.vectorBucketName=a,this.indexName=s}async putVectors(e){var t=()=>super.putVectors,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async getVectors(e){var t=()=>super.getVectors,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,a=this;return t().call(a,fe(fe({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}},ox=class extends Z2{constructor(e,t={},a,s){super(e,t,a,s)}from(e){return new Q2(this.url,this.headers,e,this.fetch)}get vectors(){return new rx(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new ex(this.url+"/iceberg",this.headers,this.fetch)}};const Kw="2.112.3",oa=30*1e3,Vi=3,Cf=Vi*oa,lx=2*oa,cx="http://localhost:9999",ux="supabase.auth.token",dx={"X-Client-Info":`gotrue-js/${Kw}`},sh="X-Supabase-Api-Version",Yw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},fx=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Or="sb_flow_id",hx=5,px=600*1e3;class co extends Error{constructor(t,a,s){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=a,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Q(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class mx extends co{constructor(t,a,s){super(t,a,s),this.name="AuthApiError",this.status=a,this.code=s}}function t0(e){return Q(e)&&e.name==="AuthApiError"}class gn extends co{constructor(t,a){super(t),this.name="AuthUnknownError",this.originalError=a}}class Mn extends co{constructor(t,a,s,o){super(t,s,o),this.name=a,this.status=s}}class dt extends Mn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Kl(e){return Q(e)&&e.name==="AuthSessionMissingError"}class Cs extends Mn{constructor(){super("Auth session or user missing","AuthInvalidToken
24ResponseError",500,void 0)}}class Yl extends Mn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ql extends Mn{constructor(t,a=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function gx(e){return Q(e)&&e.name==="AuthImplicitGrantRedirectError"}class n0 extends Mn{constructor(t,a=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class yx extends Mn{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 cc extends Mn{constructor(t,a){super(t,"AuthRetryableFetchError",a,void 0)}}function Xl(e){return Q(e)&&e.name==="AuthRetryableFetchError"}class a0 extends Mn{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function vx(e){return Q(e)&&e.name==="AuthRefreshDiscardedError"}class r0 extends Mn{constructor(t,a,s){super(t,"AuthWeakPasswordError",a,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class bc extends Mn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const wc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),s0=` 	
25\r=`.split(""),bx=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<s0.length;t+=1)e[s0[t].charCodeAt(0)]=-2;for(let t=0;t<wc.length;t+=1)e[wc[t].charCodeAt(0)]=t;return e})();function i0(e,t,a){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;a(wc[s]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;a(wc[s]),t.queuedBits-=6}}function Qw(e,t,a){const s=bx[e];if(s>-1)for(t.queue=t.queue<<6|s,t.queuedBits+=6;t.queuedBits>=8;)a(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function o0(e){const t=[],a=u=>{t.push(String.fromCodePoint(u))},s={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{Sx(u,s,a)};for(let u=0;u<e.length;u+=1)Qw(e.charCodeAt(u),o,c);return t.join("")}function wx(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 _x(e,t){for(let a=0;a<e.length;a+=1){let s=e.charCodeAt(a);if(s>55295&&s<=56319){const o=(s-55296)*1024&65535;s=(e.charCodeAt(a+1)-56320&65535|o)+65536,a+=1}wx(s,t)}}function Sx(e,t,a){if(t.utf8seq===0){if(e<=127){a(e);return}for(let s=1;s<6;s+=1)if((e>>7-s&1)===0){t.utf8seq=s;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&&a(t.codepoint)}}function $s(e){const t=[],a={queue:0,queuedBits:0},s=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)Qw(e.charCodeAt(o),a,s);return new Uint8Array(t)}function Ex(e){const t=[];return _x(e,a=>t.push(a)),new Uint8Array(t)}function xr(e){const t=[],a={queue:0,queuedBits:0},s=o=>{t.push(o)};return e.forEach(o=>i0(o,a,s)),i0(null,a,s),t.join("")}function Ax(e){return Math.round(Date.now()/1e3)+e}function Tx(){return Symbol("auth-callback")}const vt=()=>typeof window<"u"&&typeof document<"u",_r={tested:!1,writable:!1},Xw=()=>
25{if(!vt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(_r.tested)return _r.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),_r.tested=!0,_r.writable=!0}catch{_r.tested=!0,_r.writable=!1}return _r.writable};function l0(e){const t={},a=new URL(e);if(a.hash&&a.hash[0]==="#")try{new URLSearchParams(a.hash.substring(1)).forEach((o,c)=>{t[c]=o})}catch{}return a.searchParams.forEach((s,o)=>{t[o]=s}),t}const Zw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Rx=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",la=async(e,t,a)=>{await e.setItem(t,JSON.stringify(a))},wt=async(e,t)=>{const a=await e.getItem(t);if(!a)return null;try{return JSON.parse(a)}catch{return null}},Lt=async(e,t)=>{await e.removeItem(t)};class Bc{constructor(){this.promise=new Bc.promiseConstructor((t,a)=>{this.resolve=t,this.reject=a})}}Bc.promiseConstructor=Promise;function Zl(e){const t=e.split(".");if(t.length!==3)throw new bc("Invalid JWT structure");for(let s=0;s<t.length;s++)if(!fx.test(t[s]))throw new bc("JWT not in base64url format");return{header:JSON.parse(o0(t[0])),payload:JSON.parse(o0(t[1])),signature:$s(t[2]),raw:{header:t[0],payload:t[1]}}}async function Cx(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Ox(e,t){return new Promise((s,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await e(c);if(!t(c,null,u)){s(u);return}}catch(u){if(!t(c,u)){o(u);return}}})()})}function e_(e){return("0"+e.toString(16)).substr(-2)}function xx(){const t=new Uint32Array(56);if(typeof crypto>"u"){const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=a.length;let o="";for(let c=0;c<56;c++)o+=a.charAt(Math.floor(Math.random()*s));return o}return crypto.getRandomValues(t),Array.from(t,e_).join("")}async function kx(e){const a=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",a),o=new Uint8Array(s);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function jx(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 a=await kx(e);return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const Nx=/^[a-zA-Z0-9_-]{8,64}$/;function uc(e){return typeof e=="string"&&Nx.test(e)?e:null}function Dx(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,e_).join("")}let e="";for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}const qs=(e,t)=>`${e}-flow-${t}-code-verifier`,uo=e=>`${e}-flows-code-verifier`;async function Ph(e,t){const a=await wt(e,uo(t));return Array.isArray(a)?a.filter(s=>uc(s)!==null):[]}async function Lx(e,t,a,s,o){await la(e,qs(t,a),s);const c=(await Ph(e,t)).filter(u=>u!==a);for(c.push(a);c.length>hx;){const u=c.shift();await Lt(e,qs(t,u)),o?.(u)}await la(e,uo(t),c),await la(e,`${t}-code-verifier`,s)}async function Mx(e,t,a){if(a){const o=await wt(e,qs(t,a));return{verifier:typeof o=="string"?o:null,flowId:a}}const s=await wt(e,`${t}-code-verifier`);return{verifier:typeof s=="string"?s:null,flowId:null}}async function ln(e,t,a){const s=`${t}-code-verifier`;if(!a){await Lt(e,s);return}const o=qs(t,a),c=await wt(e,o);await Lt(e,o);const u=await Ph(e,t),f=u.filter(p=>p!==a);f.length!==u.length&&(f.length>0?await la(e,uo(t),f):await Lt(e,uo(t))),c!=null&&c===await wt(e,s)&&await Lt(e,s)}async function Px(e,t){const a=await Ph(e,t);for(const s of a)await Lt(e,qs(t,s));await Lt(e,uo(t)),await Lt(e,`${t}-code-verifier`)}function Ux(e,t){const a=e.indexOf("#");let s=a===-1?e:e.slice(0,a);const o=a===-1?"":e.slice(a),c=s.indexOf("?");if(c!==-1){const f=s.slice(0,c),p=s.slice(c+1).split("&").filter(m=>m!==""&&m!==Or&&!m.startsWith(`${Or}=`));s=p.length>0?`${f}?${p.join("&")}`:f}const u=s.includes("?")?"&":"?";return`${s}${u}${Or}=${encodeURIComponent(t)}${o}`}async function Ix(e,t,a=!1,s){const o=xx();let c=o;a&&(c+="/recovery");const u=Dx();await Lx(e,t,u,c,s);const f=await jx(o);return[f,o===f?"plain":"s256",u]}const zx=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $x(e){const t=e.headers.get(sh);if(!t||!t.match(zx))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Bx(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 qx(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 Hx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ta(e){if(!Hx.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function fn(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 Of(){const e={};return new Proxy(e,{get:(t,a)=>{if(a==="__isUserNotAvailableProxy")return!0;
25if(typeof a=="symbol"){const s=a.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="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 "${a}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Gx(e,t){return new Proxy(e,{get:(a,s,o)=>{if(s==="__isInsecureUserWarningProxy")return!0;if(typeof s=="symbol"){const c=s.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(a,s,o)}return!t.value&&typeof s=="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(a,s,o)}})}function c0(e){return JSON.parse(JSON.stringify(e))}const Er=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)},u0=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function d0(e){var t;if(!Rx(e))throw new cc(Er(e),0);let a;try{a=await e.json()}catch(c){throw u0.includes(e.status)?new cc(e.statusText||`HTTP ${e.status}`,e.status):new gn(Er(c),c)}if(u0.includes(e.status))throw new cc(Er(a),e.status);let s;const o=$x(e);if(o&&o.getTime()>=Yw["2024-01-01"].timestamp&&typeof a=="object"&&a&&typeof a.code=="string"?s=a.code:typeof a=="object"&&a&&typeof a.error_code=="string"&&(s=a.error_code),s){if(s==="weak_password")throw new r0(Er(a),e.status,((t=a.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(s==="session_not_found")throw new dt}else if(typeof a=="object"&&a&&typeof a.weak_password=="object"&&a.weak_password&&Array.isArray(a.weak_password.reasons)&&a.weak_password.reasons.length&&a.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new r0(Er(a),e.status,a.weak_password.reasons);throw new mx(Er(a),e.status||500,s)}const Vx=(e,t,a,s)=>{const o={method:e,headers:t?.headers||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),o.body=JSON.stringify(s),Object.assign(Object.assign({},o),a))};async function ae(e,t,a,s){var o;const c=Object.assign({},s?.headers);c[sh]||(c[sh]=Yw["2024-01-01"].name),s?.jwt&&(c.Authorization=`Bearer ${s.jwt}`);const u=(o=s?.query)!==null&&o!==void 0?o:{};s?.redirectTo&&(u.redirect_to=s.redirectTo);const f=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",p=await Fx(e,t,a+f,{headers:c,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(p):{data:Object.assign({},p),error:null}}async function Fx(e,t,a,s,o,c){const u=Vx(t,s,o,c);let f;try{f=await e(a,Object.assign({},u))}catch(p){throw new cc(Er(p),0)}if(f.ok||await d0(f),s?.noResolveJson)return f;try{return await f.json()}catch(p){await d0(p)}}function an(e){var t;let a=null;Kx(e)&&(a=Object.assign({},e),e.expires_at||(a.expires_at=Ax(e.expires_in)));const s=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:a,user:s},error:null}}function f0(e){const t=an(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((a,s)=>a&&typeof s=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ga(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Jx(e){return{data:e,error:null}}function Wx(e){const{action_link:t,email_otp:a,hashed_token:s,redirect_to:o,verification_type:c}=e,u=Ic(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:t,email_otp:a,hashed_token:s,redirect_to:o,verification_type:c},p=Object.assign({},u);return{data:{properties:f,user:p},error:null}}function h0(e){return e}function Kx(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const xf=["global","local","others"];class Yx{constructor({url:t="",headers:a={},fetch:s,experimental:o}){this.url=t,this.headers=a,this.fetch=Zw(s),this.experimental=o??{},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,a=xf[0]){if(xf.indexOf(a)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${xf.join(", ")}`);try{return await ae(this.fetch,"POST",`${this.url}/logout?scope=${a}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Q(s))return{data:null,error:s};throw s}}async inviteUserByEmail(t,a={}){try{return await ae(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:a.data},headers:this.headers,redirectTo:a.redirectTo,xform:Ga})}catch(s){if(Q(s))return{data:{user:null},error:s};throw s}}async generateLink(t){try{const{options:a}=t,s=Ic(t,["options"]),o=Object.assign(Object.assign({},s),a);return"newEmail"in s&&(o.new_email=s?.newEmail,delete o.newEmail),await ae(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:Wx,redirectTo:a?.redirectTo})}catch(a){if(Q(a))return{data:{properties:null,user:null},error:a};throw a}}async createUser(t){try{return await ae(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ga})}catch(a){if(Q(a))return{data:{user:null},error:a};throw a}}async listUsers(t){var a,s,o,c,u,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ae(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(a=t?.page)===null||a===void 0?void 0:a.toString())!==null&&s!==void 0?s:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:h0});if(y.error)throw y.error;const g=await y.json(),w=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,b=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return b.length>0&&(b.forEach(E=>{const S=parseInt(E.split(";")[0].split("=")[1].substring(0,1)),T=JSON.parse(E.split(";")[1].split("=")[1]);m[`${T}Page`]=S}),m.total=parseInt(w)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(Q(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){ta(t);try{return await ae(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ga})}catch(a){if(Q(a))return{data:{user:null},error:a};throw a}}async updateUserById(t,a){ta(t);try{return await ae(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:a,headers:this.headers,xform:Ga})}catch(s){if(Q(s))return{data:{user:null},error:s};throw s}}async deleteUser(t,a=!1){ta(t);
25try{return await ae(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:a},xform:Ga})}catch(s){if(Q(s))return{data:{user:null},error:s};throw s}}async _listFactors(t){ta(t.userId);try{const{data:a,error:s}=await ae(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:a,error:s}}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _deleteFactor(t){ta(t.userId),ta(t.id);try{return{data:await ae(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _listOAuthClients(t){var a,s,o,c,u,f,p;try{const m={nextPage:null,lastPage:0,total:0},y=await ae(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(a=t?.page)===null||a===void 0?void 0:a.toString())!==null&&s!==void 0?s:"",per_page:(c=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:h0});if(y.error)throw y.error;const g=await y.json(),w=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,b=(p=(f=y.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&p!==void 0?p:[];return b.length>0&&(b.forEach(E=>{const S=parseInt(E.split(";")[0].split("=")[1].substring(0,1)),T=JSON.parse(E.split(";")[1].split("=")[1]);m[`${T}Page`]=S}),m.total=parseInt(w)),{data:Object.assign(Object.assign({},g),m),error:null}}catch(m){if(Q(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await ae(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _getOAuthClient(t){try{return await ae(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _updateOAuthClient(t,a){try{return await ae(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:a,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Q(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(t){try{return await ae(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _regenerateOAuthClientSecret(t){try{return await ae(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _listCustomProviders(t){try{const a={};return t?.type&&(a.type=t.type),await ae(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:a,xform:s=>{var o;return{data:{providers:(o=s?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(a){if(Q(a))return{data:{providers:[]},error:a};throw a}}async _createCustomProvider(t){try{return await ae(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _getCustomProvider(t){try{return await ae(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _updateCustomProvider(t,a){try{return await ae(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:a,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Q(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(t){try{return await ae(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _adminListPasskeys(t){fn(this.experimental),ta(t.userId);try{return await ae(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Q(a))return{data:null,error:a};throw a}}async _adminDeletePasskey(t){fn(this.experimental),ta(t.userId),ta(t.passkeyId);
25try{return await ae(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Q(a))return{data:null,error:a};throw a}}}function p0(e={}){return{getItem:t=>e[t]||null,setItem:(t,a)=>{e[t]=a},removeItem:t=>{delete e[t]}}}globalThis&&Xw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class Qx extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function Xx(){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 t_(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Zx(e){return parseInt(e,16)}function ek(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,s=>s.toString(16).padStart(2,"0")).join("")}function tk(e){var t;const{chainId:a,domain:s,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:f,requestId:p,resources:m,scheme:y,uri:g,version:w}=e;{if(!Number.isInteger(a))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${a}`);if(!s)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(w!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${w}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
26`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const b=t_(e.address),E=y?`${y}://${s}`:s,S=e.statement?`${e.statement}
27`:"",T=`${E} wants you to sign in with your Ethereum account:
28${b}
29
30${S}`;let R=`URI: ${g}
31Version: ${w}
32Chain ID: ${a}${u?`
33Nonce: ${u}`:""}
34Issued At: ${c.toISOString()}`;if(o&&(R+=`
35Expiration Time: ${o.toISOString()}`),f&&(R+=`
36Not Before: ${f.toISOString()}`),p&&(R+=`
37Request ID: ${p}`),m){let k=`
38Resources:`;for(const j of m){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);k+=`
39- ${j}`}R+=k}return`${T}
40${R}`}class st extends Error{constructor({message:t,code:a,cause:s,name:o}){var c;super(t,{cause:s}),this.__isWebAuthnError=!0,this.name=(c=o??(s instanceof Error?s.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=a}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class _c extends st{constructor(t,a){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:a,message:t}),this.name="WebAuthnUnknownError",this.originalError=a}}function nk({error:e,options:t}){var a,s,o;const{publicKey:c}=t;if(!c)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new st({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((a=c.authenticatorSelection)===null||a===void 0?void 0:a.requireResidentKey)===!0)return new st({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((s=c.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new st({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new st({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 st({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new st({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return c.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new st({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new st({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 u=window.location.hostname;if(n_(u)){if(c.rp.id!==u)return new st({message:`The RP ID "${c.rp.id}
40" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new st({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new st({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 st({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 st({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function ak({error:e,options:t}){const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new st({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new st({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const s=window.location.hostname;if(n_(s)){if(a.rpId!==s)return new st({message:`The RP ID "${a.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new st({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new st({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 st({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class rk{createNewAbortSignal(){if(this.controller){const a=new Error("Cancelling existing WebAuthn API call for new one");a.name="AbortError",this.controller.abort(a)}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 ih=new rk;function m0(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:a,excludeCredentials:s}=e,o=Ic(e,["challenge","user","excludeCredentials"]),c=$s(t).buffer,u=Object.assign(Object.assign({},a),{id:$s(a.id).buffer}),f=Object.assign(Object.assign({},o),{challenge:c,user:u});if(s&&s.length>0){f.excludeCredentials=new Array(s.length);for(let p=0;p<s.length;p++){const m=s[p];f.excludeCredentials[p]=Object.assign(Object.assign({},m),{id:$s(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function g0(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:a}=e,s=Ic(e,["challenge","allowCredentials"]),o=$s(t).buffer,c=Object.assign(Object.assign({},s),{challenge:o});if(a&&a.length>0){c.allowCredentials=new Array(a.length);for(let u=0;u<a.length;u++){const f=a[u];c.allowCredentials[u]=Object.assign(Object.assign({},f),{id:$s(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return c}function y0(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const a=e;return{id:e.id,rawId:e.id,response:{attestationObject:xr(new Uint8Array(e.response.attestationObject)),clientDataJSON:xr(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=a.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function v0(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const a=e,s=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:xr(new Uint8Array(o.authenticatorData)),clientDataJSON:xr(new Uint8Array(o.clientDataJSON)),signature:xr(new Uint8Array(o.signature)),userHandle:o.userHandle?xr(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(t=a.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function n_(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Sc(){var e,t;return!!(vt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}async function a_(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new _c("Browser returned unexpected credential type",t)}:{data:null,error:new _c("Empty credential response",t)}}
40catch(t){return{data:null,error:nk({error:t,options:e})}}}async function r_(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new _c("Browser returned unexpected credential type",t)}:{data:null,error:new _c("Empty credential response",t)}}catch(t){return{data:null,error:ak({error:t,options:e})}}}const sk={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},ik={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ec(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),a=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),s={};for(const o of e)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))s[c]=u;else if(a(u))s[c]=u;else if(t(u)){const f=s[c];t(f)?s[c]=Ec(f,u):s[c]=Ec(u)}else s[c]=u}return s}function ok(e,t){return Ec(sk,e,t||{})}function lk(e,t){return Ec(ik,e,t||{})}class ck{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:a,friendlyName:s,signal:o},c){var u;try{const{data:f,error:p}=await this.client.mfa.challenge({factorId:t,webauthn:a});if(!f)return{data:null,error:p};const m=o??ih.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:y}=f.webauthn.credential_options.publicKey;if(!y.name){const g=s;if(g)y.name=`${y.id}:${g}`;else{const b=(await this.client.getUser()).data.user,E=((u=b?.user_metadata)===null||u===void 0?void 0:u.name)||b?.email||b?.id||"User";y.name=`${y.id}:${E}`}}y.displayName||(y.displayName=y.name)}switch(f.webauthn.type){case"create":{const y=ok(f.webauthn.credential_options.publicKey,c?.create),{data:g,error:w}=await a_({publicKey:y,signal:m});return g?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:w}}case"request":{const y=lk(f.webauthn.credential_options.publicKey,c?.request),{data:g,error:w}=await r_(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:y,signal:m}));return g?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:g}},error:null}:{data:null,error:w}}}}catch(f){return Q(f)?{data:null,error:f}:{data:null,error:new gn("Unexpected error in challenge",f)}}}async _verify({challengeId:t,factorId:a,webauthn:s}){return this.client.mfa.verify({factorId:a,challengeId:t,webauthn:s})}async _authenticate({factorId:t,webauthn:{rpId:a=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!a)return{data:null,error:new co("rpId is required for WebAuthn authentication")};try{if(!Sc())return{data:null,error:new gn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this.challenge({factorId:t,webauthn:{rpId:a,rpOrigins:s},signal:o},{request:c});if(!u)return{data:null,error:f};const{webauthn:p}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:p.type,rpId:a,rpOrigins:s,credential_response:p.credential_response}})}catch(u){return Q(u)?{data:null,error:u}:{data:null,error:new gn("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:a=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!a)return{data:null,error:new co("rpId is required for WebAuthn registration")};try{if(!Sc())return{data:null,error:new gn("Browser does not support WebAuthn",null)};const{data:u,error:f}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var g;return(g=y.data)===null||g===void 0?void 0:g.all.find(w=>w.factor_type==="webauthn"&&w.friendly_name===t&&w.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y?.id}):void 0),{data:null,error:f};const{data:p,error:m}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:a,rpOrigins:s},signal:o},{create:c});return p?this._verify({factorId:u.id,challengeId:p.challengeId,webauthn:{rpId:a,rpOrigins:s,type:p.webauthn.type,credential_response:p.webauthn.credential_response}}):{data:null,error:m}}catch(u){return Q(u)?{data:null,error:u}:{data:null,error:new gn("Unexpected error in register",u)}}}}Xx();const uk={url:cx,storageKey:ux,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:dx,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Os={};class fo{get jwks(){var t,a;return(a=(t=Os[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&a!==void 0?a:{keys:[]}}set jwks(t){Os[this.storageKey]=Object.assign(Object.assign({},Os[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,a;return(a=(t=Os[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&a!==void 0?a:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Os[this.storageKey]=Object.assign(Object.assign({},Os[this.storageKey]),{cachedAt:t})}constructor(t){var a,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.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},uk),t);if(this.storageKey=c.storageKey,this.instanceID=(a=fo.nextInstanceID[this.storageKey])!==null&&a!==void 0?a:0,fo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&vt()){const u=`${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(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(s=c.experimental)!==null&&s!==void 0?s:{},this.admin=new Yx({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=Zw(c.fetch),this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock!=null&&(this.lock=c.lock),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 ck(this)}
40,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?(c.storage?this.storage=c.storage:Xw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=p0(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=p0(this.memoryStorage)),vt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u),(u.data.event==="TOKEN_REFRESHED"||u.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}c.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Kw}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();
40const a=await this.initializePromise,s=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const o of s)await this._notifyAllSubscribers(o.event,o.session,o.broadcast);return a}async _initialize(){var t;try{let a={},s="none";if(vt()&&(a=l0(window.location.href),this._isImplicitGrantCallback(a)?s="implicit":await this._isPKCECallback(a)&&(s="pkce")),vt()&&this.detectSessionInUrl&&s!=="none"){const{data:o,error:c}=await this._getSessionFromURL(a,s);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),gx(c)){const p=(t=c.details)===null||t===void 0?void 0:t.code;if(p==="identity_already_exists"||p==="identity_not_found"||p==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:f}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",f),await this._saveSession(u),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(a){return Q(a)?this._returnResult({error:a}):this._returnResult({error:new gn("Unexpected error during initialization",a)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var a,s,o;try{const c=await ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(a=t?.options)===null||a===void 0?void 0:a.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:an}),{data:u,error:f}=c;if(f||!u)return this._returnResult({data:{user:null,session:null},error:f});const p=u.session,m=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(c){if(Q(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(t){var a,s,o;let c=null;try{let u;if("email"in t){const{email:g,password:w,options:b}=t;let E=null,S=null;this.flowType==="pkce"&&([E,S,c]=await this._getCodeChallengeAndMethod()),u=await ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(b?.emailRedirectTo,c),body:{email:g,password:w,data:(a=b?.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:E,code_challenge_method:S},xform:an})}else if("phone"in t){const{phone:g,password:w,options:b}=t;u=await ae(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:w,data:(s=b?.data)!==null&&s!==void 0?s:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:an})}else throw new Yl("You must provide either an email or phone number and a password");const{data:f,error:p}=u;if(p||!f)return await ln(this.storage,this.storageKey,c),this._returnResult({data:{user:null,session:null},error:p});const m=f.session,y=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",m)),this._returnResult({data:{user:y,session:m},error:null})}catch(u){if(await ln(this.storage,this.storageKey,c),Q(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(t){try{let a;if("email"in t){const{email:c,password:u,options:f}=t;a=await ae(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:f0})}else if("phone"in t){const{phone:c,password:u,options:f}=t;a=await ae(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:f0})}else throw new Yl("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!s||!s.session||!s.user){const c=new Cs;return this._returnResult({data:{user:null,session:null},error:c})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:o})}catch(a){if(Q(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithOAuth(t){var a,s,o,c;return await this._handleProviderSignIn(t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=t.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(t,a){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t,a)):this._exchangeCodeForSession(t,a)}async signInWithWeb3(t){const{chain:a}=t;switch(a){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${a}"`)}}async signInWithEthereum(t){var a,s,o,c,u,f,p,m,y,g,w;let b,E;if("message"in t)b=t.message,E=t.signature;else{const{chain:S,wallet:T,statement:R,options:k}=t;let j;if(vt())if(typeof T=="object")j=T;else{const ee=window;if("ethereum"in ee&&typeof ee.ethereum=="object"&&"request"in ee.ethereum&&typeof ee.ethereum.request=="function")j=ee.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 T!="object"||!k?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=T}const $=new URL((a=k?.url)!==null&&a!==void 0?a:window.location.href),K=await j.request({method:"eth_requestAccounts"}).then(ee=>ee).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!K||K.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const z=t_(K[0]);let D=(s=k?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!D){const ee=await j.request({method:"eth_chainId"});D=Zx(ee)}const J={domain:$.host,address:z,statement:R,uri:$.href,version:"1",chainId:D,nonce:(o=k?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=k?.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(f=k?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(p=k?.signInWithEthereum)===null||p===void 0?void 0:p.notBefore,requestId:(m=k?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(y=k?.signInWithEthereum)===null||y===void 0?void 0:y.resources};b=tk(J),E=await j.request({method:"personal_sign",params:[ek(b),z]})}try{const{data:S,error:T}=await ae(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:b,signature:E},!((g=t.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:an});if(T)throw T;if(!S||!S.session||!S.user){const R=new Cs;return this._returnResult({data:{user:null,session:null},error:R})}return S.session&&(await this._saveSession(S.session),await this._notifyAllSubscribers("SIGNED_IN",S.session)),this._returnResult({data:Object.assign({},S),error:T})}catch(S){if(Q(S))return this._returnResult({data:{user:null,session:null},error:S});throw S}}async signInWithSolana(t){var a,s,o,c,u,f,p,m,y,g,w,b;let E,S;if("message"in t)E=t.message,S=t.signature;else{const{chain:T,wallet:R,statement:k,options:j}=t;let $;if(vt())if(typeof R=="object")$=R;else{const z=window;if("solana"in z&&typeof z.solana=="object"&&("signIn"in z.solana&&typeof z.solana.signIn=="function"||"signMessage"in z.solana&&typeof z.solana.signMessage=="function"))$=z.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 R!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");$=R}const K=new URL((a=j?.url)!==null&&a!==void 0?a:window.location.href);if("signIn"in $&&$.signIn){const z=await $.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:K.host,uri:K.href}),k?{statement:k}:null));let D;if(Array.isArray(z)&&z[0]&&typeof z[0]=="object")D=z[0];else if(z&&typeof z=="object"&&"signedMessage"in z&&"signature"in z)D=z;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in D&&"signature"in D&&(typeof D.signedMessage=="string"||D.signedMessage instanceof Uint8Array)&&D.signature instanceof Uint8Array)E=typeof D.signedMessage=="string"?D.signedMessage:new TextDecoder().decode(D.signedMessage),S=D.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in $)||typeof $.signMessage!="function"||!("publicKey"in $)||typeof $!="object"||!$.publicKey||!("toBase58"in $.publicKey)||typeof $.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");E=[`${K.host} wants you to sign in with your Solana account:`,$.publicKey.toBase58(),...k?["",k,""]:[""],"Version: 1",`URI: ${K.href}`,`Issued At: ${(o=(s=j?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=j?.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((u=j?.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((f=j?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((p=j?.signInWithSolana)===null||p===void 0)&&p.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((m=j?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((g=(y=j?.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||g===void 0)&&g.length?["Resources",...j.sign
40InWithSolana.resources.map(D=>`- ${D}`)]:[]].join(`
41`);const z=await $.signMessage(new TextEncoder().encode(E),"utf8");if(!z||!(z instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");S=z}}try{const{data:T,error:R}=await ae(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:E,signature:xr(S)},!((w=t.options)===null||w===void 0)&&w.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:an});if(R)throw R;if(!T||!T.session||!T.user){const k=new Cs;return this._returnResult({data:{user:null,session:null},error:k})}return T.session&&(await this._saveSession(T.session),await this._notifyAllSubscribers("SIGNED_IN",T.session)),this._returnResult({data:Object.assign({},T),error:R})}catch(T){if(Q(T))return this._returnResult({data:{user:null,session:null},error:T});throw T}}async _exchangeCodeForSession(t,a){const s=a?.flowId!=null,o=s?uc(a?.flowId):vt()?uc(l0(window.location.href)[Or]):null;s&&!o&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",a?.flowId);const{verifier:c,flowId:u}=s&&!o?{verifier:null,flowId:null}:await Mx(this.storage,this.storageKey,o),[f,p]=(c??"").split("/");try{if(!f&&this.flowType==="pkce")throw new yx;const{data:m,error:y}=await ae(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:f},xform:an});if(await ln(this.storage,this.storageKey,u),y)throw y;if(!m||!m.session||!m.user){const g=new Cs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:g})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers(p==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",m.session)),this._returnResult({data:Object.assign(Object.assign({},m),{redirectType:p??null}),error:y})}catch(m){if(await ln(this.storage,this.storageKey,u),Q(m))return this._returnResult({data:{user:null,session:null,redirectType:null},error:m});throw m}}async signInWithIdToken(t){try{const{options:a,provider:s,token:o,access_token:c,nonce:u}=t,f=await ae(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:a?.captchaToken}},xform:an}),{data:p,error:m}=f;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!p||!p.session||!p.user){const y=new Cs;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:p,error:m})}catch(a){if(Q(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithOtp(t){var a,s,o,c,u;let f=null;try{if("email"in t){const{email:p,options:m}=t;let y=null,g=null;this.flowType==="pkce"&&([y,g,f]=await this._getCodeChallengeAndMethod());const{error:w}=await ae(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:p,data:(a=m?.data)!==null&&a!==void 0?a:{},create_user:(s=m?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:m?.captchaToken},code_challenge:y,code_challenge_method:g},redirectTo:this._maybeAppendFlowIdToRedirect(m?.emailRedirectTo,f)});return this._returnResult({data:{user:null,session:null},error:w})}if("phone"in t){const{phone:p,options:m}=t,{data:y,error:g}=await ae(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:p,data:(o=m?.data)!==null&&o!==void 0?o:{},create_user:(c=m?.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:m?.captchaToken},channel:(u=m?.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:y?.message_id},error:g})}throw new Yl("You must provide either an email or phone number.")}catch(p){if(await ln(this.storage,this.storageKey,f),Q(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async verifyOtp(t){var a,s;try{let o,c;"options"in t&&(o=(a=t.options)===null||a===void 0?void 0:a.redirectTo,c=(s=t.options)===null||s===void 0?void 0:s.captchaToken);const{data:u,error:f}=await ae(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:an});if(f)throw f;if(!u)throw new Error("An error occurred on token verification.");const p=u.session,m=u.user;return p?.access_token&&(await this._saveSession(p),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p)),this._returnResult({data:{user:m,session:p},error:null})}catch(o){if(Q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var a,s,o,c;let u=null;try{let f=null,p=null;this.flowType==="pkce"&&([f,p,u]=await this._getCodeChallengeAndMethod());const m=await ae(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:this._maybeAppendFlowIdToRedirect((a=t.options)===null||a===void 0?void 0:a.redirectTo,u)}),!((s=t?.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:p}),headers:this.headers,xform:Jx});return!((o=m.data)===null||o===void 0)&&o.url&&vt()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(f){if(await ln(this.storage,this.storageKey,u),Q(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:a},error:s}=t;if(s)throw s;if(!a)throw new dt;const{error:o}=await ae(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:a.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(Q(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){let a=null;try{const s=`${this.url}/resend`;if("email"in t){const{email:o,type:c,options:u}=t;let f=null,p=null;this.flowType==="pkce"&&([f,p,a]=await this._getCodeChallengeAndMethod());const{error:m}=await ae(this.fetch,"POST",s,{headers:this.headers,body:{email:o,type:c,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:f,code_challenge_method:p},redirectTo:this._maybeAppendFlowIdToRedirect(u?.emailRedirectTo,a)});return m&&await ln(this.storage,this.storageKey,a),this._returnResult({data:{user:null,session:null},error:m})}else if("phone"in t){const{phone:o,type:c,options:u}=t,{data:f,error:p}=await ae(this.fetch,"POST",s,{headers:this.headers,body:{phone:o,type:c,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:f?.message_id},error:p})}throw new Yl("You must provide either an email or phone number and a type")}catch(s){if(await ln(this.storage,this.storageKey,a),Q(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,a){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await s,await a()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=a();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await s}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 a=await this.__loadSession();return await t(a)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const a=await wt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",a),a!==null&&(this._isValidSession(a)?t=a:(this._debug("#getSession()","session from storage is not val
41id"),await this._removeSession())),!t)return{data:{session:null},error:null};const s=t.expires_at?t.expires_at*1e3-Date.now()<Cf:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",t.expires_at),!s){if(this.userStorage){const u=await wt(this.userStorage,this.storageKey+"-user");u?.user?t.user=u.user:t.user=Of()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=Gx(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);if(c){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const f=await wt(this.storage,this.storageKey);if(f&&f.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:c})}return this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let a;return this.lock!=null?a=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):a=await this._getUser(),a.data.user&&(this.suppressGetSessionWarning=!0),a}async _getUser(t){try{return t?await ae(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ga}):await this._useSession(async a=>{var s,o,c;const{data:u,error:f}=a;if(f)throw f;return!(!((s=u.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new dt}:await ae(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:Ga})})}catch(a){if(Q(a))return Kl(a)&&await this._removeSession(),this._returnResult({data:{user:null},error:a});throw a}}async updateUser(t,a={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,a)):await this._updateUser(t,a)}async _updateUser(t,a={}){let s=null;try{return await this._useSession(async o=>{const{data:c,error:u}=o;if(u)throw u;if(!c.session)throw new dt;const f=c.session;let p=null,m=null;this.flowType==="pkce"&&t.email!=null&&([p,m,s]=await this._getCodeChallengeAndMethod());const{data:y,error:g}=await ae(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,s),body:Object.assign(Object.assign({},t),{code_challenge:p,code_challenge_method:m}),jwt:f.access_token,xform:Ga});if(g)throw g;return f.user=y.user,await this._saveSession(f),await this._notifyAllSubscribers("USER_UPDATED",f),this._returnResult({data:{user:f.user},error:null})})}catch(o){if(await ln(this.storage,this.storageKey,s),Q(o))return this._returnResult({data:{user:null},error:o});throw o}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new dt;const a=Date.now()/1e3;let s=a,o=!0,c=null;const{payload:u}=Zl(t.access_token);if(u.exp&&(s=u.exp,o=s<=a),o){const{data:f,error:p}=await this._callRefreshToken(t.refresh_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f)return{data:{user:null,session:null},error:null};c=f}else{const{data:f,error:p}=await this._getUser(t.access_token);if(p)return this._returnResult({data:{user:null,session:null},error:p});c={access_token:t.access_token,refresh_token:t.refresh_token,user:f.user,token_type:"bearer",expires_in:s-a,expires_at:s},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(a){if(Q(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async a=>{var s;if(!t){const{data:u,error:f}=a;if(f)throw f;t=(s=u.session)!==null&&s!==void 0?s:void 0}if(!t?.refresh_token)throw new dt;const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(a){if(Q(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async _getSessionFromURL(t,a){var s;try{if(!vt())throw new Ql("No browser detected.");
41if(t.error||t.error_description||t.error_code)throw new Ql(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(a){case"implicit":if(this.flowType==="pkce")throw new n0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ql("Not a valid implicit grant flow url.");break;default:}if(a==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new n0("No code detected.");const{data:j,error:$}=await this._exchangeCodeForSession(t.code,{flowId:t[Or]});if($)throw $;const K=new URL(window.location.href);return K.searchParams.delete("code"),K.searchParams.delete(Or),window.history.replaceState(window.history.state,"",K.toString()),{data:{session:j.session,redirectType:(s=j.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:f,expires_in:p,expires_at:m,token_type:y}=t;if(!u||!p||!f||!y)throw new Ql("No session defined in URL");const g=Math.round(Date.now()/1e3),w=parseInt(p);let b=g+w;m&&(b=parseInt(m));const E=b-g;E*1e3<=oa&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${E}s, should have been closer to ${w}s`);const S=b-w;g-S>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",S,b,g):g-S<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",S,b,g);const{data:T,error:R}=await this._getUser(u);if(R)throw R;const k={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:w,expires_at:b,refresh_token:f,token_type:y,user:T.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:k,redirectType:t.type},error:null})}catch(o){if(Q(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){if(!t.code)return!1;const a=uc(t[Or]);return a&&await wt(this.storage,qs(this.storageKey,a))?!0:!!await wt(this.storage,`${this.storageKey}-code-verifier`)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async a=>{var s;const o=async()=>{await this._removeSession()},{data:c,error:u}=a;if(u&&!Kl(u))return this._returnResult({error:u});const f=(s=c.session)===null||s===void 0?void 0:s.access_token;if(f){const{error:p}=await this.admin.signOut(f,t);if(p&&!(t0(p)&&(p.status===404||p.status===401||p.status===403)||Kl(p)))return t!=="others"&&await o(),this._returnResult({error:p})}return t!=="others"&&await o(),this._returnResult({error:null})})}onAuthStateChange(t){const a=Tx(),s={id:a,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",a),this.stateChangeEmitters.delete(a)}};return this._debug("#onAuthStateChange()","registered callback with id",a),this.stateChangeEmitters.set(a,s),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(a)}):await this._emitInitialSession(a)))(),{data:{subscription:s}}}async _emitInitialSession(t){return await this._useSession(async a=>{var s,o;try{const{data:{session:c},error:u}=a;if(u)throw u;await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",t,"session",c)}catch(c){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",c),Kl(c)||Xl(c)||t0(c)&&(c.code==="refresh_token_not_found"||c.code==="refresh_token_already_used"||c.code==="session_expired")?console.warn(c):console.error(c)}})}async resetPasswordForEmail(t,a={}){let s=null,o=null,c=null;this.flowType==="pkce"&&([s,o,c]=await this._getCodeChallengeAndMethod(!0));try{return await ae(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:s,code_challenge_method:o,gotrue_meta_security:{captcha_token:a.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(a.redirectTo,c)})}catch(u){if(await ln(this.storage,this.storageKey,c),Q(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var t;try{const{data:a,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(t=a.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var a;let s=null;try{const{data:o,error:c}=await this._useSession(async u=>{var f,p,m,y,g;const{data:w,error:b}=u;if(b)throw b;const{url:E,flowId:S}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(f=t.options)===null||f===void 0?void 0:f.redirectTo,scopes:(p=t.options)===null||p===void 0?void 0:p.scopes,queryParams:(m=t.options)===null||m===void 0?void 0:m.queryParams,skipBrowserRedirect:!0});return s=S,await ae(this.fetch,"GET",E,{headers:this.headers,jwt:(g=(y=w.session)===null||y===void 0?void 0:y.access_token)!==null&&g!==void 0?g:void 0})});if(c)throw c;return vt()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(o?.url),this._returnResult({data:{provider:t.provider,url:o?.url,flowId:s},error:null})}catch(o){if(Q(o))return this._returnResult({data:{provider:t.provider,url:null,flowId:s},error:o});throw o}}async linkIdentityIdToken(t){return await this._useSession(async a=>{var s;try{const{error:o,data:{session:c}}=a;if(o)throw o;const{options:u,provider:f,token:p,access_token:m,nonce:y}=t,g=await ae(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=c?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:f,id_token:p,access_token:m,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u?.captchaToken}},xform:an}),{data:w,error:b}=g;return b?this._returnResult({data:{user:null,session:null},error:b}):!w||!w.session||!w.user?this._returnResult({data:{user:null,session:null},error:new Cs}):(w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("USER_UPDATED",w.session)),this._returnResult({data:w,error:b}))}catch(o){if(await ln(this.storage,this.storageKey,null),Q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async a=>{var s,o;const{data:c,error:u}=a;if(u)throw u;
41return await ae(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(s=c.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _refreshAccessToken(t){const a="#_refreshAccessToken()";this._debug(a,"begin");try{const s=Date.now();return await Ox(async o=>(o>0&&await Cx(200*Math.pow(2,o-1)),this._debug(a,"refreshing attempt",o),await ae(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:an})),(o,c)=>{const u=200*Math.pow(2,o);return c&&Xl(c)&&Date.now()+u-s<oa})}catch(s){if(this._debug(a,"error",s),Q(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(a,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,a){const{url:s,flowId:o}=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:a.redirectTo,scopes:a.scopes,queryParams:a.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",a,"url",s),vt()&&!a.skipBrowserRedirect&&window.location.assign(s),{data:{provider:t,url:s,flowId:o},error:null}}async _recoverAndRefresh(){var t,a;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const o=await wt(this.storage,this.storageKey);if(o&&this.userStorage){let u=await wt(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await la(this.userStorage,this.storageKey+"-user",u)),o.user=(t=u?.user)!==null&&t!==void 0?t:Of()}else if(o&&!o.user&&!o.user){const u=await wt(this.storage,this.storageKey+"-user");u&&u?.user?(o.user=u.user,await Lt(this.storage,this.storageKey+"-user"),await la(this.storage,this.storageKey,o)):o.user=Of()}if(this._debug(s,"session from storage",o),!this._isValidSession(o)){this._debug(s,"session is not valid"),o!==null&&await this._removeSession();return}const c=((a=o.expires_at)!==null&&a!==void 0?a:1/0)*1e3-Date.now()<Cf;if(this._debug(s,`session has${c?"":" not"} expired with margin of ${Cf}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(vx(u)?this._debug(s,"refresh discarded by commit guard",u):this._debug(s,"refresh failed",u))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:f}=await this._getUser(o.access_token);!f&&u?.user?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(s,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(s,"error",o),Xl(o)?console.warn(o):console.error(o);return}finally{this._debug(s,"end")}}async _callRefreshToken(t){var a,s;if(!t)throw new dt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const o="#_callRefreshToken()";this._debug(o,"begin");try{this.refreshingDeferred=new Bc;const c=await wt(this.storage,this.storageKey),{data:u,error:f}=await this._refreshAccessToken(t);if(f)throw f;if(!u.session)throw new dt;const p=await wt(this.storage,this.storageKey);if(c!==null&&(p===null||p.refresh_token!==c.refresh_token)){this._debug(o,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:p?"replaced":"cleared"});const w={data:null,error:new a0};return this.refreshingDeferred.resolve(w),w}const y=this._sessionRemovalEpoch;if(await this._saveSession(u.session),this._sessionRemovalEpoch!==y){this._debug(o,"commit guard (post-save): _removeSession ran during _saveSession, und
41oing write"),await Lt(this.storage,this.storageKey),this.userStorage&&await Lt(this.userStorage,this.storageKey+"-user");const w={data:null,error:new a0};return this.refreshingDeferred.resolve(w),w}await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const g={data:u.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(g),g}catch(c){if(this._debug(o,"error",c),Q(c)){const u={data:null,error:c};if(!Xl(c)){const f=await wt(this.storage,this.storageKey);!!(f?.expires_at&&f.expires_at*1e3>Date.now())?this._debug(o,"proactive refresh failed, access token still valid — preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:u,expiresAt:Date.now()+lx},(a=this.refreshingDeferred)===null||a===void 0||a.resolve(u),u}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,a,s=!0){if(this._pendingInitNotifications!==null&&s){this._pendingInitNotifications.push({event:t,session:a,broadcast:s});return}const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",a,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:t,session:a});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(t,a)}catch(p){c.push(p)}});if(await Promise.all(u),c.length>0){for(let f=0;f<c.length;f+=1)console.error(c[f]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const a=Object.assign({},t),s=a.user&&a.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&a.user&&await la(this.userStorage,this.storageKey+"-user",{user:a.user});const o=Object.assign({},a);delete o.user;const c=c0(o);await la(this.storage,this.storageKey,c)}else{const o=c0(a);await la(this.storage,this.storageKey,o)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Lt(this.storage,this.storageKey),await Px(this.storage,this.storageKey),await Lt(this.storage,this.storageKey+"-user"),this.userStorage&&await Lt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&vt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(a){console.error("removing visibilitychange callback failed",a)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),oa);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const a=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=a,a&&typeof a=="object"&&typeof a.unref=="function"?a.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(a)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const a=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,a&&clearTimeout(a)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async a=>{const{data:{session:s}}=a;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((s.expires_at*1e3-t)/oa);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${oa}ms, refresh threshold is ${Vi} ticks`),o<=Vi&&await this._callRefreshToken(s.refresh_token)})}catch(a){console.error("Auto refresh tick failed with error. This is likely a transient error.",a)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof Qx)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async a=>{const{data:{session:s}}=a;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((s.expires_at*1e3-t)/oa);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${oa}ms, refresh threshold is ${Vi} ticks`),o<=Vi&&await this._callRefreshToken(s.refresh_token)})}catch(a){console.error("Auto refresh tick failed with error. This is likely a transient error.",a)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!vt()||!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?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const a=`#_onVisibilityChanged(${t})`;if(this._debug(a,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
41{if(document.visibilityState!=="visible"){this._debug(a,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(a,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,a,s){let o=s?.redirectTo,c=null,u=null,f=null;this.flowType==="pkce"&&([c,u,f]=await this._getCodeChallengeAndMethod(),o=this._maybeAppendFlowIdToRedirect(o,f));const p=[`provider=${encodeURIComponent(a)}`];if(o&&p.push(`redirect_to=${encodeURIComponent(o)}`),s?.scopes&&p.push(`scopes=${encodeURIComponent(s.scopes)}`),c!=null&&u!=null){const m=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});p.push(m.toString())}if(s?.queryParams){const m=new URLSearchParams(s.queryParams);p.push(m.toString())}return s?.skipBrowserRedirect&&p.push(`skip_http_redirect=${s.skipBrowserRedirect}`),{url:`${t}?${p.join("&")}`,flowId:f}}_maybeAppendFlowIdToRedirect(t,a){return!t||!a||!this.experimental.appendPkceFlowIdToRedirects?t??void 0:Ux(t,a)}async _getCodeChallengeAndMethod(t=!1){return Ix(this.storage,this.storageKey,t,a=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",a))}async _unenroll(t){try{return await this._useSession(async a=>{var s;const{data:o,error:c}=a;return c?this._returnResult({data:null,error:c}):await ae(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(s=o?.session)===null||s===void 0?void 0:s.access_token})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _enroll(t){try{return await this._useSession(async a=>{var s,o;const{data:c,error:u}=a;if(u)return this._returnResult({data:null,error:u});const f=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:p,error:m}=await ae(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(s=c?.session)===null||s===void 0?void 0:s.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&p.type==="totp"&&(!((o=p?.totp)===null||o===void 0)&&o.qr_code)&&(p.totp.qr_code=`data:image/svg+xml;utf-8,${p.totp.qr_code}`),this._returnResult({data:p,error:null}))})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _verify(t){const a=async()=>{try{return await this._useSession(async s=>{var o;const{data:c,error:u}=s;if(u)return this._returnResult({data:null,error:u});const f=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?y0(t.webauthn.credential_response):v0(t.webauthn.credential_response)})}:{code:t.code}),{data:p,error:m}=await ae(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:f,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+p.expires_in},p)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:p,error:m}))})}catch(s){if(Q(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,a):a()}async _challenge(t){const a=async()=>{try{return await this._useSession(async s=>{var o;const{data:c,error:u}=s;if(u)return this._returnResult({data:null,error:u});const f=await ae(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(o=c?.session)===null||o===void 0?void 0:o.access_token});if(f.error)return f;const{data:p}=f;if(p.type!=="webauthn")return{data:p,error:null};switch(p.webauthn.type){case"create":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:m0(p.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},p),{webauthn:Object.assign(Object.assign({},p.webauthn),{credential_options:Object.assign(Object.assign({},p.webauthn.credential_options),{publicKey:g0(p.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(Q(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,a):a()}async _challengeAndVerify(t){const{data:a,error:s}=await this._challenge({factorId:t.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:t.factorId,challengeId:a.id,code:t.code})}async _listFactors(){var t;const{data:{user:a},error:s}=await this.getUser();if(s)return{data:null,error:s};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(t=a?.factors)!==null&&t!==void 0?t:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var a,s,o,c;if(t)try{const{payload:b}=Zl(t);let E=null;b.aal&&(E=b.aal);let S=E;const{data:{user:T},error:R}=await this.getUser(t);if(R)return this._returnResult({data:null,error:R});((s=(a=T?.factors)===null||a===void 0?void 0:a.filter($=>$.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(S="aal2");const j=b.amr||[];return{data:{currentLevel:E,nextLevel:S,currentAuthenticationMethods:j},error:null}}catch(b){if(Q(b))return this._returnResult({data:null,error:b});throw b}const{data:{session:u},error:f}
41=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:p}=Zl(u.access_token);let m=null;p.aal&&(m=p.aal);let y=m;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(b=>b.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const w=p.amr||[];return{data:{currentLevel:m,nextLevel:y,currentAuthenticationMethods:w},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async a=>{const{data:{session:s},error:o}=a;return o?this._returnResult({data:null,error:o}):s?await ae(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new dt})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _approveAuthorization(t,a){try{return await this._useSession(async s=>{const{data:{session:o},error:c}=s;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new dt});const u=await ae(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return u.data&&u.data.redirect_url&&vt()&&!a?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(s){if(Q(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(t,a){try{return await this._useSession(async s=>{const{data:{session:o},error:c}=s;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new dt});const u=await ae(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return u.data&&u.data.redirect_url&&vt()&&!a?.skipBrowserRedirect&&window.location.assign(u.data.redirect_url),u})}catch(s){if(Q(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:a},error:s}=t;return s?this._returnResult({data:null,error:s}):a?await ae(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new dt})})}catch(t){if(Q(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async a=>{const{data:{session:s},error:o}=a;return o?this._returnResult({data:null,error:o}):s?(await ae(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new dt})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async fetchJwk(t,a={keys:[]}){let s=a.keys.find(f=>f.kid===t);if(s)return s;const o=Date.now();if(s=this.jwks.keys.find(f=>f.kid===t),s&&this.jwks_cached_at+px>o)return s;const{data:c,error:u}=await ae(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,s=c.keys.find(f=>f.kid===t),!s)?null:s}async getClaims(t,a={}){try{let s=t;if(!s){const{data:b,error:E}
41=await this.getSession();if(E||!b.session)return this._returnResult({data:null,error:E});s=b.session.access_token}const{header:o,payload:c,signature:u,raw:{header:f,payload:p}}=Zl(s);if(!a?.allowExpired)try{Bx(c.exp)}catch(b){throw new bc(b instanceof Error?b.message:"JWT validation failed")}const m=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,a?.keys?{keys:a.keys}:a?.jwks);if(!m){const{error:b}=await this.getUser(s);if(b)throw b;return{data:{claims:c,header:o,signature:u},error:null}}const y=qx(o.alg),g=await crypto.subtle.importKey("jwk",m,y,!0,["verify"]);if(!await crypto.subtle.verify(y,g,u,Ex(`${f}.${p}`)))throw new bc("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(s){if(Q(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(t){var a,s,o;fn(this.experimental);try{if(!Sc())return this._returnResult({data:null,error:new gn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(a=t?.options)===null||a===void 0?void 0:a.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const f=g0(c.options),p=(o=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&o!==void 0?o:ih.createNewAbortSignal(),{data:m,error:y}=await r_({publicKey:f,signal:p});if(y||!m)return this._returnResult({data:null,error:y??new gn("WebAuthn ceremony failed",null)});const g=v0(m);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:g})}catch(c){if(Q(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(t){var a,s;fn(this.experimental);try{if(!Sc())return this._returnResult({data:null,error:new gn("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=m0(o.options),f=(s=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&s!==void 0?s:ih.createNewAbortSignal(),{data:p,error:m}=await a_({publicKey:u,signal:f});if(m||!p)return this._returnResult({data:null,error:m??new gn("WebAuthn ceremony failed",null)});const y=y0(p);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(Q(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){fn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:a},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!a)return this._returnResult({data:null,error:new dt});const{data:o,error:c}=await ae(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:a.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(Q(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){fn(this.experimental);try{return await this._useSession(async a=>{const{data:{session:s},error:o}=a;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new dt});const{data:c,error:u}=await ae(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _startPasskeyAuthentication(t){var a;fn(this.experimental);try{const{data:s,error:o}=await ae(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(a=t?.options)===null||a===void 0?void 0:a.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})}catch(s){if(Q(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(t){fn(this.experimental);try{const{data:a,error:s}=await ae(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:an});return s?this._returnResult({data:null,error:s}):(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:a,error:null}))}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _listPasskeys(){fn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:a},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!a)return this._returnResult({data:null,error:new dt});const{data:o,error:c}=await ae(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(t){if(Q(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){fn(this.experimental);try{return await this._useSession(async a=>{const{data:{session:s},error:o}=a;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new dt});const{data:c,error:u}=await ae(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:t.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}async _deletePasskey(t){fn(this.experimental);try{return await this._useSession(async a=>{const{data:{session:s},error:o}=a;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new dt});const{error:c}
41=await ae(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(a){if(Q(a))return this._returnResult({data:null,error:a});throw a}}}fo.nextInstanceID={};const dk=fo,fk="2.112.3";let Fi="",Ac;if(typeof Deno<"u"){var kf;Fi="deno",Ac=(kf=Deno.version)===null||kf===void 0?void 0:kf.deno}else if(typeof document<"u")Fi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Fi="react-native";else{var jf;Fi="node";const e=globalThis.process;Ac=e==null||(jf=e.version)===null||jf===void 0?void 0:jf.replace(/^v/,"")}const s_=[`runtime=${Fi}`];Ac&&s_.push(`runtime-version=${Ac}`);const hk={"X-Client-Info":`supabase-js/${fk}; ${s_.join("; ")}`},pk={headers:hk},mk={schema:"public"},gk={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},yk={},vk={enabled:!1,respectSamplingDecision:!0};function bk(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[a,s,o,c]=t;if(a.length!==2||s.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(a)||!u.test(s)||!u.test(o)||!u.test(c)||s==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:a,traceId:s,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function wk(e,t){if(!e||!t||t.length===0)return!1;let a;if(e instanceof URL)a=e;else try{a=new URL(e)}catch{return!1}for(const s of t)try{if(typeof s=="string"){if(_k(a.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(a.hostname))return!0}else if(typeof s=="function"&&s(a))return!0}catch{continue}return!1}function _k(e,t){if(t===e)return!0;if(t.startsWith("*.")){const a=t.slice(2);if(e.endsWith(a)&&(e===a||e.endsWith("."+a)))return!0}return!1}function Sk(e){const t=[];try{const a=new URL(e);t.push(a.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function ho(e){"@babel/helpers - typeof";return ho=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},ho(e)}function Ek(e,t){if(ho(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(ho(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ak(e){var t=Ek(e,"string");return ho(t)=="symbol"?t:t+""}function Tk(e,t,a){return(t=Ak(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b0(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,s)}return a}function Xe(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(a),!0).forEach(function(s){Tk(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b0(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}const Rk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Ck=()=>Headers,i_=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),Ok="sb_temp_",w0=new Set,xk=e=>{var t,a;if(!e.startsWith("sb_")||i_(e)||e.startsWith(Ok))return;const s=(t=(a=e.match(/^sb_[a-zA-Z0-9]+_/))===null||a===void 0?void 0:a[0])!==null&&t!==void 0?t:"unknown";w0.has(s)||(w0.add(s),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},_0=(e,t,a,s,o,c)=>{const u=Rk(s),f=Ck(),p=o?.enabled===!0,m=o?.respectSamplingDecision!==!1,y=p?Sk(t):null,g=!(c?.omitApiKeyAsBearer&&i_(e));return async(w,b)=>{const E=await a();let S=new f(b?.headers);if(S.has("apikey")||S.set("apikey",e),!S.has("Authorization")){const T=E??(g?e:null);T&&S.set("Authorization",`Bearer ${T}`)}if(y){const T=kk(w,y,m);T&&(T.traceparent&&!S.has("traceparent")&&S.set("traceparent",T.traceparent),T.tracestate&&!S.has("tracestate")&&S.set("tracestate",T.tracestate),T.baggage&&!S.has("baggage")&&S.set("baggage",T.baggage))}return u(w,Xe(Xe({},b),{},{headers:S}))}};let S0=!1,E0=!1;function kk(e,t,a){const s=xO();if(!s)return S0||(S0=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!wk(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const o=s();if(!o||!o.traceparent){var c;if(!(o==null||(c=o.carrierKeys)===null||c===void 0)&&c.length&&!E0){E0=!0;const u=o.carrierKeys.includes("sentry-trace")?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it."
41:" Configure your tracing SDK to emit W3C trace context on outgoing requests.";console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${o.carrierKeys.join(", ")}] and no W3C traceparent header, so trace headers will not be attached.`+u)}return null}if(a){const u=bk(o.traceparent);if(u&&!u.isSampled)return{traceparent:o.traceparent}}return o}function A0(e){return typeof e=="boolean"?{enabled:e}:e}function jk(e){return e.endsWith("/")?e:e+"/"}function Nk(e,t){var a,s,o,c,u,f;const{db:p,auth:m,realtime:y,global:g}=e,{db:w,auth:b,realtime:E,global:S}=t,T=A0(e.tracePropagation),R=A0(t.tracePropagation),k={db:Xe(Xe({},w),p),auth:Xe(Xe({},b),m),realtime:Xe(Xe({},E),y),storage:{},global:Xe(Xe(Xe({},S),g),{},{headers:Xe(Xe({},(a=S?.headers)!==null&&a!==void 0?a:{}),(s=g?.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(o=(c=T?.enabled)!==null&&c!==void 0?c:R?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(f=T?.respectSamplingDecision)!==null&&f!==void 0?f:R?.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return e.accessToken?k.accessToken=e.accessToken:delete k.accessToken,k}function Dk(e){const t=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(jk(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Lk=class extends dk{constructor(e){super(e)}},Mk=class{constructor(e,t,a){var s,o;this.supabaseUrl=e,this.supabaseKey=t;const c=Dk(e);if(!t)throw new Error("supabaseKey is required.");xk(t),this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,f={db:mk,realtime:yk,auth:Xe(Xe({},gk),{},{storageKey:u}),global:pk,tracePropagation:vk},p=Nk(a??{},f);
41if(this.settings=p,this.storageKey=(s=p.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=p.global.headers)!==null&&o!==void 0?o:{},p.accessToken)this.accessToken=p.accessToken,this.auth=new Proxy({},{get:(y,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=p.auth)!==null&&m!==void 0?m:{},this.headers,p.global.fetch)}this.fetch=_0(t,e,this._getSessionToken.bind(this),p.global.fetch,p.tracePropagation),this.functionsFetch=_0(t,e,this._getSessionToken.bind(this),p.global.fetch,p.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Xe({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},p.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new qO(new URL("rest/v1",c).href,{headers:this.headers,schema:p.db.schema,fetch:this.fetch,timeout:p.db.timeout,urlLengthLimit:p.db.urlLengthLimit,retry:p.db.retry}),this.storage=new ox(this.storageUrl.href,this.headers,this.fetch,a?.storage),p.accessToken||this._listenForAuthEvents()}get functions(){return new DO(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},a={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,a)}channel(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 _getSessionToken(){var e=this,t,a;if(e.accessToken)return await e.accessToken();const{data:s}=await e.auth.getSession();return(t=(a=s.session)===null||a===void 0?void 0:a.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:a,storage:s,userStorage:o,storageKey:c,flowType:u,lock:f,debug:p,throwOnError:m,experimental:y,lockAcquireTimeout:g,skipAutoInitialize:w},b,E){const S={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Lk({url:this.authUrl.href,headers:Xe(Xe({},S),b),storageKey:c,autoRefreshToken:e,persistSession:t,detectSessionInUrl:a,storage:s,userStorage:o,flowType:u,lock:f,debug:p,throwOnError:m,experimental:y,fetch:E,lockAcquireTimeout:g,skipAutoInitialize:w,hasCustomAuthorizationHeader:Object.keys(this.headers).some(T=>T.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new j2(this.realtimeUrl.href,Xe(Xe({},e),{},{params:Xe(Xe({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,a){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN"||e==="INITIAL_SESSION")&&this.changedAccessToken!==a?(this.changedAccessToken=a,this.realtime.setAuth(a)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Pk=(e,t,a)=>new Mk(e,t,a);function Uk(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const a=t.match(/^v(\d+)\./);return a?parseInt(a[1],10)<=20:!1}Uk()&&console.warn("⚠️  Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function Ik(){if(typeof window>"u")return;const e=location.hostname,a=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(T=>e===T||e.endsWith("."+T)),s="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=a?e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+s+")(?:-dev)?(?=\\.|$)","i"))?.[1]??e.match(new RegExp("^("+s+")(?=[.-])","i"))?.[1]:void 0,c=window.parent&&window.parent!==window;if(!o||!c)return localStorage;const u=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),f=u?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,p=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),m=p&&f.test(p)?[p]:u?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],y="lovable-preview-auth:result",g=2e3,w=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),b=(T,R,k)=>new Promise(j=>{const $=w();let K=!1,z;const D=ue=>{K||(K=!0,clearTimeout(z),window.removeEventListener("message",J),j(ue))},J=ue=>{if(m.indexOf(ue.origin)<0)return;const V=ue.data;V&&V.type===y&&V.requestId===$&&D(V)};window.addEventListener("message",J);const ee={type:T,requestId:$,projectId:o,key:R};k!==void 0&&(ee.value=k);for(const ue of m)window.parent.postMessage(ee,ue);z=setTimeout(()=>D(null),g)});let E=!0;const S=250;return{getItem:async T=>{let R=await b("lovable-preview-auth:get",T);return!R&&E&&(await new Promise(k=>setTimeout(k,S)),R=await b("lovable-preview-auth:get",T)),E=!1,R&&R.ok&&typeof R.value=="string"?R.value===""?(localStorage.removeItem(T),null):R.value:localStorage.getItem(T)},setItem:(T,R)=>(localStorage.setItem(T,R),b("lovable-preview-auth:set",T,R).then(k=>{k&&k.ok&&typeof k.value=="string"&&localStorage.getItem(T)===R&&(k.value===""?localStorage.removeItem(T):localStorage.setItem(T,k.value))})),removeItem:T=>(localStorage.removeItem(T),b("lovable-preview-auth:remove",T).then(()=>{}))}}function zk(e){return e.startsWith("sb_publishable_")||e.startsWith("sb_secret_")}function $k(e){return(t,a)=>{const s=new Headers(typeof Request<"u"&&t instanceof Request?t.headers:void 0);
41return a?.headers&&new Headers(a.headers).forEach((o,c)=>s.set(c,o)),zk(e)&&s.get("Authorization")===`Bearer ${e}`&&s.delete("Authorization"),s.set("apikey",e),fetch(t,{...a,headers:s})}}function Bk(){const e="https://hshrefnvvomudbejmqsx.supabase.co",t="sb_publishable_LPgzo1s9x1iJ78ap246_VA_5Yw3MLud";return Pk(e,t,{global:{fetch:$k(t)},auth:{storage:Ik(),persistSession:!0,autoRefreshToken:!0}})}let Nf;const qk=new Proxy({},{get(e,t,a){return Nf||(Nf=Bk()),Reflect.get(Nf,t,a)}}),Hk=Cr({type:"function"}).client(async({next:e})=>{const{data:t}=await qk.auth.getSession(),a=t.session?.access_token;return e({headers:a?{Authorization:`Bearer ${a}`}:{}})}),Gk=Cr(),T0=CO(()=>({requestMiddleware:[Gk],functionMiddleware:[Hk]}));var qc=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(){}},Vk=class extends qc{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},o_=new Vk,Fk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jk=class{#e=Fk;#n=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},oh=new Jk;function Wk(e){setTimeout(e,0)}var Kk=typeof window>"u"||"Deno"in globalThis;function mn(){}function Yk(e,t){return typeof e=="function"?e(t):e}function Qk(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function lh(e,t){return typeof e=="function"?e(t):e}function Zk(e,t){return typeof e=="function"?e(t):e}function R0(e,t){const{type:a="all",exact:s,fetchStatus:o,predicate:c,queryKey:u,stale:f}=e;if(u){if(s){if(t.queryHash!==Uh(u,t.options))return!1}else if(!mo(t.queryKey,u))return!1}if(a!=="all"){const p=t.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||c&&!c(t))}function C0(e,t){const{exact:a,status:s,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(a){if(po(t.options.mutationKey)!==po(c))return!1}else if(!mo(t.options.mutationKey,c))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function Uh(e,t){return(t?.queryKeyHashFn||po)(e)}function po(e){return JSON.stringify(e,(t,a)=>ch(a)?Object.keys(a).sort().reduce((s,o)=>(s[o]=a[o],s),{}):a)}function mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(a=>mo(e[a],t[a])):!1}var ej=Object.prototype.hasOwnProperty;function l_(e,t,a=0){if(e===t)return e;if(a>500)return t;const s=O0(e)&&O0(t);if(!s&&!(ch(e)&&ch(t)))return t;const c=(s?e:Object.keys(e)).length,u=s?t:Object.keys(t),f=u.length,p=s?new Array(f):{};let m=0;for(let y=0;y<f;y++){const g=s?y:u[y],w=e[g],b=t[g];if(w===b){p[g]=w,(s?y<c:ej.call(e,g))&&m++;continue}if(w===null||b===null||typeof w!="object"||typeof b!="object"){p[g]=b;continue}const E=l_(w,b,a+1);p[g]=E,E===w&&m++}return c===f&&m===c?e:p}function O0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ch(e){if(!x0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!x0(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function x0(e){return Object.prototype.toString.call(e)==="[object Object]"}function tj(e){return new Promise(t=>{oh.setTimeout(t,e)})}function nj(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?l_(e,t):t}function aj(e,t,a=0){const s=[...e,t];return a&&s.length>a?s.slice(1):s}function rj(e,t,a=0){const s=[t,...e];return a&&s.length>a?s.slice(0,-1):s}var Ih=Symbol();function c_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ih?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sj(e,t,a){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),s||(s=!0,o.aborted?a():o.addEventListener("abort",a,{once:!0})),o)}),e}var u_=(()=>{let e=()=>Kk;return{isServer(){return e()},setIsServer(t){e=t}}})();function ij(){let e,t;const a=new Promise((o,c)=>{e=o,t=c});
vendor: 19,632 bytes, line 41
41a.status="pending",a.catch(()=>{});function s(o){Object.assign(a,o),delete a.resolve,delete a.reject}return a.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},a.reject=o=>{s({status:"rejected",reason:o}),t(o)},a}var oj=Wk;function lj(){let e=[],t=0,a=f=>{f()},s=f=>{f()},o=oj;const c=f=>{t?e.push(f):o(()=>{a(f)})},u=()=>{const f=e;e=[],f.length&&o(()=>{s(()=>{f.forEach(p=>{a(p)})})})};return{batch:f=>{let p;t++;try{p=f()}finally{t--,t||u()}return p},batchCalls:f=>(...p)=>{c(()=>{f(...p)})},schedule:c,setNotifyFunction:f=>{a=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{o=f}}}var At=lj(),cj=class extends qc{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(a=>{a(e)}))}isOnline(){return this.#e}},Tc=new cj;function uj(e){return Math.min(1e3*2**e,3e4)}function d_(e){return(e??"online")==="online"?Tc.isOnline():!0}var uh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function f_(e){let t=!1,a=0,s;const o=ij(),c=()=>o.status!=="pending",u=S=>{if(!c()){const T=new uh(S);w(T),e.onCancel?.(T)}},f=()=>{t=!0},p=()=>{t=!1},m=()=>o_.isFocused()&&(e.networkMode==="always"||Tc.isOnline())&&e.canRun(),y=()=>d_(e.networkMode)&&e.canRun(),g=S=>{c()||(s?.(),o.resolve(S))},w=S=>{c()||(s?.(),o.reject(S))},b=()=>new Promise(S=>{s=T=>{(c()||m())&&S(T)},e.onPause?.()}).then(()=>{s=void 0,c()||e.onContinue?.()}),E=()=>{if(c())return;let S;const T=a===0?e.initialPromise:void 0;try{S=T??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(g).catch(R=>{if(c())return;const k=e.retry??(u_.isServer()?0:3),j=e.retryDelay??uj,$=typeof j=="function"?j(a,R):j,K=k===!0||typeof k=="number"&&a<k||typeof k=="function"&&k(a,R);if(t||!K){w(R);return}a++,e.onFail?.(a,R),tj($).then(()=>m()?void 0:b()).then(()=>{t?w(R):E()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(s?.(),o),cancelRetry:f,continueRetry:p,canStart:y,start:()=>(y()?E():b().then(E),o)}}var h_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qk(this.gcTime)&&(this.#e=oh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(u_.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(oh.clearTimeout(this.#e),this.#e=void 0)}},dj=class extends h_{#e;#n;#t;#r;#a;#s;#i;constructor(e){super(),this.#i=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#t=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=j0(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=j0(this.options);t.data!==void 0&&(this.setState(k0(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const a=nj(this.state.data,e,this.options);return this.#o({data:a,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),a}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Zk(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ih||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>lh(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Xk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#i||this.#l()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const a=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#i=!0,a.signal)})},o=()=>{const f=c_(this.options,t),m=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(y),y})();return this.#i=!1,this.options.persister?this.options.persister(f,m,this):f(m)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:o};return s(f),f})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#a=f_({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof uh&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),a.abort()},onFail:(f,p)=>{this.#o({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await this.#a.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof uh){if(f.silent)return this.#a.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...fj(a.data,this.options),fetchMeta:e.meta??null};case"success":const s={...a,...k0(e.data,e.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const o=e.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=t(this.state),At.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function fj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:d_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function k0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function j0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,a=t!==void 0,s=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}function N0(e){return{onFetch:(t,a)=>{const s=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let y=!1;const g=E=>{sj(E,()=>t.signal,()=>y=!0)},w=c_(t.options,t.fetchOptions),b=async(E,S,T)=>{if(y)return Promise.reject();if(S==null&&E.pages.length)return Promise.resolve(E);const k=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:S,direction:T?"backward":"forward",meta:t.options.meta};return g(z),z})(),j=await w(k),{maxPages:$}=t.options,K=T?rj:aj;return{pages:K(E.pages,j,$),pageParams:K(E.pageParams,S,$)}};if(o&&c.length){const E=o==="backward",S=E?hj:D0,T={pages:c,pageParams:u},R=S(s,T);f=await b(T,R,E)}else{const E=e??c.length;do{const S=p===0?u[0]??s.initialPageParam:D0(s,f);if(p>0&&S==null)break;f=await b(f,S),p++}while(p<E)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a):t.fetchFn=m}}}function D0(e,{pages:t,pageParams:a}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,a[s],a):void 0}function hj(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}var pj=class extends h_{#e;#n;#t;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||mj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#a({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=f_({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(c,u)=>{this.#a({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const s=this.state.status==="pending",o=!this.#r.canStart();try{if(s)t();else{this.#a({type:"pending",variables:e,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,a);const u=await this.options.onMutate?.(e,a);u!==this.state.context&&this.#a({type:"pending",context:u,variables:e,isPaused:o})}const c=await this.#r.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,a),await this.options.onSuccess?.(c,e,this.state.context,a),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(c,null,e,this.state.context,a),this.#a({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,a)}catch(u){Promise.reject(u)}try{await this.options.onError?.(c,e,this.state.context,a)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,a)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,a)}catch(u){Promise.reject(u)}throw this.#a({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#a(e){const t=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),At.batch(()=>{this.#n.forEach(a=>{a.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function mj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gj=class extends qc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,a){const s=new pj({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:a});return this.add(s),s}add(e){this.#e.add(e);const t=ec(e);if(typeof t=="string"){const a=this.#n.get(t);a?a.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ec(e);if(typeof t=="string"){const a=this.#n.get(t);if(a)if(a.length>1){const s=a.indexOf(e);s!==-1&&a.splice(s,1)}else a[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ec(e);if(typeof t=="string"){const s=this.#n.get(t)?.find(o=>o.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=ec(e);return typeof t=="string"?this.#n.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){At.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(a=>C0(t,a))}findAll(e={}){return this.getAll().filter(t=>C0(e,t))}notify(e){At.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return At.batch(()=>Promise.all(e.map(t=>t.continue().catch(mn))))}};function ec(e){return e.options.scope?.id}var yj=class extends qc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,a){const s=t.queryKey,o=t.queryHash??Uh(s,t);let c=this.get(o);return c||(c=new dj({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:a,defaultOptions:e.getQueryDefaults(s)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){At.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(a=>R0(t,a))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(a=>R0(e,a)):t}notify(e){At.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){At.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){At.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},vj=class{#e;#n;#t;#r;#a;#s;#i;#l;constructor(e={}){this.#e=e.queryCache||new yj,this.#n=e.mutationCache||new gj,this.#t=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=o_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Tc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),a=this.#e.build(this,t),s=a.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(lh(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:a})=>{const s=a.data;return[t,s]})}setQueryData(e,t,a){const s=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(s.queryHash)?.state.data,u=Yk(t,c);if(u!==void 0)return this.#e.build(this,s).setData(u,{...a,manual:!0})}setQueriesData(e,t,a){return At.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,a)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;At.batch(()=>{t.findAll(e).forEach(a=>{t.remove(a)})})}resetQueries(e,t){const a=this.#e;return At.batch(()=>(a.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const a={revert:!0,...t},s=At.batch(()=>this.#e.findAll(e).map(o=>o.cancel(a)));return Promise.all(s).then(mn).catch(mn)}invalidateQueries(e,t={}){return At.batch(()=>(this.#e.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const a={...t,cancelRefetch:t.cancelRefetch??!0},s=At.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,a);return a.throwOnError||(c=c.catch(mn)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(mn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=this.#e.build(this,t);return a.isStaleByTime(lh(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mn).catch(mn)}fetchInfiniteQuery(e){return e.behavior=N0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mn).catch(mn)}ensureInfiniteQueryData(e){return e.behavior=N0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Tc.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#r.set(po(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],a={};return t.forEach(s=>{mo(e,s.queryKey)&&Object.assign(a,s.defaultOptions)}),a}setMutationDefaults(e,t){this.#a.set(po(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],a={};return t.forEach(s=>{mo(e,s.mutationKey)&&Object.assign(a,s.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};
41return t.queryHash||(t.queryHash=Uh(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===Ih&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},bj=X.createContext(void 0),wj=({client:e,children:t})=>(X.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),A.jsx(bj.Provider,{value:e,children:t}));const _j="/assets/styles-C2xbVVNQ.css";function Sj(e,t={}){typeof window>"u"||window.__lovableEvents?.captureException?.(e,{source:"react_error_boundary",route:window.location.pathname,...t},{mechanism:"react_error_boundary",handled:!1,severity:"error"})}function Ej(){const e=Bs({select:t=>t.location.pathname});X.useEffect(()=>{if(typeof window>"u")return;Array.from(document.querySelectorAll(".reveal")).forEach(o=>{o.classList.remove("is-visible"),o.classList.add("reveal-pending")});const a=()=>{const o=document.querySelectorAll(".reveal.reveal-pending:not(.is-visible)");if(!("IntersectionObserver"in window))return o.forEach(u=>{u.classList.add("is-visible"),u.classList.remove("reveal-pending")}),null;const c=new IntersectionObserver(u=>{u.forEach((f,p)=>{if(f.isIntersecting){const m=f.target,y=m.dataset.revealDelay??`${p*60}`;m.style.transitionDelay=`${y}ms`,m.classList.add("is-visible"),m.classList.remove("reveal-pending"),c.unobserve(m)}})},{threshold:.12,rootMargin:"0px 0px -40px 0px"});return o.forEach(u=>c.observe(u)),c},s=requestAnimationFrame(()=>{const o=a();setTimeout(()=>{document.querySelectorAll(".reveal.reveal-pending:not(.is-visible)").forEach(c=>{c.getBoundingClientRect().top<window.innerHeight&&(c.classList.add("is-visible"),c.classList.remove("reveal-pending"))})},100),window.__revealIO=o});return()=>{cancelAnimationFrame(s);const o=window.__revealIO;o&&o.disconnect(),document.querySelectorAll(".reveal.reveal-pending").forEach(c=>{c.classList.add("is-visible"),c.classList.remove("reveal-pending")})}},[e])}const Aj={"hero-lighting.jpg":"Backyard pond and waterfall glowing with underwater lights at night beside a house","Iowa-Waterscapes-Pong-Lighting7-scaled.jpeg":"Pond lit from below at night with warm lights on the stream and surrounding trees","Iowa-Waterscapes-Pong-Lighting14-scaled.jpeg":"Night view from a deck of a lit waterfall, patio, and garden lights","Des-Moines-Stream-Repair-After-min.webp":"Repaired stream flowing over stacked limestone slabs in a fenced Des Moines backyard","Pond-leak-repairs-for-liner-with-holes-800x505-1.webp":"Close-up of a damaged pond liner with holes that needs a leak repair","foun-benefit1.jpg":"Three stacked stone urns spilling water into a rock basin next to a house","foun-benefit2.jpg":"Pondless stream with small waterfalls running through boulders under a shade tree","average-exploratory-drain.webp":"Just Add Water crew cleaning a drained pond by hand along its stone edge","high-end-exploratory-drain.webp":"Freshly cleaned backyard pond with clear water and flowering plants near a shed","exploratory-price.webp":"Technician running hoses and a pump to drain a pond into a holding tank","Des-Moines-Pond-In-Spring-1200x900-1.webp":"Des Moines backyard pond in spring with a boulder waterfall and flowering shrubs","benefit-2-5-1.webp":"Clear pond with colorful fish and a turtle on a mossy bank below a waterfall","pond-benefit1.jpg":"Backyard pond and stream beside a paver patio with a pergola and low lights","pond-benefit2.jpg":"Newly built boulder pond in front of a brick house with patio seating","pond-price-basic.jpg":"Small backyard pond with a short waterfall edged by boulders and mulch","pond-price-average.jpg":"Mid-size pond with a stone waterfall, aquatic plants, and garden flowers","pond-price-highend.jpg":"Long pond with a stream running beside a covered patio and concrete driveway","pond-repair-basic.webp":"Restored backyard pond with a small waterfall, water lilies, and a paver edge","average-pond-repair.webp":"Clear pond with a river rock bottom and lily pads after a pump replacement","large-pond-repair.webp":"Large backyard pond with a biofalls filter behind a brick home and patio","basic-fountain-bowl.webp":"Single bowl fountain spilling into a stone basin in a front yard garden bed","average-fountain-columns.webp":"Three basalt column fountains set in river rock and mulch by a sidewalk","pondless-high-end.webp":"Large lit fountainscape with urns, bowls, and waterfalls at dusk","basic-water-stream-two-waterfalls.webp":"Short pondless stream with two small waterfalls between granite boulders","average-water-stream-four-waterfalls.webp":"Pondless stream with four small waterfalls beside a stone retaining wall","high-end-water-stream-waterfalls.webp":"Long pondless stream with several waterfalls flowing through large boulders","base-recreational.webp":"Recreational pond with water lilies and a lounge chair at the water's edge","average-recreational.webp":"Deep blue recreational pond ringed with boulders and ornamental grasses","recreational-highend.jpg":"Large recreational pond with a paver path, fire pit seating, and a sandy entry","small-pond-maintenance.webp":"Small maintained pond with water lettuce, a stone waterfall, and a paver border","average-pond-maintenance.webp":"Maintained garden pond with a stream, lily pads, and shade plantings","large-pond-maintenance.webp":"Large maintained pond with urn fountains and a waterfall along a wood fence","header-exploratory-drain-clean-1.webp":"Young child crouching at the edge of a clean pond watching colorful fish","header-pond-maintenance.webp":"Healthy pond with fish swimming below a small waterfall and ferns","header-pond-repair-1.webp":"Person sitting on a stone bridge dipping their feet into a repaired pond","header-pond-construction.webp":"Custom pond with twin waterfalls and fish swimming in clear water","header-just-add-water-fountainscapes.webp":"Basalt column fountainscape set in dark river rock beside a paver patio","header-just-add-water-recreational-pond.webp":"Clear backyard pond with a stone edge, water plants, and a hot tub beyond","Iowa-Waterscapes-Pong-Lighting4-1024x768.jpeg":"Pond lit with red and teal underwater lights next to a fire pit at night","AnkenyGardenPond-1.jpg":"Ankeny garden pond surrounded by plantings with a backyard bar and patio","Pondless2024WAOTY-2-scaled.jpg":"Award-winning pondless waterfall in Ankeny with stone steps and a slab bridge","DisplayFeatures-09-min-1024x576.jpg":"Display pond framed by pink tulips at a Central Iowa garden center","meet-chris.webp":"Just Add Water owner Chris holding a baby while sitting at the edge of a pond","team-image.webp":"Just Add Water crew excavating and shaping a new pond on a marked-out site","pond-tour-with-iowa-waterscapes.webp":"Visitors gathered around a backyard pond during a Just Add Water pond tour","Pondless2024WAOTY-3-1024x768.jpg":"Close view of the award-winning Ankeny pondless waterfall and slab bridge","kids-playing-near-a-pond.webp":"Three children sitting on a flat rock at the edge of a backyard pond","AnkenyGardenPond-4.jpg":"Rocky 
41stream and waterfall with yellow iris in an Ankeny garden pond","join-our-team.webp":"Two Just Add Water crew members resting on boulders in front of an excavator","JAWTeamCollage.jpg":"The Just Add Water crew standing together under the company logo","just-add-water-owner.webp":"Just Add Water owner Chris holding a baby while sitting at the edge of a pond","DisplayFeatures-18-min-1024x768.jpg":"Stacked stone urn fountains spilling into a rock basin at the Just Add Water office","team-1.webp":"Just Add Water crew working inside a drained pond with hoses and buckets","team-2.webp":"Just Add Water crew cleaning out a drained pond by hand","team-3.webp":"Just Add Water crew digging and shaping a new pond excavation","team-4.webp":"Two Just Add Water crew members standing on underlayment inside a large pond build"};function Tj(e){if(!e)return"";const t=e.split("?")[0].split("#")[0];return decodeURIComponent(t.substring(t.lastIndexOf("/")+1))}function p_(e){return Aj[Tj(e)]}const m_=(...e)=>e.filter((t,a,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===a).join(" ").trim();const Rj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Cj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,s)=>s?s.toUpperCase():a.toLowerCase());const L0=e=>{const t=Cj(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Oj={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"};const xj=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const kj=X.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:o="",children:c,iconNode:u,...f},p)=>X.createElement("svg",{ref:p,...Oj,width:t,height:t,stroke:e,strokeWidth:s?Number(a)*24/Number(t):a,className:m_("lucide",o),...!c&&!xj(f)&&{"aria-hidden":"true"},...f},[...u.map(([m,y])=>X.createElement(m,y)),...Array.isArray(c)?c:[c]]));const wn=(e,t)=>{const a=X.forwardRef(({className:s,...o},c)=>X.createElement(kj,{ref:c,iconNode:t,className:m_(`lucide-${Rj(L0(e))}`,`lucide-${e}`,s),...o}));return a.displayName=L0(e),a};const jj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],kr=wn("arrow-right",jj);const Nj=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],g_=wn("award",Nj);const Dj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],y_=wn("chevron-down",Dj);const Lj=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Mj=wn("facebook",Lj);const Pj=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],Uj=wn("instagram",Pj);const Ij=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],zj=wn("mail",Ij);const $j=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],v_=wn("map-pin",$j);const Bj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],qj=wn("menu",Bj);const Hj=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],go=wn("phone",Hj);const Gj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],b_=wn("x",Gj);const Vj=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],Fj=wn("youtube",Vj),w_=[{label:"Cleaning Services",to:"/cleaning-services",thumb:"/__l5e/assets-v1/26917a8a-8711-4
41cf2-9d6e-3cb7bbe3a523/header-exploratory-drain-clean-1.webp",blurb:"Diagnose issues and reset your pond to like-new."},{label:"Water Feature Maintenance",to:"/water-feature-maintenance",thumb:"/__l5e/assets-v1/c6402517-2bee-4cc6-ad5a-aae04aba2e52/header-pond-maintenance.webp",blurb:"Cleanouts and season-round care that keep it pristine."},{label:"Repairs",to:"/repairs",thumb:"/__l5e/assets-v1/b32df03e-49e9-4940-bb01-bc69f69691c0/header-pond-repair-1.webp",blurb:"Leaks, liners, and pumps fixed right the first time."},{label:"Ponds",to:"/ponds",thumb:"/__l5e/assets-v1/2617dbc3-b5e3-43f9-9fb6-52d778deeb9a/header-pond-construction.webp",blurb:"New builds and full renovations, designed to last."},{label:"Fountainscapes and Pondless Features",to:"/fountainscapes-and-pondless-water-features",thumb:"/__l5e/assets-v1/af75f0e7-cc90-4269-b939-0f5f16004e9c/header-just-add-water-fountainscapes.webp",blurb:"The sound of water without the pond to maintain."},{label:"Recreational Ponds",to:"/recreational-ponds",thumb:"/__l5e/assets-v1/0f03e24a-3263-4ec3-a027-ad0a917e4769/header-just-add-water-recreational-pond.webp",blurb:"Swim, paddle, and play in your own natural water."},{label:"Lighting",to:"/lighting",thumb:"/__l5e/assets-v1/4eef1c44-b179-4d8c-9b6e-87984114ac3d/Iowa-Waterscapes-Pong-Lighting4-1024x768.jpeg",blurb:"Extend the magic of your water feature after dark."}],Jj=[{label:"Portfolio",to:"/portfolio",thumb:"/__l5e/assets-v1/9e9b2634-4af7-40bd-8dea-c3e03716bfd8/AnkenyGardenPond-1.jpg",blurb:"Browse recent backyards we have transformed."},{label:"Project Highlights",to:"/project-highlights",thumb:"/__l5e/assets-v1/07334c89-a3c6-4542-989d-92cbeef8dc18/Pondless2024WAOTY-2-scaled.jpg",blurb:"Deep dives into standout builds and renovations."},{label:"Where to See Our Work",to:"/where-to-see-our-work",thumb:"/__l5e/assets-v1/cc5dd1dc-fbfa-4557-ab58-6d465767bdab/DisplayFeatures-09-min-1024x576.jpg",blurb:"Visit our display ponds around Central Iowa."}],__=[{label:"About Us",to:"/about-us",thumb:"/__l5e/assets-v1/7ea9cc95-87a5-44e0-82ac-d84456ed043a/meet-chris.webp",blurb:"Meet Chris and the Just Add Water crew."},{label:"New to Your Water Feature?",to:"/new-to-your-water-feature",thumb:"/__l5e/assets-v1/cb828698-1adb-471f-9b93-31ba03854ece/Des-Moines-Pond-In-Spring-1200x900-1.webp",blurb:"A simple starter guide for first-time owners."},{label:"Our Process",to:"/our-process",thumb:"/__l5e/assets-v1/d5575813-5eff-4f16-bae0-5a6582b23eb8/team-image.webp",blurb:"From first call to first splash, step by step."},{label:"Pond Tours and Events",to:"/pond-tours",thumb:"/__l5e/assets-v1/942cb85b-3941-4182-98ba-4501ae9cea47/pond-tour-with-iowa-waterscapes.webp",blurb:"See finished water features in person."},{label:"Awards and Recognition",to:"/awards",thumb:"/__l5e/assets-v1/2cf854a1-79f3-467c-a662-bb410ef3be40/Pondless2024WAOTY-3-1024x768.jpg",blurb:"Industry honors for our design and builds."},{label:"Reviews",to:"/reviews",thumb:"/__l5e/assets-v1/96831e8f-f008-423e-b8cf-b4f8042677da/kids-playing-near-a-pond.webp",blurb:"What Central Iowa homeowners say about us."},{label:"FAQ",to:"/faq",thumb:"/__l5e/assets-v1/0e5b2b3d-1027-42c4-adab-3aca846e7f31/AnkenyGardenPond-4.jpg",blurb:"Straight answers on cost, care, and timing."},{label:"Service Areas",to:"/service-areas",thumb:"/__l5e/assets-v1/cc5dd1dc-fbfa-4557-ab58-6d465767bdab/DisplayFeatures-09-min-1024x576.jpg",blurb:"Pond building and care in your Central Iowa city."},{label:"Careers",to:"/careers",thumb:"/__l5e/assets-v1/25592c6e-6b33-4aea-8f5f-724a0cdc735e/join-our-team.webp",blurb:"Join a crew that builds with pride."}],Wj=[{label:"Blog",to:"/blog"},{label:"Videos",to:"/videos"}],Kj={image:"/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp",heading:"Not sure where to start?",subtext:"Tell us about your yard and we'll price it out.",ctaLabel:"Price Out Your Water Feature",ctaTo:"/guide",linkLabel:"New: See it in your backyard",linkTo:"/backyard-visualizer"},Yj={image:"/__l5e/assets-v1/3ed4dbdc-a2e2-4b47-ad91-bfb31165132b/JAWTeamCollage.jpg",heading:"Meet the team behind your water feature",subtext:"The only Master Certified Aquascape Contractor in Central Iowa, building for over 20 years.",ctaLabel:"Meet the Team",ctaTo:"/about-us",linkLabel:"Talk to us about your project",linkTo:"/contact"},M0=[{label:"Services",items:w_,featured:Kj},{label:"Our Work",items:Jj},{label:"About",items:__,featured:Yj},{label:"Knowledge Center",items:Wj}],S_="/__l5e/assets-v1/22c924f2-479f-49f0-8731-1f77fb789267/just-add-water-logo.png",Ka="(515) 208
41-4099",Dr="tel:5152084099",Rc="[email protected]",Qj=150;function Xj(){const[e,t]=X.useState(!1),[a,s]=X.useState(!1),[o,c]=X.useState(null),[u,f]=X.useState(null),p=Bs({select:b=>b.location.href}),m=Bs({select:b=>b.location.pathname}),y=m.startsWith("/admin")||m.startsWith("/thank-you"),g=e||y,w=X.useCallback(()=>{c(null),s(!1),f(null);const b=document.activeElement;b instanceof HTMLElement&&b.blur()},[]);return X.useEffect(()=>{c(null),s(!1),f(null)},[p]),X.useEffect(()=>{const b=()=>t(window.scrollY>40);return b(),window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),X.useEffect(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),X.useEffect(()=>{const b=E=>{E.key==="Escape"&&c(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]),A.jsxs(A.Fragment,{children:[y&&A.jsx("div",{"aria-hidden":!0,style:{height:"var(--header-h, 160px)"}}),A.jsxs("header",{className:`site-header ${g||a||o?"is-scrolled":""} ${e?"is-shrunk":""}`,children:[A.jsxs("div",{className:"site-header-inner container-x flex items-center justify-between gap-4",children:[A.jsx(Ve,{to:"/",className:"flex items-center shrink-0 site-logo-link","aria-label":"Just Add Water home",children:A.jsx("img",{src:S_,alt:"Just Add Water logo",className:"site-logo"})}),A.jsx("nav",{className:"nav-desktop items-center","aria-label":"Primary",children:M0.map(b=>A.jsx(Zj,{group:b,open:o===b.label,onOpen:()=>c(b.label),onClose:()=>c(E=>E===b.label?null:E),onNavigate:w},b.label))}),A.jsxs("div",{className:"nav-desktop nav-actions items-center",children:[A.jsxs("a",{href:Dr,className:"nav-link nav-phone font-bold","aria-label":`Call Just Add Water at ${Ka}`,children:[A.jsx(go,{size:15,"aria-hidden":!0,className:"shrink-0"})," ",A.jsx("span",{children:Ka})]}),A.jsx(Ve,{to:"/guide",className:`btn nav-btn ${g||o?"btn-dark":"btn-outline-white"}`,children:"Price Out Your Water Feature"}),A.jsx(Ve,{to:"/contact",className:"btn nav-btn btn-primary",children:"Get a Quote"})]}),A.jsxs("div",{className:"nav-mobile items-center gap-2",children:[A.jsx(Ve,{to:"/contact",className:"btn btn-primary whitespace-nowrap",children:"Get a Quote"}),A.jsx("button",{type:"button",onClick:()=>s(b=>!b),"aria-label":a?"Close menu":"Open menu","aria-expanded":a,className:"inline-flex items-center justify-center w-11 h-11 border border-current",style:{borderRadius:3},children:a?A.jsx(b_,{size:22}):A.jsx(qj,{size:22})})]})]}),A.jsx("div",{className:`nav-mobile-drawer overflow-hidden transition-[max-height] duration-300 ease-out ${a?"max-h-[85vh]":"max-h-0"}`,style:{background:"var(--cream)",color:"var(--ink)"},children:A.jsxs("div",{className:"container-x py-4 overflow-y-auto",style:{maxHeight:"78vh"},children:[M0.map(b=>{const E=u===b.label,S=b.items.some(T=>T.thumb);return A.jsxs("div",{className:"border-b",style:{borderColor:"rgba(0,0,0,0.08)"},children:[A.jsxs("button",{className:"w-full flex items-center justify-between py-3 font-semibold",onClick:()=>f(E?null:b.label),"aria-expanded":E,children:[A.jsx("span",{children:b.label}),A.jsx(y_,{size:16,className:`transition-transform ${E?"rotate-180":""}`})]}),A.jsx("div",{className:`overflow-hidden transition-[max-height] duration-300 ${E?"max-h-[2000px]":"max-h-0"}`,children:A.jsxs("div",{className:"pb-3 flex flex-col",children:[b.items.map(T=>A.jsxs(Ve,{to:T.to,className:"flex items-center gap-3 py-2 pl-1 pr-2 text-sm",onClick:()=>s(!1),children:[S&&T.thumb?A.jsx("img",{src:T.thumb,alt:p_(T.thumb)??T.label,className:"w-12 h-12 object-cover shrink-0",style:{borderRadius:6},loading:"lazy"}):null,A.jsx("span",{className:"font-semibold",style:{color:"var(--green-deep)"},children:T.label})]},T.to)),b.featured&&A.jsx(Ve,{to:b.featured.ctaTo,onClick:()=>s(!1),className:"btn btn-dark w-full mt-3",children:b.featured.ctaLabel})]})})]},b.label)}),A.jsxs("div",{className:"flex flex-col gap-3 pt-4",children:[A.jsxs("a",{href:Dr,className:"inline-flex items-center gap-2 font-semibold",children:[A.jsx(go,{size:16})," ",Ka]}),A.jsx(Ve,{to:"/guide",onClick:()=>s(!1),className:"btn btn-dark w-full",children:"Price Out Your Water Feature"})]})]})})]})]})}function Zj({group:e,open:t,onOpen:a,onClose:s,onNavigate:o}){const c=X.useRef(null),u=!!e.items[0]?.thumb,f=()=>{c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(s,Qj)},p=()=>{c.current&&(window.clearTimeout(c.current),c.current=null)},m=()=>{p(),o()};return X.useEffect(()=>p,[]),A.jsxs("div",{className:"dropdown relative",onMouseEnter:()=>{p(),a()},onMouseLeave:f,onFocus:a,onBlur:y=>{y.currentTarget.contains(y.relatedTarget)||f()},children:[A.jsxs("button",{type:"button",className:"nav-link","aria-haspopup":"true","aria-expanded":t,onClick:()=>
41t?s():a(),children:[e.label,A.jsx(y_,{size:14,"aria-hidden":!0,className:`transition-transform ${t?"rotate-180":""}`})]}),u?A.jsx(eN,{open:t,items:e.items,featured:e.featured,onNavigate:m}):A.jsx("div",{className:`dropdown-panel ${t?"is-open":""}`,role:"menu","aria-hidden":!t,children:e.items.map(y=>A.jsx(Ve,{to:y.to,role:"menuitem",tabIndex:t?void 0:-1,onClick:m,children:y.label},y.to))})]})}function eN({open:e,items:t,featured:a,onNavigate:s}){return A.jsx("div",{className:`mega-panel ${e?"is-open":""}`,role:"menu","aria-hidden":!e,children:A.jsxs("div",{className:`mega-inner ${a?"has-featured":""}`,children:[A.jsx("div",{className:"mega-rows",children:t.map(o=>A.jsxs(Ve,{to:o.to,className:"mega-row",role:"menuitem",onClick:s,children:[o.thumb&&A.jsx("span",{className:"mega-thumb",children:A.jsx("img",{src:o.thumb,alt:p_(o.thumb)??o.label,loading:"lazy"})}),A.jsxs("span",{className:"mega-text",children:[A.jsx("span",{className:"mega-name",children:o.label}),o.blurb&&A.jsx("span",{className:"mega-blurb",children:o.blurb})]}),A.jsx(kr,{size:16,className:"mega-arrow","aria-hidden":!0})]},o.to))}),a&&A.jsxs("div",{className:"mega-featured",style:{backgroundImage:`linear-gradient(180deg, rgba(31,42,32,0.72), rgba(31,42,32,0.88)), url(${a.image})`},children:[A.jsxs("div",{children:[A.jsx("h3",{className:"mega-featured-heading",children:a.heading}),A.jsx("p",{className:"mega-featured-sub",children:a.subtext}),a.linkTo&&a.linkLabel&&A.jsxs(Ve,{to:a.linkTo,onClick:s,className:"inline-flex items-center gap-1.5 font-semibold",style:{marginTop:"0.75rem",fontSize:"0.8125rem",color:"#fff",background:"var(--green-primary)",padding:"0.45rem 0.75rem",borderRadius:999},children:[a.linkLabel," ",A.jsx(kr,{size:13,"aria-hidden":!0})]})]}),A.jsx(Ve,{to:a.ctaTo,className:"btn btn-outline-white mega-featured-btn",onClick:s,children:a.ctaLabel})]})]})})}function tN({size:e=16}){return A.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",fill:"currentColor",children:A.jsx("path",{d:"M1.8 0v24h7.3v-7.4h5.8V24h7.3V9.3L9.1 5.6V0z"})})}function nN({size:e=16}){return A.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,"aria-hidden":"true",fill:"currentColor",children:A.jsx("path",{d:"M21.6 12.227c0-.71-.064-1.39-.182-2.045H12v3.868h5.385a4.605 4.605 0 0 1-1.997 3.022v2.51h3.23c1.89-1.74 2.982-4.305 2.982-7.355zM12 22c2.7 0 4.964-.895 6.618-2.418l-3.23-2.51c-.896.6-2.04.955-3.388.955-2.605 0-4.81-1.76-5.6-4.123H3.07v2.59A9.998 9.998 0 0 0 12 22zm-5.6-9.094a6.005 6.005 0 0 1 0-3.812V6.504H3.07a10.003 10.003 0 0 0 0 8.992l3.33-2.59zM12 5.97c1.47 0 2.787.506 3.823 1.495l2.866-2.866C16.96 2.99 14.696 2 12 2 8.094 2 4.708 4.24 3.07 7.504l3.33 2.59C7.19 7.73 9.395 5.97 12 5.97z"})})}const zh=[{label:"Just Add Water on Facebook",href:"https://www.facebook.com/JustAddWaterScapes",Icon:Mj},{label:"Just Add Water on Instagram",href:"https://www.instagram.com/justaddwater_ia/",Icon:Uj},{label:"Just Add Water on YouTube",href:"https://www.youtube.com/c/Iowawaterscapes",Icon:Fj},{label:"Just Add Water on Houzz",href:"https://www.houzz.com/professionals/landscape-contractors/just-add-water-pfvwus-pf~378287364",Icon:tN},{label:"Just Add Water on Google",href:"https://www.google.com/search?q=Just+Add+Water+Des+Moines+Iowa",Icon:nN}],cn={ponds:"/__l5e/assets-v1/2617dbc3-b5e3-43f9-9fb6-52d778deeb9a/header-pond-construction.webp",pondless:"/__l5e/assets-v1/af75f0e7-cc90-4269-b939-0f5f16004e9c/header-just-add-water-fountainscapes.webp",maintenance:"/__l5e/assets-v1/c6402517-2bee-4cc6-ad5a-aae04aba2e52/header-pond-maintenance.webp",cleaning:"/__l5e/assets-v1/26917a8a-8711-4cf2-9d6e-3cb7bbe3a523/header-exploratory-drain-clean-1.webp",recreational:"/__l5e/assets-v1/0f03e24a-3263-4ec3-a027-ad0a917e4769/header-just-add-water-recreational-pond.webp",ankeny:"/__l5e/assets-v1/9e9b2634-4af7-40bd-8dea-c3e03716bfd8/AnkenyGardenPond-1.jpg",award:"/__l5e/assets-v1/07334c89-a3c6-4542-989d-92cbeef8dc18/Pondless2024WAOTY-2-scaled.jpg",displays:"/__l5e/assets-v1/cc5dd1dc-fbfa-4557-ab58-6d465767bdab/DisplayFeatures-09-min-1024x576.jpg"},P0=[{to:"/ponds",label:"Ponds",blurb:"New ecosystem ponds and full renovations. Basic ponds start at $12,000."},{to:"/fountainscapes-and-pondless-water-features",label:"Fountainscapes and Pondless Features",blurb
41:"The sound of moving water without open water. Fountainscapes start at $5,000."},{to:"/recreational-ponds",label:"Recreational Ponds",blurb:"Natural swimming ponds with wetland filtration, starting at $103,000."},{to:"/water-feature-maintenance",label:"Water Feature Maintenance",blurb:"Single visits from $175, plus weekly, bi-weekly, and monthly plans."},{to:"/cleaning-services",label:"Cleaning Services",blurb:"Full cleanouts, averaging about $650 for small ponds and features."},{to:"/repairs",label:"Repairs",blurb:"Leaks, pumps, and filtration. Leak inspections are $250."},{to:"/lighting",label:"Lighting",blurb:"Installed LED packages from $1,500 with a five-year manufacturer warranty."}],xe={office:{label:"Office Display Ponds",to:"/office-displays",note:"Working display ponds at our shop, 2223 SW 23rd St, Des Moines."},ankenyCanoyer:{label:"Canoyer Garden Center, Ankeny",to:"/canoyer-garden-center-ankeny",note:"Fountain features, pondless waterfalls, and bio bowls on SW Oralabor Rd."},grimesCanoyer:{label:"Canoyer Garden Center, Grimes",to:"/canoyer-garden-center-grimes",note:"Display features on SE Gateway Dr in Grimes."},johnston:{label:"Created in Johnston",to:"/created-in-johnston",note:"A display water feature on Merle Hay Rd in Johnston."},perennial:{label:"Perennial Gardens, Ankeny",to:"/perennial-gardens",note:"Display features on NW 84th Ave in Ankeny."},where:{label:"Where to See Our Work",to:"/where-to-see-our-work",note:"Every public display location around Central Iowa in one place."},bellaire:{label:"Ankeny Award-Winning Pondless Waterfall",to:"/bellaire-project",note:"A project profile of one of our award-winning Ankeny builds."},colorado:{label:"Bringing Colorado to Iowa",to:"/bringing-colorado-to-iowa",note:"A mountain-style stream we built in Ankeny."},dore:{label:"Des Moines Pondless Waterfall",to:"/dore-project",note:"A pondless waterfall project profile in Des Moines."},restoration:{label:"Des Moines Pond Restoration",to:"/transforming-outdoor-spaces",note:"How we brought a tired Des Moines pond back to life."},polkCity:{label:"Tranquil Backyard Escape, Polk City",to:"/tranquil-backyard-escape",note:"A backyard retreat project profile in Polk City."}},aN=e=>`Most backyard ponds in ${e} come together in a matter of days once we break ground. Larger ponds with long streams take longer, and spring weather in Iowa always has a say. After an on-site consultation you get a clear quote and a realistic timeline before any work starts.`,rN=e=>`A well-built ecosystem pond needs less care than most ${e} homeowners expect: a spring cleanout, occasional skimmer and filter cleaning, water treatments, and a fall or winter shutdown. You can do much of it yourself, or book a single maintenance visit from $175 or a weekly, bi-weekly, or monthly plan.`,sN=e=>`You can run a water feature through an Iowa winter or shut it down, depending on the feature and your preference. Our ponds are dug to a depth that suits Iowa winters, and our winter shutdown service protects the pump and plumbing through the cold. We will walk ${e} customers through the simple seasonal steps either way.`;function un(e){const{costAnswer:t,serveAnswer:a,maintenanceAnswer:s,...o}=e;return{...o,faqs:[{q:`How much does a pond cost in ${e.city}?`,a:t},{q:`How long does it take to build a pond in ${e.city}?`,a:aN(e.city)},{q:"How much maintenance does a pond need?",a:s??rN(e.city)},{q:"What happens to my pond in an Iowa winter?",a:sN(e.city)},{q:`Does Just Add Water serve ${e.city}?`,a}]}}const Sr="A basic 6 by 8 foot pond with pump, filter, rocks, and a small waterfall starts at $12,000. An average 11 by 16 foot pond runs $24,000 to $26,000, and larger high-end ponds start at $40,000.",Hi="If you want moving water without open water, pondless water features start at $6,500 and fountainscapes start at $5,000.",$h=[un({slug:"pond-builder-des-moines",city:"Des Moines",title:"Pond Builder in Des Moines, IA | Just Add Water",description:"Just Add Water builds, cleans, and repairs ponds and waterfalls in Des Moines. Master Certified Aquascape Contractor. Get a quote today.",hero:cn.ponds,heroAlt:"Custom backyard pond with waterfall built by Just Add Water in Des Moines",intro:"Des Moines is home base. Our shop and display ponds sit at 2223 SW 23rd St on the south side, so for most Des Moines homeowners we are a short drive away for consultations, builds, cleanouts, and repair calls. We have been designing and building ponds, streams, and pondless waterfalls across the city for about 20 years.",local:"Because our crew is based here, Des Moines customers can see finished water features at our office before they commit, then work with the same team from design through seasonal care. Whether you have a new yard ready for its first pond or an older pond that needs a renovation, we can walk the site and give you a clear quote.",featured:["/ponds","/repairs","/cleaning-services"],nearby:[xe.office,xe.dore,xe.restoration,xe.where],blogCategory:"pond-building",blogOffset:0,costAnswer:`${Sr} ${Hi} Your exact price depends on size, site access, and features, and we confirm it after visiting your Des Moines property.`,serveAnswer:"Yes. Des Moines is where our shop is, at 2223 SW 23rd St, and we serve every part of the city for new builds, maintenance, cleaning, and repairs."}),un({slug:"pond-builder-west-des-moines",city:"West Des Moines",title:"Pond Builder in West Des Moines, IA | Just Add Water",description:"Ponds, pondless waterfalls, and fountainscapes in West Des Moines from Central Iowa's only Master Certified Aquascape Contractor.",hero:cn.pondless,heroAlt:"Fountainscape and pondless water feature by Just Add Water near West Des Moines",intro:"If your West Des Moines yard is already well landscaped, a water feature can add the look and sound of water without starting over. We design ponds, pondless waterfalls, and fountainscapes that fit into established patios and planting beds, and our Des Moines shop is just east of town.",local:"For patios and smaller spaces, a fountainscape or pondless waterfall gives you moving water with very little upkeep. For larger lots, a full ecosystem pond with a stream and underwater lighting becomes the centerpiece of the yard. You can see working examples at our office displays before deciding.",featured:["/fountainscapes-and-pondless-water-features","/ponds","/lighting"],nearby:[xe.office,xe.dore,xe.where],blogCategory:"pond-building",blogOffset:3,costAnswer:"Many West Des Moines projects start with a fountainscape from $5,000 or a pondless water feature from $6,500. Full ponds start at $12,000 for a basic 6 by 8 foot pond, and an average 11 by 16 foot pond runs $24,000 to $26,000. Lighting packages start at $1,500.",serveAnswer:"Yes. West Des Moines is a short drive from our Des Moines shop, and we build and maintain water features throughout the city."}),un({slug:"pond-builder-ankeny",city:"Ankeny",title:"Pond Builder in Ankeny, IA | Just Add Water",description:"See our Ankeny displays, then let Just Add Water build your pond or pondless waterfall. 2023 Aquascape Contractor of the Year.",hero:cn.ankeny,heroAlt:"Garden pond built by Just Add Water in Ankeny, Iowa",intro:"Ankeny has more of our work on public display than any other city. You can walk up to our features at Canoyer Garden Center on SW Oralabor Rd and at Perennial Gardens on NW 84th Ave, and two of our project profiles, including an award-winning pondless waterfall, are Ankeny builds.",local:"That makes Ankeny one of the easiest places to decide what you want. Visit a display, note what you like about the sound and size, and bring those ideas to your consultation. We build new ponds and streams here, and we also maintain and clean existing features across town.",featured:["/ponds","/fountainscapes-and-pondless-water-features","/water-feature-maintenance"],nearby:[xe.ankenyCanoyer,xe.perennial,xe.bellaire,xe.colorado],blogCategory:"pond-building",blogOffset:6,costAnswer:`${Hi} ${Sr} Seeing our Ankeny displays first is a good way to decide which size fits your budget.`,serveAnswer:"Yes. Ankeny is one of our busiest service areas, with display features at Canoyer Garden Center and Perennial Gardens and several completed projects in town."}),un({slug:"pond-builder-johnston",city:"Johnston",title:"Pond Builder in Johnston, IA | Just Add Water",description:"Pond building, cleaning, and maintenance in Johnston, Iowa. See our display at Created in Johnston, then get a quote.",hero:cn.displays,heroAlt:"Display water features by Just Add Water in Central Iowa",intro:"Johnston homeowners can see our work in person at Created in Johnston on Merle Hay Rd, and our Canoyer Garden Center display in neighboring Grimes is a few minutes west. We build ponds and pondless waterfalls here and keep existing features running with cleanouts and maintenance.",local:"If your Johnston yard has mature trees, a natural-looking stream or waterfall can blend right in. Trees also mean leaves, so fall service and a skimmer that is sized correctly matter. We plan for that from the start of the design.",featured:["/ponds","/cleaning-services","/water-feature-maintenance"],nearby:[xe.johnston,xe.grimesCanoyer,xe.polkCity],blogCategory:"pond-maintenance",blogOffset:0,costAnswer:`${Sr} For an existing pond, a full cleanout averages about $650 for small ponds and features and about $1,150 for most ponds.`,serveAnswer:"Yes. We serve all of Johnston, and you can see one of our display features at Created in Johnston, 6330 Merle Hay Rd."}),un({slug:"pond-builder-ames",city:"Ames",title:"Pond Builder in Ames, IA | Just Add Water",description:"Custom ponds, pondless waterfalls, and pond maintenance in Ames from Just Add Water, Central Iowa's Master Certified Aquascape Contractor.",hero:cn.award,heroAlt:"Award-winning pondless waterfall built by Just Add Water",intro:"Ames sits at the north edge of our Central Iowa service area, and we make the drive for new builds and larger projects. If you are in Ames and want a pond, stream, or pondless waterfall designed by a Master Certified Aquascape Contractor, we are happy to come to you.",local:"Because Ames is farther from our shop, we group consultations and seasonal visits to keep scheduling simple. Our Ankeny displays are on the way to Des Moines if you want to see finished work first.",featured:["/ponds","/fountainscapes-and-pondless-water-features","/recreational-ponds"],nearby:[xe.where,xe.perennial,xe.ankenyCanoyer],blogCategory:"pond-building",blogOffset:9,costAnswer:`${Sr} ${Hi} For acreage, recreational swimming ponds start at $103,000.`,serveAnswer:"Yes. Ames is part of our Central Iowa service area. Contact us with your address and we will set up a consultation."}),un({slug:"pond-builder-indianola",city:"Indianola",title:"Pond Builder in Indianola, IA | Just Add Water",description:"Just Add Water builds and maintains ponds, waterfalls, and recreational ponds in Indianola and Warren County. Get a free quote.",hero:cn.recreational,heroAlt:"Recreational swimming pond by Just Add Water in Central Iowa",intro:"Indianola is south of our Des Moines shop, and if your property has room for something bigger than a backyard pond, we can help. Along with ecosystem ponds and pondless waterfalls, we design recreational ponds you can swim and paddle in, filtered naturally with a wetland system.",local:"Larger lots also mean more options for streams, multiple waterfalls, and lighting that carries the feature into the evening. Our office display ponds on SW 23rd St are on the way into Des Moines if you want to see our work in person.",featured:["/recreational-ponds","/ponds","/lighting"],nearby:[xe.office,xe.where],blogCategory:"pond-building",blogOffset:12,costAnswer:"Backyard ponds start at $12,000 for a basic 6 by 8 foot pond, and an average 11 by 16 foot pond runs $24,000 to $26,000. Recreational ponds start at $103,000 for a 15 by 30 foot pond, 4 feet deep, and an average 20 by 25 foot recreational pond is about $150,000.",serveAnswer:"Yes. We serve Indianola and the surrounding area for new ponds, recreational ponds, maintenance, and repairs."}),un({slug:"pond-builder-urbandale",city:"Urbandale",title:"Pond Builder in Urbandale, IA | Just Add Water",description:"Pond repair, cleaning, and new pond builds in Urbandale from Just Add Water. Central Iowa's Master Certified Aquascape Contractor.",hero:cn.cleaning,heroAlt:"Pond cleanout service by Just Add Water in the Des Moines metro",intro:"In Urbandale we handle cleanouts, leak checks, and renovations for existing ponds as well as brand new builds. Whatever shape your pond is in, we can diagnose it, fix it, and set it up for easier care.",local:"If your pond is losing water, a leak inspection is the right first step. If it is simply overdue for attention, a full cleanout resets it. And if you are starting from scratch, we can design a new pond or pondless waterfall. Our displays at Created in Johnston and Canoyer Garden Center in Grimes are both close by.",featured:["/repairs","/cleaning-services","/ponds"],nearby:[xe.johnston,xe.grimesCanoyer,xe.where],blogCategory:"pond-maintenance",blogOffset:3,costAnswer:"For an existing pond, a leak inspection is $250 and a full cleanout averages about $650 for small ponds and features. New ponds start at $12,000 for a basic 6 by 8 foot pond, and an average 11 by 16 foot pond runs $24,000 to $26,000.",serveAnswer:"Yes. We serve all of Urbandale for pond repair, cleaning, maintenance, and new construction."}),un({slug:"pond-builder-waukee",city:"Waukee",title:"Pond Builder in Waukee, IA | Just Add Water",description:"New ponds, pondless waterfalls, and lighting for Waukee backyards from Just Add Water, Central Iowa's Master Certified Aquascape Contractor.",hero:cn.pondless,heroAlt:"Pondless waterfall with stream built by Just Add Water",intro:"If your Waukee home is newer, your backyard may still be a blank slate. That is the best time to plan a water feature, before patios and plantings are finished, so the pond, stream, or pondless waterfall is part of the design instead of an afterthought.",local:"We can coordinate with the rest of your landscape plan, pick a spot that shows the feature from the house, and add lighting so it works at night too. Our Canoyer Garden Center display in Grimes is the closest place to see our work.",featured:["/fountainscapes-and-pondless-water-features","/ponds","/lighting"],nearby:[xe.grimesCanoyer,xe.where],blogCategory:"pond-building",blogOffset:15,c
41ostAnswer:`${Hi} ${Sr} Lighting packages start at $1,500 for three lights in a pondless feature.`,serveAnswer:"Yes. Waukee is part of our regular service area for new builds, lighting, and ongoing maintenance."}),un({slug:"pond-builder-grimes",city:"Grimes",title:"Pond Builder in Grimes, IA | Just Add Water",description:"Visit our display at Canoyer Garden Center in Grimes, then let Just Add Water build or maintain your pond. Get a quote today.",hero:cn.displays,heroAlt:"Just Add Water display water features at a Central Iowa garden center",intro:"Grimes homeowners have one of our display locations right in town at Canoyer Garden Center on SE Gateway Dr. It is an easy way to hear what a fountain, bio bowl, or pondless waterfall sounds like before you pick one for your own yard.",local:"We build new ponds and water features in Grimes and keep existing ones healthy with maintenance plans and cleanouts. Created in Johnston, another of our displays, is also a short drive east.",featured:["/fountainscapes-and-pondless-water-features","/ponds","/water-feature-maintenance"],nearby:[xe.grimesCanoyer,xe.johnston,xe.where],blogCategory:"pond-maintenance",blogOffset:6,costAnswer:`${Hi} ${Sr}`,serveAnswer:"Yes. We serve Grimes, and one of our display locations is in town at Canoyer Garden Center, 3355 SE Gateway Dr."}),un({slug:"pond-builder-clive",city:"Clive",title:"Pond Builder in Clive, IA | Just Add Water",description:"Ponds, fountainscapes, and pond maintenance plans in Clive from Just Add Water, 2023 Aquascape Contractor of the Year.",hero:cn.maintenance,heroAlt:"Pond maintenance visit by Just Add Water in the Des Moines metro",intro:"If you want a water feature in Clive that looks great without taking over your weekends, we can build a pond or fountainscape, then offer maintenance plans so the feature stays clear and running all season with little effort on your part.",local:"A weekly, bi-weekly, or monthly plan covers water treatments, debris removal, skimmer and net cleaning, waterfall scrubbing, and plant care, plus the spring cleanout and winter shutdown. Our Grimes display and our Des Moines office displays are both nearby.",featured:["/water-feature-maintenance","/ponds","/fountainscapes-and-pondless-water-features"],nearby:[xe.grimesCanoyer,xe.office,xe.where],blogCategory:"pond-maintenance",blogOffset:9,costAnswer:`${Sr} Fountainscapes start at $5,000. Maintenance for an average pond is $175 for a single visit or $250 a month on a monthly plan.`,serveAnswer:"Yes. We serve Clive for new ponds, fountainscapes, maintenance plans, cleaning, and repairs.",maintenanceAnswer:"Less than most people expect. Plan on a spring cleanout, occasional skimmer and filter cleaning, water treatments, and a fall or winter shutdown. In Clive, many customers hand that off to us with a maintenance plan: weekly, bi-weekly, or monthly, or a single visit from $175."}),un({slug:"pond-builder-altoona",city:"Altoona",title:"Pond Builder in Altoona, IA | Just Add Water",description:"Pondless waterfalls, ponds, and pond care in Altoona from Just Add Water. See our Ankeny displays, then get a free quote.",hero:cn.award,heroAlt:"Pondless waterfall built by Just Add Water in Central Iowa",intro:"Altoona sits on the east side of the metro, and if you want moving water without the upkeep of a full pond, a pondless waterfall is worth a look. It gives you the sound of falling water with no open pond, which suits families with young kids and busy schedules.",local:"If you want to see pondless features in person, our displays in Ankeny at Canoyer Garden Center and Perennial Gardens are a short drive north. We also build full ecosystem ponds and handle cleaning and repairs for existing features in Altoona.",featured:["/fountainscapes-and-pondless-water-features","/ponds","/repairs"],nearby:[xe.ankenyCanoyer,xe.perennial,xe.where],blogCategory:"pond-maintenance",blogOffset:12,costAnswer:"Pondless water features start at $6,500 for a 2 foot stream with two small waterfalls, and an average 12 foot stream with four waterfalls is about $15,000. Ponds start at $12,000 for a basic 6 by 8 foot pond.",serveAnswer:"Yes. Altoona is part of our service area for pondless waterfalls, ponds, maintenance, and repairs."})];function _n(e){return $h.find(t=>t.slug===e)}const iN=__;function oN(){return A.jsxs("footer",{style:{background:"var(--green-deep)",color:"#fff"},children:[A.jsxs("div",{className:"container-x py-16 grid gap-10 md:grid-cols-2 lg:grid-cols-5",children:[A.jsxs("div",{className:"lg:col-span-2",children:[A.jsx("img",{src:S_,alt:"Just Add Water logo",className:"h-16 w-auto mb-5"}),A.jsx("p",{className:"text-sm/relaxed opacity-90 max-w-xs",children:"Proudly serving Des Moines, Ames, Ankeny, Johnston, Indianola, and surrounding Central Iowa communities."}),A.jsx("img",{src:"/__l5e/assets-v1/2731188b-1938-497d-88a5-9ac58a8f7f09/CAC-Graphic-1934x2048.png",alt:"Certified Aquascape Contractor award",className:"mt-6 w-28 h-auto",loading:"lazy"})]}),A.jsx(Df,{title:"Services",children:w_.map(e=>A.jsx(Ve,{to:e.to,className:"footer-link",children:e.label},e.to))}),A.jsx(Df,{title:"Company",children:iN.map(e=>A.jsx(Ve,{to:e.to,className:"footer-link",children:e.label},e.to))}),A.jsxs(Df,{title:"Get in Touch",children:[A.jsxs("address",{className:"not-italic text-sm/relaxed opacity-90",children:["2223 SW 23rd St",A.jsx("br",{}),"Des Moines IA 50321"]}),A.jsx("a",{href:Dr,className:"footer-link",children:Ka}),A.jsx("a",{href:`mailto:${Rc}`,className:"footer-link",children:Rc}),A.jsx("div",{className:"flex gap-3 pt-3",children:zh.map(({label:e,href:t,Icon:a})=>A.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":e,className:"w-10 h-10 inline-flex items-center justify-center border border-white/30 hover:bg-white hover:text-[color:var(--green-deep)] transition-colors",style:{borderRadius:3},children:A.jsx(a,{size:18})},e))})]})]}),A.jsx("div",{className:"border-t border-white/15",children:A.jsxs("div",{className:"container-x py-8",children:[A.jsx("h2",{className:"text-sm uppercase tracking-[0.2em] mb-3 opacity-90",style:{color:"#fff"},children:"Service Areas"}),A.jsxs("ul",{className:"flex flex-wrap gap-x-5 gap-y-2 text-sm opacity-90",children:[$h.map(e=>A.jsx("li",{children:A.jsxs(Ve,{to:`/${e.slug}`,className:"hover:underline",children:["Pond Builder ",e.city]})},e.slug)),A.jsx("li",{children:A.jsx(Ve,{to:"/service-areas",className:"hover:underline",children:"All service areas"})})]})]})}),A.jsx("div",{className:"border-t border-white/15",children:A.jsxs("div",{className:"container-x py-5 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 text-xs opacity-90",children:[A.jsxs("p",{children:["© 2026 Just Add Water. All rights reserved. · ",A.jsx("a",{href:"https://breaktheimage.com",target:"_blank",rel:"noopener",className:"hover:underline",children:"Website by Break The Image"})]}),A.jsxs("nav",{className:"flex flex-wrap gap-x-5 gap-y-2","aria-label":"Legal",children:[A.jsx(Ve,{to:"/privacy-policy",className:"hover:underline",children:"Privacy Policy"}),A.jsx(Ve,{to:"/terms-of-service",className:"hover:underline",children:"Terms of Service"}),A.jsx("a",{href:"/sitemap.xml",className:"hover:underline",children:"Sitemap"})]})]})}),A.jsx("style",{children:`
42        .footer-link { display: block; font-size: 0.9rem; padding: 0.25rem 0; color: rgba(255,255,255,0.9); text-decoration: none; transition: color 150ms ease, transform 150ms ease; }
43        .footer-link:hover { color: #fff; transform: translateX(2px); }
44      `})]})}function Df({title:e,children:t}){return A.jsxs("div",{children:[A.jsx("h2",{className:"text-lg mb-4",style:{color:"#fff"},children:e}),A.jsx("div",{className:"flex flex-col gap-1",children:t})]})}const U0="jaw_announcement_dismissed_v1";function lN(){const[e,t]=X.useState(!1);return X.useEffect(()=>{try{const a=typeof window<"u"&&localStorage.getItem(U0)==="1";t(!a)}catch{t(!0)}},[]),X.useEffect(()=>{document.documentElement.style.setProperty("--announcement-h",e?"var(--announcement-natural-h, 36px)":"0px")},[e]),e?A.jsx("div",{className:"announcement-bar",role:"region","aria-label":"Site announcement",children:A.jsxs("div",{className:"container-x flex items-center justify-center gap-3 py-2.5 text-center",children:[A.jsxs("p",{className:"text-[15px] leading-relaxed font-medium",children:["Now booking 2026 water feature installs."," ",A.
44jsxs("a",{href:Dr,className:"underline font-semibold whitespace-nowrap",children:["Call ",Ka]})," ","to reserve your spot."]}),A.jsx("button",{type:"button","aria-label":"Dismiss announcement",onClick:()=>{try{localStorage.setItem(U0,"1")}catch{}t(!1)},className:"ml-2 inline-flex items-center justify-center w-6 h-6 hover:bg-white/15 transition-colors",children:A.jsx(b_,{size:14,"aria-hidden":!0})})]})}):null}function cN(){return A.jsx("div",{className:"utility-bar","aria-label":"Contact and credentials",children:A.jsxs("div",{className:"utility-inner container-x flex items-center justify-between gap-6 py-2.5 text-[14.5px]",children:[A.jsxs("ul",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 whitespace-nowrap",children:[A.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[A.jsx(v_,{size:15,"aria-hidden":!0}),A.jsx("span",{children:"2223 SW 23rd St, Des Moines IA 50321"})]}),A.jsx("li",{children:A.jsxs("a",{href:Dr,className:"inline-flex items-center gap-1.5 hover:underline",children:[A.jsx(go,{size:15,"aria-hidden":!0})," ",Ka]})}),A.jsx("li",{children:A.jsxs("a",{href:`mailto:${Rc}`,className:"inline-flex items-center gap-1.5 hover:underline",children:[A.jsx(zj,{size:15,"aria-hidden":!0})," ",Rc]})})]}),A.jsxs("div",{className:"flex items-center gap-4",children:[A.jsxs("span",{className:"inline-flex items-center gap-1.5 whitespace-nowrap",children:[A.jsx(g_,{size:15,"aria-hidden":!0})," Master Certified Aquascape Contractor"]}),A.jsx("div",{className:"flex items-center gap-2",children:zh.map(({label:e,href:t,Icon:a})=>A.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":e,className:"inline-flex items-center justify-center w-6 h-6 hover:bg-white/15 transition-colors",children:A.jsx(a,{size:16})},e))})]})]})})}function uN({children:e}){return Ej(),X.useEffect(()=>{if(typeof window>"u")return;const t=document.documentElement,a=()=>{const c=document.querySelector(".announcement-bar"),u=document.querySelector(".utility-bar"),f=document.querySelector(".site-header-inner"),p=c?c.offsetHeight:0,m=u&&getComputedStyle(u).display!=="none"?u.offsetHeight:0,y=f?f.offsetHeight:84;t.style.setProperty("--announcement-h",`${p}px`),t.style.setProperty("--utility-h",`${m}px`),t.style.setProperty("--nav-h",`${y}px`),t.style.setProperty("--header-h",`${p+m+y}px`)};a();const s=new ResizeObserver(a);document.querySelectorAll(".announcement-bar, .utility-bar, .site-header-inner").forEach(c=>s.observe(c)),window.addEventListener("resize",a);const o=window.setInterval(a,500);return()=>{s.disconnect(),window.removeEventListener("resize",a),window.clearInterval(o)}},[]),A.jsxs(A.Fragment,{children:[A.jsx(lN,{}),A.jsx(cN,{}),A.jsx(Xj,{}),A.jsx("main",{id:"main",children:e}),A.jsx(oN,{})]})}const Cc="https://iowawaterscapes.com",I0=Cc;function E_(e){return e.startsWith("/")?`${I0}${e}`:e.replace(/^https:\/\/(just\.btiapps\.com|www\.iowawaterscapes\.com)(?=\/)/,I0)}function yo(e){const t=e.split("?")[0].split("#")[0],a=t.length>1?t.replace(/\/+$/,""):"/";return a==="/"?`${Cc}/`:`${Cc}${a}`}const Fa=Cc,Oc="Just Add Water",A_="+1-515-208-4099",T_="[email protected]",xc="https://iowawaterscapes.com/__l5e/assets-v1/2731188b-1938-497d-88a5-9ac58a8f7f09/CAC-Graphic-1934x2048.png",R_=["Des Moines","West Des Moines","Ames","Ankeny","Johnston","Indianola","Urbandale","Waukee","Grimes","Clive","Altoona"];function Lf({data:e}){return A.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})}function dN(){return{"@context":"https://schema.org","@type":["GeneralContractor","HomeAndConstructionBusiness","LocalBusiness"],name:Oc,"@id":`${Fa}/#business`,url:`${Fa}/`,logo:xc,image:xc,description:"Just Add Water designs, builds, and cares for custom ponds, pondless waterfalls, fountains, and recreational ponds across Des Moines and Central Iowa.",telephone:A_,email:T_,address:{"@type":"PostalAddress",streetAddress:"2223 SW 23rd St",addressLocality:"Des Moines",addressRegion:"IA",postalCode:"50321",addressCountry:"US"},geo:{"@type":"GeoCoordinates",latitude:41.566982,longitude:-93.649175},areaServed:[...R_.map(e=>({"@type":"City",name:e,containedInPlace:{"@type":"State",name:"Iowa"}})),{"@type":"AdministrativeArea",name:"Central Iowa"}],sameAs:zh.filter(e=>!e.href.includes("google.com/search")).map(e=>e.href),hasCredential:{"@type":"EducationalOccupationalCredential",name:"Master Certified Aquascape Contractor",credentialCategory:"Professional Certification"}}}const fN={"@type":"PostalAddress",streetAddress:"2223 SW 23rd St",addressLocality:"Des Moines",addressRegion:"IA",postalCode:"50321",addressCountry:"US"};function hN(){return{"@type":["GeneralContractor","LocalBusiness"],"@id":`${Fa}/#business`,name:Oc,url:`${Fa}/`,telephone:A_,email:T_,image:xc,address:fN}}function pN(){return[...R_.map(e=>({"@type":"City",name:e,containedInPlace:{"@type":"State",name:"Iowa"}})),{"@type":"AdministrativeArea",name:"Central Iowa"}]}function mN(e){const t=Array.from(e.matchAll(/\$\s?([\d,]+(?:\.\d+)?)/g)).map(u=>Number(u[1].replace(/,/g,"")));if(!t.length)return null;const a=/\+/.test(e),s=/\/\s?mo/i.test(e),o=/average/i.test(e),c={"@type":s?"UnitPriceSpecification":"PriceSpecification",priceCurrency:"USD"};return t.length>=2?(c.minPrice=Math.min(...t),c.maxPrice=Math.max(...t)):a?c.minPrice=t[0]:c.price=t[0],s&&(c.unitCode="MON",c.unitText="per month"),o&&(c.description="Average price"),{spec:c,nums:t,openEnded:a}}function gN(e,t){const a=[],s=[];let o=!1;const c=(u,f,p)=>{const m=mN(f);m&&(s.push(...m.nums),m.openEnded&&(o=!0),a.push({"@type":"Offer",name:u,...p?{description:p}:{},priceCurrency:"USD",...typeof m.spec.price=="number"?{price:m.spec.price}:{},priceSpecification:m.spec,url:t,availability:"https://schema.org/InStock"}))};for(const u of e)u.options?.length?u.options.forEach(f=>c(`${u.name}, ${f.label}`,f.price)):u.price&&c(u.name,u.price,u.inclusion);if(a.length)return{"@type":"AggregateOffer",priceCurrency:"USD",lowPrice:Math.min(...s),...o?{}:{highPrice:Math.max(...s)},offerCount:a.length,offers:a}}function yN(e){const t=yo(e.pathname),a=e.priceTiers?.length?gN(e.priceTiers,t):void 0;return{"@context":"https://schema.org","@type":"Service","@id":`${t}#service`,name:e.name,description:e.description,serviceType:e.serviceType??e.name,url:t,provider:hN(),areaServed:e.city?[{"@type":"City",name:e.city,containedInPlace:{"@type":"State",name:"Iowa"}},{"@type":"AdministrativeArea",name:"Central Iowa"}]:pN(),...a?{offers:a}:{},...e.rating&&e.reviews?.length?{aggregateRating:{"@type":"AggregateRating",ratingValue:e.rating.value.toFixed(1),bestRating:"5",worstRating:"1",reviewCount:e.rating.count}}:{},...e.reviews?.length?{review:e.reviews.map(s=>({"@type":"Review",author:{"@type":"Person",name:s.name},datePublished:s.date,reviewBody:s.text,reviewRating:{"@type":"Rating",ratingValue:String(s.rating),bestRating:"5",worstRating:"1"},publisher:{"@type":"Organization",name:"Google"}}))}:{}}}function vN(e){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((t,a)=>({"@type":"ListItem",position:a+1,name:t.name,item:yo(t.pathname)}))}}function lL(e,t){const a=e.datePublished?.slice(0,10),s=(e.dateModified??e.datePublished)?.slice(0,10);return{"@context":"https://schema.org","@type":"BlogPosting",headline:e.title,...e.description?{description:e.description}:{},...e.image?{image:[E_(e.image)]}:{},...a?{datePublished:a}:{},...s?{dateModified:s}:{}
44,...e.tags&&e.tags.length?{keywords:e.tags.join(", ")}:{},mainEntityOfPage:{"@type":"WebPage","@id":yo(t)},url:yo(t),author:{"@type":"Organization","@id":`${Fa}/#business`,name:Oc,url:`${Fa}/`},publisher:{"@type":"Organization","@id":`${Fa}/#business`,name:Oc,url:`${Fa}/`,logo:{"@type":"ImageObject",url:xc}}}}function bN(e){return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))}}function cL(){return Bs({select:e=>e.location.pathname})}const z0="G-RQSGPR6VNP",wN=[{src:`https://www.googletagmanager.com/gtag/js?id=${z0}`,async:!0},{children:`window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}window.gtag=gtag;gtag('js',new Date());gtag('config','${z0}',{send_page_view:false});`}];function _N(){const e=Bs({select:a=>a.location.href}),t=Bs({select:a=>a.location.pathname});X.useEffect(()=>{if(t.startsWith("/admin"))return;const a=window.setTimeout(()=>{typeof window.gtag=="function"&&window.gtag("event","page_view",{page_title:document.title,page_location:window.location.href,page_path:t})},50);return()=>window.clearTimeout(a)},[e,t])}function Mf(e,t={}){typeof window>"u"||window.location.pathname.startsWith("/admin")||typeof window.gtag=="function"&&window.gtag("event",e,{page_path:window.location.pathname,...t})}const SN=[/^get a quote/i,/^price out your water feature/i];function EN(e){return e.closest(".utility-bar")?"utility_bar":e.closest("header")?"header":e.closest("footer")?"footer":e.closest("article, aside")?"article":"page"}function AN(){X.useEffect(()=>{const e=t=>{const s=t.target?.closest?.("a, button");if(!s)return;const o=s.getAttribute("href")??"",c=EN(s);o.startsWith("tel:")?Mf("phone_call_click",{link_location:c,link_url:o}):o.startsWith("mailto:")&&Mf("email_click",{link_location:c,link_url:o});const u=(s.textContent??"").trim();SN.some(f=>f.test(u))&&Mf("quote_cta_click",{link_location:c,link_text:u,link_url:o})};return document.addEventListener("click",e,{capture:!0}),()=>document.removeEventListener("click",e,{capture:!0})},[])}const Pf="Just Add Water | Ponds and Water Features in Central Iowa",Uf="Just Add Water designs, builds, and cares for ponds, pondless waterfalls, and fountains across Des Moines and Central Iowa.";function TN(){return A.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:A.jsxs("div",{className:"max-w-md text-center",children:[A.jsx("h1",{className:"text-7xl font-bold text-foreground",children:"404"}),A.jsx("h2",{className:"mt-4 text-xl font-semibold text-foreground",children:"Page not found"}),A.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The page you're looking for doesn't exist or has been moved."}),A.jsx("div",{className:"mt-6",children:A.jsx(Ve,{to:"/",className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Go home"})})]})})}function RN({error:e,reset:t}){console.error(e);const a=St();return X.useEffect(()=>{Sj(e,{boundary:"tanstack_root_error_component"})},[e]),A.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:A.jsxs("div",{className:"max-w-md text-center",children:[A.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"This page didn't load"}),A.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong on our end. You can try refreshing or head back home."}),A.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[A.jsx("button",{onClick:()=>{a.invalidate(),t()},className:"inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Try again"}),A.jsx("a",{href:"/",className:"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:"Go home"})]})]})})}const ie=nO()({head:({matches:e})=>{const t=e[e.length-1],a=t?.pathname??"/",s=a.startsWith("/admin"),o=!t||t.status==="notFound",c=yo(a);return{meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:Pf},{name:"description",content:Uf},{property:"og:site_name",content:"Just Add Water"},{property:"og:locale",content:"en_US"},{property:"og:title",content:Pf},{property:"og:description",content:Uf},{property:"og:type",content:"website"},...o?[]:[{property:"og:url",content:c}],{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:Pf},{name:"twitter:description",content:Uf}],links:[{rel:"stylesheet",href:_j}
44,{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital@0;1&family=Open+Sans:wght@400;500;600;700&display=swap"},...o?[]:[{rel:"canonical",href:c}]],scripts:[{type:"application/ld+json",children:JSON.stringify(dN())},...s?[]:wN]}},shellComponent:CN,component:ON,notFoundComponent:TN,errorComponent:RN});function CN({children:e}){return A.jsxs("html",{lang:"en",children:[A.jsx("head",{children:A.jsx(wO,{})}),A.jsxs("body",{children:[e,A.jsx(SO,{})]})]})}function ON(){const{queryClient:e}=ie.useRouteContext();return _N(),AN(),A.jsx(wj,{client:e,children:A.jsx(uN,{children:A.jsx(kw,{})})})}const xN="modulepreload",kN=function(e){return"/"+e},$0={},oe=function(t,a,s){let o=Promise.resolve();if(a&&a.length>0){let p=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");o=p(a.map(m=>{if(m=kN(m),m in $0)return;$0[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const w=document.createElement("link");if(w.rel=y?"stylesheet":xN,y||(w.as="script"),w.crossOrigin="",w.href=m,f&&w.setAttribute("nonce",f),document.head.appendChild(w),y)return new Promise((b,E)=>{w.addEventListener("load",b),w.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};function ye(e){const t=[{title:e.title},{name:"description",content:e.description},{property:"og:title",content:e.title},{property:"og:description",content:e.description},{property:"og:type",content:e.type??"website"},{name:"twitter:card",content:e.image?"summary_large_image":"summary"},{name:"twitter:title",content:e.title},{name:"twitter:description",content:e.description}];if(e.image){const a=E_(e.image);t.push({property:"og:image",content:a}),t.push({name:"twitter:image",content:a}),e.imageAlt&&(t.push({property:"og:image:alt",content:e.imageAlt}),t.push({name:"twitter:image:alt",content:e.imageAlt}))}return e.noindex&&t.push({name:"robots",content:"noindex, nofollow"}),{meta:t}}const jN=()=>oe(()=>import("./index-D11lVSeL.js"),__vite__mapDeps([0,1,2,3,4])),NN=le()({head:()=>ye({title:"Just Add Water | Pond and Water Feature Design in Central Iowa",description:"Just Add Water designs, builds, and cares for ponds, waterfalls, and pondless features across Des Moines, Ames, Ankeny, Johnston, Indianola, and surrounding Central Iowa.",image:"/og/home.jpg",imageAlt:"Large backyard waterfall cascading over boulders beside flagstone steps"}),component:se(jN,"component")}),Bh=Ki({method:"GET"}).handler(jh("05f3ad5524d174c2f82816d6ee128ffd86971978f58f7a900fe6be198538c616")),qh=Ki({method:"GET"}).handler(jh("e7f25670662535a02c60dfa1b89a1dae8467aef488bc7edf2cd0a81cacae3b71")),DN=()=>oe(()=>import("./_slug-iv3Vg4Hk.js"),[]),LN=()=>oe(()=>import("./_slug-DlSAvhZz.js"),[]),MN=()=>oe(()=>import("./_slug-ClMP93FI.js"),__vite__mapDeps([5,6])),PN=le()({loader:async({params:e})=>{const t=await qh({data:{slug:e.slug}});if(t.kind!=="post"||!t.post.legacy_root_url)throw fh();return{post:t.post,related:t.related}},head:({loaderData:e})=>{if(!e)return ye({title:"Pond Care Article | Just Add Water",description:"Pond and water feature advice for Central Iowa homeowners from Just Add Water.",noindex:!0});const t=e.post,a=ye({title:t.seo_title||`${t.title} | Just Add Water`,description:t.meta_description||t.excerpt||"Pond and water feature advice for Central Iowa homeowners from Just Add Water.",image:t.hero_image??void 0,imageAlt:t.hero_alt||t.title,type:"article"});return t.published_date&&a.meta.push({property:"article:published_time",content:t.published_date}),t.updated_date&&a.meta.push({property:"article:modified_time",content:t.updated_date}),a},component:se(MN,"component"),notFoundComponent:se(LN,"notFoundComponent"),errorComponent:se(DN,"errorComponent")}),UN=()=>oe(()=>import("./about-us-DMxydk1c.js"),__vite__mapDeps([7,1,8])),IN=le()({head:()=>ye({title:"About Just Add Water | Des Moines Pond Builders",description:"Meet Chris Thompson and the Just Add Water team, Central Iowa's only Master Certified Aquascape Contractor, building ponds and water features in Des Moines since 2004.",image:"/__l5e/assets-v1/3ed4dbdc-a2e2-4b47-ad91-bfb31165132b/JAWTeamCollage.jpg"}),component:se(UN,"component")}),zN=()=>oe(()=>import("./awards-BfqpaGlN.js"),__vite__mapDeps([9,10,11])),$N=le()({head:()=>ye({title:"Awards and Recognition | Just Add Water, Central Iowa",description:"Just Add Water is a Master Certified Aquascape Contractor with over 20 years of award-winning pond and water feature work across Des Moines and Central Iowa.",image:"/__l5e/assets-v1/2731188b-1938-497d-88a5-9ac58a8f7f09/CAC-Graphic-1934x2048.png"}),component:se(zN,"component")}),BN=()=>oe(()=>import("./backyard-visualizer-C6SAOt2J.js"),__vite__mapDeps([12,13,14,4,15,16])),qN=le()({head:()=>ye({title:"Backyard Visualizer | See a Water Feature in Your Yard | Just Add Water",description:"Upload a photo of your yard and see a pond, waterfall, or fountain from Just Add Water placed in your own space. Free AI design tool, no obligation.",image:"/__l5e/assets-v1/0
447334c89-a3c6-4542-989d-92cbeef8dc18/Pondless2024WAOTY-2-scaled.jpg"}),component:se(BN,"component")}),HN=()=>oe(()=>import("./bellaire-project-DMf_uQhE.js"),__vite__mapDeps([17,18,8,10,14,15])),GN=le()({head:()=>ye({title:"Ankeny Award-Winning Pondless Waterfall | Just Add Water",description:"See how Just Add Water expanded an Ankeny backyard pondless waterfall into an award-winning feature with stone steps, a slab bridge, and cascading falls.",image:"/__l5e/assets-v1/d66ddc96-76c6-4867-9ce8-f4f9c77486bc/Pondless2024WAOTY-4-1024x768.jpg"}),component:se(HN,"component")}),VN=()=>oe(()=>import("./bringing-colorado-to-iowa-BWWbixVi.js"),__vite__mapDeps([19,18,8,10,14,15])),FN=le()({head:()=>ye({title:"Bringing Colorado to Iowa, Ankeny Stream | Just Add Water",description:"See how Just Add Water brought the look of a Rocky Mountain stream to an Ankeny, Iowa backyard with boulders, waterfalls, and native plantings.",image:"/__l5e/assets-v1/9e9b2634-4af7-40bd-8dea-c3e03716bfd8/AnkenyGardenPond-1.jpg"}),component:se(VN,"component")}),JN=()=>oe(()=>import("./canoyer-garden-center-ankeny-B0QpYods.js"),__vite__mapDeps([20,21])),WN=le()({head:()=>ye({title:"Canoyer Garden Center, Ankeny Display | Just Add Water",description:"Visit the Canoyer Garden Center in Ankeny to see Just Add Water extreme fountain features, pondless waterfalls, and bio bowls on display.",image:"https://just.btiapps.com/__l5e/assets-v1/89caedae-2ec6-4813-af46-e65e4c2f39b1/DisplayFeatures-10-min-1024x576.jpg"}),component:se(JN,"component")}),KN=()=>oe(()=>import("./canoyer-garden-center-grimes-DhcGuWC8.js"),__vite__mapDeps([22,21])),YN=le()({head:()=>ye({title:"Canoyer Garden Center, Grimes Display | Just Add Water",description:"Visit the Canoyer Garden Center in Grimes to see Just Add Water pondless waterfalls and basalt column fountains on display.",image:"https://just.btiapps.com/__l5e/assets-v1/41886363-cf58-4d61-9d4c-3432ecd69225/DisplayFeatures-08-min-1024x576.jpg"}),component:se(KN,"component")}),QN=()=>oe(()=>import("./careers-Bn9ryUFW.js"),__vite__mapDeps([23,24,25,13,16])),XN=le()({head:()=>ye({title:"Careers at Just Add Water | Pond Jobs in Des Moines",description:"Join the team building the best water features in Central Iowa. See open opportunities at Just Add Water and apply today.",image:"/__l5e/assets-v1/25592c6e-6b33-4aea-8f5f-724a0cdc735e/join-our-team.webp"}),component:se(QN,"component")}),ZN=()=>oe(()=>import("./cleaning-services-DpFewT1I.js"),__vite__mapDeps([26,27,2,8,1,10,28,29,3,4,15])),e3=le()({head:()=>ye({title:"Pond Cleaning Services in Central Iowa | Just Add Water",description:"Full pond inspection and deep cleaning across Central Iowa. Drain, clean, diagnose, and restore your water feature with Just Add Water.",image:"https://just.btiapps.com/__l5e/assets-v1/9a735877-bc4e-4824-bcbc-03dc8ff00399/exporatory.webp"}),component:se(ZN,"component")}),t3=()=>oe(()=>import("./contact-DhJ8zenH.js"),__vite__mapDeps([30,24,25,13,16])),n3=le()({head:()=>ye({title:"Contact Just Add Water | Pond Quotes in Des Moines",description:"Request a quote for a pond, pondless waterfall, fountain, or pond service. Just Add Water serves Des Moines, Ames, Ankeny, Johnston, Indianola, and Central Iowa.",image:"/__l5e/assets-v1/d366630e-3c29-4542-850b-be9f8d979d1d/team-in-action.webp"}),component:se(t3,"component")}),a3=()=>oe(()=>import("./created-in-johnston-1H-4SXj3.js"),__vite__mapDeps([31,21])),r3=le()({head:()=>ye({title:"Created in Johnston Display | Just Add Water",description:"Visit Created in Johnston to see Just Add Water self-sustaining ponds and pondless waterfalls on display.",image:"https://just.btiapps.com/__l5e/assets-v1/6deefce2-1604-4350-b791-b3aabd81de36/DisplayFeatures-05-min-1024x576.jpg"}),component:se(a3,"component")}),s3=le()({beforeLoad:()=>{throw Mt({to:"/ponds",statusCode:301})}}),i3=()=>oe(()=>import("./dore-project-CEKEFE79.js"),__vite__mapDeps([32,18,8,10,14,15])),o3=le()({head:()=>ye({title:"Pondless Waterfall, Des Moines | Just Add Water",description:"See how Just Add Water turned a struggling Des Moines backyard pond into a low-maintenance pondless waterfall, with before and after photos.",image:"/__l5e/assets-v1/bf7a5ed7-7c74-40da-9483-eb555c803825/finished-9-scaled.jpg"}),component:se(i3,"component")}),l3=le()({beforeLoad:()=>{throw Mt({to:"/cleaning-services",statusCode:301})}}),c3=()=>oe(()=>import("./faq-CxgtFzme.js"),__vite__mapDeps([33,1])),u3=le()({head:()=>ye({title:"Pond and Water Feature FAQ | Just Add Water, Central Iowa",description:"Straight answers about pond design, costs, space needs, and seasonal care from the most certified water feature team in Central Iowa.",image:"/__l5e/assets-v1/24967da7-e40d-4fa9-9e02-f8e463b1430f/aquascape-logo.png"}),component:se(c3,"component")}),d3=()=>oe(()=>import("./fountainscapes-and-pondless-water-features-B7b7o_c1.js"),__vite__mapDeps([34,27,2,8,1,10,28,29,3,4,15])),f3=le()({head:()=>ye({title:"Fountains and Pondless Waterfalls, Central Iowa | Just Add Water",description:"Low-maintenance fountainscapes and pondless water features designed and built across Central Iowa by Just Add Water.",image:"https://just.btiapps.com/__l5e/assets-v1/fdfb5e89-50a0-48dd-a046-6647b5b7c1f9/amazing-outdoor-space-waterfall.webp"}),component:se(d3,"component")}),h3=()=>oe(()=>
44import("./guide-ClxruYzJ.js"),__vite__mapDeps([35,4,15])),p3=le()({head:()=>ye({title:"Pond Cost Estimator for Central Iowa | Just Add Water",description:"Design your perfect water feature and get an instant estimate from Just Add Water. Configure a pond or pondless waterfall in a few quick steps.",image:"/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp"}),component:se(h3,"component")}),m3=()=>oe(()=>import("./lighting-D5PCxkCA.js"),__vite__mapDeps([36,27,2,8,1,10,28,29,3,4,15])),g3=le()({head:()=>ye({title:"Pond and Waterfall Lighting in Central Iowa | Just Add Water",description:"LED pond and waterfall lighting for Central Iowa homes. Enjoy your water feature after dark with energy-efficient, professionally installed systems.",image:"https://just.btiapps.com/__l5e/assets-v1/4eef1c44-b179-4d8c-9b6e-87984114ac3d/Iowa-Waterscapes-Pong-Lighting4-1024x768.jpeg"}),component:se(m3,"component")}),y3="/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp",v3="Just bought a home with a pond, waterfall, or fountain? Learn the first steps to understand your water feature, get it running its best, and enjoy it.",b3=()=>oe(()=>import("./new-to-your-water-feature--XOh52XO.js"),[]),w3="New to Your Pond or Water Feature? Owner Guide | Just Add Water",_3=le()({head:()=>ye({title:w3,description:v3,image:y3,type:"article"}),component:se(b3,"component")}),S3=()=>oe(()=>import("./office-displays-CGBvcDgr.js"),__vite__mapDeps([37,21])),E3=le()({head:()=>ye({title:"Office Display Ponds in Des Moines | Just Add Water",description:"Visit the Just Add Water office display in Des Moines to see fountains, pondless waterfalls, and an ecosystem pond in person.",image:"https://just.btiapps.com/__l5e/assets-v1/bf7ade8a-a593-4ca8-9306-3d4b075f0f89/DisplayFeatures-18-min-1024x768.jpg"}),component:se(S3,"component")}),A3=()=>oe(()=>import("./our-process-BAFqXB1X.js"),__vite__mapDeps([38,1,3,11])),T3=le()({head:()=>ye({title:"Our Pond Design and Build Process | Just Add Water",description:"A simple, stress-free path from first idea to the water feature you will enjoy for years. See how a Just Add Water project flows from first call to final walkthrough.",image:"/__l5e/assets-v1/d5575813-5eff-4f16-bae0-5a6582b23eb8/team-image.webp"}),component:se(A3,"component")}),R3=()=>oe(()=>import("./perennial-gardens-DlZtCYB1.js"),__vite__mapDeps([39,21])),C3=le()({head:()=>ye({title:"Perennial Gardens, Ankeny Display | Just Add Water",description:"Visit Perennial Gardens in Ankeny by appointment to see Just Add Water ecosystem ponds, pondless waterfalls, and bubbling rock features on display.",image:"https://just.btiapps.com/__l5e/assets-v1/cc5dd1dc-fbfa-4557-ab58-6d465767bdab/DisplayFeatures-09-min-1024x576.jpg"}),component:se(R3,"component")}),B0=_n("pond-builder-altoona"),C_=[{slug:"general-pond-information",name:"General Pond Information",description:"The basics of ponds and water features, from how they work to what to expect.",hero:"/__l5e/assets-v1/cc5dd1dc-fbfa-4557-ab58-6d465767bdab/DisplayFeatures-09-min-1024x576.jpg"},{slug:"pond-building",name:"Pond Building",description:"How we design and build ponds, waterfalls, and streams across Central Iowa.",hero:"/__l5e/assets-v1/ccc10477-1c2d-4976-bb8d-f35407b8f4bd/DisplayFeatures-07-min-1024x576.jpg"},{slug:"pond-lighting",name:"Pond Lighting",description:"Ideas and guidance for enjoying your water feature after dark.",hero:"/__l5e/assets-v1/b24a948a-c163-4734-b4a5-441558c8c183/DisplayFeatures-06-min-1024x576.jpg"},{slug:"pond-maintenance",name:"Pond Maintenance",description:"Seasonal care that keeps your pond clean, clear, and healthy all year.",hero:"/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp"},{slug:"project-highlights",name:"Project Highlights",description:"Real Central Iowa water feature transformations, start to finish.",hero:"/__l5e/assets-v1/6deefce2-1604-4350-b791-b3aabd81de36/DisplayFeatures-05-min-1024x576.jpg"}],O3="/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp";function O_(e){return C_.find(t=>t.slug===e)}function x3(e){return C_.some(t=>t.slug===e)}function k3(e){if(!e)return"";const t=new Date(`${e.slice(0,10)}T00:00:00Z`);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})}function j3(e){return e.legacy_root_url?`/${encodeURIComponent(e.slug)}`:`/blog/${encodeURIComponent(e.category)}/${encodeURIComponent(e.slug)}`}function N3({post:e,featured:t=!1}){const a=O_(e.category);return A.jsxs(Ve,{to:j3(e),className:`card reveal group flex flex-col ${t?"md:flex-row md:items-stretch":""}`,children:[A.jsx("div",{className:`overflow-hidden ${t?"md:w-1/2":""}`,style:{aspectRatio:t?void 0:"16 / 10"},children:A.jsx("img",{src:e.hero_image||O3,alt:e.hero_alt||e.title,loading:"lazy",className:`w-full object-cover ${t?"h-64 md:h-full":"h-full"}`})}),A.jsxs("div",{className:`p-6 md:p-7 flex flex-col ${t?"md:w-1/2 md:p-10":""}`,children:[a?A.jsx("div",{className:"uppercase tracking-[0.22em] text-[11px] font-semibold mb-3",style:{color:"var(--green-primary)"},children:a.name}):null,A.jsx("h3",{className:`leading-tight ${t?"text-2xl md:text-4xl":"text-xl md:text-2xl"}`,style:{fontFamily:"var(--font-serif)"},children:e.title}),e.excerpt?A.jsx("p",{className:`mt-3 ${t?"text-[17px]/relaxed":"text-[15px]/relaxed line-clamp-2"}`,style:{color:"var(--muted-tone)"},children:e.excerpt}):null,A.jsxs("div",{className:"mt-auto pt-5 flex items-center justify-between text-sm",children:[A.jsx("span",{style:{color:"var(--muted-tone)"},children:k3(e.published_date)}),A.jsxs("span",{className:"inline-flex items-center gap-1.5 font-semibold",style:{color:"var(--green-primary)"},children:["Read more ",A.jsx(kr,{size:14,"aria-hidden":!0})]})]})]})]})}async function Sn(e){try{const t=await Bh({data:{category:e.blogCategory}});if(t.length<=3)return t;const a=e.blogOffset%t.length;return[...t.slice(a),...t.slice(0,a)].slice(0,3)}catch{return[]}}
44function En(e){return ye({title:e.title,description:e.description})}const D3=[{title:"Master Certified Aquascape Contractor",body:"The only one in Central Iowa."},{title:"2023 Aquascape Contractor of the Year",body:"National recognition for our design and builds."},{title:"About 20 years in Central Iowa",body:"Locally owned and building water features here since 2004."}];function uL({area:e,articles:t}){const a=`/${e.slug}`,s=[...e.featured.map(c=>P0.find(u=>u.to===c)).filter(Boolean),...P0.filter(c=>!e.featured.includes(c.to))],o=$h.filter(c=>c.slug!==e.slug);return A.jsxs(A.Fragment,{children:[A.jsx(Lf,{data:yN({name:`Pond Builder in ${e.city}, Iowa`,pathname:a,description:e.description,serviceType:"Pond and water feature construction and maintenance",city:e.city})}),A.jsx(Lf,{data:bN(e.faqs)}),A.jsx(Lf,{data:vN([{name:"Home",pathname:"/"},{name:"Service Areas",pathname:"/service-areas"},{name:e.city,pathname:a}])}),A.jsxs("section",{className:"relative overflow-hidden",style:{minHeight:"min(62vh, 560px)"},children:[A.jsxs("div",{className:"absolute inset-0",children:[A.jsx("img",{src:e.hero,alt:e.heroAlt,className:"w-full h-full object-cover"}),A.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(15,25,17,0.6) 0%, rgba(15,25,17,0.5) 45%, rgba(15,25,17,0.88) 100%)"}})]}),A.jsxs("div",{className:"relative container-x flex flex-col justify-end",style:{minHeight:"min(62vh, 560px)",paddingTop:"calc(var(--header-h) + 2.5rem)",paddingBottom:"3.5rem",color:"#fff"},children:[A.jsxs("p",{className:"uppercase tracking-[0.25em] text-xs mb-4 inline-flex items-center gap-2",children:[A.jsx(v_,{size:14,"aria-hidden":!0})," Serving ",e.city," and Central Iowa"]}),A.jsx("h1",{style:{color:"#fff"},children:`Pond Builder in ${e.city}, Iowa`}),A.jsx("p",{className:"mt-5 max-w-2xl text-lg/relaxed opacity-95",children:e.intro}),A.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[A.jsxs(Ve,{to:"/contact",className:"btn btn-primary inline-flex items-center gap-2",children:["Get a Quote ",A.jsx(kr,{size:16,"aria-hidden":!0})]}),A.jsxs("a",{href:Dr,className:"btn btn-outline-white inline-flex items-center gap-2",children:[A.jsx(go,{size:16,"aria-hidden":!0})," Call ",Ka]})]})]})]}),A.jsx("section",{className:"py-16 md:py-20 bg-white",children:A.jsxs("div",{className:"container-x grid gap-12 lg:grid-cols-5",children:[A.jsxs("div",{className:"lg:col-span-3",children:[A.jsxs("p",{className:"uppercase tracking-[0.25em] text-xs mb-3",style:{color:"var(--green-primary)"},children:["Working in ",e.city]}),A.jsxs("h2",{children:["What to expect from Just Add Water in ",e.city]}),A.jsx("p",{className:"mt-5 text-[17px]/relaxed",style:{color:"var(--ink)"},children:e.local})]}),A.jsx("div",{className:"lg:col-span-2 grid gap-3",children:D3.map(c=>A.jsxs("div",{className:"p-5 flex gap-4",style:{background:"var(--cream)",border:"1px solid rgba(0,0,0,0.06)"},children:[A.jsx(g_,{size:22,"aria-hidden":!0,style:{color:"var(--green-primary)",flexShrink:0}}),A.jsxs("div",{children:[A.jsx("p",{className:"font-semibold",style:{color:"var(--ink)"},children:c.title}),A.jsx("p",{className:"text-sm mt-1",style:{color:"var(--muted-tone)"},children:c.body})]})]},c.title))})]})}),A.jsx("section",{className:"py-16 md:py-20",style:{background:"var(--cream)"},children:A.jsxs("div",{className:"container-x",children:[A.jsxs("div",{className:"max-w-2xl mb-10",children:[A.jsx("p",{className:"uppercase tracking-[0.25em] text-xs mb-3",style:{color:"var(--green-primary)"},children:"Services"}),A.jsxs("h2",{children:["Pond and water feature services in ",e.city]})]}),A.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:s.map(c=>A.jsxs(Ve,{to:c.to,className:"p-6 bg-white group",style:{border:"1px solid rgba(0,0,0,0.06)"},children:[A.jsxs("span",{className:"flex items-center justify-between font-semibold",style:{color:"var(--ink)"},children:[c.label,A.jsx(kr,{size:16,"aria-hidden":!0,style:{color:"var(--green-primary)"}})]}),A.jsx("span",{className:"block mt-2 text-sm/relaxed",style:{color:"var(--muted-tone)"},children:c.blurb})]},c.to))})]})}),A.jsx("section",{className:"py-16 md:py-20 bg-white",children:A.jsxs("div",{className:"container-x",children:[A.jsxs("div",{className:"max-w-2xl mb-10",children:[A.jsx("p",{className:"uppercase tracking-[0.25em] text-xs mb-3",style:{color:"var(--green-primary)"},children:"See our work nearby"}
44),A.jsxs("h2",{children:["Finished water features near ",e.city]})]}),A.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:e.nearby.map(c=>A.jsxs(Ve,{to:c.to,className:"p-6 group",style:{background:"var(--cream)",border:"1px solid rgba(0,0,0,0.06)"},children:[A.jsx("span",{className:"font-semibold block",style:{color:"var(--ink)"},children:c.label}),A.jsx("span",{className:"block mt-2 text-sm/relaxed",style:{color:"var(--muted-tone)"},children:c.note}),A.jsxs("span",{className:"mt-4 inline-flex items-center gap-1 text-sm font-semibold",style:{color:"var(--green-primary)"},children:["Take a look ",A.jsx(kr,{size:14,"aria-hidden":!0})]})]},c.to))})]})}),A.jsx("section",{className:"py-16 md:py-20",style:{background:"var(--cream)"},children:A.jsxs("div",{className:"container-x max-w-3xl",children:[A.jsx("p",{className:"uppercase tracking-[0.25em] text-xs mb-3",style:{color:"var(--green-primary)"},children:"FAQ"}),A.jsxs("h2",{children:["Pond questions from ",e.city," homeowners"]}),A.jsx("div",{className:"mt-8 grid gap-4",children:e.faqs.map(c=>A.jsxs("div",{className:"p-6 bg-white",style:{border:"1px solid rgba(0,0,0,0.06)"},children:[A.jsx("h3",{className:"text-lg",style:{color:"var(--ink)"},children:c.q}),A.jsx("p",{className:"mt-3 text-[16px]/relaxed",style:{color:"var(--ink)"},children:c.a})]},c.q))})]})}),t.length>0?A.jsx("section",{className:"py-16 md:py-20 bg-white",children:A.jsxs("div",{className:"container-x",children:[A.jsxs("div",{className:"max-w-2xl mb-10",children:[A.jsx("p",{className:"uppercase tracking-[0.25em] text-xs mb-3",style:{color:"var(--green-primary)"},children:"Knowledge Center"}),A.jsx("h2",{children:"Helpful reading before you start"})]}),A.jsx("div",{className:"grid gap-7 md:gap-8 sm:grid-cols-2 lg:grid-cols-3",children:t.map(c=>A.jsx(N3,{post:c},c.slug))})]})}):null,A.jsx("section",{className:"py-20 md:py-24",style:{background:"var(--green-deep)",color:"#fff"},children:A.jsxs("div",{className:"container-x max-w-3xl text-center",children:[A.jsxs("h2",{style:{color:"#fff"},children:["Ready for a pond in ",e.city,"?"]}),A.jsx("p",{className:"mt-5 text-[17px]/relaxed opacity-95",children:"Tell us about your yard and we will set up an on-site consultation with a clear quote."}),A.jsxs("div",{className:"mt-8 flex flex-wrap justify-center gap-3",children:[A.jsxs(Ve,{to:"/contact",className:"btn btn-primary inline-flex items-center gap-2",children:["Get a Quote ",A.jsx(kr,{size:16,"aria-hidden":!0})]}),A.jsxs("a",{href:Dr,className:"btn btn-outline-white inline-flex items-center gap-2",children:[A.jsx(go,{size:16,"aria-hidden":!0})," Call ",Ka]})]}),A.jsxs("p",{className:"mt-10 text-sm opacity-90",children:["Also serving:"," ",o.map((c,u)=>A.jsxs("span",{children:[A.jsx(Ve,{to:`/${c.slug}`,className:"underline",children:c.city}),u<o.length-1?", ":""]},c.slug))]})]})})]})}const L3=()=>oe(()=>import("./pond-builder-altoona-DORF-6wb.js"),[]),M3=le()({loader:()=>Sn(B0),head:()=>En(B0),component:se(L3,"component")}),q0=_n("pond-builder-ames"),P3=()=>oe(()=>import("./pond-builder-ames-C1DbVsTD.js"),[]),U3=le()({loader:()=>Sn(q0),head:()=>En(q0),component:se(P3,"component")}),H0=_n("pond-builder-ankeny"),I3=()=>oe(()=>import("./pond-builder-ankeny-CE9vkO2z.js"),[]),z3=le()({loader:()=>Sn(H0),head:()=>En(H0),component:se(I3,"component")}),G0=_n("pond-builder-clive"),$3=()=>oe(()=>import("./pond-builder-clive-ADCCFgF2.js"),[]),B3=le()({loader:()=>Sn(G0),head:()=>En(G0),component:se($3,"component")}),V0=_n("pond-builder-des-moines"),q3=()=>oe(()=>import("./pond-builder-des-moines-DAbubuLC.js"),[]),H3=le()({loader:()=>Sn(V0),head:()=>En(V0),component:se(q3,"component")}),F0=_n("pond-builder-grimes"),G3=()=>oe(()=>import("./pond-builder-grimes-CxsQW765.js"),[]),V3=le()({loader:()=>Sn(F0),head:()=>En(F0),component:se(G3,"component")}),J0=_n("pond-builder-indianola"),F3=()=>oe(()=>import("./pond-builder-indianola--z6KeUjW.js"),[]),J3=le()({loader:()=>Sn(J0),head:()=>En(J0),component:se(F3,"component")}),W0=_n("pond-builder-johnston"),W3=()=>oe(()=>import("./pond-builder-johnston-CfS0xS5g.js"),[]),K3=le()({loader:()=>Sn(W0),head:()=>En(W0),component:se(W3,"component")}),K0=_n("pond-builder-urbandale"),Y3=()=>
44oe(()=>import("./pond-builder-urbandale-D9op6H-k.js"),[]),Q3=le()({loader:()=>Sn(K0),head:()=>En(K0),component:se(Y3,"component")}),Y0=_n("pond-builder-waukee"),X3=()=>oe(()=>import("./pond-builder-waukee-C9v5ad7I.js"),[]),Z3=le()({loader:()=>Sn(Y0),head:()=>En(Y0),component:se(X3,"component")}),Q0=_n("pond-builder-west-des-moines"),eD=()=>oe(()=>import("./pond-builder-west-des-moines-CbFZBvtH.js"),[]),tD=le()({loader:()=>Sn(Q0),head:()=>En(Q0),component:se(eD,"component")}),nD=le()({beforeLoad:()=>{throw Mt({to:"/ponds",statusCode:301})}}),aD=le()({beforeLoad:()=>{throw Mt({to:"/repairs",statusCode:301})}}),rD=()=>oe(()=>import("./pond-tours-aT52hhIb.js"),__vite__mapDeps([40,13,25,15])),sD=le()({head:()=>ye({title:"Pond Tours and Events in Central Iowa | Just Add Water",description:"Upcoming Just Add Water tours, classes, and community events across Central Iowa, plus self-guided display pond locations open year-round.",image:"/__l5e/assets-v1/e195e7b4-bcc8-4de9-871c-4ab43a87beda/pond-waterfall-public-space.webp"}),component:se(rD,"component")}),iD=()=>oe(()=>import("./ponds-CAe0nRXa.js"),__vite__mapDeps([41,27,2,8,1,10,28,29,3,4,15])),oD=le()({head:()=>ye({title:"Custom Ponds in Des Moines and Central Iowa | Just Add Water",description:"Custom pond construction and renovation across Central Iowa by Just Add Water, the region's Master Certified Aquascape Contractor.",image:"https://just.btiapps.com/__l5e/assets-v1/62196869-1e62-42ed-b254-a7ba28267528/Pond-Renovation-Des-Moines-After.webp"}),component:se(iD,"component")}),lD=()=>oe(()=>import("./portfolio-DCsgJESM.js"),__vite__mapDeps([42,1,8,2,28])),cD=le()({head:()=>ye({title:"Pond and Water Feature Portfolio | Just Add Water, Iowa",description:"Browse recent ponds, pondless waterfalls, fountains, and renovations Just Add Water has designed and built across Central Iowa.",image:"/__l5e/assets-v1/de599443-a923-4215-bd35-bf313d3fbefc/AnkenyGardenPond-8.jpg"}),component:se(lD,"component")}),uD=()=>oe(()=>import("./privacy-policy-DfHAQeru.js"),[]),dD=le()({head:()=>ye({title:"Privacy Policy | Just Add Water",description:"How Just Add Water, a Des Moines pond and water feature contractor, collects, uses, and protects the information you share on our website."}),component:se(uD,"component")}),fD=()=>oe(()=>import("./project-highlights-DmeKguh5.js"),[]),hD=le()({head:()=>ye({title:"Featured Pond Projects in Central Iowa | Just Add Water",description:"A closer look at favorite Just Add Water pond, waterfall, and water feature transformations across Des Moines, Ankeny, and Central Iowa.",image:"/__l5e/assets-v1/de599443-a923-4215-bd35-bf313d3fbefc/AnkenyGardenPond-8.jpg"}),component:se(fD,"component")}),pD=()=>oe(()=>import("./recreational-ponds-tHABLVEp.js"),__vite__mapDeps([43,27,2,8,1,10,28,29,3,4,15])),mD=le()({head:()=>ye({title:"Recreational Ponds and Natural Swim Ponds in Central Iowa | Just Add Water",description:"Recreational ponds built across Des Moines and Central Iowa by Just Add Water. Chemical-free natural swim ponds for family swimming and relaxing at home.",image:"https://just.btiapps.com/__l5e/assets-v1/0f03e24a-3263-4ec3-a027-ad0a917e4769/header-just-add-water-recreational-pond.webp"}),component:se(pD,"component")}),gD=()=>oe(()=>import("./repairs-vx_av8pw.js"),__vite__mapDeps([44,27,2,8,1,10,28,29,3,4,15])),yD=le()({head:()=>ye({title:"Pond Repair and Leak Inspection, Central Iowa | Just Add Water",description:"Expert pond repair across Central Iowa. Leak inspection, pump replacement, filtration upgrades, and more by Just Add Water.",image:"https://just.btiapps.com/__l5e/assets-v1/b32df03e-49e9-4940-bb01-bc69f69691c0/header-pond-repair-1.webp"}),component:se(gD,"component")}),vD=le()({beforeLoad:()=>{throw Mt({to:"/blog",statusCode:301})}}),bD=()=>oe(()=>import("./reviews-DOvTP0Te.js"),__vite__mapDeps([45,1])),wD=le()({head:()=>ye({title:"Just Add Water Reviews | Central Iowa Pond Builder",description:"Read Google reviews from homeowners across Des Moines and Central Iowa about working with Just Add Water on their ponds and water features.",image:"/__l5e/assets-v1/bfa29429-5082-473b-b6cf-a74e792eff60/just-add-water-owner.webp"}),component:se(bD,"component")}),_D=()=>oe(()=>import("./service-areas-Dmt55NN1.js"),[]),SD=le()({head:()=>ye({title:"Service Areas in Central Iowa | Just Add Water",description:"Just Add Water builds and maintains ponds and water features in Des Moines, Ankeny, Johnston, Ames, and more Central Iowa cities."}),component:se(_D,"component")}),ED=()=>oe(()=>import("./terms-of-service-DR8s8C5s.js"),[]),AD=le()({head:()=>ye({title:"Terms of Service | Just Add Water",description:"The terms that govern your use of the Just Add Water website, estimates, and pond and water feature services in Central Iowa."}),component:se(ED,"component")}),TD=()=>oe(()=>import("./thank-you-CbZj_Jmc.js"),[]),RD=le()({head:()=>
44ye({title:"Thank You | Just Add Water",description:"Thank you for getting in touch with Just Add Water. We will be in contact soon.",noindex:!0}),component:se(TD,"component")}),CD=()=>oe(()=>import("./tranquil-backyard-escape-CQARJwrD.js"),__vite__mapDeps([46,18,8,10,14,15])),OD=le()({head:()=>ye({title:"Tranquil Backyard Escape, Polk City | Just Add Water",description:"See how Just Add Water built a relaxing ecosystem pond and waterfall retreat for a Polk City, Iowa backyard, from first design to finished feature.",image:"/__l5e/assets-v1/94e67f9c-dc29-4544-a135-94bfa35d178c/3-After-scaled.jpg"}),component:se(CD,"component")}),xD=()=>oe(()=>import("./transforming-outdoor-spaces-CIF1YUg-.js"),__vite__mapDeps([47,18,8,10,14,15])),kD=le()({head:()=>ye({title:"Pond Restoration, Des Moines | Just Add Water",description:"See how Just Add Water restored a neglected Des Moines pond to a clean, healthy water feature, with before and after photos of the renovation.",image:"/__l5e/assets-v1/932a1ff2-ff21-4458-816a-09902225538d/Transforming-Outdoor-Spaces-First-Cleaning-in-10-Years2025-04-03-at-5.04.48-PM-2-1024x768.jpg"}),component:se(xD,"component")}),jD=()=>oe(()=>import("./videos-D3AAK1Cv.js"),__vite__mapDeps([48,29])),ND=le()({head:()=>ye({title:"Pond and Water Feature Videos | Just Add Water, Iowa",description:"Watch how Just Add Water builds, repairs, and cares for water features across Central Iowa. Project walkthroughs, how-tos, and transformations.",image:"/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp"}),component:se(jD,"component")}),DD=()=>oe(()=>import("./water-feature-maintenance-9azdTdbu.js"),__vite__mapDeps([49,27,2,8,1,10,28,29,3,4,15])),LD=le()({head:()=>ye({title:"Pond Maintenance Plans in Central Iowa | Just Add Water",description:"Seasonal pond maintenance across Central Iowa. Spring cleanouts, fall cleaning, water treatments, and year-round care by Just Add Water.",image:"https://just.btiapps.com/__l5e/assets-v1/c6402517-2bee-4cc6-ad5a-aae04aba2e52/header-pond-maintenance.webp"}),component:se(DD,"component")}),MD=()=>oe(()=>import("./where-to-see-our-work-36a__EKg.js"),[]),PD=le()({head:()=>ye({title:"See Display Ponds in Central Iowa | Just Add Water",description:"Visit Just Add Water display ponds and waterfalls at garden centers and our Des Moines office to hear and feel a real water feature before you build.",image:"https://just.btiapps.com/__l5e/assets-v1/cc5dd1dc-fbfa-4557-ab58-6d465767bdab/DisplayFeatures-09-min-1024x576.jpg"}),component:se(MD,"component")}),UD=()=>oe(()=>import("./admin.leads-CSUHB2c5.js"),__vite__mapDeps([50,13])),ID=le()({head:()=>ye({title:"Leads | Just Add Water Admin",description:"Internal admin view of every Just Add Water lead: contact requests, careers applications, and Backyard Visualizer designs.",noindex:!0}),component:se(UD,"component")}),zD=()=>oe(()=>import("./blog.index-DiT71nRZ.js"),[]),$D=()=>oe(()=>import("./blog.index-C3xO_ytS.js"),[]),BD=le()({loader:async()=>({posts:await Bh({data:{}})}),head:()=>ye({title:"Pond Care and Building Blog | Just Add Water, Central Iowa",description:"Pond building, cost, and seasonal care advice for Central Iowa homeowners from Just Add Water, the region's Master Certified Aquascape Contractor.",image:"/__l5e/assets-v1/33d4fd82-7d49-4706-a395-57426ea3d218/pondless-waterfall.webp"}),component:se($D,"component"),errorComponent:se(zD,"errorComponent")}),qD=()=>oe(()=>import("./blog._slug-DbZvklMh.js"),[]),HD=()=>oe(()=>import("./blog._slug-BnPzk5-t.js"),[]),GD=()=>oe(()=>import("./blog._slug-DCr3KJe8.js"),[]),VD=le()({loader:async({params:e})=>{const t=e.slug;if(x3(t)){const s=O_(t),o=await Bh({data:{category:t}});return{category:s,posts:o}}const a=await qh({data:{slug:t}});if(a.kind!=="missing"&&(a.kind==="post"?a.post.legacy_root_url:a.legacy_root_url)){const s=a.kind==="post"?a.post.slug:a.slug;throw Mt({to:"/$slug",params:{slug:s},statusCode:301})}throw a.kind==="post"?Mt({to:"/blog/$category/$slug",params:{category:a.post.category,slug:a.post.slug},statusCode:301}):a.kind==="redirect"?Mt({to:"/blog/$category/$slug",params:{category:a.category,slug:a.slug},statusCode:301}):fh()},head:({loaderData:e})=>
44{if(!e)return ye({title:"Pond Care Articles | Just Add Water",description:"Pond and water feature advice for Central Iowa homeowners from Just Add Water.",noindex:!0});const t=e.category;return ye({title:`${t.name} Articles | Just Add Water Pond Blog`,description:`${t.description} Advice for Central Iowa pond owners from Just Add Water.`,image:t.hero,imageAlt:`${t.name} articles from Just Add Water`})},component:se(GD,"component"),notFoundComponent:se(HD,"notFoundComponent"),errorComponent:se(qD,"errorComponent")}),FD=()=>oe(()=>import("./blog._category._slug-XlIKZGR8.js"),[]),JD=()=>oe(()=>import("./blog._category._slug-XKyUwWc2.js"),[]),WD=()=>oe(()=>import("./blog._category._slug-DvwmeDR4.js"),__vite__mapDeps([51,6])),KD=le()({loader:async({params:e})=>{const t=await qh({data:{slug:e.slug}});if(t.kind==="redirect"&&t.legacy_root_url)throw Mt({to:"/$slug",params:{slug:t.slug},statusCode:301});if(t.kind==="redirect")throw Mt({to:"/blog/$category/$slug",params:{category:t.category,slug:t.slug},statusCode:301});if(t.kind==="missing")throw fh();if(t.post.legacy_root_url)throw Mt({to:"/$slug",params:{slug:t.post.slug},statusCode:301});if(t.post.category!==e.category)throw Mt({to:"/blog/$category/$slug",params:{category:t.post.category,slug:t.post.slug},statusCode:301});return{post:t.post,related:t.related}},head:({loaderData:e})=>{if(!e)return ye({title:"Pond Care Article | Just Add Water",description:"Pond and water feature advice for Central Iowa homeowners from Just Add Water.",noindex:!0});const t=e.post,a=ye({title:t.seo_title||`${t.title} | Just Add Water`,description:t.meta_description||t.excerpt||"Pond and water feature advice for Central Iowa homeowners from Just Add Water.",image:t.hero_image??void 0,imageAlt:t.hero_alt||t.title,type:"article"});return t.published_date&&a.meta.push({property:"article:published_time",content:t.published_date}),t.updated_date&&a.meta.push({property:"article:modified_time",content:t.updated_date}),a},component:se(WD,"component"),notFoundComponent:se(JD,"notFoundComponent"),errorComponent:se(FD,"errorComponent")}),YD=NN.update({id:"/",path:"/",getParentRoute:()=>ie}),QD=PN.update({id:"/$slug",path:"/$slug",getParentRoute:()=>ie}),XD=IN.update({id:"/about-us",path:"/about-us",getParentRoute:()=>ie}),ZD=$N.update({id:"/awards",path:"/awards",getParentRoute:()=>ie}),e4=qN.update({id:"/backyard-visualizer",path:"/backyard-visualizer",getParentRoute:()=>ie}),t4=GN.update({id:"/bellaire-project",path:"/bellaire-project",getParentRoute:()=>ie}),n4=FN.update({id:"/bringing-colorado-to-iowa",path:"/bringing-colorado-to-iowa",getParentRoute:()=>ie}),a4=WN.update({id:"/canoyer-garden-center-ankeny",path:"/canoyer-garden-center-ankeny",getParentRoute:()=>ie}),r4=YN.update({id:"/canoyer-garden-center-grimes",path:"/canoyer-garden-center-grimes",getParentRoute:()=>ie}),s4=XN.update({id:"/careers",path:"/careers",getParentRoute:()=>ie}),i4=e3.update({id:"/cleaning-services",path:"/cleaning-services",getParentRoute:()=>ie}),o4=n3.update({id:"/contact",path:"/contact",getParentRoute:()=>ie}),l4=r3.update({id:"/created-in-johnston",path:"/created-in-johnston",getParentRoute:()=>ie}),c4=s3.update({id:"/dirt-bottom-ponds",path:"/dirt-bottom-ponds",getParentRoute:()=>ie}),u4=o3.update({id:"/dore-project",path:"/dore-project",getParentRoute:()=>ie}),d4=l3.update({id:"/exploratory-drain-and-clean",path:"/exploratory-drain-and-clean",getParentRoute:()=>ie}),f4=u3.update({id:"/faq",path:"/faq",getParentRoute:()=>ie}),h4=f3.update({id:"/fountainscapes-and-pondless-water-features",path:"/fountainscapes-and-pondless-water-features",getParentRoute:()=>ie}),p4=p3.update({id:"/guide",path:"/guide",getParentRoute:()=>ie}),m4=g3.update({id:"/lighting",path:"/lighting",getParentRoute:()=>ie}),g4=_3.update({id:"/new-to-your-water-feature",path:"/new-to-your-water-feature",getParentRoute:()=>ie}),y4=E3.update({id:"/office-displays",path:"/office-displays",getParentRoute:()=>ie}),v4=T3.update({id:"/our-process",path:"/our-process",getParentRoute:()=>ie}),b4=C3.update({id:"/perennial-gardens",path:"/perennial-gardens",getParentRoute:()=>ie}),w4=M3.update({id:"/pond-builder-altoona",path:"/pond-builder-altoona",getParentRoute:()=>ie}),_4=U3.update({id:"/pond-builder-ames",path:"/pond-builder-ames",getParentRoute:()=>ie}),S4=z3.update({id:"/pond-builder-ankeny",path:"/pond-builder-ankeny",getParentRoute:()=>ie}),E4=B3.update({id:"/pond-builder-clive",path:"/pond-builder-clive",getParentRoute:()=>ie}),A4=H3.update({id:"/pond-builder-des-moines",path:"/pond-builder-des-moines",getParentRoute:()=>ie}),T4=V3.update({id:"/pond-builder-grimes",path:"/pond-builder-grimes",getParentRoute:()=>ie}),R4=J3.update({id:"/pond-builder-indianola",path:"/pond-builder-indianola",getParentRoute:()=>ie}),C4=K3.update({id:"/pond-builder-johnston",path:"/pond-builder-johnston",getParentRoute:()=>ie}),O4=Q3.update({id:"/pond-builder-urbandale",path:"/pond-builder-urbandale",getParentRoute:()=>ie}),x4=Z3.update({id:"/pond-builder-waukee",path:"/pond-builder-waukee",getParentRoute:()=>ie}),k4=tD.update({id:"/pond-builder-west-des-moines",path:"/pond-builder-west-des-moines",getParentRoute:()=>ie}),j4=nD.update({id:"/pond-construction-and-renovation",path:"/pond-construction-and-renovation",getParentRoute:()=>ie}),N4=aD.update({id:"/pond-repair",path:"/pond-repair",getParentRoute:()=>ie}),D4=sD.update({id:"/pond-tours",path:"/pond-tours",getParentRoute:()=>ie}),L4=oD.update({id:"/ponds",path:"/ponds",getParentRoute:()=>ie}),M4=cD.update({id:"/portfolio",path:"/portfolio",getParentRoute:()=>ie}),P4=dD.update({id:"/privacy-policy",path:"/privacy-policy",getParentRoute:()=>ie}),U4=hD.update({id:"/project-highlights",path:"/project-highlights",getParentRoute:()=>ie}),I4=mD.update({id:"/recreational-ponds",path:"/recreational-ponds",getParentRoute:()=>ie}),z4=yD.update({id:"/repairs",path:"/repairs",getParentRoute:()=>ie}),$4=vD.update({id:"/resources",path:"/resources",getParentRoute:()=>ie}),B4=wD.update({id:"/reviews",path:"/reviews",getParentRoute:()=>ie}),q4=SD.update({id:"/service-areas",path:"/service-areas",getParentRoute:()=>ie}),H4=AD.update({id:"/terms-of-service",path:"/terms-of-service",getParentRoute:()=>ie}),G4=RD.update({id:"/thank-you",path:"/thank-you",getParentRoute:()=>ie}),V4=OD.update({id:"/tranquil-backyard-escape",path:"/tranquil-backyard-escape",getParentRoute:()=>ie}),F4=kD.update({id:"/transforming-outdoor-spaces",path:"/transforming-outdoor-spaces",getParentRoute:()=>ie}
44),J4=ND.update({id:"/videos",path:"/videos",getParentRoute:()=>ie}),W4=LD.update({id:"/water-feature-maintenance",path:"/water-feature-maintenance",getParentRoute:()=>ie}),K4=PD.update({id:"/where-to-see-our-work",path:"/where-to-see-our-work",getParentRoute:()=>ie}),Y4=ID.update({id:"/admin/leads",path:"/admin/leads",getParentRoute:()=>ie}),Q4=BD.update({id:"/blog/",path:"/blog/",getParentRoute:()=>ie}),X4=VD.update({id:"/blog/$slug",path:"/blog/$slug",getParentRoute:()=>ie}),Z4=KD.update({id:"/blog/$category/$slug",path:"/blog/$category/$slug",getParentRoute:()=>ie}),eL={IndexRoute:YD,SlugRoute:QD,AboutUsRoute:XD,AwardsRoute:ZD,BackyardVisualizerRoute:e4,BellaireProjectRoute:t4,BringingColoradoToIowaRoute:n4,CanoyerGardenCenterAnkenyRoute:a4,CanoyerGardenCenterGrimesRoute:r4,CareersRoute:s4,CleaningServicesRoute:i4,ContactRoute:o4,CreatedInJohnstonRoute:l4,DirtBottomPondsRoute:c4,DoreProjectRoute:u4,ExploratoryDrainAndCleanRoute:d4,FaqRoute:f4,FountainscapesAndPondlessWaterFeaturesRoute:h4,GuideRoute:p4,LightingRoute:m4,NewToYourWaterFeatureRoute:g4,OfficeDisplaysRoute:y4,OurProcessRoute:v4,PerennialGardensRoute:b4,PondBuilderAltoonaRoute:w4,PondBuilderAmesRoute:_4,PondBuilderAnkenyRoute:S4,PondBuilderCliveRoute:E4,PondBuilderDesMoinesRoute:A4,PondBuilderGrimesRoute:T4,PondBuilderIndianolaRoute:R4,PondBuilderJohnstonRoute:C4,PondBuilderUrbandaleRoute:O4,PondBuilderWaukeeRoute:x4,PondBuilderWestDesMoinesRoute:k4,PondConstructionAndRenovationRoute:j4,PondRepairRoute:N4,PondToursRoute:D4,PondsRoute:L4,PortfolioRoute:M4,PrivacyPolicyRoute:P4,ProjectHighlightsRoute:U4,RecreationalPondsRoute:I4,RepairsRoute:z4,ResourcesRoute:$4,ReviewsRoute:B4,ServiceAreasRoute:q4,TermsOfServiceRoute:H4,ThankYouRoute:G4,TranquilBackyardEscapeRoute:V4,TransformingOutdoorSpacesRoute:F4,VideosRoute:J4,WaterFeatureMaintenanceRoute:W4,WhereToSeeOurWorkRoute:K4,AdminLeadsRoute:Y4,BlogSlugRoute:X4,BlogIndexRoute:Q4,BlogCategorySlugRoute:Z4},tL=ie._addFileChildren(eL),nL=()=>{const e=new vj;return hO({routeTree:tL,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function aL(){const e=await nL();let t;if(T0){const a=await T0.getOptions();a.serializationAdapters=a.serializationAdapters??[],window.__TSS_START_OPTIONS__=a,t=a.serializationAdapters,e.options.defaultSsr=a.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(SC),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.ids.get().length||await f1(e),e}var rL=aL;function sL(){return rL().finally(()=>window.$_TSR?.h())}var If;function iL(){return If||(If=sL()),A.jsx(AC,{promise:If,children:e=>A.jsx(gO,{router:e})})}X.startTransition(()=>{lA.hydrateRoot(document,A.jsx(X.StrictMode,{children:A.jsx(iL,{})}))});export{Q3 as $,kr as A,J3 as B,y_ as C,v3 as D,J0 as E,k3 as F,O3 as G,y3 as H,N3 as I,Lf as J,w_ as K,Ve as L,v_ as M,Ka as N,Dr as O,go as P,St as Q,PN as R,uL as S,hh as T,cL as U,yN as V,bN as W,b_ as X,p_ as Y,K3 as Z,W0 as _,lL as a,K0 as a0,Z3 as a1,Y0 as a2,tD as a3,Q0 as a4,Fj as a5,$h as a6,Cr as a7,BD as a8,C_ as a9,VD as aa,KD as ab,vN as b,wn as c,g_ as d,Ki as e,jh as f,O_ as g,zj as h,Cc as i,A as j,M3 as k,B0 as l,U3 as m,q0 as n,z3 as o,H0 as p,B3 as q,X as r,qk as s,Mf as t,Aw as u,G0 as v,H3 as w,V0 as x,V3 as y,F0 as z};

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.