vendor: 4,649 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/unsubscribe-1h6MvP0O.js","assets/subscribers.functions-MiTrTGuK.js","assets/search-console-GxrU2Q52.js","assets/textarea-DgOSO4I1.js","assets/reviews-V58LmWmJ.js","assets/SectionHeader-CazXLWae.js","assets/TestimonialsCarousel-CSd1hR6o.js","assets/index-Bt7NZjjO.js","assets/CTABand-Bc3IUT_4.js","assets/arrow-right-DfgvXmZt.js","assets/quote-DkB6fqsl.js","assets/check-COtUBbCA.js","assets/gallery-Cq-lc6EW.js","assets/gallery-11-C1NS5aRS.js","assets/contact-CuphDQB4.js","assets/admin-CMqJzp-H.js","assets/trash-2-C0KewGYO.js","assets/circle-check-Cwl-1yfe.js","assets/sparkles-CpR5otrd.js","assets/about-XS4LHcgu.js","assets/index-CAoTobol.js","assets/FAQ-1CUA9qdI.js","assets/index-gXeFw5pu.js","assets/landscaping.index-DflMOx4Q.js","assets/index-DYBjTMla.js","assets/useSuspenseQuery-CYve6Ans.js","assets/_slug-BbB1maCX.js","assets/landscaping._area-C3JWxk8v.js","assets/admin-DuIIJiUY.js","assets/_slug-adtSNb83.js"])))=>i.map(i=>d[i]); 2function rT(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(a,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function sT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pd={exports:{}},Ji={};var Ky;function aT(){if(Ky)return Ji;Ky=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var h in o)h!=="key"&&(u[h]=o[h])}else u=o;return o=u.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:u}}return Ji.Fragment=t,Ji.jsx=n,Ji.jsxs=n,Ji}var Jy;function iT(){return Jy||(Jy=1,pd.exports=aT()),pd.exports}var z=iT(),gd={exports:{}},fe={};var Yy;function oT(){if(Yy)return fe;Yy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=b&&C[b]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function O(C,G,W){this.props=C,this.context=G,this.refs=E,this.updater=W||w}O.prototype.isReactComponent={},O.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,G,"setState")},O.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function N(){}N.prototype=O.prototype;function j(C,G,W){this.props=C,this.context=G,this.refs=E,this.updater=W||w}var D=j.prototype=new N;D.constructor=j,A(D,O.prototype),D.isPureReactComponent=!0;var K=Array.isArray;function J(){}var I={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function Y(C,G,W){var te=W.ref;return{$$typeof:e,type:C,key:G,ref:te!==void 0?te:null,props:W}}function oe(C,G){return Y(C.type,G,C.props)}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ge(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(W){return G[W]})}var Te=/\/+/g;function rt(C,G){return typeof C=="object"&&C!==null&&C.key!=null?ge(""+C.key):G.toString(36)}function Ze(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(J,J):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function B(C,G,W,te,ie){var ve=typeof C;(ve==="undefined"||ve==="boolean")&&(C=null);var Re=!1;if(C===null)Re=!0;else switch(ve){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(C.$$typeof){case e:case t:Re=!0;break;case m:return Re=C._init,B(Re(C._payload),G,W,te,ie)}}if(Re)return ie=ie(C),Re=te===""?"."+rt(C,0):te,K(ie)?(W="",Re!=null&&(W=Re.replace(Te,"$&/")+"/"),B(ie,G,W,"",function(Hn){return Hn}
vendor: 7,586 bytes, line 2
2)):ie!=null&&(se(ie)&&(ie=oe(ie,W+(ie.key==null||C&&C.key===ie.key?"":(""+ie.key).replace(Te,"$&/")+"/")+Re)),G.push(ie)),1;Re=0;var st=te===""?".":te+":";if(K(C))for(var Ue=0;Ue<C.length;Ue++)te=C[Ue],ve=st+rt(te,Ue),Re+=B(te,G,W,ve,ie);else if(Ue=_(C),typeof Ue=="function")for(C=Ue.call(C),Ue=0;!(te=C.next()).done;)te=te.value,ve=st+rt(te,Ue++),Re+=B(te,G,W,ve,ie);else if(ve==="object"){if(typeof C.then=="function")return B(Ze(C),G,W,te,ie);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Re}function Q(C,G,W){if(C==null)return C;var te=[],ie=0;return B(C,te,"","",function(ve){return G.call(W,ve,ie++)}),te}function ce(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(W){(C._status===0||C._status===-1)&&(C._status=1,C._result=W)},function(W){(C._status===0||C._status===-1)&&(C._status=2,C._result=W)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var ke=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},je={map:Q,forEach:function(C,G,W){Q(C,function(){G.apply(this,arguments)},W)},count:function(C){var G=0;return Q(C,function(){G++}),G},toArray:function(C){return Q(C,function(G){return G})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return fe.Activity=y,fe.Children=je,fe.Component=O,fe.Fragment=n,fe.Profiler=o,fe.PureComponent=j,fe.StrictMode=a,fe.Suspense=f,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,fe.__COMPILER_RUNTIME={__proto__:null,c:function(C){return I.H.useMemoCache(C)}},fe.cache=function(C){return function(){return C.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(C,G,W){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var te=A({},C.props),ie=C.key;if(G!=null)for(ve in G.key!==void 0&&(ie=""+G.key),G)!F.call(G,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&G.ref===void 0||(te[ve]=G[ve]);var ve=arguments.length-2;if(ve===1)te.children=W;else if(1<ve){for(var Re=Array(ve),st=0;st<ve;st++)Re[st]=arguments[st+2];te.children=Re}return Y(C.type,ie,te)},fe.createContext=function(C){return C={$$typeof:c,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},fe.createElement=function(C,G,W){var te,ie={},ve=null;if(G!=null)for(te in G.key!==void 0&&(ve=""+G.key),G)F.call(G,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ie[te]=G[te]);var Re=arguments.length-2;if(Re===1)ie.children=W;else if(1<Re){for(var st=Array(Re),Ue=0;Ue<Re;Ue++)st[Ue]=arguments[Ue+2];ie.children=st}if(C&&C.defaultProps)for(te in Re=C.defaultProps,Re)ie[te]===void 0&&(ie[te]=Re[te]);return Y(C,ve,ie)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(C){return{$$typeof:h,render:C}},fe.isValidElement=se,fe.lazy=function(C){return{$$typeof:m,_payload:{_status:-1,_result:C},_init:ce}},fe.memo=function(C,G){return{$$typeof:g,type:C,compare:G===void 0?null:G}},fe.startTransition=function(C){var G=I.T,W={};I.T=W;try{var te=C(),ie=I.S;ie!==null&&ie(W,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(J,ke)}catch(ve){ke(ve)}finally{G!==null&&W.types!==null&&(G.types=W.types),I.T=G}},fe.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},fe.use=function(C){return I.H.use(C)},fe.useActionState=function(C,G,W){return I.H.useActionState(C,G,W)},fe.useCallback=function(C,G){return I.H.useCallback(C,G)},fe.useContext=function(C){return I.H.useContext(C)},fe.useDebugValue=function(){},fe.useDeferredValue=function(C,G){return I.H.useDeferredValue(C,G)},fe.useEffect=function(C,G){return I.H.useEffect(C,G)},fe.useEffectEvent=function(C){return I.H.useEffectEvent(C)},fe.useId=function(){return I.H.useId()},fe.useImperativeHandle=function(C,G,W){return I.H.useImperativeHandle(C,G,W)},fe.useInsertionEffect=function(C,G){return I.H.useInsertionEffect(C,G)},fe.useLayoutEffect=function(C,G){return I.H.useLayoutEffect(C,G)},fe.useMemo=function(C,G){return I.H.useMemo(C,G)},fe.useOptimistic=function(C,G){return I.H.useOptimistic(C,G)},fe.useReducer=function(C,G,W){return I.H.useReducer(C,G,W)},fe.useRef=function(C){return I.H.useRef(C)},fe.useState=function(C){return I.H.useState(C)},fe.useSyncExternalStore=function(C,G,W){return I.H.useSyncExternalStore(C,G,W)},fe.useTransition=function(){return I.H.useTransition()},fe.version="19.2.5",fe}var Qy;function xo(){return Qy||(Qy=1,gd.exports=oT()),gd.exports}var X=xo();const Va=sT(X),AU=rT({__proto__:null,default:Va},[X]);var md={exports:{}},Yi={},yd={exports:{}},vd={};var Xy;function lT(){return Xy||(Xy=1,(function(e){function t(B,Q){var ce=B.length;B.push(Q);e:for(;0<ce;){var ke=ce-1>>>1,je=B[ke];if(0<o(je,Q))B[ke]=Q,B[ce]=je,ce=ke;else break e}}function n(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Q=B[0],ce=B.pop();if(ce!==Q){B[0]=ce;e:for(var ke=0,je=B.length,C=je>>>1;ke<C;){var G=2*(ke+1)-1,W=B[G],te=G+1,ie=B[te];if(0>o(W,ce))te<je&&0>o(ie,W)?(B[ke]=ie,B[te]=ce,ke=te):(B[ke]=W,B[G]=ce,ke=G);else if(te<je&&0>o(ie,ce))B[ke]=ie,B[te]=ce,ke=te;else break e}}return Q}function o(B,Q){var ce=B.sortIndex-Q.sortIndex;return ce!==0?ce:B.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var f=[],g=[],m=1,y=null,b=3,_=!1,w=!1,A=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function D(B){for(var Q=n(g);Q!==null;){if(Q.callback===null)a(g);else if(Q.startTime<=B)a(g),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=n(g)}}function K(B){if(A=!1,D(B),!w)if(n(f)!==null)w=!0,J||(J=!0,ge());else{var Q=n(g);Q!==null&&Ze(K,Q.startTime-B)}}var J=!1,I=-1,F=5,Y=-1;function oe(){return E?!0:!(e.unstable_now()-Y<F)}function se(){if(E=!1,J){var B=e.unstable_now();Y=B;var Q=!0;try{e:{w=!1,A&&(A=!1,N(I),I=-1),_=!0;var ce=b;try{t:{for(D(B),y=n(f);y!==null&&!(y.expirationTime>B&&oe());){var ke=y.callback;if(typeof ke=="function"){y.callback=null,b=y.priorityLevel;var je=ke(y.expirationTime<=B);if(B=e.unstable_now(),typeof je=="function"){y.callback=je,D(B),Q=!0;break t}y===n(f)&&a(f),D(B)}else a(f);y=n(f)}if(y!==null)Q=!0;else{var C=n(g);C!==null&&Ze(K,C.startTime-B),Q=!1}}break e}finally{y=null,b=ce,_=!1}Q=void 0}}finally{Q?ge():J=!1}}}var ge;if(typeof j=="function")ge=function(){j(se)};else if(typeof MessageChannel<"u"){var Te=new MessageChannel,rt=Te.port2;Te.port1.onmessage=se,ge=function(){rt.postMessage(null)}}else ge=function(){O(se,0)};function Ze(B,Q){I=O(function(){B(e.unstable_now())},Q)}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(B){B.
vendor: 6,004 bytes, line 2
2callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var ce=b;b=Q;try{return B()}finally{b=ce}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ce=b;b=B;try{return Q()}finally{b=ce}},e.unstable_scheduleCallback=function(B,Q,ce){var ke=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ke+ce:ke):ce=ke,B){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ce+je,B={id:m++,callback:Q,priorityLevel:B,startTime:ce,expirationTime:je,sortIndex:-1},ce>ke?(B.sortIndex=ce,t(g,B),n(f)===null&&B===n(g)&&(A?(N(I),I=-1):A=!0,Ze(K,ce-ke))):(B.sortIndex=je,t(f,B),w||_||(w=!0,J||(J=!0,ge()))),B},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(B){var Q=b;return function(){var ce=b;b=Q;try{return B.apply(this,arguments)}finally{b=ce}}}})(vd)),vd}var Wy;function uT(){return Wy||(Wy=1,yd.exports=lT()),yd.exports}var bd={exports:{}},Pt={};var ev;function cT(){if(ev)return Pt;ev=1;var e=xo();function t(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(f,g,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:f,containerInfo:g,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(f,g){if(f==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Pt.createPortal=function(f,g){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return u(f,g,null,m)},Pt.flushSync=function(f){var g=c.T,m=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=g,a.p=m,a.d.f()}},Pt.preconnect=function(f,g){typeof f=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(f,g))},Pt.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Pt.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var m=g.as,y=h(m,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?a.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:_}):m==="script"&&a.d.X(f,{crossOrigin:y,integrity:b,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Pt.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=h(g.as,g.crossOrigin);a.d.M(f,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(f)},Pt.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,y=h(m,g.crossOrigin);a.d.L(f,m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Pt.preloadModule=function(f,g){if(typeof f=="string")if(g){var m=h(g.as,g.crossOrigin);a.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(f)},Pt.requestFormReset=function(f){a.d.r(f)},Pt.unstable_batchedUpdates=function(f,g){return f(g)},Pt.useFormState=function(f,g,m){return c.H.useFormState(f,g,m)},Pt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Pt.version="19.2.5",Pt}var tv;function d0(){if(tv)return bd.exports;tv=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(),bd.exports=cT(),bd.exports}var nv;function hT(){if(nv)return Yi;nv=1;var e=uT(),t=xo(),n=d0();function a(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var s=r,i=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(i=s.return),r=s.return;while(r)}return s.tag===3?i:null}function c(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function h(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function f(r){if(u(r)!==r)throw Error(a(188))}function g(r){var s=r.alternate;
vendor: 8,592 bytes, lines 2-9
2if(!s){if(s=u(r),s===null)throw Error(a(188));return s!==r?null:r}for(var i=r,l=s;;){var d=i.return;if(d===null)break;var p=d.alternate;if(p===null){if(l=d.return,l!==null){i=l;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===i)return f(d),r;if(p===l)return f(d),s;p=p.sibling}throw Error(a(188))}if(i.return!==l.return)i=d,l=p;else{for(var v=!1,S=d.child;S;){if(S===i){v=!0,i=d,l=p;break}if(S===l){v=!0,l=d,i=p;break}S=S.sibling}if(!v){for(S=p.child;S;){if(S===i){v=!0,i=p,l=d;break}if(S===l){v=!0,l=p,i=d;break}S=S.sibling}if(!v)throw Error(a(189))}}if(i.alternate!==l)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?r:s}function m(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=m(r),s!==null)return s;r=r.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),j=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ge(r){return r===null||typeof r!="object"?null:(r=se&&r[se]||r["@@iterator"],typeof r=="function"?r:null)}var Te=Symbol.for("react.client.reference");function rt(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Te?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case A:return"Fragment";case O:return"Profiler";case E:return"StrictMode";case K:return"Suspense";case J:return"SuspenseList";case Y:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case j:return r.displayName||"Context";case N:return(r._context.displayName||"Context")+".Consumer";case D:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case I:return s=r.displayName||null,s!==null?s:rt(r.type)||"Memo";case F:s=r._payload,r=r._init;try{return rt(r(s))}catch{}}return null}var Ze=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ke=[],je=-1;function C(r){return{current:r}}function G(r){0>je||(r.current=ke[je],ke[je]=null,je--)}function W(r,s){je++,ke[je]=r.current,r.current=s}var te=C(null),ie=C(null),ve=C(null),Re=C(null);function st(r,s){switch(W(ve,s),W(ie,r),W(te,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?yy(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=yy(s),r=vy(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}G(te),W(te,r)}function Ue(){G(te),G(ie),G(ve)}function Hn(r){r.memoizedState!==null&&W(Re,r);var s=te.current,i=vy(s,r.type);s!==i&&(W(ie,r),W(te,i))}function qn(r){ie.current===r&&(G(te),G(ie)),Re.current===r&&(G(Re),Gi._currentValue=ce)}var yr,ei;function jn(r){if(yr===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);yr=s&&s[1]||"",ei=-1<i.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+yr+r+ei}var ti=!1;function Hs(r,s){if(!r||ti)return"";ti=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(s){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch($){var U=$}Reflect.construct(r,[],Z)}else{try{Z.call()}catch($){U=$}r.call(Z.prototype)}}else{try{throw Error()}catch($){U=$}(Z=r())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch($){if($&&U&&typeof $.stack=="string")return[$.stack,U.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 p=l.DetermineComponentFrameRoot(),v=p[0],S=p[1];if(v&&S){var x=v.split(` 5`),L=S.split(` 6`);for(d=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;d<L.length&&!L[d].includes("DetermineComponentFrameRoot");)d++;if(l===x.length||d===L.length)for(l=x.length-1,d=L.length-1;1<=l&&0<=d&&x[l]!==L[d];)d--;for(;1<=l&&0<=d;l--,d--)if(x[l]!==L[d]){if(l!==1||d!==1)do if(l--,d--,0>d||x[l]!==L[d]){var H=` 7`+x[l].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=l&&0<=d);break}}}finally{ti=!1,Error.prepareStackTrace=i}return(i=r?r.displayName||r.name:"")?jn(i):""}function No(r,s){switch(r.tag){case 26:case 27:case 5:return jn(r.type);case 16:return jn("Lazy");case 13:return r.child!==s&&s!==null?jn("Suspense Fallback"):jn("Suspense");case 19:return jn("SuspenseList");case 0:case 15:return Hs(r.type,!1);case 11:return Hs(r.type.render,!1);case 1:return Hs(r.type,!0);case 31:return jn("Activity");default:return""}}function Fn(r){try{var s="",i=null;do s+=No(r,i),i=r,r=r.return;while(r);return s}catch(l){return` 8Error generating stack: `+l.message+` 9`+l.stack}}var as=Object.prototype.hasOwnProperty,En=e.unstable_scheduleCallback,ni=e.unstable_cancelCallback,Do=e.unstable_shouldYield,tc=e.unstable_requestPaint,Mt=e.unstable_now,He=e.unstable_getCurrentPriorityLevel,Tt=e.unstable_ImmediatePriority,zn=e.unstable_UserBlockingPriority,qs=e.unstable_NormalPriority,Uw=e.unstable_LowPriority,Qf=e.unstable_IdlePriority,$w=e.log,Iw=e.unstable_setDisableYieldValue,ri=null,Wt=null;function vr(r){if(typeof $w=="function"&&Iw(r),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(ri,r)}catch{}}var en=Math.clz32?Math.clz32:qw,Bw=Math.log,Hw=Math.LN2;function qw(r){return r>>>=0,r===0?32:31-(Bw(r)/Hw|0)|0}var Mo=256,Po=262144,Lo=4194304;function is(r){var s=r&42;if(s!==0)return s;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Uo(r,s,i){var l=r.pendingLanes;if(l===0)return 0;var d=0,p=r.suspendedLanes,v=r.pingedLanes;r=r.warmLanes;var S=l&134217727;return S!==0?(l=S&~p,l!==0?d=is(l):(v&=S,v!==0?d=is(v):i||(i=S&~r,i!==0&&(d=is(i))))):(S=l&~p,S!==0?d=is(S):v!==0?d=is(v):i||(i=l&~r,i!==0&&(d=is(i)))),d===0?0:s!==0&&s!==d&&(s&p)===0&&(p=d&-d,i=s&-s,p>=i||p===32&&(i&4194048)!==0)?s:d}function si(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Fw(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Xf(){var r=Lo;return Lo<<=1,(Lo&62914560)===0&&(Lo=4194304),r}function nc(r){for(var s=[],i=0;31>i;i++)s.push(r);return s}function ai(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Gw(r,s,i,l,d,p){var v=r.pendingLanes;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=i,r.entangledLanes&=i,r.errorRecoveryDisabledLanes&=i,r.shellSuspendCounter=0;var S=r.entanglements,x=r.expirationTimes,L=r.hiddenUpdates;for(i=v&~i;0<i;){var H=31-en(i),Z=1<<H;S[H]=0,x[H]=-1;var U=L[H];if(U!==null)for(L[H]=null,H=0;H<U.length;H++){var $=U[H];$!==null&&($.lane&=-536870913)}i&=~Z}l!==0&&Wf(r,l,0),p!==0&&d===0&&r.tag!==0&&(r.suspendedLanes|=p&~(v&~s))}function Wf(r,s,i){r.pendingLanes|=s,r.suspendedLanes&=~s;var l=31-en(s);r.entangledLanes|=s,r.entanglements[l]=r.entanglements[l]|1073741824|i&261930}function ep(r,s){var i=r.entangledLanes|=s;for(r=r.entanglements;i;){var l=31-en(i),d=1<<l;
vendor: 8,549 bytes, line 9
9d&s|r[l]&s&&(r[l]|=s),i&=~d}}function tp(r,s){var i=s&-s;return i=(i&42)!==0?1:rc(i),(i&(r.suspendedLanes|s))!==0?0:i}function rc(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function sc(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function np(){var r=Q.p;return r!==0?r:(r=window.event,r===void 0?32:By(r.type))}function rp(r,s){var i=Q.p;try{return Q.p=r,s()}finally{Q.p=i}}var br=Math.random().toString(36).slice(2),Rt="__reactFiber$"+br,Bt="__reactProps$"+br,Fs="__reactContainer$"+br,ac="__reactEvents$"+br,Zw="__reactListeners$"+br,Vw="__reactHandles$"+br,sp="__reactResources$"+br,ii="__reactMarker$"+br;function ic(r){delete r[Rt],delete r[Bt],delete r[ac],delete r[Zw],delete r[Vw]}function Gs(r){var s=r[Rt];if(s)return s;for(var i=r.parentNode;i;){if(s=i[Fs]||i[Rt]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(r=Ry(r);r!==null;){if(i=r[Rt])return i;r=Ry(r)}return s}r=i,i=r.parentNode}return null}function Zs(r){if(r=r[Rt]||r[Fs]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function oi(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(a(33))}function Vs(r){var s=r[sp];return s||(s=r[sp]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function bt(r){r[ii]=!0}var ap=new Set,ip={};function os(r,s){Ks(r,s),Ks(r+"Capture",s)}function Ks(r,s){for(ip[r]=s,r=0;r<s.length;r++)ap.add(s[r])}var Kw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),op={},lp={};function Jw(r){return as.call(lp,r)?!0:as.call(op,r)?!1:Kw.test(r)?lp[r]=!0:(op[r]=!0,!1)}function $o(r,s,i){if(Jw(s))if(i===null)r.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var l=s.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+i)}}function Io(r,s,i){if(i===null)r.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+i)}}function Gn(r,s,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttributeNS(s,i,""+l)}}function hn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function up(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Yw(r,s,i){var l=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,p=l.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return d.call(this)},set:function(v){i=""+v,p.call(this,v)}}),Object.defineProperty(r,s,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function oc(r){if(!r._valueTracker){var s=up(r)?"checked":"value";r._valueTracker=Yw(r,s,""+r[s])}}function cp(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var i=s.getValue(),l="";return r&&(l=up(r)?r.checked?"true":"false":r.value),r=l,r!==i?(s.setValue(r),!0):!1}function Bo(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Qw=/[\n"\\]/g;function dn(r){return r.replace(Qw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lc(r,s,i,l,d,p,v,S){r.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?r.type=v:r.removeAttribute("type"),s!=null?v==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+hn(s)):r.value!==""+hn(s)&&(r.value=""+hn(s)):v!=="submit"&&v!=="reset"||r.removeAttribute("value"),s!=null?uc(r,v,hn(s)):i!=null?uc(r,v,hn(i)):l!=null&&r.removeAttribute("value"),d==null&&p!=null&&(r.defaultChecked=!!p),d!=null&&(r.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?r.name=""+hn(S):r.removeAttribute("name")}function hp(r,s,i,l,d,p,v,S){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(r.type=p),s!=null||i!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){oc(r);return}i=i!=null?""+hn(i):"",s=s!=null?""+hn(s):i,S||s===r.value||(r.value=s),r.defaultValue=s}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,r.checked=S?r.checked:!!l,r.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.name=v),oc(r)}function uc(r,s,i){s==="number"&&Bo(r.ownerDocument)===r||r.defaultValue===""+i||(r.defaultValue=""+i)}function Js(r,s,i,l){if(r=r.options,s){s={};for(var d=0;d<i.length;d++)s["$"+i[d]]=!0;for(i=0;i<r.length;i++)d=s.hasOwnProperty("$"+r[i].value),r[i].selected!==d&&(r[i].selected=d),d&&l&&(r[i].defaultSelected=!0)}else{for(i=""+hn(i),s=null,d=0;d<r.length;d++){if(r[d].value===i){r[d].selected=!0,l&&(r[d].defaultSelected=!0);return}s!==null||r[d].disabled||(s=r[d])}s!==null&&(s.selected=!0)}}function dp(r,s,i){if(s!=null&&(s=""+hn(s),s!==r.value&&(r.value=s),i==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=i!=null?""+hn(i):""}function fp(r,s,i,l){if(s==null){if(l!=null){if(i!=null)throw Error(a(92));if(Ze(l)){if(1<l.length)throw Error(a(93));l=l[0]}i=l}i==null&&(i=""),s=i}i=hn(s),r.defaultValue=i,l=r.textContent,l===i&&l!==""&&l!==null&&(r.value=l),oc(r)}function Ys(r,s){if(s){var i=r.firstChild;if(i&&i===r.lastChild&&i.nodeType===3){i.nodeValue=s;return}}r.textContent=s}var Xw=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 pp(r,s,i){var l=s.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":l?r.setProperty(s,i):typeof i!="number"||i===0||Xw.has(s)?s==="float"?r.cssFloat=i:r[s]=(""+i).trim():r[s]=i+"px"}function gp(r,s,i){if(s!=null&&typeof s!="object")throw Error(a(62));if(r=r.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||s!=null&&s.hasOwnProperty(l)||(l.indexOf("--")===0?r.setProperty(l,""):l==="float"?r.cssFloat="":r[l]="");for(var d in s)l=s[d],s.hasOwnProperty(d)&&i[d]!==l&&pp(r,d,l)}else for(var p in s)s.hasOwnProperty(p)&&pp(r,p,s[p])}function cc(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Ww=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"]]),eS=/^[\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 Ho(r){return eS.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Zn(){}var hc=null;function dc(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Qs=null,Xs=null;function mp(r){var s=Zs(r);if(s&&(r=s.stateNode)){var i=r[Bt]||null;e:switch(r=s.stateNode,s.type){case"input":if(lc(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),s=i.name,i.type==="radio"&&s!=null){for(i=r;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+dn(""+s)+'"][type="radio"]'),s=0;s<i.length;s++){var l=i[s];if(l!==r&&l.form===r.form){var d=l[Bt]||null;if(!d)throw Error(a(90));lc(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(s=0;s<i.length;s++)l=i[s],l.form===r.form&&cp(l)}break e;case"textarea":dp(r,i.value,i.defaultValue);break e;case"select":s=i.value,s!=null&&Js(r,!!i.multiple,s,!1)}}}var fc=!1;function yp(r,s,i){if(fc)return r(s,i);fc=!0;try{var l=r(s);return l}finally{if(fc=!1,(Qs!==null||Xs!==null)&&(kl(),Qs&&(s=Qs,r=Xs,Xs=Qs=null,mp(s),r)))for(s=0;s<r.length;s++)mp(r[s])}}function li(r,s){var i=r.stateNode;if(i===null)return null;var l=i[Bt]||null;if(l===null)return null;i=l[s];e:switch(s){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)||(r=r.type,l=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!l;break e;default:r=!1}if(r)return null;if(i&&typeof i!="function")throw Error(a(231,s,typeof i));return i}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pc=!1;if(Vn)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){pc=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{pc=!1}var _r=null,gc=null,qo=null;function vp(){if(qo)return qo;var r,s=gc,i=s.length,l,d="value"in _r?_r.value:_r.textContent,p=d.length;for(r=0;r<i&&s[r]===d[r];r++);var v=i-r;for(l=1;l<=v&&s[i-l]===d[p-l];l++);return qo=d.slice(r,1<l?1-l:void 0)}function Fo(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Go(){return!0}function bp(){return!1}function Ht(r){function s(i,l,d,p,v){this._reactName=i,this._targetInst=d,this.type=l,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var S in r)r.hasOwnProperty(S)&&(i=r[S],this[S]=i?i(p):p[S]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Go:bp,this.isPropagationStopped=bp,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Go)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Go)},persist:function(){},isPersistent:Go}),s}var ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zo=Ht(ls),ci=y({},ls,{view:0,detail:0}),tS=Ht(ci),mc,yc,hi,Vo=y({},ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==hi&&(hi&&r.type==="mousemove"?(mc=r.screenX-hi.screenX,yc=r.screenY-hi.screenY):yc=mc=0,hi=r),mc)},movementY:function(r){return"movementY"in r?r.movementY:yc}}),_p=Ht(Vo),nS=y({},Vo,{dataTransfer:0}),rS=Ht(nS),sS=y({},ci,{relatedTarget:0}),vc=Ht(sS),aS=y({},ls,{animationName:0,elapsedTime:0,pseudoElement:0}),iS=Ht(aS),oS=y({},ls,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),lS=Ht(oS),uS=y({},ls,{data:0}),wp=Ht(uS),cS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hS={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"},dS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=dS[r])?!!s[r]:!1}function bc(){return fS}var pS=y({},ci,{key:function(r){if(r.key){var s=cS[r.key]||r.key;if(s!=="Unidentified")return s}
vendor: 4,813 bytes, line 9
9return r.type==="keypress"?(r=Fo(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?hS[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bc,charCode:function(r){return r.type==="keypress"?Fo(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Fo(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),gS=Ht(pS),mS=y({},Vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sp=Ht(mS),yS=y({},ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bc}),vS=Ht(yS),bS=y({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),_S=Ht(bS),wS=y({},Vo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),SS=Ht(wS),ES=y({},ls,{newState:0,oldState:0}),TS=Ht(ES),RS=[9,13,27,32],_c=Vn&&"CompositionEvent"in window,di=null;Vn&&"documentMode"in document&&(di=document.documentMode);var AS=Vn&&"TextEvent"in window&&!di,Ep=Vn&&(!_c||di&&8<di&&11>=di),Tp=" ",Rp=!1;function Ap(r,s){switch(r){case"keyup":return RS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Op(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ws=!1;function OS(r,s){switch(r){case"compositionend":return Op(s);case"keypress":return s.which!==32?null:(Rp=!0,Tp);case"textInput":return r=s.data,r===Tp&&Rp?null:r;default:return null}}function xS(r,s){if(Ws)return r==="compositionend"||!_c&&Ap(r,s)?(r=vp(),qo=gc=_r=null,Ws=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Ep&&s.locale!=="ko"?null:s.data;default:return null}}var kS={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 xp(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!kS[r.type]:s==="textarea"}function kp(r,s,i,l){Qs?Xs?Xs.push(l):Xs=[l]:Qs=l,s=Pl(s,"onChange"),0<s.length&&(i=new Zo("onChange","change",null,i,l),r.push({event:i,listeners:s}))}var fi=null,pi=null;function CS(r){hy(r,0)}function Ko(r){var s=oi(r);if(cp(s))return r}function Cp(r,s){if(r==="change")return s}var jp=!1;if(Vn){var wc;if(Vn){var Sc="oninput"in document;if(!Sc){var zp=document.createElement("div");zp.setAttribute("oninput","return;"),Sc=typeof zp.oninput=="function"}wc=Sc}else wc=!1;jp=wc&&(!document.documentMode||9<document.documentMode)}function Np(){fi&&(fi.detachEvent("onpropertychange",Dp),pi=fi=null)}function Dp(r){if(r.propertyName==="value"&&Ko(pi)){var s=[];kp(s,pi,r,dc(r)),yp(CS,s)}}function jS(r,s,i){r==="focusin"?(Np(),fi=s,pi=i,fi.attachEvent("onpropertychange",Dp)):r==="focusout"&&Np()}function zS(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ko(pi)}function NS(r,s){if(r==="click")return Ko(s)}function DS(r,s){if(r==="input"||r==="change")return Ko(s)}function MS(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var tn=typeof Object.is=="function"?Object.is:MS;function gi(r,s){if(tn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var i=Object.keys(r),l=Object.keys(s);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var d=i[l];if(!as.call(s,d)||!tn(r[d],s[d]))return!1}return!0}function Mp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Pp(r,s){var i=Mp(r);r=0;for(var l;i;){if(i.nodeType===3){if(l=r+i.textContent.length,r<=s&&l>=s)return{node:i,offset:s-r};r=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Mp(i)}}function Lp(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Lp(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Up(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Bo(r.document);s instanceof r.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)r=s.contentWindow;else break;s=Bo(r.document)}return s}function Ec(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var PS=Vn&&"documentMode"in document&&11>
vendor: 15,901 bytes, line 9
9=document.documentMode,ea=null,Tc=null,mi=null,Rc=!1;function $p(r,s,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Rc||ea==null||ea!==Bo(l)||(l=ea,"selectionStart"in l&&Ec(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mi&&gi(mi,l)||(mi=l,l=Pl(Tc,"onSelect"),0<l.length&&(s=new Zo("onSelect","select",null,s,i),r.push({event:s,listeners:l}),s.target=ea)))}function us(r,s){var i={};return i[r.toLowerCase()]=s.toLowerCase(),i["Webkit"+r]="webkit"+s,i["Moz"+r]="moz"+s,i}var ta={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},Ac={},Ip={};Vn&&(Ip=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function cs(r){if(Ac[r])return Ac[r];if(!ta[r])return r;var s=ta[r],i;for(i in s)if(s.hasOwnProperty(i)&&i in Ip)return Ac[r]=s[i];return r}var Bp=cs("animationend"),Hp=cs("animationiteration"),qp=cs("animationstart"),LS=cs("transitionrun"),US=cs("transitionstart"),$S=cs("transitioncancel"),Fp=cs("transitionend"),Gp=new Map,Oc="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(" ");Oc.push("scrollEnd");function Tn(r,s){Gp.set(r,s),os(s,[r])}var Jo=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},fn=[],na=0,xc=0;function Yo(){for(var r=na,s=xc=na=0;s<r;){var i=fn[s];fn[s++]=null;var l=fn[s];fn[s++]=null;var d=fn[s];fn[s++]=null;var p=fn[s];if(fn[s++]=null,l!==null&&d!==null){var v=l.pending;v===null?d.next=d:(d.next=v.next,v.next=d),l.pending=d}p!==0&&Zp(i,d,p)}}function Qo(r,s,i,l){fn[na++]=r,fn[na++]=s,fn[na++]=i,fn[na++]=l,xc|=l,r.lanes|=l,r=r.alternate,r!==null&&(r.lanes|=l)}function kc(r,s,i,l){return Qo(r,s,i,l),Xo(r)}function hs(r,s){return Qo(r,null,null,s),Xo(r)}function Zp(r,s,i){r.lanes|=i;var l=r.alternate;l!==null&&(l.lanes|=i);for(var d=!1,p=r.return;p!==null;)p.childLanes|=i,l=p.alternate,l!==null&&(l.childLanes|=i),p.tag===22&&(r=p.stateNode,r===null||r._visibility&1||(d=!0)),r=p,p=p.return;return r.tag===3?(p=r.stateNode,d&&s!==null&&(d=31-en(i),r=p.hiddenUpdates,l=r[d],l===null?r[d]=[s]:l.push(s),s.lane=i|536870912),p):null}function Xo(r){if(50<Ui)throw Ui=0,Uh=null,Error(a(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var ra={};function IS(r,s,i,l){this.tag=r,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=s,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 nn(r,s,i,l){return new IS(r,s,i,l)}function Cc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Kn(r,s){var i=r.alternate;return i===null?(i=nn(r.tag,s,r.key,r.mode),i.elementType=r.elementType,i.type=r.type,i.stateNode=r.stateNode,i.alternate=r,r.alternate=i):(i.pendingProps=s,i.type=r.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=r.flags&65011712,i.childLanes=r.childLanes,i.lanes=r.lanes,i.child=r.child,i.memoizedProps=r.memoizedProps,i.memoizedState=r.memoizedState,i.updateQueue=r.updateQueue,s=r.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=r.sibling,i.index=r.index,i.ref=r.ref,i.refCleanup=r.refCleanup,i}function Vp(r,s){r.flags&=65011714;var i=r.alternate;return i===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=i.childLanes,r.lanes=i.lanes,r.child=i.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=i.memoizedProps,r.memoizedState=i.memoizedState,r.updateQueue=i.updateQueue,r.type=i.type,s=i.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function Wo(r,s,i,l,d,p){var v=0;if(l=r,typeof r=="function")Cc(r)&&(v=1);else if(typeof r=="string")v=GE(r,i,te.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case Y:return r=nn(31,i,s,d),r.elementType=Y,r.lanes=p,r;case A:return ds(i.children,d,p,s);case E:v=8,d|=24;break;case O:return r=nn(12,i,s,d|2),r.elementType=O,r.lanes=p,r;case K:return r=nn(13,i,s,d),r.elementType=K,r.lanes=p,r;case J:return r=nn(19,i,s,d),r.elementType=J,r.lanes=p,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case j:v=10;break e;case N:v=9;break e;case D:v=11;break e;case I:v=14;break e;case F:v=16,l=null;break e}v=29,i=Error(a(130,r===null?"null":typeof r,"")),l=null}return s=nn(v,i,s,d),s.elementType=r,s.type=l,s.lanes=p,s}function ds(r,s,i,l){return r=nn(7,r,l,s),r.lanes=i,r}function jc(r,s,i){return r=nn(6,r,null,s),r.lanes=i,r}function Kp(r){var s=nn(18,null,null,0);return s.stateNode=r,s}function zc(r,s,i){return s=nn(4,r.children!==null?r.children:[],r.key,s),s.lanes=i,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var Jp=new WeakMap;function pn(r,s){if(typeof r=="object"&&r!==null){var i=Jp.get(r);return i!==void 0?i:(s={value:r,source:s,stack:Fn(s)},Jp.set(r,s),s)}return{value:r,source:s,stack:Fn(s)}}var sa=[],aa=0,el=null,yi=0,gn=[],mn=0,wr=null,Nn=1,Dn="";function Jn(r,s){sa[aa++]=yi,sa[aa++]=el,el=r,yi=s}function Yp(r,s,i){gn[mn++]=Nn,gn[mn++]=Dn,gn[mn++]=wr,wr=r;var l=Nn;r=Dn;var d=32-en(l)-1;l&=~(1<<d),i+=1;var p=32-en(s)+d;if(30<p){var v=d-d%5;p=(l&(1<<v)-1).toString(32),l>>=v,d-=v,Nn=1<<32-en(s)+d|i<<d|l,Dn=p+r}else Nn=1<<p|i<<d|l,Dn=r}function Nc(r){r.return!==null&&(Jn(r,1),Yp(r,1,0))}function Dc(r){for(;r===el;)el=sa[--aa],sa[aa]=null,yi=sa[--aa],sa[aa]=null;for(;r===wr;)wr=gn[--mn],gn[mn]=null,Dn=gn[--mn],gn[mn]=null,Nn=gn[--mn],gn[mn]=null}function Qp(r,s){gn[mn++]=Nn,gn[mn++]=Dn,gn[mn++]=wr,Nn=s.id,Dn=s.overflow,wr=r}var At=null,Ve=null,Ee=!1,Sr=null,yn=!1,Mc=Error(a(519));function Er(r){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vi(pn(s,r)),Mc}function Xp(r){var s=r.stateNode,i=r.type,l=r.memoizedProps;switch(s[Rt]=r,s[Bt]=l,i){case"dialog":_e("cancel",s),_e("close",s);break;case"iframe":case"object":case"embed":_e("load",s);break;case"video":case"audio":for(i=0;i<Ii.length;i++)_e(Ii[i],s);break;case"source":_e("error",s);break;case"img":case"image":case"link":_e("error",s),_e("load",s);break;case"details":_e("toggle",s);break;case"input":_e("invalid",s),hp(s,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",s);break;case"textarea":_e("invalid",s),fp(s,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||s.textContent===""+i||l.suppressHydrationWarning===!0||gy(s.textContent,i)?(l.popover!=null&&(_e("beforetoggle",s),_e("toggle",s)),l.onScroll!=null&&_e("scroll",s),l.onScrollEnd!=null&&_e("scrollend",s),l.onClick!=null&&(s.onclick=Zn),s=!0):s=!1,s||Er(r,!0)}function Wp(r){for(At=r.return;At;)switch(At.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:At=At.return}}function ia(r){if(r!==At)return!1;if(!Ee)return Wp(r),Ee=!0,!1;var s=r.tag,i;if((i=s!==3&&s!==27)&&((i=s===5)&&(i=r.type,i=!(i!=="form"&&i!=="button")||Wh(r.type,r.memoizedProps)),i=!i),i&&Ve&&Er(r),Wp(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ve=Ty(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ve=Ty(r)}else s===27?(s=Ve,Lr(r.type)?(r=sd,sd=null,Ve=r):Ve=s):Ve=At?bn(r.stateNode.nextSibling):null;return!0}function fs(){Ve=At=null,Ee=!1}function Pc(){var r=Sr;return r!==null&&(Zt===null?Zt=r:Zt.push.apply(Zt,r),Sr=null),r}function vi(r){Sr===null?Sr=[r]:Sr.push(r)}var Lc=C(null),ps=null,Yn=null;function Tr(r,s,i){W(Lc,s._currentValue),s._currentValue=i}function Qn(r){r._currentValue=Lc.current,G(Lc)}function Uc(r,s,i){for(;r!==null;){var l=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),r===i)break;r=r.return}}function $c(r,s,i,l){var d=r.child;for(d!==null&&(d.return=r);d!==null;){var p=d.dependencies;if(p!==null){var v=d.child;p=p.firstContext;e:for(;p!==null;){var S=p;p=d;for(var x=0;x<s.length;x++)if(S.context===s[x]){p.lanes|=i,S=p.alternate,S!==null&&(S.lanes|=i),Uc(p.return,i,r),l||(v=null);break e}p=S.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error(a(341));v.lanes|=i,p=v.alternate,p!==null&&(p.lanes|=i),Uc(v,i,r),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===r){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function oa(r,s,i,l){r=null;for(var d=s,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var S=d.type;tn(d.pendingProps.value,v.value)||(r!==null?r.push(S):r=[S])}}else if(d===Re.current){if(v=d.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(r!==null?r.push(Gi):r=[Gi])}d=d.return}r!==null&&$c(s,r,i,l),s.flags|=262144}function tl(r){for(r=r.firstContext;r!==null;){if(!tn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function gs(r){ps=r,Yn=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Ot(r){return eg(ps,r)}function nl(r,s){return ps===null&&gs(r),eg(r,s)}function eg(r,s){var i=s._currentValue;if(s={context:s,memoizedValue:i,next:null},Yn===null){if(r===null)throw Error(a(308));Yn=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else Yn=Yn.next=s;return i}var BS=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(i,l){r.push(l)}};this.abort=function(){s.aborted=!0,r.forEach(function(i){return i()})}},HS=e.unstable_scheduleCallback,qS=e.unstable_NormalPriority,ut={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ic(){return{controller:new BS,data:new Map,refCount:0}}function bi(r){r.refCount--,r.refCount===0&&HS(qS,function(){r.controller.abort()})}var _i=null,Bc=0,la=0,ua=null;function FS(r,s){if(_i===null){var i=_i=[];Bc=0,la=Fh(),ua={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Bc++,s.then(tg,tg),s}function tg(){if(--Bc===0&&_i!==null){ua!==null&&(ua.status="fulfilled");var r=_i;_i=null,la=0,ua=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function GS(r,s){var i=[],l={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return r.then(function(){l.status="fulfilled",l.value=s;for(var d=0;d<i.length;d++)(0,i[d])(s)},function(d){for(l.status="rejected",l.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),l}var ng=B.S;B.S=function(r,s){$m=Mt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&FS(r,s),ng!==null&&ng(r,s)};var ms=C(null);function Hc(){var r=ms.current;return r!==null?r:$e.pooledCache}function rl(r,s){s===null?W(ms,ms.current):W(ms,s.pool)}function rg(){var r=Hc();return r===null?null:{parent:ut._currentValue,pool:r}}var ca=Error(a(460)),qc=Error(a(474)),sl=Error(a(542)),al={then:function(){}};function sg(r){return r=r.status,r==="fulfilled"||r==="rejected"}function ag(r,s,i){switch(i=r[i],i===void 0?r.push(s):i!==s&&(s.then(Zn,Zn),s=i),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,og(r),r;default:if(typeof s.status=="string")s.then(Zn,Zn);else{if(r=$e,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=s,r.status="pending",r.then(function(l){if(s.status==="pending"){var d=s;d.status="fulfilled",d.value=l}},function(l){if(s.status==="pending"){var d=s;d.status="rejected",d.reason=l}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,og(r),r}throw vs=s,ca}}function ys(r){try{var s=r._init;return s(r._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(vs=i,ca):i}}var vs=null;function ig(){if(vs===null)throw Error(a(459));var r=vs;return vs=null,r}function og(r){if(r===ca||r===sl)throw Error(a(483))}var ha=null,wi=0;function il(r){var s=wi;return wi+=1,ha===null&&(ha=[]),ag(ha,r,s)}function Si(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function ol(r,s){throw s.$$typeof===b?Error(a(525)):(r=Object.prototype.toString.call(s),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function lg(r){function s(M,k){if(r){var P=M.deletions;P===null?(M.deletions=[k],M.flags|=16):P.push(k)}}function i(M,k){if(!r)return null;for(;k!==null;)s(M,k),k=k.sibling;return null}function l(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function d(M,k){return M=Kn(M,k),M.index=0,M.sibling=null,M}function p(M,k,P){return M.index=P,r?(P=M.alternate,P!==null?(P=P.index,P<k?(M.flags|=67108866,k):P):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function v(M){return r&&M.alternate===null&&(M.flags|=67108866),M}function S(M,k,P,q){return k===null||k.tag!==6?(k=jc(P,M.mode,q),k.return=M,k):(k=d(k,P),k.return=M,k)}function x(M,k,P,q){var le=P.type;return le===A?H(M,k,P.props.children,q,P.key):k!==null&&(k.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===F&&ys(le)===k.type)?(k=d(k,P.props),Si(k,P),k.return=M,k):(k=Wo(P.type,P.key,P.props,null,M.mode,q),Si(k,P),k.return=M,k)}function L(M,k,P,q){return k===null||k.tag!==4||k.stateNode.containerInfo!==P.containerInfo||k.stateNode.implementation!==P.implementation?(k=zc(P,M.mode,q),k.return=M,k):(k=d(k,P.children||[]),k.return=M,k)}function H(M,k,P,q,le){return k===null||k.tag!==7?(k=ds(P,M.mode,q,le),k.return=M,k):(k=d(k,P),k.return=M,k)}function Z(M,k,P){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=jc(""+k,M.mode,P),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _:return P=Wo(k.type,k.key,k.props,null,M.mode,P),Si(P,k),P.return=M,P;case w:return k=zc(k,M.mode,P),k.return=M,k;case F:return k=ys(k),Z(M,k,P)}if(Ze(k)||ge(k))return k=ds(k,M.mode,P,null),k.return=M,k;if(typeof k.then=="function")return Z(M,il(k),P);if(k.$$typeof===j)return Z(M,nl(M,k),P);ol(M,k)}return null}function U(M,k,P,q){var le=k!==null?k.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return le!==null?null:S(M,k,""+P,q);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return P.key===le?x(M,
vendor: 5,073 bytes, line 9
9k,P,q):null;case w:return P.key===le?L(M,k,P,q):null;case F:return P=ys(P),U(M,k,P,q)}if(Ze(P)||ge(P))return le!==null?null:H(M,k,P,q,null);if(typeof P.then=="function")return U(M,k,il(P),q);if(P.$$typeof===j)return U(M,k,nl(M,P),q);ol(M,P)}return null}function $(M,k,P,q,le){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return M=M.get(P)||null,S(k,M,""+q,le);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return M=M.get(q.key===null?P:q.key)||null,x(k,M,q,le);case w:return M=M.get(q.key===null?P:q.key)||null,L(k,M,q,le);case F:return q=ys(q),$(M,k,P,q,le)}if(Ze(q)||ge(q))return M=M.get(P)||null,H(k,M,q,le,null);if(typeof q.then=="function")return $(M,k,P,il(q),le);if(q.$$typeof===j)return $(M,k,P,nl(k,q),le);ol(k,q)}return null}function ne(M,k,P,q){for(var le=null,Ae=null,ae=k,me=k=0,Se=null;ae!==null&&me<P.length;me++){ae.index>me?(Se=ae,ae=null):Se=ae.sibling;var Oe=U(M,ae,P[me],q);if(Oe===null){ae===null&&(ae=Se);break}r&&ae&&Oe.alternate===null&&s(M,ae),k=p(Oe,k,me),Ae===null?le=Oe:Ae.sibling=Oe,Ae=Oe,ae=Se}if(me===P.length)return i(M,ae),Ee&&Jn(M,me),le;if(ae===null){for(;me<P.length;me++)ae=Z(M,P[me],q),ae!==null&&(k=p(ae,k,me),Ae===null?le=ae:Ae.sibling=ae,Ae=ae);return Ee&&Jn(M,me),le}for(ae=l(ae);me<P.length;me++)Se=$(ae,M,me,P[me],q),Se!==null&&(r&&Se.alternate!==null&&ae.delete(Se.key===null?me:Se.key),k=p(Se,k,me),Ae===null?le=Se:Ae.sibling=Se,Ae=Se);return r&&ae.forEach(function(Hr){return s(M,Hr)}),Ee&&Jn(M,me),le}function he(M,k,P,q){if(P==null)throw Error(a(151));for(var le=null,Ae=null,ae=k,me=k=0,Se=null,Oe=P.next();ae!==null&&!Oe.done;me++,Oe=P.next()){ae.index>me?(Se=ae,ae=null):Se=ae.sibling;var Hr=U(M,ae,Oe.value,q);if(Hr===null){ae===null&&(ae=Se);break}r&&ae&&Hr.alternate===null&&s(M,ae),k=p(Hr,k,me),Ae===null?le=Hr:Ae.sibling=Hr,Ae=Hr,ae=Se}if(Oe.done)return i(M,ae),Ee&&Jn(M,me),le;if(ae===null){for(;!Oe.done;me++,Oe=P.next())Oe=Z(M,Oe.value,q),Oe!==null&&(k=p(Oe,k,me),Ae===null?le=Oe:Ae.sibling=Oe,Ae=Oe);return Ee&&Jn(M,me),le}for(ae=l(ae);!Oe.done;me++,Oe=P.next())Oe=$(ae,M,me,Oe.value,q),Oe!==null&&(r&&Oe.alternate!==null&&ae.delete(Oe.key===null?me:Oe.key),k=p(Oe,k,me),Ae===null?le=Oe:Ae.sibling=Oe,Ae=Oe);return r&&ae.forEach(function(nT){return s(M,nT)}),Ee&&Jn(M,me),le}function Pe(M,k,P,q){if(typeof P=="object"&&P!==null&&P.type===A&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case _:e:{for(var le=P.key;k!==null;){if(k.key===le){if(le=P.type,le===A){if(k.tag===7){i(M,k.sibling),q=d(k,P.props.children),q.return=M,M=q;break e}}else if(k.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===F&&ys(le)===k.type){i(M,k.sibling),q=d(k,P.props),Si(q,P),q.return=M,M=q;break e}i(M,k);break}else s(M,k);k=k.sibling}P.type===A?(q=ds(P.props.children,M.mode,q,P.key),q.return=M,M=q):(q=Wo(P.type,P.key,P.props,null,M.mode,q),Si(q,P),q.return=M,M=q)}return v(M);case w:e:{for(le=P.key;k!==null;){if(k.key===le)if(k.tag===4&&k.stateNode.containerInfo===P.containerInfo&&k.stateNode.implementation===P.implementation){i(M,k.sibling),q=d(k,P.children||[]),q.return=M,M=q;break e}else{i(M,k);break}else s(M,k);k=k.sibling}q=zc(P,M.mode,q),q.return=M,M=q}return v(M);case F:return P=ys(P),Pe(M,k,P,q)}if(Ze(P))return ne(M,k,P,q);if(ge(P)){if(le=ge(P),typeof le!="function")throw Error(a(150));return P=le.call(P),he(M,k,P,q)}if(typeof P.then=="function")return Pe(M,k,il(P),q);if(P.$$typeof===j)return Pe(M,k,nl(M,P),q);ol(M,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,k!==null&&k.tag===6?(i(M,k.sibling),q=d(k,P),q.return=M,M=q):(i(M,k),q=jc(P,M.mode,q),q.return=M,M=q),v(M)):i(M,k)}return function(M,k,P,q){try{wi=0;var le=Pe(M,k,P,q);return ha=null,le}catch(ae){if(ae===ca||ae===sl)throw ae;var Ae=nn(29,ae,null,M.mode);return Ae.lanes=q,Ae.return=M,Ae}}}var bs=lg(!0),ug=lg(!1),Rr=!1;function Fc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gc(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Ar(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Or(r,s,i){var l=r.updateQueue;if(l===null)return null;if(l=l.shared,(Ce&2)!==0){var d=l.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s,s=Xo(r),Zp(r,null,i),s}return Qo(r,l,s,i),Xo(r)}function Ei(r,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194048)!==0)){var l=s.lanes;l&=r.pendingLanes,i|=l,s.lanes=i,ep(r,i)}}function Zc(r,s){var i=r.updateQueue,l=r.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var d=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};p===null?d=p=v:p=p.next=v,i=i.next}while(i!==null);p===null?d=p=s:p=p.next=s}else d=p=s;i={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:l.shared,callbacks:l.callbacks},r.updateQueue=i;return}
vendor: 8,558 bytes, line 9
9r=i.lastBaseUpdate,r===null?i.firstBaseUpdate=s:r.next=s,i.lastBaseUpdate=s}var Vc=!1;function Ti(){if(Vc){var r=ua;if(r!==null)throw r}}function Ri(r,s,i,l){Vc=!1;var d=r.updateQueue;Rr=!1;var p=d.firstBaseUpdate,v=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var x=S,L=x.next;x.next=null,v===null?p=L:v.next=L,v=x;var H=r.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==v&&(S===null?H.firstBaseUpdate=L:S.next=L,H.lastBaseUpdate=x))}if(p!==null){var Z=d.baseState;v=0,H=L=x=null,S=p;do{var U=S.lane&-536870913,$=U!==S.lane;if($?(we&U)===U:(l&U)===U){U!==0&&U===la&&(Vc=!0),H!==null&&(H=H.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ne=r,he=S;U=s;var Pe=i;switch(he.tag){case 1:if(ne=he.payload,typeof ne=="function"){Z=ne.call(Pe,Z,U);break e}Z=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=he.payload,U=typeof ne=="function"?ne.call(Pe,Z,U):ne,U==null)break e;Z=y({},Z,U);break e;case 2:Rr=!0}}U=S.callback,U!==null&&(r.flags|=64,$&&(r.flags|=8192),$=d.callbacks,$===null?d.callbacks=[U]:$.push(U))}else $={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(L=H=$,x=Z):H=H.next=$,v|=U;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;$=S,S=$.next,$.next=null,d.lastBaseUpdate=$,d.shared.pending=null}}while(!0);H===null&&(x=Z),d.baseState=x,d.firstBaseUpdate=L,d.lastBaseUpdate=H,p===null&&(d.shared.lanes=0),zr|=v,r.lanes=v,r.memoizedState=Z}}function cg(r,s){if(typeof r!="function")throw Error(a(191,r));r.call(s)}function hg(r,s){var i=r.callbacks;if(i!==null)for(r.callbacks=null,r=0;r<i.length;r++)cg(i[r],s)}var da=C(null),ll=C(0);function dg(r,s){r=ir,W(ll,r),W(da,s),ir=r|s.baseLanes}function Kc(){W(ll,ir),W(da,da.current)}function Jc(){ir=ll.current,G(da),G(ll)}var rn=C(null),vn=null;function xr(r){var s=r.alternate;W(at,at.current&1),W(rn,r),vn===null&&(s===null||da.current!==null||s.memoizedState!==null)&&(vn=r)}function Yc(r){W(at,at.current),W(rn,r),vn===null&&(vn=r)}function fg(r){r.tag===22?(W(at,at.current),W(rn,r),vn===null&&(vn=r)):kr()}function kr(){W(at,at.current),W(rn,rn.current)}function sn(r){G(rn),vn===r&&(vn=null),G(at)}var at=C(0);function ul(r){for(var s=r;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||nd(i)||rd(i)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Xn=0,pe=null,De=null,ct=null,cl=!1,fa=!1,_s=!1,hl=0,Ai=0,pa=null,ZS=0;function et(){throw Error(a(321))}function Qc(r,s){if(s===null)return!1;for(var i=0;i<s.length&&i<r.length;i++)if(!tn(r[i],s[i]))return!1;return!0}function Xc(r,s,i,l,d,p){return Xn=p,pe=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=r===null||r.memoizedState===null?Yg:fh,_s=!1,p=i(l,d),_s=!1,fa&&(p=gg(s,i,l,d)),pg(r),p}function pg(r){B.H=ki;var s=De!==null&&De.next!==null;if(Xn=0,ct=De=pe=null,cl=!1,Ai=0,pa=null,s)throw Error(a(300));r===null||ht||(r=r.dependencies,r!==null&&tl(r)&&(ht=!0))}function gg(r,s,i,l){pe=r;var d=0;do{if(fa&&(pa=null),Ai=0,fa=!1,25<=d)throw Error(a(301));if(d+=1,ct=De=null,r.updateQueue!=null){var p=r.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}B.H=Qg,p=s(i,l)}while(fa);return p}function VS(){var r=B.H,s=r.useState()[0];return s=typeof s.then=="function"?Oi(s):s,r=r.useState()[0],(De!==null?De.memoizedState:null)!==r&&(pe.flags|=1024),s}function Wc(){var r=hl!==0;return hl=0,r}function eh(r,s,i){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~i}function th(r){if(cl){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}cl=!1}Xn=0,ct=De=pe=null,fa=!1,Ai=hl=0,pa=null}function Ut(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?pe.memoizedState=ct=r:ct=ct.next=r,ct}function it(){if(De===null){var r=pe.alternate;r=r!==null?r.memoizedState:null}else r=De.next;var s=ct===null?pe.memoizedState:ct.next;if(s!==null)ct=s,De=r;else{if(r===null)throw pe.alternate===null?Error(a(467)):Error(a(310));De=r,r={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},ct===null?pe.memoizedState=ct=r:ct=ct.next=r}return ct}function dl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oi(r){var s=Ai;return Ai+=1,pa===null&&(pa=[]),r=ag(pa,r,s),s=pe,(ct===null?s.memoizedState:ct.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?Yg:fh),r}function fl(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Oi(r);if(r.$$typeof===j)return Ot(r)}throw Error(a(438,String(r)))}function nh(r){var s=null,i=pe.updateQueue;if(i!==null&&(s=i.memoCache),s==null){var l=pe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(s={data:l.data.map(function(d){return d.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),i===null&&(i=dl(),pe.updateQueue=i),i.memoCache=s,i=s.data[s.index],i===void 0)for(i=s.data[s.index]=Array(r),l=0;l<r;l++)i[l]=oe;return s.index++,i}function Wn(r,s){return typeof s=="function"?s(r):s}function pl(r){var s=it();return rh(s,De,r)}function rh(r,s,i){var l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var d=r.baseQueue,p=l.pending;if(p!==null){if(d!==null){var v=d.next;d.next=p.next,p.next=v}s.baseQueue=d=p,l.pending=null}if(p=r.baseState,d===null)r.memoizedState=p;else{s=d.next;var S=v=null,x=null,L=s,H=!1;do{var Z=L.lane&-536870913;if(Z!==L.lane?(we&Z)===Z:(Xn&Z)===Z){var U=L.revertLane;if(U===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Z===la&&(H=!0);else if((Xn&U)===U){L=L.next,U===la&&(H=!0);continue}else Z={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},x===null?(S=x=Z,v=p):x=x.next=Z,pe.lanes|=U,zr|=U;Z=L.action,_s&&i(p,Z),p=L.hasEagerState?L.eagerState:i(p,Z)}else U={lane:Z,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},x===null?(S=x=U,v=p):x=x.next=U,pe.lanes|=Z,zr|=Z;L=L.next}while(L!==null&&L!==s);if(x===null?v=p:x.next=S,!tn(p,r.memoizedState)&&(ht=!0,H&&(i=ua,i!==null)))throw i;r.memoizedState=p,r.baseState=v,r.baseQueue=x,l.lastRenderedState=p}return d===null&&(l.lanes=0),[r.memoizedState,l.dispatch]}function sh(r){var s=it(),i=s.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=r;var l=i.dispatch,d=i.pending,p=s.memoizedState;if(d!==null){i.pending=null;var v=d=d.next;do p=r(p,v.action),v=v.next;while(v!==d);tn(p,s.memoizedState)||(ht=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),i.lastRenderedState=p}return[p,l]}function mg(r,s,i){var l=pe,d=it(),p=Ee;if(p){if(i===void 0)throw Error(a(407));i=i()}else i=s();var v=!tn((De||d).memoizedState,i);if(v&&(d.memoizedState=i,ht=!0),d=d.queue,oh(bg.bind(null,l,d,r),[r]),d.getSnapshot!==s||v||ct!==null&&ct.memoizedState.tag&1){if(l.flags|=2048,ga(9,{destroy:void 0},vg.bind(null,l,d,i,s),null),$e===null)throw Error(a(349));p||(Xn&127)!==0||yg(l,s,i)}return i}function yg(r,s,i){r.flags|=16384,r={getSnapshot:s,value:i},s=pe.updateQueue,s===null?(s=dl(),pe.updateQueue=s,s.stores=[r]):(i=s.stores,i===null?s.stores=[r]:i.push(r))}function vg(r,s,i,l){s.value=i,s.getSnapshot=l,_g(s)&&wg(r)}function bg(r,s,i){return i(function(){_g(s)&&wg(r)})}function _g(r){var s=r.getSnapshot;r=r.value;try{var i=s();return!tn(r,i)}catch{return!0}}function wg(r){var s=hs(r,2);s!==null&&Vt(s,r,2)}function ah(r){var s=Ut();if(typeof r=="function"){var i=r;if(r=i(),_s){vr(!0);try{i()}finally{vr(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:r},s}function Sg(r,s,i,l){return r.baseState=i,rh(r,De,typeof l=="function"?l:Wn)}function KS(r,s,i,l,d){if(yl(r))throw Error(a(485));if(r=s.action,r!==null){var p={payload:d,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};B.T!==null?i(!0):p.isTransition=!1,l(p),i=s.pending,i===null?(p.next=s.pending=p,Eg(s,p)):(p.next=i.next,
vendor: 7,305 bytes, line 9
9s.pending=i.next=p)}}function Eg(r,s){var i=s.action,l=s.payload,d=r.state;if(s.isTransition){var p=B.T,v={};B.T=v;try{var S=i(d,l),x=B.S;x!==null&&x(v,S),Tg(r,s,S)}catch(L){ih(r,s,L)}finally{p!==null&&v.types!==null&&(p.types=v.types),B.T=p}}else try{p=i(d,l),Tg(r,s,p)}catch(L){ih(r,s,L)}}function Tg(r,s,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Rg(r,s,l)},function(l){return ih(r,s,l)}):Rg(r,s,i)}function Rg(r,s,i){s.status="fulfilled",s.value=i,Ag(s),r.state=i,s=r.pending,s!==null&&(i=s.next,i===s?r.pending=null:(i=i.next,s.next=i,Eg(r,i)))}function ih(r,s,i){var l=r.pending;if(r.pending=null,l!==null){l=l.next;do s.status="rejected",s.reason=i,Ag(s),s=s.next;while(s!==l)}r.action=null}function Ag(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function Og(r,s){return s}function xg(r,s){if(Ee){var i=$e.formState;if(i!==null){e:{var l=pe;if(Ee){if(Ve){t:{for(var d=Ve,p=yn;d.nodeType!==8;){if(!p){d=null;break t}if(d=bn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){Ve=bn(d.nextSibling),l=d.data==="F!";break e}}Er(l)}l=!1}l&&(s=i[0])}}return i=Ut(),i.memoizedState=i.baseState=s,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Og,lastRenderedState:s},i.queue=l,i=Vg.bind(null,pe,l),l.dispatch=i,l=ah(!1),p=dh.bind(null,pe,!1,l.queue),l=Ut(),d={state:s,dispatch:null,action:r,pending:null},l.queue=d,i=KS.bind(null,pe,d,p,i),d.dispatch=i,l.memoizedState=r,[s,i,!1]}function kg(r){var s=it();return Cg(s,De,r)}function Cg(r,s,i){if(s=rh(r,s,Og)[0],r=pl(Wn)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var l=Oi(s)}catch(v){throw v===ca?sl:v}else l=s;s=it();var d=s.queue,p=d.dispatch;return i!==s.memoizedState&&(pe.flags|=2048,ga(9,{destroy:void 0},JS.bind(null,d,i),null)),[l,p,r]}function JS(r,s){r.action=s}function jg(r){var s=it(),i=De;if(i!==null)return Cg(s,i,r);it(),s=s.memoizedState,i=it();var l=i.queue.dispatch;return i.memoizedState=r,[s,l,!1]}function ga(r,s,i,l){return r={tag:r,create:i,deps:l,inst:s,next:null},s=pe.updateQueue,s===null&&(s=dl(),pe.updateQueue=s),i=s.lastEffect,i===null?s.lastEffect=r.next=r:(l=i.next,i.next=r,r.next=l,s.lastEffect=r),r}function zg(){return it().memoizedState}function gl(r,s,i,l){var d=Ut();pe.flags|=r,d.memoizedState=ga(1|s,{destroy:void 0},i,l===void 0?null:l)}function ml(r,s,i,l){var d=it();l=l===void 0?null:l;var p=d.memoizedState.inst;De!==null&&l!==null&&Qc(l,De.memoizedState.deps)?d.memoizedState=ga(s,p,i,l):(pe.flags|=r,d.memoizedState=ga(1|s,p,i,l))}function Ng(r,s){gl(8390656,8,r,s)}function oh(r,s){ml(2048,8,r,s)}function YS(r){pe.flags|=4;var s=pe.updateQueue;if(s===null)s=dl(),pe.updateQueue=s,s.events=[r];else{var i=s.events;i===null?s.events=[r]:i.push(r)}}function Dg(r){var s=it().memoizedState;return YS({ref:s,nextImpl:r}),function(){if((Ce&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function Mg(r,s){return ml(4,2,r,s)}function Pg(r,s){return ml(4,4,r,s)}function Lg(r,s){if(typeof s=="function"){r=r();var i=s(r);return function(){typeof i=="function"?i():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Ug(r,s,i){i=i!=null?i.concat([r]):null,ml(4,4,Lg.bind(null,s,r),i)}function lh(){}function $g(r,s){var i=it();s=s===void 0?null:s;var l=i.memoizedState;return s!==null&&Qc(s,l[1])?l[0]:(i.memoizedState=[r,s],r)}function Ig(r,s){var i=it();s=s===void 0?null:s;var l=i.memoizedState;if(s!==null&&Qc(s,l[1]))return l[0];if(l=r(),_s){vr(!0);try{r()}finally{vr(!1)}}return i.memoizedState=[l,s],l}function uh(r,s,i){return i===void 0||(Xn&1073741824)!==0&&(we&261930)===0?r.memoizedState=s:(r.memoizedState=i,r=Bm(),pe.lanes|=r,zr|=r,i)}function Bg(r,s,i,l){return tn(i,s)?i:da.current!==null?(r=uh(r,i,l),tn(r,s)||(ht=!0),r):(Xn&42)===0||(Xn&1073741824)!==0&&(we&261930)===0?(ht=!0,r.memoizedState=i):(r=Bm(),pe.lanes|=r,zr|=r,s)}function Hg(r,s,i,l,d){var p=Q.p;Q.p=p!==0&&8>p?p:8;var v=B.T,S={};B.T=S,dh(r,!1,s,i);try{var x=d(),L=B.S;if(L!==null&&L(S,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var H=GS(x,l);xi(r,s,H,ln(r))}else xi(r,s,l,ln(r))}catch(Z){xi(r,s,{then:function(){},status:"rejected",reason:Z},ln())}finally{Q.p=p,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function QS(){}function ch(r,s,i,l){if(r.tag!==5)throw Error(a(476));var d=qg(r).queue;Hg(r,d,s,ce,i===null?QS:function(){return Fg(r),i(l)})}function qg(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:ce},next:null};var i={};return s.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:i},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function Fg(r){var s=qg(r);s.next===null&&(s=r.alternate.memoizedState),xi(r,s.next.queue,{},ln())}function hh(){return Ot(Gi)}function Gg(){return it().memoizedState}function Zg(){return it().memoizedState}function XS(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var i=ln();r=Ar(i);var l=Or(s,r,i);l!==null&&(Vt(l,s,i),Ei(l,s,i)),s={cache:Ic()},r.payload=s;return}s=s.return}}function WS(r,s,i){var l=ln();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yl(r)?Kg(s,i):(i=kc(r,s,i,l),i!==null&&(Vt(i,r,l),Jg(i,s,l)))}function Vg(r,s,i){var l=ln();xi(r,s,i,l)}function xi(r,s,i,l){var d={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(yl(r))Kg(s,d);else{var p=r.alternate;if(r.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var v=s.lastRenderedState,S=p(v,i);if(d.hasEagerState=!0,d.eagerState=S,tn(S,v))return Qo(r,s,d,0),$e===null&&Yo(),!1}catch{}if(i=kc(r,s,d,l),i!==null)return Vt(i,r,l),Jg(i,s,l),!0}return!1}function dh(r,s,i,l){if(l={lane:2,revertLane:Fh(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yl(r)){if(s)throw Error(a(479))}else s=kc(r,i,l,2),s!==null&&Vt(s,r,2)}function yl(r){var s=r.alternate;return r===pe||s!==null&&s===pe}function Kg(r,s){fa=cl=!0;var i=r.pending;i===null?s.next=s:(s.next=i.next,i.next=s),r.pending=s}function Jg(r,s,i){if((i&4194048)!==0){var l=s.lanes;l&=r.pendingLanes,i|=l,s.lanes=i,ep(r,i)}}var ki={readContext:Ot,use:fl,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};ki.useEffectEvent=et;var Yg={readContext:Ot,use:fl,useCallback:function(r,s){return Ut().memoizedState=[r,s===void 0?null:s],r},useContext:Ot,useEffect:Ng,useImperativeHandle:function(r,s,i){i=i!=null?i.concat([r]):null,gl(4194308,4,Lg.bind(null,s,r),i)},useLayoutEffect:function(r,s){return gl(4194308,4,r,s)},useInsertionEffect:function(r,s){gl(4,2,r,s)},useMemo:function(r,s){var i=Ut();s=s===void 0?null:s;var l=r();if(_s){vr(!0);try{r()}finally{vr(!1)}}return i.memoizedState=[l,s],l},useReducer:function(r,s,i){var l=Ut();if(i!==void 0){var d=i(s);if(_s){vr(!0);try{i(s)}finally{vr(!1)}}}else d=s;
vendor: 8,078 bytes, line 9
9return l.memoizedState=l.baseState=d,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:d},l.queue=r,r=r.dispatch=WS.bind(null,pe,r),[l.memoizedState,r]},useRef:function(r){var s=Ut();return r={current:r},s.memoizedState=r},useState:function(r){r=ah(r);var s=r.queue,i=Vg.bind(null,pe,s);return s.dispatch=i,[r.memoizedState,i]},useDebugValue:lh,useDeferredValue:function(r,s){var i=Ut();return uh(i,r,s)},useTransition:function(){var r=ah(!1);return r=Hg.bind(null,pe,r.queue,!0,!1),Ut().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,i){var l=pe,d=Ut();if(Ee){if(i===void 0)throw Error(a(407));i=i()}else{if(i=s(),$e===null)throw Error(a(349));(we&127)!==0||yg(l,s,i)}d.memoizedState=i;var p={value:i,getSnapshot:s};return d.queue=p,Ng(bg.bind(null,l,p,r),[r]),l.flags|=2048,ga(9,{destroy:void 0},vg.bind(null,l,p,i,s),null),i},useId:function(){var r=Ut(),s=$e.identifierPrefix;if(Ee){var i=Dn,l=Nn;i=(l&~(1<<32-en(l)-1)).toString(32)+i,s="_"+s+"R_"+i,i=hl++,0<i&&(s+="H"+i.toString(32)),s+="_"}else i=ZS++,s="_"+s+"r_"+i.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:hh,useFormState:xg,useActionState:xg,useOptimistic:function(r){var s=Ut();s.memoizedState=s.baseState=r;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=i,s=dh.bind(null,pe,!0,i),i.dispatch=s,[r,s]},useMemoCache:nh,useCacheRefresh:function(){return Ut().memoizedState=XS.bind(null,pe)},useEffectEvent:function(r){var s=Ut(),i={impl:r};return s.memoizedState=i,function(){if((Ce&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},fh={readContext:Ot,use:fl,useCallback:$g,useContext:Ot,useEffect:oh,useImperativeHandle:Ug,useInsertionEffect:Mg,useLayoutEffect:Pg,useMemo:Ig,useReducer:pl,useRef:zg,useState:function(){return pl(Wn)},useDebugValue:lh,useDeferredValue:function(r,s){var i=it();return Bg(i,De.memoizedState,r,s)},useTransition:function(){var r=pl(Wn)[0],s=it().memoizedState;return[typeof r=="boolean"?r:Oi(r),s]},useSyncExternalStore:mg,useId:Gg,useHostTransitionStatus:hh,useFormState:kg,useActionState:kg,useOptimistic:function(r,s){var i=it();return Sg(i,De,r,s)},useMemoCache:nh,useCacheRefresh:Zg};fh.useEffectEvent=Dg;var Qg={readContext:Ot,use:fl,useCallback:$g,useContext:Ot,useEffect:oh,useImperativeHandle:Ug,useInsertionEffect:Mg,useLayoutEffect:Pg,useMemo:Ig,useReducer:sh,useRef:zg,useState:function(){return sh(Wn)},useDebugValue:lh,useDeferredValue:function(r,s){var i=it();return De===null?uh(i,r,s):Bg(i,De.memoizedState,r,s)},useTransition:function(){var r=sh(Wn)[0],s=it().memoizedState;return[typeof r=="boolean"?r:Oi(r),s]},useSyncExternalStore:mg,useId:Gg,useHostTransitionStatus:hh,useFormState:jg,useActionState:jg,useOptimistic:function(r,s){var i=it();return De!==null?Sg(i,De,r,s):(i.baseState=r,[r,i.queue.dispatch])},useMemoCache:nh,useCacheRefresh:Zg};Qg.useEffectEvent=Dg;function ph(r,s,i,l){s=r.memoizedState,i=i(l,s),i=i==null?s:y({},s,i),r.memoizedState=i,r.lanes===0&&(r.updateQueue.baseState=i)}var gh={enqueueSetState:function(r,s,i){r=r._reactInternals;var l=ln(),d=Ar(l);d.payload=s,i!=null&&(d.callback=i),s=Or(r,d,l),s!==null&&(Vt(s,r,l),Ei(s,r,l))},enqueueReplaceState:function(r,s,i){r=r._reactInternals;var l=ln(),d=Ar(l);d.tag=1,d.payload=s,i!=null&&(d.callback=i),s=Or(r,d,l),s!==null&&(Vt(s,r,l),Ei(s,r,l))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var i=ln(),l=Ar(i);l.tag=2,s!=null&&(l.callback=s),s=Or(r,l,i),s!==null&&(Vt(s,r,i),Ei(s,r,i))}};function Xg(r,s,i,l,d,p,v){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(l,p,v):s.prototype&&s.prototype.isPureReactComponent?!gi(i,l)||!gi(d,p):!0}function Wg(r,s,i,l){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,l),s.state!==r&&gh.enqueueReplaceState(s,s.state,null)}function ws(r,s){var i=s;if("ref"in s){i={};for(var l in s)l!=="ref"&&(i[l]=s[l])}if(r=r.defaultProps){i===s&&(i=y({},i));for(var d in r)i[d]===void 0&&(i[d]=r[d])}return i}function em(r){Jo(r)}function tm(r){console.error(r)}function nm(r){Jo(r)}function vl(r,s){try{var i=r.onUncaughtError;i(s.value,{componentStack:s.stack})}catch(l){setTimeout(function(){throw l})}}function rm(r,s,i){try{var l=r.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function mh(r,s,i){return i=Ar(i),i.tag=3,i.payload={element:null},i.callback=function(){vl(r,s)},i}function sm(r){return r=Ar(r),r.tag=3,r}function am(r,s,i,l){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var p=l.value;r.payload=function(){return d(p)},r.callback=function(){rm(s,i,l)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(r.callback=function(){rm(s,i,l),typeof d!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function eE(r,s,i,l,d){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(s=i.alternate,s!==null&&oa(s,i,d,!0),i=rn.current,i!==null){switch(i.tag){case 31:case 13:return vn===null?Cl():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,l===al?i.flags|=16384:(s=i.updateQueue,s===null?i.updateQueue=new Set([l]):s.add(l),Bh(r,l,d)),!1;case 22:return i.flags|=65536,l===al?i.flags|=16384:(s=i.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=s):(i=s.retryQueue,i===null?s.retryQueue=new Set([l]):i.add(l)),Bh(r,l,d)),!1}throw Error(a(435,i.tag))}return Bh(r,l,d),Cl(),!1}if(Ee)return s=rn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=d,l!==Mc&&(r=Error(a(422),{cause:l}),vi(pn(r,i)))):(l!==Mc&&(s=Error(a(423),{cause:l}),vi(pn(s,i))),r=r.current.alternate,r.flags|=65536,d&=-d,r.lanes|=d,l=pn(l,i),d=mh(r.stateNode,l,d),Zc(r,d),tt!==4&&(tt=2)),!1;var p=Error(a(520),{cause:l});if(p=pn(p,i),Li===null?Li=[p]:Li.push(p),tt!==4&&(tt=2),s===null)return!0;l=pn(l,i),i=s;do{switch(i.tag){case 3:return i.flags|=65536,r=d&-d,i.lanes|=r,r=mh(i.stateNode,l,r),Zc(i,r),!1;case 1:if(s=i.type,p=i.stateNode,(i.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Nr===null||!Nr.has(p))))return i.flags|=65536,d&=-d,i.lanes|=d,d=sm(d),am(d,r,i,l),Zc(i,d),!1}i=i.return}while(i!==null);return!1}var yh=Error(a(461)),ht=!1;function xt(r,s,i,l){s.child=r===null?ug(s,null,i,l):bs(s,r.child,i,l)}function im(r,s,i,l,d){i=i.render;var p=s.ref;if("ref"in l){var v={};for(var S in l)S!=="ref"&&(v[S]=l[S])}else v=l;return gs(s),l=Xc(r,s,i,v,p,d),S=Wc(),r!==null&&!ht?(eh(r,s,d),er(r,s,d)):(Ee&&S&&Nc(s),s.flags|=1,xt(r,s,l,d),s.child)}function om(r,s,i,l,d){if(r===null){var p=i.type;return typeof p=="function"&&!Cc(p)&&p.defaultProps===void 0&&i.compare===null?(s.tag=15,s.type=p,lm(r,s,p,l,d)):(r=Wo(i.type,null,l,s,s.mode,d),r.ref=s.ref,r.return=s,s.child=r)}if(p=r.child,!Rh(r,d)){var v=p.memoizedProps;if(i=i.compare,i=i!==null?i:gi,i(v,l)&&r.ref===s.ref)return er(r,s,d)}return s.flags|=1,r=Kn(p,l),r.ref=s.ref,r.return=s,s.child=r}function lm(r,s,i,l,d){if(r!==null){var p=r.memoizedProps;if(gi(p,l)&&r.ref===s.ref)if(ht=!1,s.pendingProps=l=p,Rh(r,d))(r.flags&131072)!==0&&(ht=!0);else return s.lanes=r.lanes,er(r,s,d)}return vh(r,s,i,l,d)}function um(r,s,i,l){var d=l.children,p=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|i:i,r!==null){for(l=s.child=r.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~p}else l=0,s.child=null;return cm(r,s,p,i,l)}if((i&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&rl(s,p!==null?p.cachePool:null),p!==null?dg(s,p):Kc(),fg(s);else return l=s.lanes=536870912,cm(r,s,p!==null?p.baseLanes|i:i,i,l)}
vendor: 11,806 bytes, line 9
9else p!==null?(rl(s,p.cachePool),dg(s,p),kr(),s.memoizedState=null):(r!==null&&rl(s,null),Kc(),kr());return xt(r,s,d,i),s.child}function Ci(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function cm(r,s,i,l,d){var p=Hc();return p=p===null?null:{parent:ut._currentValue,pool:p},s.memoizedState={baseLanes:i,cachePool:p},r!==null&&rl(s,null),Kc(),fg(s),r!==null&&oa(r,s,l,!0),s.childLanes=d,null}function bl(r,s){return s=wl({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function hm(r,s,i){return bs(s,r.child,null,i),r=bl(s,s.pendingProps),r.flags|=2,sn(s),s.memoizedState=null,r}function tE(r,s,i){var l=s.pendingProps,d=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(Ee){if(l.mode==="hidden")return r=bl(s,l),s.lanes=536870912,Ci(null,r);if(Yc(s),(r=Ve)?(r=Ey(r,yn),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:wr!==null?{id:Nn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},i=Kp(r),i.return=s,s.child=i,At=s,Ve=null)):r=null,r===null)throw Er(s);return s.lanes=536870912,null}return bl(s,l)}var p=r.memoizedState;if(p!==null){var v=p.dehydrated;if(Yc(s),d)if(s.flags&256)s.flags&=-257,s=hm(r,s,i);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(a(558));else if(ht||oa(r,s,i,!1),d=(i&r.childLanes)!==0,ht||d){if(l=$e,l!==null&&(v=tp(l,i),v!==0&&v!==p.retryLane))throw p.retryLane=v,hs(r,v),Vt(l,r,v),yh;Cl(),s=hm(r,s,i)}else r=p.treeContext,Ve=bn(v.nextSibling),At=s,Ee=!0,Sr=null,yn=!1,r!==null&&Qp(s,r),s=bl(s,l),s.flags|=4096;return s}return r=Kn(r.child,{mode:l.mode,children:l.children}),r.ref=s.ref,s.child=r,r.return=s,r}function _l(r,s){var i=s.ref;if(i===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(r===null||r.ref!==i)&&(s.flags|=4194816)}}function vh(r,s,i,l,d){return gs(s),i=Xc(r,s,i,l,void 0,d),l=Wc(),r!==null&&!ht?(eh(r,s,d),er(r,s,d)):(Ee&&l&&Nc(s),s.flags|=1,xt(r,s,i,d),s.child)}function dm(r,s,i,l,d,p){return gs(s),s.updateQueue=null,i=gg(s,l,i,d),pg(r),l=Wc(),r!==null&&!ht?(eh(r,s,p),er(r,s,p)):(Ee&&l&&Nc(s),s.flags|=1,xt(r,s,i,p),s.child)}function fm(r,s,i,l,d){if(gs(s),s.stateNode===null){var p=ra,v=i.contextType;typeof v=="object"&&v!==null&&(p=Ot(v)),p=new i(l,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=gh,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=l,p.state=s.memoizedState,p.refs={},Fc(s),v=i.contextType,p.context=typeof v=="object"&&v!==null?Ot(v):ra,p.state=s.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(ph(s,i,v,l),p.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&gh.enqueueReplaceState(p,p.state,null),Ri(s,l,p,d),Ti(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),l=!0}else if(r===null){p=s.stateNode;var S=s.memoizedProps,x=ws(i,S);p.props=x;var L=p.context,H=i.contextType;v=ra,typeof H=="object"&&H!==null&&(v=Ot(H));var Z=i.getDerivedStateFromProps;H=typeof Z=="function"||typeof p.getSnapshotBeforeUpdate=="function",S=s.pendingProps!==S,H||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S||L!==v)&&Wg(s,p,l,v),Rr=!1;var U=s.memoizedState;p.state=U,Ri(s,l,p,d),Ti(),L=s.memoizedState,S||U!==L||Rr?(typeof Z=="function"&&(ph(s,i,Z,l),L=s.memoizedState),(x=Rr||Xg(s,i,x,l,U,L,v))?(H||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=L),p.props=l,p.state=L,p.context=v,l=x):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{p=s.stateNode,Gc(r,s),v=s.memoizedProps,H=ws(i,v),p.props=H,Z=s.pendingProps,U=p.context,L=i.contextType,x=ra,typeof L=="object"&&L!==null&&(x=Ot(L)),S=i.getDerivedStateFromProps,(L=typeof S=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==Z||U!==x)&&Wg(s,p,l,x),Rr=!1,U=s.memoizedState,p.state=U,Ri(s,l,p,d),Ti();var $=s.memoizedState;v!==Z||U!==$||Rr||r!==null&&r.dependencies!==null&&tl(r.dependencies)?(typeof S=="function"&&(ph(s,i,S,l),$=s.memoizedState),(H=Rr||Xg(s,i,H,l,U,$,x)||r!==null&&r.dependencies!==null&&tl(r.dependencies))?(L||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,$,x),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,$,x)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===r.memoizedProps&&U===r.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===r.memoizedProps&&U===r.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=$),p.props=l,p.state=$,p.context=x,l=H):(typeof p.componentDidUpdate!="function"||v===r.memoizedProps&&U===r.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===r.memoizedProps&&U===r.memoizedState||(s.flags|=1024),l=!1)}return p=l,_l(r,s),l=(s.flags&128)!==0,p||l?(p=s.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,r!==null&&l?(s.child=bs(s,r.child,null,d),s.child=bs(s,null,i,d)):xt(r,s,i,d),s.memoizedState=p.state,r=s.child):r=er(r,s,d),r}function pm(r,s,i,l){return fs(),s.flags|=256,xt(r,s,i,l),s.child}var bh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _h(r){return{baseLanes:r,cachePool:rg()}}function wh(r,s,i){return r=r!==null?r.childLanes&~i:0,s&&(r|=on),r}function gm(r,s,i){var l=s.pendingProps,d=!1,p=(s.flags&128)!==0,v;if((v=p)||(v=r!==null&&r.memoizedState===null?!1:(at.current&2)!==0),v&&(d=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,r===null){if(Ee){if(d?xr(s):kr(),(r=Ve)?(r=Ey(r,yn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:wr!==null?{id:Nn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},i=Kp(r),i.return=s,s.child=i,At=s,Ve=null)):r=null,r===null)throw Er(s);return rd(r)?s.lanes=32:s.lanes=536870912,null}var S=l.children;return l=l.fallback,d?(kr(),d=s.mode,S=wl({mode:"hidden",children:S},d),l=ds(l,d,i,null),S.return=s,l.return=s,S.sibling=l,s.child=S,l=s.child,l.memoizedState=_h(i),l.childLanes=wh(r,v,i),s.memoizedState=bh,Ci(null,l)):(xr(s),Sh(s,S))}var x=r.memoizedState;if(x!==null&&(S=x.dehydrated,S!==null)){if(p)s.flags&256?(xr(s),s.flags&=-257,s=Eh(r,s,i)):s.memoizedState!==null?(kr(),s.child=r.child,s.flags|=128,s=null):(kr(),S=l.fallback,d=s.mode,l=wl({mode:"visible",children:l.children},d),S=ds(S,d,i,null),S.flags|=2,l.return=s,S.return=s,l.sibling=S,s.child=l,bs(s,r.child,null,i),l=s.child,l.memoizedState=_h(i),l.childLanes=wh(r,v,i),s.memoizedState=bh,s=Ci(null,l));else if(xr(s),rd(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var L=v.dgst;v=L,l=Error(a(419)),l.stack="",l.digest=v,vi({value:l,source:null,stack:null}),s=Eh(r,s,i)}else if(ht||oa(r,s,i,!1),v=(i&r.childLanes)!==0,ht||v){if(v=$e,v!==null&&(l=tp(v,i),l!==0&&l!==x.retryLane))throw x.retryLane=l,hs(r,l),Vt(v,r,l),yh;nd(S)||Cl(),s=Eh(r,s,i)}else nd(S)?(s.flags|=192,s.child=r.child,s=null):(r=x.treeContext,Ve=bn(S.nextSibling),At=s,Ee=!0,Sr=null,yn=!1,r!==null&&Qp(s,r),s=Sh(s,l.children),s.flags|=4096);return s}return d?(kr(),S=l.fallback,d=s.mode,x=r.child,L=x.sibling,l=Kn(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,L!==null?S=Kn(L,S):(S=ds(S,d,i,null),S.flags|=2),S.return=s,l.return=s,l.sibling=S,s.child=l,Ci(null,l),l=s.child,S=r.child.memoizedState,S===null?S=_h(i):(d=S.cachePool,d!==null?(x=ut._currentValue,d=d.parent!==x?{parent:x,pool:x}:d):d=rg(),S={baseLanes:S.baseLanes|i,cachePool:d}),l.memoizedState=S,l.childLanes=wh(r,v,i),s.memoizedState=bh,Ci(r.child,l)):(xr(s),i=r.child,r=i.sibling,i=Kn(i,{mode:"visible",children:l.children}),i.return=s,i.sibling=null,r!==null&&(v=s.deletions,v===null?(s.deletions=[r],s.flags|=16):v.push(r)),s.child=i,s.memoizedState=null,i)}function Sh(r,s){return s=wl({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function wl(r,s){return r=nn(22,r,null,s),r.lanes=0,r}function Eh(r,s,i){return bs(s,r.child,null,i),r=Sh(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function mm(r,s,i){r.lanes|=s;var l=r.alternate;l!==null&&(l.lanes|=s),Uc(r.return,s,i)}function Th(r,s,i,l,d,p){var v=r.memoizedState;v===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:d,treeForkCount:p}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=i,v.tailMode=d,v.treeForkCount=p)}function ym(r,s,i){var l=s.pendingProps,d=l.revealOrder,p=l.tail;l=l.children;var v=at.current,S=(v&2)!==0;if(S?(v=v&1|2,s.flags|=128):v&=1,W(at,v),xt(r,s,l,i),l=Ee?yi:0,!S&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&mm(r,i,s);else if(r.tag===19)mm(r,i,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(d){case"forwards":for(i=s.child,d=null;i!==null;)r=i.alternate,r!==null&&ul(r)===null&&(d=i),i=i.sibling;i=d,i===null?(d=s.child,s.child=null):(d=i.sibling,i.sibling=null),Th(s,!1,d,i,p,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=s.child,s.child=null;d!==null;){if(r=d.alternate,r!==null&&ul(r)===null){s.child=d;break}r=d.sibling,d.sibling=i,i=d,d=r}Th(s,!0,i,null,p,l);break;case"together":Th(s,!1,null,null,void 0,l);break;default:s.memoizedState=null}return s.child}function er(r,s,i){if(r!==null&&(s.dependencies=r.dependencies),zr|=s.lanes,(i&s.childLanes)===0)if(r!==null){if(oa(r,s,i,!1),(i&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(a(153));if(s.child!==null){for(r=s.child,i=Kn(r,r.pendingProps),s.child=i,i.return=s;r.sibling!==null;)r=r.sibling,i=i.sibling=Kn(r,r.pendingProps),i.return=s;i.sibling=null}return s.child}function Rh(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&tl(r)))}function nE(r,s,i){switch(s.tag){case 3:st(s,s.stateNode.containerInfo),Tr(s,ut,r.memoizedState.cache),fs();break;case 27:case 5:Hn(s);break;case 4:st(s,s.stateNode.containerInfo);break;case 10:Tr(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Yc(s),null;break;case 13:var l=s.memoizedState;if(l!==null)return l.dehydrated!==null?(xr(s),s.flags|=128,null):(i&s.child.childLanes)!==0?gm(r,s,i):(xr(s),r=er(r,s,i),r!==null?r.sibling:null);xr(s);break;case 19:var d=(r.flags&128)!==0;if(l=(i&s.childLanes)!==0,l||(oa(r,s,i,!1),l=(i&s.childLanes)!==0),d){if(l)return ym(r,s,i);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),W(at,at.current),l)break;return null;case 22:return s.lanes=0,um(r,s,i,s.pendingProps);case 24:Tr(s,ut,r.memoizedState.cache)}return er(r,s,i)}function vm(r,s,i){if(r!==null)if(r.memoizedProps!==s.pendingProps)ht=!0;
vendor: 4,374 bytes, line 9
9else{if(!Rh(r,i)&&(s.flags&128)===0)return ht=!1,nE(r,s,i);ht=(r.flags&131072)!==0}else ht=!1,Ee&&(s.flags&1048576)!==0&&Yp(s,yi,s.index);switch(s.lanes=0,s.tag){case 16:e:{var l=s.pendingProps;if(r=ys(s.elementType),s.type=r,typeof r=="function")Cc(r)?(l=ws(r,l),s.tag=1,s=fm(null,s,r,l,i)):(s.tag=0,s=vh(null,s,r,l,i));else{if(r!=null){var d=r.$$typeof;if(d===D){s.tag=11,s=im(null,s,r,l,i);break e}else if(d===I){s.tag=14,s=om(null,s,r,l,i);break e}}throw s=rt(r)||r,Error(a(306,s,""))}}return s;case 0:return vh(r,s,s.type,s.pendingProps,i);case 1:return l=s.type,d=ws(l,s.pendingProps),fm(r,s,l,d,i);case 3:e:{if(st(s,s.stateNode.containerInfo),r===null)throw Error(a(387));l=s.pendingProps;var p=s.memoizedState;d=p.element,Gc(r,s),Ri(s,l,null,i);var v=s.memoizedState;if(l=v.cache,Tr(s,ut,l),l!==p.cache&&$c(s,[ut],i,!0),Ti(),l=v.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=pm(r,s,l,i);break e}else if(l!==d){d=pn(Error(a(424)),s),vi(d),s=pm(r,s,l,i);break e}else for(r=s.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Ve=bn(r.firstChild),At=s,Ee=!0,Sr=null,yn=!0,i=ug(s,null,l,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(fs(),l===d){s=er(r,s,i);break e}xt(r,s,l,i)}s=s.child}return s;case 26:return _l(r,s),r===null?(i=ky(s.type,null,s.pendingProps,null))?s.memoizedState=i:Ee||(i=s.type,r=s.pendingProps,l=Ll(ve.current).createElement(i),l[Rt]=s,l[Bt]=r,kt(l,i,r),bt(l),s.stateNode=l):s.memoizedState=ky(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return Hn(s),r===null&&Ee&&(l=s.stateNode=Ay(s.type,s.pendingProps,ve.current),At=s,yn=!0,d=Ve,Lr(s.type)?(sd=d,Ve=bn(l.firstChild)):Ve=d),xt(r,s,s.pendingProps.children,i),_l(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&Ee&&((d=l=Ve)&&(l=zE(l,s.type,s.pendingProps,yn),l!==null?(s.stateNode=l,At=s,Ve=bn(l.firstChild),yn=!1,d=!0):d=!1),d||Er(s)),Hn(s),d=s.type,p=s.pendingProps,v=r!==null?r.memoizedProps:null,l=p.children,Wh(d,p)?l=null:v!==null&&Wh(d,v)&&(s.flags|=32),s.memoizedState!==null&&(d=Xc(r,s,VS,null,null,i),Gi._currentValue=d),_l(r,s),xt(r,s,l,i),s.child;case 6:return r===null&&Ee&&((r=i=Ve)&&(i=NE(i,s.pendingProps,yn),i!==null?(s.stateNode=i,At=s,Ve=null,r=!0):r=!1),r||Er(s)),null;case 13:return gm(r,s,i);case 4:return st(s,s.stateNode.containerInfo),l=s.pendingProps,r===null?s.child=bs(s,null,l,i):xt(r,s,l,i),s.child;case 11:return im(r,s,s.type,s.pendingProps,i);case 7:return xt(r,s,s.pendingProps,i),s.child;case 8:return xt(r,s,s.pendingProps.children,i),s.child;case 12:return xt(r,s,s.pendingProps.children,i),s.child;case 10:return l=s.pendingProps,Tr(s,s.type,l.value),xt(r,s,l.children,i),s.child;case 9:return d=s.type._context,l=s.pendingProps.children,gs(s),d=Ot(d),l=l(d),s.flags|=1,xt(r,s,l,i),s.child;case 14:return om(r,s,s.type,s.pendingProps,i);case 15:return lm(r,s,s.type,s.pendingProps,i);case 19:return ym(r,s,i);case 31:return tE(r,s,i);case 22:return um(r,s,i,s.pendingProps);case 24:return gs(s),l=Ot(ut),r===null?(d=Hc(),d===null&&(d=$e,p=Ic(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=i),d=p),s.memoizedState={parent:l,cache:d},Fc(s),Tr(s,ut,d)):((r.lanes&i)!==0&&(Gc(r,s),Ri(s,null,null,i),Ti()),d=r.memoizedState,p=s.memoizedState,d.parent!==l?(d={parent:l,cache:l},s.memoizedState=d,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=d),Tr(s,ut,l)):(l=p.cache,Tr(s,ut,l),l!==d.cache&&$c(s,[ut],i,!0))),xt(r,s,s.pendingProps.children,i),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function tr(r){r.flags|=4}function Ah(r,s,i,l,d){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(d&335544128)===d)if(r.stateNode.complete)r.flags|=8192;else if(Gm())r.flags|=8192;else throw vs=al,qc}else r.flags&=-16777217}function bm(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Dy(s))if(Gm())r.flags|=8192;else throw vs=al,qc}function Sl(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?Xf():536870912,r.lanes|=s,ba|=s)}function ji(r,s){if(!Ee)switch(r.tailMode){case"hidden":s=r.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?r.tail=null:i.sibling=null;break;case"collapsed":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;
vendor: 8,221 bytes, line 9
9l===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:l.sibling=null}}function Ke(r){var s=r.alternate!==null&&r.alternate.child===r.child,i=0,l=0;if(s)for(var d=r.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=r,d=d.sibling;else for(d=r.child;d!==null;)i|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=r,d=d.sibling;return r.subtreeFlags|=l,r.childLanes=i,s}function rE(r,s,i){var l=s.pendingProps;switch(Dc(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(s),null;case 1:return Ke(s),null;case 3:return i=s.stateNode,l=null,r!==null&&(l=r.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),Qn(ut),Ue(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(r===null||r.child===null)&&(ia(s)?tr(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Pc())),Ke(s),null;case 26:var d=s.type,p=s.memoizedState;return r===null?(tr(s),p!==null?(Ke(s),bm(s,p)):(Ke(s),Ah(s,d,null,l,i))):p?p!==r.memoizedState?(tr(s),Ke(s),bm(s,p)):(Ke(s),s.flags&=-16777217):(r=r.memoizedProps,r!==l&&tr(s),Ke(s),Ah(s,d,r,l,i)),null;case 27:if(qn(s),i=ve.current,d=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==l&&tr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Ke(s),null}r=te.current,ia(s)?Xp(s):(r=Ay(d,l,i),s.stateNode=r,tr(s))}return Ke(s),null;case 5:if(qn(s),d=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==l&&tr(s);else{if(!l){if(s.stateNode===null)throw Error(a(166));return Ke(s),null}if(p=te.current,ia(s))Xp(s);else{var v=Ll(ve.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?p.multiple=!0:l.size&&(p.size=l.size);break;default:p=typeof l.is=="string"?v.createElement(d,{is:l.is}):v.createElement(d)}}p[Rt]=s,p[Bt]=l;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=p;e:switch(kt(p,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&&tr(s)}}return Ke(s),Ah(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,i),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==l&&tr(s);else{if(typeof l!="string"&&s.stateNode===null)throw Error(a(166));if(r=ve.current,ia(s)){if(r=s.stateNode,i=s.memoizedProps,l=null,d=At,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}r[Rt]=s,r=!!(r.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||gy(r.nodeValue,i)),r||Er(s,!0)}else r=Ll(r).createTextNode(l),r[Rt]=s,s.stateNode=r}return Ke(s),null;case 31:if(i=s.memoizedState,r===null||r.memoizedState!==null){if(l=ia(s),i!==null){if(r===null){if(!l)throw Error(a(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Rt]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ke(s),r=!1}else i=Pc(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=i),r=!0;if(!r)return s.flags&256?(sn(s),s):(sn(s),null);if((s.flags&128)!==0)throw Error(a(558))}return Ke(s),null;case 13:if(l=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(d=ia(s),l!==null&&l.dehydrated!==null){if(r===null){if(!d)throw Error(a(318));if(d=s.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Rt]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ke(s),d=!1}else d=Pc(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=d),d=!0;if(!d)return s.flags&256?(sn(s),s):(sn(s),null)}return sn(s),(s.flags&128)!==0?(s.lanes=i,s):(i=l!==null,r=r!==null&&r.memoizedState!==null,i&&(l=s.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048)),i!==r&&i&&(s.child.flags|=8192),Sl(s,s.updateQueue),Ke(s),null);case 4:return Ue(),r===null&&Kh(s.stateNode.containerInfo),Ke(s),null;case 10:return Qn(s.type),Ke(s),null;case 19:if(G(at),l=s.memoizedState,l===null)return Ke(s),null;if(d=(s.flags&128)!==0,p=l.rendering,p===null)if(d)ji(l,!1);else{if(tt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(p=ul(r),p!==null){for(s.flags|=128,ji(l,!1),r=p.updateQueue,s.updateQueue=r,Sl(s,r),s.subtreeFlags=0,r=i,i=s.child;i!==null;)Vp(i,r),i=i.sibling;return W(at,at.current&1|2),Ee&&Jn(s,l.treeForkCount),s.child}r=r.sibling}l.tail!==null&&Mt()>Ol&&(s.flags|=128,d=!0,ji(l,!1),s.lanes=4194304)}else{if(!d)if(r=ul(p),r!==null){if(s.flags|=128,d=!0,r=r.updateQueue,s.updateQueue=r,Sl(s,r),ji(l,!0),l.tail===null&&l.tailMode==="hidden"&&!p.alternate&&!Ee)return Ke(s),null}else 2*Mt()-l.renderingStartTime>Ol&&i!==536870912&&(s.flags|=128,d=!0,ji(l,!1),s.lanes=4194304);l.isBackwards?(p.sibling=s.child,s.child=p):(r=l.last,r!==null?r.sibling=p:s.child=p,l.last=p)}return l.tail!==null?(r=l.tail,l.rendering=r,l.tail=r.sibling,l.renderingStartTime=Mt(),r.sibling=null,i=at.current,W(at,d?i&1|2:i&1),Ee&&Jn(s,l.treeForkCount),r):(Ke(s),null);case 22:case 23:return sn(s),Jc(),l=s.memoizedState!==null,r!==null?r.memoizedState!==null!==l&&(s.flags|=8192):l&&(s.flags|=8192),l?(i&536870912)!==0&&(s.flags&128)===0&&(Ke(s),s.subtreeFlags&6&&(s.flags|=8192)):Ke(s),i=s.updateQueue,i!==null&&Sl(s,i.retryQueue),i=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),l=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),l!==i&&(s.flags|=2048),r!==null&&G(ms),null;case 24:return i=null,r!==null&&(i=r.memoizedState.cache),s.memoizedState.cache!==i&&(s.flags|=2048),Qn(ut),Ke(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function sE(r,s){switch(Dc(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Qn(ut),Ue(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return qn(s),null;case 31:if(s.memoizedState!==null){if(sn(s),s.alternate===null)throw Error(a(340));fs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(sn(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(a(340));fs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return G(at),null;case 4:return Ue(),null;case 10:return Qn(s.type),null;case 22:case 23:return sn(s),Jc(),r!==null&&G(ms),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return Qn(ut),null;case 25:return null;default:return null}}function _m(r,s){switch(Dc(s),s.tag){case 3:Qn(ut),Ue();break;case 26:case 27:case 5:qn(s);break;case 4:Ue();break;case 31:s.memoizedState!==null&&sn(s);break;case 13:sn(s);break;case 19:G(at);break;case 10:Qn(s.type);break;case 22:case 23:sn(s),Jc(),r!==null&&G(ms);break;case 24:Qn(ut)}}function zi(r,s){try{var i=s.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var d=l.next;i=d;do{if((i.tag&r)===r){l=void 0;var p=i.create,v=i.inst;l=p(),v.destroy=l}i=i.next}while(i!==d)}}catch(S){Ne(s,s.return,S)}}function Cr(r,s,i){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var p=d.next;l=p;do{if((l.tag&r)===r){var v=l.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,d=s;var x=i,L=S;try{L()}catch(H){Ne(d,x,H)}}}l=l.next}while(l!==p)}}catch(H){Ne(s,s.return,H)}}function wm(r){var s=r.updateQueue;if(s!==null){var i=r.stateNode;try{hg(s,i)}catch(l){Ne(r,r.return,l)}}}function Sm(r,s,i){i.props=ws(r.type,r.memoizedProps),i.state=r.memoizedState;
vendor: 19,400 bytes, line 9
9try{i.componentWillUnmount()}catch(l){Ne(r,s,l)}}function Ni(r,s){try{var i=r.ref;if(i!==null){switch(r.tag){case 26:case 27:case 5:var l=r.stateNode;break;case 30:l=r.stateNode;break;default:l=r.stateNode}typeof i=="function"?r.refCleanup=i(l):i.current=l}}catch(d){Ne(r,s,d)}}function Mn(r,s){var i=r.ref,l=r.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(d){Ne(r,s,d)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ne(r,s,d)}else i.current=null}function Em(r){var s=r.type,i=r.memoizedProps,l=r.stateNode;try{e:switch(s){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){Ne(r,r.return,d)}}function Oh(r,s,i){try{var l=r.stateNode;AE(l,r.type,i,s),l[Bt]=s}catch(d){Ne(r,r.return,d)}}function Tm(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Lr(r.type)||r.tag===4}function xh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Tm(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Lr(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function kh(r,s,i){var l=r.tag;if(l===5||l===6)r=r.stateNode,s?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(r,s):(s=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.appendChild(r),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=Zn));else if(l!==4&&(l===27&&Lr(r.type)&&(i=r.stateNode,s=null),r=r.child,r!==null))for(kh(r,s,i),r=r.sibling;r!==null;)kh(r,s,i),r=r.sibling}function El(r,s,i){var l=r.tag;if(l===5||l===6)r=r.stateNode,s?i.insertBefore(r,s):i.appendChild(r);else if(l!==4&&(l===27&&Lr(r.type)&&(i=r.stateNode),r=r.child,r!==null))for(El(r,s,i),r=r.sibling;r!==null;)El(r,s,i),r=r.sibling}function Rm(r){var s=r.stateNode,i=r.memoizedProps;try{for(var l=r.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);kt(s,l,i),s[Rt]=r,s[Bt]=i}catch(p){Ne(r,r.return,p)}}var nr=!1,dt=!1,Ch=!1,Am=typeof WeakSet=="function"?WeakSet:Set,_t=null;function aE(r,s){if(r=r.containerInfo,Qh=Fl,r=Up(r),Ec(r)){if("selectionStart"in r)var i={start:r.selectionStart,end:r.selectionEnd};else e:{i=(i=r.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var d=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var v=0,S=-1,x=-1,L=0,H=0,Z=r,U=null;t:for(;;){for(var $;Z!==i||d!==0&&Z.nodeType!==3||(S=v+d),Z!==p||l!==0&&Z.nodeType!==3||(x=v+l),Z.nodeType===3&&(v+=Z.nodeValue.length),($=Z.firstChild)!==null;)U=Z,Z=$;for(;;){if(Z===r)break t;if(U===i&&++L===d&&(S=v),U===p&&++H===l&&(x=v),($=Z.nextSibling)!==null)break;Z=U,U=Z.parentNode}Z=$}i=S===-1||x===-1?null:{start:S,end:x}}else i=null}i=i||{start:0,end:0}}else i=null;for(Xh={focusedElem:r,selectionRange:i},Fl=!1,_t=s;_t!==null;)if(s=_t,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,_t=r;else for(;_t!==null;){switch(s=_t,p=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(i=0;i<r.length;i++)d=r[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&p!==null){r=void 0,i=s,d=p.memoizedProps,p=p.memoizedState,l=i.stateNode;try{var ne=ws(i.type,d);r=l.getSnapshotBeforeUpdate(ne,p),l.__reactInternalSnapshotBeforeUpdate=r}catch(he){Ne(i,i.return,he)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,i=r.nodeType,i===9)td(r);else if(i===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":td(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=s.sibling,r!==null){r.return=s.return,_t=r;break}_t=s.return}}function Om(r,s,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:sr(r,i),l&4&&zi(5,i);break;case 1:if(sr(r,i),l&4)if(r=i.stateNode,s===null)try{r.componentDidMount()}catch(v){Ne(i,i.return,v)}else{var d=ws(i.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(d,s,r.__reactInternalSnapshotBeforeUpdate)}catch(v){Ne(i,i.return,v)}}l&64&&wm(i),l&512&&Ni(i,i.return);break;case 3:if(sr(r,i),l&64&&(r=i.updateQueue,r!==null)){if(s=null,i.child!==null)switch(i.child.tag){case 27:case 5:s=i.child.stateNode;break;case 1:s=i.child.stateNode}try{hg(r,s)}catch(v){Ne(i,i.return,v)}}break;case 27:s===null&&l&4&&Rm(i);case 26:case 5:sr(r,i),s===null&&l&4&&Em(i),l&512&&Ni(i,i.return);break;case 12:sr(r,i);break;case 31:sr(r,i),l&4&&Cm(r,i);break;case 13:sr(r,i),l&4&&jm(r,i),l&64&&(r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(i=pE.bind(null,i),DE(r,i))));break;case 22:if(l=i.memoizedState!==null||nr,!l){s=s!==null&&s.memoizedState!==null||dt,d=nr;var p=dt;nr=l,(dt=s)&&!p?ar(r,i,(i.subtreeFlags&8772)!==0):sr(r,i),nr=d,dt=p}break;case 30:break;default:sr(r,i)}}function xm(r){var s=r.alternate;s!==null&&(r.alternate=null,xm(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&ic(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Ye=null,qt=!1;function rr(r,s,i){for(i=i.child;i!==null;)km(r,s,i),i=i.sibling}function km(r,s,i){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(ri,i)}catch{}switch(i.tag){case 26:dt||Mn(i,s),rr(r,s,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:dt||Mn(i,s);var l=Ye,d=qt;Lr(i.type)&&(Ye=i.stateNode,qt=!1),rr(r,s,i),Hi(i.stateNode),Ye=l,qt=d;break;case 5:dt||Mn(i,s);case 6:if(l=Ye,d=qt,Ye=null,rr(r,s,i),Ye=l,qt=d,Ye!==null)if(qt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(i.stateNode)}catch(p){Ne(i,s,p)}else try{Ye.removeChild(i.stateNode)}catch(p){Ne(i,s,p)}break;case 18:Ye!==null&&(qt?(r=Ye,wy(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.stateNode),Oa(r)):wy(Ye,i.stateNode));break;case 4:l=Ye,d=qt,Ye=i.stateNode.containerInfo,qt=!0,rr(r,s,i),Ye=l,qt=d;break;case 0:case 11:case 14:case 15:Cr(2,i,s),dt||Cr(4,i,s),rr(r,s,i);break;case 1:dt||(Mn(i,s),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Sm(i,s,l)),rr(r,s,i);break;case 21:rr(r,s,i);break;case 22:dt=(l=dt)||i.memoizedState!==null,rr(r,s,i),dt=l;break;default:rr(r,s,i)}}function Cm(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Oa(r)}catch(i){Ne(s,s.return,i)}}}function jm(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Oa(r)}catch(i){Ne(s,s.return,i)}}function iE(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new Am),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new Am),s;default:throw Error(a(435,r.tag))}}function Tl(r,s){var i=iE(r);s.forEach(function(l){if(!i.has(l)){i.add(l);var d=gE.bind(null,r,l);l.then(d,d)}})}function Ft(r,s){var i=s.deletions;if(i!==null)for(var l=0;l<i.length;l++){var d=i[l],p=r,v=s,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Lr(S.type)){Ye=S.stateNode,qt=!1;break e}break;case 5:Ye=S.stateNode,qt=!1;break e;case 3:case 4:Ye=S.stateNode.containerInfo,qt=!0;break e}S=S.return}if(Ye===null)throw Error(a(160));km(p,v,d),Ye=null,qt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)zm(s,r),s=s.sibling}var Rn=null;function zm(r,s){var i=r.alternate,l=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Ft(s,r),Gt(r),l&4&&(Cr(3,r,r.return),zi(3,r),Cr(5,r,r.return));break;case 1:Ft(s,r),Gt(r),l&512&&(dt||i===null||Mn(i,i.return)),l&64&&nr&&(r=r.updateQueue,r!==null&&(l=r.callbacks,l!==null&&(i=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var d=Rn;if(Ft(s,r),Gt(r),l&512&&(dt||i===null||Mn(i,i.return)),l&4){var p=i!==null?i.memoizedState:null;if(l=r.memoizedState,i===null)if(l===null)if(r.stateNode===null){e:{l=r.type,i=r.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":p=d.getElementsByTagName("title")[0],(!p||p[ii]||p[Rt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(l),d.head.insertBefore(p,d.querySelector("head > title"))),kt(p,l,i),p[Rt]=r,bt(p),l=p;break e;case"link":var v=zy("link","href",d).get(l+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(p=v[S],p.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&p.getAttribute("rel")===(i.rel==null?null:i.rel)&&p.getAttribute("title")===(i.title==null?null:i.title)&&p.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}p=d.createElement(l),kt(p,l,i),d.head.appendChild(p);break;case"meta":if(v=zy("meta","content",d).get(l+(i.content||""))){for(S=0;S<v.length;S++)if(p=v[S],p.getAttribute("content")===(i.content==null?null:""+i.content)&&p.getAttribute("name")===(i.name==null?null:i.name)&&p.getAttribute("property")===(i.property==null?null:i.property)&&p.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&p.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}p=d.createElement(l),kt(p,l,i),d.head.appendChild(p);break;default:throw Error(a(468,l))}p[Rt]=r,bt(p),l=p}r.stateNode=l}else Ny(d,r.type,r.stateNode);else r.stateNode=jy(d,l,r.memoizedProps);else p!==l?(p===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):p.count--,l===null?Ny(d,r.type,r.stateNode):jy(d,l,r.memoizedProps)):l===null&&r.stateNode!==null&&Oh(r,r.memoizedProps,i.memoizedProps)}break;case 27:Ft(s,r),Gt(r),l&512&&(dt||i===null||Mn(i,i.return)),i!==null&&l&4&&Oh(r,r.memoizedProps,i.memoizedProps);break;case 5:if(Ft(s,r),Gt(r),l&512&&(dt||i===null||Mn(i,i.return)),r.flags&32){d=r.stateNode;try{Ys(d,"")}catch(ne){Ne(r,r.return,ne)}}l&4&&r.stateNode!=null&&(d=r.memoizedProps,Oh(r,d,i!==null?i.memoizedProps:d)),l&1024&&(Ch=!0);break;case 6:if(Ft(s,r),Gt(r),l&4){if(r.stateNode===null)throw Error(a(162));l=r.memoizedProps,i=r.stateNode;try{i.nodeValue=l}catch(ne){Ne(r,r.return,ne)}}break;case 3:if(Il=null,d=Rn,Rn=Ul(s.containerInfo),Ft(s,r),Rn=d,Gt(r),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Oa(s.containerInfo)}catch(ne){Ne(r,r.return,ne)}Ch&&(Ch=!1,Nm(r));break;case 4:l=Rn,Rn=Ul(r.stateNode.containerInfo),Ft(s,r),Gt(r),Rn=l;break;case 12:Ft(s,r),Gt(r);break;case 31:Ft(s,r),Gt(r),l&4&&(l=r.updateQueue,l!==null&&(r.updateQueue=null,Tl(r,l)));break;case 13:Ft(s,r),Gt(r),r.child.flags&8192&&r.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Al=Mt()),l&4&&(l=r.updateQueue,l!==null&&(r.updateQueue=null,Tl(r,l)));break;case 22:d=r.memoizedState!==null;var x=i!==null&&i.memoizedState!==null,L=nr,H=dt;if(nr=L||d,dt=H||x,Ft(s,r),dt=H,nr=L,Gt(r),l&8192)e:for(s=r.stateNode,s._visibility=d?s._visibility&-2:s._visibility|1,d&&(i===null||x||nr||dt||Ss(r)),i=null,s=r;;){if(s.tag===5||s.tag===26){if(i===null){x=i=s;try{if(p=x.stateNode,d)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=x.stateNode;var Z=x.memoizedProps.style,U=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ne){Ne(x,x.return,ne)}}}else if(s.tag===6){if(i===null){x=s;try{x.stateNode.nodeValue=d?"":x.memoizedProps}catch(ne){Ne(x,x.return,ne)}}}else if(s.tag===18){if(i===null){x=s;try{var $=x.stateNode;d?Sy($,!0):Sy(x.stateNode,!1)}catch(ne){Ne(x,x.return,ne)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;i===s&&(i=null),s=s.return}i===s&&(i=null),s.sibling.return=s.return,s=s.sibling}l&4&&(l=r.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Tl(r,i))));break;case 19:Ft(s,r),Gt(r),l&4&&(l=r.updateQueue,l!==null&&(r.updateQueue=null,Tl(r,l)));break;case 30:break;case 21:break;default:Ft(s,r),Gt(r)}}function Gt(r){var s=r.flags;if(s&2){try{for(var i,l=r.return;l!==null;){if(Tm(l)){i=l;break}l=l.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var d=i.stateNode,p=xh(r);El(r,p,d);break;case 5:var v=i.stateNode;i.flags&32&&(Ys(v,""),i.flags&=-33);var S=xh(r);El(r,S,v);break;case 3:case 4:var x=i.stateNode.containerInfo,L=xh(r);kh(r,L,x);break;default:throw Error(a(161))}}catch(H){Ne(r,r.return,H)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Nm(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;Nm(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function sr(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Om(r,s.alternate,s),s=s.sibling}function Ss(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:Cr(4,s,s.return),Ss(s);break;case 1:Mn(s,s.return);var i=s.stateNode;typeof i.componentWillUnmount=="function"&&Sm(s,s.return,i),Ss(s);break;case 27:Hi(s.stateNode);case 26:case 5:Mn(s,s.return),Ss(s);break;case 22:s.memoizedState===null&&Ss(s);break;case 30:Ss(s);break;default:Ss(s)}r=r.sibling}}function ar(r,s,i){for(i=i&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var l=s.alternate,d=r,p=s,v=p.flags;switch(p.tag){case 0:case 11:case 15:ar(d,p,i),zi(4,p);break;case 1:if(ar(d,p,i),l=p,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(L){Ne(l,l.return,L)}if(l=p,d=l.updateQueue,d!==null){var S=l.stateNode;try{var x=d.shared.hiddenCallbacks;if(x!==null)for(d.shared.hiddenCallbacks=null,d=0;d<x.length;d++)cg(x[d],S)}catch(L){Ne(l,l.return,L)}}i&&v&64&&wm(p),Ni(p,p.return);break;case 27:Rm(p);case 26:case 5:ar(d,p,i),i&&l===null&&v&4&&Em(p),Ni(p,p.return);break;case 12:ar(d,p,i);break;case 31:ar(d,p,i),i&&v&4&&Cm(d,p);break;case 13:ar(d,p,i),i&&v&4&&jm(d,p);break;case 22:p.memoizedState===null&&ar(d,p,i),Ni(p,p.return);break;case 30:break;default:ar(d,p,i)}s=s.sibling}}function jh(r,s){var i=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==i&&(r!=null&&r.refCount++,i!=null&&bi(i))}function zh(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&bi(r))}function An(r,s,i,l){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Dm(r,s,i,l),s=s.sibling}function Dm(r,s,i,l){var d=s.flags;switch(s.tag){case 0:case 11:case 15:An(r,s,i,l),d&2048&&zi(9,s);break;case 1:An(r,s,i,l);break;case 3:An(r,s,i,l),d&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&bi(r)));break;case 12:if(d&2048){An(r,s,i,l),r=s.stateNode;try{var p=s.memoizedProps,v=p.id,S=p.onPostCommit;typeof S=="function"&&S(v,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(x){Ne(s,s.return,x)}}else An(r,s,i,l);break;case 31:An(r,s,i,l);break;case 13:An(r,s,i,l);break;case 23:break;case 22:p=s.stateNode,v=s.alternate,s.memoizedState!==null?p._visibility&2?An(r,s,i,l):Di(r,s):p._visibility&2?An(r,s,i,l):(p._visibility|=2,ma(r,s,i,l,(s.subtreeFlags&10256)!==0||!1)),d&2048&&jh(v,s);break;case 24:An(r,s,i,l),d&2048&&zh(s.alternate,s);break;default:An(r,s,i,l)}}function ma(r,s,i,l,d){for(d=d&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=r,v=s,S=i,x=l,L=v.flags;switch(v.tag){case 0:case 11:case 15:ma(p,v,S,x,d),zi(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?ma(p,v,S,x,d):Di(p,v):(H._visibility|=2,ma(p,v,S,x,d)),d&&L&2048&&jh(v.alternate,v);break;case 24:ma(p,v,S,x,d),d&&L&2048&&zh(v.alternate,v);break;default:ma(p,v,S,x,d)}s=s.sibling}}function Di(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var i=r,l=s,d=l.flags;switch(l.tag){case 22:Di(i,l),d&2048&&jh(l.alternate,l);break;case 24:Di(i,l),d&2048&&zh(l.alternate,l);break;default:Di(i,l)}s=s.sibling}}var Mi=8192;function ya(r,s,i){if(r.subtreeFlags&Mi)for(r=r.child;r!==null;)Mm(r,s,i),r=r.sibling}function Mm(r,s,i){switch(r.tag){case 26:ya(r,s,i),r.flags&Mi&&r.memoizedState!==null&&ZE(i,Rn,r.memoizedState,r.memoizedProps);break;case 5:ya(r,s,i);break;case 3:case 4:var l=Rn;Rn=Ul(r.stateNode.containerInfo),ya(r,s,i),Rn=l;break;case 22:r.memoizedState===null&&(l=r.alternate,l!==null&&l.memoizedState!==null?(l=Mi,Mi=16777216,ya(r,s,i),Mi=l):ya(r,s,i));break;default:ya(r,s,i)}}function Pm(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function Pi(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];_t=l,Um(l,r)}Pm(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Lm(r),r=r.sibling}function Lm(r){switch(r.tag){case 0:case 11:case 15:Pi(r),r.flags&2048&&Cr(9,r,r.return);break;case 3:Pi(r);break;case 12:Pi(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Rl(r)):Pi(r);break;default:Pi(r)}}function Rl(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var i=0;i<s.length;i++){var l=s[i];_t=l,Um(l,r)}Pm(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:Cr(8,s,s.return),Rl(s);break;case 22:i=s.stateNode,i._visibility&2&&(i._visibility&=-3,Rl(s));break;default:Rl(s)}r=r.sibling}}function Um(r,s){for(;_t!==null;){var i=_t;switch(i.tag){case 0:case 11:case 15:Cr(8,i,s);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:bi(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,_t=l;else e:for(i=r;_t!==null;){l=_t;var d=l.sibling,p=l.return;if(xm(l),l===i){_t=null;break e}if(d!==null){d.return=p,_t=d;break e}_t=p}}}var oE={getCacheForType:function(r){var s=Ot(ut),i=s.data.get(r);return i===void 0&&(i=r(),s.data.set(r,i)),i},cacheSignal:function(){return Ot(ut).controller.signal}},lE=typeof WeakMap=="function"?WeakMap:Map,Ce=0,$e=null,be=null,we=0,ze=0,an=null,jr=!1,va=!1,Nh=!1,ir=0,tt=0,zr=0,Es=0,Dh=0,on=0,ba=0,Li=null,Zt=null,Mh=!1,Al=0,$m=0,Ol=1/0,xl=null,Nr=null,gt=0,Dr=null,_a=null,or=0,Ph=0,Lh=null,Im=null,Ui=0,Uh=null;function ln(){return(Ce&2)!==0&&we!==0?we&-we:B.T!==null?Fh():np()}function Bm(){if(on===0)if((we&536870912)===0||Ee){var r=Po;Po<<=1,(Po&3932160)===0&&(Po=262144),on=r}else on=536870912;return r=rn.current,r!==null&&(r.flags|=32),on}function Vt(r,s,i){(r===$e&&(ze===2||ze===9)||r.cancelPendingCommit!==null)&&(wa(r,0),Mr(r,we,on,!1)),ai(r,i),((Ce&2)===0||r!==$e)&&(r===$e&&((Ce&2)===0&&(Es|=i),tt===4&&Mr(r,we,on,!1)),Pn(r))}function Hm(r,s,i){if((Ce&6)!==0)throw Error(a(327));var l=!i&&(s&127)===0&&(s&r.expiredLanes)===0||si(r,s),d=l?hE(r,s):Ih(r,s,!0),p=l;do{if(d===0){va&&!l&&Mr(r,s,0,!1);break}else{if(i=r.current.alternate,p&&!uE(i)){d=Ih(r,s,!1),p=!1;continue}if(d===2){if(p=s,r.errorRecoveryDisabledLanes&p)var v=0;else v=r.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var S=r;d=Li;var x=S.current.memoizedState.isDehydrated;if(x&&(wa(S,v).flags|=256),v=Ih(S,v,!1),v!==2){if(Nh&&!x){S.errorRecoveryDisabledLanes|=p,Es|
vendor: 14,900 bytes, line 9
9=p,d=4;break e}p=Zt,Zt=d,p!==null&&(Zt===null?Zt=p:Zt.push.apply(Zt,p))}d=v}if(p=!1,d!==2)continue}}if(d===1){wa(r,0),Mr(r,s,0,!0);break}e:{switch(l=r,p=d,p){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Mr(l,s,on,!jr);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(d=Al+300-Mt(),10<d)){if(Mr(l,s,on,!jr),Uo(l,0,!0)!==0)break e;or=s,l.timeoutHandle=by(qm.bind(null,l,i,Zt,xl,Mh,s,on,Es,ba,jr,p,"Throttled",-0,0),d);break e}qm(l,i,Zt,xl,Mh,s,on,Es,ba,jr,p,null,-0,0)}}break}while(!0);Pn(r)}function qm(r,s,i,l,d,p,v,S,x,L,H,Z,U,$){if(r.timeoutHandle=-1,Z=s.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},Mm(s,p,Z);var ne=(p&62914560)===p?Al-Mt():(p&4194048)===p?$m-Mt():0;if(ne=VE(Z,ne),ne!==null){or=p,r.cancelPendingCommit=ne(Qm.bind(null,r,s,p,i,l,d,v,S,x,H,Z,null,U,$)),Mr(r,p,v,!L);return}}Qm(r,s,p,i,l,d,v,S,x)}function uE(r){for(var s=r;;){var i=s.tag;if((i===0||i===11||i===15)&&s.flags&16384&&(i=s.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var d=i[l],p=d.getSnapshot;d=d.value;try{if(!tn(p(),d))return!1}catch{return!1}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Mr(r,s,i,l){s&=~Dh,s&=~Es,r.suspendedLanes|=s,r.pingedLanes&=~s,l&&(r.warmLanes|=s),l=r.expirationTimes;for(var d=s;0<d;){var p=31-en(d),v=1<<p;l[p]=-1,d&=~v}i!==0&&Wf(r,i,s)}function kl(){return(Ce&6)===0?($i(0),!1):!0}function $h(){if(be!==null){if(ze===0)var r=be.return;else r=be,Yn=ps=null,th(r),ha=null,wi=0,r=be;for(;r!==null;)_m(r.alternate,r),r=r.return;be=null}}function wa(r,s){var i=r.timeoutHandle;i!==-1&&(r.timeoutHandle=-1,kE(i)),i=r.cancelPendingCommit,i!==null&&(r.cancelPendingCommit=null,i()),or=0,$h(),$e=r,be=i=Kn(r.current,null),we=s,ze=0,an=null,jr=!1,va=si(r,s),Nh=!1,ba=on=Dh=Es=zr=tt=0,Zt=Li=null,Mh=!1,(s&8)!==0&&(s|=s&32);var l=r.entangledLanes;if(l!==0)for(r=r.entanglements,l&=s;0<l;){var d=31-en(l),p=1<<d;s|=r[d],l&=~p}return ir=s,Yo(),i}function Fm(r,s){pe=null,B.H=ki,s===ca||s===sl?(s=ig(),ze=3):s===qc?(s=ig(),ze=4):ze=s===yh?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,an=s,be===null&&(tt=1,vl(r,pn(s,r.current)))}function Gm(){var r=rn.current;return r===null?!0:(we&4194048)===we?vn===null:(we&62914560)===we||(we&536870912)!==0?r===vn:!1}function Zm(){var r=B.H;return B.H=ki,r===null?ki:r}function Vm(){var r=B.A;return B.A=oE,r}function Cl(){tt=4,jr||(we&4194048)!==we&&rn.current!==null||(va=!0),(zr&134217727)===0&&(Es&134217727)===0||$e===null||Mr($e,we,on,!1)}function Ih(r,s,i){var l=Ce;Ce|=2;var d=Zm(),p=Vm();($e!==r||we!==s)&&(xl=null,wa(r,s)),s=!1;var v=tt;e:do try{if(ze!==0&&be!==null){var S=be,x=an;switch(ze){case 8:$h(),v=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(s=!0);var L=ze;if(ze=0,an=null,Sa(r,S,x,L),i&&va){v=0;break e}break;default:L=ze,ze=0,an=null,Sa(r,S,x,L)}}cE(),v=tt;break}catch(H){Fm(r,H)}while(!0);return s&&r.shellSuspendCounter++,Yn=ps=null,Ce=l,B.H=d,B.A=p,be===null&&($e=null,we=0,Yo()),v}function cE(){for(;be!==null;)Km(be)}function hE(r,s){var i=Ce;Ce|=2;var l=Zm(),d=Vm();$e!==r||we!==s?(xl=null,Ol=Mt()+500,wa(r,s)):va=si(r,s);e:do try{if(ze!==0&&be!==null){s=be;var p=an;t:switch(ze){case 1:ze=0,an=null,Sa(r,s,p,1);break;case 2:case 9:if(sg(p)){ze=0,an=null,Jm(s);break}s=function(){ze!==2&&ze!==9||$e!==r||(ze=7),Pn(r)},p.then(s,s);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:sg(p)?(ze=0,an=null,Jm(s)):(ze=0,an=null,Sa(r,s,p,7));break;case 5:var v=null;switch(be.tag){case 26:v=be.memoizedState;case 5:case 27:var S=be;if(v?Dy(v):S.stateNode.complete){ze=0,an=null;var x=S.sibling;if(x!==null)be=x;else{var L=S.return;L!==null?(be=L,jl(L)):be=null}break t}}ze=0,an=null,Sa(r,s,p,5);break;case 6:ze=0,an=null,Sa(r,s,p,6);break;case 8:$h(),tt=6;break e;default:throw Error(a(462))}}dE();break}catch(H){Fm(r,H)}while(!0);return Yn=ps=null,B.H=l,B.A=d,Ce=i,be!==null?0:($e=null,we=0,Yo(),tt)}function dE(){for(;be!==null&&!Do();)Km(be)}function Km(r){var s=vm(r.alternate,r,ir);r.memoizedProps=r.pendingProps,s===null?jl(r):be=s}function Jm(r){var s=r,i=s.alternate;switch(s.tag){case 15:case 0:s=dm(i,s,s.pendingProps,s.type,void 0,we);break;case 11:s=dm(i,s,s.pendingProps,s.type.render,s.ref,we);break;case 5:th(s);default:_m(i,s),s=be=Vp(s,ir),s=vm(i,s,ir)}r.memoizedProps=r.pendingProps,s===null?jl(r):be=s}function Sa(r,s,i,l){Yn=ps=null,th(s),ha=null,wi=0;var d=s.return;try{if(eE(r,d,s,i,we)){tt=1,vl(r,pn(i,r.current)),be=null;return}}catch(p){if(d!==null)throw be=d,p;tt=1,vl(r,pn(i,r.current)),be=null;return}s.flags&32768?(Ee||l===1?r=!0:va||(we&536870912)!==0?r=!1:(jr=r=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ym(s,r)):jl(s)}function jl(r){var s=r;do{if((s.flags&32768)!==0){Ym(s,jr);return}r=s.return;var i=rE(s.alternate,s,ir);if(i!==null){be=i;return}if(s=s.sibling,s!==null){be=s;return}be=s=r}while(s!==null);tt===0&&(tt=5)}function Ym(r,s){do{var i=sE(r.alternate,r);if(i!==null){i.flags&=32767,be=i;return}if(i=r.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!s&&(r=r.sibling,r!==null)){be=r;return}be=r=i}while(r!==null);tt=6,be=null}function Qm(r,s,i,l,d,p,v,S,x){r.cancelPendingCommit=null;do zl();while(gt!==0);if((Ce&6)!==0)throw Error(a(327));if(s!==null){if(s===r.current)throw Error(a(177));if(p=s.lanes|s.childLanes,p|=xc,Gw(r,i,p,v,S,x),r===$e&&(be=$e=null,we=0),_a=s,Dr=r,or=i,Ph=p,Lh=d,Im=l,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,mE(qs,function(){return ny(),null})):(r.callbackNode=null,r.callbackPriority=0),l=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||l){l=B.T,B.T=null,d=Q.p,Q.p=2,v=Ce,Ce|=4;try{aE(r,s,i)}finally{Ce=v,Q.p=d,B.T=l}}gt=1,Xm(),Wm(),ey()}}function Xm(){if(gt===1){gt=0;var r=Dr,s=_a,i=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var l=Q.p;Q.p=2;var d=Ce;Ce|=4;try{zm(s,r);var p=Xh,v=Up(r.containerInfo),S=p.focusedElem,x=p.selectionRange;if(v!==S&&S&&S.ownerDocument&&Lp(S.ownerDocument.documentElement,S)){if(x!==null&&Ec(S)){var L=x.start,H=x.end;if(H===void 0&&(H=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(H,S.value.length);else{var Z=S.ownerDocument||document,U=Z&&Z.defaultView||window;if(U.getSelection){var $=U.getSelection(),ne=S.textContent.length,he=Math.min(x.start,ne),Pe=x.end===void 0?he:Math.min(x.end,ne);!$.extend&&he>Pe&&(v=Pe,Pe=he,he=v);var M=Pp(S,he),k=Pp(S,Pe);if(M&&k&&($.rangeCount!==1||$.anchorNode!==M.node||$.anchorOffset!==M.offset||$.focusNode!==k.node||$.focusOffset!==k.offset)){var P=Z.createRange();P.setStart(M.node,M.offset),$.removeAllRanges(),he>Pe?($.addRange(P),$.extend(k.node,k.offset)):(P.setEnd(k.node,k.offset),$.addRange(P))}}}}for(Z=[],$=S;$=$.parentNode;)$.nodeType===1&&Z.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Z.length;S++){var q=Z[S];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Fl=!!Qh,Xh=Qh=null}finally{Ce=d,Q.p=l,B.T=i}}r.current=s,gt=2}}function Wm(){if(gt===2){gt=0;var r=Dr,s=_a,i=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var l=Q.p;Q.p=2;var d=Ce;Ce|=4;try{Om(r,s.alternate,s)}finally{Ce=d,Q.p=l,B.T=i}}gt=3}}function ey(){if(gt===4||gt===3){gt=0,tc();var r=Dr,s=_a,i=or,l=Im;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?gt=5:(gt=0,_a=Dr=null,ty(r,r.pendingLanes));var d=r.pendingLanes;if(d===0&&(Nr=null),sc(i),s=s.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(ri,s,void 0,(s.current.flags&128)===128)}catch{}if(l!==null){s=B.T,d=Q.p,Q.p=2,B.T=null;try{for(var p=r.onRecoverableError,v=0;v<l.length;v++){var S=l[v];p(S.value,{componentStack:S.stack})}}finally{B.T=s,Q.p=d}}(or&3)!==0&&zl(),Pn(r),d=r.pendingLanes,(i&261930)!==0&&(d&42)!==0?r===Uh?Ui++:(Ui=0,Uh=r):Ui=0,$i(0)}}function ty(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,bi(s)))}function zl(){return Xm(),Wm(),ey(),ny()}function ny(){if(gt!==5)return!1;var r=Dr,s=Ph;Ph=0;var i=sc(or),l=B.T,d=Q.p;try{Q.p=32>i?32:i,B.T=null,i=Lh,Lh=null;var p=Dr,v=or;if(gt=0,_a=Dr=null,or=0,(Ce&6)!==0)throw Error(a(331));var S=Ce;if(Ce|=4,Lm(p.current),Dm(p,p.current,v,i),Ce=S,$i(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(ri,p)}catch{}return!0}finally{Q.p=d,B.T=l,ty(r,s)}}function ry(r,s,i){s=pn(i,s),s=mh(r.stateNode,s,2),r=Or(r,s,2),r!==null&&(ai(r,2),Pn(r))}function Ne(r,s,i){if(r.tag===3)ry(r,r,i);else for(;s!==null;){if(s.tag===3){ry(s,r,i);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Nr===null||!Nr.has(l))){r=pn(i,r),i=sm(2),l=Or(s,i,2),l!==null&&(am(i,l,s,r),ai(l,2),Pn(l));break}}s=s.return}}function Bh(r,s,i){var l=r.pingCache;if(l===null){l=r.pingCache=new lE;var d=new Set;l.set(s,d)}else d=l.get(s),d===void 0&&(d=new Set,l.set(s,d));d.has(i)||(Nh=!0,d.add(i),r=fE.bind(null,r,s,i),s.then(r,r))}function fE(r,s,i){var l=r.pingCache;l!==null&&l.delete(s),r.pingedLanes|=r.suspendedLanes&i,r.warmLanes&=~i,$e===r&&(we&i)===i&&(tt===4||tt===3&&(we&62914560)===we&&300>Mt()-Al?(Ce&2)===0&&wa(r,0):Dh|=i,ba===we&&(ba=0)),Pn(r)}function sy(r,s){s===0&&(s=Xf()),r=hs(r,s),r!==null&&(ai(r,s),Pn(r))}function pE(r){var s=r.memoizedState,i=0;s!==null&&(i=s.retryLane),sy(r,i)}function gE(r,s){var i=0;switch(r.tag){case 31:case 13:var l=r.stateNode,d=r.memoizedState;d!==null&&(i=d.retryLane);break;case 19:l=r.stateNode;break;case 22:l=r.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(s),sy(r,i)}function mE(r,s){return En(r,s)}var Nl=null,Ea=null,Hh=!1,Dl=!1,qh=!1,Pr=0;function Pn(r){r!==Ea&&r.next===null&&(Ea===null?Nl=Ea=r:Ea=Ea.next=r),Dl=!0,Hh||(Hh=!0,vE())}function $i(r,s){if(!qh&&Dl){qh=!0;do for(var i=!1,l=Nl;l!==null;){if(r!==0){var d=l.pendingLanes;if(d===0)var p=0;else{var v=l.suspendedLanes,S=l.pingedLanes;p=(1<<31-en(42|r)+1)-1,p&=d&~(v&~S),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(i=!0,ly(l,p))}else p=we,p=Uo(l,l===$e?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(p&3)===0||si(l,p)||(i=!0,ly(l,p));l=l.next}while(i);qh=!1}}function yE(){ay()}function ay(){Dl=Hh=!1;var r=0;Pr!==0&&xE()&&(r=Pr);for(var s=Mt(),i=null,l=Nl;l!==null;){var d=l.next,p=iy(l,s);p===0?(l.next=null,i===null?Nl=d:i.next=d,d===null&&(Ea=i)):(i=l,(r!==0||(p&3)!==0)&&(Dl=!0)),l=d}gt!==0&>!==5||$i(r),Pr!==0&&(Pr=0)}function iy(r,s){for(var i=r.suspendedLanes,l=r.pingedLanes,d=r.expirationTimes,p=r.pendingLanes&-62914561;0<p;){var v=31-en(p),S=1<<v,x=d[v];x===-1?((S&i)===0||(S&l)!==0)&&(d[v]=Fw(S,s)):x<=s&&(r.expiredLanes|=S),p&=~S}if(s=$e,i=we,i=Uo(r,r===s?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),l=r.callbackNode,i===0||r===s&&(ze===2||ze===9)||r.cancelPendingCommit!==null)return l!==null&&l!==null&&ni(l),r.callbackNode=null,r.callbackPriority=0;if((i&3)===0||si(r,i)){if(s=i&-i,s===r.callbackPriority)return s;switch(l!==null&&ni(l),sc(i)){case 2:case 8:i=zn;break;case 32:i=qs;break;case 268435456:i=Qf;break;default:i=qs}return l=oy.bind(null,r),i=En(i,l),r.callbackPriority=s,r.callbackNode=i,s}return l!==null&&l!==null&&ni(l),r.callbackPriority=2,r.callbackNode=null,2}function oy(r,s){if(gt!==0&>!==5)return r.callbackNode=null,r.callbackPriority=0,null;var i=r.callbackNode;if(zl()&&r.callbackNode!==i)return null;var l=we;return l=Uo(r,r===$e?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),l===0?null:(Hm(r,l,s),iy(r,Mt()),r.callbackNode!=null&&r.callbackNode===i?oy.bind(null,r):null)}function ly(r,s){if(zl())return null;Hm(r,s,!0)}function vE(){CE(function(){(Ce&6)!==0?En(Tt,yE):ay()})}function Fh(){if(Pr===0){var r=la;r===0&&(r=Mo,Mo<<=1,(Mo&261888)===0&&(Mo=256)),Pr=r}return Pr}function uy(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Ho(""+r)}function cy(r,s){var i=s.ownerDocument.createElement("input");return i.name=s.name,i.value=s.value,r.id&&i.setAttribute("form",r.id),s.parentNode.insertBefore(i,s),r=new FormData(r),i.parentNode.removeChild(i),r}function bE(r,s,i,l,d){if(s==="submit"&&i&&i.stateNode===d){var p=uy((d[Bt]||null).action),v=l.submitter;v&&(s=(s=v[Bt]||null)?uy(s.formAction):v.getAttribute("formAction"),s!==null&&(p=s,v=null));var S=new Zo("action","action",null,l,d);r.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Pr!==0){var x=v?cy(d,v):new FormData(d);ch(i,{pending:!0,data:x,method:d.method,action:p},null,x)}}else typeof p=="function"&&(S.preventDefault(),x=v?cy(d,v):new FormData(d),ch(i,{pending:!0,data:x,method:d.method,action:p},p,x))},currentTarget:d}]})}}for(var Gh=0;Gh<Oc.length;Gh++){var Zh=Oc[Gh],_E=Zh.toLowerCase(),wE=Zh[0].toUpperCase()+Zh.slice(1);Tn(_E,"on"+wE)}Tn(Bp,"onAnimationEnd"),Tn(Hp,"onAnimationIteration"),Tn(qp,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(LS,"onTransitionRun"),Tn(US,"onTransitionStart"),Tn($S,"onTransitionCancel"),Tn(Fp,"onTransitionEnd"),Ks("onMouseEnter",["mouseout","mouseover"]),Ks("onMouseLeave",["mouseout","mouseover"]),Ks("onPointerEnter",["pointerout","pointerover"]),Ks("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),SE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ii));function hy(r,s){s=(s&4)!==0;for(var i=0;i<r.length;i++){var l=r[i],d=l.event;l=l.listeners;e:{var p=void 0;if(s)for(var v=l.length-1;0<=v;v--){var S=l[v],x=S.instance,L=S.currentTarget;if(S=S.listener,x!==p&&d.isPropagationStopped())break e;p=S,d.currentTarget=L;try{p(d)}catch(H){Jo(H)}d.currentTarget=null,p=x}else for(v=0;v<l.length;v++){if(S=l[v],x=S.instance,L=S.currentTarget,S=S.listener,x!==p&&d.isPropagationStopped())break e;p=S,d.currentTarget=L;try{p(d)}catch(H){Jo(H)}d.currentTarget=null,p=x}}}}
vendor: 3,578 bytes, line 9
9function _e(r,s){var i=s[ac];i===void 0&&(i=s[ac]=new Set);var l=r+"__bubble";i.has(l)||(dy(s,r,2,!1),i.add(l))}function Vh(r,s,i){var l=0;s&&(l|=4),dy(i,r,l,s)}var Ml="_reactListening"+Math.random().toString(36).slice(2);function Kh(r){if(!r[Ml]){r[Ml]=!0,ap.forEach(function(i){i!=="selectionchange"&&(SE.has(i)||Vh(i,!1,r),Vh(i,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Ml]||(s[Ml]=!0,Vh("selectionchange",!1,s))}}function dy(r,s,i,l){switch(By(s)){case 2:var d=YE;break;case 8:d=QE;break;default:d=ud}i=d.bind(null,s,i,r),d=void 0,!pc||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),l?d!==void 0?r.addEventListener(s,i,{capture:!0,passive:d}):r.addEventListener(s,i,!0):d!==void 0?r.addEventListener(s,i,{passive:d}):r.addEventListener(s,i,!1)}function Jh(r,s,i,l,d){var p=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var S=l.stateNode.containerInfo;if(S===d)break;if(v===4)for(v=l.return;v!==null;){var x=v.tag;if((x===3||x===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;S!==null;){if(v=Gs(S),v===null)return;if(x=v.tag,x===5||x===6||x===26||x===27){l=p=v;continue e}S=S.parentNode}}l=l.return}yp(function(){var L=p,H=dc(i),Z=[];e:{var U=Gp.get(r);if(U!==void 0){var $=Zo,ne=r;switch(r){case"keypress":if(Fo(i)===0)break e;case"keydown":case"keyup":$=gS;break;case"focusin":ne="focus",$=vc;break;case"focusout":ne="blur",$=vc;break;case"beforeblur":case"afterblur":$=vc;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":$=_p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=rS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=vS;break;case Bp:case Hp:case qp:$=iS;break;case Fp:$=_S;break;case"scroll":case"scrollend":$=tS;break;case"wheel":$=SS;break;case"copy":case"cut":case"paste":$=lS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Sp;break;case"toggle":case"beforetoggle":$=TS}var he=(s&4)!==0,Pe=!he&&(r==="scroll"||r==="scrollend"),M=he?U!==null?U+"Capture":null:U;he=[];for(var k=L,P;k!==null;){var q=k;if(P=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||P===null||M===null||(q=li(k,M),q!=null&&he.push(Bi(k,q,P))),Pe)break;k=k.return}0<he.length&&(U=new $(U,ne,null,i,H),Z.push({event:U,listeners:he}))}}if((s&7)===0){e:{if(U=r==="mouseover"||r==="pointerover",$=r==="mouseout"||r==="pointerout",U&&i!==hc&&(ne=i.relatedTarget||i.fromElement)&&(Gs(ne)||ne[Fs]))break e;if(($||U)&&(U=H.window===H?H:(U=H.ownerDocument)?U.defaultView||U.parentWindow:window,$?(ne=i.relatedTarget||i.toElement,$=L,ne=ne?Gs(ne):null,ne!==null&&(Pe=u(ne),he=ne.tag,ne!==Pe||he!==5&&he!==27&&he!==6)&&(ne=null)):($=null,ne=L),$!==ne)){if(he=_p,q="onMouseLeave",M="onMouseEnter",k="mouse",(r==="pointerout"||r==="pointerover")&&(he=Sp,q="onPointerLeave",M="onPointerEnter",k="pointer"),Pe=$==null?U:oi($),P=ne==null?U:oi(ne),U=new he(q,k+"leave",$,i,H),U.target=Pe,U.relatedTarget=P,q=null,Gs(H)===L&&(he=new he(M,k+"enter",ne,i,H),he.target=P,he.relatedTarget=Pe,q=he),Pe=q,$&&ne)t:{for(he=EE,M=$,k=ne,P=0,q=M;q;q=he(q))P++;q=0;for(var le=k;le;le=he(le))q++;for(;0<P-q;)M=he(M),P--;for(;0<q-P;)k=he(k),q--;for(;P--;){if(M===k||k!==null&&M===k.alternate){he=M;break t}M=he(M),k=he(k)}he=null}else he=null;$!==null&&fy(Z,U,$,he,!1),ne!==null&&Pe!==null&&fy(Z,Pe,ne,he,!0)}}
vendor: 4,579 bytes, lines 9-10
9e:{if(U=L?oi(L):window,$=U.nodeName&&U.nodeName.toLowerCase(),$==="select"||$==="input"&&U.type==="file")var Ae=Cp;else if(xp(U))if(jp)Ae=DS;else{Ae=zS;var ae=jS}else $=U.nodeName,!$||$.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&cc(L.elementType)&&(Ae=Cp):Ae=NS;if(Ae&&(Ae=Ae(r,L))){kp(Z,Ae,i,H);break e}ae&&ae(r,U,L),r==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&uc(U,"number",U.value)}switch(ae=L?oi(L):window,r){case"focusin":(xp(ae)||ae.contentEditable==="true")&&(ea=ae,Tc=L,mi=null);break;case"focusout":mi=Tc=ea=null;break;case"mousedown":Rc=!0;break;case"contextmenu":case"mouseup":case"dragend":Rc=!1,$p(Z,i,H);break;case"selectionchange":if(PS)break;case"keydown":case"keyup":$p(Z,i,H)}var me;if(_c)e:{switch(r){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Ws?Ap(r,i)&&(Se="onCompositionEnd"):r==="keydown"&&i.keyCode===229&&(Se="onCompositionStart");Se&&(Ep&&i.locale!=="ko"&&(Ws||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Ws&&(me=vp()):(_r=H,gc="value"in _r?_r.value:_r.textContent,Ws=!0)),ae=Pl(L,Se),0<ae.length&&(Se=new wp(Se,r,null,i,H),Z.push({event:Se,listeners:ae}),me?Se.data=me:(me=Op(i),me!==null&&(Se.data=me)))),(me=AS?OS(r,i):xS(r,i))&&(Se=Pl(L,"onBeforeInput"),0<Se.length&&(ae=new wp("onBeforeInput","beforeinput",null,i,H),Z.push({event:ae,listeners:Se}),ae.data=me)),bE(Z,r,L,i,H)}hy(Z,s)})}function Bi(r,s,i){return{instance:r,listener:s,currentTarget:i}}function Pl(r,s){for(var i=s+"Capture",l=[];r!==null;){var d=r,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=li(r,i),d!=null&&l.unshift(Bi(r,d,p)),d=li(r,s),d!=null&&l.push(Bi(r,d,p))),r.tag===3)return l;r=r.return}return[]}function EE(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function fy(r,s,i,l,d){for(var p=s._reactName,v=[];i!==null&&i!==l;){var S=i,x=S.alternate,L=S.stateNode;if(S=S.tag,x!==null&&x===l)break;S!==5&&S!==26&&S!==27||L===null||(x=L,d?(L=li(i,p),L!=null&&v.unshift(Bi(i,L,x))):d||(L=li(i,p),L!=null&&v.push(Bi(i,L,x)))),i=i.return}v.length!==0&&r.push({event:s,listeners:v})}var TE=/\r\n?/g,RE=/\u0000|\uFFFD/g;function py(r){return(typeof r=="string"?r:""+r).replace(TE,` 10`).replace(RE,"")}function gy(r,s){return s=py(s),py(r)===s}function Me(r,s,i,l,d,p){switch(i){case"children":typeof l=="string"?s==="body"||s==="textarea"&&l===""||Ys(r,l):(typeof l=="number"||typeof l=="bigint")&&s!=="body"&&Ys(r,""+l);break;case"className":Io(r,"class",l);break;case"tabIndex":Io(r,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Io(r,i,l);break;case"style":gp(r,l,p);break;case"data":if(s!=="object"){Io(r,"data",l);break}case"src":case"href":if(l===""&&(s!=="a"||i!=="href")){r.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){r.removeAttribute(i);break}l=Ho(""+l),r.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){r.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 p=="function"&&(i==="formAction"?(s!=="input"&&Me(r,s,"name",d.name,d,null),Me(r,s,"formEncType",d.formEncType,d,null),Me(r,s,"formMethod",d.formMethod,d,null),Me(r,s,"formTarget",d.formTarget,d,null)):(Me(r,s,"encType",d.encType,d,null),Me(r,s,"method",d.method,d,null),Me(r,s,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){r.removeAttribute(i);break}l=Ho(""+l),r.setAttribute(i,l);break;case"onClick":l!=null&&(r.onclick=Zn);break;case"onScroll":l!=null&&_e("scroll",r);break;case"onScrollEnd":l!=null&&_e("scrollend",r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));r.innerHTML=i}}break;case"multiple":r.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":r.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"){r.removeAttribute("xlink:href");break}
vendor: 12,419 bytes, line 10
10i=Ho(""+l),r.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"?r.setAttribute(i,""+l):r.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"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?r.setAttribute(i,""):r.removeAttribute(i);break;case"capture":case"download":l===!0?r.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?r.setAttribute(i,l):r.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?r.setAttribute(i,l):r.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?r.removeAttribute(i):r.setAttribute(i,l);break;case"popover":_e("beforetoggle",r),_e("toggle",r),$o(r,"popover",l);break;case"xlinkActuate":Gn(r,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(r,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(r,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(r,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(r,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(r,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(r,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(r,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(r,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":$o(r,"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=Ww.get(i)||i,$o(r,i,l))}}function Yh(r,s,i,l,d,p){switch(i){case"style":gp(r,l,p);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(i=l.__html,i!=null){if(d.children!=null)throw Error(a(60));r.innerHTML=i}}break;case"children":typeof l=="string"?Ys(r,l):(typeof l=="number"||typeof l=="bigint")&&Ys(r,""+l);break;case"onScroll":l!=null&&_e("scroll",r);break;case"onScrollEnd":l!=null&&_e("scrollend",r);break;case"onClick":l!=null&&(r.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ip.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),s=i.slice(2,d?i.length-7:void 0),p=r[Bt]||null,p=p!=null?p[i]:null,typeof p=="function"&&r.removeEventListener(s,p,d),typeof l=="function")){typeof p!="function"&&p!==null&&(i in r?r[i]=null:r.hasAttribute(i)&&r.removeAttribute(i)),r.addEventListener(s,l,d);break e}i in r?r[i]=l:l===!0?r.setAttribute(i,""):$o(r,i,l)}}}function kt(r,s,i){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",r),_e("load",r);var l=!1,d=!1,p;for(p in i)if(i.hasOwnProperty(p)){var v=i[p];if(v!=null)switch(p){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Me(r,s,p,v,i,null)}}d&&Me(r,s,"srcSet",i.srcSet,i,null),l&&Me(r,s,"src",i.src,i,null);return;case"input":_e("invalid",r);var S=p=v=d=null,x=null,L=null;for(l in i)if(i.hasOwnProperty(l)){var H=i[l];if(H!=null)switch(l){case"name":d=H;break;case"type":v=H;break;case"checked":x=H;break;case"defaultChecked":L=H;break;case"value":p=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,s));break;default:Me(r,s,l,H,i,null)}}hp(r,p,S,x,L,v,d,!1);return;case"select":_e("invalid",r),l=v=p=null;for(d in i)if(i.hasOwnProperty(d)&&(S=i[d],S!=null))switch(d){case"value":p=S;break;case"defaultValue":v=S;break;case"multiple":l=S;default:Me(r,s,d,S,i,null)}s=p,i=v,r.multiple=!!l,s!=null?Js(r,!!l,s,!1):i!=null&&Js(r,!!l,i,!0);return;case"textarea":_e("invalid",r),p=d=l=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":l=S;break;case"defaultValue":d=S;break;case"children":p=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Me(r,s,v,S,i,null)}fp(r,l,d,p);return;case"option":for(x in i)i.hasOwnProperty(x)&&(l=i[x],l!=null)&&(x==="selected"?r.selected=l&&typeof l!="function"&&typeof l!="symbol":Me(r,s,x,l,i,null));return;case"dialog":_e("beforetoggle",r),_e("toggle",r),_e("cancel",r),_e("close",r);break;case"iframe":case"object":_e("load",r);break;case"video":case"audio":for(l=0;l<Ii.length;l++)_e(Ii[l],r);break;case"image":_e("error",r),_e("load",r);break;case"details":_e("toggle",r);break;case"embed":case"source":case"link":_e("error",r),_e("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in i)if(i.hasOwnProperty(L)&&(l=i[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Me(r,s,L,l,i,null)}return;default:if(cc(s)){for(H in i)i.hasOwnProperty(H)&&(l=i[H],l!==void 0&&Yh(r,s,H,l,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(l=i[S],l!=null&&Me(r,s,S,l,i,null))}function AE(r,s,i,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,v=null,S=null,x=null,L=null,H=null;for($ in i){var Z=i[$];if(i.hasOwnProperty($)&&Z!=null)switch($){case"checked":break;case"value":break;case"defaultValue":x=Z;default:l.hasOwnProperty($)||Me(r,s,$,null,l,Z)}}for(var U in l){var $=l[U];if(Z=i[U],l.hasOwnProperty(U)&&($!=null||Z!=null))switch(U){case"type":p=$;break;case"name":d=$;break;case"checked":L=$;break;case"defaultChecked":H=$;break;case"value":v=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,s));break;default:$!==Z&&Me(r,s,U,$,l,Z)}}lc(r,v,S,x,L,H,p,d);return;case"select":$=v=S=U=null;for(p in i)if(x=i[p],i.hasOwnProperty(p)&&x!=null)switch(p){case"value":break;case"multiple":$=x;default:l.hasOwnProperty(p)||Me(r,s,p,null,l,x)}for(d in l)if(p=l[d],x=i[d],l.hasOwnProperty(d)&&(p!=null||x!=null))switch(d){case"value":U=p;break;case"defaultValue":S=p;break;case"multiple":v=p;default:p!==x&&Me(r,s,d,p,l,x)}s=S,i=v,l=$,U!=null?Js(r,!!i,U,!1):!!l!=!!i&&(s!=null?Js(r,!!i,s,!0):Js(r,!!i,i?[]:"",!1));return;case"textarea":$=U=null;for(S in i)if(d=i[S],i.hasOwnProperty(S)&&d!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Me(r,s,S,null,l,d)}for(v in l)if(d=l[v],p=i[v],l.hasOwnProperty(v)&&(d!=null||p!=null))switch(v){case"value":U=d;break;case"defaultValue":$=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==p&&Me(r,s,v,d,l,p)}dp(r,U,$);return;case"option":for(var ne in i)U=i[ne],i.hasOwnProperty(ne)&&U!=null&&!l.hasOwnProperty(ne)&&(ne==="selected"?r.selected=!1:Me(r,s,ne,null,l,U));for(x in l)U=l[x],$=i[x],l.hasOwnProperty(x)&&U!==$&&(U!=null||$!=null)&&(x==="selected"?r.selected=U&&typeof U!="function"&&typeof U!="symbol":Me(r,s,x,U,l,$));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 he in i)U=i[he],i.hasOwnProperty(he)&&U!=null&&!l.hasOwnProperty(he)&&Me(r,s,he,null,l,U);for(L in l)if(U=l[L],$=i[L],l.hasOwnProperty(L)&&U!==$&&(U!=null||$!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(a(137,s));break;default:Me(r,s,L,U,l,$)}return;default:if(cc(s)){for(var Pe in i)U=i[Pe],i.hasOwnProperty(Pe)&&U!==void 0&&!l.hasOwnProperty(Pe)&&Yh(r,s,Pe,void 0,l,U);for(H in l)U=l[H],$=i[H],!l.hasOwnProperty(H)||U===$||U===void 0&&$===void 0||Yh(r,s,H,U,l,$);return}}for(var M in i)U=i[M],i.hasOwnProperty(M)&&U!=null&&!l.hasOwnProperty(M)&&Me(r,s,M,null,l,U);for(Z in l)U=l[Z],$=i[Z],!l.hasOwnProperty(Z)||U===$||U==null&&$==null||Me(r,s,Z,U,l,$)}function my(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OE(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var d=i[l],p=d.transferSize,v=d.initiatorType,S=d.duration;if(p&&S&&my(v)){for(v=0,S=d.responseEnd,l+=1;l<i.length;l++){var x=i[l],L=x.startTime;if(L>S)break;var H=x.transferSize,Z=x.initiatorType;H&&my(Z)&&(x=x.responseEnd,v+=H*(x<S?1:(S-L)/(x-L)))}if(--l,s+=8*(p+v)/(d.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Qh=null,Xh=null;function Ll(r){return r.nodeType===9?r:r.ownerDocument}function yy(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vy(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function Wh(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ed=null;function xE(){var r=window.event;return r&&r.type==="popstate"?r===ed?!1:(ed=r,!0):(ed=null,!1)}var by=typeof setTimeout=="function"?setTimeout:void 0,kE=typeof clearTimeout=="function"?clearTimeout:void 0,_y=typeof Promise=="function"?Promise:void 0,CE=typeof queueMicrotask=="function"?queueMicrotask:typeof _y<"u"?function(r){return _y.resolve(null).then(r).catch(jE)}:by;function jE(r){setTimeout(function(){throw r})}function Lr(r){return r==="head"}function wy(r,s){var i=s,l=0;do{var d=i.nextSibling;if(r.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(l===0){r.removeChild(d),Oa(s);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Hi(r.ownerDocument.documentElement);else if(i==="head"){i=r.ownerDocument.head,Hi(i);for(var p=i.firstChild;p;){var v=p.nextSibling,S=p.nodeName;p[ii]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&p.rel.toLowerCase()==="stylesheet"||i.removeChild(p),p=v}}else i==="body"&&Hi(r.ownerDocument.body);i=d}while(i);Oa(s)}function Sy(r,s){var i=r;r=0;do{var l=i.nextSibling;if(i.nodeType===1?s?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(s?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(r===0)break;r--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||r++;i=l}while(i)}function td(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var i=s;switch(s=s.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":td(i),ic(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}r.removeChild(i)}}function zE(r,s,i,l){for(;r.nodeType===1;){var d=i;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!l&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(l){if(!r[ii])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(p=r.getAttribute("rel"),p==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(p!==d.rel||r.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||r.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||r.getAttribute("title")!==(d.title==null?null:d.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(p=r.getAttribute("src"),(p!==(d.src==null?null:d.src)||r.getAttribute("type")!==(d.type==null?null:d.type)||r.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var p=d.name==null?null:""+d.name;
vendor: 6,093 bytes, line 10
10if(d.type==="hidden"&&r.getAttribute("name")===p)return r}else return r;if(r=bn(r.nextSibling),r===null)break}return null}function NE(r,s,i){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=bn(r.nextSibling),r===null))return null;return r}function Ey(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=bn(r.nextSibling),r===null))return null;return r}function nd(r){return r.data==="$?"||r.data==="$~"}function rd(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function DE(r,s){var i=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||i.readyState!=="loading")s();else{var l=function(){s(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),r._reactRetry=l}}function bn(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var sd=null;function Ty(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var i=r.data;if(i==="/$"||i==="/&"){if(s===0)return bn(r.nextSibling);s--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||s++}r=r.nextSibling}return null}function Ry(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var i=r.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(s===0)return r;s--}else i!=="/$"&&i!=="/&"||s++}r=r.previousSibling}return null}function Ay(r,s,i){switch(s=Ll(i),r){case"html":if(r=s.documentElement,!r)throw Error(a(452));return r;case"head":if(r=s.head,!r)throw Error(a(453));return r;case"body":if(r=s.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Hi(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);ic(r)}var _n=new Map,Oy=new Set;function Ul(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var lr=Q.d;Q.d={f:ME,r:PE,D:LE,C:UE,L:$E,m:IE,X:HE,S:BE,M:qE};function ME(){var r=lr.f(),s=kl();return r||s}function PE(r){var s=Zs(r);s!==null&&s.tag===5&&s.type==="form"?Fg(s):lr.r(r)}var Ta=typeof document>"u"?null:document;function xy(r,s,i){var l=Ta;if(l&&typeof s=="string"&&s){var d=dn(s);d='link[rel="'+r+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),Oy.has(d)||(Oy.add(d),r={rel:r,crossOrigin:i,href:s},l.querySelector(d)===null&&(s=l.createElement("link"),kt(s,"link",r),bt(s),l.head.appendChild(s)))}}function LE(r){lr.D(r),xy("dns-prefetch",r,null)}function UE(r,s){lr.C(r,s),xy("preconnect",r,s)}function $E(r,s,i){lr.L(r,s,i);var l=Ta;if(l&&r&&s){var d='link[rel="preload"][as="'+dn(s)+'"]';s==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+dn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+dn(i.imageSizes)+'"]')):d+='[href="'+dn(r)+'"]';var p=d;switch(s){case"style":p=Ra(r);break;case"script":p=Aa(r)}_n.has(p)||(r=y({rel:"preload",href:s==="image"&&i&&i.imageSrcSet?void 0:r,as:s},i),_n.set(p,r),l.querySelector(d)!==null||s==="style"&&l.querySelector(qi(p))||s==="script"&&l.querySelector(Fi(p))||(s=l.createElement("link"),kt(s,"link",r),bt(s),l.head.appendChild(s)))}}function IE(r,s){lr.m(r,s);var i=Ta;if(i&&r){var l=s&&typeof s.as=="string"?s.as:"script",d='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(r)+'"]',p=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Aa(r)}if(!_n.has(p)&&(r=y({rel:"modulepreload",href:r},s),_n.set(p,r),i.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Fi(p)))return}l=i.createElement("link"),kt(l,"link",r),bt(l),i.head.appendChild(l)}}}function BE(r,s,i){lr.S(r,s,i);var l=Ta;if(l&&r){var d=Vs(l).hoistableStyles,p=Ra(r);s=s||"default";var v=d.get(p);if(!v){var S={loading:0,preload:null};if(v=l.querySelector(qi(p)))S.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":s},i),(i=_n.get(p))&&ad(r,i);var x=v=l.createElement("link");bt(x),kt(x,"link",r),x._p=new Promise(function(L,H){x.onload=L,x.onerror=H}),x.addEventListener("load",function(){S.loading|=1}),x.addEventListener("error",function(){S.loading|=2}),S.loading|=4,$l(v,s,l)}v={type:"stylesheet",instance:v,count:1,state:S},d.set(p,v)}}}function HE(r,s){lr.X(r,s);var i=Ta;if(i&&r){var l=Vs(i).hoistableScripts,d=Aa(r),p=l.get(d);p||(p=i.querySelector(Fi(d)),p||(r=y({src:r,async:!0},s),(s=_n.get(d))&&id(r,s),p=i.createElement("script"),bt(p),kt(p,"link",r),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}}function qE(r,s){lr.M(r,s);var i=Ta;if(i&&r){var l=Vs(i).hoistableScripts,d=Aa(r),p=l.get(d);p||(p=i.querySelector(Fi(d)),p||(r=y({src:r,async:!0,type:"module"},s),(s=_n.get(d))&&id(r,s),p=i.createElement("script"),bt(p),kt(p,"link",r),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}}function ky(r,s,i,l){var d=(d=ve.current)?Ul(d):null;if(!d)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(s=Ra(i.href),i=Vs(d).hoistableStyles,l=i.get(s),l||(l={type:"style",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){r=Ra(i.href);var p=Vs(d).hoistableStyles,v=p.get(r);if(v||(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(r,v),(p=d.querySelector(qi(r)))&&!p._p&&(v.instance=p,v.state.loading=5),_n.has(r)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},_n.set(r,i),p||FE(d,r,i,v.state))),s&&l===null)throw Error(a(528,""));return v}if(s&&l!==null)throw Error(a(529,""));return null;case"script":return s=i.async,i=i.src,typeof i=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?
vendor: 5,251 bytes, line 10
10(s=Aa(i),i=Vs(d).hoistableScripts,l=i.get(s),l||(l={type:"script",instance:null,count:0,state:null},i.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ra(r){return'href="'+dn(r)+'"'}function qi(r){return'link[rel="stylesheet"]['+r+"]"}function Cy(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function FE(r,s,i,l){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=r.createElement("link"),l.preload=s,s.addEventListener("load",function(){return l.loading|=1}),s.addEventListener("error",function(){return l.loading|=2}),kt(s,"link",i),bt(s),r.head.appendChild(s))}function Aa(r){return'[src="'+dn(r)+'"]'}function Fi(r){return"script[async]"+r}function jy(r,s,i){if(s.count++,s.instance===null)switch(s.type){case"style":var l=r.querySelector('style[data-href~="'+dn(i.href)+'"]');if(l)return s.instance=l,bt(l),l;var d=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(r.ownerDocument||r).createElement("style"),bt(l),kt(l,"style",d),$l(l,i.precedence,r),s.instance=l;case"stylesheet":d=Ra(i.href);var p=r.querySelector(qi(d));if(p)return s.state.loading|=4,s.instance=p,bt(p),p;l=Cy(i),(d=_n.get(d))&&ad(l,d),p=(r.ownerDocument||r).createElement("link"),bt(p);var v=p;return v._p=new Promise(function(S,x){v.onload=S,v.onerror=x}),kt(p,"link",l),s.state.loading|=4,$l(p,i.precedence,r),s.instance=p;case"script":return p=Aa(i.src),(d=r.querySelector(Fi(p)))?(s.instance=d,bt(d),d):(l=i,(d=_n.get(p))&&(l=y({},i),id(l,d)),r=r.ownerDocument||r,d=r.createElement("script"),bt(d),kt(d,"link",l),r.head.appendChild(d),s.instance=d);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(l=s.instance,s.state.loading|=4,$l(l,i.precedence,r));return s.instance}function $l(r,s,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,p=d,v=0;v<l.length;v++){var S=l[v];if(S.dataset.precedence===s)p=S;else if(p!==d)break}p?p.parentNode.insertBefore(r,p.nextSibling):(s=i.nodeType===9?i.head:i,s.insertBefore(r,s.firstChild))}function ad(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function id(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var Il=null;function zy(r,s,i){if(Il===null){var l=new Map,d=Il=new Map;d.set(i,l)}else d=Il,l=d.get(i),l||(l=new Map,d.set(i,l));if(l.has(r))return l;for(l.set(r,null),i=i.getElementsByTagName(r),d=0;d<i.length;d++){var p=i[d];if(!(p[ii]||p[Rt]||r==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(s)||"";v=r+v;var S=l.get(v);S?S.push(p):l.set(v,[p])}}return l}function Ny(r,s,i){r=r.ownerDocument||r,r.head.insertBefore(i,s==="title"?r.querySelector("head > title"):null)}function GE(r,s,i){if(i===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Dy(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function ZE(r,s,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=Ra(l.href),p=s.querySelector(qi(d));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=Bl.bind(r),s.then(r,r)),i.state.loading|=4,i.instance=p,bt(p);return}p=s.ownerDocument||s,l=Cy(l),(d=_n.get(d))&&ad(l,d),p=p.createElement("link"),bt(p);var v=p;v._p=new Promise(function(S,x){v.onload=S,v.onerror=x}),kt(p,"link",l),i.instance=p}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(i,s),(s=i.state.preload)&&(i.state.loading&3)===0&&(r.count++,i=Bl.bind(r),s.addEventListener("load",i),s.addEventListener("error",i))}}var od=0;function VE(r,s){return r.stylesheets&&r.count===0&&ql(r,r.stylesheets),0<r.count||0<r.imgCount?function(i){var l=setTimeout(function(){if(r.stylesheets&&ql(r,r.stylesheets),r.unsuspend){var p=r.unsuspend;r.unsuspend=null,p()}},6e4+s);0<r.imgBytes&&od===0&&(od=62500*OE());var d=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&ql(r,r.stylesheets),r.unsuspend)){var p=r.unsuspend;r.unsuspend=null,p()}},(r.imgBytes>od?50:800)+s);return r.unsuspend=i,function(){r.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Bl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ql(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Hl=null;function ql(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Hl=new Map,s.forEac
vendor: 9,856 bytes, line 10
10h(KE,r),Hl=null,Bl.call(r))}function KE(r,s){if(!(s.state.loading&4)){var i=Hl.get(r);if(i)var l=i.get(null);else{i=new Map,Hl.set(r,i);for(var d=r.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var v=d[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),l=v)}l&&i.set(null,l)}d=s.instance,v=d.getAttribute("data-precedence"),p=i.get(v)||l,p===l&&i.set(null,d),i.set(v,d),this.count++,l=Bl.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),p?p.parentNode.insertBefore(d,p.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(d,r.firstChild)),s.state.loading|=4}}var Gi={$$typeof:j,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function JE(r,s,i,l,d,p,v,S,x){this.tag=1,this.containerInfo=r,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=nc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nc(0),this.hiddenUpdates=nc(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function My(r,s,i,l,d,p,v,S,x,L,H,Z){return r=new JE(r,s,i,v,x,L,H,Z,S),s=1,p===!0&&(s|=24),p=nn(3,null,null,s),r.current=p,p.stateNode=r,s=Ic(),s.refCount++,r.pooledCache=s,s.refCount++,p.memoizedState={element:l,isDehydrated:i,cache:s},Fc(p),r}function Py(r){return r?(r=ra,r):ra}function Ly(r,s,i,l,d,p){d=Py(d),l.context===null?l.context=d:l.pendingContext=d,l=Ar(s),l.payload={element:i},p=p===void 0?null:p,p!==null&&(l.callback=p),i=Or(r,l,s),i!==null&&(Vt(i,r,s),Ei(i,r,s))}function Uy(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var i=r.retryLane;r.retryLane=i!==0&&i<s?i:s}}function ld(r,s){Uy(r,s),(r=r.alternate)&&Uy(r,s)}function $y(r){if(r.tag===13||r.tag===31){var s=hs(r,67108864);s!==null&&Vt(s,r,67108864),ld(r,67108864)}}function Iy(r){if(r.tag===13||r.tag===31){var s=ln();s=rc(s);var i=hs(r,s);i!==null&&Vt(i,r,s),ld(r,s)}}var Fl=!0;function YE(r,s,i,l){var d=B.T;B.T=null;var p=Q.p;try{Q.p=2,ud(r,s,i,l)}finally{Q.p=p,B.T=d}}function QE(r,s,i,l){var d=B.T;B.T=null;var p=Q.p;try{Q.p=8,ud(r,s,i,l)}finally{Q.p=p,B.T=d}}function ud(r,s,i,l){if(Fl){var d=cd(l);if(d===null)Jh(r,s,l,Gl,i),Hy(r,l);else if(WE(d,r,s,i,l))l.stopPropagation();else if(Hy(r,l),s&4&&-1<XE.indexOf(r)){for(;d!==null;){var p=Zs(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=is(p.pendingLanes);if(v!==0){var S=p;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var x=1<<31-en(v);S.entanglements[1]|=x,v&=~x}Pn(p),(Ce&6)===0&&(Ol=Mt()+500,$i(0))}}break;case 31:case 13:S=hs(p,2),S!==null&&Vt(S,p,2),kl(),ld(p,2)}if(p=cd(l),p===null&&Jh(r,s,l,Gl,i),p===d)break;d=p}d!==null&&l.stopPropagation()}else Jh(r,s,l,null,i)}}function cd(r){return r=dc(r),hd(r)}var Gl=null;function hd(r){if(Gl=null,r=Gs(r),r!==null){var s=u(r);if(s===null)r=null;else{var i=s.tag;if(i===13){if(r=c(s),r!==null)return r;r=null}else if(i===31){if(r=h(s),r!==null)return r;r=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return Gl=r,null}function By(r){switch(r){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(He()){case Tt:return 2;case zn:return 8;case qs:case Uw:return 32;case Qf:return 268435456;default:return 32}default:return 32}}var dd=!1,Ur=null,$r=null,Ir=null,Zi=new Map,Vi=new Map,Br=[],XE="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 Hy(r,s){switch(r){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":$r=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":Zi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vi.delete(s.pointerId)}}function Ki(r,s,i,l,d,p){return r===null||r.nativeEvent!==p?(r={blockedOn:s,domEventName:i,eventSystemFlags:l,nativeEvent:p,targetContainers:[d]},s!==null&&(s=Zs(s),s!==null&&$y(s)),r):(r.eventSystemFlags|=l,s=r.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),r)}function WE(r,s,i,l,d){switch(s){case"focusin":return Ur=Ki(Ur,r,s,i,l,d),!0;case"dragenter":return $r=Ki($r,r,s,i,l,d),!0;case"mouseover":return Ir=Ki(Ir,r,s,i,l,d),!0;case"pointerover":var p=d.pointerId;return Zi.set(p,Ki(Zi.get(p)||null,r,s,i,l,d)),!0;case"gotpointercapture":return p=d.pointerId,Vi.set(p,Ki(Vi.get(p)||null,r,s,i,l,d)),!0}return!1}function qy(r){var s=Gs(r.target);if(s!==null){var i=u(s);if(i!==null){if(s=i.tag,s===13){if(s=c(i),s!==null){r.blockedOn=s,rp(r.priority,function(){Iy(i)});return}}else if(s===31){if(s=h(i),s!==null){r.blockedOn=s,rp(r.priority,function(){Iy(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){r.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Zl(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var i=cd(r.nativeEvent);if(i===null){i=r.nativeEvent;var l=new i.constructor(i.type,i);hc=l,i.target.dispatchEvent(l),hc=null}else return s=Zs(i),s!==null&&$y(s),r.blockedOn=i,!1;s.shift()}return!0}function Fy(r,s,i){Zl(r)&&i.delete(s)}function eT(){dd=!1,Ur!==null&&Zl(Ur)&&(Ur=null),$r!==null&&Zl($r)&&($r=null),Ir!==null&&Zl(Ir)&&(Ir=null),Zi.forEach(Fy),Vi.forEach(Fy)}function Vl(r,s){r.blockedOn===s&&(r.blockedOn=null,dd||(dd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,eT)))}var Kl=null;function Gy(r){Kl!==r&&(Kl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kl===r&&(Kl=null);for(var s=0;s<r.length;s+=3){var i=r[s],l=r[s+1],d=r[s+2];if(typeof l!="function"){if(hd(l||i)===null)continue;break}var p=Zs(i);p!==null&&(r.splice(s,3),s-=3,ch(p,{pending:!0,data:d,method:i.method,action:l},l,d))}}))}function Oa(r){function s(x){return Vl(x,r)}Ur!==null&&Vl(Ur,r),$r!==null&&Vl($r,r),Ir!==null&&Vl(Ir,r),Zi.forEach(s),Vi.forEach(s);for(var i=0;i<Br.length;i++){var l=Br[i];l.blockedOn===r&&(l.blockedOn=null)}for(;0<Br.length&&(i=Br[0],i.blockedOn===null);)qy(i),i.blockedOn===null&&Br.shift();if(i=(r.ownerDocument||r).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var d=i[l],p=i[l+1],v=d[Bt]||null;if(typeof p=="function")v||Gy(i);else if(v){var S=null;if(p&&p.hasAttribute("formAction")){if(d=p,v=p[Bt]||null)S=v.formAction;else if(hd(d)!==null)continue}else S=v.action;typeof S=="function"?i[l+1]=S:(i.splice(l,3),l-=3),Gy(i)}}}function Zy(){function r(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return d=v})},focusReset:"manual",scroll:"manual"})}function s(){d!==null&&(d(),d=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),d!==null&&(d(),d=null)}}}function fd(r){this._internalRoot=r}Jl.prototype.render=fd.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(a(409));var i=s.current,l=ln();Ly(i,l,r,s,null,null)},Jl.prototype.unmount=fd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Ly(r.current,2,null,r,null,null),kl(),s[Fs]=null}};function Jl(r){this._internalRoot=r}Jl.prototype.unstable_scheduleHydration=function(r){if(r){var s=np();r={blockedOn:null,target:r,priority:s};for(var i=0;i<Br.length&&s!==0&&s<Br[i].priority;i++);Br.splice(i,0,r),i===0&&qy(r)}};var Vy=t.version;if(Vy!=="19.2.5")throw Error(a(527,Vy,"19.2.5"));Q.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=g(s),r=r!==null?m(r):null,r=r===null?null:r.stateNode,r};var tT={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.5"};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yl.isDisabled&&Yl.supportsFiber)try{ri=Yl.inject(tT),Wt=Yl}catch{}}return Yi.createRoot=function(r,s){if(!o(r))throw Error(a(299));var i=!1,l="",d=em,p=tm,v=nm;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(d=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=My(r,1,!1,null,null,i,l,null,d,p,v,Zy),r[Fs]=s.current,Kh(r),new fd(s)},Yi.hydrateRoot=function(r,s,i){if(!o(r))throw Error(a(299));var l=!1,d="",p=em,v=tm,S=nm,x=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(x=i.formState)),s=My(r,1,!0,s,i??null,l,d,x,p,v,S,Zy),s.context=Py(null),i=s.current,l=ln(),l=rc(l),d=Ar(l),d.callback=null,Or(i,d,l),i=l,s.current.lanes=i,ai(s,i),Pn(s),r[Fs]=s.current,Kh(r),new Jl(s)},Yi.version="19.2.5",Yi}var rv;function dT(){if(rv)return md.exports;rv=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(),md.exports=hT(),md.exports}var fT=dT(),pT="__TSS_CONTEXT",Hd=Symbol.for("TSS_SERVER_FUNCTION"),sv=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),gT="application/x-tss-framed",ur={JSON:0,CHUNK:1,END:2,ERROR:3},mT=/;\s*v=(\d+)/;function yT(e){const t=e.match(mT);return t?parseInt(t[1],10):void 0}function vT(e){const t=yT(e);if(t!==void 0&&t!==1)throw new Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var Ef=()=>window.__TSS_START_OPTIONS__,f0=!1;function ho(e){return e[e.length-1]}function bT(e){return typeof e=="function"}function Vr(e,t){return bT(e)?e(t):e}var _T=Object.prototype.hasOwnProperty,av=Object.prototype.propertyIsEnumerable,wT=()=>Object.create(null),Ts=(e,t)=>xs(e,t,wT);function xs(e,t,n=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const o=t,u=lv(e)&&lv(o);if(!u&&!(Ka(e)&&Ka(o)))return o;const c=u?e:iv(e);if(!c)return o;const h=u?o:iv(o);if(!h)return o;const f=c.length,g=h.length,m=u?new Array(g):n();let y=0;for(let b=0;b<g;b++){const _=u?b:h[b],w=e[_],A=o[_];if(w===A){m[_]=w,(u?b<f:_T.call(e,_))&&y++;continue}if(w===null||A===null||typeof w!="object"||typeof A!="object"){m[_]=A;continue}const E=xs(w,A,n,a+1);m[_]=E,E===w&&y++}return f===g&&y===f?e:m}function iv(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!av.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const a=t;for(const o of n){if(!av.call(e,o))return!1;a.push(o)}return a}function Ka(e){if(!ov(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!ov(n)||!n.hasOwnProperty("isPrototypeOf"))}function ov(e){return Object.prototype.toString.call(e)==="[object Object]"}function lv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yt(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!Yt(e[a],t[a],n))return!1;return!0}if(Ka(e)&&Ka(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!a||t[c]!==void 0)&&!Yt(e[c],t[c],n))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&o++;let u=0;for(const c in t)if((!a||t[c]!==void 0)&&(u++,u>o||!Yt(e[c],t[c],n)))return!1;return o===u}return!1}function Ps(e){let t,n;const a=new Promise((o,u)=>{t=o,n=u});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",n(o)},a}function ST(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")}function fo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ET(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function uv(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return ET(t)}var TT=["http:","https:","mailto:","tel:"];function Su(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var RT={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},AT=/[&><\u2028\u2029]/g;function OT(e){return e.replace(AT,t=>RT[t])}function Qi(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,a="",o;for(;(o=t.exec(e))!==null;)a+=uv(e.slice(n,o.index))+o[0],n=t.lastIndex;a=a+uv(n?e.slice(n):e);let u=!1;return a.startsWith("//")&&(u=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:u}}function xT(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function kT(e,t){if(e===t)return!0;
10if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Qt(){throw new Error("Invariant failed")}function po(e){const t=new Map;let n,a;const o=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,a&&(a.next=u,u.prev=a)):(u.next.prev=void 0,n=u.next,u.next=void 0,a&&(u.prev=a,a.next=u)),a=u)};return{get(u){const c=t.get(u);if(c)return o(c),c.value},set(u,c){if(t.size>=e&&n){const f=n;t.delete(f.key),f.next&&(n=f.next,f.next.prev=void 0),f===a&&(a=void 0)}const h=t.get(u);if(h)h.value=c,o(h);else{const f={key:u,value:c,prev:a};a&&(a.next=f),a=f,n||(n=f),t.set(u,f)}},clear(){t.clear(),n=void 0,a=void 0}}}var Kr=4,p0=5;function CT(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Tf(e,t,n=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,u=e.substring(t,o);if(!u||!u.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(u==="$"){const h=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(u.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const c=CT(u);if(c){const[h,f]=c,g=u.charCodeAt(h+1);if(g===45){if(h+2<u.length&&u.charCodeAt(h+2)===36){const m=h+3,y=f;if(m<y)return n[0]=3,n[1]=t+h,n[2]=t+m,n[3]=t+y,n[4]=t+f+1,n[5]=o,n}}else if(g===36){const m=h+1,y=h+2;return y===f?(n[0]=2,n[1]=t+h,n[2]=t+m,n[3]=t+y,n[4]=t+f+1,n[5]=e.length,n):(n[0]=1,n[1]=t+h,n[2]=t+y,n[3]=t+f,n[4]=t+f+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Iu(e,t,n,a,o,u,c){c?.(n);let h=a;{const f=n.fullPath??n.from,g=f.length,m=n.options?.caseSensitive??e,y=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;h<g;){const _=Tf(f,h,t);let w;const A=h,E=_[5];switch(h=E+1,u++,_[0]){case 0:{const O=f.substring(_[2],_[3]);if(m){const N=o.static?.get(O);if(N)w=N;else{o.static??=new Map;const j=ks(n.fullPath??n.from);j.parent=o,j.depth=u,w=j,o.static.set(O,j)}}else{const N=O.toLowerCase(),j=o.staticInsensitive?.get(N);if(j)w=j;else{o.staticInsensitive??=new Map;const D=ks(n.fullPath??n.from);D.parent=o,D.depth=u,w=D,o.staticInsensitive.set(N,D)}}break}case 1:{const O=f.substring(A,_[1]),N=f.substring(_[4],E),j=m&&!!(O||N),D=O?j?O:O.toLowerCase():void 0,K=N?j?N:N.toLowerCase():void 0,J=!y&&o.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===j&&I.prefix===D&&I.suffix===K);if(J)w=J;else{const I=wd(1,n.fullPath??n.from,j,D,K);w=I,I.depth=u,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const O=f.substring(A,_[1]),N=f.substring(_[4],E),j=m&&!!(O||N),D=O?j?O:O.toLowerCase():void 0,K=N?j?N:N.toLowerCase():void 0,J=!y&&o.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===j&&I.prefix===D&&I.suffix===K);if(J)w=J;else{const I=wd(3,n.fullPath??n.from,j,D,K);w=I,I.parent=o,I.depth=u,o.optional??=[],o.optional.push(I)}break}case 2:{const O=f.substring(A,_[1]),N=f.substring(_[4],E),j=m&&!!(O||N),D=O?j?O:O.toLowerCase():void 0,K=N?j?N:N.toLowerCase():void 0,J=wd(2,n.fullPath??n.from,j,D,K);w=J,J.parent=o,J.depth=u,o.wildcard??=[],o.wildcard.push(J)}}o=w}if(y&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const _=ks(n.fullPath??n.from);_.kind=p0,_.parent=o,u++,_.depth=u,o.pathless??=[],o.pathless.push(_),o=_}const b=(n.path||!n.children)&&!n.isRoot;if(b&&f.endsWith("/")){const _=ks(n.fullPath??n.from);_.kind=Kr,_.parent=o,u++,_.depth=u,o.index=_,o=_}o.parse=n.options?.params?.parse??null,o.skipOnParamError=y,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,b&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const f of n.children)Iu(e,t,f,h,o,u,c)}function _d(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;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 qr(e){if(e.pathless)for(const t of e.pathless)qr(t);if(e.static)for(const t of e.static.values())qr(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())qr(t);if(e.dynamic?.length){e.dynamic.sort(_d);for(const t of e.dynamic)qr(t)}if(e.optional?.length){e.optional.sort(_d);for(const t of e.optional)qr(t)}if(e.wildcard?.length){e.wildcard.sort(_d);for(const t of e.wildcard)qr(t)}}function ks(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function wd(e,t,n,a,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:a,suffix:o}}function jT(e,t){const n=ks("/"),a=new Uint16Array(6);
10for(const o of e)Iu(!1,a,o,1,n,0);qr(n),t.masksTree=n,t.flatCache=po(1e3)}function zT(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const a=Rf(e,t.masksTree);return t.flatCache.set(e,a),a}function NT(e,t,n,a,o){e||="/",a||="/";const u=t?`case\0${e}`:e;let c=o.singleCache.get(u);return c||(c=ks("/"),Iu(t,new Uint16Array(6),{from:e},1,c,0),o.singleCache.set(u,c)),Rf(a,c,n)}function DT(e,t,n=!1){const a=n?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";let u;try{u=Rf(e,t.segmentTree,n)}catch(c){if(c instanceof URIError)u=null;else throw c}return u&&(u.branch=LT(u.route)),t.matchCache.set(a,u),u}function MT(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function PT(e,t=!1,n){const a=ks(e.fullPath),o=new Uint16Array(6),u={},c={};let h=0;return Iu(t,o,e,1,a,0,f=>{if(n?.(f,h),f.id in u&&Qt(),u[f.id]=f,h!==0&&f.path){const g=MT(f.fullPath);(!c[g]||f.fullPath.endsWith("/"))&&(c[g]=f)}h++}),qr(a),{processedTree:{segmentTree:a,singleCache:po(1e3),matchCache:po(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:c}}function Rf(e,t,n=!1){const a=e.split("/"),o=$T(e,a,t,n);if(!o)return null;const[u]=g0(e,a,o);return{route:o.node.route,rawParams:u,parsedParams:o.parsedParams}}function g0(e,t,n){const a=UT(n.node);let o=null;const u=Object.create(null);let c=n.extract?.part??0,h=n.extract?.node??0,f=n.extract?.path??0,g=n.extract?.segment??0;for(;h<a.length;c++,h++,f++,g++){const m=a[h];if(m.kind===Kr)break;
10if(m.kind===p0){g--,c--,f--;continue}const y=t[c],b=f;if(y&&(f+=y.length),m.kind===1){o??=n.node.fullPath.split("/");const _=o[g],w=m.prefix?.length??0;if(_.charCodeAt(w)===123){const A=m.suffix?.length??0,E=_.substring(w+2,_.length-A-1),O=y.substring(w,y.length-A);u[E]=decodeURIComponent(O)}else{const A=_.substring(1);u[A]=decodeURIComponent(y)}}else if(m.kind===3){if(n.skipped&1<<h){c--,f=b-1;continue}o??=n.node.fullPath.split("/");const _=o[g],w=m.prefix?.length??0,A=m.suffix?.length??0,E=_.substring(w+3,_.length-A-1),O=m.suffix||m.prefix?y.substring(w,y.length-A):y;O&&(u[E]=decodeURIComponent(O))}else if(m.kind===2){const _=m,w=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),A=decodeURIComponent(w);u["*"]=A,u._splat=A;break}}return n.rawParams&&Object.assign(u,n.rawParams),[u,{part:c,node:h,path:f,segment:g}]}function LT(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function UT(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function $T(e,t,n,a){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!ho(t),u=o&&e!=="/",c=t.length-(o?1:0),h=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let f=null,g=null;for(;h.length;){const m=h.pop(),{node:y,index:b,skipped:_,depth:w,statics:A,dynamics:E,optionals:O}=m;let{extract:N,rawParams:j,parsedParams:D}=m;if(y.kind===2&&y.route&&!Xl(g,m))continue;if(y.skipOnParamError){if(!cv(e,t,m))continue;j=m.rawParams,N=m.extract,D=m.parsedParams}a&&y.route&&y.kind!==Kr&&Xl(f,m)&&(f=m);const K=b===c;if(K&&(y.route&&(!u||y.kind===Kr||y.kind===2)&&Xl(g,m)&&(g=m),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const J=K?void 0:t[b];let I;if(K&&y.index){const F={node:y.index,index:b,skipped:_,depth:w+1,statics:A,dynamics:E,optionals:O,extract:N,rawParams:j,parsedParams:D};let Y=!0;if(y.index.skipOnParamError&&(cv(e,t,F)||(Y=!1)),Y){if(!E&&!O&&!_&&IT(A,c))return F;Xl(g,F)&&(g=F)}}if(y.wildcard)for(let F=y.wildcard.length-1;F>=0;F--){const Y=y.wildcard[F],{prefix:oe,suffix:se}=Y;if(!(oe&&(K||!(Y.caseSensitive?J:I??=J.toLowerCase()).startsWith(oe)))){if(se){if(K)continue;const ge=t.slice(b).join("/").slice(-se.length);if((Y.caseSensitive?ge:ge.toLowerCase())!==se)continue}h.push({node:Y,index:c,skipped:_,depth:w+1,statics:A,dynamics:E,optionals:O,extract:N,rawParams:j,parsedParams:D})}}if(y.optional){const F=_|1<<w,Y=w+1;for(let oe=y.optional.length-1;oe>=0;oe--){const se=y.optional[oe];h.push({node:se,index:b,skipped:F,depth:Y,statics:A,dynamics:E,optionals:O,extract:N,rawParams:j,parsedParams:D})}if(!K)for(let oe=y.optional.length-1;oe>=0;oe--){const se=y.optional[oe],{prefix:ge,suffix:Te}=se;if(ge||Te){const rt=se.caseSensitive?J:I??=J.toLowerCase();if(ge&&!rt.startsWith(ge)||Te&&!rt.endsWith(Te))continue}h.push({node:se,index:b+1,skipped:_,depth:Y,statics:A,dynamics:E,optionals:O+Ql(c,b),extract:N,rawParams:j,parsedParams:D})}}if(!K&&y.dynamic&&J)for(let F=y.dynamic.length-1;F>=0;F--){const Y=y.dynamic[F],{prefix:oe,suffix:se}=Y;if(oe||se){const ge=Y.caseSensitive?J:I??=J.toLowerCase();if(oe&&!ge.startsWith(oe)||se&&!ge.endsWith(se))continue}h.push({node:Y,index:b+1,skipped:_,depth:w+1,statics:A,dynamics:E+Ql(c,b),optionals:O,extract:N,rawParams:j,parsedParams:D})}if(!K&&y.staticInsensitive){const F=y.staticInsensitive.get(I??=J.toLowerCase());F&&h.push({node:F,index:b+1,skipped:_,depth:w+1,statics:A+Ql(c,b),dynamics:E,optionals:O,extract:N,rawParams:j,parsedParams:D})}if(!K&&y.static){const F=y.static.get(J);F&&h.push({node:F,index:b+1,skipped:_,depth:w+1,statics:A+Ql(c,b),dynamics:E,optionals:O,extract:N,rawParams:j,parsedParams:D})}if(y.pathless){const F=w+1;for(let Y=y.pathless.length-1;Y>=0;Y--){const oe=y.pathless[Y];h.push({node:oe,index:b,skipped:_,depth:F,statics:A,dynamics:E,optionals:O,extract:N,rawParams:j,parsedParams:D})}}}if(g)return g;if(a&&f){let m=f.index;for(let b=0;b<f.index;b++)m+=t[b].length;const y=m===e.length?"/":e.slice(m);return f.rawParams??=Object.create(null),f.rawParams["**"]=decodeURIComponent(y),f}return null}function Ql(e,t){return 2**(e-t-1)}function IT(e,t){return e===2**(t-1)-1}function cv(e,t,n){try{const[a,o]=g0(e,t,n);n.rawParams=a,n.extract=o;const u=n.node.parse(a);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,u),!0}catch{return null}}function Xl(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===Kr)>(e.node.kind===Kr)||t.node.kind===Kr==(e.node.kind===Kr)&&t.depth>e.depth))):!0}function gu(e){return Af(e.filter(t=>t!==void 0).join("/"))}function Af(e){return e.replace(/\/{2,}/g,"/")}function m0(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Yr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function y0(e){return Yr(m0(e))}function Eu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function BT(e,t,n){return Eu(e,n)===Eu(t,n)}function HT({base:e,to:t,trailingSlash:n="never",cache:a}){const o=t.startsWith("/"),u=!o&&t===".";let c;if(a){c=o?t:u?e:e+"\0"+t;const y=a.get(c);if(y)return y}let h;
10if(u)h=e.split("/");else if(o)h=t.split("/");else{for(h=e.split("/");h.length>1&&ho(h)==="";)h.pop();const y=t.split("/");for(let b=0,_=y.length;b<_;b++){const w=y[b];w===""?b?b===_-1&&h.push(w):h=[w]:w===".."?h.pop():w==="."||h.push(w)}}h.length>1&&(ho(h)===""?n==="never"&&h.pop():n==="always"&&h.push(""));let f,g="";for(let y=0;y<h.length;y++){y>0&&(g+="/");const b=h[y];if(!b)continue;f=Tf(b,0,f);const _=f[0];if(_===0){g+=b;continue}const w=f[5],A=b.substring(0,f[1]),E=b.substring(f[4],w),O=b.substring(f[2],f[3]);_===1?g+=A||E?`${A}{$${O}}${E}`:`$${O}`:_===2?g+=A||E?`${A}{$}${E}`:"$":g+=`${A}{-$${O}}${E}`}g=Af(g);const m=g||"/";return c&&a&&a.set(c,m),m}function qT(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(n,"g");return o=>o.replace(a,u=>t.get(u)??u)}function Sd(e,t,n){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>dv(o,n)).join("/"):dv(a,n)}function hv({path:e,params:t,decoder:n,...a}){let o=!1;const u=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:u,isMissingParams:o};const c=e.length;let h=0,f,g="";for(;h<c;){const m=h;f=Tf(e,m,f);const y=f[5];if(h=y+1,m===y)continue;const b=f[0];if(b===0){g+="/"+e.substring(m,y);continue}if(b===2){const _=t._splat;u._splat=_,u["*"]=_;const w=e.substring(m,f[1]),A=e.substring(f[4],y);if(!_){o=!0,(w||A)&&(g+="/"+w+A);continue}const E=Sd("_splat",t,n);g+="/"+w+E+A;continue}if(b===1){const _=e.substring(f[2],f[3]);!o&&!(_ in t)&&(o=!0),u[_]=t[_];const w=e.substring(m,f[1]),A=e.substring(f[4],y),E=Sd(_,t,n)??"undefined";g+="/"+w+E+A;continue}if(b===3){const _=e.substring(f[2],f[3]),w=t[_];if(w==null)continue;u[_]=w;
10const A=e.substring(m,f[1]),E=e.substring(f[4],y),O=Sd(_,t,n)??"";g+="/"+A+O+E;continue}}return e.endsWith("/")&&(g+="/"),{usedParams:u,interpolatedPath:g||"/",isMissingParams:o}}function dv(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Of(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function St(e){return e?.isNotFound===!0}function FT(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var GT="tsr-scroll-restoration-v1_3";function ZT(){const e=FT();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Ka(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=Vr(a,t)||t},persist:()=>{try{e.setItem(GT,JSON.stringify(t))}catch{}}}}var fv=ZT(),VT=e=>e.state.__TSR_key||e.href;function KT(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}var Wl=!1,Xi="window",pv="data-scroll-restoration-id";function JT(e,t){if(!fv)return;const n=fv;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Wl=!1;const a=e.options.getScrollRestorationKey||VT,o=new Map;window.history.scrollRestoration="manual";const u=h=>{if(!(Wl||!e.isScrollRestoring))if(h.target===document||h.target===window)o.set(Xi,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const f=h.target;o.set(f,{scrollX:f.scrollLeft||0,scrollY:f.scrollTop||0})}},c=h=>{if(!e.isScrollRestoring||!h||o.size===0||!n)return;const f=n.state[h]||={};for(const[g,m]of o){let y;if(g===Xi)y=Xi;else if(g.isConnected){const b=g.getAttribute(pv);y=b?`[${pv}="${b}"]`:KT(g)}y&&(f[y]=m)}};document.addEventListener("scroll",u,!0),e.subscribe("onBeforeLoad",h=>{c(h.fromLocation?a(h.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{c(a(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",h=>{const f=a(h.toLocation),g=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Wl=!0;try{const y=e.isScrollRestoring?n.state[f]:void 0;let b=!1;if(y)for(const _ in y){const w=y[_];if(!Ka(w))continue;const{scrollX:A,scrollY:E}=w;if(!(!Number.isFinite(A)||!Number.isFinite(E))){if(_===Xi)window.scrollTo({top:E,left:A,behavior:g}),b=!0;else if(_){let O;try{O=document.querySelector(_)}catch{continue}O&&(O.scrollLeft=A,O.scrollTop=E,b=!0)}}}if(!b){const _=e.history.location.hash.slice(1);if(_){const w=window.history.state?.__hashScrollIntoViewOptions??!0;if(w){const A=document.getElementById(_);A&&A.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:g};if(window.scrollTo(w),m)for(const A of m){if(A===Xi)continue;const E=typeof A=="function"?A():document.querySelector(A);E&&E.scrollTo(w)}}}}finally{Wl=!1}e.isScrollRestoring&&n.set(y=>(y[f]||={},y))}})}function v0(e,t=String){const n=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&n.set(a,t(o))}return n.toString()}function Ed(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function YT(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[a,o]of t.entries()){const u=n[a];u==null?n[a]=Ed(o):Array.isArray(u)?u.push(Ed(o)):n[a]=[u,Ed(o)]}return n}var QT=WT(JSON.parse),XT=eR(JSON.stringify,JSON.parse);function WT(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=YT(t);for(const a in n){const o=n[a];if(typeof o=="string")try{n[a]=e(o)}catch{}}return n}}function eR(e,t){const n=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const u=v0(o,a);return u?`?${u}`:""}}var Ds="__root__";function Cn(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Nt(e){return e instanceof Response&&!!e.options}function b0(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Cn(e)}function tR(e){return{input:({url:t})=>{for(const n of e)t=qd(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=_0(e[n],t);return t}}}function nR(e){const t=y0(e.basepath),n=`/${t}`,a=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),u=e.caseSensitive?a:a.toLowerCase();return{input:({url:c})=>{const h=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return h===o?c.pathname="/":h.startsWith(u)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=gu(["/",t,c.pathname]),c)}}function qd(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function _0(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function rR(e,t){const{createMutableStore:n,createReadonlyStore:a,batch:o,init:u}=t,c=new Map,h=new Map,f=new Map,g=n(e.status),m=n(e.loadedAt),y=n(e.isLoading),b=n(e.isTransitioning),_=n(e.location),w=n(e.resolvedLocation),A=n(e.statusCode),E=n(e.redirect),O=n([]),N=n([]),j=n([]),D=a(()=>Td(c,O.get())),K=a(()=>Td(h,N.get())),J=a(()=>Td(f,j.get())),I=a(()=>O.get()[0]),F=a(()=>O.get().some(Q=>c.get(Q)?.get().status==="pending")),Y=a(()=>({locationHref:_.get().href,resolvedLocationHref:w.get()?.href,status:g.get()})),oe=a(()=>({status:g.get(),loadedAt:m.get(),isLoading:y.get(),isTransitioning:b.get(),matches:D.get(),location:_.get(),resolvedLocation:w.get(),statusCode:A.get(),redirect:E.get()})),se=po(64);function ge(Q){let ce=se.get(Q);return ce||(ce=a(()=>{const ke=O.get();for(const je of ke){const C=c.get(je);if(C&&C.routeId===Q)return C.get()}}),se.set(Q,ce)),ce}const Te={status:g,loadedAt:m,isLoading:y,isTransitioning:b,location:_,resolvedLocation:w,statusCode:A,redirect:E,matchesId:O,pendingIds:N,cachedIds:j,matches:D,pendingMatches:K,cachedMatches:J,firstId:I,hasPending:F,matchRouteDeps:Y,matchStores:c,pendingMatchStores:h,cachedMatchStores:f,__store:oe,getRouteMatchStore:ge,setMatches:rt,setPending:Ze,setCached:B};rt(e.matches),u?.(Te);function rt(Q){Rd(Q,c,O,n,o)}function Ze(Q){Rd(Q,h,N,n,o)}function B(Q){Rd(Q,f,j,n,o)}return Te}function Td(e,t){const n=[];for(const a of t){const o=e.get(a);o&&n.push(o.get())}return n}function Rd(e,t,n,a,o){const u=e.map(h=>h.id),c=new Set(u);o(()=>{for(const h of t.keys())c.has(h)||t.delete(h);for(const h of e){const f=t.get(h.id);if(!f){const g=a(h);g.routeId=h.routeId,t.set(h.id,g);continue}f.routeId=h.routeId,f.get()!==h&&f.set(h)}kT(n.get(),u)||n.set(u)})}var Fd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},sR=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Bu=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ms=(e,t,n=!0)=>{const a={...e.router.options.context??{}},o=n?t:t-1;for(let u=0;u<=o;u++){const c=e.matches[u];if(!c)continue;const h=e.router.getMatch(c.id);
10h&&Object.assign(a,h.__routeContext,h.__beforeLoadContext)}return a},gv=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,a=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),o=a>=0?a:0;let u=n?e.matches.findIndex(c=>c.routeId===n):e.firstBadMatchIndex??e.matches.length-1;u<0&&(u=o);for(let c=u;c>=0;c--){const h=e.matches[c];if(e.router.looseRoutesById[h.routeId].options.notFoundComponent)return c}return n?u:o},Jr=(e,t,n)=>{if(!(!Nt(n)&&!St(n)))throw Nt(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:Nt(n)?"redirected":St(n)?"notFound":a.status==="pending"?"success":a.status,context:Ms(e,t.index),isFetching:!1,error:n})),St(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Nt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},w0=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},mv=(e,t,n)=>{const a=Ms(e,n);e.updateMatch(t,o=>({...o,context:a}))},Wi=(e,t,n,a)=>{const{id:o,routeId:u}=e.matches[t],c=e.router.looseRoutesById[u];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,Jr(e,e.router.getMatch(o),n);try{c.options.onError?.(n)}catch(h){n=h,Jr(e,e.router.getMatch(o),n)}e.updateMatch(o,h=>(h._nonReactive.beforeLoadPromise?.resolve(),h._nonReactive.beforeLoadPromise=void 0,h._nonReactive.loadPromise?.resolve(),{...h,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Nt(n)&&!St(n)&&(e.serialError??=n)},S0=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Bu(e,t)&&(n.options.loader||n.options.beforeLoad||T0(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Fd(e)},o);a._nonReactive.pendingTimeout=u}},aR=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;S0(e,t,n,a);const o=()=>{const u=e.router.getMatch(t);u.preload&&(u.status==="redirected"||u.status==="notFound")&&Jr(e,u,u.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},iR=(e,t,n,a)=>{const o=e.router.getMatch(t);let u=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Ps(()=>{u?.resolve(),u=void 0});const{paramsError:c,searchError:h}=o;c&&Wi(e,n,c,"PARSE_PARAMS"),h&&Wi(e,n,h,"VALIDATE_SEARCH"),S0(e,t,a,o);const f=new AbortController;let g=!1;const m=()=>{g||(g=!0,e.updateMatch(t,D=>({...D,isFetching:"beforeLoad",fetchCount:D.fetchCount+1,abortController:f})))},y=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,D=>({...D,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{m(),y()});return}o._nonReactive.beforeLoadPromise=Ps();const b={...Ms(e,n,!1),...o.__routeContext},{search:_,params:w,cause:A}=o,E=Bu(e,t),O={search:_,abortController:f,params:w,preload:E,context:b,location:e.location,navigate:D=>e.router.navigate({...D,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":A,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},N=D=>{if(D===void 0){e.router.batch(()=>{m(),y()});return}(Nt(D)||St(D))&&(m(),Wi(e,n,D,"BEFORE_LOAD")),e.router.batch(()=>{m(),e.updateMatch(t,K=>({...K,__beforeLoadContext:D})),y()})};let j;try{if(j=a.options.beforeLoad(O),fo(j))return m(),j.catch(D=>{Wi(e,n,D,"BEFORE_LOAD")}).then(N)}catch(D){m(),Wi(e,n,D,"BEFORE_LOAD")}N(j)},oR=(e,t)=>{const{id:n,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],u=()=>h(),c=()=>iR(e,n,t,o),h=()=>{if(w0(e,n))return;const f=aR(e,n,o);return fo(f)?f.then(c):c()};return u()},lR=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([u,c,h])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:h,scripts:c,styles:u?.styles}))},E0=(e,t,n,a,o)=>{const u=t[a-1],{params:c,loaderDeps:h,abortController:f,cause:g}=e.router.getMatch(n),m=Ms(e,a),y=Bu(e,n);return{params:c,deps:h,preload:!!y,parentMatchPromise:u,abortController:f,context:m,location:e.location,navigate:b=>e.router.navigate({...b,_fromLocation:e.location}),cause:y?"preload":g,route:o,...e.router.options.additionalContext}},yv=async(e,t,n,a,o)=>{try{const u=e.router.getMatch(n);try{(!(f0??e.router.isServer)||u.ssr===!0)&&go(o);const c=o.options.loader,h=typeof c=="function"?c:c?.handler,f=h?.(E0(e,t,n,a,o)),g=!!h&&fo(f);if((g||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||u._nonReactive.minPendingPromise)&&e.updateMatch(n,y=>({...y,isFetching:"loader"})),h){const y=g?await f:f;Jr(e,e.router.getMatch(n),y),y!==void 0&&e.updateMatch(n,b=>({...b,loaderData:y}))}o._lazyPromise&&await o._lazyPromise;const m=u._nonReactive.minPendingPromise;m&&await m,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,y=>({...y,error:void 0,context:Ms(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let h=c;if(h?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,g=>({...g,status:g.status==="pending"?"success":g.status,isFetching:!1,context:Ms(e,a)}));return}const f=u._nonReactive.minPendingPromise;f&&await f,St(c)&&await o.options.notFoundComponent?.preload?.(),Jr(e,e.router.getMatch(n),c);try{o.options.onError?.(c)}catch(g){h=g,Jr(e,e.router.getMatch(n),g)}!Nt(h)&&!St(h)&&await go(o,["errorComponent"]),e.updateMatch(n,g=>({...g,error:h,context:Ms(e,a),status:"error",isFetching:!1}))}}catch(u){const c=e.router.getMatch(n);c&&(c._nonReactive.loaderPromise=void 0),Jr(e,c,u)}},uR=async(e,t,n)=>{async function a(_,w,A,E,O){const N=Date.now()-w.updatedAt,j=_?O.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:O.options.staleTime??e.router.options.defaultStaleTime??0,D=O.options.shouldReload,K=typeof D=="function"?D(E0(e,t,o,n,O)):D,{status:J,invalid:I}=E,F=N>=j&&(!!e.forceStaleReload||E.cause==="enter"||A!==void 0&&A!==E.id
10);c=J==="success"&&(I||(K??F)),_&&O.options.preload===!1||(c&&!e.sync&&m?(h=!0,(async()=>{try{await yv(e,t,o,n,O);const Y=e.router.getMatch(o);Y._nonReactive.loaderPromise?.resolve(),Y._nonReactive.loadPromise?.resolve(),Y._nonReactive.loaderPromise=void 0,Y._nonReactive.loadPromise=void 0}catch(Y){Nt(Y)&&await e.router.navigate(Y.options)}})()):J!=="success"||c?await yv(e,t,o,n,O):mv(e,o,n))}const{id:o,routeId:u}=e.matches[n];let c=!1,h=!1;const f=e.router.looseRoutesById[u],g=f.options.loader,m=((typeof g=="function"?void 0:g?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(w0(e,o)){if(!e.router.getMatch(o))return e.matches[n];mv(e,o,n)}else{const _=e.router.getMatch(o),w=e.router.stores.matchesId.get()[n],A=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===u?w:e.router.stores.matches.get().find(O=>O.routeId===u)?.id,E=Bu(e,o);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&m)return _;await _._nonReactive.loaderPromise;const O=e.router.getMatch(o),N=O._nonReactive.error||O.error;N&&Jr(e,O,N),O.status==="pending"&&await a(E,_,A,O,f)}else{const O=E&&!e.router.stores.matchStores.has(o),N=e.router.getMatch(o);N._nonReactive.loaderPromise=Ps(),O!==N.preload&&e.updateMatch(o,j=>({...j,preload:O})),await a(E,_,A,N,f)}}const y=e.router.getMatch(o);h||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,h||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const b=h?y.isFetching:!1;return b!==y.isFetching||y.invalid!==!1?(e.updateMatch(o,_=>({..._,isFetching:b,invalid:!1})),e.router.getMatch(o)):y};async function vv(e){const t=e,n=[];sR(t.router)&&Fd(t);let a;for(let b=0;b<t.matches.length;b++){try{const _=oR(t,b);fo(_)&&await _}catch(_){if(Nt(_))throw _;if(St(_))a=_;else if(!t.preload)throw _;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,u=a&&!t.preload?gv(t,a):void 0,c=a&&t.preload?0:u!==void 0?Math.min(u+1,o):o;let h,f;for(let b=0;b<c;b++)n.push(uR(t,n,b));try{await Promise.all(n)}catch{const b=await Promise.allSettled(n);for(const _ of b){if(_.status!=="rejected")continue;const w=_.reason;if(Nt(w))throw w;St(w)?h??=w:f??=w}if(f!==void 0)throw f}const g=h??(a&&!t.preload?a:void 0);let m=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!g&&a&&t.preload)return t.matches;if(g){const b=gv(t,g);b===void 0&&Qt();const _=t.matches[b],w=t.router.looseRoutesById[_.routeId],A=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&A&&(w.options.notFoundComponent=A),g.routeId=_.routeId;const E=_.routeId===t.router.routeTree.id;t.updateMatch(_.id,O=>({...O,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:g},isFetching:!1})),m=b,await go(w,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||t.router.getMatch(b.id)?.globalNotFound&&t.updateMatch(b.id,_=>({..._,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await go(b,["errorComponent"])}for(let b=0;b<=m;b++){const{id:_,routeId:w}=t.matches[b],A=t.router.looseRoutesById[w];try{const E=lR(t,_,A);if(E){const O=await E;t.updateMatch(_,N=>({...N,...O}))}}catch(E){console.error(`Error executing head for route ${w}:`,E)}}const y=Fd(t);if(fo(y)&&await y,g)throw g;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function bv(e,t){const n=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function go(e,t=mu){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:o,...u}=a.options;Object.assign(e.options,u),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===mu?(()=>{if(e._componentsPromise===void 0){const a=bv(e,mu);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():bv(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function T0(e){for(const t of mu)if(e.options[t]?.preload)return!0;return!1}var mu=["component","errorComponent","pendingComponent","notFoundComponent"],Qr="__TSR_index",_v="popstate",wv="beforeunload";function cR(e){let t=e.getLocation();const n=new Set,a=c=>
10{t=e.getLocation(),n.forEach(h=>h({location:t,action:c}))},o=c=>{e.notifyOnIndexChange??!0?a(c):t=e.getLocation()},u=async({task:c,navigateOpts:h,...f})=>{if(h?.ignoreBlocker??!1){c();return}const g=e.getBlockers?.()??[],m=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&g.length&&m)for(const y of g){const b=Tu(f.path,f.state);if(await y.blockerFn({currentLocation:t,nextLocation:b,action:f.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,h,f)=>{const g=t.state[Qr];h=Sv(g+1,h),u({task:()=>{e.pushState(c,h),a({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:c,state:h})},replace:(c,h,f)=>{const g=t.state[Qr];h=Sv(g,h),u({task:()=>{e.replaceState(c,h),a({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:c,state:h})},go:(c,h)=>{u({task:()=>{e.go(c),o({type:"GO",index:c})},navigateOpts:h,type:"GO"})},back:c=>{u({task:()=>{e.back(c?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{u({task:()=>{e.forward(c?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[Qr]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const h=e.getBlockers?.()??[];return e.setBlockers([...h,c]),()=>{const f=e.getBlockers?.()??[];e.setBlockers?.(f.filter(g=>g!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function Sv(e,t){t||(t={});const n=xf();return{...t,key:n,__TSR_key:n,[Qr]:e}}function hR(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let o=[];const u=()=>o,c=F=>o=F,h=(F=>F),f=(()=>Tu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const F=xf();t.history.replaceState({[Qr]:0,key:F,__TSR_key:F},"")}let g=f(),m,y=!1,b=!1,_=!1,w=!1;const A=()=>g;let E,O;const N=()=>{E&&(I._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),I._ignoreSubscribers=!1,E=void 0,O=void 0,m=void 0)},j=(F,Y,oe)=>{const se=h(Y);O||(m=g),g=Tu(Y,oe),E={href:se,state:oe,isPush:E?.isPush||F==="push"},O||(O=Promise.resolve().then(()=>N()))},D=F=>{g=f(),I.notify({type:F})},K=async()=>{if(b){b=!1;return}const F=f(),Y=F.state[Qr]-g.state[Qr],oe=Y===1,se=Y===-1,ge=!oe&&!se||y;y=!1;const Te=ge?"GO":se?"BACK":"FORWARD",rt=ge?{type:"GO",index:Y}:{type:se?"BACK":"FORWARD"};if(_)_=!1;else{const Ze=u();if(typeof document<"u"&&Ze.length){for(const B of Ze)if(await B.blockerFn({currentLocation:g,nextLocation:F,action:Te}
10)){b=!0,t.history.go(1),I.notify(rt);return}}}g=f(),I.notify(rt)},J=F=>{if(w){w=!1;return}let Y=!1;const oe=u();if(typeof document<"u"&&oe.length)for(const se of oe){const ge=se.enableBeforeUnload??!0;if(ge===!0){Y=!0;break}if(typeof ge=="function"&&ge()===!0){Y=!0;break}}if(Y)return F.preventDefault(),F.returnValue=""},I=cR({getLocation:A,getLength:()=>t.history.length,pushState:(F,Y)=>j("push",F,Y),replaceState:(F,Y)=>j("replace",F,Y),back:F=>(F&&(_=!0),w=!0,t.history.back()),forward:F=>{F&&(_=!0),w=!0,t.history.forward()},go:F=>{y=!0,t.history.go(F)},createHref:F=>h(F),flush:N,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(wv,J,{capture:!0}),t.removeEventListener(_v,K)},onBlocked:()=>{m&&g!==m&&(g=m)},getBlockers:u,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(wv,J,{capture:!0}),t.addEventListener(_v,K),t.history.pushState=function(...F){const Y=n.apply(t.history,F);return I._ignoreSubscribers||D("PUSH"),Y},t.history.replaceState=function(...F){const Y=a.apply(t.history,F);return I._ignoreSubscribers||D("REPLACE"),Y},I}function dR(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Tu(e,t){const n=dR(e),a=n.indexOf("#"),o=n.indexOf("?"),u=xf();return{href:n,pathname:n.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:n.length),hash:a>-1?n.substring(a):"",search:o>-1?n.slice(o,a===-1?void 0:a):"",state:t||{[Qr]:0,key:u,__TSR_key:u}}}function xf(){return(Math.random()+1).toString(36).substring(7)}function fR(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ha(e,t){const n=t,a=e;return{fromLocation:n,toLocation:a,pathChanged:n?.pathname!==a.pathname,hrefChanged:n?.href!==a.href,hashChanged:n?.hash!==a.hash}}var pR=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>
10n(),this.update=n=>{const a=this.options,o=this.basepath??a?.basepath??"/",u=this.basepath===void 0,c=a?.rewrite;if(this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=qT(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=hR()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=po(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=rR(mR(this.latestLocation),m),JT(this)}let h=!1;const f=this.options.basepath??"/",g=this.options.rewrite;if(u||o!==f||c!==g){this.basepath=f;const m=[],y=y0(f);y&&y!=="/"&&m.push(nR({basepath:f})),g&&m.push(g),this.rewrite=m.length===0?void 0:m.length===1?m[0]:tR(m),this.history&&this.updateLatestLocation(),h=!0}h&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=PT(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&jT(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,a)=>{const o={eventType:n,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const o=({pathname:f,search:g,hash:m,href:y,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const O=this.options.parseSearch(g),N=this.options.stringifySearch(O);return{href:f+N+m,publicHref:f+N+m,pathname:Qi(f).path,external:!1,searchStr:N,search:Ts(a?.search,O),hash:Qi(m.slice(1)).path,state:xs(a?.state,b)}}const _=new URL(y,this.origin),w=qd(this.rewrite,_),A=this.options.parseSearch(w.search),E=this.options.stringifySearch(A);return w.search=E,{href:w.href.replace(w.origin,""),publicHref:y,pathname:Qi(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:E,search:Ts(a?.search,A),hash:Qi(w.hash.slice(1)).path,state:xs(a?.state,b)}},u=o(n),{__tempLocation:c,__tempKey:h}=u.state;if(c&&(!h||h===this.tempLocationKey)){const f=o(c);return f.state.key=u.state.key,f.state.__TSR_key=u.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:u}}return u},this.resolvePathWithBase=(n,a)=>HT({base:n,to:Af(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,a,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},o):this.matchRoutesInternal(n,a),this.getMatchedRoutes=n=>yR({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const a=this.stores.matchStores.get(n)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const a=(u={})=>{const c=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(c);u.from;const f=u.unsafeRelative==="path"?c.pathname:u.from??h.fullPath,g=this.resolvePathWithBase(f,"."),m=h.search,y=Object.assign(Object.create(null),h.params),b=u.to?this.resolvePathWithBase(g,`${u.to}`):this.resolvePathWithBase(g,"."),_=u.params===!1||u.params===null?Ob
10ject.create(null):(u.params??!0)===!0?y:Object.assign(y,Vr(u.params,y)),w=this.getMatchedRoutes(b);let A=w.matchedRoutes;if((!w.foundRoute||w.foundRoute.path!=="/"&&w.routeParams["**"])&&this.options.notFoundRoute&&(A=[...A,this.options.notFoundRoute]),Object.keys(_).length>0)for(const oe of A){const se=oe.options.params?.stringify??oe.options.stringifyParams;if(se)try{Object.assign(_,se(_))}catch{}}const E=n.leaveParams?b:Qi(hv({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=m;if(n._includeValidateSearch&&this.options.search?.strict){const oe={};A.forEach(se=>{if(se.options.validateSearch)try{Object.assign(oe,yu(se.options.validateSearch,{...oe,...O}))}catch{}}),O=oe}O=vR({search:O,dest:u,destRoutes:A,_includeValidateSearch:n._includeValidateSearch}),O=Ts(m,O);const N=this.options.stringifySearch(O),j=u.hash===!0?c.hash:u.hash?Vr(u.hash,c.hash):void 0,D=j?`#${j}`:"";let K=u.state===!0?c.state:u.state?Vr(u.state,c.state):{};K=xs(c.state,K);const J=`${E}${N}${D}`;let I,F,Y=!1;if(this.rewrite){const oe=new URL(J,this.origin),se=_0(this.rewrite,oe);I=oe.href.replace(oe.origin,""),se.origin!==this.origin?(F=se.href,Y=!0):F=se.pathname+se.search+se.hash}else I=xT(J),F=I;return{publicHref:F,href:I,pathname:E,search:O,searchStr:N,state:K,hash:j??"",external:Y,unmaskOnReload:u.unmaskOnReload}},o=(u={},c)=>{const h=a(u);let f=c?a(c):void 0;if(!f){const g=Object.create(null);if(this.options.routeMasks){const m=zT(h.pathname,this.processedTree);if(m){Object.assign(g,m.rawParams);const{from:y,params:b,..._}=m.route,w=b===!1||b===null?Object.create(null):(b??!0)===!0?g:Object.assign(g,Vr(b,g));c={from:n.from,..._,params:w},f=a(c)}}}return f&&(h.maskedLocation=f),h};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:a,...o})=>{const u=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(m=>{o.state[m]=this.latestLocation.state[m]}
10);const g=Yt(o.state,this.latestLocation.state);return f.forEach(m=>{delete o.state[m]}),g},c=Yr(this.latestLocation.href)===Yr(o.href);let h=this.commitLocationPromise;if(this.commitLocationPromise=Ps(()=>{h?.resolve(),h=void 0}),c&&u())this.load();else{let{maskedLocation:f,hashScrollIntoView:g,...m}=o;f&&(m={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=g??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:o,viewTransition:u,ignoreBlocker:c,href:h,...f}={})=>{if(h){const y=this.history.location.state.__TSR_index,b=Tu(h,{__TSR_index:n?y:y+1}),_=new URL(b.pathname,this.origin);f.to=qd(this.rewrite,_).pathname,f.search=this.options.parseSearch(b.search),f.hash=b.hash.slice(1)}const g=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=g;const m=this.commitLocation({...g,viewTransition:u,replace:n,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===g&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:a,href:o,publicHref:u,...c})=>{let h=!1;if(o)try{new URL(`${o}`),h=!0}catch{}if(h&&!a&&(a=!0),a){if(n!==void 0||!o){const g=this.buildLocation({to:n,...c});o=o??g.publicHref,u=u??g.publicHref}const f=!h&&u?u:o;if(Su(f,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const g=this.history.getBlockers?.()??[];for(const m of g)if(m?.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...c,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(o=>!n.some(u=>u.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(a)})},this.load=async n=>{let a,o,u;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(u=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,m=Ha(g,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await vv({router:this,sync:n?.sync,forceStaleReload:c.href===g.href,matches:this.stores.pendingMatches.get(),location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,b=null,_=null,w=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),E=A.length,O=this.stores.matches.get();y=E?O.filter(D=>!this.stores.pendingMatchStores.has(D.id)):null;const N=new Set;for(const D of this.stores.pendingMatchStores.values())D.routeId&&N.add(D.routeId);const j=new Set;for(const D of this.stores.matchStores.values())D.routeId&&j.add(D.routeId);b=E?O.filter(D=>!N.has(D.routeId)):null,_=E?A.filter(D=>!j.has(D.routeId)):null,w=E?A.filter(D=>j.has(D.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...y.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[A,E]of[[b,"onLeave"],[_,"onEnter"],[w,"onStay"]])if(A)for(const O of A)this.looseRoutesById[O.routeId].options[E]?.(O)})})}})}catch(g){Nt(g)?(a=g,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):St(g)&&(o=g);const m=a?a.status:o?404:this.stores.matches.get().some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(a)})}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let h;this.hasNotFoundMatch()?h=404:this.stores.matches.get().some(f=>f.status==="error")&&(h=500),h!==void 0&&this.stores.statusCode.set(h)},this.startViewTransition=n=>
10{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,c=this.stores.resolvedLocation.get(),h=typeof a.types=="function"?a.types(Ha(u,c)):a.types;if(h===!1){n();return}o={update:n,types:h}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,a)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(a);return}const u=this.stores.matchStores.get(n);if(u){u.set(a);return}const c=this.stores.cachedMatchStores.get(n);if(c){const h=a(c.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(f=>f.filter(g=>g!==n)):c.set(h)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const a=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const a=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),u=this.getParsedLocationHref(o);n.options.href=u,n.headers.set("Location",u)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const u=o.pathname+o.search+o.hash;n.options.href=u,n.headers.set("Location",u)}}catch{}if(n.options.href&&!n.options._builtLocation&&Su(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!a(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),a=o=>{const u=this.looseRoutesById[o.routeId];if(!u.options.loader)return!0;const c=(o.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=c};this.clearCache({filter:a})},this.loadRouteChunk=go,this.preloadRoute=async n=>{const a=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...u,...this.stores.cachedIds.get()]),h=o.filter(f=>!c.has(f.id));if(h.length){const f=this.stores.cachedMatches.get();this.stores.setCached([...f,...h])}try{return o=await vv({router:this,matches:o,location:a,preload:!0,updateMatch:(f,g)=>{u.has(f)?o=o.map(m=>m.id===f?g(m):m):this.updateMatch(f,g)}}),o}catch(f){if(Nt(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:a});St(f)||console.error(f);return}},this.matchRoute=(n,a)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},u=this.buildLocation(o);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const c=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=NT(u.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,c.pathname,this.processedTree);return!h||n.params&&!Yt(h.rawParams,n.params,{partial:!0})?!1:a?.includeSearch??!0?Yt(c.search,u.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??XT,parseSearch:e.parseSearch??QT,protocolAllowlist:e.protocolAllowlist??TT}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}
10isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:o,parsedParams:u}=n;let{matchedRoutes:c}=n,h=!1;(a?a.path!=="/"&&o["**"]:Yr(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:h=!0);const f=h?_R(this.options.notFoundMode,c):void 0,g=new Array(c.length),m=new Map;for(const y of this.stores.matchStores.values())y.routeId&&m.set(y.routeId,y.get());for(let y=0;y<c.length;y++){const b=c[y],_=g[y-1];let w,A,E;{const Te=_?.search??e.search,rt=_?._strictSearch??void 0;try{const Ze=yu(b.options.validateSearch,{...Te})??void 0;w={...Te,...Ze},A={...rt,...Ze},E=void 0}catch(Ze){let B=Ze;if(Ze instanceof Ru||(B=new Ru(Ze.message,{cause:Ze})),t?.throwOnError)throw B;w=Te,A={},E=B}}const O=b.options.loaderDeps?.({search:w})??"",N=O?JSON.stringify(O):"",{interpolatedPath:j,usedParams:D}=hv({path:b.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),K=b.id+j+N,J=this.getMatch(K),I=m.get(b.id),F=J?._strictParams??D;let Y;if(!J)try{Ev(b,D,u,F)}catch(Te){if(St(Te)||Nt(Te)?Y=Te:Y=new gR(Te.message,{cause:Te}),t?.throwOnError)throw Y}Object.assign(o,F);const oe=I?"stay":"enter";let se;if(J)se={...J,cause:oe,params:I?.params??o,_strictParams:F,search:Ts(I?I.search:J.search,w),_strictSearch:A};else{const Te=b.options.loader||b.options.beforeLoad||b.lazyFn||T0(b)?"pending":"success";se={id:K,ssr:b.options.ssr,index:y,routeId:b.id,params:I?.params??o,_strictParams:F,pathname:j,updatedAt:Date.now(),search:I?Ts(I.search,w):w,_strictSearch:A,searchError:void 0,status:Te,isFetching:!1,error:void 0,paramsError:Y,__routeContext:void 0,_nonReactive:{loadPromise:Ps()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:oe,loaderDeps:I?xs(I.loaderDeps,O):O,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t?.preload||(se.globalNotFound=f===b.id),se.searchError=E;const ge=this.getParentContext(_);se.context={...ge,...se.__routeContext,...se.__beforeLoadContext},g[y]=se}for(let y=0;y<g.length;y++){const b=g[y],_=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),A=m.get(b.routeId);if(b.params=A?Ts(A.params,o):o,!w){const E=g[y-1],O=this.getParentContext(E);if(_.options.context){const N={deps:b.loaderDeps,params:b.params,context:O??{},location:e,navigate:j=>this.navigate({...j,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:g,routeId:_.id};b.__routeContext=_.options.context(N)??void 0}b.context={...O,...b.__routeContext,...b.__beforeLoadContext}}}return g}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n,parsedParams:a}=this.getMatchedRoutes(e.pathname),o=ho(t),u={...e.search};for(const m of t)try{Object.assign(u,yu(m.options.validateSearch,u))}catch{}const c=ho(this.stores.matchesId.get()),h=c&&this.stores.matchStores.get(c)?.get(),f=h&&h.routeId===o.id&&h.pathname===e.pathname;let g;if(f)g=h.params;else{const m=Object.assign(Object.create(null),n);for(const y of t)try{Ev(y,n,a??{},m)}catch{}g=m}return{matchedRoutes:t,fullPath:o.fullPath,search:u,params:g}}},Ru=class extends Error{},gR=class extends Error{};function mR(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function yu(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Ru("Async validation not supported");if(n.issues)throw new Ru(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function yR({pathname:e,routesById:t,processedTree:n}){const a=Object.create(null),o=Yr(e);let u,c;const h=DT(o,n,!0);return h&&(u=h.route,Object.assign(a,h.rawParams),c=Object.assign(Object.create(null),h.parsedParams)),{matchedRoutes:h?.branch||[t.__root__],routeParam
10s:a,foundRoute:u,parsedParams:c}}function vR({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){return bR(n)(e,t,a??!1)}function bR(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const u=({search:c,next:h})=>{let f=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((m,y)=>y(m),c));const g=h(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((m,y)=>y(m),g):g};t.middlewares.push(u)}if(o.options.validateSearch){const u=({search:c,next:h})=>{const f=h(c);if(!t._includeValidateSearch)return f;try{return{...f,...yu(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(u)}}const n=({search:o})=>{const u=t.dest;return u.search?u.search===!0?o:Vr(u.search,o):{}};t.middlewares.push(n);const a=(o,u,c)=>{if(o>=c.length)return u;const h=c[o];return h({search:u,next:g=>a(o+1,g,c)})};return function(u,c,h){return t.dest=c,t._includeValidateSearch=h,a(0,u,t.middlewares)}}function _R(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const a=t[n];if(a.children)return a.id}return Ds}function Ev(e,t,n,a){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const u in t)u in n&&(a[u]=n[u]);else{const u=o(a);Object.assign(a,u)}}var In=Symbol.for("TSR_DEFERRED_PROMISE");function wR(e,t){const n=e;return n[In]||(n[In]={status:"pending"},n.then(a=>{n[In].status="success",n[In].data=a}).catch(a=>{n[In].status="error",n[In].error={data:fR(a),__isServerError:!0}})),n}var SR="Error preloading route! âï¸";function Tv(e,t){if(e)return typeof e=="string"?e:e[t]}function ER(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}function TR(e){if(e.tag!=="link")return;const t=e.attrs?.rel,n=e.attrs?.href;if(typeof n=="string"&&(typeof t=="string"?t.split(/\s+/):[]).includes("stylesheet"))return n}function RR(e,t){const n=TR(t);return!!n&&e?.inlineCss?.styles[n]!==void 0}var R0=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.originalIndex;const n=this.options,a=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Ds:this.parentRoute||Qt();let o=a?Ds:n?.path;o&&o!=="/"&&(o=m0(o));const u=n?.id||o;let c=a?Ds:gu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);o==="__root__"&&(o="/"),c!=="__root__"&&(c=gu(["/",c]));const h=c==="__root__"?"/":gu([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=h,this._to=Yr(h)},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=>Cn({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.")}},AR=class extends R0{constructor(e){super(e)}};function OR(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(n)}}}var xR=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(xR||{}),fr=Symbol.asyncIterator,A0=Symbol.hasInstance,qa=Symbol.isConcatSpreadable,pr=Symbol.iterator,O0=Symbol.match,x0=Symbol.matchAll,k0=Symbol.replace,C0=Symbol.search,j0=Symbol.species,z0=Symbol.split,N0=Symbol.toPrimitive,Fa=Symbol.toStringTag,D0=Symbol.unscopables,M0={[fr]:0,[A0]:1,[qa]:2,[pr]:3,[O0]:4,[x0]:5,[k0]:6,[C0]:7,[j0]:8,[z0]:9,[N0]:10,[Fa]:11,[D0]:12},kR={0:fr,1:A0,2:qa,3:pr,4:O0,5:x0,6:k0,7:C0,8:j0,9:z0,10:N0,11:Fa,12:D0},R=void 0,CR={2:!0,3:!1,1:R,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},jR={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},zR={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function xe(e,t,n,a,o,u,c,h,f,g,m,y){return{t:e,i:t,s:n,c:a,m:o,p:u,e:c,a:h,f,b:g,o:m,l:y}}function Wr(e){return xe(2,R,e,R,R,R,R,R,R,R,R,R)}var P0=Wr(2),L0=Wr(3),NR=Wr(1),DR=Wr(0),MR=Wr(4),PR=Wr(5),LR=Wr(6),UR=Wr(7);function $R(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case` 11`: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 R}}function es(e){let t="",n=0,a;for(let o=0,u=e.length;o<u;o++)a=$R(e[o]),a&&(t+=e.slice(n,o)+a,n=o+1);return n===0?t=e:t+=e.slice(n),t}function IR(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return` 12`;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 ts(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,IR)}var eu="__SEROVAL_REFS__",U0=new Map,$a=new Map;function $0(e){return U0.has(e)}function BR(e){return $a.has(e)}function HR(e){if($0(e))return U0.get(e);throw new bA(e)}function qR(e){if(BR(e))return $a.get(e);throw new _A(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,eu,{value:$a,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,eu,{value:$a,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,eu,{value:$a,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,eu,{value:$a,configurable:!0,writable:!1,enumerable:!1});function kf(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}
12function FR(e){let t=jR[kf(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function I0(e,t){let n=FR(e),a=Object.getOwnPropertyNames(e);for(let o=0,u=a.length,c;o<u;o++)c=a[o],c!=="name"&&c!=="message"&&(c==="stack"?t&4&&(n=n||{},n[c]=e[c]):(n=n||{},n[c]=e[c]));return n}function B0(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function GR(e){switch(e){case Number.POSITIVE_INFINITY:return PR;case Number.NEGATIVE_INFINITY:return LR}return e!==e?UR:Object.is(e,-0)?MR:xe(0,R,e,R,R,R,R,R,R,R,R,R)}function H0(e){return xe(1,R,es(e),R,R,R,R,R,R,R,R,R)}function ZR(e){return xe(3,R,""+e,R,R,R,R,R,R,R,R,R)}function VR(e){return xe(4,e,R,R,R,R,R,R,R,R,R,R)}function KR(e,t){let n=t.valueOf();return xe(5,e,n!==n?"":t.toISOString(),R,R,R,R,R,R,R,R,R)}function JR(e,t){return xe(6,e,R,es(t.source),t.flags,R,R,R,R,R,R,R)}function YR(e,t){return xe(17,e,M0[t],R,R,R,R,R,R,R,R,R)}function QR(e,t){return xe(18,e,es(HR(t)),R,R,R,R,R,R,R,R,R)}function XR(e,t,n){return xe(25,e,n,es(t),R,R,R,R,R,R,R,R)}function WR(e,t,n){return xe(9,e,R,R,R,R,R,n,R,R,B0(t),R)}function eA(e,t){return xe(21,e,R,R,R,R,R,R,t,R,R,R)}function tA(e,t,n){return xe(15,e,R,t.constructor.name,R,R,R,R,n,t.byteOffset,R,t.length)}function nA(e,t,n){return xe(16,e,R,t.constructor.name,R,R,R,R,n,t.byteOffset,R,t.byteLength)}function rA(e,t,n){return xe(20,e,R,R,R,R,R,R,n,t.byteOffset,R,t.byteLength)}function sA(e,t,n){return xe(13,e,kf(t),R,es(t.message),n,R,R,R,R,R,R)}function aA(e,t,n){return xe(14,e,kf(t),R,es(t.message),n,R,R,R,R,R,R)}function iA(e,t){return xe(7,e,R,R,R,R,R,t,R,R,R,R)}function oA(e,t){return xe(28,R,R,R,R,R,R,[e,t],R,R,R,R)}function lA(e,t){return xe(30,R,R,R,R,R,R,[e,t],R,R,R,R)}function uA(e,t,n){return xe(31,e,R,R,R,R,R,n,t,R,R,R)}function cA(e,t){return xe(32,e,R,R,R,R,R,R,t,R,R,R)}function hA(e,t){return xe(33,e,R,R,R,R,R,R,t,R,R,R)}function dA(e,t){return xe(34,e,R,R,R,R,R,R,t,R,R,R)}function fA(e,t,n,a){return xe(35,e,n,R,R,R,R,t,R,R,R,a)}var pA={parsing:1,serialization:2,deserialization:3};function gA(e){return`Seroval Error (step: ${pA[e]})`}var mA=(e,t)=>gA(e),q0=class extends Error{constructor(e,t){super(mA(e)),this.cause=t}},Rv=class extends q0{constructor(e){super("parsing",e)}},yA=class extends q0{constructor(e){super("deserialization",e)}};function gr(e){return`Seroval Error (specific: ${e})`}var Hu=class extends Error{constructor(t){super(gr(1)),this.value=t}},F0=class extends Error{constructor(t){super(gr(2))}},vA=class extends Error{constructor(e){super(gr(3))}},ko=class extends Error{constructor(e){super(gr(4))}},bA=class extends Error{constructor(e){super(gr(5)),this.value=e}},_A=class extends Error{constructor(e){super(gr(6))}},wA=class extends Error{constructor(e){super(gr(7))}},ns=class extends Error{constructor(e){super(gr(8))}},SA=class extends Error{constructor(t){super(gr(9))}},EA=class{constructor(e,t){this.value=e,this.replacement=t}},qu=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},TA=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},RA=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};qu.toString();TA.toString();RA.toString();var AA=()=>{let e=[],t=[],n=!0,a=!1,o=0,u=(f,g,m)=>{for(m=0;m<o;m++)t[m]&&t[m][g](f)},c=(f,g,m,y)=>{for(g=0,m=e.length;g<m;g++)y=e[g],!n&&g===m-1?f[a?"return":"throw"](y):f.next(y)},h=(f,g)=>(n&&(g=o++,t[g]=f),c(f),()=>{n&&(t[g]=t[o],t[o--]=void 0)});return{__SEROVAL_STREAM__:!0,on:f=>h(f),next:f=>{n&&(e.push(f),u(f,"next"))},throw:f=>{n&&(e.push(f),u(f,"throw"),n=!1,a=!1,t.length=0)},return:f=>{n&&(e.push(f),u(f,"return"),n=!1,a=!0,t.length=0)}}},OA=e=>t=>()=>{let n=0,a={[e]:()=>a,next:()=>{if(n>t.d)return{done:!0,value:void 0};let o=n++,u=t.v[o];if(o===t.t)throw u;return{done:o===t.d,value:u}}};return a},xA=(e,t)=>n=>()=>{let a=0,o=-1,u=!1,c=[],h=[],f=(m=0,y=h.length)=>{for(;m<y;m++)h[m].s({done:!0,value:void 0})};n.on({next:m=>{let y=h.shift();y&&y.s({done:!1,value:m}),c.push(m)},throw:m=>{let y=h.shift();y&&y.f(m),f(),o=c.length,u=!0,c.push(m)},return:m=>{let y=h.shift();y&&y.s({done:!0,value:m}),f(),o=c.length,c.push(m)}});let g={[e]:()=>g,next:()=>{if(o===-1){let b=a++;if(b>=c.length){let _=t();return h.push(_),_.p}return{done:!1,value:c[b]}}if(a>o)return{done:!0,value:void 0};let m=a++,y=c[m];if(m!==o)return{done:!1,value:y};if(u)throw y;return{done:!0,value:y}}};return g},G0=e=>{let t=atob(e),n=t.length,a=new Uint8Array(n);for(let o=0;o<n;o++)a[o]=t.charCodeAt(o);return a.buffer};G0.toString();
12function kA(e){return"__SEROVAL_SEQUENCE__"in e}function Z0(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function CA(e){let t=[],n=-1,a=-1,o=e[pr]();for(;;)try{let u=o.next();if(t.push(u.value),u.done){a=t.length-1;break}}catch(u){n=t.length,t.push(u)}return Z0(t,n,a)}var jA=OA(pr);function zA(e){return jA(e)}var NA={},DA={},MA={0:{},1:{},2:{},3:{},4:{},5:{}};function Fu(e){return"__SEROVAL_STREAM__"in e}function $s(){return AA()}function PA(e){let t=$s(),n=e[fr]();async function a(){try{let o=await n.next();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var LA=xA(fr,qu);function UA(e){return LA(e)}async function $A(e){try{return[1,await e]}catch(t){return[0,t]}}function IA(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function vu(e,t){e.marked.add(t)}function BA(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function Gu(e,t){let n=e.refs.get(t);return n!=null?(vu(e,n),{type:1,value:VR(n)}):{type:0,value:BA(e,t)}}function Cf(e,t){let n=Gu(e,t);return n.type===1?n:$0(t)?{type:2,value:QR(n.value,t)}:n}function Cs(e,t){let n=Cf(e,t);if(n.type!==0)return n.value;if(t in M0)return YR(n.value,t);throw new Hu(t)}function Zu(e,t){let n=Gu(e,MA[t]);return n.type===1?n.value:xe(26,n.value,t,R,R,R,R,R,R,R,R,R)}function HA(e){let t=Gu(e,NA);return t.type===1?t.value:xe(27,t.value,R,R,R,R,R,R,Cs(e,pr),R,R,R)}function qA(e){let t=Gu(e,DA);return t.type===1?t.value:xe(29,t.value,R,R,R,R,R,[Zu(e,1),Cs(e,fr)],R,R,R,R)}function FA(e,t,n,a){return xe(n?11:10,e,R,R,R,a,R,R,R,R,B0(t),R)}function GA(e,t,n,a){return xe(8,t,R,R,R,R,{k:n,v:a},R,Zu(e,0),R,R,R)}function ZA(e,t,n){let a=new Uint8Array(n),o="";for(let u=0,c=a.length;u<c;u++)o+=String.fromCharCode(a[u]);return xe(19,t,es(btoa(o)),R,R,R,R,R,Zu(e,5),R,R,R)}function VA(e,t){return{base:IA(e,t),child:void 0}}var KA=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return mt(this._p,this.depth,e)}};async function JA(e,t,n){let a=[];for(let o=0,u=n.length;o<u;o++)o in n?a[o]=await mt(e,t,n[o]):a[o]=0;return a}async function YA(e,t,n,a){return WR(n,a,await JA(e,t,a))}async function jf(e,t,n){let a=Object.entries(n),o=[],u=[];for(let c=0,h=a.length;c<h;c++)o.push(es(a[c][0])),u.push(await mt(e,t,a[c][1]));return pr in n&&(o.push(Cs(e.base,pr)),u.push(oA(HA(e.base),await mt(e,t,CA(n))))),fr in n&&
12(o.push(Cs(e.base,fr)),u.push(lA(qA(e.base),await mt(e,t,PA(n))))),Fa in n&&(o.push(Cs(e.base,Fa)),u.push(H0(n[Fa]))),qa in n&&(o.push(Cs(e.base,qa)),u.push(n[qa]?P0:L0)),{k:o,v:u}}async function Ad(e,t,n,a,o){return FA(n,a,o,await jf(e,t,a))}async function QA(e,t,n,a){return eA(n,await mt(e,t,a.valueOf()))}async function XA(e,t,n,a){return tA(n,a,await mt(e,t,a.buffer))}async function WA(e,t,n,a){return nA(n,a,await mt(e,t,a.buffer))}async function e1(e,t,n,a){return rA(n,a,await mt(e,t,a.buffer))}async function Av(e,t,n,a){let o=I0(a,e.base.features);return sA(n,a,o?await jf(e,t,o):R)}async function t1(e,t,n,a){let o=I0(a,e.base.features);return aA(n,a,o?await jf(e,t,o):R)}async function n1(e,t,n,a){let o=[],u=[];for(let[c,h]of a.entries())o.push(await mt(e,t,c)),u.push(await mt(e,t,h));return GA(e.base,n,o,u)}async function r1(e,t,n,a){let o=[];for(let u of a.keys())o.push(await mt(e,t,u));return iA(n,o)}async function V0(e,t,n,a){let o=e.base.plugins;if(o)for(let u=0,c=o.length;u<c;u++){let h=o[u];if(h.parse.async&&h.test(a))return XR(n,h.tag,await h.parse.async(a,new KA(e,t),{id:n}))}return R}async function s1(e,t,n,a){let[o,u]=await $A(a);return xe(12,n,o,R,R,R,R,R,await mt(e,t,u),R,R,R)}function a1(e,t,n,a,o){let u=[],c=n.on({next:h=>{vu(this.base,t),mt(this,e,h).then(f=>{u.push(cA(t,f))},f=>{o(f),c()})},throw:h=>{vu(this.base,t),mt(this,e,h).then(f=>{u.push(hA(t,f)),a(u),c()},f=>{o(f),c()})},return:h=>{vu(this.base,t),mt(this,e,h).then(f=>{u.push(dA(t,f)),a(u),c()},f=>{o(f),c()})}})}async function i1(e,t,n,a){return uA(n,Zu(e.base,4),await new Promise(a1.bind(e,t,n,a)))}async function o1(e,t,n,a){let o=[];for(let u=0,c=a.v.length;u<c;u++)o[u]=await mt(e,t,a.v[u]);return fA(n,o,a.t,a.d)}async function l1(e,t,n,a){if(Array.isArray(a))return YA(e,t,n,a);if(Fu(a))return i1(e,t,n,a);if(kA(a))return o1(e,t,n,a);let o=a.constructor;if(o===EA)return mt(e,t,a.replacement);let u=await V0(e,t,n,a);if(u)return u;switch(o){case Object:return Ad(e,t,n,a,!1);case R:return Ad(e,t,n,a,!0);case Date:return KR(n,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Av(e,t,n,a);case Number:case Boolean:case String:case BigInt:return QA(e,t,n,a);case ArrayBuffer:return ZA(e.base,n,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return XA(e,t,n,a);case DataView:return e1(e,t,n,a);case Map:return n1(e,t,n,a);case Set:return r1(e,t,n,a)}if(o===Promise||a instanceof Promise)return s1(e,t,n,a);let c=e.base.features;if(c&32&&o===RegExp)return JR(n,a);if(c&16)switch(o){case BigInt64Array:case BigUint64Array:return WA(e,t,n,a)}if(c&1&&typeof AggregateError<"u"&&(o===AggregateError||a instanceof AggregateError))return t1(e,t,n,a);if(a instanceof Error)return Av(e,t,n,a);if(pr in a||fr in a)return Ad(e,t,n,a,!!o);throw new Hu(a)}async function u1(e,t,n){let a=Cf(e.base,n);if(a.type!==0)return a.value;let o=await V0(e,t,a.value,n);if(o)return o;throw new Hu(n)}async function mt(e,t,n){switch(typeof n){case"boolean":return n?P0:L0;case"undefined":return NR;case"string":return H0(n);case"number":return GR(n);case"bigint":return ZR(n);case"object":{if(n){let a=Cf(e.base,n);return a.type===0?await l1(e,t+1,a.value,n):a.value}return DR}case"symbol":return Cs(e.base,n);case"function":return u1(e,t,n);default:throw new Hu(n)}}async function c1(e,t){try{return await mt(e,0,t)}catch(n){throw n instanceof Rv?n:new Rv(n)}}var h1=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(h1||{});function K0(e,t){for(let n=0,a=t.length;n<a;n++){let o=t[n];e.has(o)||(e.add(o),o.extends&&K0(e,o.extends))}}function J0(e){if(e){let t=new Set;return K0(t,e),[...t]}}function d1(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 wA(e)}}var f1=1e6,p1=1e4,g1=2e4;function Y0(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}}var m1=1e3;function y1(e,t){var n;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(n=t.features)!=null?n:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||m1}}
12function v1(e){return{mode:2,base:y1(2,e),child:R}}var b1=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ie(this._p,this.depth,e)}};function Q0(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new ns({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function _1(e,t,n){return Q0(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function w1(e,t,n){return Q0(e.base,t),e.base.refs.set(t,n),n}function yt(e,t,n){return e.mode===1?_1(e,t,n):w1(e,t,n)}function Gd(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new ns(e)}function S1(e,t){return yt(e,t.i,qR(ts(t.s)))}function E1(e,t,n){let a=n.a,o=a.length,u=yt(e,n.i,new Array(o));for(let c=0,h;c<o;c++)h=a[c],h&&(u[c]=Ie(e,t,h));return Y0(u,n.o),u}function T1(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function R1(e){switch(e){case fr:case qa:case Fa:case pr:return!0;default:return!1}}function Ov(e,t,n){T1(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function A1(e,t,n,a,o){if(typeof a=="string")Ov(n,ts(a),Ie(e,t,o));else{let u=Ie(e,t,a);switch(typeof u){case"string":Ov(n,u,Ie(e,t,o));break;case"symbol":R1(u)&&(n[u]=Ie(e,t,o));break;default:throw new ns(a)}}}function X0(e,t,n,a){let o=n.k;if(o.length>0)for(let u=0,c=n.v,h=o.length;u<h;u++)A1(e,t,a,o[u],c[u]);return a}function O1(e,t,n){let a=yt(e,n.i,n.t===10?{}:Object.create(null));return X0(e,t,n.p,a),Y0(a,n.o),a}function x1(e,t){return yt(e,t.i,new Date(t.s))}function k1(e,t){if(e.base.features&32){let n=ts(t.c);if(n.length>g1)throw new ns(t);return yt(e,t.i,new RegExp(n,t.m))}throw new F0(t)}function C1(e,t,n){let a=yt(e,n.i,new Set);for(let o=0,u=n.a,c=u.length;o<c;o++)a.add(Ie(e,t,u[o]));return a}function j1(e,t,n){let a=yt(e,n.i,new Map);for(let o=0,u=n.e.k,c=n.e.v,h=u.length;o<h;o++)a.set(Ie(e,t,u[o]),Ie(e,t,c[o]));return a}function z1(e,t){if(t.s.length>f1)throw new ns(t);return yt(e,t.i,G0(ts(t.s)))}function N1(e,t,n){var a;let o=d1(n.c),u=Ie(e,t,n.f),c=(a=n.b)!=null?a:0;if(c<0||c>u.byteLength)throw new ns(n);return yt(e,n.i,new o(u,c,n.l))}function D1(e,t,n){var a;let o=Ie(e,t,n.f),u=(a=n.b)!=null?a:0;if(u<0||u>o.byteLength)throw new ns(n);return yt(e,n.i,new DataView(o,u,n.l))}function W0(e,t,n,a){if(n.p){let o=X0(e,t,n.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(o))}return a}function M1(e,t,n){let a=yt(e,n.i,new AggregateError([],ts(n.m)));return W0(e,t,n,a)}function P1(e,t,n){let a=Gd(n,zR,n.s),o=yt(e,n.i,new a(ts(n.m)));return W0(e,t,n,o)}function L1(e,t,n){let a=qu(),o=yt(e,n.i,a.p),u=Ie(e,t,n.f);return n.s?a.s(u):a.f(u),o}
12function U1(e,t,n){return yt(e,n.i,Object(Ie(e,t,n.f)))}function $1(e,t,n){let a=e.base.plugins;if(a){let o=ts(n.c);for(let u=0,c=a.length;u<c;u++){let h=a[u];if(h.tag===o)return yt(e,n.i,h.deserialize(n.s,new b1(e,t),{id:n.i}))}}throw new vA(n.c)}function I1(e,t){return yt(e,t.i,yt(e,t.s,qu()).p)}function B1(e,t,n){let a=e.base.refs.get(n.i);if(a)return a.s(Ie(e,t,n.a[1])),R;throw new ko("Promise")}function H1(e,t,n){let a=e.base.refs.get(n.i);if(a)return a.f(Ie(e,t,n.a[1])),R;throw new ko("Promise")}function q1(e,t,n){Ie(e,t,n.a[0]);let a=Ie(e,t,n.a[1]);return zA(a)}function F1(e,t,n){Ie(e,t,n.a[0]);let a=Ie(e,t,n.a[1]);return UA(a)}function G1(e,t,n){let a=yt(e,n.i,$s()),o=n.a,u=o.length;if(u)for(let c=0;c<u;c++)Ie(e,t,o[c]);return a}function Z1(e,t,n){let a=e.base.refs.get(n.i);if(a&&Fu(a))return a.next(Ie(e,t,n.f)),R;throw new ko("Stream")}function V1(e,t,n){let a=e.base.refs.get(n.i);if(a&&Fu(a))return a.throw(Ie(e,t,n.f)),R;throw new ko("Stream")}function K1(e,t,n){let a=e.base.refs.get(n.i);if(a&&Fu(a))return a.return(Ie(e,t,n.f)),R;throw new ko("Stream")}function J1(e,t,n){return Ie(e,t,n.f),R}function Y1(e,t,n){return Ie(e,t,n.a[1]),R}function Q1(e,t,n){let a=yt(e,n.i,Z0([],n.s,n.l));for(let o=0,u=n.a.length;o<u;o++)a.v[o]=Ie(e,t,n.a[o]);return a}function Ie(e,t,n){if(t>e.base.depthLimit)throw new SA(e.base.depthLimit);switch(t+=1,n.t){case 2:return Gd(n,CR,n.s);case 0:return Number(n.s);case 1:return ts(String(n.s));case 3:if(String(n.s).length>p1)throw new ns(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return S1(e,n);case 9:return E1(e,t,n);case 10:case 11:return O1(e,t,n);case 5:return x1(e,n);case 6:return k1(e,n);case 7:return C1(e,t,n);case 8:return j1(e,t,n);case 19:return z1(e,n);case 16:case 15:return N1(e,t,n);case 20:return D1(e,t,n);case 14:return M1(e,t,n);case 13:return P1(e,t,n);case 12:return L1(e,t,n);case 17:return Gd(n,kR,n.s);case 21:return U1(e,t,n);case 25:return $1(e,t,n);case 22:return I1(e,n);case 23:return B1(e,t,n);case 24:return H1(e,t,n);case 28:return q1(e,t,n);case 30:return F1(e,t,n);case 31:return G1(e,t,n);case 32:return Z1(e,t,n);case 33:return V1(e,t,n);case 34:return K1(e,t,n);case 27:return J1(e,t,n);case 29:return Y1(e,t,n);case 35:return Q1(e,t,n);default:throw new F0(n)}}function X1(e,t){try{return Ie(e,0,t)}catch(n){throw new yA(n)}}var W1=()=>T;W1.toString();function xv(e,t){let n=J0(t.plugins),a=v1({plugins:n,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return X1(a,e)}async function eO(e,t={}){let n=J0(t.plugins),a=VA(1,{plugins:n,disabledFeatures:t.disabledFeatures});return{t:await c1(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function tO(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,n,a){return{v:n.parse(e.toSerializable(t))}},async async(t,n,a){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,a){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,a){return e.fromSerializable(n.deserialize(t.v))}}}var nO=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},Au=globalThis.Buffer,e_=!!Au&&typeof Au.from=="function";function t_(e){if(e.length===0)return"";if(e_)return Au.from(e).toString("base64");const t=32768,n=[];for(let a=0;a<e.length;a+=t){const o=e.subarray(a,a+t);n.push(String.fromCharCode.apply(null,o))}return btoa(n.join(""))}function n_(e){if(e.length===0)return new Uint8Array(0);if(e_){const a=Au.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}var eo=Object.create(null),to=Object.create(null),rO=e=>new ReadableStream({start(t){e.on({next(n){try{t.enqueue(n_(n))}catch{}},throw(n){t.error(n)},return(){try{t.close()}catch{}}})}}),sO=new TextEncoder,aO=e=>new ReadableStream({start(t){e.on({next(n){try{typeof n=="string"?t.enqueue(sO.encode(n)):t.enqueue(n_(n.$b64))}catch{}},throw(n){t.error(n)},return(){try{t.close()}catch{}}})}}),iO="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;
12i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",oO="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function kv(e){const t=$s(),n=e.getReader();return(async()=>{try{for(;;){const{done:a,value:o}=await n.read();if(a){t.return(void 0);break}t.next(t_(o))}}catch(a){t.throw(a)}finally{n.releaseLock()}})(),t}function Cv(e){const t=$s(),n=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:o,value:u}=await n.read();if(o){try{const c=a.decode();c.length>0&&t.next(c)}catch{}t.return(void 0);break}try{const c=a.decode(u,{stream:!0});c.length>0&&t.next(c)}catch{t.next({$b64:t_(u)})}}}catch(o){t.throw(o)}finally{n.releaseLock()}})(),t}var lO={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===eo},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return iO},deserialize(e,t,n){return eo}},{tag:"tss/RawStreamFactoryText",test(e){return e===to},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return oO},deserialize(e,t,n){return to}}],test(e){return e instanceof nO},parse:{sync(e,t,n){const a=e.hint==="text"?to:eo;return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse($s())}},async async(e,t,n){const a=e.hint==="text"?to:eo,o=e.hint==="text"?Cv(e.stream):kv(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(a),stream:await t.parse(o)}},stream(e,t,n){const a=e.hint==="text"?to:eo,o=e.hint==="text"?Cv(e.stream):kv(e.stream);return{hint:t.parse(e.hint),factory:t.parse(a),stream:t.parse(o)}}},serialize(e,t,n){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,n){const a=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?aO(a):rO(a)}};function uO(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,n,a){return e(typeof n?.deserialize=="function"?n.deserialize(t.streamId):t.streamId)}}}var cO={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))}},Fr={},r_=e=>new ReadableStream({start:t=>{e.on({next:n=>{try{t.enqueue(n)}catch{}},throw:n=>{t.error(n)},return:()=>{try{t.close()}catch{}}})}}),hO={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Fr},parse:{sync(){return Fr},async async(){return await Promise.resolve(Fr)},stream(){return Fr}},serialize(){return r_.toString()},deserialize(){return Fr}};function jv(e){let t=$s(),n=e.getReader();async function a(){try{let o=await n.read();o.done?t.return(o.value):(t.next(o.value),await a())}catch(o){t.throw(o)}}return a().catch(()=>{}),t}var dO={tag:"seroval/plugins/web/ReadableStream",extends:[hO],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(Fr),stream:t.parse($s())}},async async(e,t){return{factory:await t.parse(Fr),stream:await t.parse(jv(e))}},stream(e,t){return{factory:t.parse(Fr),stream:t.parse(jv(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let n=t.deserialize(e.stream);return r_(n)}},fO=dO,pO=[cO,lO,fO];function gO(){return[...Ef()?.serializationAdapters?.map(tO)??[],...pO]}var zv=new TextDecoder,mO=new Uint8Array(0),Nv=16*1024*1024,Dv=32*1024*1024,Mv=1024,Pv=1e5;function yO(e){const t=new Map,n=new Map,a=new Set;let o=!1,u=null,c=0,h;const f=new ReadableStream({start(y){h=y},cancel(){o=!0;try{u?.cancel()}catch{}t.forEach(y=>{try{y.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),n.clear(),a.clear()}});function g(y){const b=n.get(y);if(b)return b;if(a.has(y))return new ReadableStream({start(w){w.close()}});if(n.size>
12=Mv)throw new Error(`Too many raw streams in framed response (max ${Mv})`);const _=new ReadableStream({start(w){t.set(y,w)},cancel(){a.add(y),t.delete(y),n.delete(y)}});return n.set(y,_),_}function m(y){return g(y),t.get(y)}return(async()=>{const y=e.getReader();u=y;const b=[];let _=0;function w(){if(_<9)return null;const E=b[0];if(E.length>=9)return{type:E[0],streamId:(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,length:(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0};const O=new Uint8Array(9);let N=0,j=9;for(let D=0;D<b.length&&j>0;D++){const K=b[D],J=Math.min(K.length,j);O.set(K.subarray(0,J),N),N+=J,j-=J}return{type:O[0],streamId:(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,length:(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0}}function A(E){if(E===0)return mO;const O=new Uint8Array(E);let N=0,j=E;for(;j>0&&b.length>0;){const D=b[0];if(!D)break;const K=Math.min(D.length,j);O.set(D.subarray(0,K),N),N+=K,j-=K,K===D.length?b.shift():b[0]=D.subarray(K)}return _-=E,O}try{for(;;){const{done:E,value:O}=await y.read();if(o||E)break;if(O){if(_+O.length>Dv)throw new Error(`Framed response buffer exceeded ${Dv} bytes`);for(b.push(O),_+=O.length;;){const N=w();if(!N)break;const{type:j,streamId:D,length:K}=N;if(j!==ur.JSON&&j!==ur.CHUNK&&j!==ur.END&&j!==ur.ERROR)throw new Error(`Unknown frame type: ${j}`);if(j===ur.JSON){if(D!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(D===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(K>Nv)throw new Error(`Frame payload too large: ${K} bytes (max ${Nv})`);const J=9+K;if(_<J)break;if(++c>Pv)throw new Error(`Too many frames in framed response (max ${Pv})`);A(9);const I=A(K);switch(j){case ur.JSON:try{h.enqueue(zv.decode(I))}catch{}break;case ur.CHUNK:{const F=m(D);F&&F.enqueue(I);break}case ur.END:{const F=m(D);if(a.add(D),F){try{F.close()}catch{}t.delete(D)}break}case ur.ERROR:{const F=m(D);if(a.add(D),F){const Y=zv.decode(I);F.error(new Error(Y)),t.delete(D)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{h.close()}catch{}t.forEach(E=>{try{E.close()}catch{}}),t.clear()}catch(E){try{h.error(E)}catch{}t.forEach(O=>{try{O.error(E)}catch{}}),t.clear()}finally{try{y.releaseLock()}catch{}u=null}})(),{getOrCreateStream:g,jsonChunks:f}}var mo=null;async function Zd(e){e.length>0&&await Promise.allSettled(e)}var vO=Object.prototype.hasOwnProperty;function s_(e){for(const t in e)if(vO.call(e,t))return!0;return!1}async function bO(e,t,n){mo||(mo=gO());const a=t[0],o=a.fetch??n,u=a.data instanceof FormData?"formData":"payload",c=a.headers?new Headers(a.headers):new Headers;if(c.set("x-tsr-serverFn","true"),u==="payload"&&c.set("accept",`${gT}, application/x-ndjson, application/json`),a.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const f=await a_(a);if(f!==void 0){const g=v0({payload:f});e.includes("?")?e+=`&${g}`:e+=`?${g}`}}let h;if(a.method==="POST"){const f=await _O(a);f?.contentType&&c.set("content-type",f.contentType),h=f?.body}return await wO(async()=>o(e,{method:a.method,headers:c,signal:a.signal,body:h}))}async function a_(e){let t=!1;const n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&s_(e.context)&&(t=!0,n.context=e.context),t)return i_(n)}async function i_(e){return JSON.stringify(await Promise.resolve(eO(e,{plugins:mo})))}async function _O(e){if(e.data instanceof FormData){let n;return e.context&&s_(e.context)&&(n=await i_(e.context)),n!==void 0&&e.data.set(pT,n),{body:e.data}}const t=await a_(e);if(t)return{body:t,contentType:"application/json"}}async function wO(e){let t;try{t=await e()}catch(a){if(a instanceof Response)t=a;else throw console.log(a),a}if(t.headers.get("x-tss-raw")==="true")return t;const n=t.headers.get("content-type");if(n||Qt(),t.headers.get("x-tss-serialized")){let a;if(n.includes("application/x-tss-framed")){if(vT(n),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:o,jsonChunks:u}=yO(t.body),c=[uO(o),...mo||[]],h=new Map;a=await SO({jsonStream:u,onMessage:f=>xv(f,{refs:h,plugins:c}),onError(f,g){console.error(f,g)}})}else if(n.includes("application/json")){const o=await t.json(),u=[];a=xv(o,{plugins:mo}),await Zd(u)}if(a||Qt(),a instanceof Error)throw a;return a}if(n.includes("application/json")){const a=await t.json(),o=b0(a);if(o)throw o;if(St(a))throw a;return a}if(!t.ok)throw new Error(await t.text());return t}async function SO({jsonStream:e,onMessage:t,onError:n}){const a=e.getReader(),{value:o,done:u}=await a.read();if(u||!o)throw new Error("Stream ended before first object");const c=JSON.parse(o);let h=!1;const f=(async()=>{try{for(;;){const{value:y,done:b}=await a.read();if(b)break;
12if(y)try{const _=[];try{t(JSON.parse(y))}finally{}await Zd(_)}catch(_){n?.(`Invalid JSON: ${y}`,_)}}}catch(y){h||n?.("Stream processing error:",y)}})();let g;const m=[];try{g=t(c)}catch(y){throw h=!0,a.cancel().catch(()=>{}),y}return await Zd(m),Promise.resolve(g).catch(()=>{h=!0,a.cancel().catch(()=>{})}),f.finally(()=>{try{a.releaseLock()}catch{}}),g}function Lt(e){const t="/_serverFn/"+e;return Object.assign((...o)=>{const u=Ef()?.serverFns?.fetch;return bO(t,o,u??fetch)},{url:t,serverFnMeta:{id:e},[Hd]:!0})}var EO={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Hd in e)?!1:!!e[Hd],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Lt(e)};function o_(e){if(Array.isArray(e))return e.flatMap(m=>o_(m));if(typeof e!="string")return[];const t=[];let n=0,a,o,u,c,h;const f=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},g=()=>(o=e.charAt(n),o!=="="&&o!==";"&&o!==",");for(;n<e.length;){for(a=n,h=!1;f();)if(o=e.charAt(n),o===","){for(u=n,n+=1,f(),c=n;n<e.length&&g();)n+=1;n<e.length&&e.charAt(n)==="="?(h=!0,n=c,t.push(e.slice(a,u)),a=n):n=u+1}else n+=1;(!h||n>=e.length)&&t.push(e.slice(a))}return t}function TO(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function RO(...e){return e.reduce((t,n)=>{const a=TO(n);if(!a)return t;for(const[o,u]of a.entries())o==="set-cookie"?o_(u).forEach(c=>t.append("set-cookie",c)):t.set(o,u);return t},new Headers)}function Lv(e){return e.replaceAll("\0","/").replaceAll("�","/")}function AO(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function OO(e){window.$_TSR||Qt();const t=e.options.serializationAdapters;if(t?.length){const E=new Map;t.forEach(O=>{E.set(O.key,O.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(O=>O())}window.$_TSR.initialized=!0,window.$_TSR.router||Qt();const n=window.$_TSR.router;n.matches.forEach(E=>{E.i=Lv(E.i)}),n.lastMatchId&&(n.lastMatchId=Lv(n.lastMatchId));const{manifest:a,dehydratedData:o,lastMatchId:u}=n;e.ssr={manifest:a};const c=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:c};const h=e.matchRoutes(e.stores.location.get()),f=Promise.all(h.map(E=>e.loadRouteChunk(e.looseRoutesById[E.routeId])));function g(E){const O=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(O){const N=Ps();E._nonReactive.minPendingPromise=N,E._forcePending=!0,setTimeout(()=>{N.resolve(),e.updateMatch(E.id,j=>(j._nonReactive.minPendingPromise=void 0,{...j,_forcePending:void 0}))},O)}}function m(E){const O=e.looseRoutesById[E.routeId];O&&(O.options.ssr=E.ssr)}let y;h.forEach(E=>{const O=n.matches.find(N=>N.i===E.id);if(!O){E._nonReactive.dehydrated=!1,E.ssr=!1,m(E);return}AO(E,O),m(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&y===void 0&&(y=E.index,g(E))}),e.stores.setMatches(h),await e.options.hydrate?.(o);const b=e.stores.matches.get(),_=e.stores.location.get();await Promise.all(b.map(async E=>{try{const O=e.looseRoutesById[E.routeId],N=b[E.index-1]?.context??e.options.context;if(O.options.context){const J={deps:E.loaderDeps,params:E.params,context:N??{},location:_,navigate:I=>e.navigate({...I,_fromLocation:_}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:h,routeId:O.id};
12E.__routeContext=O.options.context(J)??void 0}E.context={...N,...E.__routeContext,...E.__beforeLoadContext};const j={ssr:e.options.ssr,matches:b,match:E,params:E.params,loaderData:E.loaderData},D=await O.options.head?.(j),K=await O.options.scripts?.(j);E.meta=D?.meta,E.links=D?.links,E.headScripts=D?.scripts,E.styles=D?.styles,E.scripts=K}catch(O){if(St(O))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,O);else throw E.error=O,console.error(`Error during hydration for route ${E.routeId}:`,O),O}}));const w=h[h.length-1].id!==u;if(!h.some(E=>E.ssr===!1)&&!w)return h.forEach(E=>{E._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),f;const A=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(w){const E=h[1];E||Qt(),g(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=A,A.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(E.id,O=>({...O,_displayPending:void 0,displayPendingPromise:void 0}))})})}return f}var Ou=X.use,so=typeof window<"u"?X.useLayoutEffect:X.useEffect;function Od(e){const t=X.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function xO(e,t,n={},a={}){X.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([u])=>{t(u)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,a.disabled,e])}function kO(e){const t=X.useRef(null);return X.useImperativeHandle(e,()=>t.current,[]),t}function CO({promise:e}){if(Ou)return Ou(e);const t=wR(e);if(t[In].status==="pending")throw t;if(t[In].status==="error")throw t[In].error;return t[In].data}function jO(e){const t=z.jsx(zO,{...e});return e.fallback?z.jsx(X.Suspense,{fallback:e.fallback,children:t}):t}function zO(e){const t=CO(e);return e.children(t)}function zf(e){const t=e.errorComponent??Nf;return z.jsx(NO,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?X.createElement(t,{error:n,reset:a}):e.children})}var NO=class extends X.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Nf({error:e}){const[t,n]=X.useState(!1);return z.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[z.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),z.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),z.jsx("div",{style:{height:".25rem"}}),t?z.jsx("div",{children:z.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?z.jsx("code",{children:e.message}):null})}):null]})}function DO({children:e,fallback:t=null}){return Df()?z.jsx(Va.Fragment,{children:e}):z.jsx(Va.Fragment,{children:t})}function Df(){return Va.useSyncExternalStore(MO,()=>!0,()=>!1)}function MO(){return()=>{}}var l_=X.createContext(null);function vt(e){return X.useContext(l_)}var Vu=X.createContext(void 0),PO=X.createContext(void 0),Qe=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Qe||{});function LO({update:e,notify:t,unwatched:n}){return{link:a,unlink:o,propagate:u,checkDirty:c,shallowPropagate:h};function a(g,m,y){const b=m.depsTail;if(b!==void 0&&b.dep===g)return;const _=b!==void 0?b.nextDep:m.deps;if(_!==void 0&&_.dep===g){_.version=y,m.depsTail=_;return}const w=g.subsTail;if(w!==void 0&&w.version===y&&w.sub===m)return;const A=m.depsTail=g.subsTail={version:y,dep:g,sub:m,prevDep:b,nextDep:_,prevSub:w,nextSub:void 0};_!==void 0&&(_.prevDep=A),b!==void 0?b.nextDep=A:m.deps=A,w!==void 0?w.nextSub=A:g.subs=A}function o(g,m=g.sub){const y=g.dep,b=g.prevDep,_=g.nextDep,w=g.nextSub,A=g.prevSub;return _!==void 0?_.prevDep=b:m.depsTail=b,b!==void 0?b.nextDep=_:m.deps=_,w!==void 0?w.prevSub=A:y.subsTail=A,A!==void 0?A.nextSub=w:(y.subs=w)===void 0&&n(y),_}function u(g){let m=g.nextSub,y;
12e:do{const b=g.sub;let _=b.flags;if(_&60?_&12?_&4?!(_&48)&&f(g,b)?(b.flags=_|40,_&=1):_=0:b.flags=_&-9|32:_=0:b.flags=_|32,_&2&&t(b),_&1){const w=b.subs;if(w!==void 0){const A=(g=w).nextSub;A!==void 0&&(y={value:m,prev:y},m=A);continue}}if((g=m)!==void 0){m=g.nextSub;continue}for(;y!==void 0;)if(g=y.value,y=y.prev,g!==void 0){m=g.nextSub;continue e}break}while(!0)}function c(g,m){let y,b=0,_=!1;e:do{const w=g.dep,A=w.flags;if(m.flags&16)_=!0;else if((A&17)===17){if(e(w)){const E=w.subs;E.nextSub!==void 0&&h(E),_=!0}}else if((A&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(y={value:g,prev:y}),g=w.deps,m=w,++b;continue}if(!_){const E=g.nextDep;if(E!==void 0){g=E;continue}}for(;b--;){const E=m.subs,O=E.nextSub!==void 0;if(O?(g=y.value,y=y.prev):g=E,_){if(e(m)){O&&h(E),m=g.sub;continue}_=!1}else m.flags&=-33;m=g.sub;const N=g.nextDep;if(N!==void 0){g=N;continue e}}return _}while(!0)}function h(g){do{const m=g.sub,y=m.flags;(y&48)===32&&(m.flags=y|16,(y&6)===2&&t(m))}while((g=g.nextSub)!==void 0)}function f(g,m){let y=m.depsTail;for(;y!==void 0;){if(y===g)return!0;y=y.prevDep}return!1}}function UO(e,t,n){const a=typeof e=="object",o=a?e:void 0;return{next:(a?e.next:e)?.bind(o),error:(a?e.error:t)?.bind(o),complete:(a?e.complete:n)?.bind(o)}}const Vd=[];let bu=0;const{link:Uv,unlink:$O,propagate:IO,checkDirty:u_,shallowPropagate:$v}=LO({update(e){return e._update()},notify(e){Vd[Kd++]=e,e.flags&=~Qe.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Qe.Mutable|Qe.Dirty,xu(e))}});let tu=0,Kd=0,Un,Jd=0;function c_(e){try{++Jd,e()}finally{--Jd||h_()}}function xu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=$O(n,e)}function h_(){if(!(Jd>0)){for(;tu<Kd;){const e=Vd[tu];Vd[tu++]=void 0,e.notify()}tu=0,Kd=0}}function Iv(e,t){const n=typeof e=="function",a=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Qe.None:Qe.Mutable,get(){return Un!==void 0&&Uv(o,Un,bu),o._snapshot},subscribe(u){const c=UO(u),h={current:!1},f=BO(()=>{o.get(),h.current?c.next?.(o._snapshot):h.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(u){const c=Un,h=t?.compare??Object.is;if(n)Un=o,++bu,o.depsTail=void 0;else if(u===void 0)return!1;n&&(o.flags=Qe.Mutable|Qe.RecursedCheck);try{const f=o._snapshot,g=typeof u=="function"?u(f):u===void 0&&n?a(f):u;return f===void 0||!h(f,g)?(o._snapshot=g,!0):!1}finally{Un=c,n&&(o.flags&=~Qe.RecursedCheck),xu(o)}}};return n?(o.flags=Qe.Mutable|Qe.Dirty,o.get=function(){const u=o.flags;if(u&Qe.Dirty||u&Qe.Pending&&u_(o.deps,o)){if(o._update()){const c=o.subs;c!==void 0&&$v(c)}}else u&Qe.Pending&&(o.flags=u&~Qe.Pending);return Un!==void 0&&Uv(o,Un,bu),o._snapshot}):o.set=function(u){if(o._update(u)){const c=o.subs;c!==void 0&&(IO(c),$v(c),h_())}},o}function BO(e){const t=()=>{const a=Un;Un=n,++bu,n.depsTail=void 0,n.flags=Qe.Watching|Qe.RecursedCheck;try{return e()}finally{Un=a,n.flags&=~Qe.RecursedCheck,xu(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Qe.Watching|Qe.RecursedCheck,notify(){const a=this.flags;a&Qe.Dirty||a&Qe.Pending&&u_(this.deps,this)?t():this.flags=Qe.Watching},stop(){this.flags=Qe.None,this.depsTail=void 0,xu(this)}};return t(),n}var xd={exports:{}},kd={},Cd={exports:{}},jd={};var Bv;function HO(){if(Bv)return jd;Bv=1;var e=xo();function t(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function h(y,b){var _=b(),w=a({inst:{value:_,getSnapshot:b}}),A=w[0].inst,E=w[1];return u(function(){A.value=_,A.getSnapshot=b,f(A)&&E({inst:A})},[y,_,b]),o(function(){return f(A)&&E({inst:A}),y(function(){f(A)&&E({inst:A})})},[y]),c(_),_}function f(y){var b=y.getSnapshot;y=y.value;try{var _=b();return!n(y,_)}catch{return!0}}function g(y,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return jd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,jd}var Hv;function qO(){return Hv||(Hv=1,Cd.exports=HO()),Cd.exports}var qv;function FO(){if(qv)return kd;qv=1;var e=xo(),t=qO();function n(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var a=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,u=e.useRef,c=e.useEffect,h=e.useMemo,f=e.useDebugValue;return kd.useSyncExternalStoreWithSelector=function(g,m,y,b,_){var w=u(null);if(w.current===null){var A={hasValue:!1,value:null};w.current=A}else A=w.current;w=h(function(){function O(J){if(!N){if(N=!0,j=J,J=b(J),_!==void 0&&A.hasValue){var I=A.value;if(_(I,J))return D=I}return D=J}if(I=D,a(j,J))return I;var F=b(J);return _!==void 0&&_(I,F)?(j=J,I):(j=J,D=F)}var N=!1,j,D,K=y===void 0?null:y;return[function(){return O(m())},K===null?void 0:function(){return O(K())}]},[m,y,b,_]);var E=o(g,w[0],w[1]);return c(function(){A.hasValue=!0,A.value=E},[E]),f(E),E},kd}var Fv;function GO(){return Fv||(Fv=1,xd.exports=FO()),xd.exports}var ZO=GO();function VO(e,t){return e===t}function pt(e,t,n=VO){const a=X.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:h}=e.subscribe(c);return h},[e]),o=X.useCallback(()=>e?.get(),[e]);return ZO.useSyncExternalStoreWithSelector(a,o,o,t,n)}var KO={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Is(e){const t=vt(),n=X.useContext(e.from?PO:Vu),a=e.from??n,o=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,u=X.useRef(void 0);return pt(o??KO,c=>{if((e.shouldThrow??!0)&&!c&&Qt(),c===void 0)return;const h=e.select?e.select(c):c;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=xs(u.current,h);return u.current=f,f}return h})}function d_(e){return Is({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function f_(e){const{select:t,...n}=e;return Is({...n,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function p_(e){return Is({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function g_(e){return Is({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function m_(e){const t=vt();return X.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function y_(e){return Is({...e,select:t=>e.select?e.select(t.context):t.context})}var JO=d0();function YO(e,t){const n=vt(),a=kO(t),{activeProps:o,inactiveProps:u,activeOptions:c,to:h,preload:f,preloadDelay:g,preloadIntentProximity:m,hashScrollIntoView:y,replace:b,startTransition:_,resetScroll:w,viewTransition:A,children:E,target:O,disabled:N,style:j,className:D,onClick:K,onBlur:J,onFocus:I,onMouseEnter:F,onMouseLeave:Y,onTouchStart:oe,ignoreBlocker:se,params:ge,search:Te,hash:rt,state:Ze,mask:B,reloadDocument:Q,unsafeRelative:ce,from:ke,_fromLocation:je,...C}=e,G=Df(),W=X.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),te=pt(n.stores.location,He=>He,(He,Tt)=>He.href===Tt.href),ie=X.useMemo(()=>{const He={_fromLocation:te,...W};return n.buildLocation(He)},[n,te,W]),ve=ie.maskedLocation?ie.maskedLocation.publicHref:ie.publicHref,Re=ie.maskedLocation?ie.maskedLocation.external:ie.external,st=X.useMemo(()=>nx(ve,Re,n.history,N),[N,Re,ve,n.history]),Ue=X.useMemo(()=>
12{if(st?.external)return Su(st.href,n.protocolAllowlist)?void 0:st.href;if(!rx(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),Su(h,n.protocolAllowlist)?void 0:h}catch{}},[h,st,n.protocolAllowlist]),Hn=X.useMemo(()=>{if(Ue)return!1;if(c?.exact){if(!BT(te.pathname,ie.pathname,n.basepath))return!1}else{const He=Eu(te.pathname,n.basepath),Tt=Eu(ie.pathname,n.basepath);if(!(He.startsWith(Tt)&&(He.length===Tt.length||He[Tt.length]==="/")))return!1}return(c?.includeSearch??!0)&&!Yt(te.search,ie.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?G&&te.hash===ie.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,te,Ue,G,ie.hash,ie.pathname,ie.search,n.basepath]),qn=Hn?Vr(o,{})??QO:zd,yr=Hn?zd:Vr(u,{})??zd,ei=[D,qn.className,yr.className].filter(Boolean).join(" "),jn=(j||qn.style||yr.style)&&{...j,...qn.style,...yr.style},[ti,Hs]=X.useState(!1),No=X.useRef(!1),Fn=e.reloadDocument||Ue?!1:f??n.options.defaultPreload,as=g??n.options.defaultPreloadDelay??0,En=X.useCallback(()=>{n.preloadRoute({...W,_builtLocation:ie}).catch(He=>{console.warn(He),console.warn(SR)})},[n,W,ie]);xO(a,X.useCallback(He=>{He?.isIntersecting&&En()},[En]),tx,{disabled:!!N||Fn!=="viewport"}),X.useEffect(()=>{No.current||!N&&Fn==="render"&&(En(),No.current=!0)},[N,En,Fn]);const ni=He=>{const Tt=He.currentTarget.getAttribute("target"),zn=O!==void 0?O:Tt;if(!N&&!sx(He)&&!He.defaultPrevented&&(!zn||zn==="_self")&&He.button===0){He.preventDefault(),JO.flushSync(()=>{Hs(!0)});const qs=n.subscribe("onResolved",()=>{qs(),Hs(!1)});n.navigate({...W,replace:b,resetScroll:w,hashScrollIntoView:y,startTransition:_,viewTransition:A,ignoreBlocker:se})}};if(Ue)return{...C,ref:a,href:Ue,...E&&{children:E},...O&&{target:O},...N&&{disabled:N},...j&&{style:j},...D&&{className:D},...K&&{onClick:K},...J&&{onBlur:J},...I&&{onFocus:I},...F&&{onMouseEnter:F},...Y&&{onMouseLeave:Y},...oe&&{onTouchStart:oe}};const Do=He=>{if(N||Fn!=="intent")return;if(!as){En();return}const Tt=He.currentTarget;if(no.has(Tt))return;const zn=setTimeout(()=>{no.delete(Tt),En()},as);no.set(Tt,zn)},tc=He=>{N||Fn!=="intent"||En()},Mt=He=>{if(N||!Fn||!as)return;const Tt=He.currentTarget,zn=no.get(Tt);zn&&(clearTimeout(zn),no.delete(Tt))};return{...C,...qn,...yr,href:st?.href,ref:a,onClick:xa([K,ni]),onBlur:xa([J,Mt]),onFocus:xa([I,Do]),onMouseEnter:xa([F,Do]),onMouseLeave:xa([Y,Mt]),onTouchStart:xa([oe,tc]),disabled:!!N,target:O,...jn&&{style:jn},...ei&&{className:ei},...N&&XO,...Hn&&WO,...G&&ti&&ex}}var zd={},QO={className:"active"},XO={role:"link","aria-disabled":!0},WO={"data-status":"active","aria-current":"page"},ex={"data-transitioning":"transitioning"},no=new WeakMap,tx={rootMargin:"100px"},xa=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function nx(e,t,n,a){if(!a)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function rx(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var It=X.forwardRef((e,t)=>{const{_asChild:n,...a}=e,{type:o,...u}=YO(a,t),c=typeof a.children=="function"?a.children({isActive:u["data-status"]==="active"}):a.children;if(!n){const{disabled:h,...f}=u;return X.createElement("a",f,c)}return X.createElement(n,u,c)});function sx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var ax=class extends R0{constructor(t){super(t),this.useMatch=n=>Is({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>y_({...n,from:this.id}),this.useSearch=n=>g_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>p_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>f_({...n,from:this.id}),this.useLoaderData=n=>d_({...n,from:this.id}),this.useNavigate=()=>m_({from:this.fullPath}),this.Link=Va.forwardRef((n,a)=>z.jsx(It,{ref:a,from:this.fullPath,...n}))}};function ix(e){return new ax(e)}function ox(){return e=>ux(e)}var lx=class extends AR{constructor(e){super(e),this.useMatch=t=>Is({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>y_({...t,from:this.id}),this.useSearch=t=>g_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>p_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>f_({...t,from:this.id}),this.useLoaderData=t=>d_({...t,from:this.id}),this.useNavigate=()=>m_({from:this.fullPath}
12),this.Link=Va.forwardRef((t,n)=>z.jsx(It,{ref:n,from:this.fullPath,...t}))}};function ux(e){return new lx(e)}function Je(e){return new cx(e,{silent:!0}).createRoute}var cx=class{constructor(e,t){this.path=e,this.createRoute=n=>{const a=ix(n);return a.isRoot=!1,a},this.silent=t?.silent}};function Fe(e,t){let n,a,o,u;const c=()=>(n||(n=e().then(f=>{n=void 0,a=f[t??"default"]}).catch(f=>{if(o=f,ST(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const g=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(g)||(sessionStorage.setItem(g,"1"),u=!0)}})),n),h=function(g){if(u)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!a)if(Ou)Ou(c());else throw c();return X.createElement(a,g)};return h.preload=c,h}function hx(e){const t=vt(),n=`not-found-${pt(t.stores.location,a=>a.pathname)}-${pt(t.stores.status,a=>a)}`;return z.jsx(zf,{getResetKey:()=>n,onCatch:(a,o)=>{if(St(a))e.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(St(a))return e.fallback?.(a);throw a},children:e.children})}function dx(){return z.jsx("p",{children:"Not Found"})}function Da(e){return z.jsx(z.Fragment,{children:e.children})}function v_(e,t,n){return t.options.notFoundComponent?z.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?z.jsx(e.options.defaultNotFoundComponent,{...n}):z.jsx(dx,{})}function fx(e){return null}function px(){return fx(vt()),null}var b_=X.memo(function({matchId:t}){const n=vt(),a=n.stores.matchStores.get(t);a||Qt();const o=pt(n.stores.loadedAt,c=>c),u=pt(a,c=>c);return z.jsx(gx,{router:n,matchId:t,resetKey:o,matchState:X.useMemo(()=>{const c=u.routeId,h=n.routesById[c].parentRoute?.id;return{routeId:c,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:h}},[u._displayPending,u.routeId,u.ssr,n.routesById])})});function gx({router:e,matchId:t,resetKey:n,matchState:a}){const o=e.routesById[a.routeId],u=o.options.pendingComponent??e.options.defaultPendingComponent,c=u?z.jsx(u,{}):null,h=o.options.errorComponent??e.options.defaultErrorComponent,f=o.options.onCatch??e.options.defaultOnCatch,g=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,m=a.ssr===!1||a.ssr==="data-only",y=(!o.isRoot||o.options.wrapInSuspense||m)&&(o.options.wrapInSuspense??u??(o.options.errorComponent?.preload||m))?X.Suspense:Da,b=h?zf:Da,_=g?hx:Da;return z.jsxs(o.isRoot?o.options.shellComponent??Da:Da,{children:[z.jsx(Vu.Provider,{value:t,children:z.jsx(y,{fallback:c,children:z.jsx(b,{getResetKey:()=>n,errorComponent:h||Nf,onCatch:(w,A)=>{if(St(w))throw w.routeId??=a.routeId,w;f?.(w,A)},children:z.jsx(_,{fallback:w=>{if(w.routeId??=a.routeId,!g||w.routeId&&w.routeId!==a.routeId||!w.routeId&&
12!o.isRoot)throw w;return X.createElement(g,w)},children:m||a._displayPending?z.jsx(DO,{fallback:c,children:z.jsx(Gv,{matchId:t})}):z.jsx(Gv,{matchId:t})})})})}),a.parentRouteId===Ds?z.jsxs(z.Fragment,{children:[z.jsx(mx,{resetKey:n}),e.options.scrollRestoration&&f0?z.jsx(px,{}):null]}):null]})}function mx({resetKey:e}){const t=vt(),n=X.useRef(void 0);return so(()=>{const a=t.latestLocation.href;(n.current===void 0||n.current!==a)&&(t.emit({type:"onRendered",...Ha(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var Gv=X.memo(function({matchId:t}){const n=vt(),a=(m,y)=>n.getMatch(m.id)?._nonReactive[y]??m._nonReactive[y],o=n.stores.matchStores.get(t);o||Qt();const u=pt(o,m=>m),c=u.routeId,h=n.routesById[c],f=X.useMemo(()=>{const m=(n.routesById[c].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:c,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return m?JSON.stringify(m):void 0},[c,u.loaderDeps,u._strictParams,u._strictSearch,n.options.defaultRemountDeps,n.routesById]),g=X.useMemo(()=>{const m=h.options.component??n.options.defaultComponent;return m?z.jsx(m,{},f):z.jsx(__,{})},[f,h.options.component,n.options.defaultComponent]);if(u._displayPending)throw a(u,"displayPendingPromise");if(u._forcePending)throw a(u,"minPendingPromise");if(u.status==="pending"){const m=h.options.pendingMinMs??n.options.defaultPendingMinMs;if(m){const y=n.getMatch(u.id);if(y&&!y._nonReactive.minPendingPromise){const b=Ps();y._nonReactive.minPendingPromise=b,setTimeout(()=>{b.resolve(),y._nonReactive.minPendingPromise=void 0},m)}}throw a(u,"loadPromise")}if(u.status==="notFound")return St(u.error)||Qt(),v_(n,h,u.error);if(u.status==="redirected")throw Nt(u.error)||Qt(),a(u,"loadPromise");if(u.status==="error")throw u.error;return g}),__=X.memo(function(){const t=vt(),n=X.useContext(Vu);let a,o=!1,u;{const g=n?t.stores.matchStores.get(n):void 0;[a,o]=pt(g,m=>[m?.routeId,m?.globalNotFound??!1]),u=pt(t.stores.matchesId,m=>m[m.findIndex(y=>y===n)+1])}const c=a?t.routesById[a]:void 0,h=t.options.defaultPendingComponent?z.jsx(t.options.defaultPendingComponent,{}):null;if(o)return c||Qt(),v_(t,c,void 0);if(!u)return null;const f=z.jsx(b_,{matchId:u});return a===Ds?z.jsx(X.Suspense,{fallback:h,children:f}):f});function yx(){const e=vt(),t=X.useRef({router:e,mounted:!1}),[n,a]=X.useState(!1),o=pt(e.stores.isLoading,y=>y),u=pt(e.stores.hasPending,y=>y),c=Od(o),h=o||n||u,f=Od(h),g=o||u,m=Od(g);return e.startTransition=y=>{a(!0),X.startTransition(()=>{y(),a(!1)})},X.useEffect(()=>{const y=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Yr(e.latestLocation.publicHref)!==Yr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{y()}},[e,e.history]),so(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),so(()=>{c&&!o&&e.emit({type:"onLoad",...Ha(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,o]),so(()=>{m&&!g&&e.emit({type:"onBeforeRouteMount",...Ha(e.stores.location.get(),e.stores.resolvedLocation.get())})},[g,m,e]),so(()=>{if(f&&!h){const y=Ha(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...y}),c_(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),y.hrefChanged&&OR(e)}},[h,f,e]),null}function vx(){const e=vt(),t=e.routesById[Ds].options.pendingComponent??e.options.defaultPendingComponent,n=t?z.jsx(t,{}):null,a=z.jsxs(typeof document<"u"&&e.ssr?Da:X.Suspense,{fallback:n,children:[z.jsx(yx,{}),z.jsx(bx,{})]});return e.options.InnerWrap?z.jsx(e.options.InnerWrap,{children:a}):a}function bx(){const e=vt(),t=pt(e.stores.firstId,o=>o),n=pt(e.stores.loadedAt,o=>o),a=t?z.jsx(b_,{matchId:t}):null;return z.jsx(Vu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:z.jsx(zf,{getResetKey:()=>n,errorComponent:Nf,onCatch:void 0,children:a})})}var _x=e=>({createMutableStore:Iv,createReadonlyStore:Iv,batch:c_}),wx=e=>
12new Sx(e),Sx=class extends pR{constructor(e){super(e,_x)}};function Ex({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const a=z.jsx(l_.Provider,{value:e,children:t});return e.options.Wrap?z.jsx(e.options.Wrap,{children:a}):a}function Tx({router:e,...t}){return z.jsx(Ex,{router:e,...t,children:z.jsx(vx,{})})}function w_(e){const{attrs:t,children:n,nonce:a}=e;switch(e.tag){case"title":return z.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return z.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return z.jsx("link",{...t,precedence:t?.precedence??(t?.rel==="stylesheet"?"default":void 0),nonce:a,suppressHydrationWarning:!0});case"style":return e.inlineCss,z.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:a});case"script":return z.jsx(Rx,{attrs:t,children:n});default:return null}}function Rx({attrs:e,children:t}){vt();const n=Df(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(X.useEffect(()=>{if(!a){if(e?.src){const o=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===o))return;const u=document.createElement("script");for(const[c,h]of Object.entries(e))c!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&u.setAttribute(c,typeof h=="boolean"?"":String(h));return document.head.appendChild(u),()=>{u.parentNode&&u.parentNode.removeChild(u)}}if(typeof t=="string"){const o=typeof e?.type=="string"?e.type:"text/javascript",u=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(h=>{if(!(h instanceof HTMLScriptElement))return!1;const f=h.getAttribute("type")??"text/javascript",g=h.getAttribute("nonce")??void 0;return h.textContent===t&&f===o&&g===u}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[h,f]of Object.entries(e))h!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(h,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}}},[e,t,a]),a&&typeof t=="string")return z.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!n){if(e?.src)return z.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return z.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Ax=e=>{const t=vt(),n=t.options.ssr?.nonce,a=pt(t.stores.matches,g=>g.map(m=>m.meta).filter(Boolean),Yt),o=X.useMemo(()=>{const g=[],m={};let y;for(let b=a.length-1;b>=0;b--){const _=a[b];for(let w=_.length-1;w>=0;w--){const A=_[w];if(A)if(A.title)y||(y={tag:"title",children:A.title});else if("script:ld+json"in A)try{const E=JSON.stringify(A["script:ld+json"]);g.push({tag:"script",attrs:{type:"application/ld+json"},children:OT(E)})}catch{}else{const E=A.name??A.property;if(E){if(m[E])continue;m[E]=!0}g.push({tag:"meta",attrs:{...A,nonce:n}})}}}return y&&g.push(y),n&&g.push({tag:"meta",attrs:{property:"csp-nonce",content:n}}),g.reverse(),g},[a,n]),u=pt(t.stores.matches,g=>{const m=g.map(_=>_.links).filter(Boolean).flat(1).map(_=>({tag:"link",attrs:{..._,nonce:n}})),y=t.ssr?.manifest,b=g.map(_=>y?.routes[_.routeId]?.assets??[]).filter(Boolean).flat(1).flatMap(_=>_.tag==="link"?RR(y,_)?[]:[{tag:"link",attrs:{..._.attrs,crossOrigin:Tv(e,"stylesheet")??_.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:n}}]:_.tag==="style"?[{tag:"style",attrs:{..._.attrs,nonce:n},children:_.children,..._.inlineCss?{inlineCss:!0}:{}}]:[]);return[...m,...b]},Yt),c=pt(t.stores.matches,g=>{const m=[];return g.map(y=>t.looseRoutesById[y.routeId]).forEach(y=>t.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(b=>{const _=ER(b);m.push({tag:"link",attrs:{rel:"modulepreload",href:_.href,crossOrigin:Tv(e,"modulepreload")??_.crossOrigin,nonce:n}})})),m},Yt),h=pt(t.stores.matches,g=>g.map(m=>m.styles).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"style",attrs:{...y,nonce:n},children:m})),Yt),f=pt(t.stores.matches,g=>g.map(m=>
12m.headScripts).flat(1).filter(Boolean).map(({children:m,...y})=>({tag:"script",attrs:{...y,nonce:n},children:m})),Yt);return Ox([...o,...c,...u,...h,...f],g=>JSON.stringify(g))};function Ox(e,t){const n=new Set;return e.filter(a=>{const o=t(a);return n.has(o)?!1:(n.add(o),!0)})}function xx(e){const t=Ax(e.assetCrossOrigin),n=vt().options.ssr?.nonce;return z.jsx(z.Fragment,{children:t.map(a=>X.createElement(w_,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:n}))})}var kx=()=>{const e=vt(),t=e.options.ssr?.nonce,n=u=>{const c=[],h=e.ssr?.manifest;return h?(u.map(f=>e.looseRoutesById[f.routeId]).forEach(f=>h.routes[f.id]?.assets?.filter(g=>g.tag==="script").forEach(g=>{c.push({tag:"script",attrs:{...g.attrs,nonce:t},children:g.children})})),c):[]},a=u=>u.map(c=>c.scripts).flat(1).filter(Boolean).map(({children:c,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:t},children:c})),o=pt(e.stores.matches,n,Yt);return Cx(e,pt(e.stores.matches,a,Yt),o)};function Cx(e,t,n){let a;e.serverSsr&&(a=e.serverSsr.takeBufferedScripts());const o=[...t,...n];return a&&o.unshift(a),z.jsx(z.Fragment,{children:o.map((u,c)=>X.createElement(w_,{...u,key:`tsr-scripts-${u.tag}-${c}`}))})}function jx(e){const t=vt();return X.useCallback(async(...n)=>{try{const a=await e(...n);if(Nt(a))throw a;return a}catch(a){if(Nt(a))return a.options._fromLocation=t.stores.location.get(),t.navigate(t.resolveRedirect(a).options);throw a}},[t,e])}function Zv(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function Yd(e,t){const n=Object.create(null);if(e)for(const a of Object.keys(e))Zv(a)&&(n[a]=e[a]);if(t&&typeof t=="object")for(const a of Object.keys(t))Zv(a)&&(n[a]=t[a]);return n}function S_(e){return Object.create(null)}var E_=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},Et=(e,t)=>{const n=t||e||{};return typeof n.method>"u"&&(n.method="GET"),Object.assign(u=>Et(void 0,{...n,...u}),{options:n,middleware:u=>{const c=[...n.middleware||[]];u.map(f=>{sv in f?f.options.middleware&&c.push(...f.options.middleware):c.push(f)});const h=Et(void 0,{...n,middleware:c});return h[sv]=!0,h},inputValidator:u=>Et(void 0,{...n,inputValidator:u}),handler:(...u)=>{const[c,h]=u,f={...n,extractedFn:c,serverFn:h},g=[...f.middleware||[],Dx(f)];return c.method=n.method,Object.assign(async m=>{const y=await Vv(g,"client",{...c,...f,data:m?.data,headers:m?.headers,signal:m?.signal,fetch:m?.fetch,context:S_()}),b=b0(y.error);if(b)throw b;if(y.error)throw y.error;return y.result},{...c,method:n.method,__executeServer:async m=>{const y=E_(),b=y.contextAfterGlobalMiddlewares;return await Vv(g,"server",{...c,...m,serverFnMeta:c.serverFnMeta,context:Yd(m.context,b),request:y.request}).then(_=>({result:_.result,error:_.error,context:_.sendContext}))}})}})};async function Vv(e,t,n){let a=zx([...Ef()?.functionMiddleware||[],...e]);if(t==="server"){const u=E_();u?.executedRequestMiddlewares&&(a=a.filter(c=>!u.executedRequestMiddlewares.has(c)))}const o=async u=>{const c=a.shift();if(!c)return u;try{"inputValidator"in c.options&&c.options.inputValidator&&t==="server"&&(u.data=await Nx(c.options.inputValidator,u.data));let h;if(t==="client"?"client"in c.options&&(h=c.options.client):"server"in c.options&&(h=c.options.server),h){const g=await h({...u,next:async(m={})=>{const y=await o({...u,...m,context:Yd(u.context,m.context),sendContext:Yd(u.sendContext,m.sendContext),headers:RO(u.headers,m.headers),_callSiteFetch:u._callSiteFetch,fetch:u._callSiteFetch??m.fetch??u.fetch,result:m.result!==void 0?m.result:m instanceof Response?m:u.result,error:m.error??u.error});if(y.error)throw y.error;return y}});if(Nt(g))return{...u,error:g};if(g instanceof Response)return{...u,result:g};if(!g)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return g}return o(u)}catch(h){return{...u,error:h}}};return o({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||S_(),_callSiteFetch:n.fetch})}function zx(e,t=100){const n=new Set,a=[],o=(u,c)=>{if(c>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);u.forEach(h=>{h.options.middleware&&o(h.options.middleware,c+1),n.has(h)||(n.add(h),a.push(h))})};return o(e,0),a}async function Nx(e,t){if(e==null)return{};if("~standard"in e){const n=await e["~standard"].validate(t);if(n.issues)throw new Error(JSON.stringify(n.issues,void 0,2));return n.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function Dx(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:n,fetch:a,...o})=>{const u={...o,context:n,fetch:a};return t(await e.extractedFn?.(u))},server:async({next:t,...n})=>{const a=await e.serverFn?.(n);return t({...n,result:a})}}}}var js=(e,t)=>{const n={type:"request",...t||e};return{options:n,middleware:a=>js({},Object.assign(n,{middleware:a})),inputValidator:a=>js({},Object.assign(n,{inputValidator:a})),client:a=>js({},Object.assign(n,{client:a})),server:a=>js({},Object.assign(n,{server:a}))}};function T_(e,t){for(let n=0,a=t.length;n<a;n++){const o=t[n];
12e.has(o)||(e.add(o),o.extends&&T_(e,o.extends))}}var Mx=e=>({getOptions:async()=>{const t=await e();if(t.serializationAdapters){const n=new Set;T_(n,t.serializationAdapters),t.serializationAdapters=Array.from(n)}return t},createMiddleware:js});function Ku(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n}function Px(e,t,n,a){function o(u){return u instanceof n?u:new n(function(c){c(u)})}return new(n||(n=Promise))(function(u,c){function h(m){try{g(a.next(m))}catch(y){c(y)}}function f(m){try{g(a.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):o(m.value).then(h,f)}g((a=a.apply(e,t||[])).next())})}const Lx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Mf extends Error{constructor(t,n="FunctionsError",a){super(t),this.name=n,this.context=a}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Ux extends Mf{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Kv extends Mf{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Jv extends Mf{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Qd;(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"})(Qd||(Qd={}));class $x{constructor(t,{headers:n={},customFetch:a,region:o=Qd.Any}={}){this.url=t,this.headers=n,this.region=o,this.fetch=Lx(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Px(this,arguments,void 0,function*(n,a={}){var o;let u,c;try{const{headers:h,method:f,body:g,signal:m,timeout:y}=a;let b={},{region:_}=a;_||(_=this.region);const w=new URL(`${this.url}/${n}`);_&&_!=="any"&&(b["x-region"]=_,w.searchParams.set("forceFunctionRegion",_));let A;g&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&g instanceof Blob||g instanceof ArrayBuffer?(b["Content-Type"]="application/octet-stream",A=g):typeof g=="string"?(b["Content-Type"]="text/plain",A=g):typeof FormData<"u"&&g instanceof FormData?A=g:(b["Content-Type"]="application/json",A=JSON.stringify(g)):g&&typeof g!="string"&&!(typeof Blob<"u"&&g instanceof Blob)&&!(g instanceof ArrayBuffer)&&!(typeof FormData<"u"&&g instanceof FormData)?A=JSON.stringify(g):A=g;let E=m;y&&(c=new AbortController,u=setTimeout(()=>c.abort(),y),m?(E=c.signal,m.addEventListener("abort",()=>c.abort())):E=c.signal);const O=yield this.fetch(w.toString(),{method:f||"POST",headers:Object.assign(Object.assign(Object.assign({},b),this.headers),h),body:A,signal:E}).catch(K=>{throw new Ux(K)}),N=O.headers.get("x-relay-error");if(N&&N==="true")throw new Kv(O);if(!O.ok)throw new Jv(O);let j=((o=O.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),D;return j==="application/json"?D=yield O.json():j==="application/octet-stream"||j==="application/pdf"?D=yield O.blob():j==="text/event-stream"?D=O:j==="multipart/form-data"?D=yield O.formData():D=yield O.text(),{data:D,error:null,response:O}}catch(h){return{data:null,error:h,response:h instanceof Jv||h instanceof Kv?h.context:void 0}}finally{u&&clearTimeout(u)}})}}const R_=3,Yv=e=>Math.min(1e3*2**e,3e4),Ix=[520,503],A_=["GET","HEAD","OPTIONS"];var Bx=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
12de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Qv(e,t){return new Promise(n=>{if(t?.aborted){n();return}const a=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e);function o(){clearTimeout(a),n()}t?.addEventListener("abort",o)})}function Hx(e,t,n,a){return!(!a||n>=R_||!A_.includes(e)||!Ix.includes(t))}var qx=class{constructor(e){var t,n,a,o,u;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=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(a=e.shouldStripNulls)!==null&&a!==void 0?a:!1,this.urlLengthLimit=(o=e.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(u=e.retry)!==null&&u!==void 0?u:!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 n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const c=this.headers.get("Accept");c==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!c||c==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const a=this.fetch;let u=(async()=>{let c=0;for(;;){const g=new Headers(n.headers);c>0&&g.set("X-Retry-Count",String(c));let m;try{m=await a(n.url.toString(),{method:n.method,headers:g,body:JSON.stringify(n.body,(y,b)=>typeof b=="bigint"?b.toString():b),signal:n.signal})}catch(y){if(y?.name==="AbortError"||y?.code==="ABORT_ERR"||!A_.includes(n.method))throw y;if(n.retryEnabled&&c<R_){const b=Yv(c);c++,await Qv(b,n.signal);continue}throw y}if(Hx(n.method,m.status,c,n.retryEnabled)){var h,f;const y=(h=(f=m.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&h!==void 0?h:null,b=y!==null?Math.max(0,parseInt(y,10)||0)*1e3:Yv(c);await m.text(),c++,await Qv(b,n.signal);continue}return await n.processResponse(m)}})();return this.shouldThrowOnError||(u=u.catch(c=>{var h;let f="",g="",m="";const y=c?.cause;if(y){var b,_,w,A;const N=(b=y?.message)!==null&&b!==void 0?b:"",j=(_=y?.code)!==null&&_!==void 0?_:"";f=`${(w=c?.name)!==null&&w!==void 0?w:"FetchError"}: ${c?.message}`,f+=` 13 14Caused by: ${(A=y?.name)!==null&&A!==void 0?A:"Error"}: ${N}`,j&&(f+=` (${j})`),y?.stack&&(f+=` 15${y.stack}`)}else{var E;f=(E=c?.stack)!==null&&E!==void 0?E:""}const O=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(m="",g="Request was aborted (timeout or manual cancellation)",O>this.urlLengthLimit&&(g+=`. Note: Your request URL is ${O} 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.`)):(y?.name==="HeadersOverflowError"||y?.code==="UND_ERR_HEADERS_OVERFLOW")&&(m="",g="HTTP headers exceeded server limits (typically 16KB)",O>this.urlLengthLimit&&(g+=`. Your request URL is ${O} 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:`${(h=c?.name)!==null&&h!==void 0?h:"FetchError"}: ${c?.message}`,details:f,hint:g,code:m},data:null,count:null,status:0,statusText:""}})),u.then(e,t)}async processResponse(e){var t=this;let n=null,a=null,o=null,u=e.status,c=e.statusText;if(e.ok){var h,f;if(t.method!=="HEAD"){var g;const b=await e.text();b===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((g=t.headers.get("Accept"))===null||g===void 0)&&g.includes("application/vnd.pgrst.plan+text"))?a=b:a=JSON.parse(b))}const m=(h=t.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),y=(f=e.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");m&&y&&y.length>1&&(o=parseInt(y[1])),t.isMaybeSingle&&Array.isArray(a)&&(a.length>1?(n={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,o=null,u=406,c="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{const m=await e.text();try{n=JSON.parse(m),Array.isArray(n)&&e.status===404&&(a=[],n=null,u=200,c="OK")}catch{e.status===404&&m===""?(u=204,c="No Content"):n={message:m}}
15if(n&&t.shouldThrowOnError)throw new Bx(n)}return{success:n===null,error:n,data:a,count:o,status:u,statusText:c}}returns(){return this}overrideTypes(){return this}},Fx=class extends qx{select(e){let t=!1;const n=(e??"*").split("").map(a=>/\s/.test(a)&&!t?"":(a==='"'&&(t=!t),a)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:a,referencedTable:o=a}={}){const u=o?`${o}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(a,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:a=n}={}){const o=typeof a>"u"?"offset":`${a}.offset`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(u,`${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:n=!1,buffers:a=!1,wal:o=!1,format:u="text"}={}){var c;const h=[e?"analyze":null,t?"verbose":null,n?"settings":null,a?"buffers":null,o?"wal":null].filter(Boolean).join("|"),f=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${f}"; options=${h};`),u==="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 Xv=new RegExp("[,()]");var Ma=class extends Fx{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(a=>typeof a=="string"&&Xv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(a=>typeof a=="string"&&Xv.test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:a}={}){let o="";a==="plain"?o="pl":a==="phrase"?o="ph":a==="websearch"&&(o="w");const u=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${o}fts${u}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
15n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const a=n?`${n}.or`:"or";return this.url.searchParams.append(a,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Gx=class{constructor(e,{headers:t={},schema:n,fetch:a,urlLengthLimit:o=8e3,retry:u}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=a,this.urlLengthLimit=o,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:a}=t??{},o=n?"HEAD":"GET";let u=!1;const c=(e??"*").split("").map(g=>/\s/.test(g)&&!u?"":(g==='"'&&(u=!u),g)).join(""),{url:h,headers:f}=this.cloneRequestState();return h.searchParams.set("select",c),a&&f.append("Prefer",`count=${a}`),new Ma({method:o,url:h,headers:f,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var a;const o="POST",{url:u,headers:c}=this.cloneRequestState();if(t&&c.append("Prefer",`count=${t}`),n||c.append("Prefer","missing=default"),Array.isArray(e)){const h=e.reduce((f,g)=>f.concat(Object.keys(g)),[]);if(h.length>0){const f=[...new Set(h)].map(g=>`"${g}"`);u.searchParams.set("columns",f.join(","))}}return new Ma({method:o,url:u,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:a,defaultToNull:o=!0}={}){var u;const c="POST",{url:h,headers:f}=this.cloneRequestState();if(f.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&h.searchParams.set("on_conflict",t),a&&f.append("Prefer",`count=${a}`),o||f.append("Prefer","missing=default"),Array.isArray(e)){const g=e.reduce((m,y)=>m.concat(Object.keys(y)),[]);if(g.length>0){const m=[...new Set(g)].map(y=>`"${y}"`);h.searchParams.set("columns",m.join(","))}}return new Ma({method:c,url:h,headers:f,schema:this.schema,body:e,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const a="PATCH",{url:o,headers:u}=this.cloneRequestState();return t&&u.append("Prefer",`count=${t}`),new Ma({method:a,url:o,headers:u,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:a,headers:o}=this.cloneRequestState();return e&&o.append("Prefer",`count=${e}`),new Ma({method:n,url:a,headers:o,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function yo(e){"@babel/helpers - typeof";return yo=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},yo(e)}function Zx(e,t){if(yo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(yo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vx(e){var t=Zx(e,"string");return yo(t)=="symbol"?t:t+""}function Kx(e,t,n){return(t=Vx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wv(Object(n),!0).forEach(function(a){Kx(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wv(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}var Jx=class O_{constructor(t,{headers:n={},schema:a,fetch:o,timeout:u,urlLengthLimit:c=8e3,retry:h}={}){this.url=t,this.headers=new Headers(n),this.schemaName=a,this.urlLengthLimit=c;const f=o??globalThis.fetch;u!==void 0&&u>0?this.fetch=(g,m)=>{const y=new AbortController,b=setTimeout(()=>y.abort(),u),_=m?.signal;if(_){if(_.aborted)return clearTimeout(b),f(g,m);const w=()=>{clearTimeout(b),y.abort()};return _.addEventListener("abort",w,{once:!0}),f(g,nu(nu({},m),{},{signal:y.signal})).finally(()=>{clearTimeout(b),_.removeEventListener("abort",w)})}return f(g,nu(nu({},m),{},{signal:y.signal})).finally(()=>clearTimeout(b))}:this.fetch=f,this.retry=h}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Gx(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 O_(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={}
15,{head:a=!1,get:o=!1,count:u}={}){var c;let h;const f=new URL(`${this.url}/rpc/${t}`);let g;const m=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(m)),y=a&&Object.values(n).some(m);y?(h="POST",g=n):a||o?(h=a?"HEAD":"GET",Object.entries(n).filter(([_,w])=>w!==void 0).map(([_,w])=>[_,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([_,w])=>{f.searchParams.append(_,w)})):(h="POST",g=n);const b=new Headers(this.headers);return y?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new Ma({method:h,url:f,headers:b,schema:this.schemaName,body:g,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Yx{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const a=typeof global<"u"?global:void 0;if(a&&typeof a.WebSocket<"u")return{type:"native",wsConstructor:a.WebSocket};if(typeof globalThis<"u"&&typeof n.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"&&n.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 u=o.versions;if(u&&u.node){const c=u.node,h=parseInt(c.replace(/^v/,"").split(".")[0]);return h>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${h} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${h} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 16import ws from "ws" 17new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 18 19Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const Qx="2.106.2",Xx=`realtime-js/${Qx}`,Wx="1.0.0",x_="2.0.0",ek=x_,tk=1e4,nk=100,Gr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},k_={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Xd={connecting:"connecting",closing:"closing",closed:"closed"};class rk{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let a=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(a))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,a;const o=(a=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&a!==void 0?a:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var n,a;const o=(a=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&a!==void 0?a:{},c=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(t,n,a){var o,u;const c=t.topic,h=(o=t.ref)!==null&&o!==void 0?o:"",f=(u=t.join_ref)!==null&&u!==void 0?u:"",g=t.payload.event,m=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},y=Object.keys(m).length===0?"":JSON.stringify(m);if(f.length>255)throw new Error(`joinRef length ${f.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`topic length ${c.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(y.length>255)throw new Error(`metadata length ${y.length} exceeds maximum of 255`);const b=this.USER_BROADCAST_PUSH_META_LENGTH+f.length+h.length+c.length+g.length+y.length,_=new ArrayBuffer(this.HEADER_LENGTH+b);let w=new DataView(_),A=0;w.setUint8(A++,this.KINDS.userBroadcastPush),w.setUint8(A++,f.length),w.setUint8(A++,h.length),w.setUint8(A++,c.length),w.setUint8(A++,g.length),w.setUint8(A++,y.length),w.setUint8(A++,n),Array.from(f,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(h,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(c,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(g,O=>w.setUint8(A++,O.charCodeAt(0))),Array.from(y,O=>w.setUint8(A++,O.charCodeAt(0)));var E=new Uint8Array(_.byteLength+a.byteLength);return E.set(new Uint8Array(_),0),E.set(new Uint8Array(a),_.byteLength),E.buffer}decode(t,n){if(this._isArrayBuffer(t)){let a=this._binaryDecode(t);return n(a)}if(typeof t=="string"){const a=JSON.parse(t),[o,u,c,h,f]=a;
19return n({join_ref:o,ref:u,topic:c,event:h,payload:f})}return n({})}_binaryDecode(t){const n=new DataView(t),a=n.getUint8(0),o=new TextDecoder;if(a===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,n,o)}_decodeUserBroadcast(t,n,a){const o=n.getUint8(1),u=n.getUint8(2),c=n.getUint8(3),h=n.getUint8(4);let f=this.HEADER_LENGTH+4;const g=a.decode(t.slice(f,f+o));f=f+o;const m=a.decode(t.slice(f,f+u));f=f+u;const y=a.decode(t.slice(f,f+c));f=f+c;const b=t.slice(f,t.byteLength),_=h===this.JSON_ENCODING?JSON.parse(a.decode(b)):b,w={type:this.BROADCAST_EVENT,event:m,payload:_};return c>0&&(w.meta=JSON.parse(y)),{join_ref:null,ref:null,topic:g,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t?.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([a])=>n.includes(a)))}}var qe;(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"})(qe||(qe={}));const eb=(e,t,n={})=>{var a;const o=(a=n.skipTypes)!==null&&a!==void 0?a:[];return t?Object.keys(t).reduce((u,c)=>(u[c]=sk(c,e,t,o),u),{}):{}},sk=(e,t,n,a)=>{const o=t.find(h=>h.name===e),u=o?.type,c=n[e];return u&&!a.includes(u)?C_(u,c):Wd(c)},C_=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return lk(t,n)}switch(e){case qe.bool:return ak(t);case qe.float4:case qe.float8:case qe.int2:case qe.int4:case qe.int8:case qe.numeric:case qe.oid:return ik(t);case qe.json:case qe.jsonb:return ok(t);case qe.timestamp:return uk(t);case qe.abstime:case qe.date:case qe.daterange:case qe.int4range:case qe.int8range:case qe.money:case qe.reltime:case qe.text:case qe.time:case qe.timestamptz:case qe.timetz:case qe.tsrange:case qe.tstzrange:return Wd(t);default:return Wd(t)}},Wd=e=>e,ak=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},ik=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},ok=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},lk=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,a=e[n];if(e[0]==="{"&&a==="}"){let u;const c=e.slice(1,n);try{u=JSON.parse("["+c+"]")}catch{u=c?c.split(","):[]}return u.map(h=>C_(t,h))}return e},uk=e=>typeof e=="string"?e.replace(" ","T"):e,j_=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 lo=e=>typeof e=="function"?e:function(){return e},ck=typeof self<"u"?self:null,Pa=typeof window<"u"?window:null,$n=ck||Pa||globalThis,hk="2.0.0",dk=1e4,fk=1e3,Bn={connecting:0,open:1,closing:2,closed:3},Kt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},hr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ef={longpoll:"longpoll",websocket:"websocket"},pk={complete:4},tf="base64url.bearer.phx.",ru=class{constructor(e,t,n,a){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=a,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()}
vendor: 8,135 bytes, line 19
19matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(a=>a.status===e).forEach(a=>a.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})}},z_=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))}},gk=class{constructor(e,t,n){this.state=Kt.closed,this.topic=e,this.params=lo(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ru(this,hr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new z_(()=>{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=Kt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this.joinPush.receive("error",a=>{this.state=Kt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Kt.closed,this.socket.remove(this)}),this.onError(a=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,a),this.isJoining()&&this.joinPush.reset(),this.state=Kt.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 ru(this,hr.leave,lo({}),this.timeout).send(),this.state=Kt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(hr.reply,(a,o)=>{this.trigger(this.replyEventName(o),a)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Kt.closed,this.bindings=[]}onClose(e){this.on(hr.close,e)}onError(e){return this.on(hr.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let a=new ru(this,e,function(){return t},n);return this.canPush()?a.send():(a.startTimeout(),this.pushBuffer.push(a)),a}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Kt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(hr.close,"leave")},n=new ru(this,hr.leave,lo({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,a){return this.topic!==e?!1:a&&a!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:a}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Kt.joining,this.joinPush.resend(e))}trigger(e,t,n,a){let o=this.onMessage(e,t,n,a);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(c=>c.event===e&&this.filterBindings(c,t,n));for(let c=0;c<u.length;c++)u[c].callback(o,n,a||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Kt.closed}isErrored(){return this.state===Kt.errored}isJoined(){return this.state===Kt.joined}isJoining(){return this.state===Kt.joining}isLeaving(){return this.state===Kt.leaving}},ku=class{static request(e,t,n,a,o,u,c){if($n.XDomainRequest){let h=new $n.XDomainRequest;return this.xdomainRequest(h,e,t,a,o,u,c)}else if($n.XMLHttpRequest){let h=new $n.XMLHttpRequest;return this.xhrRequest(h,e,t,n,a,o,u,c)}else{if($n.fetch&&$n.AbortController)return this.fetchRequest(e,t,n,a,o,u,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,a,o,u,c){let h={method:e,headers:n,body:a},f=null;return o&&(f=new AbortController,setTimeout(()=>f.abort(),o),h.signal=f.signal),$n.fetch(t,h).then(g=>g.text()).then(g=>this.parseJSON(g)).then(g=>c&&c(g)).catch(g=>{g.name==="AbortError"&&u?u():c&&c(null)}),f}static xdomainRequest(e,t,n,a,o,u,c){return e.timeout=o,e.open(t,n),e.onload=()=>{let h=this.parseJSON(e.responseText);c&&c(h)},u&&(e.ontimeout=u),e.onprogress=()=>{},e.send(a),e}static xhrRequest(e,t,n,a,o,u,c,h){e.open(t,n,!0),e.timeout=u;for(let[f,g]of Object.entries(a))e.setRequestHeader(f,g);return e.onerror=()=>h&&h(null),e.onreadystatechange=()=>{if(e.readyState===pk.complete&&h){let f=this.parseJSON(e.responseText);h(f)}},c&&(e.ontimeout=c),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 n=[];for(var a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;let o=t?`${t}[${a}]`:a,u=e[a];typeof u=="object"?n.push(this.serialize(u,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(u))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},mk=e=>{let t="",n=new Uint8Array(e),a=n.byteLength;for(let o=0;o<a;o++)t+=String.fromCharCode(n[o]);return btoa(t)},ka=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(tf)&&(this.authToken=atob(t[1].slice(tf.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=Bn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ef.websocket),"$1/"+ef.longpoll)}endpointURL(){return ku.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Bn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Bn.open||this.readyState===Bn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:a,messages:o}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=a}else n=0;switch(n){case 200:o.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Bn.open,this.onopen({}),this.poll();break;
19case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=mk(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 20`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let o of this.reqs)o.abort();this.readyState=Bn.closed;let a=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",a)):this.onclose(a)}ajax(e,t,n,a,o){let u,c=()=>{this.reqs.delete(u),a()};u=ku.request(e,this.endpointURL(),t,n,this.timeout,c,h=>{this.reqs.delete(u),this.isActive()&&o(h)}),this.reqs.add(u)}},yk=class ao{constructor(t,n={}){let a=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(a.state,o=>{let{onJoin:u,onLeave:c,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ao.syncState(this.state,o,u,c),this.pendingDiffs.forEach(f=>{this.state=ao.syncDiff(this.state,f,u,c)}),this.pendingDiffs=[],h()}),this.channel.on(a.diff,o=>{let{onJoin:u,onLeave:c,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=ao.syncDiff(this.state,o,u,c),h())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return ao.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,a,o){let u=this.clone(t),c={},h={};return this.map(u,(f,g)=>{n[f]||(h[f]=g)}),this.map(n,(f,g)=>{let m=u[f];if(m){let y=g.metas.map(A=>A.phx_ref),b=m.metas.map(A=>A.phx_ref),_=g.metas.filter(A=>b.indexOf(A.phx_ref)<0),w=m.metas.filter(A=>y.indexOf(A.phx_ref)<0);_.length>0&&(c[f]=g,c[f].metas=_),w.length>0&&(h[f]=this.clone(m),h[f].metas=w)}else c[f]=g}),this.syncDiff(u,{joins:c,leaves:h},a,o)}static syncDiff(t,n,a,o){let{joins:u,leaves:c}=this.clone(n);return a||(a=function(){}),o||(o=function(){}),this.map(u,(h,f)=>{let g=t[h];if(t[h]=this.clone(f),g){let m=t[h].metas.map(b=>b.phx_ref),y=g.metas.filter(b=>m.indexOf(b.phx_ref)<0);t[h].metas.unshift(...y)}a(h,g,f)}),this.map(c,(h,f)=>{let g=t[h];if(!g)return;let m=f.metas.map(y=>y.phx_ref);g.metas=g.metas.filter(y=>m.indexOf(y.phx_ref)<0),o(h,g,f),g.metas.length===0&&delete t[h]}),t}static list(t,n){return n||(n=function(a,o){return o}),this.map(t,(a,o)=>n(a,o))}static map(t,n){return Object.getOwnPropertyNames(t).map(a=>n(a,t[a]))}static clone(t){return JSON.parse(JSON.stringify(t))}},su={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,a,o,u,c]=JSON.parse(e);return t({join_ref:n,ref:a,topic:o,event:u,payload:c})}},binaryEncode(e){let{join_ref:t,ref:n,event:a,topic:o,payload:u}=e,c=this.META_LENGTH+t.length+n.length+o.length+a.length,h=new ArrayBuffer(this.HEADER_LENGTH+c),f=new DataView(h),g=0;f.setUint8(g++,this.KINDS.push),f.setUint8(g++,t.length),f.setUint8(g++,n.length),f.setUint8(g++,o.length),f.setUint8(g++,a.length),Array.from(t,y=>f.setUint8(g++,y.charCodeAt(0))),Array.from(n,y=>f.setUint8(g++,y.charCodeAt(0))),Array.from(o,y=>
20f.setUint8(g++,y.charCodeAt(0))),Array.from(a,y=>f.setUint8(g++,y.charCodeAt(0)));var m=new Uint8Array(h.byteLength+u.byteLength);return m.set(new Uint8Array(h),0),m.set(new Uint8Array(u),h.byteLength),m.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),a=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,a);case this.KINDS.reply:return this.decodeReply(e,t,a);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,a)}},decodePush(e,t,n){let a=t.getUint8(1),o=t.getUint8(2),u=t.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,h=n.decode(e.slice(c,c+a));c=c+a;let f=n.decode(e.slice(c,c+o));c=c+o;let g=n.decode(e.slice(c,c+u));c=c+u;let m=e.slice(c,e.byteLength);return{join_ref:h,ref:null,topic:f,event:g,payload:m}},decodeReply(e,t,n){let a=t.getUint8(1),o=t.getUint8(2),u=t.getUint8(3),c=t.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,f=n.decode(e.slice(h,h+a));h=h+a;let g=n.decode(e.slice(h,h+o));h=h+o;let m=n.decode(e.slice(h,h+u));h=h+u;let y=n.decode(e.slice(h,h+c));h=h+c;let b=e.slice(h,e.byteLength),_={status:y,response:b};return{join_ref:f,ref:g,topic:m,event:hr.reply,payload:_}},decodeBroadcast(e,t,n){let a=t.getUint8(1),o=t.getUint8(2),u=this.HEADER_LENGTH+2,c=n.decode(e.slice(u,u+a));u=u+a;let h=n.decode(e.slice(u,u+o));u=u+o;let f=e.slice(u,e.byteLength);return{join_ref:null,ref:null,topic:c,event:h,payload:f}}},vk=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||dk,this.transport=t.transport||$n.WebSocket||ka,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=$n&&$n.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=su.encode.bind(su),this.defaultDecoder=su.decode.bind(su),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!==ka?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let a=null;Pa&&Pa.addEventListener&&(Pa.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),a=this.connectClock)}),Pa.addEventListener("pageshow",o=>{a===this.connectClock&&(a=null,this.connect())}),Pa.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,u,c)=>{console.log(`${o}: ${u}`,c)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=lo(t.params||{}),this.endPoint=`${e}/${ef.websocket}`,this.vsn=t.vsn||hk,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new z_(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ka}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=ku.appendParams(ku.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=lo(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ka?this.connectWithF
vendor: 4,353 bytes, line 20
20allback(ka,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let a=this.onMessage(o=>{o.ref===t&&(this.off([a]),e(Date.now()-n))});return!0}transportName(e){return e===ka?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${tf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,a=!0,o,u,c=this.transportName(e),h=f=>{this.log("transport",`falling back to ${c}...`,f),this.off([o,u]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return h("memorized");this.fallbackTimer=setTimeout(h,t),u=this.onError(f=>{this.log("transport","error",f),a&&!n&&(clearTimeout(this.fallbackTimer),h(f))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!a){let f=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${f}`,"true"),this.log("transport",`established ${f} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,t),this.ping(f=>{this.log("transport","connected to primary after",f),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(),fk,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const a=this.conn;this.waitForBufferDone(a,()=>{t?a.close(t,n||""):a.close(),this.waitForSocketClosed(a,()=>{this.conn===a&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Bn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(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,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
20triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(hr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Bn.connecting:return"connecting";case Bn.open:return"open";case Bn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new gk(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:a,ref:o,join_ref:u}=e;this.log("push",`${t} ${n} (${u}, ${o})`,a)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:a,payload:o,ref:u,join_ref:c}=t;if(u&&u===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",h)}catch(f){this.log("error","error in heartbeat callback",f)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${n} ${a} ${u&&"("+u+")"||""}`.trim(),o);for(let h=0;h<this.channels.length;h++){const f=this.channels[h];f.isMember(n,a,o,c)&&f.trigger(a,o,u,c)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,a])=>{try{a(...t)}catch(o){this.log("error",`error in ${e} callback`,o)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class uo{constructor(t,n){const a=_k(n);this.presence=new yk(t.getChannel(),a),this.presence.onJoin((o,u,c)=>{const h=uo.onJoinPayload(o,u,c);t.getChannel().trigger("presence",h)}),this.presence.onLeave((o,u,c)=>{const h=uo.onLeavePayload(o,u,c);t.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return uo.transformState(this.presence.state)}static transformState(t){return t=bk(t),Object.getOwnPropertyNames(t).reduce((n,a)=>{const o=t[a];return n[a]=_u(o),n},{})}static onJoinPayload(t,n,a){const o=tb(n),u=_u(a);return{event:"join",key:t,currentPresences:o,newPresences:u}}static onLeavePayload(t,n,a){const o=tb(n),u=_u(a);return{event:"leave",key:t,currentPresences:o,leftPresences:u}}}function _u(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function bk(e){return JSON.parse(JSON.stringify(e))}function _k(e){return e?.events&&{events:e.events}}function tb(e){return e?.metas?_u(e):[]}var nb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(nb||(nb={}));class wk{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new uo(this.channel.channelAdapter,n)}}function Sk(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
20if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class Ek{constructor(t,n,a){const o=Tk(a);this.channel=t.getSocket().channel(n,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,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,a){let o;try{o=this.channel.push(t,n,a)}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>nk){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return o}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Gr.joined}isJoined(){return this.state===Gr.joined}isJoining(){return this.state===Gr.joining}isClosed(){return this.state===Gr.closed}isLeaving(){return this.state===Gr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function Tk(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var rb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(rb||(rb={}));var Ia;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ia||(Ia={}));var dr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(dr||(dr={}));class co{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},a){var o,u;if(this.topic=t,this.params=n,this.socket=a,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new Ek(this.socket.socketAdapter,t,this.params),this.presence=new wk(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=j_(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var a,o,u;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:h,private:f}}=this.params,g=(o=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(_=>_.filter))!==null&&o!==void 0?o:[],m=!!this.bindings[Ia.PRESENCE]&&this.bindings[Ia.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,y={},b={broadcast:c,presence:Object.assign(Object.assign({},h),{enabled:m}),postgres_changes:g,private:f};this.socket.accessTokenValue&&(y.access_token=this.socket.accessTokenValue),this._onError(_=>{t?.(dr.CHANNEL_ERROR,Sk(_))}),this._onClose(()=>t?.(dr.CLOSED)),this.updateJoinPayload(Object.assign({config:b},y)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:_})=>
20{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){t?.(dr.SUBSCRIBED);return}this._updatePostgresBindings(_,t)}).receive("error",_=>{this.state=Gr.errored;const w=Object.values(_).join(", ")||"error";t?.(dr.CHANNEL_ERROR,new Error(w,{cause:_}))}).receive("timeout",()=>{t?.(dr.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var a;const o=this.bindings.postgres_changes,u=(a=o?.length)!==null&&a!==void 0?a:0,c=[];for(let h=0;h<u;h++){const f=o[h],{filter:{event:g,schema:m,table:y,filter:b}}=f,_=t&&t[h];if(_&&_.event===g&&co.isFilterValueEqual(_.schema,m)&&co.isFilterValueEqual(_.table,y)&&co.isFilterValueEqual(_.filter,b))c.push(Object.assign(Object.assign({},f),{id:_.id}));else{this.unsubscribe(),this.state=Gr.errored,n?.(dr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Gr.errored&&n&&n(dr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,a){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=t===Ia.PRESENCE||t===Ia.POSTGRES_CHANGES;if(o&&u)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,n,a)}async httpSend(t,n,a={}){var o;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},h=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(o=a.timeout)!==null&&o!==void 0?o:this.timeout);if(h.status===202)return{success:!0};let f=h.statusText;try{const g=await h.json();f=g.error||g.message||f}catch{}return Promise.reject(new Error(f))}async send(t,n={}){var a,o;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
20in the future. Please use httpSend() explicitly for REST delivery.");const{event:u,payload:c}=t,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:u,payload:c,private:this.private}]})};try{const g=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(a=n.timeout)!==null&&a!==void 0?a:this.timeout);return await((o=g.body)===null||o===void 0?void 0:o.cancel()),g.ok?"ok":"error"}catch(g){return g instanceof Error&&g.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var c,h,f;const g=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((f=(h=(c=this.params)===null||c===void 0?void 0:c.config)===null||h===void 0?void 0:h.broadcast)===null||f===void 0)&&f.ack)&&u("ok"),g.receive("ok",()=>u("ok")),g.receive("error",()=>u("error")),g.receive("timeout",()=>u("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,a){const o=new AbortController,u=setTimeout(()=>o.abort(),a),c=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:o.signal}));return clearTimeout(u),c}_on(t,n,a){const o=t.toLocaleLowerCase(),u=this.channelAdapter.on(t,a),c={type:o,filter:n,callback:a,ref:u};return this.bindings[o]?this.bindings[o].push(c):this.bindings[o]=[c],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,a)=>{var o,u,c,h,f,g,m;const y=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(y,a))return!1;const b=(o=this.bindings[y])===null||o===void 0?void 0:o.find(_=>_.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(y))if("id"in b){const _=b.id,w=(u=b.filter)===null||u===void 0?void 0:u.event;return _&&((c=n.ids)===null||c===void 0?void 0:c.includes(_))&&(w==="*"||w?.toLocaleLowerCase()===((h=n.data)===null||h===void 0?void 0:h.type.toLocaleLowerCase()))}else{const _=(g=(f=b?.filter)===null||f===void 0?void 0:f.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((m=n?.event)===null||m===void 0?void 0:m.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===y})}_notThisChannelEvent(t,n){const{close:a,error:o,leave:u,join:c}=k_;return n&&[a,o,u,c].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,a)=>{if(typeof n=="object"&&"ids"in n){const o=n.data,{schema:u,table:c,commit_timestamp:h,type:f,errors:g}=o;return Object.assign(Object.assign({},{schema:u,table:c,commit_timestamp:h,eventType:f,new:{},old:{},errors:g}),this._getPayloadRecords(o))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const a of t.bindings[n])this._on(a.type,a.filter,a.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=eb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=eb(t.columns,t.old_record)),n}}class Rk{constructor(t,n){this.socket=new vk(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,a,o=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),o),this.socket.disconnect(()=>{t(),u("ok")},n,a)})}push(t){this.socket.push(t)}log(t,n,a){this.socket.log(t,n,a)}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()==Xd.connecting}isDisconnecting(){return this.socket.connectionState()==Xd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const sb={HEARTBEAT_INTERVAL:25e3},Ak=[1e3,2e3,5e3,1e4],Ok=1e4;function xk(){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 n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function kk(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return xk()}const Ck=` 21 addEventListener("message", (e) => { 22 if (e.data.event === "start") { 23 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 24 } 25 });`;class jk{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var a;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
25,this.ref=0,this.serializer=new rk,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...c)=>u(...c):(...c)=>fetch(...c),!(!((a=n?.params)===null||a===void 0)&&a.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const o=this._initializeOptions(n);this.socketAdapter=new Rk(t,o),this.httpEndpoint=j_(t),this.fetch=this._resolveFetch(n?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 26 27To use Realtime in Node.js, you need to provide a WebSocket implementation: 28 29Option 1: Use Node.js 22+ which has native WebSocket support 30Option 2: Install and provide the "ws" package: 31 32 npm install ws 33 34 import ws from "ws" 35 const client = new RealtimeClient(url, { 36 ...options, 37 transport: ws 38 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async a=>{const o=await a.unsubscribe();return a.teardown(),o}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,a){this.socketAdapter.log(t,n,a)}connectionState(){return this.socketAdapter.connectionState()||Xd.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const a=`realtime:${t}`,o=this.getChannels().find(u=>u.topic===a);if(o)return o;{const u=new co(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),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}
38this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,a=!1;if(t)n=t,a=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),n=this.accessTokenValue}else n=this.accessTokenValue;a?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(o=>{const u={access_token:n,version:Xx};n&&o.updateJoinPayload(u),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(k_.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,a)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,a)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const a=new Blob([Ck],{type:"application/javascript"});n=URL.createObjectURL(a)}return n}_initializeOptions(t){var n,a,o,u,c,h,f,g,m,y,b,_;this.worker=(n=t?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(a=t?.accessToken)!==null&&a!==void 0?a:null;const w={};w.timeout=(o=t?.timeout)!==null&&o!==void 0?o:tk,w.heartbeatIntervalMs=(u=t?.heartbeatIntervalMs)!==null&&u!==void 0?u:sb.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((h=t?.heartbeatIntervalMs)!==null&&h!==void 0?h:sb.HEARTBEAT_INTERVAL),w.transport=(f=t?.transport)!==null&&f!==void 0?f:Yx.getWebSocketConstructor(),w.params=t?.params,w.logger=t?.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),w.sessionStorage=(g=t?.sessionStorage)!==null&&g!==void 0?g:kk(),w.reconnectAfterMs=(m=t?.reconnectAfterMs)!==null&&m!==void 0?m:(N=>Ak[N-1]||Ok);let A,E;const O=(y=t?.vsn)!==null&&y!==void 0?y:ek;switch(O){case Wx:A=(N,j)=>j(JSON.stringify(N)),E=(N,j)=>j(JSON.parse(N));break;case x_:A=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=O,w.encode=(b=t?.encode)!==null&&b!==void 0?b:A,w.decode=(_=t?.decode)!==null&&_!==void 0?_:E,w.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
38var vo=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 zk(e,t,n){const a=new URL(t,e);if(n)for(const[o,u]of Object.entries(n))u!==void 0&&a.searchParams.set(o,u);return a.toString()}async function Nk(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 Dk(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:a,query:o,body:u,headers:c}){const h=zk(e.baseUrl,a,o),f=await Nk(e.auth),g=await t(h,{method:n,headers:{...u?{"Content-Type":"application/json"}:{},...f,...c},body:u?JSON.stringify(u):void 0}),m=await g.text(),y=(g.headers.get("content-type")||"").includes("application/json"),b=y&&m?JSON.parse(m):m;if(!g.ok){const _=y?b:void 0,w=_?.error;throw new vo(w?.message??`Request failed with status ${g.status}`,{status:g.status,icebergType:w?.type,icebergCode:w?.code,details:_})}return{status:g.status,headers:g.headers,data:b}}}}function au(e){return e.join("�")}var Mk=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:au(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(a=>({namespace:a}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${au(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${au(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${au(e.namespace)}`}),!0}catch(t){if(t instanceof vo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof vo&&n.status===409)return;throw n}}};function Ca(e){return e.join("�")}var Pk=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ca(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ca(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ca(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ca(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/${Ca(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/${Ca(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof vo&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof vo&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},Lk=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=Dk({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new Mk(this.client,t),this.tableOps=new Pk(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)}
38async 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 bo(e){"@babel/helpers - typeof";return bo=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},bo(e)}function Uk(e,t){if(bo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(bo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $k(e){var t=Uk(e,"string");return bo(t)=="symbol"?t:t+""}function Ik(e,t,n){return(t=$k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ab(Object(n),!0).forEach(function(a){Ik(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ab(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}var Ju=class extends Error{constructor(e,t="storage",n,a){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Yu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var nf=class extends Ju{constructor(e,t,n,a="storage"){super(e,a,t,n),this.name=a==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return de({},super.toJSON())}},N_=class extends Ju{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Cu(e,t,n){const a=de({},e),o=t.toLowerCase();for(const u of Object.keys(a))u.toLowerCase()===o&&delete a[u];return a[o]=n,a}function Bk(e){const t={};for(const[n,a]of Object.entries(e))t[n.toLowerCase()]=a;return t}const Hk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),qk=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)},rf=e=>{if(Array.isArray(e))return e.map(n=>rf(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,a])=>{const o=n.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));t[o]=rf(a)}),t},Fk=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),ib=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 n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},Gk=async(e,t,n,a)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const o=e;let u=parseInt(String(o.status),10);Number.isFinite(u)||(u=500),o.json().then(c=>{const h=c?.statusCode||c?.code||u+"";t(new nf(ib(c),u,h,a))}).catch(()=>{const c=u+"";t(new nf(o.statusText||`HTTP ${u} error`,u,c,a))})}else t(new N_(ib(e),e,a))},Zk=(e,t,n,a)=>{const o={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!a)return de(de({},o),n);if(qk(a)){var u;const c=t?.headers||{};let h;for(const[f,g]of Object.entries(c))f.toLowerCase()==="content-type"&&(h=g);o.headers=Cu(c,"Content-Type",(u=h)!==null&&u!==void 0?u:"application/json"),o.body=JSON.stringify(a)}else o.body=a;return t?.duplex&&(o.duplex=t.duplex),de(de({},o),n)};async function ro(e,t,n,a,o,u,c){return new Promise((h,f)=>{e(n,Zk(t,a,o,u)).then(g=>{if(!g.ok)throw g;if(a?.noResolveJson)return g;if(c==="vectors"){const m=g.headers.get("content-type");if(g.headers.get("content-length")==="0"||g.status===204)return{};if(!m||!m.includes("application/json"))return{}}return g.json()}).then(g=>h(g)).catch(g=>Gk(g,f,a,c))})}function D_(e="storage"){return{get:async(t,n,a,o)=>ro(t,"GET",n,a,o,void 0,e),post:async(t,n,a,o,u)=>ro(t,"POST",n,o,u,a,e),put:async(t,n,a,o,u)=>ro(t,"PUT",n,o,u,a,e),head:async(t,n,a,o)=>ro(t,"HEAD",n,de(de({},a),{},{noResolveJson:!0}),o,void 0,e),remove:async(t,n,a,o,u)=>ro(t,"DELETE",n,o,u,a,e)}}
38const Vk=D_("storage"),{get:_o,post:xn,put:sf,head:Kk,remove:Pf}=Vk,cn=D_("vectors");var Qa=class{constructor(e,t={},n,a="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Bk(t),this.fetch=Hk(n),this.namespace=a}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Cu(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Yu(n))return{data:null,error:n};throw n}}};let M_;M_=Symbol.toStringTag;var Jk=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[M_]="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;if(Yu(t))return{data:null,error:t};throw t}}};let P_;P_=Symbol.toStringTag;var Yk=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[P_]="BlobDownloadBuilder",this.promise=null}asStream(){return new Jk(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(Yu(t))return{data:null,error:t};throw t}}};const Qk={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ob={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Xk=class extends Qa{constructor(e,t={},n,a){super(e,t,a,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,a){var o=this;return o.handleOperation(async()=>{let u;const c=de(de({},ob),a);let h=de(de({},o.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const f=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),f&&u.append("metadata",o.encodeMetadata(f)),u.append("",n)):typeof FormData<"u"&&n instanceof FormData?(u=n,u.has("cacheControl")||u.append("cacheControl",c.cacheControl),f&&!u.has("metadata")&&u.append("metadata",o.encodeMetadata(f))):(u=n,h["cache-control"]=`max-age=${c.cacheControl}`,h["content-type"]=c.contentType,f&&(h["x-metadata"]=o.toBase64(o.encodeMetadata(f))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!c.duplex&&(c.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))h=Cu(h,b,_);const g=o._removeEmptyFolders(t),m=o._getFinalPath(g),y=await(e=="PUT"?sf:xn)(o.fetch,`${o.url}/object/${m}`,u,de({headers:h},c?.duplex?{duplex:c.duplex}:{}));return{path:g,id:y.Id,fullPath:y.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,a){var o=this;const u=o._removeEmptyFolders(e),c=o._getFinalPath(u),h=new URL(o.url+`/object/upload/sign/${c}`);return h.searchParams.set("token",t),o.handleOperation(async()=>{let f;const g=de(de({},ob),a);let m=de(de({},o.headers),{"x-upsert":String(g.upsert)});const y=g.metadata;if(typeof Blob<"u"&&n instanceof Blob?(f=new FormData,f.append("cacheControl",g.cacheControl),y&&f.append("metadata",o.encodeMetadata(y)),f.append("",n)):typeof FormData<"u"&&n instanceof FormData?(f=n,f.has("cacheControl")||f.append("cacheControl",g.cacheControl),y&&!f.has("metadata")&&f.append("metadata",o.encodeMetadata(y))):(f=n,m["cache-control"]=`max-age=${g.cac
38heControl}`,m["content-type"]=g.contentType,y&&(m["x-metadata"]=o.toBase64(o.encodeMetadata(y))),(typeof ReadableStream<"u"&&f instanceof ReadableStream||f&&typeof f=="object"&&"pipe"in f&&typeof f.pipe=="function")&&!g.duplex&&(g.duplex="half")),a?.headers)for(const[b,_]of Object.entries(a.headers))m=Cu(m,b,_);return{path:u,fullPath:(await sf(o.fetch,h.toString(),f,de({headers:m},g?.duplex?{duplex:g.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let a=n._getFinalPath(e);const o=de({},n.headers);t?.upsert&&(o["x-upsert"]="true");const u=await xn(n.fetch,`${n.url}/object/upload/sign/${a}`,{},{headers:o}),c=new URL(n.url+u.url),h=c.searchParams.get("token");if(!h)throw new Ju("No token returned by API");return{signedUrl:c.toString(),path:e,token:h}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var a=this;return a.handleOperation(async()=>await xn(a.fetch,`${a.url}/object/move`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:a.headers}))}async copy(e,t,n){var a=this;return a.handleOperation(async()=>({path:(await xn(a.fetch,`${a.url}/object/copy`,{bucketId:a.bucketId,sourceKey:e,destinationKey:t,de
38stinationBucket:n?.destinationBucket},{headers:a.headers})).Key}))}async createSignedUrl(e,t,n){var a=this;return a.handleOperation(async()=>{let o=a._getFinalPath(e);const u=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let c=await xn(a.fetch,`${a.url}/object/sign/${o}`,de({expiresIn:t},u?{transform:n.transform}:{}),{headers:a.headers});const h=new URLSearchParams;n?.download&&h.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&h.set("cacheNonce",String(n.cacheNonce));const f=h.toString();return{signedUrl:encodeURI(`${a.url}${c.signedURL}${f?`&${f}`:""}`)}})}async createSignedUrls(e,t,n){var a=this;return a.handleOperation(async()=>{const o=await xn(a.fetch,`${a.url}/object/sign/${a.bucketId}`,{expiresIn:t,paths:e},{headers:a.headers}),u=new URLSearchParams;n?.download&&u.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&u.set("cacheNonce",String(n.cacheNonce));const c=u.toString();return o.map(h=>de(de({},h),{},{signedUrl:h.signedURL?encodeURI(`${a.url}${h.signedURL}${c?`&${c}`:""}`):null}))})}download(e,t,n){const a=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 u=o.toString(),c=this._getFinalPath(e),h=()=>_o(this.fetch,`${this.url}/${a}/${c}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new Yk(h,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>rf(await _o(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await Kk(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(o){if(t.shouldThrowOnError)throw o;if(Yu(o)){var a;const u=o instanceof nf?o.status:o instanceof N_?(a=o.originalError)===null||a===void 0?void 0:a.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:o}}throw o}}getPublicUrl(e,t){const n=this._getFinalPath(e),a=new URLSearchParams;t?.download&&a.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(a,t.transform),t?.cacheNonce!=null&&a.set("cacheNonce",String(t.cacheNonce));const o=a.toString(),u=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${n}`)+(o?`?${o}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Pf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var a=this;return a.handleOperation(async()=>{const o=de(de(de({},Qk),t),{},{prefix:e||""});return await xn(a.fetch,`${a.url}/object/list/${a.bucketId}`,o,{headers:a.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const a=de({},e);return await xn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,a,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const Wk="2.106.2",Co={"X-Client-Info":`storage-js/${Wk}`};var eC=class extends Qa{constructor(e,t={},n,a){const o=new URL(e);a?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const u=o.href.replace(/\/$/,""),c=de(de({},Co),t);super(u,c,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await _o(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await _o(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await xn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await sf(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await xn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Pf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},tC=class extends Qa{constructor(e,t={},n){const a=e.replace(/\/$/,""),o=de(de({},Co),t);super(a,o,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await xn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;e?.limit!==void 0&&n.set("limit",e.limit.toString()),e?.offset!==void 0&&n.set("offset",e.offset.toString()),e?.sortColumn&&n.set("sortColumn",e.sortColumn),e?.sortOrder&&n.set("sortOrder",e.sortOrder),e?.search&&n.set("search",e.search);const a=n.toString(),o=a?`${t.url}/bucket?${a}`:`${t.url}/bucket`;return await _o(t.fetch,o,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Pf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!Fk(e))throw new Ju("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new Lk({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),a=this.shouldThrowOnError;return new Proxy(n,{get(o,u){const c=o[u];return typeof c!="function"?c:async(...h)=>{try{return{data:await c.apply(o,h),error:null}}catch(f){if(a)throw f;return{data:null,error:f}}}}})}},nC=class extends Qa{constructor(e,t={},n){const a=e.replace(/\/$/,""),o=de(de({},Co),{},{"Content-Type":"application/json"},t);super(a,o,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await cn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await cn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},rC=class extends Qa{constructor(e,t={},n){const a=e.replace(/\/$/,""),o=de(de({},Co),{},{"Content-Type":"application/json"},t);super(a,o,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await cn.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");
38if(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 cn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await cn.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 cn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},sC=class extends Qa{constructor(e,t={},n){const a=e.replace(/\/$/,""),o=de(de({},Co),{},{"Content-Type":"application/json"},t);super(a,o,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await cn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},aC=class extends sC{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new iC(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},iC=class extends nC{constructor(e,t,n,a){super(e,t,a),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new oC(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},oC=class extends rC{constructor(e,t,n,a,o){super(e,t,o),this.vectorBucketName=n,this.indexName=a}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,de(de({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},lC=class extends eC{constructor(e,t={},n,a){super(e,t,n,a)}from(e){return new Xk(this.url,this.headers,e,this.fetch)}get vectors(){return new aC(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new tC(this.url+"/iceberg",this.headers,this.fetch)}};const L_="2.106.2",La=30*1e3,af=3,Nd=af*La,uC="http://localhost:9999",cC="supabase.auth.token",hC={"X-Client-Info":`gotrue-js/${L_}`},of="X-Supabase-Api-Version",U_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},dC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,fC=600*1e3;
38class Ja extends Error{constructor(t,n,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function ee(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class pC extends Ja{constructor(t,n,a){super(t,n,a),this.name="AuthApiError",this.status=n,this.code=a}}function gC(e){return ee(e)&&e.name==="AuthApiError"}class kn extends Ja{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class mr extends Ja{constructor(t,n,a,o){super(t,a,o),this.name=n,this.status=a}}class wt extends mr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function iu(e){return ee(e)&&e.name==="AuthSessionMissingError"}class ja extends mr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class ou extends mr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class lu extends mr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function mC(e){return ee(e)&&e.name==="AuthImplicitGrantRedirectError"}class lb extends mr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class yC extends mr{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 lf extends mr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Dd(e){return ee(e)&&e.name==="AuthRetryableFetchError"}class ub extends mr{constructor(t,n,a){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=a}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class uf extends mr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const ju="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),cb=` 39\r=`.split(""),vC=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<cb.length;t+=1)e[cb[t].charCodeAt(0)]=-2;for(let t=0;t<ju.length;t+=1)e[ju[t].charCodeAt(0)]=t;return e})();function hb(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;n(ju[a]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const a=t.queue>>t.queuedBits-6&63;n(ju[a]),t.queuedBits-=6}}function $_(e,t,n){const a=vC[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function db(e){const t=[],n=c=>{t.push(String.fromCodePoint(c))},a={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},u=c=>{wC(c,a,n)};for(let c=0;c<e.length;c+=1)$_(e.charCodeAt(c),o,u);return t.join("")}function bC(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 _C(e,t){for(let n=0;n<e.length;n+=1){let a=e.charCodeAt(n);if(a>55295&&a<=56319){const o=(a-55296)*1024&65535;a=(e.charCodeAt(n+1)-56320&65535|o)+65536,n+=1}bC(a,t)}}function wC(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let a=1;a<6;a+=1)if((e>>7-a&1)===0){t.utf8seq=a;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Ga(e){const t=[],n={queue:0,queuedBits:0},a=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)$_(e.charCodeAt(o),n,a);return new Uint8Array(t)}function SC(e){const t=[];return _C(e,n=>t.push(n)),new Uint8Array(t)}function zs(e){const t=[],n={queue:0,queuedBits:0},a=o=>{t.push(o)};return e.forEach(o=>hb(o,n,a)),hb(null,n,a),t.join("")}function EC(e){return Math.round(Date.now()/1e3)+e}function TC(){return Symbol("auth-callback")}const jt=()=>typeof window<"u"&&typeof document<"u",Rs={tested:!1,writable:!1},I_=()=>{if(!jt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Rs.tested)return Rs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Rs.tested=!0,Rs.writable=!0}catch{Rs.tested=!0,Rs.writable=!1}return Rs.writable};function RC(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
39h((o,u)=>{t[u]=o})}catch{}return n.searchParams.forEach((a,o)=>{t[o]=a}),t}const B_=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),AC=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ua=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},As=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Ct=async(e,t)=>{await e.removeItem(t)};class Qu{constructor(){this.promise=new Qu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Qu.promiseConstructor=Promise;function uu(e){const t=e.split(".");if(t.length!==3)throw new uf("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!dC.test(t[a]))throw new uf("JWT not in base64url format");return{header:JSON.parse(db(t[0])),payload:JSON.parse(db(t[1])),signature:Ga(t[2]),raw:{header:t[0],payload:t[1]}}}async function OC(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function xC(e,t){return new Promise((a,o)=>{(async()=>{for(let u=0;u<1/0;u++)try{const c=await e(u);if(!t(u,null,c)){a(c);return}}catch(c){if(!t(u,c)){o(c);return}}})()})}function kC(e){return("0"+e.toString(16)).substr(-2)}function CC(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=n.length;let o="";for(let u=0;u<56;u++)o+=n.charAt(Math.floor(Math.random()*a));return o}return crypto.getRandomValues(t),Array.from(t,kC).join("")}async function jC(e){const n=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",n),o=new Uint8Array(a);return Array.from(o).map(u=>String.fromCharCode(u)).join("")}async function zC(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await jC(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function za(e,t,n=!1){const a=CC();let o=a;n&&(o+="/recovery"),await Ua(e,`${t}-code-verifier`,o);const u=await zC(a);return[u,a===u?"plain":"s256"]}const NC=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function DC(e){const t=e.headers.get(of);if(!t||!t.match(NC))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function MC(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 PC(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 LC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function cr(e){if(!LC.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function On(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 Md(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function UC(e,t){return new Proxy(e,{get:(n,a,o)=>
39{if(a==="__isInsecureUserWarningProxy")return!0;if(typeof a=="symbol"){const u=a.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,a,o)}return!t.value&&typeof a=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,a,o)}})}function fb(e){return JSON.parse(JSON.stringify(e))}const Os=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)},$C=[502,503,504,520,521,522,523,524,530];async function pb(e){var t;if(!AC(e))throw new lf(Os(e),0);if($C.includes(e.status))throw new lf(Os(e),e.status);let n;try{n=await e.json()}catch(u){throw new kn(Os(u),u)}let a;const o=DC(e);if(o&&o.getTime()>=U_["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?a=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(a=n.error_code),a){if(a==="weak_password")throw new ub(Os(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new wt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((u,c)=>u&&typeof c=="string",!0))throw new ub(Os(n),e.status,n.weak_password.reasons);throw new pC(Os(n),e.status||500,a)}const IC=(e,t,n,a)=>{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(a),Object.assign(Object.assign({},o),n))};async function re(e,t,n,a){var o;const u=Object.assign({},a?.headers);u[of]||(u[of]=U_["2024-01-01"].name),a?.jwt&&(u.Authorization=`Bearer ${a.jwt}`);const c=(o=a?.query)!==null&&o!==void 0?o:{};a?.redirectTo&&(c.redirect_to=a.redirectTo);const h=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",f=await BC(e,t,n+h,{headers:u,noResolveJson:a?.noResolveJson},{},a?.body);return a?.xform?a?.xform(f):{data:Object.assign({},f),error:null}}async function BC(e,t,n,a,o,u){const c=IC(t,a,o,u);let h;try{h=await e(n,Object.assign({},c))}catch(f){throw console.error(f),new lf(Os(f),0)}if(h.ok||await pb(h),a?.noResolveJson)return h;try{return await h.json()}catch(f){await pb(f)}}function wn(e){var t;let n=null;FC(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=EC(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:n,user:a},error:null}}function gb(e){const t=wn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,a)=>n&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Zr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function HC(e){return{data:e,error:null}}function qC(e){const{action_link:t,email_otp:n,hashed_token:a,redirect_to:o,verification_type:u}=e,c=Ku(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:t,email_otp:n,hashed_token:a,redirect_to:o,verification_type:u},f=Object.assign({},c);return{data:{properties:h,user:f},error:null}}function mb(e){return e}function FC(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Pd=["global","local","others"];class GC{_encodePathSegment(t){if(t==="."||t==="..")throw new Ja("Invalid path segment");return encodeURIComponent(t)}constructor({url:t="",headers:n={},fetch:a,experimental:o}){this.url=t,this.headers=n,this.fetch=B_(a),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,n=Pd[0]){if(Pd.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Pd.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(ee(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,n={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Zr})}catch(a){if(ee(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:n}=t,a=Ku(t,["options"]),o=Object.assign(Object.assign({},a),n);return"newEmail"in a&&(o.new_email=a?.newEmail,delete o.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:qC,redirectTo:n?.redirectTo})}catch(n){if(ee(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Zr})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,a,o,u,c,h,f;try{const g={nextPage:null,lastPage:0,total:0},m=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&a!==void 0?a:"",per_page:(u=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&u!==void 0?u:""},xform:mb});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(f=(h=m.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&f!==void 0?f:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);g[`${E}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(ee(g))return{data:{users:[]},error:g};throw g}}async getUserById(t){cr(t);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Zr})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){cr(t);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Zr})}catch(a){if(ee(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,n=!1){cr(t);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Zr})}catch(a){if(ee(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){cr(t.userId);try{const{data:n,error:a}=await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:n,error:a}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _deleteFactor(t){cr(t.userId),cr(t.id);try{return{data:await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,a,o,u,c,h,f;try{const g={nextPage:null,lastPage:0,total:0},m=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&a!==void 0?a:"",per_page:(u=(o=t?.perPage)===null||o===void 0?void 0:o.toString())!==null&&u!==void 0?u:""},xform:mb});if(m.error)throw m.error;const y=await m.json(),b=(c=m.headers.get("x-total-count"))!==null&&c!==void 0?c:0,_=(f=(h=m.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&f!==void 0?f:[];return _.length>0&&(_.forEach(w=>{const A=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(w.split(";")[1].split("=")[1]);g[`${E}Page`]=A}),g.total=parseInt(b)),{data:Object.assign(Object.assign({},y),g),error:null}}catch(g){if(ee(g))return{data:{clients:[]},error:g};throw g}}async _createOAuthClient(t){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{const a=this._encodePathSegment(t);return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${a}`,{body:n,headers:this.headers,xform:o=>({data:o,error:null})})}catch(a){if(ee(a))return{data:null,error:a};throw a}}async _deleteOAuthClient(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t?.type&&(n.type=t.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:a=>{var o;return{data:{providers:(o=a?.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(n){if(ee(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{const a=this._encodePathSegment(t);return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${a}`,{body:n,headers:this.headers,xform:o=>({data:o,error:null})})}catch(a){if(ee(a))return{data:null,error:a};throw a}}async _deleteCustomProvider(t){try{const n=this._encodePathSegment(t);return await re(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){On(this.experimental),cr(t.userId);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){On(this.experimental),cr(t.userId),cr(t.passkeyId);
39try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}}function yb(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Ln={debug:!!(globalThis&&I_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class H_ extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class vb extends H_{}async function ZC(e,t,n){Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const a=new globalThis.AbortController;let o;t>0&&(o=setTimeout(()=>{a.abort(),Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:a.signal},async u=>{if(u){clearTimeout(o),Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,u.name);try{return await n()}finally{Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,u.name)}}else{if(t===0)throw Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new vb(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Ln.debug)try{const c=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(c,null," "))}catch(c){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",c)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(o),await n()}})}catch(u){if(t>0&&clearTimeout(o),u!==null&&typeof u=="object"&&"name"in u&&u.name==="AbortError"&&t>0){if(a.signal.aborted)return Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async c=>{if(c){Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,c.name);try{return await n()}finally{Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,c.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Ln.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new vb(`Lock "${e}" was released because another request stole it`)}throw u}}function VC(){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 q_(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function KC(e){return parseInt(e,16)}function JC(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,a=>a.toString(16).padStart(2,"0")).join("")}function YC(e){var t;const{chainId:n,domain:a,expirationTime:o,issuedAt:u=new Date,nonce:c,notBefore:h,requestId:f,resources:g,scheme:m,uri:y,version:b}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!a)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(c&&c.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${c}`);if(!y)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 40`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const _=q_(e.address),w=m?`${m}://${a}`:a,A=e.statement?`${e.statement} 41`:"",E=`${w} wants you to sign in with your Ethereum account: 42${_} 43 44${A}`;let O=`URI: ${y} 45Version: ${b} 46Chain ID: ${n}${c?` 47Nonce: ${c}`:""} 48Issued At: ${u.toISOString()}`;
48if(o&&(O+=` 49Expiration Time: ${o.toISOString()}`),h&&(O+=` 50Not Before: ${h.toISOString()}`),f&&(O+=` 51Request ID: ${f}`),g){let N=` 52Resources:`;for(const j of g){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}`);N+=` 53- ${j}`}O+=N}return`${E} 54${O}`}class ft extends Error{constructor({message:t,code:n,cause:a,name:o}){var u;super(t,{cause:a}),this.__isWebAuthnError=!0,this.name=(u=o??(a instanceof Error?a.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class zu extends ft{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function QC({error:e,options:t}){var n,a,o;const{publicKey:u}=t;if(!u)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ft({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=u.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new ft({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((a=u.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new ft({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=u.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new ft({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 ft({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ft({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return u.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new ft({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ft({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 c=window.location.hostname;if(F_(c)){if(u.rp.id!==c)return new ft({message:`The RP ID "${u.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ft({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new ft({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 ft({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 ft({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function XC({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ft({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ft({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(F_(a)){if(n.rpId!==a)return new ft({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ft({message:`${window.location.hostname}
54 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ft({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 ft({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class WC{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const cf=new WC;function bb(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:a}=e,o=Ku(e,["challenge","user","excludeCredentials"]),u=Ga(t).buffer,c=Object.assign(Object.assign({},n),{id:Ga(n.id).buffer}),h=Object.assign(Object.assign({},o),{challenge:u,user:c});if(a&&a.length>0){h.excludeCredentials=new Array(a.length);for(let f=0;f<a.length;f++){const g=a[f];h.excludeCredentials[f]=Object.assign(Object.assign({},g),{id:Ga(g.id).buffer,type:g.type||"public-key",transports:g.transports})}}return h}function _b(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,a=Ku(e,["challenge","allowCredentials"]),o=Ga(t).buffer,u=Object.assign(Object.assign({},a),{challenge:o});if(n&&n.length>0){u.allowCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const h=n[c];u.allowCredentials[c]=Object.assign(Object.assign({},h),{id:Ga(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return u}function wb(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:zs(new Uint8Array(e.response.attestationObject)),clientDataJSON:zs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Sb(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,a=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:zs(new Uint8Array(o.authenticatorData)),clientDataJSON:zs(new Uint8Array(o.clientDataJSON)),signature:zs(new Uint8Array(o.signature)),userHandle:o.userHandle?zs(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:a,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function F_(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Nu(){var e,t;return!!(jt()&&"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 G_(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new zu("Browser returned unexpected credential type",t)}:{data:null,error:new zu("Empty credential response",t)}}catch(t){return{data:null,error:QC({error:t,options:e})}}}async function Z_(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new zu("Browser returned unexpected credential type",t)}:{data:null,error:new zu("Empty credential response",t)}}
54catch(t){return{data:null,error:XC({error:t,options:e})}}}const ej={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},tj={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Du(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),n=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),a={};for(const o of e)if(o)for(const u in o){const c=o[u];if(c!==void 0)if(Array.isArray(c))a[u]=c;else if(n(c))a[u]=c;else if(t(c)){const h=a[u];t(h)?a[u]=Du(h,c):a[u]=Du(c)}else a[u]=c}return a}function nj(e,t){return Du(ej,e,t||{})}function rj(e,t){return Du(tj,e,t||{})}class sj{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:a,signal:o},u){var c;try{const{data:h,error:f}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!h)return{data:null,error:f};const g=o??cf.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:m}=h.webauthn.credential_options.publicKey;if(!m.name){const y=a;if(y)m.name=`${m.id}:${y}`;else{const _=(await this.client.getUser()).data.user,w=((c=_?.user_metadata)===null||c===void 0?void 0:c.name)||_?.email||_?.id||"User";m.name=`${m.id}:${w}`}}m.displayName||(m.displayName=m.name)}switch(h.webauthn.type){case"create":{const m=nj(h.webauthn.credential_options.publicKey,u?.create),{data:y,error:b}=await G_({publicKey:m,signal:g});return y?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const m=rj(h.webauthn.credential_options.publicKey,u?.request),{data:y,error:b}=await Z_(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:m,signal:g}));return y?{data:{factorId:t,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(h){return ee(h)?{data:null,error:h}:{data:null,error:new kn("Unexpected error in challenge",h)}}}async _verify({challengeId:t,factorId:n,webauthn:a}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:a})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},u){if(!n)return{data:null,error:new Ja("rpId is required for WebAuthn authentication")};try{if(!Nu())return{data:null,error:new kn("Browser does not support WebAuthn",null)};const{data:c,error:h}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:a},signal:o},{request:u});if(!c)return{data:null,error:h};const{webauthn:f}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:f.type,rpId:n,rpOrigins:a,credential_response:f.credential_response}})}catch(c){return ee(c)?{data:null,error:c}:{data:null,error:new kn("Unexpected error in authenticate",c)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:a=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},u){if(!n)return{data:null,error:new Ja("rpId is required for WebAuthn registration")};try{if(!Nu())return{data:null,error:new kn("Browser does not support WebAuthn",null)};const{data:c,error:h}=await this._enroll({friendlyName:t});if(!c)return await this.client.mfa.listFactors().then(m=>{var y;return(y=m.data)===null||y===void 0?void 0:y.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m?.id}):void 0),{data:null,error:h};const{data:f,error:g}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:n,rpOrigins:a},signal:o},{create:u});return f?this._verify({factorId:c.id,challengeId:f.challengeId,webauthn:{rpId:n,rpOrigins:a,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:g}}catch(c){return ee(c)?{data:null,error:c}:{data:null,error:new kn("Unexpected error in register",c)}}}}VC();const aj={url:uC,storageKey:cC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:hC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Eb(e,t,n){return await n()}const Na={};class wo{get jwks(){var t,n;return(n=(t=Na[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Na[this.storageKey]=Object.assign(Object.assign({},Na[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Na[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Na[this.storageKey]=Object.assign(Object.assign({},Na[this.storageKey]),{cachedAt:t})}constructor(t){var n,a,o,u;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const c=Object.assign(Object.assign({},aj),t);
54if(this.storageKey=c.storageKey,this.instanceID=(n=wo.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,wo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!c.debug,typeof c.debug=="function"&&(this.logger=c.debug),this.instanceID>0&&jt()){const h=`${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(h),this.logDebugMessages&&console.trace(h)}if(this.persistSession=c.persistSession,this.autoRefreshToken=c.autoRefreshToken,this.experimental=(a=c.experimental)!==null&&a!==void 0?a:{},this.admin=new GC({url:c.url,headers:c.headers,fetch:c.fetch,experimental:this.experimental}),this.url=c.url,this.headers=c.headers,this.fetch=B_(c.fetch),this.lock=c.lock||Eb,this.detectSessionInUrl=c.detectSessionInUrl,this.flowType=c.flowType,this.hasCustomAuthorizationHeader=c.hasCustomAuthorizationHeader,this.throwOnError=c.throwOnError,this.lockAcquireTimeout=c.lockAcquireTimeout,c.lock?this.lock=c.lock:this.persistSession&&jt()&&(!((o=globalThis?.navigator)===null||o===void 0)&&o.locks)?this.lock=ZC:this.lock=Eb,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 sj(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(c.storage?this.storage=c.storage:I_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=yb(this.memoryStorage)),c.userStorage&&(this.userStorage=c.userStorage)):(this.memoryStorage={},this.storage=yb(this.memoryStorage)),jt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(h){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",h)}(u=this.broadcastChannel)===null||u===void 0||u.addEventListener("message",async h=>{this._debug("received broadcast notification from other tab or client",h);try{await this._notifyAllSubscribers(h.data.event,h.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}c.skipAutoInitialize||this.initialize().catch(h=>{this._debug("#initialize()","error",h)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${L_}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},a="none";if(jt()&&(n=RC(window.location.href),this._isImplicitGrantCallback(n)?a="implicit":await this._isPKCECallback(n)&&(a="pkce")),jt()&&this.detectSessionInUrl&&a!=="none"){const{data:o,error:u}=await this._getSessionFromURL(n,a);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),mC(u)){const f=(t=u.details)===null||t===void 0?void 0:t.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:c,redirectType:h}=o;return this._debug("#_initialize()","detected session in URL",c,"redirect type",h),await this._saveSession(c),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",c):await this._notifyAllSubscribers("SIGNED_IN",c)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ee(n)?this._returnResult({error:n}):this._returnResult({error:new kn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,a,o;try{const u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(n=t?.options)===null||n===void 0?void 0:n.data)!==null&&a!==void 0?a:{}
54,gotrue_meta_security:{captcha_token:(o=t?.options)===null||o===void 0?void 0:o.captchaToken}},xform:wn}),{data:c,error:h}=u;if(h||!c)return this._returnResult({data:{user:null,session:null},error:h});const f=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:g,session:f},error:null})}catch(u){if(ee(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(t){var n,a,o;try{let u;if("email"in t){const{email:m,password:y,options:b}=t;let _=null,w=null;this.flowType==="pkce"&&([_,w]=await za(this.storage,this.storageKey)),u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:m,password:y,data:(n=b?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:_,code_challenge_method:w},xform:wn})}else if("phone"in t){const{phone:m,password:y,options:b}=t;u=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:m,password:y,data:(a=b?.data)!==null&&a!==void 0?a:{},channel:(o=b?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:wn})}else throw new ou("You must provide either an email or phone number and a password");const{data:c,error:h}=u;if(h||!c)return await Ct(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});const f=c.session,g=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:g,session:f},error:null})}catch(u){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signInWithPassword(t){try{let n;if("email"in t){const{email:u,password:c,options:h}=t;n=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:gb})}else if("phone"in t){const{phone:u,password:c,options:h}=t;n=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:c,gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:gb})}else throw new ou("You must provide either an email or phone number and a password");const{data:a,error:o}=n;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!a||!a.session||!a.user){const u=new ja;return this._returnResult({data:{user:null,session:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:o})}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,a,o,u;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(u=t.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,a,o,u,c,h,f,g,m,y,b;let _,w;if("message"in t)_=t.message,w=t.signature;else{const{chain:A,wallet:E,statement:O,options:N}=t;let j;if(jt())if(typeof E=="object")j=E;else{const Y=window;if("ethereum"in Y&&typeof Y.ethereum=="object"&&"request"in Y.ethereum&&typeof Y.ethereum.request=="function")j=Y.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 E!="object"||!N?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=E}const D=new URL((n=N?.url)!==null&&n!==void 0?n:window.location.href),K=await j.request({method:"eth_requestAccounts"}).then(Y=>Y).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 J=q_(K[0]);let I=(a=N?.signInWithEthereum)===null||a===void 0?void 0:a.chainId;if(!I){const Y=await j.request({method:"eth_chainId"});I=KC(Y)}const F={domain:D.host,address:J,statement:O,uri:D.href,version:"1",chainId:I,nonce:(o=N?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(c=(u=N?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(h=N?.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(f=N?.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(g=N?.signInWithEthereum)===null||g===void 0?void 0:g.requestId,resources:(m=N?.signInWithEthereum)===null||m===void 0?void 0:m.resources};_=YC(F),w=await j.request({method:"personal_sign",params:[JC(_),J]})}try{const{data:A,error:E}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:w},!((y=t.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:wn});if(E)throw E;if(!A||!A.session||!A.user){const O=new ja;return this._returnResult({data:{user:null,session:null},error:O})}
54return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:E})}catch(A){if(ee(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(t){var n,a,o,u,c,h,f,g,m,y,b,_;let w,A;if("message"in t)w=t.message,A=t.signature;else{const{chain:E,wallet:O,statement:N,options:j}=t;let D;if(jt())if(typeof O=="object")D=O;else{const J=window;if("solana"in J&&typeof J.solana=="object"&&("signIn"in J.solana&&typeof J.solana.signIn=="function"||"signMessage"in J.solana&&typeof J.solana.signMessage=="function"))D=J.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 O!="object"||!j?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");D=O}const K=new URL((n=j?.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in D&&D.signIn){const J=await D.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j?.signInWithSolana),{version:"1",domain:K.host,uri:K.href}),N?{statement:N}:null));let I;if(Array.isArray(J)&&J[0]&&typeof J[0]=="object")I=J[0];else if(J&&typeof J=="object"&&"signedMessage"in J&&"signature"in J)I=J;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)w=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),A=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in D)||typeof D.signMessage!="function"||!("publicKey"in D)||typeof D!="object"||!D.publicKey||!("toBase58"in D.publicKey)||typeof D.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${K.host} wants you to sign in with your Solana account:`,D.publicKey.toBase58(),...N?["",N,""]:[""],"Version: 1",`URI: ${K.href}`,`Issued At: ${(o=(a=j?.signInWithSolana)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((u=j?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((c=j?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((h=j?.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((f=j?.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((g=j?.signInWithSolana)===null||g===void 0)&&g.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((y=(m=j?.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||y===void 0)&&y.length?["Resources",...j.signInWithSolana.resources.map(I=>`- ${I}`)]:[]].join(` 55`);const J=await D.signMessage(new TextEncoder().encode(w),"utf8");if(!J||!(J instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=J}}try{const{data:E,error:O}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:zs(A)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(_=t.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:wn});if(O)throw O;if(!E||!E.session||!E.user){const N=new ja;return this._returnResult({data:{user:null,session:null},error:N})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:O})}
55catch(E){if(ee(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const n=await As(this.storage,`${this.storageKey}-code-verifier`),[a,o]=(n??"").split("/");try{if(!a&&this.flowType==="pkce")throw new yC;const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:wn});if(await Ct(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!u||!u.session||!u.user){const h=new ja;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:o??null}),error:c})}catch(u){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(t){try{const{options:n,provider:a,token:o,access_token:u,nonce:c}=t,h=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:o,access_token:u,nonce:c,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:wn}),{data:f,error:g}=h;if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!f||!f.session||!f.user){const m=new ja;return this._returnResult({data:{user:null,session:null},error:m})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:g})}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,a,o,u,c;try{if("email"in t){const{email:h,options:f}=t;let g=null,m=null;this.flowType==="pkce"&&([g,m]=await za(this.storage,this.storageKey));const{error:y}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(n=f?.data)!==null&&n!==void 0?n:{},create_user:(a=f?.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},code_challenge:g,code_challenge_method:m},redirectTo:f?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:y})}if("phone"in t){const{phone:h,options:f}=t,{data:g,error:m}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(o=f?.data)!==null&&o!==void 0?o:{},create_user:(u=f?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:f?.captchaToken},channel:(c=f?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:g?.message_id},error:m})}throw new ou("You must provide either an email or phone number.")}catch(h){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(t){var n,a;try{let o,u;"options"in t&&(o=(n=t.options)===null||n===void 0?void 0:n.redirectTo,u=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:c,error:h}=await re(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:u}}),redirectTo:o,xform:wn});if(h)throw h;if(!c)throw new Error("An error occurred on token verification.");const f=c.session,g=c.user;return f?.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:g,session:f},error:null})}catch(o){if(ee(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var n,a,o,u,c;try{let h=null,f=null;this.flowType==="pkce"&&([h,f]=await za(this.storage,this.storageKey));const g=await re(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:(a=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&a!==void 0?a:void 0}
55),!((o=t?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:f}),headers:this.headers,xform:HC});return!((u=g.data)===null||u===void 0)&&u.url&&jt()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(g.data.url),this._returnResult(g)}catch(h){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:a}=t;if(a)throw a;if(!n)throw new wt;const{error:o}=await re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(ee(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:a,type:o,options:u}=t,{error:c}=await re(this.fetch,"POST",n,{headers:this.headers,body:{email:a,type:o,gotrue_meta_security:{captcha_token:u?.captchaToken}},redirectTo:u?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in t){const{phone:a,type:o,options:u}=t,{data:c,error:h}=await re(this.fetch,"POST",n,{headers:this.headers,body:{phone:a,type:o,gotrue_meta_security:{captcha_token:u?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:h})}throw new ou("You must provide either an email or phone number and a type")}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await a,await n()))();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 a=n();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await a}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await As(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Nd:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.userStorage){const c=await As(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Md()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=UC(t.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:u}=await this._callRefreshToken(t.refresh_token);return u?this._returnResult({data:{session:null},error:u}):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;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Zr}):await this._useSession(async n=>{var a,o,u;const{data:c,error:h}=n;if(h)throw h;return!(!((a=c.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new wt}:await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(o=c.session)===null||o===void 0?void 0:o.access_token)!==null&&u!==void 0?u:void 0,xform:Zr})})}catch(n){if(ee(n))return iu(n)&&(await this._removeSession(),await Ct(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async a=>{const{data:o,error:u}=a;if(u)throw u;if(!o.session)throw new wt;const c=o.session;let h=null,f=null;this.flowType==="pkce"&&t.email!=null&&([h,f]=await za(this.storage,this.storageKey));const{data:g,error:m}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:h,code_challenge_method:f}),jwt:c.access_token,xform:Zr});if(m)throw m;return c.user=g.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(a){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(a))return this._returnResult({data:{user:null},error:a});throw a}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new wt;const n=Date.now()/1e3;let a=n,o=!0,u=null;const{payload:c}=uu(t.access_token);if(c.exp&&(a=c.exp,o=a<=n),o){const{data:h,error:f}=await this._callRefreshToken(t.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!h)return{data:{user:null,session:null},error:null};u=h}else{const{data:h,error:f}=await this._getUser(t.access_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});u={access_token:t.access_token,refresh_token:t.refresh_token,user:h.user,token_type:"bearer",expires_in:a-n,expires_at:a},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(n){if(ee(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var a;if(!t){const{data:c,error:h}=n;if(h)throw h;t=(a=c.session)!==null&&a!==void 0?a:void 0}if(!t?.refresh_token)throw new wt;const{data:o,error:u}=await this._callRefreshToken(t.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ee(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var a;try{if(!jt())throw new lu("No browser detected.");
55if(t.error||t.error_description||t.error_code)throw new lu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new lb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new lu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new lb("No code detected.");const{data:j,error:D}=await this._exchangeCodeForSession(t.code);if(D)throw D;const K=new URL(window.location.href);return K.searchParams.delete("code"),window.history.replaceState(window.history.state,"",K.toString()),{data:{session:j.session,redirectType:(a=j.redirectType)!==null&&a!==void 0?a:null},error:null}}const{provider_token:o,provider_refresh_token:u,access_token:c,refresh_token:h,expires_in:f,expires_at:g,token_type:m}=t;if(!c||!f||!h||!m)throw new lu("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(f);let _=y+b;g&&(_=parseInt(g));const w=_-y;w*1e3<=La&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const A=_-b;y-A>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",A,_,y):y-A<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",A,_,y);const{data:E,error:O}=await this._getUser(c);if(O)throw O;const N={provider_token:o,provider_refresh_token:u,access_token:c,expires_in:b,expires_at:_,refresh_token:h,token_type:m,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:N,redirectType:t.type},error:null})}catch(o){if(ee(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_description)}async _isPKCECallback(t){const n=await As(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var a;const{data:o,error:u}=n;if(u&&!iu(u))return this._returnResult({error:u});const c=(a=o.session)===null||a===void 0?void 0:a.access_token;if(c){const{error:h}=await this.admin.signOut(c,t);if(h&&!(gC(h)&&(h.status===404||h.status===401||h.status===403)||iu(h)))return this._returnResult({error:h})}return t!=="others"&&(await this._removeSession(),await Ct(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=TC(),a={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,a),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async n=>{var a,o;try{const{data:{session:u},error:c}=n;if(c)throw c;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",t,"session",u)}catch(u){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",u),iu(u)?console.warn(u):console.error(u)}})}async resetPasswordForEmail(t,n={}){let a=null,o=null;this.flowType==="pkce"&&([a,o]=await za(this.storage,this.storageKey,!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:o,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(u){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(u))return this._returnResult({data:null,error:u});throw u}}async getUserIdentities(){var t;try{const{data:n,error:a}=await this.getUser();if(a)throw a;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:a,error:o}=await this._useSession(async u=>{var c,h,f,g,m;const{data:y,error:b}=u;if(b)throw b;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(c=t.options)===null||c===void 0?void 0:c.redirectTo,scopes:(h=t.options)===null||h===void 0?void 0:h.scopes,queryParams:(f=t.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:!0});return await re(this.fetch,"GET",_,{headers:this.headers,jwt:(m=(g=y.session)===null||g===void 0?void 0:g.access_token)!==null&&m!==void 0?m:void 0})});if(o)throw o;return jt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(a?.url),this._returnResult({data:{provider:t.provider,url:a?.url},error:null})}catch(a){if(ee(a))return this._returnResult({data:{provider:t.provider,url:null},error:a});throw a}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var a;try{const{error:o,data:{session:u}}=n;if(o)throw o;const{options:c,provider:h,token:f,access_token:g,nonce:m}=t,y=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(a=u?.access_token)!==null&&a!==void 0?a:void 0,body:{provider:h,id_token:f,access_token:g,nonce:m,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:wn}),{data:b,error:_}=y;return _?this._returnResult({data:{user:null,session:null},error:_}
55):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new ja}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:_}))}catch(o){if(await Ct(this.storage,`${this.storageKey}-code-verifier`),ee(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var a,o;const{data:u,error:c}=n;if(c)throw c;return await re(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(a=u.session)===null||a===void 0?void 0:a.access_token)!==null&&o!==void 0?o:void 0})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const a=Date.now();return await xC(async o=>(o>0&&await OC(200*Math.pow(2,o-1)),this._debug(n,"refreshing attempt",o),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:wn})),(o,u)=>{const c=200*Math.pow(2,o);return u&&Dd(u)&&Date.now()+c-a<La})}catch(a){if(this._debug(n,"error",a),ee(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",a),jt()&&!n.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t,n;const a="#_recoverAndRefresh()";this._debug(a,"begin");try{const o=await As(this.storage,this.storageKey);if(o&&this.userStorage){let c=await As(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:o.user},await Ua(this.userStorage,this.storageKey+"-user",c)),o.user=(t=c?.user)!==null&&t!==void 0?t:Md()}else if(o&&!o.user&&!o.user){const c=await As(this.storage,this.storageKey+"-user");c&&c?.user?(o.user=c.user,await Ct(this.storage,this.storageKey+"-user"),await Ua(this.storage,this.storageKey,o)):o.user=Md()}if(this._debug(a,"session from storage",o),!this._isValidSession(o)){this._debug(a,"session is not valid"),o!==null&&await this._removeSession();return}const u=((n=o.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Nd;if(this._debug(a,`session has${u?"":" not"} expired with margin of ${Nd}s`),u){if(this.autoRefreshToken&&o.refresh_token){const{error:c}=await this._callRefreshToken(o.refresh_token);c&&(console.error(c),Dd(c)||(this._debug(a,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:h}=await this._getUser(o.access_token);!h&&c?.user?(o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(a,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(a,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(a,"error",o),console.error(o);return}finally{this._debug(a,"end")}}async _callRefreshToken(t){var n,a;if(!t)throw new wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new Qu;const{data:u,error:c}=await this._refreshAccessToken(t);if(c)throw c;if(!u.session)throw new wt;await this._saveSession(u.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",u.session);const h={data:u.session,error:null};return this.refreshingDeferred.resolve(h),h}catch(u){if(this._debug(o,"error",u),ee(u)){const c={data:null,error:u};return Dd(u)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(c),c}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(u),u}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,n,a=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",n,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:n});const u=[],c=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(t,n)}catch(f){u.push(f)}});if(await Promise.all(c),u.length>0){for(let h=0;h<u.length;h+=1)console.error(u[h]);throw u[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Ct(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),a=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!a&&n.user&&await Ua(this.userStorage,this.storageKey+"-user",{user:n.user});const o=Object.assign({},n);delete o.user;const u=fb(o);await Ua(this.storage,this.storageKey,u)}else{const o=fb(n);await Ua(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ct(this.storage,this.storageKey),await Ct(this.storage,this.storageKey+"-code-verifier"),await Ct(this.storage,this.storageKey+"-user"),this.userStorage&&await Ct(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&jt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}
55catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),La);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:a}}=n;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((a.expires_at*1e3-t)/La);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${La}ms, refresh threshold is ${af} ticks`),o<=af&&await this._callRefreshToken(a.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof H_)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!jt()||!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 n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,a){const o=[`provider=${encodeURIComponent(n)}`];if(a?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a?.scopes&&o.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[u,c]=await za(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(c)}`});o.push(h.toString())}if(a?.queryParams){const u=new URLSearchParams(a.queryParams);o.push(u.toString())}return a?.skipBrowserRedirect&&o.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var a;const{data:o,error:u}=n;return u?this._returnResult({data:null,error:u}):await re(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var a,o;const{data:u,error:c}=n;if(c)return this._returnResult({data:null,error:c});const h=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:f,error:g}=await re(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(a=u?.session)===null||a===void 0?void 0:a.access_token});return g?this._returnResult({data:null,error:g}):(t.factorType==="totp"&&f.type==="totp"&&(!((o=f?.totp)===null||o===void 0)&&o.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var a;const{data:o,error:u}=n;if(u)return this._returnResult({data:null,error:u});const c=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?wb(t.webauthn.credential_response):Sb(t.webauthn.credential_response)})}:{code:t.code}),{data:h,error:f}=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:c,headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token});return f?this._returnResult({data:null,error:f}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:f}))})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var a;const{data:o,error:u}=n;if(u)return this._returnResult({data:null,error:u});const c=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(a=o?.session)===null||a===void 0?void 0:a.access_token});if(c.error)return c;const{data:h}=c;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:bb(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:_b(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:a}=await this._challenge({factorId:t.factorId});return a?this._returnResult({data:null,error:a}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:a}=await this.getUser();if(a)return{data:null,error:a};const o={all:[],phone:[],totp:[],webauthn:[]};for(const u of(t=n?.factors)!==null&&t!==void 0?t:[])o.all.push(u),u.status==="verified"&&o[u.factor_type].push(u);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,a,o,u;if(t)try{const{payload:_}=uu(t);let w=null;_.aal&&(w=_.aal);let A=w;const{data:{user:E},error:O}=await this.getUser(t);if(O)return this._returnResult({data:null,error:O});((a=(n=E?.factors)===null||n===void 0?void 0:n.filter(D=>D.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(A="aal2");const j=_.amr||[];return{data:{currentLevel:w,nextLevel:A,currentAuthenticationMethods:j},error:null}}catch(_){if(ee(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:c},error:h}
55=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:f}=uu(c.access_token);let g=null;f.aal&&(g=f.aal);let m=g;((u=(o=c.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(m="aal2");const b=f.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;return o?this._returnResult({data:null,error:o}):a?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:a.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new wt})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async a=>{const{data:{session:o},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!o)return this._returnResult({data:null,error:new wt});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return c.data&&c.data.redirect_url&&jt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(ee(a))return this._returnResult({data:null,error:a});throw a}}async _denyAuthorization(t,n){try{return await this._useSession(async a=>{const{data:{session:o},error:u}=a;if(u)return this._returnResult({data:null,error:u});if(!o)return this._returnResult({data:null,error:new wt});const c=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return c.data&&c.data.redirect_url&&jt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(a){if(ee(a))return this._returnResult({data:null,error:a});throw a}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:a}=t;return a?this._returnResult({data:null,error:a}):n?await re(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new wt})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;return o?this._returnResult({data:null,error:o}):a?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new wt})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let a=n.keys.find(h=>h.kid===t);if(a)return a;const o=Date.now();if(a=this.jwks.keys.find(h=>h.kid===t),a&&this.jwks_cached_at+fC>o)return a;const{data:u,error:c}=await re(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=o,a=u.keys.find(h=>h.kid===t),!a)?null:a}async getClaims(t,n={}){try{let a=t;if(!a){const{data:_,error:w}
55=await this.getSession();if(w||!_.session)return this._returnResult({data:null,error:w});a=_.session.access_token}const{header:o,payload:u,signature:c,raw:{header:h,payload:f}}=uu(a);n?.allowExpired||MC(u.exp);const g=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!g){const{error:_}=await this.getUser(a);if(_)throw _;return{data:{claims:u,header:o,signature:c},error:null}}const m=PC(o.alg),y=await crypto.subtle.importKey("jwk",g,m,!0,["verify"]);if(!await crypto.subtle.verify(m,y,c,SC(`${h}.${f}`)))throw new uf("Invalid JWT signature");return{data:{claims:u,header:o,signature:c},error:null}}catch(a){if(ee(a))return this._returnResult({data:null,error:a});throw a}}async signInWithPasskey(t){var n,a,o;On(this.experimental);try{if(!Nu())return this._returnResult({data:null,error:new kn("Browser does not support WebAuthn",null)});const{data:u,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}});if(c||!u)return this._returnResult({data:null,error:c});const h=_b(u.options),f=(o=(a=t?.options)===null||a===void 0?void 0:a.signal)!==null&&o!==void 0?o:cf.createNewAbortSignal(),{data:g,error:m}=await Z_({publicKey:h,signal:f});if(m||!g)return this._returnResult({data:null,error:m??new kn("WebAuthn ceremony failed",null)});const y=Sb(g);return this._verifyPasskeyAuthentication({challengeId:u.challenge_id,credential:y})}catch(u){if(ee(u))return this._returnResult({data:null,error:u});throw u}}async registerPasskey(t){var n,a;On(this.experimental);try{if(!Nu())return this._returnResult({data:null,error:new kn("Browser does not support WebAuthn",null)});const{data:o,error:u}=await this._startPasskeyRegistration();if(u||!o)return this._returnResult({data:null,error:u});const c=bb(o.options),h=(a=(n=t?.options)===null||n===void 0?void 0:n.signal)!==null&&a!==void 0?a:cf.createNewAbortSignal(),{data:f,error:g}=await G_({publicKey:c,signal:h});if(g||!f)return this._returnResult({data:null,error:g??new kn("WebAuthn ceremony failed",null)});const m=wb(f);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:m})}catch(o){if(ee(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){On(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!n)return this._returnResult({data:null,error:new wt});const{data:o,error:u}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:o,error:null})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){On(this.experimental);try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new wt});const{data:u,error:c}=await re(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:a.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;On(this.experimental);try{const{data:a,error:o}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})}catch(a){if(ee(a))return this._returnResult({data:null,error:a});throw a}}async _verifyPasskeyAuthentication(t){On(this.experimental);try{const{data:n,error:a}=await re(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:wn});return a?this._returnResult({data:null,error:a}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){On(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:a}=t;if(a)return this._returnResult({data:null,error:a});if(!n)return this._returnResult({data:null,error:new wt});const{data:o,error:u}=await re(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:c=>({data:c,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:o,error:null})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){On(this.experimental);try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;
55if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new wt});const{data:u,error:c}=await re(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,body:{friendly_name:t.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:u,error:null})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){On(this.experimental);try{return await this._useSession(async n=>{const{data:{session:a},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!a)return this._returnResult({data:null,error:new wt});const{error:u}=await re(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:a.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}}wo.nextInstanceID={};const ij=wo,oj="2.106.2";let io="";typeof Deno<"u"?io="deno":typeof document<"u"?io="web":typeof navigator<"u"&&navigator.product==="ReactNative"?io="react-native":io="node";const lj={"X-Client-Info":`supabase-js-${io}/${oj}`},uj={headers:lj},cj={schema:"public"},hj={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},dj={},fj={enabled:!1,respectSamplingDecision:!0};function pj(e,t,n,a){function o(u){return u instanceof n?u:new n(function(c){c(u)})}return new(n||(n=Promise))(function(u,c){function h(m){try{g(a.next(m))}catch(y){c(y)}}function f(m){try{g(a.throw(m))}catch(y){c(y)}}function g(m){m.done?u(m.value):o(m.value).then(h,f)}g((a=a.apply(e,[])).next())})}let Ld=null;const gj="@opentelemetry/api";function mj(){return Ld===null&&(Ld=import(gj).catch(()=>null)),Ld}function yj(){return pj(this,void 0,void 0,function*(){try{const e=yield mj();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function vj(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,a,o,u]=t;if(n.length!==2||a.length!==32||o.length!==16||u.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(n)||!c.test(a)||!c.test(o)||!c.test(u)||a==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:n,traceId:a,parentId:o,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function bj(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const a of t)try{if(typeof a=="string"){if(_j(n.hostname,a))return!0}else if(a instanceof RegExp){if(a.test(n.hostname))return!0}else if(typeof a=="function"&&a(n))return!0}catch{continue}return!1}function _j(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function wj(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function So(e){"@babel/helpers - typeof";return So=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},So(e)}function Sj(e,t){if(So(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(So(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ej(e){var t=Sj(e,"string");return So(t)=="symbol"?t:t+""}function Tj(e,t,n){return(t=Ej(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
55t%2?Tb(Object(n),!0).forEach(function(a){Tj(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tb(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}const Rj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Aj=()=>Headers,Oj=(e,t,n,a,o)=>{const u=Rj(a),c=Aj(),h=o?.enabled===!0,f=o?.respectSamplingDecision!==!1,g=h?wj(t):null;return async(m,y)=>{var b;const _=(b=await n())!==null&&b!==void 0?b:e;let w=new c(y?.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${_}`),g){const A=await xj(m,g,f);A&&(A.traceparent&&!w.has("traceparent")&&w.set("traceparent",A.traceparent),A.tracestate&&!w.has("tracestate")&&w.set("tracestate",A.tracestate),A.baggage&&!w.has("baggage")&&w.set("baggage",A.baggage))}return u(m,nt(nt({},y),{},{headers:w}))}};async function xj(e,t,n){if(!bj(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const a=await yj();if(!a||!a.traceparent)return null;if(n){const o=vj(a.traceparent);if(o&&!o.isSampled)return null}return a}function Rb(e){return typeof e=="boolean"?{enabled:e}:e}function kj(e){return e.endsWith("/")?e:e+"/"}function Cj(e,t){var n,a,o,u,c,h;const{db:f,auth:g,realtime:m,global:y}=e,{db:b,auth:_,realtime:w,global:A}=t,E=Rb(e.tracePropagation),O=Rb(t.tracePropagation),N={db:nt(nt({},b),f),auth:nt(nt({},_),g),realtime:nt(nt({},w),m),storage:{},global:nt(nt(nt({},A),y),{},{headers:nt(nt({},(n=A?.headers)!==null&&n!==void 0?n:{}),(a=y?.headers)!==null&&a!==void 0?a:{})}),tracePropagation:{enabled:(o=(u=E?.enabled)!==null&&u!==void 0?u:O?.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(c=(h=E?.respectSamplingDecision)!==null&&h!==void 0?h:O?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?N.accessToken=e.accessToken:delete N.accessToken,N}function jj(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(kj(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var zj=class extends ij{constructor(e){super(e)}},Nj=class{constructor(e,t,n){var a,o;this.supabaseUrl=e,this.supabaseKey=t;const u=jj(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const c=`sb-${u.hostname.split(".")[0]}-auth-token`,h={db:cj,realtime:dj,auth:nt(nt({},hj),{},{storageKey:c}),global:uj,tracePropagation:fj},f=Cj(n??{},h);if(this.settings=f,this.storageKey=(a=f.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken)this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(m,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}});else{var g;this.auth=this._initSupabaseAuthClient((g=f.auth)!==null&&g!==void 0?g:{},this.headers,f.global.fetch)}this.fetch=Oj(t,e,this._getAccessToken.bind(this),f.global.fetch,f.tracePropagation),this.realtime=this._initRealtimeClient(nt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},f.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(m=>this.realtime.setAuth(m)).catch(m=>console.warn("Failed to set initial Realtime auth token:",m)),this.rest=new Jx(new URL("rest/v1",u).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch,timeout:f.db.timeout,urlLengthLimit:f.db.urlLengthLimit}),this.storage=new lC(this.storageUrl.href,this.headers,this.fetch,n?.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new $x(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
55channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:a}=await e.auth.getSession();return(t=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:a,userStorage:o,storageKey:u,flowType:c,lock:h,debug:f,throwOnError:g,experimental:m,lockAcquireTimeout:y,skipAutoInitialize:b},_,w){const A={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new zj({url:this.authUrl.href,headers:nt(nt({},A),_),storageKey:u,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:a,userStorage:o,flowType:c,lock:h,debug:f,throwOnError:g,experimental:m,fetch:w,lockAcquireTimeout:y,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new jk(this.realtimeUrl.href,nt(nt({},e),{},{params:nt(nt({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t?.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Dj=(e,t,n)=>new Nj(e,t,n);function Mj(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}Mj()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function Pj(){return Dj("https://rdmpzvrpqcumjpujgmam.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJkbXB6dnJwcWN1bWpwdWpnbWFtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODAyOTc2MjksImV4cCI6MjA5NTg3MzYyOX0.KHwSUbrVig6ioqzEdw6rL842zgTrI_i6bka2stlFWoc",{auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}})}let Ud;const Lj=new Proxy({},{get(e,t,n){return Ud||(Ud=Pj()),Reflect.get(Ud,t,n)}}),Uj=js({type:"function"}).client(async({next:e})=>{const{data:t}=await Lj.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),$j=js(),Ab=Mx(()=>({functionMiddleware:[Uj],requestMiddleware:[$j]}));var jo=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(){}},Ij=class extends jo{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=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"}},Lf=new Ij,Bj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Hj=class{#e=Bj;#t=!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)}},Ns=new Hj;function qj(e){setTimeout(e,0)}var Fj=typeof window>"u"||"Deno"in globalThis;function Jt(){}function Gj(e,t){return typeof e=="function"?e(t):e}function hf(e){return typeof e=="number"&&e>=0&&e!==1/0}function V_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xr(e,t){return typeof e=="function"?e(t):e}function un(e,t){return typeof e=="function"?e(t):e}function Ob(e,t){const{type:n="all",exact:a,fetchStatus:o,predicate:u,queryKey:c,stale:h}=e;if(c){if(a){if(t.queryHash!==Uf(c,t.options))return!1}else if(!To(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||o&&o!==t.state.fetchStatus||u&&!u(t))}function xb(e,t){const{exact:n,status:a,predicate:o,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(n){if(Eo(t.options.mutationKey)!==Eo(u))return!1}
vendor: 29,554 bytes, line 55
55else if(!To(t.options.mutationKey,u))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function Uf(e,t){return(t?.queryKeyHashFn||Eo)(e)}function Eo(e){return JSON.stringify(e,(t,n)=>ff(n)?Object.keys(n).sort().reduce((a,o)=>(a[o]=n[o],a),{}):n)}function To(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>To(e[n],t[n])):!1}var Zj=Object.prototype.hasOwnProperty;function K_(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=kb(e)&&kb(t);if(!a&&!(ff(e)&&ff(t)))return t;const u=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),h=c.length,f=a?new Array(h):{};let g=0;for(let m=0;m<h;m++){const y=a?m:c[m],b=e[y],_=t[y];if(b===_){f[y]=b,(a?m<u:Zj.call(e,y))&&g++;continue}if(b===null||_===null||typeof b!="object"||typeof _!="object"){f[y]=_;continue}const w=K_(b,_,n+1);f[y]=w,w===b&&g++}return u===h&&g===u?e:f}function df(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function kb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ff(e){if(!Cb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Cb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cb(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vj(e){return new Promise(t=>{Ns.setTimeout(t,e)})}function pf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?K_(e,t):t}function Kj(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function Jj(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var $f=Symbol();function J_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===$f?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Y_(e,t){return typeof e=="function"?e(...t):!!e}function Yj(e,t,n){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Ro=(()=>{let e=()=>Fj;return{isServer(){return e()},setIsServer(t){e=t}}})();function gf(){let e,t;const n=new Promise((o,u)=>{e=o,t=u});n.status="pending",n.catch(()=>{});function a(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},n.reject=o=>{a({status:"rejected",reason:o}),t(o)},n}var Qj=qj;function Xj(){let e=[],t=0,n=h=>{h()},a=h=>{h()},o=Qj;const u=h=>{t?e.push(h):o(()=>{n(h)})},c=()=>{const h=e;e=[],h.length&&o(()=>{a(()=>{h.forEach(f=>{n(f)})})})};return{batch:h=>{let f;t++;try{f=h()}finally{t--,t||c()}return f},batchCalls:h=>(...f)=>{u(()=>{h(...f)})},schedule:u,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{o=h}}}var zt=Xj(),Wj=class extends jo{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Mu=new Wj;function e2(e){return Math.min(1e3*2**e,3e4)}function Q_(e){return(e??"online")==="online"?Mu.isOnline():!0}var mf=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function X_(e){let t=!1,n=0,a;const o=gf(),u=()=>o.status!=="pending",c=A=>{if(!u()){const E=new mf(A);b(E),e.onCancel?.(E)}},h=()=>{t=!0},f=()=>{t=!1},g=()=>Lf.isFocused()&&(e.networkMode==="always"||Mu.isOnline())&&e.canRun(),m=()=>Q_(e.networkMode)&&e.canRun(),y=A=>{u()||(a?.(),o.resolve(A))},b=A=>{u()||(a?.(),o.reject(A))},_=()=>new Promise(A=>{a=E=>{(u()||g())&&A(E)},e.onPause?.()}).then(()=>{a=void 0,u()||e.onContinue?.()}),w=()=>{if(u())return;let A;const E=n===0?e.initialPromise:void 0;try{A=E??e.fn()}catch(O){A=Promise.reject(O)}Promise.resolve(A).then(y).catch(O=>{if(u())return;const N=e.retry??(Ro.isServer()?0:3),j=e.retryDelay??e2,D=typeof j=="function"?j(n,O):j,K=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,O);if(t||!K){b(O);return}n++,e.onFail?.(n,O),Vj(D).then(()=>g()?void 0:_()).then(()=>{t?b(O):w()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(a?.(),o),cancelRetry:h,continueRetry:f,canStart:m,start:()=>(m()?w():_().then(w),o)}}var W_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hf(this.gcTime)&&(this.#e=Ns.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ro.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ns.clearTimeout(this.#e),this.#e=void 0)}},t2=class extends W_{#e;#t;#n;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=zb(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=zb(this.options);t.data!==void 0&&(this.setState(jb(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=pf(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Jt).catch(Jt):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=>un(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$f||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Xr(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:!V_(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.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.#r&&(this.#a||this.#o()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#o(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const h=J_(this.options,t),g=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return a(m),m})();return this.#a=!1,this.options.persister?this.options.persister(h,g,this):h(g)},c=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return a(h),h})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=X_({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof mf&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(h,f)=>{this.#l({type:"failed",failureCount:h,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof mf){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...ew(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...jb(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),zt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function ew(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Q_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var n2=class extends jo{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=gf(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#i;#a;#o;#l;#f;#p;#c;#h;#u;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Nb(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof un(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!df(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Db(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||un(this.options.enabled,this.#t)!==un(t.enabled,this.#t)||Xr(this.options.staleTime,this.#t)!==Xr(t.staleTime,this.#t))&&this.#m();const o=this.#y();a&&(this.#t!==n||un(this.options.enabled,this.#t)!==un(t.enabled,this.#t)||o!==this.#u)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return s2(this,n)&&(this.#s=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#g.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Jt)),t}#m(){this.#_();const e=Xr(this.options.staleTime,this.#t);if(Ro.isServer()||this.#s.isStale||!hf(e))return;const n=V_(this.#s.dataUpdatedAt,e)+1;this.#c=Ns.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#u=e,!(Ro.isServer()||un(this.options.enabled,this.#t)===!1||!hf(this.#u)||this.#u===0)&&(this.#h=Ns.setInterval(()=>{(this.options.refetchIntervalInBackground||Lf.isFocused())&&this.#d()},this.#u))}#b(){this.#m(),this.#v(this.#y())}#_(){this.#c!==void 0&&(Ns.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#h!==void 0&&(Ns.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#t,a=this.options,o=this.#s,u=this.#r,c=this.#i,f=e!==n?e.state:this.#n,{state:g}=e;let m={...g},y=!1,b;if(t._optimisticResults){const F=this.hasListeners(),Y=!F&&Nb(e,t),oe=F&&Db(e,n,t,a);(Y||oe)&&(m={...m,...ew(g.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:_,errorUpdatedAt:w,status:A}=m;b=m.data;let E=!1;if(t.placeholderData!==void 0&&b===void 0&&A==="pending"){let F;o?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(F=o.data,E=!0):F=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,F!==void 0&&(A="success",b=pf(o?.data,F,t),y=!0)}if(t.select&&b!==void 0&&!E)if(o&&b===u?.data&&t.select===this.#l)b=this.#f;else try{this.#l=t.select,b=t.select(b),b=pf(o?.data,b,t),this.#f=b,this.#o=null}catch(F){this.#o=F}this.#o&&(_=this.#o,b=this.#f,w=Date.now(),A="error");const O=m.fetchStatus==="fetching",N=A==="pending",j=A==="error",D=N&&O,K=b!==void 0,I={status:A,fetchStatus:m.fetchStatus,isPending:N,isSuccess:A==="success",isError:j,isInitialLoading:D,isLoading:D,data:b,dataUpdatedAt:m.dataUpdatedAt,error:_,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:O,isRefetching:O&&!N,isLoadingError:j&&!K,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:j&&K,isStale:If(e,t),refetch:this.refetch,promise:this.#a,isEnabled:un(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const F=I.data!==void 0,Y=I.status==="error"&&!F,oe=Te=>{Y?Te.reject(I.error):F&&Te.resolve(I.data)},se=()=>{const Te=this.#a=I.promise=gf();oe(Te)},ge=this.#a;switch(ge.status){case"pending":e.queryHash===n.queryHash&&oe(ge);break;case"fulfilled":(Y||I.data!==ge.value)&&se();break;case"rejected":(!Y||I.error!==ge.reason)&&se();break}}return I}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),df(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#g.size)return!0;const u=new Set(o??this.#g);return this.options.throwOnError&&u.add("error"),Object.keys(this.#s).some(c=>{const h=c;return this.#s[h]!==e[h]&&u.has(h)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){zt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function r2(e,t){return un(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&un(t.retryOnMount,e)===!1)}function Nb(e,t){return r2(e,t)||e.state.data!==void 0&&yf(e,t,t.refetchOnMount)}function yf(e,t,n){if(un(t.enabled,e)!==!1&&Xr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&If(e,t)}return!1}function Db(e,t,n,a){return(e!==t||un(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&If(e,n)}function If(e,t){return un(t.enabled,e)!==!1&&e.isStaleByTime(Xr(t.staleTime,e))}function s2(e,t){return!df(e.getCurrentResult(),t)}function Mb(e){return{onFetch:(t,n)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let h={pages:[],pageParams:[]},f=0;const g=async()=>{let m=!1;const y=w=>{Yj(w,()=>t.signal,()=>m=!0)},b=J_(t.options,t.fetchOptions),_=async(w,A,E)=>{if(m)return Promise.reject();if(A==null&&w.pages.length)return Promise.resolve(w);const N=(()=>{const J={client:t.client,queryKey:t.queryKey,pageParam:A,direction:E?"backward":"forward",meta:t.options.meta};return y(J),J})(),j=await b(N),{maxPages:D}=t.options,K=E?Jj:Kj;return{pages:K(w.pages,j,D),pageParams:K(w.pageParams,A,D)}};if(o&&u.length){const w=o==="backward",A=w?a2:Pb,E={pages:u,pageParams:c},O=A(a,E);h=await _(E,O,w)}else{const w=e??u.length;do{const A=f===0?c[0]??a.initialPageParam:Pb(a,h);if(f>0&&A==null)break;h=await _(h,A),f++}while(f<w)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=g}}}function Pb(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function a2(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var i2=class extends W_{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||o2(),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.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=X_({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#s.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:o})}const u=await this.#s.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,n),await this.options.onSuccess?.(u,e,this.state.context,n),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(u,null,e,this.state.context,n),this.#r({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),zt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function o2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var l2=class extends jo{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new i2({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=cu(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=cu(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=cu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=cu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){zt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>xb(t,n))}findAll(e={}){return this.getAll().filter(t=>xb(e,t))}notify(e){zt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return zt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Jt))))}};function cu(e){return e.options.scope?.id}var u2=class extends jo{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,o=t.queryHash??Uf(a,t);let u=this.get(o);return u||(u=new t2({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(u)),u}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(){zt.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(n=>Ob(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ob(e,n)):t}notify(e){zt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){zt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){zt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},c2=class{#e;#t;#n;#s;#r;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new u2,this.#t=e.mutationCache||new l2,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Lf.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Mu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.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),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(a.queryHash)?.state.data,c=Gj(t,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return zt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;zt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return zt.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=zt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(a).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return zt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=zt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let u=o.fetch(void 0,n);return n.throwOnError||(u=u.catch(Jt)),o.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Xr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=Mb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=Mb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(Eo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(a=>{To(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Eo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{To(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Uf(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===$f&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},tw=X.createContext(void 0),h2=e=>{const t=X.useContext(tw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},d2=({client:e,children:t})=>(X.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),z.jsx(tw.Provider,{value:e,children:t})),nw=X.createContext(!1),f2=()=>X.useContext(nw);nw.Provider;function p2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
55var g2=X.createContext(p2()),m2=()=>X.useContext(g2),y2=(e,t,n)=>{const a=n?.state.error&&typeof e.throwOnError=="function"?Y_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},v2=e=>{X.useEffect(()=>{e.clearReset()},[e])},b2=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||Y_(n,[e.error,a])),jU=(e,t)=>t.state.data===void 0,_2=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>n(a(...o)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},w2=(e,t)=>e.isLoading&&e.isFetching&&!t,S2=(e,t)=>e?.suspense&&t.isPending,Lb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function E2(e,t,n){const a=f2(),o=m2(),u=h2(),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const h=u.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",_2(c),y2(c,o,h),v2(o);const f=!u.getQueryCache().get(c.queryHash),[g]=X.useState(()=>new t(u,c)),m=g.getOptimisticResult(c),y=!a&&e.subscribed!==!1;if(X.useSyncExternalStore(X.useCallback(b=>{const _=y?g.subscribe(zt.batchCalls(b)):Jt;return g.updateResult(),_},[g,y]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),X.useEffect(()=>{g.setOptions(c)},[c,g]),S2(c,m))throw Lb(c,g,o);if(b2({result:m,errorResetBoundary:o,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw m.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!Ro.isServer()&&w2(m,a)&&(f?Lb(c,g,o):h?.promise)?.catch(Jt).finally(()=>{g.updateResult()}),c.notifyOnChangeProps?m:g.trackResult(m)}function T2(e,t){return E2(e,n2)}const R2="/assets/styles-CDMZE3gy.css";function A2(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"})}const rw=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const O2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const x2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const Ub=e=>{const t=x2(e);return t.charAt(0).toUpperCase()+t.slice(1)};var k2={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 C2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const j2=X.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:o="",children:u,iconNode:c,...h},f)=>X.createElement("svg",{ref:f,...k2,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:rw("lucide",o),...!u&&!C2(h)&&{"aria-hidden":"true"},...h},[...c.map(([g,m])=>X.createElement(g,m)),...Array.isArray(u)?u:[u]]));const Xa=(e,t)=>{const n=X.forwardRef(({className:a,...o},u)=>X.createElement(j2,{ref:u,iconNode:t,className:rw(`lucide-${O2(Ub(e))}`,`lucide-${e}`,a),...o}));return n.displayName=Ub(e),n};const z2=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],N2=Xa("facebook",z2);const D2=[["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"}]],M2=Xa("mail",D2);const P2=[["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"}]],L2=Xa("map-pin",P2);const U2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],$2=Xa("menu",U2);const I2=[["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"}]],Bf=Xa("phone",I2);const B2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
55],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],H2=Xa("x",B2),q2="/__l5e/assets-v1/3bb42e8c-4350-499c-98f1-6687e0c76cda/groundwater-logo.png",F2={url:q2};function sw({className:e="h-12 w-auto"}){return z.jsx(It,{to:"/",className:"inline-flex items-center","aria-label":"Groundwater Inc. home",children:z.jsx("img",{src:F2.url,alt:"Groundwater Inc. â Sioux Falls landscape & irrigation",className:e,width:300,height:100})})}const G2="/assets/service-design-DwUjkK_e.jpg",Z2="/assets/service-install-C5-J_CPT.jpg",V2="/assets/service-plants-CaVek7MV.jpg",K2="/assets/service-patio-DTOZZLv_.jpg",J2="/assets/service-water-BNE4B67D.jpg",Y2="/assets/service-irrigation-BsW1_PU2.jpg",ye={name:"Groundwater Inc.",phone:"605.370.3722",phoneHref:"tel:+16053703722",email:"[email protected]",address:{line1:"927 E 8th St, Ste 01",city:"Sioux Falls",state:"SD",zip:"57103"},hours:"Mon â Fri · 8a â 6p",hoursWeekend:"Sat â Sun · Closed",mapsHref:"https://www.google.com/maps/search/?api=1&query="+encodeURIComponent("Groundwater Inc. 927 E 8th St, Ste 01, Sioux Falls, SD 57103"),social:{facebook:"https://www.facebook.com/groundwaterlandscape"},yearsExperience:50,serviceArea:"Sioux Falls metro & the Sioux Empire region"},vf=[{label:"Services",to:"/services"},{label:"Service Areas",to:"/landscaping"},{label:"Gallery",to:"/gallery"},{label:"About",to:"/about"},{label:"Resources",to:"/blog"},{label:"Contact",to:"/contact"}],aw=[{slug:"landscape-design",title:"Landscape Design",short:"A plan you can see before a single shovel breaks ground.",blurb:"We start every project with a thoughtful, site-specific plan â grading, sightlines, soil, water, plant succession. You see exactly how the yard will live before we build it.",image:G2,included:["On-site consultation & measure","2D plan view + 3D concept renderings","Plant palette tailored to your light & soil","Hardscape, lighting & water-feature layout","Phased budget so you can build over time"],faqs:[{q:"How long does a design take?",a:"Most residential designs are ready in 2â3 weeks from the on-site consult."},{q:"Can I use the design with another contractor?",a:"Yes â the design is yours. Most clients choose us for install because we drew it, but you're never locked in."}]},{slug:"landscape-installation",title:"Landscape Installation",short:"From bare dirt to finished landscape â handled end-to-end.",blurb:"Grading, sod, seed, beds, trees, edging, mulch, lighting. We sequence the work so your yard is usable as fast as possible and built to last decades.",image:Z2,included:["Site prep, grading & drainage correction","Sod or hydro-seed lawn installation","Bed shaping, soil amendment, edging","Tree, shrub & perennial planting","Mulch, river-rock & decorative stone"],faqs:[{q:"When can you start?",a:"We typically book 2â6 weeks out depending on season. Spring and fall fill up first."},{q:"Do you warranty plant material?",a:"Yes. Trees and shrubs we install are covered for one full growing season."}]},{slug:"plants-trees-shrubs",title:"Plants, Trees & Shrubs",short:"Picks that actually thrive through a South Dakota winter.",blurb:"Fifty years on the prairie taught us which plants live and which don't. We specify hardy, four-season specimens that look intentional today and grow into the design for years.",image:V2,included:["Native & adapted plant selection","Mature shade & ornamental tree installs","Foundation shrubs & screening hedges","Perennial beds with season-long color","Pollinator & low-water options"],faqs:[{q:"What zone is Sioux Falls?",a:"USDA hardiness zone 4b. We stick to zone 3â4 reliable plants so your investment survives."}]},{slug:"patios-fire-pits",title:"Patios & Fire Pits",short:"Outdoor rooms that get used three seasons of the year.",blurb:"Paver and natural-stone patios, seat walls, fire pits, outdoor kitchens. Built on properly compacted base so they stay flat and level â not the heaved mess you've seen elsewhere.",image:K2,included:["Paver, flagstone & travertine patios","Gas and wood-burning fire pits","Seat walls & pillar accents","Outdoor kitchens & pergolas","Low-voltage landscape lighting"],faqs:[{q:"Will it crack or shift?",a:`Not when it's built right. We over-excavate, install 6" of compacted base, and edge restraint every install â that's why ours stay put.`}]},{slug:"water-features",title:"Water Features",short:"Ponds, waterfalls and bubblers that sound as good as they look.",blurb:"From a quiet bubbling boulder to a full koi pond with cascading waterfall â engineered with the right liner, pump and biofilter so it's easy to live with year-round.",image:J2,included:["Pondless waterfalls & disappearing fountains","Koi & ecosystem ponds","Bubbling boulders & urn fountains","Stream beds & cascades","Winterization & annual service"],faqs:[{q:"Is a water feature a lot of work?",a:"Pondless features are nearly zero-maintenance. Ecosystem ponds need about an hour a month once established."}]},{slug:"irrigation-systems",title:"Irrigation Systems",short:"Smart sprinklers that water the lawn â not the sidew
55alk.",blurb:"Zoned, weather-aware irrigation designed around your property's pressure, sun and soil. We install, service, winterize, and bring old systems back to life.",image:Y2,included:["New system design & install","Wi-Fi & weather-based controllers","Drip irrigation for beds & containers","Spring start-up & blow-outs","Repairs, audits & system upgrades"],faqs:[{q:"Do you service systems you didn't install?",a:"Absolutely. We repair, upgrade and winterize systems from any installer."}]}],zU=[{quote:"Groundwater took our blank, sloped backyard and turned it into the spot the whole neighborhood wants to be at. Crew was on-time every single day.",name:"Sarah & Mike R.",location:"Sioux Falls, SD"},{quote:"We've worked with three landscapers over the years. Groundwater is the only one we'll call again. The plan they drew up was exactly what we couldn't articulate ourselves.",name:"David L.",location:"Brandon, SD"},{quote:"Patio looks even better five years in than the day it was built. Not a single paver has shifted. That tells you everything.",name:"Jennifer K.",location:"Harrisburg, SD"},{quote:"Honest pricing, beautiful work, and they actually pick up the phone. Rare combo these days.",name:"Tom & Beth W.",location:"Tea, SD"}],NU=[{q:"What areas do you serve?",a:"Sioux Falls and the surrounding Sioux Empire â Brandon, Harrisburg, Tea, Hartford, Crooks, Dell Rapids and points between."},{q:"How does pricing work?",a:"Every project gets a free on-site consult. We provide a detailed written estimate within a week â no high-pressure sales, no surprise add-ons."},{q:"Do you handle small projects too?",a:"Yes. A single tree, a 12x12 patio, a sprinkler repair â same crew, same standards as our larger jobs."},{q:"Are you licensed and insured?",a:"Fully licensed, bonded and insured. We're an A+ rated BBB-accredited business and a member of the South Dakota Nursery & Landscape Association."},{q:"What's your warranty?",a:"Hardscape is warrantied against settlement for two full years. Trees and shrubs we install are covered for one growing season. Irrigation work, one year."}];function Q2(){const[e,t]=X.useState(!1),[n,a]=X.useState(!1);return X.useEffect(()=>{const o=()=>a(window.scrollY>8);return o(),window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"hidden md:block bg-brand-navy text-brand-cream text-xs",children:z.jsxs("div",{className:"container-wide flex justify-between py-2",children:[z.jsxs("span",{children:[ye.address.line1,", ",ye.address.city,", ",ye.address.state," · ",ye.hours]}),z.jsxs("a",{href:ye.phoneHref,className:"hover:text-brand-slate transition-colors inline-flex items-center gap-1.5",children:[z.jsx(Bf,{className:"h-3.5 w-3.5"})," ",ye.phone]})]})}),z.jsxs("header",{className:`sticky top-0 z-40 transition-all ${n?"bg-background/90 backdrop-blur border-b border-border":"bg-background border-b border-transparent"}`,children:[z.jsxs("div",{className:"container-wide flex h-20 items-center justify-between gap-6",children:[z.jsx(sw,{className:"h-12 w-auto md:h-14"}),z.jsx("nav",{className:"hidden lg:flex items-center gap-8",children:vf.map(o=>z.jsxs(It,{to:o.to,className:"text-sm font-medium text-foreground/80 hover:text-brand-navy transition-colors relative group",activeProps:{className:"text-brand-navy"},children:[o.label,z.jsx("span",{className:"absolute -bottom-1 left-0 h-px w-0 bg-brand-green transition-all group-hover:w-full"})]},o.to))}),z.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[z.jsx("a",{href:ye.phoneHref,className:"text-sm font-semibold text-brand-navy hover:text-brand-green transition-colors",children:ye.phone}),z.jsx(It,{to:"/quote","data-cta":"quote",className:"inline-flex items-center rounded-full bg-brand-navy px-5 py-2.5 text-sm font-semibold text-brand-cream hover:bg-brand-green transition-colors",children:"Get a Free Quote"})]}),z.jsx("button",{type:"button","aria-label":"Open menu","aria-expanded":e,className:"lg:hidden inline-flex items-center justify-center rounded-md p-2 text-brand-navy",onClick:()=>t(o=>!o),children:e?z.jsx(H2,{className:"h-6 w-6"}):z.jsx($2,{className:"h-6 w-6"})})]}),e&&z.jsx("div",{className:"lg:hidden border-t border-border bg-background",children:z.jsxs("nav",{className:"container-wide flex flex-col py-4",children:[vf.map(o=>z.jsx(It,{to:o.to,className:"py-3 text-base font-medium text-foreground",onClick:()=>t(!1),children:o.label},o.to)),z.jsx(It,{to:"/quote","data-cta":"quote",onClick:()=>t(!1),className:"mt-2 inline-flex justify-center rounded-full bg-brand-navy px-5 py-3 text-sm font-semibold text-brand-cream",children:"Get a Free Quote"})]})})]})]})}const Hf=[{slug:"sioux-falls-sd",city:"Sioux Falls",state:"SD",fullName:"Sioux Falls, SD",zip:"57103",population:"~210,000",driveMinutes:0,geo:{lat:43.5446,lng:-96.7311},shortPitch:"Our home market. Fifty years of landscape design, installation and irrigation across every neighborhood in the city.",metaDescription:"Sioux Falls landscaping by Groundwater Inc. â design, installation, hardscape and irrigation across every Sioux Falls neighborhood. 50 years on the prairie. Free quote.",intro:"Groundwater Inc. has shaped Sioux Falls yards for five decades â from the historic stone homes of McKennan Park to new-build lots in Tuscany and Hayward. Every neighborhood has
55its own soil, drainage and microclimate, and we've solved for all of them.",neighborhoods:["McKennan Park","All Saints","Cathedral District","Tuscany","Prairie Hills","Hayward","South Cliff","Whittier"],soilAndSite:"Most of Sioux Falls sits on heavy clay loam with a high water table near the river bluffs. New developments south and west often need 4â8 inches of imported topsoil before sod takes well. Older established neighborhoods deal with compacted fill from decades of foot traffic â we lead with core aeration and deep root-zone amendment before any planting.",signatureProjects:["Bluestone patio + pondless waterfall on a McKennan Park lot","Full landscape renovation for a Cathedral District Tudor","Smart-irrigation overhaul across 14 zones in Tuscany"],localTips:[{title:"Watch the wind",body:"Sioux Falls sits in the open prairie corridor. Plan windbreak plantings (Black Hills spruce, Norway pine) on the northwest exposure of any patio or fire-pit area or your guests will be cold by 7pm in October."},{title:"Plant zone 4b, not zone 5",body:"Big-box stores routinely stock zone 5 material that won't survive a polar-vortex winter. Stick to zone 3â4 hardy varieties â your investment lasts."},{title:"Permit reality check",body:"Sioux Falls requires a permit for retaining walls over 4 feet and any irrigation tap to the city main. We pull permits as part of every install â never an afterthought."}],faqs:[{q:"Do you work in every Sioux Falls neighborhood?",a:"Yes â from historic core neighborhoods like McKennan and All Saints to every new development south of 85th. We're typically on at least four active Sioux Falls job sites at a time."},{q:"How fast can you schedule a Sioux Falls install?",a:"Spring and early summer book out 4â6 weeks in advance. Fall installs (September/October) usually have shorter lead times and the plants establish beautifully."}]},{slug:"brandon-sd",city:"Brandon",state:"SD",fullName:"Brandon, SD",zip:"57005",population:"~12,000",driveMinutes:15,geo:{lat:43.5944,lng:-96.5728},shortPitch:"Big lots, big possibilities â Brandon's larger residential footprints let us design landscapes that actually breathe.",metaDescription:"Brandon, SD landscaping and irrigation by Groundwater Inc. Design, installation, patios and smart sprinklers built for Brandon's larger lots. Free on-site quote.",intro:"Brandon homes tend to sit on larger lots than Sioux Falls proper, which opens up landscape options most city sites can't accommodate â full backyard rooms, mature shade plantings, real water features. We've worked Brandon since the original Aspen Park subdivisions.",neighborhoods:["Aspen Park","Brandon Heights","Sunnycrest","Big Sioux Estates","Holly Crest"],soilAndSite:"Brandon soils east of I-90 grade toward sandier loam that drains well â great for plant health but tough on irrigation efficiency. We typically spec drip in beds and high-uniformity rotary heads on turf to avoid the dry stripes you see on stretched-out Brandon lawns.",signatureProjects:["Multi-zone backyard for an Aspen Park family with pool surround","Full xeriscape conversion of a half-acre Brandon Heights front yard","Outdoor kitchen + paver patio + fire pit, Holly Crest"],localTips:[{title:"Lean into the lot size",body:"Brandon's bigger lots make room for proper plant spacing â don't squeeze a 60-foot maple into a 20-foot bed. Plan at mature size and the design ages well."},{title:"Mind the Big Sioux floodplain",body:"Properties along the Big Sioux corridor have specific grading and drainage rules. We design for the 100-year flood line, not just the lot survey."}],faqs:[{q:"Is Brandon part of your regular service area?",a:"Absolutely. Brandon is a 15-minute run from our 8th Street shop. We typically have crews in Brandon at least once a week."}]},{slug:"harrisburg-sd",city:"Harrisburg",state:"SD",fullName:"Harrisburg, SD",zip:"57032",population:"~8,500",driveMinutes:20,geo:{lat:43.4347,lng:-96.6936},shortPitch:"Sioux Falls' fastest-growing southern neighbor â new builds, blank slate yards, infinite potential.",metaDescription:"Harrisburg, SD landscape design and installation by Groundwater Inc. From bare new-build dirt to finished outdoor living. 50 years on the prairie. Free quote.",intro:"Harrisburg is mostly new construction â which means most homeowners are staring at a bare graded lot wondering where to start. We specialize in turning new-build clay into a complete landscape in a single season, sequenced so the family can actually use the yard while it grows in.",neighborhoods:["W
55illow Run","Hickory Hills","Steeple View","Tallgrass","Cobble Creek"],soilAndSite:"New-construction lots in Harrisburg are dominated by compacted subsoil â the topsoil is usually scraped and sold off during the build. Plan on importing 4â6 inches of quality topsoil and aggressive amendment before sod or beds. Skip this step and nothing thrives.",signatureProjects:["Complete new-build landscape (lawn, beds, trees, irrigation) in Willow Run","Smart irrigation install on a Hickory Hills corner lot","Front-yard tree replacement and bed redesign in Steeple View"],localTips:[{title:"Plant trees early",body:"The single best thing a Harrisburg homeowner can do in year one is plant shade trees. Five years from now you'll thank yourself â they take that long to start working."},{title:"HOA approvals matter",body:"Several Harrisburg developments have active HOAs with plant and hardscape restrictions. We submit drawings on your behalf so you don't get a surprise letter mid-install."}],faqs:[{q:"We just moved into a new build in Harrisburg. Where do we start?",a:"Start with a plan. Spending $1,500 on a real landscape design saves $15,000 in mistakes later. Then phase the install over 2â3 years if you need to."}]},{slug:"tea-sd",city:"Tea",state:"SD",fullName:"Tea, SD",zip:"57064",population:"~7,000",driveMinutes:18,geo:{lat:43.4488,lng:-96.8336},shortPitch:"Tea homeowners value craft and durability â exactly how we build.",metaDescription:"Tea, SD landscaping by Groundwater Inc. Custom design, hardscape, water features and irrigation in Tea and the surrounding Lincoln County area. Free quote.",intro:"Tea has grown into one of the Sioux Empire's most design-conscious communities. The homeowners we work with in Tea want lasting, beautifully built outdoor spaces â not the fastest, cheapest install. That's how we approach every project.",neighborhoods:["Maple Ridge","Heritage Pointe","Country Apple Orchard","Stone Creek"],soilAndSite:"Tea's elevated position drains better than Sioux Falls proper, but the wind exposure is real. We use evergreen windbreak strategy on west-facing patios and choose drought-tolerant prairie natives that handle hot July afternoons.",signatureProjects:["Stone seat wall + gas fire feature, Maple Ridge","Backyard pondless waterfall and bluestone landing, Heritage Pointe","Full irrigation re-design after a builder's failed install"],localTips:[{title:"Build for the wind",body:"Open Tea lots get hammered by southwest summer winds. Plant a 3-deep evergreen screen 25 feet upwind of patios â it makes the space usable a month longer each season."}],faqs:[{q:"Do you service Tea regularly?",a:"Yes. Tea is a 20-minute drive and we run jobs there every week through the season."}]},{slug:"dell-rapids-sd",city:"Dell Rapids",state:"SD",fullName:"Dell Rapids, SD",zip:"57022",population:"~3,800",driveMinutes:30,geo:{lat:43.8266,lng:-96.7081},shortPitch:"Quartzite country â landscapes that complement the iconic local stone.",metaDescription:"Dell Rapids, SD landscape design and installation by Groundwater Inc. Quartzite-aware hardscape, native plantings, smart irrigation. Free on-site quote.",intro:"Dell Rapids' famous Sioux Quartzite shapes every landscape decision â natural outcrops, historic stone buildings, gravel-heavy soils along the Big Sioux. We design around the geology instead of fighting it.",neighborhoods:["Downtown Historic","South Iowa","Riverside","North Park"],soilAndSite:"Soils thin out fast as you approach the quartzite ledge. Many Dell Rapids properties have less than a foot of topsoil over bedrock or river gravel â plant selection and bed depth have to account for that.",signatureProjects:["Quartzite-accent landscape for a downtown historic home","Native prairie restoration on a 2-acre Riverside property","Stone patio that picks up the local quartzite color palette"],localTips:[{title:"Use local stone",body:"Importing fancy travertine to Dell Rapids fights the entire town's character. Pink quartzite from the local quarries looks right, lasts forever and supports the local economy."}],faqs:[{q:"Do you drive out to Dell Rapids?",a:"Yes. Dell Rapids is a regular service area for us â about 30 minutes from the shop. We schedule multi-day blocks there to keep travel efficient."}]},{slug:"hartford-sd",city:"Hartford",state:"SD",fullName:"Hartford, SD",zip:"57033",population:"~3,000",driveMinutes:20,geo:{lat:43.6244,lng:-96.9436},shortPitch:"West-side acreages and family yards built for South Dakota wind and weather.",metaDescription:"Hartford, SD landscaping and irrigation by Groundwater Inc. Acreage-friendly design, prairie-tough plant selection and bulletproof hardscape. Free quote.",intro:"Hartford properties skew larger â many are full or partial acreages. That changes how you design. Mass plantings, real windbreaks, irrigation laid out around farm-style geometry rather than tight city lots.",neighborhoods:["West Edge Acreages","Whispering Creek","Hartford Heights"],soilAndSite:"Hartford-area soils are deep prairie loam â among the best growing conditions in the region. The catch is wind exposure. Anything not protected will lean, dry out faster and need extra water.",signatureProjects:["5-acre acreage windbreak + perimeter planting design","Smart irrigation across a 1-acre Hartford Heights lot","Backyard patio sized for serious entertaining"],localTips:[{title:"Plan irrigation for acreage",body:"Standard residential controllers max out at 8â12 zones. Acreages often need 16â24. Spec the controller right the first time â retrofitting is painful."}],faqs:[{q:"Can you handle acreage-scale projects?",a:"Yes. We've been installing landscapes on 1â10 acre properties for decades. The principles scale, the equipment changes."}]}];function X2(e){return Hf.find(t=>t.slug===e)}function W2(){return z.jsxs("footer",{className:"bg-brand-navy text-brand-cream mt-24",children:[z.jsxs("div",{className:"container-wide py-16 grid gap-12 md:grid-cols-2 lg:grid-cols-5",children:[z.jsxs("div",{className:"md:col-span-1",children:[z.jsx("div",{className:"bg-brand-cream/95 rounded-xl p-4 inline-block",children:z.jsx(sw,{className:"h-14 w-auto"})}),z.jsxs("p",{className:"mt-5 text-sm text-brand-cream/70 leading-relaxed",children:[ye.yearsExperience," years of landscape design, installation and irrigation across the Sioux Empire."]})]}),z.jsxs("div",{children:[z.jsx("h4",{className:"text-brand-cream font-display text-lg mb-4",children:"Services"}),z.jsx("ul",{className:"space-y-2 text-sm",children:aw.map(e=>z.jsx("li",{children:z.jsx(It,{to:"/services/$slug",params:{slug:e.slug},className:"text-brand-cream/75 hover:text-brand-slate transition-colors",children:e.title})},e.slug))})]}),z.jsxs("div",{children:[z.jsx("h4",{className:"text-brand-cream font-display text-lg mb-4",children:"Service Areas"}),z.jsx("ul",{className:"space-y-2 text-sm",children:Hf.map(e=>z.jsx("li",{children:z.jsxs(It,{to:"/landscaping/$area",params:{area:e.slug},className:"text-brand-cream/75 hover:text-brand-slate transition-colors",children:[e.city,", ",e.state]})},e.slug))})]}),z.jsxs("div",{children:[z.jsx("h4",{className:"text-brand-cream font-display text-lg mb-4",children:"Company"}),z.jsxs("ul",{className:"space-y-2 text-sm",children:[vf.map(e=>z.jsx("li",{children:z.jsx(It,{to:e.to,className:"text-brand-cream/75 hover:text-brand-slate transition-colors",children:e.label})},e.to)),z.jsx("li",{children:z.jsx(It,{to:"/reviews",className:"text-brand-cream/75 hover:text-brand-slate transition-colors",children:"Reviews"})}),z.jsx("li",{children:z.jsx(It,{to:"/quote","data-cta":"quote",className:"text-brand-cream/75 hover:text-brand-slate transition-colors",children:"Free Quote"})})]}),z.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[z.jsxs("a",{href:"https://www.bbb.org/us/sd/sioux-falls/profile/landscape-contractors/groundwater-inc-0714-300049532",target:"_blank",rel:"noopener noreferrer","aria-label":"BBB Accredited Business â Groundwater Inc.",className:"inline-flex items-center gap-2 rounded-md bg-brand-cream/95 px-3 py-2 text-brand-navy hover:bg-brand-cream transition-colors",children:[z.jsx("span",{className:"font-display text-xl leading-none tracking-tight",children:"BBB"}),z.jsxs("span",{className:"flex flex-col leading-tight",children:[z.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",children:"Accredited"}),z.jsx("span",{className:"text-[10px] uppercase tracking-wider",children:"A+ Rating"})]})]}),z.jsxs("span",{className:"text-[11px] text-brand-cream/60 leading-tight",children:["Member",z.jsx("br",{}),"SDNLA"]})]})]}),z.jsxs("div",{children:[z.jsx("h4",{className:"text-brand-cream font-display text-lg mb-4",children:"Visit"}),z.jsxs("ul",{className:"space-y-3 text-sm text-brand-cream/80",children:[z.jsxs("li",{className:"flex gap-3",children:[z.jsx(L2,{className:"h-4 w-4 mt-0.5 shrink-0 text-brand-slate"}),z.jsxs("a",{href:ye.mapsHref,target:"_blank",rel:"noopener noreferrer",className:"hover:text-brand-slate",children:[ye.address.line1,z.jsx("br",{}),ye.address.city,", ",ye.address.state," ",ye.address.zip]})]}),z.jsxs("li",{className:"flex gap-3",children:[z.jsx(Bf,{className:"h-4 w-4 mt-0.5 shrink-0 text-brand-slate"}),z.jsx("a",{href:ye.phoneHref,className:"hover:text-brand-slate",children:ye.phone})]}),z.jsxs("li",{className:"flex gap-3",children:[z.jsx(M2,{className:"h-4 w-4 mt-0.5 shrink-0 text-brand-slate"}),z.jsx("a",{href:`mailto:${ye.email}`,className:"hover:text-brand-slate",children:ye.email})]}),z.jsxs("li",{className:"flex gap-3",children:[z.jsx(N2,{className:"h-4 w-4 mt-0.5 shrink-0 text-brand-slate"}),z.jsx("a",{href:ye.social.facebook,target:"_blank",rel:"noopener noreferrer",className:"hover:text-brand-slate",children:"Facebook"})]}),z.jsxs("li",{className:"text-brand-cream/60 text-xs pt-1 leading-relaxed",children:[ye.hours,z.jsx("br",{}),ye.hoursWeekend]})]})]})]}),z.jsxs("div",{className:"border-t border-brand-cream/10",children:[z.jsx("div",{className:"container-wide pt-6 pb-2 text-[11px] text-brand-cream/55 leading-relaxed text-center",children:"Groundwater Inc. â Sioux Falls landscaping, landscape design, landscape installation, irrigation systems, paver patios, fire pits, water features, retaining walls, sod, plants, trees and shrubs serving Sioux Falls, Brandon, Harrisburg, Tea, Dell Rapids, Hartford and the Sioux Empire region of South Dakota."}),z.jsxs("div",{className:"container-wide py-6 flex flex-col md:flex-row items-center justify-between gap-3 text-xs text-brand-cream/60",children:[z.jsxs("p",{children:["© ",new Date().getFullYear()," ",ye.name,". All rights reserved."]}),z.jsx("p",{children:"Sioux Falls landscape contractor · Licensed · Bonded · Insured"}),z.jsxs("p",{children:["Powered by"," ",z.jsx("a",{href:"https://complete.media",target:"_blank",rel:"noopener noreferrer",className:"text-brand-cream/80 hover:text-brand-slate underline-offset-2 hover:underline",children:"Complete Media"})]})]})]})]})}function ez(){return z.jsx("div",{className:"lg:hidden fixed bottom-0 inset-x-0 z-30 border-t border-border bg-background/95 backdrop-blur",children:z.jsxs("div",{className:"grid grid-cols-2 gap-2 p-2",children:[z.jsxs("a",{href:ye.phoneHref,className:"inline-flex items-center justify-center gap-2 rounded-full border border-brand-navy text-brand-navy py-2.5 text-sm font-semibold",children:[z.jsx(Bf,{className:"h-4 w-4"})," Call"]}),z.jsx(It,{to:"/quote","data-cta":"quote",className:"inline-flex items-center justify-center gap-2 rounded-full bg-brand-navy text-brand-cream py-2.5 text-sm font-semibold",children:"Free Quote"})]})})}const tz=Et({method:"GET"}).handler(Lt("d2bf4ec35744eae4d65026bfe41b8b8b09ed8c3b059392748648beac2ad829ab")),DU=Et({method:"POST"}).handler(Lt("0459d100af98dc72ffc086042915d5a01f919e3a72132d55480d5654b24c7144")),MU=Et({method:"POST"}).handler(Lt("a224dafcb3445d11d03db53b9dfd8dbfe2f7d36f5c375fb9cfb2574d5f5fe331"));function hu(e,t={}){if(!(typeof window>"u")&&typeof window.gtag=="function")try{window.gtag("event",e,t)}catch(n){console.warn("trackEvent failed",n)}}function $b(e,t){typeof window>"u"||typeof window.gtag=="function"&&window.gtag("event","page_view",{page_path:e,page_location:window.location.href,page_title:document.title})}const Ib="ga4-gtag-script";function nz(){const e=jx(tz),{data:t}=T2({queryKey:["ga4-measurement-id"],queryFn:()=>e(),staleTime:300*1e3}),n=t?.measurementId??null,a=vt(),o=X.useRef(null);return X.useEffect(()=>{if(!n||typeof window>"u"||o.current===n)return;window.dataLayer=window.dataLayer||[];function u(...c){window.dataLayer.push(c)}if(window.gtag=u,u("js",new Date),u("config",n,{send_page_view:!1}),!document.getElementById(Ib)){const c=document.createElement("script");c.id=Ib,c.async=!0,c.src=`https://www.googletagmanager.com/gtag/js?i
55d=${n}`,document.head.appendChild(c)}o.current=n,$b(window.location.pathname+window.location.search)},[n]),X.useEffect(()=>{if(!n)return;const u=a.subscribe("onResolved",()=>{const c=a.state.location;$b(c.pathname+c.searchStr)});return()=>u()},[a,n]),X.useEffect(()=>{if(!n)return;const u=/\.(pdf|docx?|xlsx?|pptx?|csv|zip|txt)(\?|$)/i;function c(h){const f=h.target;if(!f)return;const g=f.closest("a"),m=f.closest("[data-cta]");if(m&&hu("cta_click",{cta_id:m.dataset.cta,cta_label:m.getAttribute("aria-label")||m.textContent?.trim().slice(0,80),page_path:window.location.pathname}),!g)return;const y=g.getAttribute("href")??"";if(y.startsWith("tel:"))hu("phone_click",{phone_number:y.replace("tel:","")});else if(y.startsWith("mailto:"))hu("email_click",{email:y.replace("mailto:","").split("?")[0]});else if(u.test(y)){const b=y.split("/").pop()?.split("?")[0]??y,_=(b.split(".").pop()??"").toLowerCase();hu("file_download",{file_name:b,file_extension:_,link_url:y})}}return document.addEventListener("click",c,{capture:!0}),()=>document.removeEventListener("click",c,{capture:!0})},[n]),null}function rz(){return z.jsx("div",{className:"flex min-h-[70vh] items-center justify-center bg-background px-4",children:z.jsxs("div",{className:"max-w-md text-center",children:[z.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-brand-green font-semibold",children:"404"}),z.jsx("h1",{className:"mt-3 text-4xl font-display text-brand-navy",children:"Page not found"}),z.jsx("p",{className:"mt-3 text-muted-foreground",children:"That page isn't here. Head back home or explore our services."}),z.jsxs("div",{className:"mt-6 flex gap-3 justify-center",children:[z.jsx(It,{to:"/",className:"inline-flex rounded-full bg-brand-navy px-5 py-2.5 text-sm font-semibold text-brand-cream",children:"Go home"}),z.jsx(It,{to:"/services",className:"inline-flex rounded-full border border-brand-navy px-5 py-2.5 text-sm font-semibold text-brand-navy",children:"Services"})]})]})})}function sz({error:e,reset:t}){console.error(e);const n=vt();return X.useEffect(()=>{A2(e,{boundary:"tanstack_root_error_component"})},[e]),z.jsx("div",{className:"flex min-h-[70vh] items-center justify-center bg-background px-4",children:z.jsxs("div",{className:"max-w-md text-center",children:[z.jsx("h1",{className:"text-2xl font-display text-brand-navy",children:"Something went wrong"}),z.jsx("p",{className:"mt-2 text-muted-foreground",children:"Try again or head back to the homepage."}),z.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-2",children:[z.jsx("button",{onClick:()=>{n.invalidate(),t()},className:"inline-flex rounded-full bg-brand-navy px-5 py-2.5 text-sm font-semibold text-brand-cream",children:"Try again"}),z.jsx("a",{href:"/",className:"inline-flex rounded-full border border-brand-navy px-5 py-2.5 text-sm font-semibold text-brand-navy",children:"Go home"})]})]})})}const Be=ox()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Groundwater Inc. â Sioux Falls Landscape & Irrigation"},{name:"description",content:"Award-winning Sioux Falls landscape design, installation and irrigation. 50 years building outdoor spaces that last."},{name:"author",content:ye.name},{name:"google-site-verification",content:"sa8ondqdqHOCsBKECR9qTwzDCIjKzlH9vv1_yIs5bp0"},{name:"theme-color",content:"#2F4F5F"},{name:"apple-mobile-web-app-title",content:"Groundwater"},{name:"application-name",content:ye.name},{property:"og:type",content:"website"},{property:"og:site_name",content:ye.name},{property:"og:title",content:"Groundwater Inc. â Sioux Falls Landscape & Irrigation"},{property:"og:description",content:"Award-winning Sioux Falls landscape design, installation and irrigation. 50 years building outdoor spaces that last."},{property:"og:image",content:"https://groundwaterlandscaping.lovable.app/og-image.jpg"},{property:"og:image:width",content:"1200"},{property:"og:image:height",content:"630"},{property:"og:image:alt",content:"Groundwater Inc. â Sioux Falls Landscape & Irrigation"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Groundwater Inc. â Sioux Falls Landscape & Irrigation"},{name:"twitter:description",content:"Award-winning Sioux Falls landscape design, installation and irrigation. 50 years building outdoor space
55s that last."},{name:"twitter:image",content:"https://groundwaterlandscaping.lovable.app/og-image.jpg"}],links:[{rel:"stylesheet",href:R2},{rel:"icon",href:"/favicon.ico",sizes:"any"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32.png"},{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"},{rel:"manifest",href:"/site.webmanifest"},{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=Fraunces:opsz,[email protected],400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"LocalBusiness","@id":"https://www.groundwaterinc.com/#business",name:ye.name,image:"https://groundwaterlandscaping.lovable.app/og-image.jpg",url:"https://www.groundwaterinc.com/",telephone:ye.phone,email:ye.email,address:{"@type":"PostalAddress",streetAddress:ye.address.line1,addressLocality:ye.address.city,addressRegion:ye.address.state,postalCode:ye.address.zip,addressCountry:"US"},geo:{"@type":"GeoCoordinates",latitude:43.5446,longitude:-96.7311},openingHoursSpecification:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday"],opens:"08:00",closes:"18:00"}],areaServed:[{"@type":"City",name:"Sioux Falls",address:{"@type":"PostalAddress",addressRegion:"SD",addressCountry:"US"}},{"@type":"City",name:"Brandon",address:{"@type":"PostalAddress",addressRegion:"SD",addressCountry:"US"}},{"@type":"City",name:"Harrisburg",address:{"@type":"PostalAddress",addressRegion:"SD",addressCountry:"US"}},{"@type":"City",name:"Tea",address:{"@type":"PostalAddress",addressRegion:"SD",addressCountry:"US"}},{"@type":"City",name:"Dell Rapids",address:{"@type":"PostalAddress",addressRegion:"SD",addressCountry:"US"}},{"@type":"City",name:"Hartford",address:{"@type":"PostalAddress",addressRegion:"SD",addressCountry:"US"}}],priceRange:"$$",sameAs:[ye.social.facebook],hasOfferCatalog:{"@type":"OfferCatalog",name:"Landscape Services",itemListElement:["Landscape Design","Landscape Installation","Plants, Trees & Shrubs","Patios & Fire Pits","Water Features","Irrigation Systems"].map(e=>({"@type":"Offer",itemOffered:{"@type":"Service",name:e}}))}})}]}),shellComponent:az,component:iz,notFoundComponent:rz,errorComponent:sz});function az({children:e}){return z.jsxs("html",{lang:"en",children:[z.jsx("head",{children:z.jsx(xx,{})}),z.jsxs("body",{children:[e,z.jsx(kx,{})]})]})}function iz(){const{queryClient:e}=Be.useRouteContext();return z.jsxs(d2,{client:e,children:[z.jsxs("div",{className:"flex min-h-screen flex-col",children:[z.jsx(Q2,{}),z.jsx("main",{className:"flex-1 pb-20 lg:pb-0",children:z.jsx(__,{})}),z.jsx(W2,{}),z.jsx(ez,{})]}),z.jsx(nz,{})]})}const oz=Je("/water-features")({beforeLoad:()=>{throw Cn({to:"/services/$slug",params:{slug:"water-features"},replace:!0})}}),lz="modulepreload",uz=function(e){return"/"+e},Bb={},Ge=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let f=function(g){return Promise.all(g.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=c?.nonce||c?.getAttribute("nonce");o=f(n.map(g=>{if(g=uz(g),g in Bb)return;Bb[g]=!0;const m=g.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":lz,m||(b.as="script"),b.crossOrigin="",b.href=g,h&&b.setAttribute("nonce",h),document.head.appendChild(b),m)return new Promise((_,w)=>{b.addEventListener("load",_),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return o.then(c=>{for(const h of c||[])h.status==="rejected"&&u(h.reason);return t().catch(u)})};var Hb;
vendor: 4,701 bytes, line 55
55function V(e,t,n){function a(h,f){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),t(h,f);const g=c.prototype,m=Object.keys(g);for(let y=0;y<m.length;y++){const b=m[y];b in h||(h[b]=g[b].bind(h))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function c(h){var f;const g=n?.Parent?new u:this;a(g,h),(f=g._zod).deferred??(f.deferred=[]);for(const m of g._zod.deferred)m();return g}return Object.defineProperty(c,"init",{value:a}),Object.defineProperty(c,Symbol.hasInstance,{value:h=>n?.Parent&&h instanceof n.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class Za extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class iw extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Hb=globalThis).__zod_globalConfig??(Hb.__zod_globalConfig={});const qf=globalThis.__zod_globalConfig;function Ls(e){return qf}function ow(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function bf(e,t){return typeof t=="bigint"?t.toString():t}function Ff(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Gf(e){return e==null}function Zf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function cz(e,t){const n=e/t,a=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-a)<o?0:n-a}const qb=Symbol("evaluating");function Le(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==qb)return a===void 0&&(a=qb,a=n()),a},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Bs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rs(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function Fb(e){return JSON.stringify(e)}function hz(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const lw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const dz=Ff(()=>{if(qf.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ao(e){if(Pu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Pu(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function uw(e){return Ao(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const fz=new Set(["string","number","symbol"]);function Ya(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ss(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function ue(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function pz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const gz={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function mz(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=rs(e._zod.def,{get shape(){const c={};for(const h in t){if(!(h in n.shape))throw new Error(`Unrecognized key: "${h}"`);t[h]&&(c[h]=n.shape[h])}return Bs(this,"shape",c),c},checks:[]});return ss(e,u)}function yz(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=rs(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const h in t){if(!(h in n.shape))throw new Error(`Unrecognized key: "${h}"`);t[h]&&delete c[h]}return Bs(this,"shape",c),c},checks:[]});return ss(e,u)}function vz(e,t){if(!Ao(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(u,c)!==void 0)throw new Error("Cannot over
55write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=rs(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Bs(this,"shape",u),u}});return ss(e,o)}function bz(e,t){if(!Ao(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=rs(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Bs(this,"shape",a),a}});return ss(e,n)}function _z(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=rs(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Bs(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ss(e,n)}function wz(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=rs(t._zod.def,{get shape(){const h=t._zod.def.shape,f={...h};if(n)for(const g in n){if(!(g in h))throw new Error(`Unrecognized key: "${g}"`);n[g]&&(f[g]=e?new e({type:"optional",innerType:h[g]}):h[g])}else for(const g in h)f[g]=e?new e({type:"optional",innerType:h[g]}):h[g];return Bs(this,"shape",f),f},checks:[]});return ss(t,c)}function Sz(e,t,n){const a=rs(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const c in n){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(u[c]=new e({type:"nonoptional",innerType:o[c]}))}else for(const c in o)u[c]=new e({type:"nonoptional",innerType:o[c]});return Bs(this,"shape",u),u}});return ss(t,a)}function Ba(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ez(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function cw(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function du(e){return typeof e=="string"?e:e?.message}function Us(e,t,n){const a=e.message?e.message:du(e.inst?._zod.def?.error?.(e))??du(t?.error?.(e))??du(n.customError?.(e))??du(n.localeError?.(e))??"Invalid input",{inst:o,continue:u,input:c,...h}=e;return h.path??(h.path=[]),h.message=a,t?.reportInput&&(h.input=c),h}function Vf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Oo(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const hw=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,bf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dw=V("$ZodError",hw),fw=V("$ZodError",hw,{Parent:Error});function Tz(e,t=n=>n.message){const n={},a=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):a.push(t(o));return{formErrors:a,fieldErrors:n}}function Rz(e,t=n=>n.message){const n={_errors:[]},a=(o,u=[])=>{for(const c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(h=>a({issues:h},[...u,...c.path]));else if(c.code==="invalid_key")a({issues:c.issues},[...u,...c.path]);else if(c.code==="invalid_element")a({issues:c.issues},[...u,...c.path]);else{const h=[...u,...c.path];if(h.length===0)n._errors.push(t(c));else{let f=n,g=0;for(;g<h.length;){const m=h[g];g===h.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(t(c))):f[m]=f[m]||{_errors:[]},f=f[m],g++}}}};return a(e),n}const Kf=e=>(t,n,a,o)=>{const u=a?{...a,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},u);if(c instanceof Promise)throw new Za;if(c.issues.length){const h=new(o?.Err??e)(c.issues.map(f=>Us(f,u,Ls())));throw lw(h,o?.callee),h}return c.value},Jf=e=>async(t,n,a,o)=>{const u=a?{...a,async:!0}:{async:!0};let c=t._zod.run({value:n,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){const h=new(o?.Err??e)(c.issues.map(f=>Us(f,u,Ls())));throw lw(h,o?.callee),h}return c.value},Xu=e=>(t,n,a)=>{const o=a?{...a,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new Za;return u.issues.length?{success:!1,error:new(e??dw)(u.issues.map(c=>Us(c,o,Ls())))}:{success:!0,data:u.value}},Az=Xu(fw),Wu=e=>async(t,n,a)=>{const o=a?{...a,async:!0}:{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Us(c,o,Ls())))}:{success:!0,data:u.value}},Oz=Wu(fw),xz=e=>(t,n,a)=>{const o=a?{...a,direction:"backward"}:{direction:"backward"};return Kf(e)(t,n,o)},kz=e=>(t,n,a)=>Kf(e)(t,n,a),Cz=e=>async(t,n,a)=>{const o=a?{...a,direction:"backward"}:{direction:"backward"};return Jf(e)(t,n,o)},jz=e=>async(t,n,a)=>Jf(e)(t,n,a),zz=e=>(t,n,a)=>{const o=a?{...a,direction:"backward"}:{direction:"backward"};return Xu(e)(t,n,o)},Nz=e=>(t,n,a)=>Xu(e)(t,n,a),Dz=e=>async(t,n,a)=>{const o=a?{...a,direction:"backward"}:{direction:"backward"};return Wu(e)(t,n,o)},Mz=e=>async(t,n,a)=>Wu(e)(t,n,a),Pz=/^[cC][0-9a-z]{6,}
vendor: 4,493 bytes, line 55
55$/,Lz=/^[0-9a-z]+$/,Uz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$z=/^[0-9a-vA-V]{20}$/,Iz=/^[A-Za-z0-9]{27}$/,Bz=/^[a-zA-Z0-9_-]{21}$/,Hz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qz=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Gb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Fz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Gz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Zz(){return new RegExp(Gz,"u")}const Vz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Jz=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Yz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pw=/^[A-Za-z0-9_-]*$/,Xz=/^https?$/,Wz=/^\+[1-9]\d{6,14}$/,gw="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",eN=new RegExp(`^${gw}$`);function mw(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tN(e){return new RegExp(`^${mw(e)}$`)}function nN(e){const t=mw({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${n.join("|")})`;return new RegExp(`^${gw}T(?:${a})$`)}const rN=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},sN=/^-?\d+$/,aN=/^-?\d+(?:\.\d+)?$/,iN=/^[^A-Z]*$/,oN=/^[^a-z]*$/,Xt=V("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),yw={number:"number",bigint:"bigint",object:"date"},vw=V("$ZodCheckLessThan",(e,t)=>{Xt.init(e,t);const n=yw[typeof t.value];e._zod.onattach.push(a=>{const o=a._zod.bag,u=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<u&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bw=V("$ZodCheckGreaterThan",(e,t)=>{Xt.init(e,t);const n=yw[typeof t.value];e._zod.onattach.push(a=>{const o=a._zod.bag,u=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lN=V("$ZodCheckMultipleOf",(e,t)=>{Xt.init(e,t),e._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):cz(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),uN=V("$ZodCheckNumberFormat",(e,t)=>{Xt.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),a=n?"int":"number",[o,u]=gz[t.format];e._zod.onattach.push(c=>{const h=c._zod.bag;h.format=t.format,h.minimum=o,h.maximum=u,n&&(h.pattern=sN)}),e._zod.check=c=>{const h=c.value;
vendor: 4,191 bytes, line 55
55if(n){if(!Number.isInteger(h)){c.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?c.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):c.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}h<o&&c.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),h>u&&c.issues.push({origin:"number",input:h,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}}),cN=V("$ZodCheckMaxLength",(e,t)=>{var n;Xt.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Gf(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const o=a.value;if(o.length<=t.maximum)return;const c=Vf(o);a.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),hN=V("$ZodCheckMinLength",(e,t)=>{var n;Xt.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Gf(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const o=a.value;if(o.length>=t.minimum)return;const c=Vf(o);a.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),dN=V("$ZodCheckLengthEquals",(e,t)=>{var n;Xt.init(e,t),(n=e._zod.def).when??(n.when=a=>{const o=a.value;return!Gf(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=a=>{const o=a.value,u=o.length;if(u===t.length)return;const c=Vf(o),h=u>t.length;a.issues.push({origin:c,...h?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),ec=V("$ZodCheckStringFormat",(e,t)=>{var n,a;Xt.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),fN=V("$ZodCheckRegex",(e,t)=>{ec.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),pN=V("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=iN),ec.init(e,t)}),gN=V("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=oN),ec.init(e,t)}),mN=V("$ZodCheckIncludes",(e,t)=>{Xt.init(e,t);const n=Ya(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=a,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(a)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),yN=V("$ZodCheckStartsWith",(e,t)=>{Xt.init(e,t);const n=new RegExp(`^${Ya(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),vN=V("$ZodCheckEndsWith",(e,t)=>{Xt.init(e,t);const n=new RegExp(`.*${Ya(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input
vendor: 14,300 bytes, lines 55-116
55:a.value,inst:e,continue:!t.abort})}}),bN=V("$ZodCheckOverwrite",(e,t)=>{Xt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class _N{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const a=t.split(` 56`).filter(c=>c),o=Math.min(...a.map(c=>c.length-c.trimStart().length)),u=a.map(c=>c.slice(o)).map(c=>" ".repeat(this.indent*2)+c);for(const c of u)this.content.push(c)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(` 57`))}}const wN={major:4,minor:4,patch:3},ot=V("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wN;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const o of a)for(const u of o._zod.onattach)u(e);if(a.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(c,h,f)=>{let g=Ba(c),m;for(const y of h){if(y._zod.def.when){if(Ez(c)||!y._zod.def.when(c))continue}else if(g)continue;const b=c.issues.length,_=y._zod.check(c);if(_ instanceof Promise&&f?.async===!1)throw new Za;if(m||_ instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await _,c.issues.length!==b&&(g||(g=Ba(c,b)))});else{if(c.issues.length===b)continue;g||(g=Ba(c,b))}}return m?m.then(()=>c):c},u=(c,h,f)=>{if(Ba(c))return c.aborted=!0,c;const g=o(h,a,f);if(g instanceof Promise){if(f.async===!1)throw new Za;return g.then(m=>e._zod.parse(m,f))}return e._zod.parse(g,f)};e._zod.run=(c,h)=>{if(h.skipChecks)return e._zod.parse(c,h);if(h.direction==="backward"){const g=e._zod.parse({value:c.value,issues:[]},{...h,skipChecks:!0});return g instanceof Promise?g.then(m=>u(m,c,h)):u(g,c,h)}const f=e._zod.parse(c,h);if(f instanceof Promise){if(h.async===!1)throw new Za;return f.then(g=>o(g,a,h))}return o(f,a,h)}}Le(e,"~standard",()=>({validate:o=>{try{const u=Az(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return Oz(e,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Yf=V("$ZodString",(e,t)=>{ot.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??rN(e._zod.bag),e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Xe=V("$ZodStringFormat",(e,t)=>{ec.init(e,t),Yf.init(e,t)}),SN=V("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=qz),Xe.init(e,t)}),EN=V("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Gb(a))}else t.pattern??(t.pattern=Gb());Xe.init(e,t)}),TN=V("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Fz),Xe.init(e,t)}),RN=V("$ZodURL",(e,t)=>{Xe.init(e,t),e._zod.check=n=>{try{const a=n.value.trim();if(!t.normalize&&t.protocol?.source===Xz.source&&!/^https?:\/\//i.test(a)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const o=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),AN=V("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Zz()),Xe.init(e,t)}),ON=V("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bz),Xe.init(e,t)}),xN=V("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Pz),Xe.init(e,t)}),kN=V("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Lz),Xe.init(e,t)}),CN=V("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Uz),Xe.init(e,t)}),jN=V("$ZodXID",(e,t)=>{t.pattern??(t.pattern=$z),Xe.init(e,t)}),zN=V("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Iz),Xe.init(e,t)}),NN=V("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=nN(t)),Xe.init(e,t)}),DN=V("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=eN),Xe.init(e,t)}),MN=V("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tN(t)),Xe.init(e,t)}),PN=V("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Hz),Xe.init(e,t)}),LN=V("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Vz),Xe.init(e,t),e._zod.bag.format="ipv4"}),UN=V("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Kz),Xe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),$N=V("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Jz),Xe.init(e,t)}),IN=V("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Yz),Xe.init(e,t),e._zod.check=n=>{const a=n.value.split("/");try{if(a.length!==2)throw new Error;const[o,u]=a;if(!u)throw new Error;const c=Number(u);if(`${c}`!==u)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function _w(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const BN=V("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qz),Xe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{_w(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function HN(e){if(!pw.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return _w(n)}const qN=V("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=pw),Xe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{HN(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),FN=V("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Wz),Xe.init(e,t)});function GN(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[a]=n;if(!a)return!1;const o=JSON.parse(atob(a));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const ZN=V("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=n=>{GN(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ww=V("$ZodNumber",(e,t)=>{ot.init(e,t),e._zod.pattern=e._zod.bag.pattern??aN,e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...u?{received:u}:{}}),n}}),VN=V("$ZodNumberFormat",(e,t)=>{uN.init(e,t),ww.init(e,t)}),KN=V("$ZodUnknown",(e,t)=>{ot.init(e,t),e._zod.parse=n=>n}),JN=V("$ZodNever",(e,t)=>{ot.init(e,t),e._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Zb(e,t,n){e.issues.length&&t.issues.push(...cw(n,e.issues)),t.value[n]=e.value}const YN=V("$ZodArray",(e,t)=>{ot.init(e,t),e._zod.parse=(n,a)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let c=0;c<o.length;c++){const h=o[c],f=t.element._zod.run({value:h,issues:[]},a);f instanceof Promise?u.push(f.then(g=>Zb(g,n,c))):Zb(f,n,c)}return u.length?Promise.all(u).then(()=>n):n}});function Lu(e,t,n,a,o,u){const c=n in a;if(e.issues.length){if(o&&u&&!c)return;t.issues.push(...cw(n,e.issues))}if(!c&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?c&&(t.value[n]=void 0):t.value[n]=e.value}function Sw(e){const t=Object.keys(e.shape);for(const a of t)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=pz(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ew(e,t,n,a,o,u){const c=[],h=o.keySet,f=o.catchall._zod,g=f.def.type,m=f.optin==="optional",y=f.optout==="optional";for(const b in t){if(b==="__proto__"||h.has(b))continue;if(g==="never"){c.push(b);continue}const _=f.run({value:t[b],issues:[]},a);_ instanceof Promise?e.push(_.then(w=>Lu(w,n,b,t,m,y))):Lu(_,n,b,t,m,y)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const QN=V("$ZodObject",(e,t)=>{if(ot.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const h=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...h};return Object.defineProperty(t,"shape",{value:f}),f}})}const a=Ff(()=>Sw(t));Le(e._zod,"propValues",()=>{const h=t.shape,f={};for(const g in h){const m=h[g]._zod;if(m.values){f[g]??(f[g]=new Set);for(const y of m.values)f[g].add(y)}}return f});const o=Pu,u=t.catchall;let c;e._zod.parse=(h,f)=>{c??(c=a.value);const g=h.value;if(!o(g))return h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h;h.value={};const m=[],y=c.shape;for(const b of c.keys){const _=y[b],w=_._zod.optin==="optional",A=_._zod.optout==="optional",E=_._zod.run({value:g[b],issues:[]},f);E instanceof Promise?m.push(E.then(O=>Lu(O,h,b,g,w,A))):Lu(E,h,b,g,w,A)}return u?Ew(m,g,h,f,a.value,e):m.length?Promise.all(m).then(()=>h):h}}),XN=V("$ZodObjectJIT",(e,t)=>{QN.init(e,t);const n=e._zod.parse,a=Ff(()=>Sw(t)),o=b=>{const _=new _N(["shape","payload","ctx"]),w=a.value,A=j=>{const D=Fb(j);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};_.write("const input = payload.value;");const E=Object.create(null);let O=0;for(const j of w.keys)E[j]=`key_${O++}`;_.write("const newResult = {};");for(const j of w.keys){const D=E[j],K=Fb(j),J=b[j],I=J?._zod?.optin==="optional",F=J?._zod?.optout==="optional";_.write(`const ${D} = ${A(j)};`),I&&F?_.write(` 58 if (${D}.issues.length) { 59 if (${K} in input) { 60 payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ 61 ...iss, 62 path: iss.path ? [${K}, ...iss.path] : [${K}] 63 }))); 64 } 65 } 66 67 if (${D}.value === undefined) { 68 if (${K} in input) { 69 newResult[${K}] = undefined; 70 } 71 } else { 72 newResult[${K}] = ${D}.value; 73 } 74 75 `):I?_.write(` 76 if (${D}.issues.length) { 77 payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ 78 ...iss, 79 path: iss.path ? [${K}, ...iss.path] : [${K}] 80 }))); 81 } 82 83 if (${D}.value === undefined) { 84 if (${K} in input) { 85 newResult[${K}] = undefined; 86 } 87 } else { 88 newResult[${K}] = ${D}.value; 89 } 90 91 `):_.write(` 92 const ${D}_present = ${K} in input; 93 if (${D}.issues.length) { 94 payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ 95 ...iss, 96 path: iss.path ? [${K}, ...iss.path] : [${K}] 97 }))); 98 } 99 if (!${D}_present && !${D}.issues.length) { 100 payload.issues.push({ 101 code: "invalid_type", 102 expected: "nonoptional", 103 input: undefined, 104 path: [${K}] 105 }); 106 } 107 108 if (${D}_present) { 109 if (${D}.value === undefined) { 110 newResult[${K}] = undefined; 111 } else { 112 newResult[${K}] = ${D}.value; 113 } 114 } 115 116 `)}_.write("payload.value = newResult;"),_.write("return payload;");const N=_.compile();return(j,D)=>N(b,j,D)};let u;const c=Pu,h=!qf.jitless,g=h&&dz.value,m=t.catchall;let y;e._zod.parse=(b,_)=>{y??(y=a.value);const w=b.value;return c(w)?h&&g&&_?.async===!1&&_.jitless!==!0?(u||(u=o(t.shape)),b=u(b,_),m?Ew([],w,b,_,y,e):b):n(b,_):(b.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),b)}});function Vb(e,t,n,a){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!Ba(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(c=>Us(c,a,Ls())))}),t)}const WN=V("$ZodUnion",(e,t)=>{ot.init(e,t),Le(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Le(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Le(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Le(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${a.map(o=>Zf(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(a,o)=>{if(n)return n(a,o);let u=!1;const c=[];for(const h of t.options){const f=h._zod.run({value:a.value,issues:[]},o);if(f instanceof Promise)c.push(f),u=!0;else{if(f.issues.length===0)return f;c.push(f)}}return u?Promise.all(c).then(h=>Vb(h,a,e,o)):Vb(c,a,e,o)}}),eD=V("$ZodIntersection",(e,t)=>{ot.init(e,t),e._zod.parse=(n,a)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},a),c=t.right._zod.run({value:o,issues:[]},a);return u instanceof Promise||c instanceof Promise?Promise.all([u,c]).then(([f,g])=>Kb(n,f,g)):Kb(n,u,c)}});function _f(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ao(e)&&Ao(t)){const n=Object.keys(t),a=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of a){const c=_f(e[u],t[u]);if(!c.valid)return{valid:!1,mergeErrorPath:[u,...c.mergeErrorPath]};o[u]=c.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let a=0;a<e.length;a++){const o=e[a],u=t[a],c=_f(o,u);if(!c.valid)return{valid:!1,mergeErrorPath:[a,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Kb(e,t,n){const a=new Map;let o;
vendor: 4,118 bytes, line 116
116for(const h of t.issues)if(h.code==="unrecognized_keys"){o??(o=h);for(const f of h.keys)a.has(f)||a.set(f,{}),a.get(f).l=!0}else e.issues.push(h);for(const h of n.issues)if(h.code==="unrecognized_keys")for(const f of h.keys)a.has(f)||a.set(f,{}),a.get(f).r=!0;else e.issues.push(h);const u=[...a].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(u.length&&o&&e.issues.push({...o,keys:u}),Ba(e))return e;const c=_f(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const tD=V("$ZodEnum",(e,t)=>{ot.init(e,t);const n=ow(t.entries),a=new Set(n);e._zod.values=a,e._zod.pattern=new RegExp(`^(${n.filter(o=>fz.has(typeof o)).map(o=>typeof o=="string"?Ya(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const c=o.value;return a.has(c)||o.issues.push({code:"invalid_value",values:n,input:c,inst:e}),o}}),nD=V("$ZodLiteral",(e,t)=>{if(ot.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(a=>typeof a=="string"?Ya(a):a?Ya(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,o)=>{const u=a.value;return n.has(u)||a.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),a}}),rD=V("$ZodTransform",(e,t)=>{ot.init(e,t),e._zod.optin="optional",e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new iw(e.constructor.name);const o=t.transform(n.value,n);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(n.value=c,n.fallback=!0,n));if(o instanceof Promise)throw new Za;return n.value=o,n.fallback=!0,n}});function Jb(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Tw=V("$ZodOptional",(e,t)=>{ot.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Le(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Zf(n.source)})?$`):void 0}),e._zod.parse=(n,a)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,u=t.innerType._zod.run(n,a);return u instanceof Promise?u.then(c=>Jb(c,o)):Jb(u,o)}return n.value===void 0?n:t.innerType._zod.run(n,a)}}),sD=V("$ZodExactOptional",(e,t)=>{Tw.init(e,t),Le(e._zod,"values",()=>t.innerType._zod.values),Le(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,a)=>t.innerType._zod.run(n,a)}),aD=V("$ZodNullable",(e,t)=>{ot.init(e,t),Le(e._zod,"optin",()=>t.innerType._zod.optin),Le(e._zod,"optout",()=>t.innerType._zod.optout),Le(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Zf(n.source)}|null)$`):void 0}),Le(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,a)=>n.value===null?n:t.innerType._zod.run(n,a)}),iD=V("$ZodDefault",(e,t)=>{ot.init(e,t),e._zod.optin="optional",Le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>Yb(u,t)):Yb(o,t)}});function Yb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const oD=V("$ZodPrefault",(e,t)=>{ot.init(e,t),e._zod.optin="optional",Le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>(a.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,a))}),lD=V("$ZodNonOptional",(e,t)=>{ot.init(e,t),Le(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(a=>a!==void 0)):void 0}),e._zod.parse=(n,a)=>{const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>Qb(u,e)):Qb(o,e)}});function Qb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const uD=V("$ZodCatch",(e,t)=>{ot.init(e,t),e._zod.optin="optional",Le(e._zod,"optout",()=>t.innerType._zod.optout),Le(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,a)=>
vendor: 11,444 bytes, lines 116-118
116{if(a.direction==="backward")return t.innerType._zod.run(n,a);const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(c=>Us(c,a,Ls()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Us(u,a,Ls()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),cD=V("$ZodPipe",(e,t)=>{ot.init(e,t),Le(e._zod,"values",()=>t.in._zod.values),Le(e._zod,"optin",()=>t.in._zod.optin),Le(e._zod,"optout",()=>t.out._zod.optout),Le(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,a)=>{if(a.direction==="backward"){const u=t.out._zod.run(n,a);return u instanceof Promise?u.then(c=>fu(c,t.in,a)):fu(u,t.in,a)}const o=t.in._zod.run(n,a);return o instanceof Promise?o.then(u=>fu(u,t.out,a)):fu(o,t.out,a)}});function fu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const hD=V("$ZodReadonly",(e,t)=>{ot.init(e,t),Le(e._zod,"propValues",()=>t.innerType._zod.propValues),Le(e._zod,"values",()=>t.innerType._zod.values),Le(e._zod,"optin",()=>t.innerType?._zod?.optin),Le(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,a)=>{if(a.direction==="backward")return t.innerType._zod.run(n,a);const o=t.innerType._zod.run(n,a);return o instanceof Promise?o.then(Xb):Xb(o)}});function Xb(e){return e.value=Object.freeze(e.value),e}const dD=V("$ZodCustom",(e,t)=>{Xt.init(e,t),ot.init(e,t),e._zod.parse=(n,a)=>n,e._zod.check=n=>{const a=n.value,o=t.fn(a);if(o instanceof Promise)return o.then(u=>Wb(u,n,a,e));Wb(o,n,a,e)}});function Wb(e,t,n,a){if(!e){const o={code:"custom",input:n,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(o.params=a._zod.def.params),t.issues.push(Oo(o))}}var e0;class fD{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const a=n[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const a={...this.get(n)??{}};delete a.id;const o={...a,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function pD(){return new fD}(e0=globalThis).__zod_globalRegistry??(e0.__zod_globalRegistry=pD());const oo=globalThis.__zod_globalRegistry;function gD(e,t){return new e({type:"string",...ue(t)})}function mD(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ue(t)})}function t0(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ue(t)})}function yD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(t)})}function vD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(t)})}function bD(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(t)})}function _D(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(t)})}function wD(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(t)})}function SD(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(t)})}function ED(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(t)})}function TD(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(t)})}function RD(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(t)})}function AD(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(t)})}function OD(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ue(t)})}function xD(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(t)})}function kD(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(t)})}function CD(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(t)})}function jD(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(t)})}function zD(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(t)})}function ND(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ue(t)})}function DD(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(t)})}function MD(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ue(t)})}function PD(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(t)})}function LD(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(t)})}function UD(e,t){return new e({type:"string",format:"date",check:"string_format",...ue(t)})}function $D(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ue(t)})}function ID(e,t){return new e({type:"string",format:"duration",check:"string_format",...ue(t)})}function BD(e,t){return new e({type:"number",checks:[],...ue(t)})}function HD(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(t)})}function qD(e){return new e({type:"unknown"})}function FD(e,t){return new e({type:"never",...ue(t)})}function n0(e,t){return new vw({check:"less_than",...ue(t),value:e,inclusive:!1})}function $d(e,t){return new vw({check:"less_than",...ue(t),value:e,inclusive:!0})}function r0(e,t){return new bw({check:"greater_than",...ue(t),value:e,inclusive:!1})}function Id(e,t){return new bw({check:"greater_than",...ue(t),value:e,inclusive:!0})}function s0(e,t){return new lN({check:"multiple_of",...ue(t),value:e})}function Rw(e,t){return new cN({check:"max_length",...ue(t),maximum:e})}function Uu(e,t){return new hN({check:"min_length",...ue(t),minimum:e})}function Aw(e,t){return new dN({check:"length_equals",...ue(t),length:e})}function GD(e,t){return new fN({check:"string_format",format:"regex",...ue(t),pattern:e})}function ZD(e){return new pN({check:"string_format",format:"lowercase",...ue(e)})}function VD(e){return new gN({check:"string_format",format:"uppercase",...ue(e)})}function KD(e,t){return new mN({check:"string_format",format:"includes",...ue(t),includes:e})}function JD(e,t){return new yN({check:"string_format",format:"starts_with",...ue(t),prefix:e})}function YD(e,t){return new vN({check:"string_format",format:"ends_with",...ue(t),suffix:e})}function Wa(e){return new bN({check:"overwrite",tx:e})}function QD(e){return Wa(t=>t.normalize(e))}function XD(){return Wa(e=>e.trim())}function WD(){return Wa(e=>e.toLowerCase())}function eM(){return Wa(e=>e.toUpperCase())}function tM(){return Wa(e=>hz(e))}function nM(e,t,n){return new e({type:"array",element:t,...ue(n)})}function rM(e,t,n){const a=ue(n);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:t,...a})}function sM(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ue(n)})}function aM(e,t){const n=iM(a=>(a.addIssue=o=>{if(typeof o=="string")a.issues.push(Oo(o,a.value,n._zod.def));else{const u=o;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=a.value),u.inst??(u.inst=n),u.continue??(u.continue=!n._zod.def.abort),a.issues.push(Oo(u))}},e(a.value,a)),t);return n}function iM(e,t){const n=new Xt({check:"custom",...ue(t)});return n._zod.check=e,n}function Ow(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??oo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Dt(e,t,n={path:[],schemaPath:[]}){var a;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const h=e._zod.toJSONSchema?.();if(h)c.schema=h;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const b=c.schema,_=t.processors[o.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);_(e,t,b,m)}const y=e._zod.parent;y&&(c.ref||(c.ref=y),Dt(y,t,m),t.seen.get(y).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(c.schema,f),t.io==="input"&&$t(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&"_prefault"in c.schema&&((a=c.schema).default??(a.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function xw(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const c of e.seen.entries()){const h=e.metadataRegistry.get(c[0])?.id;if(h){const f=a.get(h);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(h,c[0])}}const o=c=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(c[0])?.id,b=e.external.uri??(w=>w);if(y)return{ref:b(y)};const _=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=_,{defId:_,ref:`${b("__shared")}#/${h}/${_}`}}if(c[1]===n)return{ref:"#"};const g=`#/${h}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:g+m}},u=c=>{if(c[1].schema.$ref)return;const h=c[1],{ref:f,defId:g}=o(c);h.def={...h.schema},g&&(h.defId=g);const m=h.schema;for(const y in m)delete m[y];m.$ref=f};if(e.cycles==="throw")for(const c of e.seen.entries()){const h=c[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root> 117 118Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const h=c[1];if(t===c[0]){u(c);continue}if(e.external){const g=e.external.registry.get(c[0])?.id;if(t!==c[0]&&g){u(c);continue}}if(e.metadataRegistry.get(c[0])?.id){u(c);continue}if(h.cycle){u(c);continue}if(h.count>1&&e.reused==="ref"){u(c);continue}}}function kw(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=h=>{const f=e.seen.get(h);if(f.ref===null)return;const g=f.def??f.schema,m={...g},y=f.ref;if(f.ref=null,y){a(y);const _=e.seen.get(y),w=_.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(w)):Object.assign(g,w),Object.assign(g,m),h._zod.parent===y)for(const E in g)E==="$ref"||E==="allOf"||E in m||delete g[E];if(w.$ref&&_.def)for(const E in g)E==="$ref"||E==="allOf"||E in _.def&&JSON.stringify(g[E])===JSON.stringify(_.def[E])&&delete g[E]}const b=h._zod.parent;if(b&&b!==y){a(b);const _=e.seen.get(b);if(_?.schema.$ref&&(g.$ref=_.schema.$ref,_.def))for(const w in g)w==="$ref"||w==="allOf"||w in _.def&&JSON.stringify(g[w])===JSON.stringify(_.def[w])&&delete g[w]}e.override({zodSchema:h,jsonSchema:g,path:f.path??[]})};for(const h of[...e.seen.entries()].reverse())a(h[0]);const o={};
118if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const h=e.external.registry.get(t)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(h)}Object.assign(o,n.def??n.schema);const u=e.metadataRegistry.get(t)?.id;u!==void 0&&o.id===u&&delete o.id;const c=e.external?.defs??{};for(const h of e.seen.entries()){const f=h[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?o.$defs=c:o.definitions=c);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...t["~standard"],jsonSchema:{input:$u(t,"input",e.processors),output:$u(t,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function $t(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return $t(a.element,n);if(a.type==="set")return $t(a.valueType,n);if(a.type==="lazy")return $t(a.getter(),n);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return $t(a.innerType,n);if(a.type==="intersection")return $t(a.left,n)||$t(a.right,n);if(a.type==="record"||a.type==="map")return $t(a.keyType,n)||$t(a.valueType,n);if(a.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:$t(a.in,n)||$t(a.out,n);if(a.type==="object"){for(const o in a.shape)if($t(a.shape[o],n))return!0;return!1}if(a.type==="union"){for(const o of a.options)if($t(o,n))return!0;return!1}if(a.type==="tuple"){for(const o of a.items)if($t(o,n))return!0;return!!(a.rest&&$t(a.rest,n))}return!1}const oM=(e,t={})=>n=>{const a=Ow({...n,processors:t});return Dt(e,a),xw(a,e),kw(a,e)},$u=(e,t,n={})=>a=>{const{libraryOptions:o,target:u}=a??{},c=Ow({...o??{},target:u,io:t,processors:n});return Dt(e,c),xw(c,e),kw(c,e)},lM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uM=(e,t,n,a)=>{const o=n;o.type="string";const{minimum:u,maximum:c,format:h,patterns:f,contentEncoding:g}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof c=="number"&&(o.maxLength=c),h&&(o.format=lM[h]??h,o.format===""&&delete o.format,h==="time"&&delete o.format),g&&(o.contentEncoding=g),f&&f.size>0){const m=[...f];m.length===1?o.pattern=m[0].source:m.length>1&&(o.allOf=[...m.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},cM=(e,t,n,a)=>{const o=n,{minimum:u,maximum:c,format:h,multipleOf:f,exclusiveMaximum:g,exclusiveMinimum:m}=e._zod.bag;typeof h=="string"&&h.includes("int")?o.type="integer":o.type="number";const y=typeof m=="number"&&m>=(u??Number.NEGATIVE_INFINITY),b=typeof g=="number"&&g<=(c??Number.POSITIVE_INFINITY),_=t.target==="draft-04"||t.target==="openapi-3.0";y?_?(o.minimum=m,o.exclusiveMinimum=!0):o.exclusiveMinimum=m:typeof u=="number"&&(o.minimum=u),b?_?(o.maximum=g,o.exclusiveMaximum=!0):o.exclusiveMaximum=g:typeof c=="number"&&(o.maximum=c),typeof f=="number"&&(o.multipleOf=f)},hM=(e,t,n,a)=>{n.not={}},dM=(e,t,n,a)=>{},fM=(e,t,n,a)=>{const o=e._zod.def,u=ow(o.entries);u.every(c=>typeof c=="number")&&(n.type="number"),u.every(c=>typeof c=="string")&&(n.type="string"),n.enum=u},pM=(e,t,n,a)=>{const o=e._zod.def,u=[];for(const c of o.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(c))}else u.push(c);if(u.length!==0)if(u.length===1){const c=u[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else u.every(c=>typeof c=="number")&&(n.type="number"),u.every(c=>typeof c=="string")&&(n.type="string"),u.every(c=>typeof c=="boolean")&&(n.type="boolean"),u.every(c=>c===null)&&(n.type="null"),n.enum=u},gM=(e,t,n,a)=>
118{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},mM=(e,t,n,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yM=(e,t,n,a)=>{const o=n,u=e._zod.def,{minimum:c,maximum:h}=e._zod.bag;typeof c=="number"&&(o.minItems=c),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=Dt(u.element,t,{...a,path:[...a.path,"items"]})},vM=(e,t,n,a)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const c=u.shape;for(const g in c)o.properties[g]=Dt(c[g],t,{...a,path:[...a.path,"properties",g]});const h=new Set(Object.keys(c)),f=new Set([...h].filter(g=>{const m=u.shape[g]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));f.size>0&&(o.required=Array.from(f)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=Dt(u.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},bM=(e,t,n,a)=>{const o=e._zod.def,u=o.inclusive===!1,c=o.options.map((h,f)=>Dt(h,t,{...a,path:[...a.path,u?"oneOf":"anyOf",f]}));u?n.oneOf=c:n.anyOf=c},_M=(e,t,n,a)=>{const o=e._zod.def,u=Dt(o.left,t,{...a,path:[...a.path,"allOf",0]}),c=Dt(o.right,t,{...a,path:[...a.path,"allOf",1]}),h=g=>"allOf"in g&&Object.keys(g).length===1,f=[...h(u)?u.allOf:[u],...h(c)?c.allOf:[c]];n.allOf=f},wM=(e,t,n,a)=>{const o=e._zod.def,u=Dt(o.innerType,t,a),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},SM=(e,t,n,a)=>{const o=e._zod.def;Dt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},EM=(e,t,n,a)=>{const o=e._zod.def;Dt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},TM=(e,t,n,a)=>{const o=e._zod.def;Dt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},RM=(e,t,n,a)=>{const o=e._zod.def;Dt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType;let c;try{c=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},AM=(e,t,n,a)=>{const o=e._zod.def,u=o.in._zod.traits.has("$ZodTransform"),c=t.io==="input"?u?o.out:o.in:o.out;Dt(c,t,a);const h=t.seen.get(e);h.ref=c},OM=(e,t,n,a)=>{const o=e._zod.def;Dt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},Cw=(e,t,n,a)=>{const o=e._zod.def;Dt(o.innerType,t,a);const u=t.seen.get(e);u.ref=o.innerType},xM=V("ZodISODateTime",(e,t)=>{NN.init(e,t),We.init(e,t)});function kM(e){return LD(xM,e)}const CM=V("ZodISODate",(e,t)=>{DN.init(e,t),We.init(e,t)});function jM(e){return UD(CM,e)}const zM=V("ZodISOTime",(e,t)=>{MN.init(e,t),We.init(e,t)});function NM(e){return $D(zM,e)}const DM=V("ZodISODuration",(e,t)=>{PN.init(e,t),We.init(e,t)});function MM(e){return ID(DM,e)}const PM=(e,t)=>{dw.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Rz(e,n)},flatten:{value:n=>Tz(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bf,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Sn=V("ZodError",PM,{Parent:Error}),LM=Kf(Sn),UM=Jf(Sn),$M=Xu(Sn),IM=Wu(Sn),BM=xz(Sn),HM=kz(Sn),qM=Cz(Sn),FM=jz(Sn),GM=zz(Sn),ZM=Nz(Sn),VM=Dz(Sn),KM=Mz(Sn),a0=new WeakMap;function zo(e,t,n){const a=Object.getPrototypeOf(e);let o=a0.get(a);if(o||(o=new Set,a0.set(a,o)),!o.has(t)){o.add(t);for(const u in n){const c=n[u];Object.defineProperty(a,u,{configurable:!0,enumerable:!1,get(){const h=c.bind(this);return Object.defineProperty(this,u,{configurable:!0,writable:!0,enumerable:!0,value:h}),h},set(h){Object.defineProperty(this,u,{configurable:!0,writable:!0,enumerable:!0,value:h})}})}}}const lt=V("ZodType",(e,t)=>(ot.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:$u(e,"input"),output:$u(e,"output")}}),e.toJSONSchema=oM(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,a)=>LM(e,n,a,{callee:e.parse}),e.safeParse=(n,a)=>$M(e,n,a),e.parseAsync=async(n,a)=>UM(e,n,a,{callee:e.parseAsync}),e.safeParseAsync=async(n,a)=>IM(e,n,a),e.spa=e.safeParseAsync,e.encode=(n,a)=>BM(e,n,a),e.decode=(n,a)=>HM(e,n,a),e.encodeAsync=async(n,a)=>qM(e,n,a),e.decodeAsync=async(n,a)=>FM(e,n,a),e.safeEncode=(n,a)=>GM(e,n,a),e.safeDecode=(n,a)=>ZM(e,n,a),e.safeEncodeAsync=async(n,a)=>VM(e,n,a),e.safeDecodeAsync=async(n,a)=>
118KM(e,n,a),zo(e,"ZodType",{check(...n){const a=this.def;return this.clone(rs(a,{checks:[...a.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,a){return ss(this,n,a)},brand(){return this},register(n,a){return n.add(this,a),this},refine(n,a){return this.check(qP(n,a))},superRefine(n,a){return this.check(FP(n,a))},overwrite(n){return this.check(Wa(n))},optional(){return u0(this)},exactOptional(){return CP(this)},nullable(){return c0(this)},nullish(){return u0(c0(this))},nonoptional(n){return PP(this,n)},array(){return bP(this)},or(n){return SP([this,n])},and(n){return TP(this,n)},transform(n){return h0(this,xP(n))},default(n){return NP(this,n)},prefault(n){return MP(this,n)},catch(n){return UP(this,n)},pipe(n){return h0(this,n)},readonly(){return BP(this)},describe(n){const a=this.clone();return oo.add(a,{description:n}),a},meta(...n){if(n.length===0)return oo.get(this);const a=this.clone();return oo.add(a,n[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return oo.get(e)?.description},configurable:!0}),e)),jw=V("_ZodString",(e,t)=>{Yf.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>uM(e,a,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,zo(e,"_ZodString",{regex(...a){return this.check(GD(...a))},includes(...a){return this.check(KD(...a))},startsWith(...a){return this.check(JD(...a))},endsWith(...a){return this.check(YD(...a))},min(...a){return this.check(Uu(...a))},max(...a){return this.check(Rw(...a))},length(...a){return this.check(Aw(...a))},nonempty(...a){return this.check(Uu(1,...a))},lowercase(a){return this.check(ZD(a))},uppercase(a){return this.check(VD(a))},trim(){return this.check(XD())},normalize(...a){return this.check(QD(...a))},toLowerCase(){return this.check(WD())},toUpperCase(){return this.check(eM())},slugify(){return this.check(tM())}})}),JM=V("ZodString",(e,t)=>{Yf.init(e,t),jw.init(e,t),e.email=n=>e.check(mD(YM,n)),e.url=n=>e.check(wD(QM,n)),e.jwt=n=>e.check(PD(dP,n)),e.emoji=n=>e.check(SD(XM,n)),e.guid=n=>e.check(t0(i0,n)),e.uuid=n=>e.check(yD(pu,n)),e.uuidv4=n=>e.check(vD(pu,n)),e.uuidv6=n=>e.check(bD(pu,n)),e.uuidv7=n=>e.check(_D(pu,n)),e.nanoid=n=>e.check(ED(WM,n)),e.guid=n=>e.check(t0(i0,n)),e.cuid=n=>e.check(TD(eP,n)),e.cuid2=n=>e.check(RD(tP,n)),e.ulid=n=>e.check(AD(nP,n)),e.base64=n=>e.check(ND(uP,n)),e.base64url=n=>e.check(DD(cP,n)),e.xid=n=>e.check(OD(rP,n)),e.ksuid=n=>e.check(xD(sP,n)),e.ipv4=n=>e.check(kD(aP,n)),e.ipv6=n=>e.check(CD(iP,n)),e.cidrv4=n=>e.check(jD(oP,n)),e.cidrv6=n=>e.check(zD(lP,n)),e.e164=n=>e.check(MD(hP,n)),e.datetime=n=>e.check(kM(n)),e.date=n=>e.check(jM(n)),e.time=n=>e.check(NM(n)),e.duration=n=>e.check(MM(n))});function wf(e){return gD(JM,e)}const We=V("ZodStringFormat",(e,t)=>{Xe.init(e,t),jw.init(e,t)}),YM=V("ZodEmail",(e,t)=>{TN.init(e,t),We.init(e,t)}),i0=V("ZodGUID",(e,t)=>{SN.init(e,t),We.init(e,t)}),pu=V("ZodUUID",(e,t)=>{EN.init(e,t),We.init(e,t)}),QM=V("ZodURL",(e,t)=>{RN.init(e,t),We.init(e,t)}),XM=V("ZodEmoji",(e,t)=>{AN.init(e,t),We.init(e,t)}),WM=V("ZodNanoID",(e,t)=>{ON.init(e,t),We.init(e,t)}),eP=V("ZodCUID",(e,t)=>{xN.init(e,t),We.init(e,t)}),tP=V("ZodCUID2",(e,t)=>{kN.init(e,t),We.init(e,t)}),nP=V("ZodULID",(e,t)=>{CN.init(e,t),We.init(e,t)}),rP=V("ZodXID",(e,t)=>{jN.init(e,t),We.init(e,t)}),sP=V("ZodKSUID",(e,t)=>{zN.init(e,t),We.init(e,t)}),aP=V("ZodIPv4",(e,t)=>{LN.init(e,t),We.init(e,t)}),iP=V("ZodIPv6",(e,t)=>{UN.init(e,t),We.init(e,t)}),oP=V("ZodCIDRv4",(e,t)=>{$N.init(e,t),We.init(e,t)}),lP=V("ZodCIDRv6",(e,t)=>{IN.init(e,t),We.init(e,t)}),uP=V("ZodBase64",(e,t)=>{BN.init(e,t),We.init(e,t)}),cP=V("ZodBase64URL",(e,t)=>{qN.init(e,t),We.init(e,t)}),hP=V("ZodE164",(e,t)=>{FN.init(e,t),We.init(e,t)}),dP=V("ZodJWT",(e,t)=>{ZN.init(e,t),We.init(e,t)}),zw=V("ZodNumber",(e,t)=>{ww.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>cM(e,a,o),zo(e,"ZodNumber",{gt(a,o){return this.check(r0(a,o))},gte(a,o){return this.check(Id(a,o))},min(a,o){return this.check(Id(a,o))},lt(a,o){return this.check(n0(a,o))},lte(a,o){return this.check($d(a,o))},max(a,o){return this.check($d(a,o))},int(a){return this.check(o0(a))},safe(a){return this.check(o0(a))},positive(a){return this.check(r0(0,a))},nonnegative(a){return this.check(Id(0,a))},negative(a){return this.check(n0(0,a))},nonpositive(a){return this.check($d(0,a))},multipleOf(a,o){return this.check(s0(a,o))},step(a,o){return this.check(s0(a,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function fP(e){return BD(zw,e)}const pP=V("ZodNumberFormat",(e,t)=>{VN.init(e,t),zw.init(e,t)});function o0(e){return HD(pP,e)}const gP=V("ZodUnknown",(e,t)=>{KN.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>dM()});function l0(){return qD(gP)}const mP=V("ZodNever",(e,t)=>{JN.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>hM(e,n,a)});function yP(e){return FD(mP,e)}const vP=V("ZodArray",(e,t)=>{YN.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>yM(e,n,a,o),e.element=t.element,zo(e,"ZodArray",{min(n,a){return this.check(Uu(n,a))},nonempty(n){return this.check(Uu(1,n))},max(n,a){return this.check(Rw(n,a))},length(n,a){return this.check(Aw(n,a))},unwrap(){return this.element}})});function bP(e,t){return nM(vP,e,t)}const _P=V("ZodObject",(e,t)=>{XN.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>vM(e,n,a,o),Le(e,"shape",()=>t.shape),zo(e,"ZodObject",{keyof(){return RP(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:l0()})},loose(){return this.clone({...this._zod.def,catchall:l0()})},strict(){return this.clone({...this._zod.def,catchall:yP()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return vz(this,n)},safeExtend(n){return bz(this,n)},merge(n){return _z(this,n)},pick(n){return mz(this,n)},omit(n){return yz(this,n)},partial(...n){return wz(Dw,this,n[0])},required(...n){return Sz(Mw,this,n[0])}})});function Nw(e,t){const n={type:"object",shape:e??{},...ue(t)};return new _P(n)}const wP=V("ZodUnion",(e,t)=>{WN.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>bM(e,n,a,o),e.options=t.options});function SP(e,t){return new wP({type:"union",options:e,...ue(t)})}const EP=V("ZodIntersection",(e,t)=>{eD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>_M(e,n,a,o)});function TP(e,t){return new EP({type:"intersection",left:e,right:t})}const Sf=V("ZodEnum",(e,t)=>{tD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(a,o,u)=>fM(e,a,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(a,o)=>{const u={};for(const c of a)if(n.has(c))u[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new Sf({...t,checks:[],...ue(o),entries:u})},e.exclude=(a,o)=>{const u={...t.entries};for(const c of a)if(n.has(c))delete u[c];else throw new Error(`Key ${c} not found in enum`);return new Sf({...t,checks:[],...ue(o),entries:u})}});function RP(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Sf({type:"enum",entries:n,...ue(t)})}const AP=V("ZodLiteral",(e,t)=>{nD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>pM(e,n,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
118(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function PU(e,t){return new AP({type:"literal",values:Array.isArray(e)?e:[e],...ue(t)})}const OP=V("ZodTransform",(e,t)=>{rD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>mM(e,n),e._zod.parse=(n,a)=>{if(a.direction==="backward")throw new iw(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(Oo(u,n.value,t));else{const c=u;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(Oo(c))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function xP(e){return new OP({type:"transform",transform:e})}const Dw=V("ZodOptional",(e,t)=>{Tw.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Cw(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function u0(e){return new Dw({type:"optional",innerType:e})}const kP=V("ZodExactOptional",(e,t)=>{sD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>Cw(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function CP(e){return new kP({type:"optional",innerType:e})}const jP=V("ZodNullable",(e,t)=>{aD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>wM(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function c0(e){return new jP({type:"nullable",innerType:e})}const zP=V("ZodDefault",(e,t)=>{iD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>EM(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function NP(e,t){return new zP({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():uw(t)}})}const DP=V("ZodPrefault",(e,t)=>{oD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>TM(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function MP(e,t){return new DP({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():uw(t)}})}const Mw=V("ZodNonOptional",(e,t)=>{lD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>SM(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function PP(e,t){return new Mw({type:"nonoptional",innerType:e,...ue(t)})}const LP=V("ZodCatch",(e,t)=>{uD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>RM(e,n,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function UP(e,t){return new LP({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const $P=V("ZodPipe",(e,t)=>{cD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>AM(e,n,a,o),e.in=t.in,e.out=t.out});function h0(e,t){return new $P({type:"pipe",in:e,out:t})}const IP=V("ZodReadonly",(e,t)=>{hD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>OM(e,n,a,o),e.unwrap=()=>e._zod.def.innerType});function BP(e){return new IP({type:"readonly",innerType:e})}const Pw=V("ZodCustom",(e,t)=>{dD.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,a,o)=>gM(e,n)});function HP(e,t){return rM(Pw,(()=>!0),t)}function qP(e,t={}){return sM(Pw,e,t)}function FP(e,t){return aM(e,t)}var Lw=e=>{const t="input"in e?e.input:"input",n="output"in e?e.output:"output",a="schema"in e?e.schema._input
118:e._input,o="schema"in e?e.schema._output:e._output;return{types:{input:t==="output"?o:a,output:n==="input"?a:o},parse:u=>"schema"in e?e.schema.parse(u):e.parse(u)}},wu=(e,t)=>HP().pipe(e.catch(t));const GP=()=>Ge(()=>import("./unsubscribe-1h6MvP0O.js"),__vite__mapDeps([0,1])),ZP=()=>Ge(()=>import("./unsubscribe-DNNqZQ3m.js"),[]),VP=()=>Ge(()=>import("./unsubscribe-GhoERcdJ.js"),[]),KP=Nw({token:wu(wf(),"").default("")}),JP=Je("/unsubscribe")({validateSearch:Lw(KP),head:()=>({meta:[{title:"Unsubscribe | Groundwater Inc."},{name:"robots",content:"noindex"}]}),errorComponent:Fe(VP,"errorComponent"),notFoundComponent:Fe(ZP,"notFoundComponent"),component:Fe(GP,"component")}),YP=()=>Ge(()=>import("./search-console-GxrU2Q52.js"),__vite__mapDeps([2,3])),QP=Je("/search-console")({head:()=>({meta:[{title:"Google Search Console"},{name:"robots",content:"noindex, nofollow"}]}),component:Fe(YP,"component")}),XP=()=>Ge(()=>import("./reviews-V58LmWmJ.js"),__vite__mapDeps([4,5,6,7,8,9])),WP=Je("/reviews")({head:()=>({meta:[{title:"Reviews | Groundwater Inc. â Sioux Falls Landscaping"},{name:"description",content:"Read reviews from Sioux Falls homeowners and leave one of your own. Help neighbors find a landscape contractor they can trust."},{property:"og:title",content:"Reviews â Groundwater Inc."},{property:"og:description",content:"Real reviews from Sioux Empire homeowners. Leave a Google or Facebook review."},{property:"og:url",content:"/reviews"}],links:[{rel:"canonical",href:"/reviews"}]}),component:Fe(XP,"component")}),eL=Je("/review-us")({beforeLoad:()=>{throw Cn({to:"/reviews",replace:!0})}}),tL=()=>Ge(()=>import("./quote-DkB6fqsl.js"),__vite__mapDeps([10,5,11,7,9])),nL=Je("/quote")({head:()=>({meta:[{title:"Get a Free Landscape Quote | Groundwater Inc."},{name:"description",content:"Tell us about your project in four quick steps. Free on-site visit, written estimate within a week."},{property:"og:title",content:"Free Landscape Quote â Groundwater Inc."},{property:"og:description",content:"Four quick steps to your free on-site consultation."},{property:"og:url",content:"/quote"}],links:[{rel:"canonical",href:"/quote"}]}),component:Fe(tL,"component")}),rL=Je("/plants-trees-shrubs")({beforeLoad:()=>{throw Cn({to:"/services/$slug",params:{slug:"plants-trees-shrubs"},replace:!0})}}),sL=Je("/patios-and-fire-pits")({beforeLoad:()=>{throw Cn({to:"/services/$slug",params:{slug:"patios-fire-pits"},replace:!0})}}),aL=Je("/our-services")({beforeLoad:()=>{throw Cn({to:"/services",replace:!0})}}),iL=Je("/landscaping-blog")({beforeLoad:()=>{throw Cn({to:"/blog",replace:!0})}}),oL=Je("/landscape-installation")({beforeLoad:()=>{throw Cn({to:"/services/$slug",params:{slug:"landscape-installation"},replace:!0})}}),lL=Je("/landscape-design")({beforeLoad:()=>{throw Cn({to:"/services/$slug",params:{slug:"landscape-design"},replace:!0})}}),uL=Je("/irrigation-systems")({beforeLoad:()=>{throw Cn({to:"/services/$slug",params:{slug:"irrigation-systems"},replace:!0})}}),cL=()=>Ge(()=>import("./gallery-Cq-lc6EW.js"),__vite__mapDeps([12,5,8,9,13,7])),hL=Je("/gallery")({head:()=>({meta:[{title:"Landscape Gallery | Groundwater Inc. Sioux Falls"},{name:"description",content:"Browse completed landscape projects from Groundwater Inc. across Sioux Falls and the Sioux Empire."},{property:"og:title",content:"Landscape Gallery â Groundwater Inc."},{property:"og:description",content:"Patios, water features, plantings and full-yard landscapes."},{property:"og:url",content:"/gallery"}],links:[{rel:"canonical",href:"/gallery"}]}),component:Fe(cL,"component")}),dL=()=>Ge(()=>import("./contact-CuphDQB4.js"),__vite__mapDeps([14,5])),fL=Je("/contact")({head:()=>({meta:[{title:"Contact Groundwater Inc. | Sioux Falls Landscape Contractor"},{name:"description",content:"Call 605.370.3722 or send a message. Free on-site landscape consultations in Sioux Falls, SD."},{property:"og:title",content:"Contact Groundwater Inc."},{property:"og:description",content:"Free on-site landscape consultations in Sioux Falls."},{property:"og:url",content:"/contact"}],links:[{rel:"canonical",href:"/contact"}]}),component:Fe(dL,"component")}),pL=()=>Ge(()=>import("./admin-CMqJzp-H.js"),__vite__mapDeps([15,3,11,16,17,18])),gL=Je("/admin")({head:()=>({meta:[{title:"Admin â Groundwater Inc."},{name:"robots",content:"noindex, nofollow"}]}),component:Fe(pL,"component")}),mL="/assets/about-CIogwHiM.jpg",yL=()=>Ge(()=>import("./about-XS4LHcgu.js"),__vite__mapDeps([19,5,8,9])),vL=Je("/about")({head:()=>({meta:[{title:"About Groundwater Inc. | Sioux Falls Landscape Contractor"},{name:"description",content:"50 years designing, building and maintaining landscapes across Sioux Falls and the Sioux Empire."},{property:"og:title",content:"About Groundwater Inc."},{property:"og:description",content:"Fifty years of landscape craftsmanship in Sioux Falls, SD."},{property:"og:url",content:"/about"},{property:"og:image",content:mL}],links:[{rel:"canonical",href:"/about"}]}),component:Fe(yL,"component")}),bL="/assets/hero-CsqKmx6i.jpg",_L=()=>Ge(()=>import("./index-CAoTobol.js"),__vite__mapDeps([20,5,6,7,21,8,9,18])),wL=Je("/")({head:()=>({meta:[{title:"Sioux Falls Landscape & Irrigation | Groundwater Inc."},{name:"description",content:"Premium landscape design, installation and irrigation in Sioux Falls. 50 years building outdoor space
118s that last. Free on-site quotes."},{property:"og:title",content:"Groundwater Inc. â Sioux Falls Landscape & Irrigation"},{property:"og:description",content:"Award-winning landscape design and irrigation across the Sioux Empire."},{property:"og:url",content:"/"}],links:[{rel:"canonical",href:"/"},{rel:"preload",as:"image",href:bL,fetchpriority:"high"}]}),component:Fe(_L,"component")}),SL=()=>Ge(()=>import("./index-gXeFw5pu.js"),__vite__mapDeps([22,5,8,9])),EL=Je("/services/")({head:()=>({meta:[{title:"Landscaping Services in Sioux Falls | Groundwater Inc."},{name:"description",content:"Design, installation, plantings, patios, water features and irrigation â across the Sioux Empire."},{property:"og:title",content:"Landscaping Services in Sioux Falls"},{property:"og:description",content:"Full-service landscape contractor â design through irrigation."},{property:"og:url",content:"/services"}],links:[{rel:"canonical",href:"/services"}]}),component:Fe(SL,"component")}),TL=()=>Ge(()=>import("./landscaping.index-DflMOx4Q.js"),__vite__mapDeps([23,5,8,9])),RL=Je("/landscaping/")({head:()=>({meta:[{title:"Sioux Falls Area Landscaping â Service Areas | Groundwater Inc."},{name:"description",content:"Local landscape guides for Sioux Falls, Brandon, Harrisburg, Tea, Dell Rapids and Hartford. Soil, plant and design notes specific to each community."},{property:"og:title",content:"Service Areas â Groundwater Inc."},{property:"og:description",content:"Landscape design, installation and irrigation across the Sioux Falls metro and Sioux Empire region."},{property:"og:url",content:"/landscaping"}],links:[{rel:"canonical",href:"/landscaping"}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"ItemList",name:"Groundwater Inc. Service Areas",itemListElement:Hf.map((e,t)=>({"@type":"ListItem",position:t+1,name:`Landscaping in ${e.fullName}`,url:`https://www.groundwaterinc.com/landscaping/${e.slug}`}))})}]}),component:Fe(TL,"component")}),AL=Et({method:"GET"}).handler(Lt("e2cbed737503162e46e2ab3f882490859e69491c19f9c07d7dd3510044f18adc")),OL=Et({method:"GET"}).handler(Lt("c628265aac7f07bb6d940c4a7716131a62003a626c51b690af8be7d5db4f132c")),LU=Et({method:"POST"}).handler(Lt("d6016a7072d07f1e4335a588f833c292a24b7f71e21c2b71c832edcd2f69f1ab")),UU=Et({method:"POST"}).handler(Lt("2a115924484742404a8ee158c4c1b1d8fc971b0644957ef18a92a9800397a9aa")),$U=Et({method:"POST"}).handler(Lt("3b2c4a68fe4752ba34f5f8580fb43dff82d5260f9ee8169fd3d04afa434c7668")),IU=Et({method:"POST"}).handler(Lt("64046210b345862290867acb99847c0bd901f888ad1bb4c12ef33cb0e932c1ac")),BU=Et({method:"POST"}).handler(Lt("58ddd7231d2d0fff28d6c28e1d57094953c3155f607b74777fc55176470aa67d")),HU=Et({method:"POST"}).handler(Lt("558f8cd83045fe992ec58973ededcdcb716596b5ce5128cad7e1f7f53ba2c557")),qU=Et({method:"POST"}).handler(Lt("84e02eddc90ab425677d12dbaffbe722f395b7e431f02a1cec069e2a45815292")),FU=Et({method:"POST"}).handler(Lt("4c9b3f10e1cc78c2203bb6473a2b20784d8300fc3ceb63448f6053802ddabcd6")),GU=Et({method:"POST"}).handler(Lt("b05ab3c9847250ff50b2e6ebcad307b1de62cc04f457c6c17135f62f6f5d899c")),ZU=Et({method:"POST"}).handler(Lt("73caeae9d99945219cacce0bb1f79094f99a9101af5afd6b9503411bbc4a5c19")),xL={queryKey:["blog","published"],queryFn:()=>AL()},kL=()=>Ge(()=>import("./index-DYBjTMla.js"),__vite__mapDeps([24,25,5,8,9,1,17,13])),CL=()=>Ge(()=>import("./index-CD7faxzj.js"),[]),jL=()=>Ge(()=>import("./index-Bp1qfNy-.js"),[]),zL=Nw({q:wu(wf(),"").default(""),cat:wu(wf(),"All").default("All"),page:wu(fP().int().min(1),1).default(1)}),NL=Je("/blog/")({validateSearch:Lw(zL),loader:({context:e})=>e.queryClient.ensureQueryData(xL),head:()=>({meta:[{title:"Landscaping Resources & Blog | Groundwater Inc."},{name:"description",content:"Seasonal tips, irrigation guides, plant selections and hardscape know-how from a 50-year Sioux Falls landscape contractor."},{property:"og:title",content:"Landscaping Resources | Groundwater Inc."},{property:"og:description",content:"Seasonal tips, plant picks and project guides for South Dakota yards."},{property:"og:url",content:"/blog"}],links:[{rel:"canonical",href:"/blog"}]}),errorComponent:Fe(jL,"errorComponent"),notFoundComponent:Fe(CL,"notFoundComponent"),component:Fe(kL,"component")}),DL=()=>Ge(()=>import("./_slug-BbB1maCX.js"),__vite__mapDeps([26,21,7,5,8,9,11])),ML=()=>Ge(()=>import("./_slug-BKY4Xri9.js"),[]),PL=()=>Ge(()=>import("./_slug-B2xbLnEj.js"),[]),LL=Je("/services/$slug")({loader:({params:e})=>{const t=aw.find(n=>n.slug===e.slug);
118if(!t)throw Of();return{service:t}},head:({loaderData:e})=>{const t=e?.service;return t?{meta:[{title:`${t.title} in Sioux Falls | Groundwater Inc.`},{name:"description",content:t.short},{property:"og:title",content:`${t.title} â Groundwater Inc.`},{property:"og:description",content:t.short},{property:"og:url",content:`/services/${t.slug}`},{property:"og:type",content:"article"},{property:"og:image",content:t.image}],links:[{rel:"canonical",href:`/services/${t.slug}`}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Service",name:t.title,provider:{"@type":"LocalBusiness",name:"Groundwater Inc."},areaServed:"Sioux Falls, SD",description:t.blurb})}]}:{meta:[{title:"Service · Groundwater Inc."}]}},errorComponent:Fe(PL,"errorComponent"),notFoundComponent:Fe(ML,"notFoundComponent"),component:Fe(DL,"component")}),UL=()=>Ge(()=>import("./landscaping._area-C3JWxk8v.js"),__vite__mapDeps([27,21,7,5,8,9,11])),$L=()=>Ge(()=>import("./landscaping._area-DK8dp-ZF.js"),[]),IL=()=>Ge(()=>import("./landscaping._area-BwMAF9ec.js"),[]),BL=Je("/landscaping/$area")({loader:({params:e})=>{const t=X2(e.area);if(!t)throw Of();return{area:t}},head:({loaderData:e})=>{const t=e?.area;if(!t)return{meta:[{title:"Service Area · Groundwater Inc."}]};const n=`${t.city} Landscaping & Irrigation | Groundwater Inc.`,a=`/landscaping/${t.slug}`;return{meta:[{title:n},{name:"description",content:t.metaDescription},{name:"geo.region",content:`US-${t.state}`},{name:"geo.placename",content:t.city},{name:"geo.position",content:`${t.geo.lat};${t.geo.lng}`},{name:"ICBM",content:`${t.geo.lat}, ${t.geo.lng}`},{property:"og:title",content:n},{property:"og:description",content:t.metaDescription},{property:"og:url",content:a},{property:"og:type",content:"article"}],links:[{rel:"canonical",href:a}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"LocalBusiness",name:`${ye.name} â ${t.city}`,description:t.metaDescription,telephone:ye.phone,email:ye.email,url:`https://www.groundwaterinc.com${a}`,address:{"@type":"PostalAddress",streetAddress:ye.address.line1,addressLocality:ye.address.city,addressRegion:ye.address.state,postalCode:ye.address.zip,addressCountry:"US"},areaServed:{"@type":"City",name:t.city,...t.zip?{address:{"@type":"PostalAddress",addressLocality:t.city,addressRegion:t.state,postalCode:t.zip,addressCountry:"US"}}:{}},geo:{"@type":"GeoCoordinates",latitude:t.geo.lat,longitude:t.geo.lng},priceRange:"$$",openingHours:"Mo-Fr 08:00-18:00"})},{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.faqs.map(o=>
118({"@type":"Question",name:o.q,acceptedAnswer:{"@type":"Answer",text:o.a}}))})}]}},notFoundComponent:Fe(IL,"notFoundComponent"),errorComponent:Fe($L,"errorComponent"),component:Fe(UL,"component")}),HL=()=>Ge(()=>import("./admin-DuIIJiUY.js"),__vite__mapDeps([28,16,18])),qL=Je("/blog/admin")({head:()=>({meta:[{title:"Blog admin â Groundwater Inc."},{name:"robots",content:"noindex, nofollow"}]}),component:Fe(HL,"component")}),FL=e=>({queryKey:["blog","slug",e],queryFn:()=>OL({data:{slug:e}})}),GL=()=>Ge(()=>import("./_slug-adtSNb83.js"),__vite__mapDeps([29,25,8,9,13])),ZL=()=>Ge(()=>import("./_slug-zVOIeas9.js"),[]),VL=()=>Ge(()=>import("./_slug-BwQCVuyE.js"),[]),KL=Je("/blog/$slug")({loader:async({params:e,context:t})=>{const n=await t.queryClient.ensureQueryData(FL(e.slug));if(!n.post)throw Of();return n},head:({loaderData:e})=>{const t=e?.post;if(!t)return{meta:[{title:"Article â Groundwater Inc."}]};const n=t.image_url??null,a=[{title:`${t.title} | Groundwater Inc.`},{name:"description",content:t.excerpt},{property:"og:title",content:t.title},{property:"og:description",content:t.excerpt},{property:"og:type",content:"article"},{property:"og:url",content:`/blog/${t.slug}`}];return n&&(a.push({property:"og:image",content:n}),a.push({name:"twitter:image",content:n})),{meta:a,links:[{rel:"canonical",href:`/blog/${t.slug}`}],scripts:[{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:t.title,datePublished:t.published_at,image:n??void 0,author:{"@type":"Organization",name:"Groundwater Inc."}})}]}},errorComponent:Fe(VL,"errorComponent"),notFoundComponent:Fe(ZL,"notFoundComponent"),component:Fe(GL,"component")}),JL=oz.update({id:"/water-features",path:"/water-features",getParentRoute:()=>Be}),YL=JP.update({id:"/unsubscribe",path:"/unsubscribe",getParentRoute:()=>Be}),QL=QP.update({id:"/search-console",path:"/search-console",getParentRoute:()=>Be}),XL=WP.update({id:"/reviews",path:"/reviews",getParentRoute:()=>Be}),WL=eL.update({id:"/review-us",path:"/review-us",getParentRoute:()=>Be}),eU=nL.update({id:"/quote",path:"/quote",getParentRoute:()=>Be}),tU=rL.update({id:"/plants-trees-shrubs",path:"/plants-trees-shrubs",getParentRoute:()=>Be}),nU=sL.update({id:"/patios-and-fire-pits",path:"/patios-and-fire-pits",getParentRoute:()=>Be}),rU=aL.update({id:"/our-services",path:"/our-services",getParentRoute:()=>Be}),sU=iL.update({id:"/landscaping-blog",path:"/landscaping-blog",getParentRoute:()=>Be}),aU=oL.update({id:"/landscape-installation",path:"/landscape-installation",getParentRoute:()=>Be}),iU=lL.update({id:"/landscape-design",path:"/landscape-design",getParentRoute:()=>Be}),oU=uL.update({id:"/irrigation-systems",path:"/irrigation-systems",getParentRoute:()=>Be}),lU=hL.update({id:"/gallery",path:"/gallery",getParentRoute:()=>Be}),uU=fL.update({id:"/contact",path:"/contact",getParentRoute:()=>Be}),cU=gL.update({id:"/admin",path:"/admin",getParentRoute:()=>Be}),hU=vL.update({id:"/about",path:"/about",getParentRoute:()=>Be}),dU=wL.update({id:"/",path:"/",getParentRoute:()=>Be}),fU=EL.update({id:"/services/",path:"/services/",getParentRoute:()=>Be}),pU=RL.update({id:"/landscaping/",path:"/landscaping/",getParentRoute:()=>Be}),gU=NL.update({id:"/blog/",path:"/blog/",getParentRoute:()=>Be}),mU=LL.update({id:"/services/$slug",path:"/services/$slug",getParentRoute:()=>Be}),yU=BL.update({id:"/landscaping/$area",path:"/landscaping/$area",getParentRoute:()=>Be}),vU=qL.update({id:"/blog/admin",path:"/blog/admin",getParentRoute:()=>Be}),bU=KL.update({id:"/blog/$slug",path:"/blog/$slug",getParentRoute:()=>Be}),_U={IndexRoute:dU,AboutRoute:hU,AdminRoute:cU,ContactRoute:uU,GalleryRoute:lU,IrrigationSystemsRoute:oU,LandscapeDesignRoute:iU,LandscapeInstallationRoute:aU,LandscapingBlogRoute:sU,OurServicesRoute:rU,PatiosAndFirePitsRoute:nU,PlantsTreesShrubsRoute:tU,QuoteRoute:eU,ReviewUsRoute:WL,ReviewsRoute:XL,SearchConsoleRoute:QL,UnsubscribeRoute:YL,WaterFeaturesRoute:JL,BlogSlugRoute:bU,BlogAdminRoute:vU,LandscapingAreaRoute:yU,ServicesSlugRoute:mU,BlogIndexRoute:gU,LandscapingIndexRoute:pU,ServicesIndexRoute:fU},wU=Be._addFileChildren(_U),SU=()=>{const e=new c2;return wx({routeTree:wU,context:{queryClient:e},scrollRestoration:!0,defaultPreloadStaleTime:0})};async function EU(){const e=await SU();let t;if(Ab){const n=await Ab.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.seri
118alizationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(EO),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.stores.matchesId.get().length||await OO(e),e}async function TU(){const e=await EU();return window.$_TSR?.h(),e}var Bd;function RU(){return Bd||(Bd=TU()),z.jsx(jO,{promise:Bd,children:e=>z.jsx(Tx,{router:e})})}X.startTransition(()=>{fT.hydrateRoot(document,z.jsx(X.StrictMode,{children:z.jsx(RU,{})}))});export{HU as $,Et as A,Lt as B,Va as C,AU as D,T2 as E,N2 as F,DU as G,MU as H,NU as I,Hf as J,NL as K,It as L,M2 as M,m_ as N,xL as O,Bf as P,LL as Q,JP as R,ye as S,zU as T,BL as U,LU as V,UU as W,H2 as X,$U as Y,IU as Z,BU as _,aw as a,qU as a0,FU as a1,GU as a2,ZU as a3,KL as a4,FL as a5,E2 as a6,n2 as a7,jU as a8,K2 as b,Xa as c,J2 as d,V2 as e,mL as f,G2 as g,bL as h,Z2 as i,z as j,Y2 as k,PU as l,L2 as m,jo as n,Nw as o,df as p,Eo as q,X as r,wf as s,hu as t,jx as u,o2 as v,zt as w,h2 as x,Jt as y,Y_ 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.