PageSourceSearch

https://nextgoepi.com/assets/index-4J5HIqGx.js

js nextgoepi.com collected 2026-10-06 18:58:10 UTC 955,957 bytes, 190 lines download raw bytes

vendor: 4,462 bytes, line 1
1function W2(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(s,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var VF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qm={exports:{}},xl={};var zw;function Y2(){if(zw)return xl;zw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,l){var c=null;if(l!==void 0&&(c=""+l),i.key!==void 0&&(c=""+i.key),"key"in i){l={};for(var f in i)f!=="key"&&(l[f]=i[f])}else l=i;return i=l.ref,{$$typeof:e,type:s,key:c,ref:i!==void 0?i:null,props:l}}return xl.Fragment=t,xl.jsx=n,xl.jsxs=n,xl}var Iw;function X2(){return Iw||(Iw=1,Qm.exports=Y2()),Qm.exports}var u=X2(),ep={exports:{}},Ne={};var Bw;function J2(){if(Bw)return Ne;Bw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function j(O,K,Z){this.props=O,this.context=K,this.refs=E,this.updater=Z||S}j.prototype.isReactComponent={},j.prototype.setState=function(O,K){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,K,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function C(){}C.prototype=j.prototype;function A(O,K,Z){this.props=O,this.context=K,this.refs=E,this.updater=Z||S}var k=A.prototype=new C;k.constructor=A,_(k,j.prototype),k.isPureReactComponent=!0;var D=Array.isArray;function B(){}var L={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function U(O,K,Z){var ne=Z.ref;return{$$typeof:e,type:O,key:K,ref:ne!==void 0?ne:null,props:Z}}function z(O,K){return U(O.type,K,O.props)}function Y(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function se(O){var K={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(Z){return K[Z]})}var de=/\/+/g;function fe(O,K){return typeof O=="object"&&O!==null&&O.key!=null?se(""+O.key):K.toString(36)}function ce(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(B,B):(O.status="pending",O.then(function(K){O.status==="pending"&&(O.status="fulfilled",O.value=K)},function(K){O.status==="pending"&&(O.status="rejected",O.reason=K)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function M(O,K,Z,ne,ie){var ue=typeof O;(ue==="undefined"||ue==="boolean")&&(O=null);var ae=!1;if(O===null)ae=!0;else switch(ue){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(O.$$typeof){case e:case t:ae=!0;break;case g:return ae=O._init,M(ae(O._payload),K,Z,ne,ie)}}if(ae)return ie=ie(O),ae=ne===""?"."+fe(O,0):ne,D(ie)?(Z="",ae!=null&&(Z=ae.replace(de,"$&/")+"/"),M(ie,K,Z,"",function(Oe){return Oe}
vendor: 5,187 bytes, line 1
1)):ie!=null&&(Y(ie)&&(ie=z(ie,Z+(ie.key==null||O&&O.key===ie.key?"":(""+ie.key).replace(de,"$&/")+"/")+ae)),K.push(ie)),1;ae=0;var he=ne===""?".":ne+":";if(D(O))for(var ve=0;ve<O.length;ve++)ne=O[ve],ue=he+fe(ne,ve),ae+=M(ne,K,Z,ue,ie);else if(ve=w(O),typeof ve=="function")for(O=ve.call(O),ve=0;!(ne=O.next()).done;)ne=ne.value,ue=he+fe(ne,ve++),ae+=M(ne,K,Z,ue,ie);else if(ue==="object"){if(typeof O.then=="function")return M(ce(O),K,Z,ne,ie);throw K=String(O),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return ae}function F(O,K,Z){if(O==null)return O;var ne=[],ie=0;return M(O,ne,"","",function(ue){return K.call(Z,ue,ie++)}),ne}function X(O){if(O._status===-1){var K=O._result;K=K(),K.then(function(Z){(O._status===0||O._status===-1)&&(O._status=1,O._result=Z)},function(Z){(O._status===0||O._status===-1)&&(O._status=2,O._result=Z)}),O._status===-1&&(O._status=0,O._result=K)}if(O._status===1)return O._result.default;throw O._result}var oe=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},ee={map:F,forEach:function(O,K,Z){F(O,function(){K.apply(this,arguments)},Z)},count:function(O){var K=0;return F(O,function(){K++}),K},toArray:function(O){return F(O,function(K){return K})||[]},only:function(O){if(!Y(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ne.Activity=p,Ne.Children=ee,Ne.Component=j,Ne.Fragment=n,Ne.Profiler=i,Ne.PureComponent=A,Ne.StrictMode=s,Ne.Suspense=h,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(O){return L.H.useMemoCache(O)}},Ne.cache=function(O){return function(){return O.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(O,K,Z){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ne=_({},O.props),ie=O.key;if(K!=null)for(ue in K.key!==void 0&&(ie=""+K.key),K)!P.call(K,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&K.ref===void 0||(ne[ue]=K[ue]);var ue=arguments.length-2;if(ue===1)ne.children=Z;else if(1<ue){for(var ae=Array(ue),he=0;he<ue;he++)ae[he]=arguments[he+2];ne.children=ae}return U(O.type,ie,ne)},Ne.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:l,_context:O},O},Ne.createElement=function(O,K,Z){var ne,ie={},ue=null;if(K!=null)for(ne in K.key!==void 0&&(ue=""+K.key),K)P.call(K,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ie[ne]=K[ne]);var ae=arguments.length-2;if(ae===1)ie.children=Z;else if(1<ae){for(var he=Array(ae),ve=0;ve<ae;ve++)he[ve]=arguments[ve+2];ie.children=he}if(O&&O.defaultProps)for(ne in ae=O.defaultProps,ae)ie[ne]===void 0&&(ie[ne]=ae[ne]);return U(O,ue,ie)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(O){return{$$typeof:f,render:O}},Ne.isValidElement=Y,Ne.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:X}},Ne.memo=function(O,K){return{$$typeof:m,type:O,compare:K===void 0?null:K}},Ne.startTransition=function(O){var K=L.T,Z={};L.T=Z;try{var ne=O(),ie=L.S;ie!==null&&ie(Z,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(B,oe)}catch(ue){oe(ue)}finally{K!==null&&Z.types!==null&&(K.types=Z.types),L.T=K}},Ne.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ne.use=function(O){return L.H.use(O)},Ne.useActionState=function(O,K,Z){return L.H.useActionState(O,K,Z)},Ne.useCallback=function(O,K){return L.H.useCallback(O,K)},Ne.useContext=function(O){return L.H.useContext(O)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(O,K){return L.H.useDeferredValue(O,K)},Ne.useEffect=function(O,K){return L.H.useEffect(O,K)},Ne.useEffectEvent=function(O){return L.H.useEffectEvent(O)},Ne.useId=function(){return L.H.useId()},Ne.useImperativeHandle=function(O,K,Z){return L.H.useImperativeHandle(O,K,Z)},Ne.useInsertionEffect=function(O,K){return L.H.useInsertionEffect(O,K)},Ne.useLayoutEffect=function(O,K){return L.H.useLayoutEffect(O,K)},Ne.useMemo=function(O,K){return L.H.useMemo(O,K)},Ne.useOptimistic=function(O,K){return L.H.useOptimistic(O,K)},Ne.useReducer=function(O,K,Z){return L.H.useReducer(O,K,Z)},Ne.useRef=function(O){return L.H.useRef(O)},Ne.useState=function(O){return L.H.useState(O)},Ne.useSyncExternalStore=function(O,K,Z){return L.H.useSyncExternalStore(O,K,Z)},Ne.useTransition=function(){return L.H.useTransition()},Ne.version="19.2.4",Ne}var Uw;function Xd(){return Uw||(Uw=1,ep.exports=J2()),ep.exports}var x=Xd();const te=fE(x),hE=W2({__proto__:null,default:te},[x]);var tp={exports:{}},wl={}
vendor: 12,263 bytes, lines 1-3
1,np={exports:{}},rp={};var Vw;function Z2(){return Vw||(Vw=1,(function(e){function t(M,F){var X=M.length;M.push(F);e:for(;0<X;){var oe=X-1>>>1,ee=M[oe];if(0<i(ee,F))M[oe]=F,M[X]=ee,X=oe;else break e}}function n(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var F=M[0],X=M.pop();if(X!==F){M[0]=X;e:for(var oe=0,ee=M.length,O=ee>>>1;oe<O;){var K=2*(oe+1)-1,Z=M[K],ne=K+1,ie=M[ne];if(0>i(Z,X))ne<ee&&0>i(ie,Z)?(M[oe]=ie,M[ne]=X,oe=ne):(M[oe]=Z,M[K]=X,oe=K);else if(ne<ee&&0>i(ie,X))M[oe]=ie,M[ne]=X,oe=ne;else break e}}return F}function i(M,F){var X=M.sortIndex-F.sortIndex;return X!==0?X:M.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],g=1,p=null,b=3,w=!1,S=!1,_=!1,E=!1,j=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function k(M){for(var F=n(m);F!==null;){if(F.callback===null)s(m);else if(F.startTime<=M)s(m),F.sortIndex=F.expirationTime,t(h,F);else break;F=n(m)}}function D(M){if(_=!1,k(M),!S)if(n(h)!==null)S=!0,B||(B=!0,se());else{var F=n(m);F!==null&&ce(D,F.startTime-M)}}var B=!1,L=-1,P=5,U=-1;function z(){return E?!0:!(e.unstable_now()-U<P)}function Y(){if(E=!1,B){var M=e.unstable_now();U=M;var F=!0;try{e:{S=!1,_&&(_=!1,C(L),L=-1),w=!0;var X=b;try{t:{for(k(M),p=n(h);p!==null&&!(p.expirationTime>M&&z());){var oe=p.callback;if(typeof oe=="function"){p.callback=null,b=p.priorityLevel;var ee=oe(p.expirationTime<=M);if(M=e.unstable_now(),typeof ee=="function"){p.callback=ee,k(M),F=!0;break t}p===n(h)&&s(h),k(M)}else s(h);p=n(h)}if(p!==null)F=!0;else{var O=n(m);O!==null&&ce(D,O.startTime-M),F=!1}}break e}finally{p=null,b=X,w=!1}F=void 0}}finally{F?se():B=!1}}}var se;if(typeof A=="function")se=function(){A(Y)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,fe=de.port2;de.port1.onmessage=Y,se=function(){fe.postMessage(null)}}else se=function(){j(Y,0)};function ce(M,F){L=j(function(){M(e.unstable_now())},F)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(M){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var X=b;b=F;try{return M()}finally{b=X}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(M,F){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var X=b;b=M;try{return F()}finally{b=X}},e.unstable_scheduleCallback=function(M,F,X){var oe=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?oe+X:oe):X=oe,M){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=X+ee,M={id:g++,callback:F,priorityLevel:M,startTime:X,expirationTime:ee,sortIndex:-1},X>oe?(M.sortIndex=X,t(m,M),n(h)===null&&M===n(m)&&(_?(C(L),L=-1):_=!0,ce(D,X-oe))):(M.sortIndex=ee,t(h,M),S||w||(S=!0,B||(B=!0,se()))),M},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(M){var F=b;return function(){var X=b;b=F;try{return M.apply(this,arguments)}finally{b=X}}}})(rp)),rp}var $w;function Q2(){return $w||($w=1,np.exports=Z2()),np.exports}var sp={exports:{}},Yt={};var Hw;function eO(){if(Hw)return Yt;Hw=1;var e=Xd();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var s={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},i=Symbol.for("react.portal");function l(h,m,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:h,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Yt.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return l(h,m,null,g)},Yt.flushSync=function(h){var m=c.T,g=s.p;try{if(c.T=null,s.p=2,h)return h()}finally{c.T=m,s.p=g,s.d.f()}},Yt.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(h,m))},Yt.prefetchDNS=function(h){typeof h=="string"&&s.d.D(h)},Yt.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?s.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:w}):g==="script"&&s.d.X(h,{crossOrigin:p,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Yt.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);s.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(h)},Yt.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin);s.d.L(h,g,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Yt.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);s.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(h)},Yt.requestFormReset=function(h){s.d.r(h)},Yt.unstable_batchedUpdates=function(h,m){return h(m)},Yt.useFormState=function(h,m,g){return c.H.useFormState(h,m,g)},Yt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Yt.version="19.2.4",Yt}var Gw;function mE(){if(Gw)return sp.exports;Gw=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(),sp.exports=eO(),sp.exports}var qw;function tO(){if(qw)return wl;qw=1;var e=Q2(),t=Xd(),n=mE();function s(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,o=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(o=a.return),r=a.return;while(r)}return a.tag===3?o:null}function c(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function h(r){if(l(r)!==r)throw Error(s(188))}function m(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(s(188));return a!==r?null:r}for(var o=r,d=a;;){var y=o.return;if(y===null)break;var v=y.alternate;if(v===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===o)return h(y),r;if(v===d)return h(y),a;v=v.sibling}throw Error(s(188))}if(o.return!==d.return)o=y,d=v;else{for(var T=!1,N=y.child;N;){if(N===o){T=!0,o=y,d=v;break}if(N===d){T=!0,d=y,o=v;break}N=N.sibling}if(!T){for(N=v.child;N;){if(N===o){T=!0,o=v,d=y;break}if(N===d){T=!0,d=v,o=y;break}N=N.sibling}if(!T)throw Error(s(189))}}if(o.alternate!==d)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?r:a}function g(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=g(r),a!==null)return a;r=r.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function se(r){return r===null||typeof r!="object"?null:(r=Y&&r[Y]||r["@@iterator"],typeof r=="function"?r:null)}var de=Symbol.for("react.client.reference");function fe(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===de?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case _:return"Fragment";case j:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case B:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case A:return r.displayName||"Context";case C:return(r._context.displayName||"Context")+".Consumer";case k:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case L:return a=r.displayName||null,a!==null?a:fe(r.type)||"Memo";case P:a=r._payload,r=r._init;try{return fe(r(a))}catch{}}return null}var ce=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},oe=[],ee=-1;function O(r){return{current:r}}function K(r){0>ee||(r.current=oe[ee],oe[ee]=null,ee--)}function Z(r,a){ee++,oe[ee]=r.current,r.current=a}var ne=O(null),ie=O(null),ue=O(null),ae=O(null);function he(r,a){switch(Z(ue,a),Z(ie,r),Z(ne,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?iw(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=iw(a),r=ow(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}K(ne),Z(ne,r)}function ve(){K(ne),K(ie),K(ue)}function Oe(r){r.memoizedState!==null&&Z(ae,r);var a=ne.current,o=ow(a,r.type);a!==o&&(Z(ie,r),Z(ne,o))}function De(r){ie.current===r&&(K(ne),K(ie)),ae.current===r&&(K(ae),gl._currentValue=X)}var Ue,yt;function lt(r){if(Ue===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Ue=a&&a[1]||"",yt=-1<o.stack.indexOf(`
2    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
3`+Ue+r+yt}var zr=!1;function gr(r,a){if(!r||zr)return"";zr=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(a){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(q){var G=q}Reflect.construct(r,[],Q)}else{try{Q.call()}catch(q){G=q}r.call(Q.prototype)}}else{try{throw Error()}catch(q){G=q}(Q=r())&&typeof Q.catch=="function"&&Q.catch(function(){})}}
vendor: 6,458 bytes, lines 3-8
3catch(q){if(q&&G&&typeof q.stack=="string")return[q.stack,G.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),T=v[0],N=v[1];if(T&&N){var R=T.split(`
4`),H=N.split(`
5`);for(y=d=0;d<R.length&&!R[d].includes("DetermineComponentFrameRoot");)d++;for(;y<H.length&&!H[y].includes("DetermineComponentFrameRoot");)y++;if(d===R.length||y===H.length)for(d=R.length-1,y=H.length-1;1<=d&&0<=y&&R[d]!==H[y];)y--;for(;1<=d&&0<=y;d--,y--)if(R[d]!==H[y]){if(d!==1||y!==1)do if(d--,y--,0>y||R[d]!==H[y]){var W=`
6`+R[d].replace(" at new "," at ");return r.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",r.displayName)),W}while(1<=d&&0<=y);break}}}finally{zr=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?lt(o):""}function Wn(r,a){switch(r.tag){case 26:case 27:case 5:return lt(r.type);case 16:return lt("Lazy");case 13:return r.child!==a&&a!==null?lt("Suspense Fallback"):lt("Suspense");case 19:return lt("SuspenseList");case 0:case 15:return gr(r.type,!1);case 11:return gr(r.type.render,!1);case 1:return gr(r.type,!0);case 31:return lt("Activity");default:return""}}function jo(r){try{var a="",o=null;do a+=Wn(r,o),o=r,r=r.return;while(r);return a}catch(d){return`
7Error generating stack: `+d.message+`
8`+d.stack}}var bn=Object.prototype.hasOwnProperty,Co=e.unstable_scheduleCallback,Ao=e.unstable_cancelCallback,Qt=e.unstable_shouldYield,ys=e.unstable_requestPaint,en=e.unstable_now,Vf=e.unstable_getCurrentPriorityLevel,ha=e.unstable_ImmediatePriority,gc=e.unstable_UserBlockingPriority,ma=e.unstable_NormalPriority,No=e.unstable_LowPriority,Ir=e.unstable_IdlePriority,yc=e.log,vs=e.unstable_setDisableYieldValue,pa=null,tn=null;function Yn(r){if(typeof yc=="function"&&vs(r),tn&&typeof tn.setStrictMode=="function")try{tn.setStrictMode(pa,r)}catch{}}var Kt=Math.clz32?Math.clz32:yr,$f=Math.log,ko=Math.LN2;function yr(r){return r>>>=0,r===0?32:31-($f(r)/ko|0)|0}var Za=256,Qa=262144,ga=4194304;function vr(r){var a=r&42;if(a!==0)return a;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 Ce(r,a,o){var d=r.pendingLanes;if(d===0)return 0;var y=0,v=r.suspendedLanes,T=r.pingedLanes;r=r.warmLanes;var N=d&134217727;return N!==0?(d=N&~v,d!==0?y=vr(d):(T&=N,T!==0?y=vr(T):o||(o=N&~r,o!==0&&(y=vr(o))))):(N=d&~v,N!==0?y=vr(N):T!==0?y=vr(T):o||(o=d&~r,o!==0&&(y=vr(o)))),y===0?0:a!==0&&a!==y&&(a&v)===0&&(v=y&-y,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:y}function ct(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function Ot(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Wt(){var r=ga;return ga<<=1,(ga&62914560)===0&&(ga=4194304),r}function bs(r){for(var a=[],o=0;31>o;o++)a.push(r);return a}function ft(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function an(r,a,o,d,y,v){var T=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var N=r.entanglements,R=r.expirationTimes,H=r.hiddenUpdates;for(o=T&~o;0<o;){var W=31-Kt(o),Q=1<<W;N[W]=0,R[W]=-1;var G=H[W];if(G!==null)for(H[W]=null,W=0;W<G.length;W++){var q=G[W];q!==null&&(q.lane&=-536870913)}o&=~Q}d!==0&&ya(r,d,0),v!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=v&~(T&~a))}function ya(r,a,o){r.pendingLanes|=a,r.suspendedLanes&=~a;var d=31-Kt(a);r.entangledLanes|=a,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function on(r,a){var o=r.entangledLanes|=a;for(r=r.entanglements;o;){var d=31-Kt(o),y=1<<d;y&a|r[d]&a&&(r[d]|=a),o&=~y}}function ln(r,a){var o=a&-a;return o=(o&42)!==0?1:ei(o),(o&(r.suspendedLanes|a))!==0?0:o}function ei(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 Xn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Hf(){var r=F.p;return r!==0?r:(r=window.event,r===void 0?32:kw(r.type))}function Fv(r,a){var o=F.p;try{return F.p=r,a()}finally{F.p=o}}var xs=Math.random().toString(36).slice(2),It="__reactFiber$"+xs,cn="__reactProps$"+xs,ti="__reactContainer$"+xs,Gf="__reactEvents$"+xs,zk="__reactListeners$"+xs,Ik="__reactHandles$"+xs,Kv="__reactResources$"+xs,Ro="__reactMarker$"+xs;function qf(r){delete r[It],delete r[cn],delete r[Gf],delete r[zk],delete r[Ik]}function ni(r){var a=r[It];if(a)return a;for(var o=r.parentNode;o;){if(a=o[ti]||o[It]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(r=mw(r);r!==null;){if(o=r[It])return o;r=mw(r)}return a}r=o,o=r.parentNode}return null}function ri(r){if(r=r[It]||r[ti]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Oo(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(s(33))}function si(r){var a=r[Kv];return a||(a=r[Kv]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Dt(r){r[Ro]=!0}var Wv=new Set,Yv={};function va(r,a){ai(r,a),ai(r+"Capture",a)}function ai(r,a){for(Yv[r]=a,r=0;r<a.length;r++)Wv.add(a[r])}var Bk=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
8037D\\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]*$"),Xv={},Jv={};function Uk(r){return bn.call(Jv,r)?!0:bn.call(Xv,r)?!1:Bk.test(r)?Jv[r]=!0:(Xv[r]=!0,!1)}function vc(r,a,o){if(Uk(a))if(o===null)r.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var d=a.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+o)}}function bc(r,a,o){if(o===null)r.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+o)}}function Br(r,a,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(a,o,""+d)}}function Mn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Zv(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Vk(r,a,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,v=d.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return y.call(this)},set:function(T){o=""+T,v.call(this,T)}}),Object.defineProperty(r,a,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(T){o=""+T},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function Ff(r){if(!r._valueTracker){var a=Zv(r)?"checked":"value";r._valueTracker=Vk(r,a,""+r[a])}}function Qv(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var o=a.getValue(),d="";return r&&(d=Zv(r)?r.checked?"true":"false":r.value),r=d,r!==o?(a.setValue(r),!0):!1}function xc(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 $k=/[\n"\\]/g;function Pn(r){return r.replace($k,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Kf(r,a,o,d,y,v,T,N){r.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.type=T:r.removeAttribute("type"),a!=null?T==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Mn(a)):r.value!==""+Mn(a)&&(r.value=""+Mn(a)):T!=="submit"&&T!=="reset"||r.removeAttribute("value"),a!=null?Wf(r,T,Mn(a)):o!=null?Wf(r,T,Mn(o)):d!=null&&r.removeAttribute("value"),y==null&&v!=null&&(r.defaultChecked=!!v),y!=null&&(r.checked=y&&t
vendor: 5,691 bytes, line 8
8ypeof y!="function"&&typeof y!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?r.name=""+Mn(N):r.removeAttribute("name")}function eb(r,a,o,d,y,v,T,N){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),a!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||a!=null)){Ff(r);return}o=o!=null?""+Mn(o):"",a=a!=null?""+Mn(a):o,N||a===r.value||(r.value=a),r.defaultValue=a}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=N?r.checked:!!d,r.defaultChecked=!!d,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T),Ff(r)}function Wf(r,a,o){a==="number"&&xc(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function ii(r,a,o,d){if(r=r.options,a){a={};for(var y=0;y<o.length;y++)a["$"+o[y]]=!0;for(o=0;o<r.length;o++)y=a.hasOwnProperty("$"+r[o].value),r[o].selected!==y&&(r[o].selected=y),y&&d&&(r[o].defaultSelected=!0)}else{for(o=""+Mn(o),a=null,y=0;y<r.length;y++){if(r[y].value===o){r[y].selected=!0,d&&(r[y].defaultSelected=!0);return}a!==null||r[y].disabled||(a=r[y])}a!==null&&(a.selected=!0)}}function tb(r,a,o){if(a!=null&&(a=""+Mn(a),a!==r.value&&(r.value=a),o==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=o!=null?""+Mn(o):""}function nb(r,a,o,d){if(a==null){if(d!=null){if(o!=null)throw Error(s(92));if(ce(d)){if(1<d.length)throw Error(s(93));d=d[0]}o=d}o==null&&(o=""),a=o}o=Mn(a),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),Ff(r)}function oi(r,a){if(a){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=a;return}}r.textContent=a}var Hk=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 rb(r,a,o){var d=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":d?r.setProperty(a,o):typeof o!="number"||o===0||Hk.has(a)?a==="float"?r.cssFloat=o:r[a]=(""+o).trim():r[a]=o+"px"}function sb(r,a,o){if(a!=null&&typeof a!="object")throw Error(s(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||a!=null&&a.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var y in a)d=a[y],a.hasOwnProperty(y)&&o[y]!==d&&rb(r,y,d)}else for(var v in a)a.hasOwnProperty(v)&&rb(r,v,a[v])}function Yf(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 Gk=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"],["colorRendering","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
8-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"]]),qk=/^[\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 wc(r){return qk.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ur(){}var Xf=null;function Jf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var li=null,ci=null;function ab(r){var a=ri(r);if(a&&(r=a.stateNode)){var o=r[cn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Kf(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Pn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var d=o[a];if(d!==r&&d.form===r.form){var y=d[cn]||null;if(!y)throw Error(s(90));Kf(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<o.length;a++)d=o[a],d.form===r.form&&Qv(d)}break e;case"textarea":tb(r,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&ii(r,!!o.multiple,a,!1)}}}var Zf=!1;function ib(r,a,o){if(Zf)return r(a,o);Zf=!0;try{var d=r(a);return d}finally{if(Zf=!1,(li!==null||ci!==null)&&(lu(),li&&(a=li,r=ci,ci=li=null,ab(a),r)))for(a=0;a<r.length;a++)ab(r[a])}}function Do(r,a){var o=r.stateNode;if(o===null)return null;var d=o[cn]||null;if(d===null)return null;o=d[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(s(231,a,typeof o));return o}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qf=!1;if(Vr)try{var Mo={};Object.defineProperty(Mo,"passive",{get:function(){Qf=!0}}),window.addEventListener("test",Mo,Mo),window.removeEventListener("test",Mo,Mo)}catch{Qf=!1}var ws=null,eh=null,Sc=null;function ob(){if(Sc)return Sc;var r,a=eh,o=a.length,d,y="value"in ws?ws.value:ws.textContent,v=y.length;for(r=0;r<o&&a[r]===y[r];r++);var T=o-r;for(d=1;d<=T&&a[o-d]===y[v-d];d++);return Sc=y.slice(r,1<d?1-d:void 0)}function _c(r){var a=r.keyCode;
vendor: 4,579 bytes, line 8
8return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Ec(){return!0}function lb(){return!1}function un(r){function a(o,d,y,v,T){this._reactName=o,this._targetInst=y,this.type=d,this.nativeEvent=v,this.target=T,this.currentTarget=null;for(var N in r)r.hasOwnProperty(N)&&(o=r[N],this[N]=o?o(v):v[N]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Ec:lb,this.isPropagationStopped=lb,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ec)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ec)},persist:function(){},isPersistent:Ec}),a}var ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tc=un(ba),Po=p({},ba,{view:0,detail:0}),Fk=un(Po),th,nh,Lo,jc=p({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sh,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!==Lo&&(Lo&&r.type==="mousemove"?(th=r.screenX-Lo.screenX,nh=r.screenY-Lo.screenY):nh=th=0,Lo=r),th)},movementY:function(r){return"movementY"in r?r.movementY:nh}}),cb=un(jc),Kk=p({},jc,{dataTransfer:0}),Wk=un(Kk),Yk=p({},Po,{relatedTarget:0}),rh=un(Yk),Xk=p({},ba,{animationName:0,elapsedTime:0,pseudoElement:0}),Jk=un(Xk),Zk=p({},ba,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Qk=un(Zk),eR=p({},ba,{data:0}),ub=un(eR),tR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nR={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"},rR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sR(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=rR[r])?!!a[r]:!1}function sh(){return sR}var aR=p({},Po,{key:function(r){if(r.key){var a=tR[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=_c(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?nR[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sh,charCode:function(r){return r.type==="keypress"?_c(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?_c(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),iR=un(aR),oR=p({},jc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),db=un(oR),lR=p({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sh}),cR=un(lR),uR=p({},ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),dR=un(uR),fR=p({},jc,{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}),hR=un(fR),mR=p({},ba,{newState:0,oldState:0}),pR=un(mR),gR=[9,13,27,32],ah=Vr&&"CompositionEvent"in window,zo=null;Vr&&"documentMode"in document&&(zo=document.documentMode);var yR=Vr&&"TextEvent"in window&&!zo,fb=Vr&&(!ah||zo&&8<zo&&11>=zo),hb=" ",mb=!1;function pb(r,a){switch(r){case"keyup":return gR.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gb(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ui=!1;function vR(r,a){switch(r){case"compositionend":return gb(a);case"keypress":return a.which!==32?null:(mb=!0,hb);case"textInput":return r=a.data,r===hb&&mb?null:r;default:return null}}
vendor: 6,255 bytes, line 8
8function bR(r,a){if(ui)return r==="compositionend"||!ah&&pb(r,a)?(r=ob(),Sc=eh=ws=null,ui=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return fb&&a.locale!=="ko"?null:a.data;default:return null}}var xR={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 yb(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!xR[r.type]:a==="textarea"}function vb(r,a,o,d){li?ci?ci.push(d):ci=[d]:li=d,a=pu(a,"onChange"),0<a.length&&(o=new Tc("onChange","change",null,o,d),r.push({event:o,listeners:a}))}var Io=null,Bo=null;function wR(r){ew(r,0)}function Cc(r){var a=Oo(r);if(Qv(a))return r}function bb(r,a){if(r==="change")return a}var xb=!1;if(Vr){var ih;if(Vr){var oh="oninput"in document;if(!oh){var wb=document.createElement("div");wb.setAttribute("oninput","return;"),oh=typeof wb.oninput=="function"}ih=oh}else ih=!1;xb=ih&&(!document.documentMode||9<document.documentMode)}function Sb(){Io&&(Io.detachEvent("onpropertychange",_b),Bo=Io=null)}function _b(r){if(r.propertyName==="value"&&Cc(Bo)){var a=[];vb(a,Bo,r,Jf(r)),ib(wR,a)}}function SR(r,a,o){r==="focusin"?(Sb(),Io=a,Bo=o,Io.attachEvent("onpropertychange",_b)):r==="focusout"&&Sb()}function _R(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Cc(Bo)}function ER(r,a){if(r==="click")return Cc(a)}function TR(r,a){if(r==="input"||r==="change")return Cc(a)}function jR(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var xn=typeof Object.is=="function"?Object.is:jR;function Uo(r,a){if(xn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var o=Object.keys(r),d=Object.keys(a);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!bn.call(a,y)||!xn(r[y],a[y]))return!1}return!0}function Eb(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Tb(r,a){var o=Eb(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=a&&d>=a)return{node:o,offset:a-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Eb(o)}}function jb(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?jb(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Cb(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=xc(r.document);a instanceof r.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)r=a.contentWindow;else break;a=xc(r.document)}return a}function lh(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var CR=Vr&&"documentMode"in document&&11>=document.documentMode,di=null,ch=null,Vo=null,uh=!1;function Ab(r,a,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;uh||di==null||di!==xc(d)||(d=di,"selectionStart"in d&&lh(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Vo&&Uo(Vo,d)||(Vo=d,d=pu(ch,"onSelect"),0<d.length&&(a=new Tc("onSelect","select",null,a,o),r.push({event:a,listeners:d}),a.target=di)))}function xa(r,a){var o={};return o[r.toLowerCase()]=a.toLowerCase(),o["Webkit"+r]="webkit"+a,o["Moz"+r]="moz"+a,o}var fi={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionrun:xa("Transition","TransitionRun"),transitionstart:xa("Transition","TransitionStart"),transitioncancel:xa("Transition","TransitionCancel"),transitionend:xa("Transition","TransitionEnd")},dh={},Nb={};Vr&&(Nb=document.createElement("div").style,"AnimationEvent"in window||(delete fi.animationend.animation,delete fi.animationiteration.animation,delete fi.animationstart.animation),"TransitionEvent"in window||delete fi.transitionend.transition);function wa(r){if(dh[r])return dh[r];if(!fi[r])return r;var a=fi[r],o;for(o in a)if(a.hasOwnProperty(o)&&o in Nb)return dh[r]=a[o];return r}var kb=wa("animationend"),Rb=wa("animationiteration"),Ob=wa("animationstart"),AR=wa("transitionrun"),NR=wa("transitionstart"),kR=wa("transitioncancel"),Db=wa("transitionend"),Mb=new Map,fh="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(" ");fh.push("scrollEnd");function Jn(r,a){Mb.set(r,a),va(a,[r])}var Ac=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ln=[],hi=0,hh=0;function Nc(){for(var r=hi,a=hh=hi=0;a<r;){var o=Ln[a];Ln[a++]=null;var d=Ln[a];Ln[a++]=null;var y=Ln[a];Ln[a++]=null;var v=Ln[a];if(Ln[a++]=null,d!==null&&y!==null){var T=d.pending;T===null?y.next=y:(y.next=T.next,T.next=y),d.pending=y}v!==0&&Pb(o,y,v)}}function kc(r,a,o,d){Ln[hi++]=r,Ln[hi++]=a,Ln[hi++]=o,Ln[hi++]=d,hh|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function mh(r,a,o,d){return kc(r,a,o,d),Rc(r)}
vendor: 10,263 bytes, line 8
8function Sa(r,a){return kc(r,null,null,a),Rc(r)}function Pb(r,a,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var y=!1,v=r.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(y=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,y&&a!==null&&(y=31-Kt(o),r=v.hiddenUpdates,d=r[y],d===null?r[y]=[a]:d.push(a),a.lane=o|536870912),v):null}function Rc(r){if(50<cl)throw cl=0,_m=null,Error(s(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var mi={};function RR(r,a,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wn(r,a,o,d){return new RR(r,a,o,d)}function ph(r){return r=r.prototype,!(!r||!r.isReactComponent)}function $r(r,a){var o=r.alternate;return o===null?(o=wn(r.tag,a,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=a,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,a=r.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function Lb(r,a){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,a=o.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Oc(r,a,o,d,y,v){var T=0;if(d=r,typeof r=="function")ph(r)&&(T=1);else if(typeof r=="string")T=L2(r,o,ne.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case U:return r=wn(31,o,a,y),r.elementType=U,r.lanes=v,r;case _:return _a(o.children,y,v,a);case E:T=8,y|=24;break;case j:return r=wn(12,o,a,y|2),r.elementType=j,r.lanes=v,r;case D:return r=wn(13,o,a,y),r.elementType=D,r.lanes=v,r;case B:return r=wn(19,o,a,y),r.elementType=B,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case A:T=10;break e;case C:T=9;break e;case k:T=11;break e;case L:T=14;break e;case P:T=16,d=null;break e}T=29,o=Error(s(130,r===null?"null":typeof r,"")),d=null}return a=wn(T,o,a,y),a.elementType=r,a.type=d,a.lanes=v,a}function _a(r,a,o,d){return r=wn(7,r,d,a),r.lanes=o,r}function gh(r,a,o){return r=wn(6,r,null,a),r.lanes=o,r}function zb(r){var a=wn(18,null,null,0);return a.stateNode=r,a}function yh(r,a,o){return a=wn(4,r.children!==null?r.children:[],r.key,a),a.lanes=o,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Ib=new WeakMap;function zn(r,a){if(typeof r=="object"&&r!==null){var o=Ib.get(r);return o!==void 0?o:(a={value:r,source:a,stack:jo(a)},Ib.set(r,a),a)}return{value:r,source:a,stack:jo(a)}}var pi=[],gi=0,Dc=null,$o=0,In=[],Bn=0,Ss=null,br=1,xr="";function Hr(r,a){pi[gi++]=$o,pi[gi++]=Dc,Dc=r,$o=a}function Bb(r,a,o){In[Bn++]=br,In[Bn++]=xr,In[Bn++]=Ss,Ss=r;var d=br;r=xr;var y=32-Kt(d)-1;d&=~(1<<y),o+=1;var v=32-Kt(a)+y;if(30<v){var T=y-y%5;v=(d&(1<<T)-1).toString(32),d>>=T,y-=T,br=1<<32-Kt(a)+y|o<<y|d,xr=v+r}else br=1<<v|o<<y|d,xr=r}function vh(r){r.return!==null&&(Hr(r,1),Bb(r,1,0))}function bh(r){for(;r===Dc;)Dc=pi[--gi],pi[gi]=null,$o=pi[--gi],pi[gi]=null;for(;r===Ss;)Ss=In[--Bn],In[Bn]=null,xr=In[--Bn],In[Bn]=null,br=In[--Bn],In[Bn]=null}function Ub(r,a){In[Bn++]=br,In[Bn++]=xr,In[Bn++]=Ss,br=a.id,xr=a.overflow,Ss=r}var Bt=null,it=null,He=!1,_s=null,Un=!1,xh=Error(s(519));function Es(r){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ho(zn(a,r)),xh}function Vb(r){var a=r.stateNode,o=r.type,d=r.memoizedProps;switch(a[It]=r,a[cn]=d,o){case"dialog":ze("cancel",a),ze("close",a);break;case"iframe":case"object":case"embed":ze("load",a);break;case"video":case"audio":for(o=0;o<dl.length;o++)ze(dl[o],a);break;case"source":ze("error",a);break;case"img":case"image":case"link":ze("error",a),ze("load",a);break;case"details":ze("toggle",a);break;case"input":ze("invalid",a),eb(a,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":ze("invalid",a);break;case"textarea":ze("invalid",a),nb(a,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||d.suppressHydrationWarning===!0||sw(a.textContent,o)?(d.popover!=null&&(ze("beforetoggle",a),ze("toggle",a)),d.onScroll!=null&&ze("scroll",a),d.onScrollEnd!=null&&ze("scrollend",a),d.onClick!=null&&(a.onclick=Ur),a=!0):a=!1,a||Es(r,!0)}function $b(r){for(Bt=r.return;Bt;)switch(Bt.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Bt=Bt.return}}function yi(r){if(r!==Bt)return!1;if(!He)return $b(r),He=!0,!1;var a=r.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||Im(r.type,r.memoizedProps)),o=!o),o&&it&&Es(r),$b(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));it=hw(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));it=hw(r)}else a===27?(a=it,Is(r.type)?(r=Hm,Hm=null,it=r):it=a):it=Bt?$n(r.stateNode.nextSibling):null;return!0}function Ea(){it=Bt=null,He=!1}function wh(){var r=_s;return r!==null&&(mn===null?mn=r:mn.push.apply(mn,r),_s=null),r}function Ho(r){_s===null?_s=[r]:_s.push(r)}var Sh=O(null),Ta=null,Gr=null;function Ts(r,a,o){Z(Sh,a._currentValue),a._currentValue=o}function qr(r){r._currentValue=Sh.current,K(Sh)}function _h(r,a,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),r===o)break;r=r.return}}function Eh(r,a,o,d){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var v=y.dependencies;if(v!==null){var T=y.child;v=v.firstContext;e:for(;v!==null;){var N=v;v=y;for(var R=0;R<a.length;R++)if(N.context===a[R]){v.lanes|=o,N=v.alternate,N!==null&&(N.lanes|=o),_h(v.return,o,r),d||(T=null);break e}v=N.next}}else if(y.tag===18){if(T=y.return,T===null)throw Error(s(341));T.lanes|=o,v=T.alternate,v!==null&&(v.lanes|=o),_h(T,o,r),T=null}else T=y.child;if(T!==null)T.return=y;else for(T=y;T!==null;){if(T===r){T=null;break}if(y=T.sibling,y!==null){y.return=T.return,T=y;break}T=T.return}y=T}}function vi(r,a,o,d){r=null;for(var y=a,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var T=y.alternate;if(T===null)throw Error(s(387));if(T=T.memoizedProps,T!==null){var N=y.type;xn(y.pendingProps.value,T.value)||(r!==null?r.push(N):r=[N])}}else if(y===ae.current){if(T=y.alternate,T===null)throw Error(s(387));T.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push(gl):r=[gl])}y=y.return}r!==null&&Eh(a,r,o,d),a.flags|=262144}function Mc(r){for(r=r.firstContext;r!==null;){if(!xn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ja(r){Ta=r,Gr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Ut(r){return Hb(Ta,r)}function Pc(r,a){return Ta===null&&ja(r),Hb(r,a)}function Hb(r,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Gr===null){if(r===null)throw Error(s(308));Gr=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Gr=Gr.next=a;return o}var OR=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){a.aborted=!0,r.forEach(function(o){return o()})}},DR=e.unstable_scheduleCallback,MR=e.unstable_NormalPriority,xt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Th(){return{controller:new OR,data:new Map,refCount:0}}function Go(r){r.refCount--,r.refCount===0&&DR(MR,function(){r.controller.abort()})}var qo=null,jh=0,bi=0,xi=null;function PR(r,a){if(qo===null){var o=qo=[];jh=0,bi=Nm(),xi={status:"pending",value:void 0,then:function(d){o.push(d)}}}return jh++,a.then(Gb,Gb),a}function Gb(){if(--jh===0&&qo!==null){xi!==null&&(xi.status="fulfilled");var r=qo;qo=null,bi=0,xi=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function LR(r,a){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return r.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<o.length;y++)(0,o[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}var qb=M.S;M.S=function(r,a){Ax=en(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&PR(r,a),qb!==null&&qb(r,a)};var Ca=O(null);function Ch(){var r=Ca.current;return r!==null?r:rt.pooledCache}function Lc(r,a){a===null?Z(Ca,Ca.current):Z(Ca,a.pool)}function Fb(){var r=Ch();return r===null?null:{parent:xt._currentValue,pool:r}}var wi=Error(s(460)),Ah=Error(s(474)),zc=Error(s(542)),Ic={then:function(){}};function Kb(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Wb(r,a,o){switch(o=r[o],o===void 0?r.push(a):o!==a&&(a.then(Ur,Ur),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Xb(r),r;default:if(typeof a.status=="string")a.then(Ur,Ur);else{if(r=rt,r!==null&&100<r.shellSuspendCounter)throw Error(s(482));r=a,r.status="pending",r.then(function(d){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=d}},function(d){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=d}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Xb(r),r}throw Na=a,wi}}function Aa(r){try{var a=r._init;return a(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Na=o,wi):o}}var Na=null;
vendor: 6,952 bytes, line 8
8function Yb(){if(Na===null)throw Error(s(459));var r=Na;return Na=null,r}function Xb(r){if(r===wi||r===zc)throw Error(s(483))}var Si=null,Fo=0;function Bc(r){var a=Fo;return Fo+=1,Si===null&&(Si=[]),Wb(Si,r,a)}function Ko(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Uc(r,a){throw a.$$typeof===b?Error(s(525)):(r=Object.prototype.toString.call(a),Error(s(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Jb(r){function a(V,I){if(r){var $=V.deletions;$===null?(V.deletions=[I],V.flags|=16):$.push(I)}}function o(V,I){if(!r)return null;for(;I!==null;)a(V,I),I=I.sibling;return null}function d(V){for(var I=new Map;V!==null;)V.key!==null?I.set(V.key,V):I.set(V.index,V),V=V.sibling;return I}function y(V,I){return V=$r(V,I),V.index=0,V.sibling=null,V}function v(V,I,$){return V.index=$,r?($=V.alternate,$!==null?($=$.index,$<I?(V.flags|=67108866,I):$):(V.flags|=67108866,I)):(V.flags|=1048576,I)}function T(V){return r&&V.alternate===null&&(V.flags|=67108866),V}function N(V,I,$,J){return I===null||I.tag!==6?(I=gh($,V.mode,J),I.return=V,I):(I=y(I,$),I.return=V,I)}function R(V,I,$,J){var we=$.type;return we===_?W(V,I,$.props.children,J,$.key):I!==null&&(I.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===P&&Aa(we)===I.type)?(I=y(I,$.props),Ko(I,$),I.return=V,I):(I=Oc($.type,$.key,$.props,null,V.mode,J),Ko(I,$),I.return=V,I)}function H(V,I,$,J){return I===null||I.tag!==4||I.stateNode.containerInfo!==$.containerInfo||I.stateNode.implementation!==$.implementation?(I=yh($,V.mode,J),I.return=V,I):(I=y(I,$.children||[]),I.return=V,I)}function W(V,I,$,J,we){return I===null||I.tag!==7?(I=_a($,V.mode,J,we),I.return=V,I):(I=y(I,$),I.return=V,I)}function Q(V,I,$){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=gh(""+I,V.mode,$),I.return=V,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return $=Oc(I.type,I.key,I.props,null,V.mode,$),Ko($,I),$.return=V,$;case S:return I=yh(I,V.mode,$),I.return=V,I;case P:return I=Aa(I),Q(V,I,$)}if(ce(I)||se(I))return I=_a(I,V.mode,$,null),I.return=V,I;if(typeof I.then=="function")return Q(V,Bc(I),$);if(I.$$typeof===A)return Q(V,Pc(V,I),$);Uc(V,I)}return null}function G(V,I,$,J){var we=I!==null?I.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return we!==null?null:N(V,I,""+$,J);if(typeof $=="object"&&$!==null){switch($.$$typeof){case w:return $.key===we?R(V,I,$,J):null;case S:return $.key===we?H(V,I,$,J):null;case P:return $=Aa($),G(V,I,$,J)}if(ce($)||se($))return we!==null?null:W(V,I,$,J,null);if(typeof $.then=="function")return G(V,I,Bc($),J);if($.$$typeof===A)return G(V,I,Pc(V,$),J);Uc(V,$)}return null}function q(V,I,$,J,we){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return V=V.get($)||null,N(I,V,""+J,we);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case w:return V=V.get(J.key===null?$:J.key)||null,R(I,V,J,we);case S:return V=V.get(J.key===null?$:J.key)||null,H(I,V,J,we);case P:return J=Aa(J),q(V,I,$,J,we)}if(ce(J)||se(J))return V=V.get($)||null,W(I,V,J,we,null);if(typeof J.then=="function")return q(V,I,$,Bc(J),we);if(J.$$typeof===A)return q(V,I,$,Pc(I,J),we);Uc(I,J)}return null}function me(V,I,$,J){for(var we=null,Fe=null,xe=I,Re=I=0,$e=null;xe!==null&&Re<$.length;Re++){xe.index>Re?($e=xe,xe=null):$e=xe.sibling;var Ke=G(V,xe,$[Re],J);if(Ke===null){xe===null&&(xe=$e);break}r&&xe&&Ke.alternate===null&&a(V,xe),I=v(Ke,I,Re),Fe===null?we=Ke:Fe.sibling=Ke,Fe=Ke,xe=$e}if(Re===$.length)return o(V,xe),He&&Hr(V,Re),we;if(xe===null){for(;Re<$.length;Re++)xe=Q(V,$[Re],J),xe!==null&&(I=v(xe,I,Re),Fe===null?we=xe:Fe.sibling=xe,Fe=xe);return He&&Hr(V,Re),we}for(xe=d(xe);Re<$.length;Re++)$e=q(xe,V,Re,$[Re],J),$e!==null&&(r&&$e.alternate!==null&&xe.delete($e.key===null?Re:$e.key),I=v($e,I,Re),Fe===null?we=$e:Fe.sibling=$e,Fe=$e);return r&&xe.forEach(function(Hs){return a(V,Hs)}),He&&Hr(V,Re),we}function Ee(V,I,$,J){if($==null)throw Error(s(151));for(var we=null,Fe=null,xe=I,Re=I=0,$e=null,Ke=$.next();xe!==null&&!Ke.done;Re++,Ke=$.next()){xe.index>Re?($e=xe,xe=null):$e=xe.sibling;var Hs=G(V,xe,Ke.value,J);if(Hs===null){xe===null&&(xe=$e);break}r&&xe&&Hs.alternate===null&&a(V,xe),I=v(Hs,I,Re),Fe===null?we=Hs:Fe.sibling=Hs,Fe=Hs,xe=$e}if(Ke.done)return o(V,xe),He&&Hr(V,Re),we;if(xe===null){for(;!Ke.done;Re++,Ke=$.next())Ke=Q(V,Ke.value,J),Ke!==null&&(I=v(Ke,I,Re),Fe===null?we=Ke:Fe.sibling=Ke,Fe=Ke);return He&&Hr(V,Re),we}for(xe=d(xe);!Ke.done;Re++,Ke=$.next())Ke=q(xe,V,Re,Ke.value,J),Ke!==null&&(r&&Ke.alternate!==null&&xe.delete(Ke.key===null?Re:Ke.key),I=v(Ke,I,Re),Fe===null?we=Ke:Fe.sibling=Ke,Fe=Ke);return r&&xe.forEach(function(K2){return a(V,K2)}),He&&Hr(V,Re),we}function tt(V,I,$,J){if(typeof $=="object"&&$!==null&&$.type===_&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case w:e:{for(var we=$.key;I!==null;){if(I.key===we){if(we=$.type,we===_){if(I.tag===7){o(V,I.sibling),J=y(I,$.props.children),J.return=V,V=J;break e}}else if(I.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===P&&Aa(we)===I.type){o(V,I.sibling),J=y(I,$.props),Ko(J,$),J.return=V,V=J;break e}o(V,I);break}else a(V,I);I=I.sibling}$.type===_?(J=_a($.props.children,V.mode,J,$.key),J.return=V,V=J):(J=Oc($.type,$.key,$.props,null,V.mode,J),Ko(J,$),J.return=V,V=J)}return T(V);case S:e:{for(we=$.key;I!==null;){if(I.key===we)if(I.tag===4&&I.stateNode.containerInfo===$.containerInfo&&I.stateNode.implementation===$.implementation){o(V,I.sibling),J=y(I,$.children||[]),J.return=V,V=J;break e}else{o(V,I);break}else a(V,I);I=I.sibling}J=yh($,V.mode,J),J.return=V,V=J}return T(V);case P:return $=Aa($),tt(V,I,$,J)}if(ce($))return me(V,I,$,J);if(se($)){if(we=se($),typeof we!="function")throw Error(s(150));return $=we.call($),Ee(V,I,$,J)}if(typeof $.then=="function")return tt(V,I,Bc($),J);if($.$$typeof===A)return tt(V,I,Pc(V,$),J);Uc(V,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,I!==null&&I.tag===6?(o(V,I.sibling),J=y(I,$),J.return=V,V=J):(o(V,I),J=gh($,V.mode,J),J.return=V,V=J),T(V)):o(V,I)}return function(V,I,$,J){try{Fo=0;var we=tt(V,I,$,J);return Si=null,we}catch(xe){if(xe===wi||xe===zc)throw xe;var Fe=wn(29,xe,null,V.mode);return Fe.lanes=J,Fe.return=V,Fe}}}var ka=Jb(!0),Zb=Jb(!1),js=!1;function Nh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Cs(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function As(r,a,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Ye&2)!==0){var y=d.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=Rc(r),Pb(r,null,o),a}return kc(r,d,a,o),Rc(r)}
vendor: 6,216 bytes, line 8
8function Wo(r,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var d=a.lanes;d&=r.pendingLanes,o|=d,a.lanes=o,on(r,o)}}function Rh(r,a){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var y=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var T={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?y=v=T:v=v.next=T,o=o.next}while(o!==null);v===null?y=v=a:v=v.next=a}else y=v=a;o={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=a:r.next=a,o.lastBaseUpdate=a}var Oh=!1;function Yo(){if(Oh){var r=xi;if(r!==null)throw r}}function Xo(r,a,o,d){Oh=!1;var y=r.updateQueue;js=!1;var v=y.firstBaseUpdate,T=y.lastBaseUpdate,N=y.shared.pending;if(N!==null){y.shared.pending=null;var R=N,H=R.next;R.next=null,T===null?v=H:T.next=H,T=R;var W=r.alternate;W!==null&&(W=W.updateQueue,N=W.lastBaseUpdate,N!==T&&(N===null?W.firstBaseUpdate=H:N.next=H,W.lastBaseUpdate=R))}if(v!==null){var Q=y.baseState;T=0,W=H=R=null,N=v;do{var G=N.lane&-536870913,q=G!==N.lane;if(q?(Ve&G)===G:(d&G)===G){G!==0&&G===bi&&(Oh=!0),W!==null&&(W=W.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var me=r,Ee=N;G=a;var tt=o;switch(Ee.tag){case 1:if(me=Ee.payload,typeof me=="function"){Q=me.call(tt,Q,G);break e}Q=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ee.payload,G=typeof me=="function"?me.call(tt,Q,G):me,G==null)break e;Q=p({},Q,G);break e;case 2:js=!0}}G=N.callback,G!==null&&(r.flags|=64,q&&(r.flags|=8192),q=y.callbacks,q===null?y.callbacks=[G]:q.push(G))}else q={lane:G,tag:N.tag,payload:N.payload,callback:N.callback,next:null},W===null?(H=W=q,R=Q):W=W.next=q,T|=G;if(N=N.next,N===null){if(N=y.shared.pending,N===null)break;q=N,N=q.next,q.next=null,y.lastBaseUpdate=q,y.shared.pending=null}}while(!0);W===null&&(R=Q),y.baseState=R,y.firstBaseUpdate=H,y.lastBaseUpdate=W,v===null&&(y.shared.lanes=0),Ds|=T,r.lanes=T,r.memoizedState=Q}}function Qb(r,a){if(typeof r!="function")throw Error(s(191,r));r.call(a)}function e0(r,a){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)Qb(o[r],a)}var _i=O(null),Vc=O(0);function t0(r,a){r=es,Z(Vc,r),Z(_i,a),es=r|a.baseLanes}function Dh(){Z(Vc,es),Z(_i,_i.current)}function Mh(){es=Vc.current,K(_i),K(Vc)}var Sn=O(null),Vn=null;function Ns(r){var a=r.alternate;Z(vt,vt.current&1),Z(Sn,r),Vn===null&&(a===null||_i.current!==null||a.memoizedState!==null)&&(Vn=r)}function Ph(r){Z(vt,vt.current),Z(Sn,r),Vn===null&&(Vn=r)}function n0(r){r.tag===22?(Z(vt,vt.current),Z(Sn,r),Vn===null&&(Vn=r)):ks()}function ks(){Z(vt,vt.current),Z(Sn,Sn.current)}function _n(r){K(Sn),Vn===r&&(Vn=null),K(vt)}var vt=O(0);function $c(r){for(var a=r;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Vm(o)||$m(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Fr=0,ke=null,Qe=null,wt=null,Hc=!1,Ei=!1,Ra=!1,Gc=0,Jo=0,Ti=null,zR=0;function ht(){throw Error(s(321))}function Lh(r,a){if(a===null)return!1;for(var o=0;o<a.length&&o<r.length;o++)if(!xn(r[o],a[o]))return!1;return!0}function zh(r,a,o,d,y,v){return Fr=v,ke=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,M.H=r===null||r.memoizedState===null?B0:Zh,Ra=!1,v=o(d,y),Ra=!1,Ei&&(v=s0(a,o,d,y)),r0(r),v}function r0(r){M.H=el;var a=Qe!==null&&Qe.next!==null;if(Fr=0,wt=Qe=ke=null,Hc=!1,Jo=0,Ti=null,a)throw Error(s(300));r===null||St||(r=r.dependencies,r!==null&&Mc(r)&&(St=!0))}function s0(r,a,o,d){ke=r;var y=0;do{if(Ei&&(Ti=null),Jo=0,Ei=!1,25<=y)throw Error(s(301));if(y+=1,wt=Qe=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}M.H=U0,v=a(o,d)}while(Ei);return v}function IR(){var r=M.H,a=r.useState()[0];return a=typeof a.then=="function"?Zo(a):a,r=r.useState()[0],(Qe!==null?Qe.memoizedState:null)!==r&&(ke.flags|=1024),a}function Ih(){var r=Gc!==0;return Gc=0,r}function Bh(r,a,o){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~o}function Uh(r){if(Hc){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Hc=!1}Fr=0,wt=Qe=ke=null,Ei=!1,Jo=Gc=0,Ti=null}function nn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?ke.memoizedState=wt=r:wt=wt.next=r,wt}function bt(){if(Qe===null){var r=ke.alternate;r=r!==null?r.memoizedState:null}else r=Qe.next;var a=wt===null?ke.memoizedState:wt.next;if(a!==null)wt=a,Qe=r;else{if(r===null)throw ke.alternate===null?Error(s(467)):Error(s(310));Qe=r,r={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},wt===null?ke.memoizedState=wt=r:wt=wt.next=r}return wt}function qc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zo(r){var a=Jo;return Jo+=1,Ti===null&&(Ti=[]),r=Wb(Ti,r,a),a=ke,(wt===null?a.memoizedState:wt.next)===null&&(a=a.alternate,M.H=a===null||a.memoizedState===null?B0:Zh),r}function Fc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Zo(r);if(r.$$typeof===A)return Ut(r)}throw Error(s(438,String(r)))}function Vh(r){var a=null,o=ke.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var d=ke.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=qc(),ke.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(r),d=0;d<r;d++)o[d]=z;return a.index++,o}function Kr(r,a){return typeof a=="function"?a(r):a}function Kc(r){var a=bt();return $h(a,Qe,r)}function $h(r,a,o){var d=r.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=o;var y=r.baseQueue,v=d.pending;if(v!==null){if(y!==null){var T=y.next;
vendor: 10,381 bytes, line 8
8y.next=v.next,v.next=T}a.baseQueue=y=v,d.pending=null}if(v=r.baseState,y===null)r.memoizedState=v;else{a=y.next;var N=T=null,R=null,H=a,W=!1;do{var Q=H.lane&-536870913;if(Q!==H.lane?(Ve&Q)===Q:(Fr&Q)===Q){var G=H.revertLane;if(G===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),Q===bi&&(W=!0);else if((Fr&G)===G){H=H.next,G===bi&&(W=!0);continue}else Q={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(N=R=Q,T=v):R=R.next=Q,ke.lanes|=G,Ds|=G;Q=H.action,Ra&&o(v,Q),v=H.hasEagerState?H.eagerState:o(v,Q)}else G={lane:Q,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(N=R=G,T=v):R=R.next=G,ke.lanes|=Q,Ds|=Q;H=H.next}while(H!==null&&H!==a);if(R===null?T=v:R.next=N,!xn(v,r.memoizedState)&&(St=!0,W&&(o=xi,o!==null)))throw o;r.memoizedState=v,r.baseState=T,r.baseQueue=R,d.lastRenderedState=v}return y===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Hh(r){var a=bt(),o=a.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=r;var d=o.dispatch,y=o.pending,v=a.memoizedState;if(y!==null){o.pending=null;var T=y=y.next;do v=r(v,T.action),T=T.next;while(T!==y);xn(v,a.memoizedState)||(St=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,d]}function a0(r,a,o){var d=ke,y=bt(),v=He;if(v){if(o===void 0)throw Error(s(407));o=o()}else o=a();var T=!xn((Qe||y).memoizedState,o);if(T&&(y.memoizedState=o,St=!0),y=y.queue,Fh(l0.bind(null,d,y,r),[r]),y.getSnapshot!==a||T||wt!==null&&wt.memoizedState.tag&1){if(d.flags|=2048,ji(9,{destroy:void 0},o0.bind(null,d,y,o,a),null),rt===null)throw Error(s(349));v||(Fr&127)!==0||i0(d,a,o)}return o}function i0(r,a,o){r.flags|=16384,r={getSnapshot:a,value:o},a=ke.updateQueue,a===null?(a=qc(),ke.updateQueue=a,a.stores=[r]):(o=a.stores,o===null?a.stores=[r]:o.push(r))}function o0(r,a,o,d){a.value=o,a.getSnapshot=d,c0(a)&&u0(r)}function l0(r,a,o){return o(function(){c0(a)&&u0(r)})}function c0(r){var a=r.getSnapshot;r=r.value;try{var o=a();return!xn(r,o)}catch{return!0}}function u0(r){var a=Sa(r,2);a!==null&&pn(a,r,2)}function Gh(r){var a=nn();if(typeof r=="function"){var o=r;if(r=o(),Ra){Yn(!0);try{o()}finally{Yn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:r},a}function d0(r,a,o,d){return r.baseState=o,$h(r,Qe,typeof d=="function"?d:Kr)}function BR(r,a,o,d,y){if(Xc(r))throw Error(s(485));if(r=a.action,r!==null){var v={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){v.listeners.push(T)}};M.T!==null?o(!0):v.isTransition=!1,d(v),o=a.pending,o===null?(v.next=a.pending=v,f0(a,v)):(v.next=o.next,a.pending=o.next=v)}}function f0(r,a){var o=a.action,d=a.payload,y=r.state;if(a.isTransition){var v=M.T,T={};M.T=T;try{var N=o(y,d),R=M.S;R!==null&&R(T,N),h0(r,a,N)}catch(H){qh(r,a,H)}finally{v!==null&&T.types!==null&&(v.types=T.types),M.T=v}}else try{v=o(y,d),h0(r,a,v)}catch(H){qh(r,a,H)}}function h0(r,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){m0(r,a,d)},function(d){return qh(r,a,d)}):m0(r,a,o)}function m0(r,a,o){a.status="fulfilled",a.value=o,p0(a),r.state=o,a=r.pending,a!==null&&(o=a.next,o===a?r.pending=null:(o=o.next,a.next=o,f0(r,o)))}function qh(r,a,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=o,p0(a),a=a.next;while(a!==d)}r.action=null}function p0(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function g0(r,a){return a}function y0(r,a){if(He){var o=rt.formState;if(o!==null){e:{var d=ke;if(He){if(it){t:{for(var y=it,v=Un;y.nodeType!==8;){if(!v){y=null;break t}if(y=$n(y.nextSibling),y===null){y=null;break t}}v=y.data,y=v==="F!"||v==="F"?y:null}if(y){it=$n(y.nextSibling),d=y.data==="F!";break e}}Es(d)}d=!1}d&&(a=o[0])}}return o=nn(),o.memoizedState=o.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:g0,lastRenderedState:a},o.queue=d,o=L0.bind(null,ke,d),d.dispatch=o,d=Gh(!1),v=Jh.bind(null,ke,!1,d.queue),d=nn(),y={state:a,dispatch:null,action:r,pending:null},d.queue=y,o=BR.bind(null,ke,y,v,o),y.dispatch=o,d.memoizedState=r,[a,o,!1]}function v0(r){var a=bt();return b0(a,Qe,r)}function b0(r,a,o){if(a=$h(r,a,g0)[0],r=Kc(Kr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Zo(a)}catch(T){throw T===wi?zc:T}else d=a;a=bt();var y=a.queue,v=y.dispatch;return o!==a.memoizedState&&(ke.flags|=2048,ji(9,{destroy:void 0},UR.bind(null,y,o),null)),[d,v,r]}function UR(r,a){r.action=a}function x0(r){var a=bt(),o=Qe;if(o!==null)return b0(a,o,r);bt(),a=a.memoizedState,o=bt();var d=o.queue.dispatch;return o.memoizedState=r,[a,d,!1]}function ji(r,a,o,d){return r={tag:r,create:o,deps:d,inst:a,next:null},a=ke.updateQueue,a===null&&(a=qc(),ke.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,a.lastEffect=r),r}function w0(){return bt().memoizedState}function Wc(r,a,o,d){var y=nn();ke.flags|=r,y.memoizedState=ji(1|a,{destroy:void 0},o,d===void 0?null:d)}function Yc(r,a,o,d){var y=bt();d=d===void 0?null:d;var v=y.memoizedState.inst;Qe!==null&&d!==null&&Lh(d,Qe.memoizedState.deps)?y.memoizedState=ji(a,v,o,d):(ke.flags|=r,y.memoizedState=ji(1|a,v,o,d))}function S0(r,a){Wc(8390656,8,r,a)}function Fh(r,a){Yc(2048,8,r,a)}function VR(r){ke.flags|=4;var a=ke.updateQueue;if(a===null)a=qc(),ke.updateQueue=a,a.events=[r];else{var o=a.events;o===null?a.events=[r]:o.push(r)}}function _0(r){var a=bt().memoizedState;return VR({ref:a,nextImpl:r}),function(){if((Ye&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function E0(r,a){return Yc(4,2,r,a)}function T0(r,a){return Yc(4,4,r,a)}function j0(r,a){if(typeof a=="function"){r=r();var o=a(r);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function C0(r,a,o){o=o!=null?o.concat([r]):null,Yc(4,4,j0.bind(null,a,r),o)}function Kh(){}function A0(r,a){var o=bt();a=a===void 0?null:a;var d=o.memoizedState;return a!==null&&Lh(a,d[1])?d[0]:(o.memoizedState=[r,a],r)}function N0(r,a){var o=bt();a=a===void 0?null:a;var d=o.memoizedState;if(a!==null&&Lh(a,d[1]))return d[0];if(d=r(),Ra){Yn(!0);try{r()}finally{Yn(!1)}}return o.memoizedState=[d,a],d}function Wh(r,a,o){return o===void 0||(Fr&1073741824)!==0&&(Ve&261930)===0?r.memoizedState=a:(r.memoizedState=o,r=kx(),ke.lanes|=r,Ds|=r,o)}function k0(r,a,o,d){return xn(o,a)?o:_i.current!==null?(r=Wh(r,o,d),xn(r,a)||(St=!0),r):(Fr&42)===0||(Fr&1073741824)!==0&&(Ve&261930)===0?(St=!0,r.memoizedState=o):(r=kx(),ke.lanes|=r,Ds|=r,a)}function R0(r,a,o,d,y){var v=F.p;F.p=v!==0&&8>v?v:8;var T=M.T,N={};M.T=N,Jh(r,!1,a,o);try{var R=y(),H=M.S;if(H!==null&&H(N,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var W=LR(R,d);Qo(r,a,W,jn(r))}else Qo(r,a,d,jn(r))}catch(Q){Qo(r,a,{then:function(){},status:"rejected",reason:Q},jn())}finally{F.p=v,T!==null&&N.types!==null&&(T.types=N.types),M.T=T}}function $R(){}function Yh(r,a,o,d){if(r.tag!==5)throw Error(s(476));var y=O0(r).queue;R0(r,y,a,X,o===null?$R:function(){return D0(r),o(d)})}function O0(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:X},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kr,lastRenderedState:o},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function D0(r){var a=O0(r);a.next===null&&(a=r.alternate.memoizedState),Qo(r,a.next.queue,{},jn())}function Xh(){return Ut(gl)}function M0(){return bt().memoizedState}function P0(){return bt().memoizedState}function HR(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var o=jn();r=Cs(o);var d=As(a,r,o);d!==null&&(pn(d,a,o),Wo(d,a,o)),a={cache:Th()},r.payload=a;return}a=a.return}}function GR(r,a,o){var d=jn();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Xc(r)?z0(a,o):(o=mh(r,a,o,d),o!==null&&(pn(o,r,d),I0(o,a,d)))}function L0(r,a,o){var d=jn();Qo(r,a,o,d)}function Qo(r,a,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Xc(r))z0(a,y);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null))try{var T=a.lastRenderedState,N=v(T,o);if(y.hasEagerState=!0,y.eagerState=N,xn(N,T))return kc(r,a,y,0),rt===null&&Nc(),!1}catch{}if(o=mh(r,a,y,d),o!==null)return pn(o,r,d),I0(o,a,d),!0}return!1}function Jh(r,a,o,d){if(d={lane:2,revertLane:Nm(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Xc(r)){if(a)throw Error(s(479))}else a=mh(r,o,d,2),a!==null&&pn(a,r,2)}function Xc(r){var a=r.alternate;return r===ke||a!==null&&a===ke}function z0(r,a){Ei=Hc=!0;var o=r.pending;o===null?a.next=a:(a.next=o.next,o.next=a),r.pending=a}function I0(r,a,o){if((o&4194048)!==0){var d=a.lanes;d&=r.pendingLanes,o|=d,a.lanes=o,on(r,o)}}var el={readContext:Ut,use:Fc,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};el.useEffectEvent=ht;var B0={readContext:Ut,use:Fc,useCallback:function(r,a){return nn().memoizedState=[r,a===void 0?null:a],r},useContext:Ut,useEffect:S0,useImperativeHandle:function(r,a,o){o=o!=null?o.concat([r]):null,Wc(4194308,4,j0.bind(null,a,r),o)},useLayoutEffect:function(r,a){return Wc(4194308,4,r,a)},useInsertionEffect:function(r,a){Wc(4,2,r,a)},useMemo:function(r,a){var o=nn();a=a===void 0?null:a;var d=r();if(Ra){Yn(!0);try{r()}finally{Yn(!1)}}return o.memoizedState=[d,a],d},useReducer:function(r,a,o){var d=nn();if(o!==void 0){var y=o(a);if(Ra){Yn(!0);try{o(a)}finally{Yn(!1)}}}else y=a;return d.memoizedState=d.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},d.queue=r,r=r.dispatch=GR.bind(null,ke,r),[d.memoizedState,r]}
vendor: 4,391 bytes, line 8
8,useRef:function(r){var a=nn();return r={current:r},a.memoizedState=r},useState:function(r){r=Gh(r);var a=r.queue,o=L0.bind(null,ke,a);return a.dispatch=o,[r.memoizedState,o]},useDebugValue:Kh,useDeferredValue:function(r,a){var o=nn();return Wh(o,r,a)},useTransition:function(){var r=Gh(!1);return r=R0.bind(null,ke,r.queue,!0,!1),nn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,o){var d=ke,y=nn();if(He){if(o===void 0)throw Error(s(407));o=o()}else{if(o=a(),rt===null)throw Error(s(349));(Ve&127)!==0||i0(d,a,o)}y.memoizedState=o;var v={value:o,getSnapshot:a};return y.queue=v,S0(l0.bind(null,d,v,r),[r]),d.flags|=2048,ji(9,{destroy:void 0},o0.bind(null,d,v,o,a),null),o},useId:function(){var r=nn(),a=rt.identifierPrefix;if(He){var o=xr,d=br;o=(d&~(1<<32-Kt(d)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Gc++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=zR++,a="_"+a+"r_"+o.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Xh,useFormState:y0,useActionState:y0,useOptimistic:function(r){var a=nn();a.memoizedState=a.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Jh.bind(null,ke,!0,o),o.dispatch=a,[r,a]},useMemoCache:Vh,useCacheRefresh:function(){return nn().memoizedState=HR.bind(null,ke)},useEffectEvent:function(r){var a=nn(),o={impl:r};return a.memoizedState=o,function(){if((Ye&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}},Zh={readContext:Ut,use:Fc,useCallback:A0,useContext:Ut,useEffect:Fh,useImperativeHandle:C0,useInsertionEffect:E0,useLayoutEffect:T0,useMemo:N0,useReducer:Kc,useRef:w0,useState:function(){return Kc(Kr)},useDebugValue:Kh,useDeferredValue:function(r,a){var o=bt();return k0(o,Qe.memoizedState,r,a)},useTransition:function(){var r=Kc(Kr)[0],a=bt().memoizedState;return[typeof r=="boolean"?r:Zo(r),a]},useSyncExternalStore:a0,useId:M0,useHostTransitionStatus:Xh,useFormState:v0,useActionState:v0,useOptimistic:function(r,a){var o=bt();return d0(o,Qe,r,a)},useMemoCache:Vh,useCacheRefresh:P0};Zh.useEffectEvent=_0;var U0={readContext:Ut,use:Fc,useCallback:A0,useContext:Ut,useEffect:Fh,useImperativeHandle:C0,useInsertionEffect:E0,useLayoutEffect:T0,useMemo:N0,useReducer:Hh,useRef:w0,useState:function(){return Hh(Kr)},useDebugValue:Kh,useDeferredValue:function(r,a){var o=bt();return Qe===null?Wh(o,r,a):k0(o,Qe.memoizedState,r,a)},useTransition:function(){var r=Hh(Kr)[0],a=bt().memoizedState;return[typeof r=="boolean"?r:Zo(r),a]},useSyncExternalStore:a0,useId:M0,useHostTransitionStatus:Xh,useFormState:x0,useActionState:x0,useOptimistic:function(r,a){var o=bt();return Qe!==null?d0(o,Qe,r,a):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:Vh,useCacheRefresh:P0};U0.useEffectEvent=_0;function Qh(r,a,o,d){a=r.memoizedState,o=o(d,a),o=o==null?a:p({},a,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var em={enqueueSetState:function(r,a,o){r=r._reactInternals;var d=jn(),y=Cs(d);y.payload=a,o!=null&&(y.callback=o),a=As(r,y,d),a!==null&&(pn(a,r,d),Wo(a,r,d))},enqueueReplaceState:function(r,a,o){r=r._reactInternals;var d=jn(),y=Cs(d);y.tag=1,y.payload=a,o!=null&&(y.callback=o),a=As(r,y,d),a!==null&&(pn(a,r,d),Wo(a,r,d))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var o=jn(),d=Cs(o);d.tag=2,a!=null&&(d.callback=a),a=As(r,d,o),a!==null&&(pn(a,r,o),Wo(a,r,o))}};function V0(r,a,o,d,y,v,T){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,v,T):a.prototype&&a.prototype.isPureReactComponent?!Uo(o,d)||!Uo(y,v):!0}function $0(r,a,o,d){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,d),a.state!==r&&em.enqueueReplaceState(a,a.state,null)}function Oa(r,a){var o=a;if("ref"in a){o={};for(var d in a)d!=="ref"&&(o[d]=a[d])}if(r=r.defaultProps){o===a&&(o=p({},o));for(var y in r)o[y]===void 0&&(o[y]=r[y])}return o}function H0(r){Ac(r)}function G0(r){console.error(r)}function q0(r){Ac(r)}function Jc(r,a){try{var o=r.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(d){setTimeout(function(){throw d})}}function F0(r,a,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function tm(r,a,o){return o=Cs(o),o.tag=3,o.payload={element:null}
vendor: 4,886 bytes, line 8
8,o.callback=function(){Jc(r,a)},o}function K0(r){return r=Cs(r),r.tag=3,r}function W0(r,a,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var v=d.value;r.payload=function(){return y(v)},r.callback=function(){F0(a,o,d)}}var T=o.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){F0(a,o,d),typeof y!="function"&&(Ms===null?Ms=new Set([this]):Ms.add(this));var N=d.stack;this.componentDidCatch(d.value,{componentStack:N!==null?N:""})})}function qR(r,a,o,d,y){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=o.alternate,a!==null&&vi(a,o,y,!0),o=Sn.current,o!==null){switch(o.tag){case 31:case 13:return Vn===null?cu():o.alternate===null&&mt===0&&(mt=3),o.flags&=-257,o.flags|=65536,o.lanes=y,d===Ic?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([d]):a.add(d),jm(r,d,y)),!1;case 22:return o.flags|=65536,d===Ic?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([d]):o.add(d)),jm(r,d,y)),!1}throw Error(s(435,o.tag))}return jm(r,d,y),cu(),!1}if(He)return a=Sn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==xh&&(r=Error(s(422),{cause:d}),Ho(zn(r,o)))):(d!==xh&&(a=Error(s(423),{cause:d}),Ho(zn(a,o))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,d=zn(d,o),y=tm(r.stateNode,d,y),Rh(r,y),mt!==4&&(mt=2)),!1;var v=Error(s(520),{cause:d});if(v=zn(v,o),ll===null?ll=[v]:ll.push(v),mt!==4&&(mt=2),a===null)return!0;d=zn(d,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,r=y&-y,o.lanes|=r,r=tm(o.stateNode,d,r),Rh(o,r),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ms===null||!Ms.has(v))))return o.flags|=65536,y&=-y,o.lanes|=y,y=K0(y),W0(y,r,o,d),Rh(o,y),!1}o=o.return}while(o!==null);return!1}var nm=Error(s(461)),St=!1;function Vt(r,a,o,d){a.child=r===null?Zb(a,null,o,d):ka(a,r.child,o,d)}function Y0(r,a,o,d,y){o=o.render;var v=a.ref;if("ref"in d){var T={};for(var N in d)N!=="ref"&&(T[N]=d[N])}else T=d;return ja(a),d=zh(r,a,o,T,v,y),N=Ih(),r!==null&&!St?(Bh(r,a,y),Wr(r,a,y)):(He&&N&&vh(a),a.flags|=1,Vt(r,a,d,y),a.child)}function X0(r,a,o,d,y){if(r===null){var v=o.type;return typeof v=="function"&&!ph(v)&&v.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=v,J0(r,a,v,d,y)):(r=Oc(o.type,null,d,a,a.mode,y),r.ref=a.ref,r.return=a,a.child=r)}if(v=r.child,!um(r,y)){var T=v.memoizedProps;if(o=o.compare,o=o!==null?o:Uo,o(T,d)&&r.ref===a.ref)return Wr(r,a,y)}return a.flags|=1,r=$r(v,d),r.ref=a.ref,r.return=a,a.child=r}function J0(r,a,o,d,y){if(r!==null){var v=r.memoizedProps;if(Uo(v,d)&&r.ref===a.ref)if(St=!1,a.pendingProps=d=v,um(r,y))(r.flags&131072)!==0&&(St=!0);else return a.lanes=r.lanes,Wr(r,a,y)}return rm(r,a,o,d,y)}function Z0(r,a,o,d){var y=d.children,v=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,r!==null){for(d=a.child=r.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~v}else d=0,a.child=null;return Q0(r,a,v,o,d)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Lc(a,v!==null?v.cachePool:null),v!==null?t0(a,v):Dh(),n0(a);else return d=a.lanes=536870912,Q0(r,a,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(Lc(a,v.cachePool),t0(a,v),ks(),a.memoizedState=null):(r!==null&&Lc(a,null),Dh(),ks());return Vt(r,a,y,o),a.child}function tl(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Q0(r,a,o,d,y){var v=Ch();return v=v===null?null:{parent:xt._currentValue,pool:v},a.memoizedState={baseLanes:o,cachePool:v},r!==null&&Lc(a,null),Dh(),n0(a),r!==null&&vi(r,a,d,!0),a.childLanes=y,null}function Zc(r,a){return a=eu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function ex(r,a,o){return ka(a,r.child,null,o),r=Zc(a,a.pendingProps),r.flags|=2,_n(a),a.memoizedState=null,r}function FR(r,a,o){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(He){if(d.mode==="hidden")return r=Zc(a,d),a.lanes=536870912,tl(null,r);if(Ph(a),(r=it)?(r=fw(r,Un),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ss!==null?{id:br,overflow:xr}:null,retryLane:536870912,hydrationErrors:null},o=zb(r),o.return=a,a.child=o,Bt=a,it=null)):r=null,r===null)throw Es(a);return a.lanes=536870912,null}return Zc(a,d)}var v=r.memoizedState;if(v!==null){var T=v.dehydrated;if(Ph(a),y)if(a.flags&256)a.flags&=-257,a=ex(r,a,o);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(s(558));
vendor: 4,682 bytes, line 8
8else if(St||vi(r,a,o,!1),y=(o&r.childLanes)!==0,St||y){if(d=rt,d!==null&&(T=ln(d,o),T!==0&&T!==v.retryLane))throw v.retryLane=T,Sa(r,T),pn(d,r,T),nm;cu(),a=ex(r,a,o)}else r=v.treeContext,it=$n(T.nextSibling),Bt=a,He=!0,_s=null,Un=!1,r!==null&&Ub(a,r),a=Zc(a,d),a.flags|=4096;return a}return r=$r(r.child,{mode:d.mode,children:d.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Qc(r,a){var o=a.ref;if(o===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(r===null||r.ref!==o)&&(a.flags|=4194816)}}function rm(r,a,o,d,y){return ja(a),o=zh(r,a,o,d,void 0,y),d=Ih(),r!==null&&!St?(Bh(r,a,y),Wr(r,a,y)):(He&&d&&vh(a),a.flags|=1,Vt(r,a,o,y),a.child)}function tx(r,a,o,d,y,v){return ja(a),a.updateQueue=null,o=s0(a,d,o,y),r0(r),d=Ih(),r!==null&&!St?(Bh(r,a,v),Wr(r,a,v)):(He&&d&&vh(a),a.flags|=1,Vt(r,a,o,v),a.child)}function nx(r,a,o,d,y){if(ja(a),a.stateNode===null){var v=mi,T=o.contextType;typeof T=="object"&&T!==null&&(v=Ut(T)),v=new o(d,v),a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=em,a.stateNode=v,v._reactInternals=a,v=a.stateNode,v.props=d,v.state=a.memoizedState,v.refs={},Nh(a),T=o.contextType,v.context=typeof T=="object"&&T!==null?Ut(T):mi,v.state=a.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Qh(a,o,T,d),v.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(T=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),T!==v.state&&em.enqueueReplaceState(v,v.state,null),Xo(a,d,v,y),Yo(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),d=!0}else if(r===null){v=a.stateNode;var N=a.memoizedProps,R=Oa(o,N);v.props=R;var H=v.context,W=o.contextType;T=mi,typeof W=="object"&&W!==null&&(T=Ut(W));var Q=o.getDerivedStateFromProps;W=typeof Q=="function"||typeof v.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,W||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(N||H!==T)&&$0(a,v,d,T),js=!1;var G=a.memoizedState;v.state=G,Xo(a,d,v,y),Yo(),H=a.memoizedState,N||G!==H||js?(typeof Q=="function"&&(Qh(a,o,Q,d),H=a.memoizedState),(R=js||V0(a,o,R,d,G,H,T))?(W||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=d,a.memoizedState=H),v.props=d,v.state=H,v.context=T,d=R):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),d=!1)}else{v=a.stateNode,kh(r,a),T=a.memoizedProps,W=Oa(o,T),v.props=W,Q=a.pendingProps,G=v.context,H=o.contextType,R=mi,typeof H=="object"&&H!==null&&(R=Ut(H)),N=o.getDerivedStateFromProps,(H=typeof N=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==Q||G!==R)&&$0(a,v,d,R),js=!1,G=a.memoizedState,v.state=G,Xo(a,d,v,y),Yo();var q=a.memoizedState;T!==Q||G!==q||js||r!==null&&r.dependencies!==null&&Mc(r.dependencies)?(typeof N=="function"&&(Qh(a,o,N,d),q=a.memoizedState),(W=js||V0(a,o,W,d,G,q,R)||r!==null&&r.dependencies!==null&&Mc(r.dependencies))?(H||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,q,R),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,q,R)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&G===r.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&G===r.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=q),v.props=d,v.state=q,v.context=R,d=W):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&G===r.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&G===r.memoizedState||(a.flags|=1024),d=!1)}return v=d,Qc(r,a),d=(a.flags&128)!==0,v||d?(v=a.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:v.render(),a.flags|=1,r!==null&&d?(a.child=ka(a,r.child,null,y),a.child=ka(a,null,o,y)):Vt(r,a,o,y),a.memoizedState=v.state,r=
vendor: 2,579 bytes, line 8
8a.child):r=Wr(r,a,y),r}function rx(r,a,o,d){return Ea(),a.flags|=256,Vt(r,a,o,d),a.child}var sm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function am(r){return{baseLanes:r,cachePool:Fb()}}function im(r,a,o){return r=r!==null?r.childLanes&~o:0,a&&(r|=Tn),r}function sx(r,a,o){var d=a.pendingProps,y=!1,v=(a.flags&128)!==0,T;if((T=v)||(T=r!==null&&r.memoizedState===null?!1:(vt.current&2)!==0),T&&(y=!0,a.flags&=-129),T=(a.flags&32)!==0,a.flags&=-33,r===null){if(He){if(y?Ns(a):ks(),(r=it)?(r=fw(r,Un),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ss!==null?{id:br,overflow:xr}:null,retryLane:536870912,hydrationErrors:null},o=zb(r),o.return=a,a.child=o,Bt=a,it=null)):r=null,r===null)throw Es(a);return $m(r)?a.lanes=32:a.lanes=536870912,null}var N=d.children;return d=d.fallback,y?(ks(),y=a.mode,N=eu({mode:"hidden",children:N},y),d=_a(d,y,o,null),N.return=a,d.return=a,N.sibling=d,a.child=N,d=a.child,d.memoizedState=am(o),d.childLanes=im(r,T,o),a.memoizedState=sm,tl(null,d)):(Ns(a),om(a,N))}var R=r.memoizedState;if(R!==null&&(N=R.dehydrated,N!==null)){if(v)a.flags&256?(Ns(a),a.flags&=-257,a=lm(r,a,o)):a.memoizedState!==null?(ks(),a.child=r.child,a.flags|=128,a=null):(ks(),N=d.fallback,y=a.mode,d=eu({mode:"visible",children:d.children},y),N=_a(N,y,o,null),N.flags|=2,d.return=a,N.return=a,d.sibling=N,a.child=d,ka(a,r.child,null,o),d=a.child,d.memoizedState=am(o),d.childLanes=im(r,T,o),a.memoizedState=sm,a=tl(null,d));else if(Ns(a),$m(N)){if(T=N.nextSibling&&N.nextSibling.dataset,T)var H=T.dgst;T=H,d=Error(s(419)),d.stack="",d.digest=T,Ho({value:d,source:null,stack:null}),a=lm(r,a,o)}else if(St||vi(r,a,o,!1),T=(o&r.childLanes)!==0,St||T){if(T=rt,T!==null&&(d=ln(T,o),d!==0&&d!==R.retryLane))throw R.retryLane=d,Sa(r,d),pn(T,r,d),nm;Vm(N)||cu(),a=lm(r,a,o)}else Vm(N)?(a.flags|=192,a.child=r.child,a=null):(r=R.treeContext,it=$n(N.nextSibling),Bt=a,He=!0,_s=null,Un=!1,r!==null&&Ub(a,r),a=om(a,d.children),a.flags|=4096);return a}return y?(ks(),N=d.fallback,y=a.mode,R=r.child,H=R.sibling,d=$r(R,{mode:"hidden",children:d.children}),d.subtreeFlags=R.subtreeFlags&65011712,H!==null?N=$r(H,N):(N=_a(N,y,o,null),N.flags|=2),N.return=a,d.return=a,d.sibling=N,a.child=d,tl(null,d),d=a.child,N=r.child.memoizedState,N===null?N=am(o):(y=N.cachePool,y!==null?(R=xt._currentValue,y=y.parent!==R?{parent:R,pool:R}:y):y=Fb(),N={baseLanes:N.baseLanes|o,cachePool:y}),d.memoizedState=N,d.childLanes=im(r,T,o),a.memoizedState=sm,tl(r.child,d)):(Ns(a),o=r.child,r=o.sibling,o=$r(o,{mode:"visible",children:d.children}
vendor: 5,944 bytes, line 8
8),o.return=a,o.sibling=null,r!==null&&(T=a.deletions,T===null?(a.deletions=[r],a.flags|=16):T.push(r)),a.child=o,a.memoizedState=null,o)}function om(r,a){return a=eu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function eu(r,a){return r=wn(22,r,null,a),r.lanes=0,r}function lm(r,a,o){return ka(a,r.child,null,o),r=om(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function ax(r,a,o){r.lanes|=a;var d=r.alternate;d!==null&&(d.lanes|=a),_h(r.return,a,o)}function cm(r,a,o,d,y,v){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:v}:(T.isBackwards=a,T.rendering=null,T.renderingStartTime=0,T.last=d,T.tail=o,T.tailMode=y,T.treeForkCount=v)}function ix(r,a,o){var d=a.pendingProps,y=d.revealOrder,v=d.tail;d=d.children;var T=vt.current,N=(T&2)!==0;if(N?(T=T&1|2,a.flags|=128):T&=1,Z(vt,T),Vt(r,a,d,o),d=He?$o:0,!N&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&ax(r,o,a);else if(r.tag===19)ax(r,o,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(o=a.child,y=null;o!==null;)r=o.alternate,r!==null&&$c(r)===null&&(y=o),o=o.sibling;o=y,o===null?(y=a.child,a.child=null):(y=o.sibling,o.sibling=null),cm(a,!1,y,o,v,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=a.child,a.child=null;y!==null;){if(r=y.alternate,r!==null&&$c(r)===null){a.child=y;break}r=y.sibling,y.sibling=o,o=y,y=r}cm(a,!0,o,null,v,d);break;case"together":cm(a,!1,null,null,void 0,d);break;default:a.memoizedState=null}return a.child}function Wr(r,a,o){if(r!==null&&(a.dependencies=r.dependencies),Ds|=a.lanes,(o&a.childLanes)===0)if(r!==null){if(vi(r,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(s(153));if(a.child!==null){for(r=a.child,o=$r(r,r.pendingProps),a.child=o,o.return=a;r.sibling!==null;)r=r.sibling,o=o.sibling=$r(r,r.pendingProps),o.return=a;o.sibling=null}return a.child}function um(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Mc(r)))}function KR(r,a,o){switch(a.tag){case 3:he(a,a.stateNode.containerInfo),Ts(a,xt,r.memoizedState.cache),Ea();break;case 27:case 5:Oe(a);break;case 4:he(a,a.stateNode.containerInfo);break;case 10:Ts(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Ph(a),null;break;case 13:var d=a.memoizedState;if(d!==null)return d.dehydrated!==null?(Ns(a),a.flags|=128,null):(o&a.child.childLanes)!==0?sx(r,a,o):(Ns(a),r=Wr(r,a,o),r!==null?r.sibling:null);Ns(a);break;case 19:var y=(r.flags&128)!==0;if(d=(o&a.childLanes)!==0,d||(vi(r,a,o,!1),d=(o&a.childLanes)!==0),y){if(d)return ix(r,a,o);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Z(vt,vt.current),d)break;return null;case 22:return a.lanes=0,Z0(r,a,o,a.pendingProps);case 24:Ts(a,xt,r.memoizedState.cache)}return Wr(r,a,o)}function ox(r,a,o){if(r!==null)if(r.memoizedProps!==a.pendingProps)St=!0;else{if(!um(r,o)&&(a.flags&128)===0)return St=!1,KR(r,a,o);St=(r.flags&131072)!==0}else St=!1,He&&(a.flags&1048576)!==0&&Bb(a,$o,a.index);switch(a.lanes=0,a.tag){case 16:e:{var d=a.pendingProps;if(r=Aa(a.elementType),a.type=r,typeof r=="function")ph(r)?(d=Oa(r,d),a.tag=1,a=nx(null,a,r,d,o)):(a.tag=0,a=rm(null,a,r,d,o));else{if(r!=null){var y=r.$$typeof;if(y===k){a.tag=11,a=Y0(null,a,r,d,o);break e}else if(y===L){a.tag=14,a=X0(null,a,r,d,o);break e}}throw a=fe(r)||r,Error(s(306,a,""))}}return a;case 0:return rm(r,a,a.type,a.pendingProps,o);case 1:return d=a.type,y=Oa(d,a.pendingProps),nx(r,a,d,y,o);case 3:e:{if(he(a,a.stateNode.containerInfo),r===null)throw Error(s(387));d=a.pendingProps;var v=a.memoizedState;y=v.element,kh(r,a),Xo(a,d,null,o);var T=a.memoizedState;if(d=T.cache,Ts(a,xt,d),d!==v.cache&&Eh(a,[xt],o,!0),Yo(),d=T.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:T.cache},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){a=rx(r,a,d,o);break e}else if(d!==y){y=zn(Error(s(424)),a),Ho(y),a=rx(r,a,d,o);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,it=$n(r.firstChild),Bt=a,He=!0,_s=null,Un=!0,o=Zb(a,null,d,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ea(),d===y){a=Wr(r,a,o);break e}Vt(r,a,d,o)}a=a.child}return a;case 26:return Qc(r,a),r===null?(o=vw(a.type,null,a.pendingProps,null))?a.memoizedState=o:He||(o=a.type,r=a.pendingProps,d=gu(ue.current).createElement(o),d[It]=a,d[cn]=r,$t(d,o,r),Dt(d),a.stateNode=d):a.memoizedState=vw(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Oe(a),r===null&&He&&(d=a.stateNode=pw(a.type,a.pendingProps,ue.current),Bt=a,Un=!0,y=it,Is(a.type)?(Hm=y,it=$n(d.firstChild)):it=y),Vt(r,a,a.pendingProps.children,o),Qc(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&He&&((y=d=it)&&(d=_2(d,a.type,a.pendingProps,Un),d!==null?(a.stateNode=d,Bt=a,it=$n(d.firstChild),Un=!1,y=!0):y=!1),y||Es(a)),Oe(a),y=a.type,v=a.pendingProps,T=r!==null?r.memoizedProps:null,d=v.children,Im(y,v)?d=null:T!==null&&Im(y,T)&&(a.flags|=32),a.memoizedState!==null&&(y=zh(r,a,IR,null,null,o),gl._currentValue=y),Qc(r,a),Vt(r,a,d,o),a.child;case 6:return r===null&&He&&((r=o=it)&&(o=E2(o,a.pendingProps,Un),o!==null?(a.stateNode=o,Bt=a,it=null,r=!0):r=!1),r||Es(a)),null;case 13:return sx(r,a,o);case 4:return he(a,a.stateNode.containerInfo),d=a.pendingProps,r===null?a.child=ka(a,null,d,o):Vt(r,a,d,o),a.child;case 11:return Y0(r,a,a.type,a.pendingProps,o);case 7:return Vt(r,a,a.pendingProps,o),a.child;case 8:return Vt(r,a,a.pendingProps.children,o),a.child;case 12:return Vt(r,a,a.pendingProps.children,o),a.child;case 10:return d=a.pendingProps,Ts(a,a.type,d.value),Vt(r,a,d.children,o),a.child;
vendor: 4,764 bytes, line 8
8case 9:return y=a.type._context,d=a.pendingProps.children,ja(a),y=Ut(y),d=d(y),a.flags|=1,Vt(r,a,d,o),a.child;case 14:return X0(r,a,a.type,a.pendingProps,o);case 15:return J0(r,a,a.type,a.pendingProps,o);case 19:return ix(r,a,o);case 31:return FR(r,a,o);case 22:return Z0(r,a,o,a.pendingProps);case 24:return ja(a),d=Ut(xt),r===null?(y=Ch(),y===null&&(y=rt,v=Th(),y.pooledCache=v,v.refCount++,v!==null&&(y.pooledCacheLanes|=o),y=v),a.memoizedState={parent:d,cache:y},Nh(a),Ts(a,xt,y)):((r.lanes&o)!==0&&(kh(r,a),Xo(a,null,null,o),Yo()),y=r.memoizedState,v=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Ts(a,xt,d)):(d=v.cache,Ts(a,xt,d),d!==y.cache&&Eh(a,[xt],o,!0))),Vt(r,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function Yr(r){r.flags|=4}function dm(r,a,o,d,y){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(Mx())r.flags|=8192;else throw Na=Ic,Ah}else r.flags&=-16777217}function lx(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!_w(a))if(Mx())r.flags|=8192;else throw Na=Ic,Ah}function tu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Wt():536870912,r.lanes|=a,ki|=a)}function nl(r,a){if(!He)switch(r.tailMode){case"hidden":a=r.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function ot(r){var a=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(a)for(var y=r.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=d,r.childLanes=o,a}function WR(r,a,o){var d=a.pendingProps;switch(bh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(a),null;case 1:return ot(a),null;case 3:return o=a.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),qr(xt),ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(yi(a)?Yr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,wh())),ot(a),null;case 26:var y=a.type,v=a.memoizedState;return r===null?(Yr(a),v!==null?(ot(a),lx(a,v)):(ot(a),dm(a,y,null,d,o))):v?v!==r.memoizedState?(Yr(a),ot(a),lx(a,v)):(ot(a),a.flags&=-16777217):(r=r.memoizedProps,r!==d&&Yr(a),ot(a),dm(a,y,r,d,o)),null;case 27:if(De(a),o=ue.current,y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==d&&Yr(a);else{if(!d){if(a.stateNode===null)throw Error(s(166));return ot(a),null}r=ne.current,yi(a)?Vb(a):(r=pw(y,d,o),a.stateNode=r,Yr(a))}return ot(a),null;case 5:if(De(a),y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==d&&Yr(a);else{if(!d){if(a.stateNode===null)throw Error(s(166));return ot(a),null}if(v=ne.current,yi(a))Vb(a);else{var T=gu(ue.current);switch(v){case 1:v=T.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:v=T.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":v=T.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":v=T.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":v=T.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof d.is=="string"?T.createElement("select",{is:d.is}):T.createElement("select"),d.multiple?v.multiple=!0:d.size&&(v.size=d.size);break;default:v=typeof d.is=="string"?T.createElement(y,{is:d.is}):T.createElement(y)}}v[It]=a,v[cn]=d;e:for(T=a.child;T!==null;){if(T.tag===5||T.tag===6)v.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===a)break e;for(;T.sibling===null;){if(T.return===null||T.return===a)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}a.stateNode=v;e:switch($t(v,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Yr(a)}}return ot(a),dm(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,o),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==d&&Yr(a);else{if(typeof d!="string"&&a.stateNode===null)throw Error(s(166));if(r=ue.current,yi(a)){if(r=a.stateNode,o=a.memoizedProps,d=null,y=Bt,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}r[It]=a,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||sw(r.nodeValue,o)),r||Es(a,!0)}
vendor: 23,621 bytes, line 8
8else r=gu(r).createTextNode(d),r[It]=a,a.stateNode=r}return ot(a),null;case 31:if(o=a.memoizedState,r===null||r.memoizedState!==null){if(d=yi(a),o!==null){if(r===null){if(!d)throw Error(s(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(557));r[It]=a}else Ea(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ot(a),r=!1}else o=wh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return a.flags&256?(_n(a),a):(_n(a),null);if((a.flags&128)!==0)throw Error(s(558))}return ot(a),null;case 13:if(d=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=yi(a),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(s(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(s(317));y[It]=a}else Ea(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ot(a),y=!1}else y=wh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(_n(a),a):(_n(a),null)}return _n(a),(a.flags&128)!==0?(a.lanes=o,a):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==y&&(d.flags|=2048)),o!==r&&o&&(a.child.flags|=8192),tu(a,a.updateQueue),ot(a),null);case 4:return ve(),r===null&&Dm(a.stateNode.containerInfo),ot(a),null;case 10:return qr(a.type),ot(a),null;case 19:if(K(vt),d=a.memoizedState,d===null)return ot(a),null;if(y=(a.flags&128)!==0,v=d.rendering,v===null)if(y)nl(d,!1);else{if(mt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(v=$c(r),v!==null){for(a.flags|=128,nl(d,!1),r=v.updateQueue,a.updateQueue=r,tu(a,r),a.subtreeFlags=0,r=o,o=a.child;o!==null;)Lb(o,r),o=o.sibling;return Z(vt,vt.current&1|2),He&&Hr(a,d.treeForkCount),a.child}r=r.sibling}d.tail!==null&&en()>iu&&(a.flags|=128,y=!0,nl(d,!1),a.lanes=4194304)}else{if(!y)if(r=$c(v),r!==null){if(a.flags|=128,y=!0,r=r.updateQueue,a.updateQueue=r,tu(a,r),nl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!He)return ot(a),null}else 2*en()-d.renderingStartTime>iu&&o!==536870912&&(a.flags|=128,y=!0,nl(d,!1),a.lanes=4194304);d.isBackwards?(v.sibling=a.child,a.child=v):(r=d.last,r!==null?r.sibling=v:a.child=v,d.last=v)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=en(),r.sibling=null,o=vt.current,Z(vt,y?o&1|2:o&1),He&&Hr(a,d.treeForkCount),r):(ot(a),null);case 22:case 23:return _n(a),Mh(),d=a.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(o&536870912)!==0&&(a.flags&128)===0&&(ot(a),a.subtreeFlags&6&&(a.flags|=8192)):ot(a),o=a.updateQueue,o!==null&&tu(a,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==o&&(a.flags|=2048),r!==null&&K(Ca),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),qr(xt),ot(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function YR(r,a){switch(bh(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return qr(xt),ve(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return De(a),null;case 31:if(a.memoizedState!==null){if(_n(a),a.alternate===null)throw Error(s(340));Ea()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(_n(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(s(340));Ea()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return K(vt),null;case 4:return ve(),null;case 10:return qr(a.type),null;case 22:case 23:return _n(a),Mh(),r!==null&&K(Ca),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return qr(xt),null;case 25:return null;default:return null}}function cx(r,a){switch(bh(a),a.tag){case 3:qr(xt),ve();break;case 26:case 27:case 5:De(a);break;case 4:ve();break;case 31:a.memoizedState!==null&&_n(a);break;case 13:_n(a);break;case 19:K(vt);break;case 10:qr(a.type);break;case 22:case 23:_n(a),Mh(),r!==null&&K(Ca);break;case 24:qr(xt)}}function rl(r,a){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&r)===r){d=void 0;var v=o.create,T=o.inst;d=v(),T.destroy=d}o=o.next}while(o!==y)}}catch(N){Ze(a,a.return,N)}}function Rs(r,a,o){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var v=y.next;d=v;do{if((d.tag&r)===r){var T=d.inst,N=T.destroy;if(N!==void 0){T.destroy=void 0,y=a;var R=o,H=N;try{H()}catch(W){Ze(y,R,W)}}}d=d.next}while(d!==v)}}catch(W){Ze(a,a.return,W)}}function ux(r){var a=r.updateQueue;if(a!==null){var o=r.stateNode;try{e0(a,o)}catch(d){Ze(r,r.return,d)}}}function dx(r,a,o){o.props=Oa(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){Ze(r,a,d)}}function sl(r,a){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(y){Ze(r,a,y)}}function wr(r,a){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(y){Ze(r,a,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(y){Ze(r,a,y)}else o.current=null}function fx(r){var a=r.type,o=r.memoizedProps,d=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(y){Ze(r,r.return,y)}}function fm(r,a,o){try{var d=r.stateNode;y2(d,r.type,o,a),d[cn]=a}catch(y){Ze(r,r.return,y)}}function hx(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Is(r.type)||r.tag===4}function hm(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||hx(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&&Is(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 mm(r,a,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(r),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Ur));else if(d!==4&&(d===27&&Is(r.type)&&(o=r.stateNode,a=null),r=r.child,r!==null))for(mm(r,a,o),r=r.sibling;r!==null;)mm(r,a,o),r=r.sibling}function nu(r,a,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,a?o.insertBefore(r,a):o.appendChild(r);else if(d!==4&&(d===27&&Is(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(nu(r,a,o),r=r.sibling;r!==null;)nu(r,a,o),r=r.sibling}function mx(r){var a=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);$t(a,d,o),a[It]=r,a[cn]=o}catch(v){Ze(r,r.return,v)}}var Xr=!1,_t=!1,pm=!1,px=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function XR(r,a){if(r=r.containerInfo,Lm=_u,r=Cb(r),lh(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var y=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var T=0,N=-1,R=-1,H=0,W=0,Q=r,G=null;t:for(;;){for(var q;Q!==o||y!==0&&Q.nodeType!==3||(N=T+y),Q!==v||d!==0&&Q.nodeType!==3||(R=T+d),Q.nodeType===3&&(T+=Q.nodeValue.length),(q=Q.firstChild)!==null;)G=Q,Q=q;for(;;){if(Q===r)break t;if(G===o&&++H===y&&(N=T),G===v&&++W===d&&(R=T),(q=Q.nextSibling)!==null)break;Q=G,G=Q.parentNode}Q=q}o=N===-1||R===-1?null:{start:N,end:R}}else o=null}o=o||{start:0,end:0}}else o=null;for(zm={focusedElem:r,selectionRange:o},_u=!1,Mt=a;Mt!==null;)if(a=Mt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Mt=r;else for(;Mt!==null;){switch(a=Mt,v=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)y=r[o],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,o=a,y=v.memoizedProps,v=v.memoizedState,d=o.stateNode;try{var me=Oa(o.type,y);r=d.getSnapshotBeforeUpdate(me,v),d.__reactInternalSnapshotBeforeUpdate=r}catch(Ee){Ze(o,o.return,Ee)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,o=r.nodeType,o===9)Um(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Um(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(s(163))}if(r=a.sibling,r!==null){r.return=a.return,Mt=r;break}Mt=a.return}}function gx(r,a,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:Zr(r,o),d&4&&rl(5,o);break;case 1:if(Zr(r,o),d&4)if(r=o.stateNode,a===null)try{r.componentDidMount()}catch(T){Ze(o,o.return,T)}else{var y=Oa(o.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(y,a,r.__reactInternalSnapshotBeforeUpdate)}catch(T){Ze(o,o.return,T)}}d&64&&ux(o),d&512&&sl(o,o.return);break;case 3:if(Zr(r,o),d&64&&(r=o.updateQueue,r!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{e0(r,a)}catch(T){Ze(o,o.return,T)}}break;case 27:a===null&&d&4&&mx(o);case 26:case 5:Zr(r,o),a===null&&d&4&&fx(o),d&512&&sl(o,o.return);break;case 12:Zr(r,o);break;case 31:Zr(r,o),d&4&&bx(r,o);break;case 13:Zr(r,o),d&4&&xx(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=a2.bind(null,o),T2(r,o))));break;case 22:if(d=o.memoizedState!==null||Xr,!d){a=a!==null&&a.memoizedState!==null||_t,y=Xr;var v=_t;Xr=d,(_t=a)&&!v?Qr(r,o,(o.subtreeFlags&8772)!==0):Zr(r,o),Xr=y,_t=v}break;case 30:break;default:Zr(r,o)}}function yx(r){var a=r.alternate;a!==null&&(r.alternate=null,yx(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&qf(a)),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 ut=null,dn=!1;function Jr(r,a,o){for(o=o.child;o!==null;)vx(r,a,o),o=o.sibling}function vx(r,a,o){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(pa,o)}catch{}switch(o.tag){case 26:_t||wr(o,a),Jr(r,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:_t||wr(o,a);var d=ut,y=dn;Is(o.type)&&(ut=o.stateNode,dn=!1),Jr(r,a,o),hl(o.stateNode),ut=d,dn=y;break;case 5:_t||wr(o,a);case 6:if(d=ut,y=dn,ut=null,Jr(r,a,o),ut=d,dn=y,ut!==null)if(dn)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(o.stateNode)}catch(v){Ze(o,a,v)}else try{ut.removeChild(o.stateNode)}catch(v){Ze(o,a,v)}break;case 18:ut!==null&&(dn?(r=ut,uw(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Ii(r)):uw(ut,o.stateNode));break;case 4:d=ut,y=dn,ut=o.stateNode.containerInfo,dn=!0,Jr(r,a,o),ut=d,dn=y;break;case 0:case 11:case 14:case 15:Rs(2,o,a),_t||Rs(4,o,a),Jr(r,a,o);break;case 1:_t||(wr(o,a),d=o.stateNode,typeof d.componentWillUnmount=="function"&&dx(o,a,d)),Jr(r,a,o);break;case 21:Jr(r,a,o);break;case 22:_t=(d=_t)||o.memoizedState!==null,Jr(r,a,o),_t=d;break;default:Jr(r,a,o)}}function bx(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Ii(r)}catch(o){Ze(a,a.return,o)}}}function xx(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Ii(r)}catch(o){Ze(a,a.return,o)}}function JR(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new px),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new px),a;default:throw Error(s(435,r.tag))}}function ru(r,a){var o=JR(r);a.forEach(function(d){if(!o.has(d)){o.add(d);var y=i2.bind(null,r,d);d.then(y,y)}})}function fn(r,a){var o=a.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=o[d],v=r,T=a,N=T;e:for(;N!==null;){switch(N.tag){case 27:if(Is(N.type)){ut=N.stateNode,dn=!1;break e}break;case 5:ut=N.stateNode,dn=!1;break e;case 3:case 4:ut=N.stateNode.containerInfo,dn=!0;break e}N=N.return}if(ut===null)throw Error(s(160));vx(v,T,y),ut=null,dn=!1,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)wx(a,r),a=a.sibling}var Zn=null;function wx(r,a){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:fn(a,r),hn(r),d&4&&(Rs(3,r,r.return),rl(3,r),Rs(5,r,r.return));break;case 1:fn(a,r),hn(r),d&512&&(_t||o===null||wr(o,o.return)),d&64&&Xr&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var y=Zn;if(fn(a,r),hn(r),d&512&&(_t||o===null||wr(o,o.return)),d&4){var v=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){e:{d=r.type,o=r.memoizedProps,y=y.ownerDocument||y;t:switch(d){case"title":v=y.getElementsByTagName("title")[0],(!v||v[Ro]||v[It]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=y.createElement(d),y.head.insertBefore(v,y.querySelector("head > title"))),$t(v,d,o),v[It]=r,Dt(v),d=v;break e;case"link":var T=ww("link","href",y).get(d+(o.href||""));if(T){for(var N=0;N<T.length;N++)if(v=T[N],v.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&v.getAttribute("rel")===(o.rel==null?null:o.rel)&&v.getAttribute("title")===(o.title==null?null:o.title)&&v.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){T.splice(N,1);break t}}v=y.createElement(d),$t(v,d,o),y.head.appendChild(v);break;case"meta":if(T=ww("meta","content",y).get(d+(o.content||""))){for(N=0;N<T.length;N++)if(v=T[N],v.getAttribute("content")===(o.content==null?null:""+o.content)&&v.getAttribute("name")===(o.name==null?null:o.name)&&v.getAttribute("property")===(o.property==null?null:o.property)&&v.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&v.getAttribute("charset")===(o.charSet==null?null:o.charSet)){T.splice(N,1);break t}}v=y.createElement(d),$t(v,d,o),y.head.appendChild(v);break;default:throw Error(s(468,d))}v[It]=r,Dt(v),d=v}r.stateNode=d}else Sw(y,r.type,r.stateNode);else r.stateNode=xw(y,d,r.memoizedProps);else v!==d?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,d===null?Sw(y,r.type,r.stateNode):xw(y,d,r.memoizedProps)):d===null&&r.stateNode!==null&&fm(r,r.memoizedProps,o.memoizedProps)}break;case 27:fn(a,r),hn(r),d&512&&(_t||o===null||wr(o,o.return)),o!==null&&d&4&&fm(r,r.memoizedProps,o.memoizedProps);break;case 5:if(fn(a,r),hn(r),d&512&&(_t||o===null||wr(o,o.return)),r.flags&32){y=r.stateNode;try{oi(y,"")}catch(me){Ze(r,r.return,me)}}d&4&&r.stateNode!=null&&(y=r.memoizedProps,fm(r,y,o!==null?o.memoizedProps:y)),d&1024&&(pm=!0);break;case 6:if(fn(a,r),hn(r),d&4){if(r.stateNode===null)throw Error(s(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch(me){Ze(r,r.return,me)}}break;case 3:if(bu=null,y=Zn,Zn=yu(a.containerInfo),fn(a,r),Zn=y,hn(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Ii(a.containerInfo)}catch(me){Ze(r,r.return,me)}pm&&(pm=!1,Sx(r));break;case 4:d=Zn,Zn=yu(r.stateNode.containerInfo),fn(a,r),hn(r),Zn=d;break;case 12:fn(a,r),hn(r);break;case 31:fn(a,r),hn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,ru(r,d)));break;case 13:fn(a,r),hn(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(au=en()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,ru(r,d)));break;case 22:y=r.memoizedState!==null;var R=o!==null&&o.memoizedState!==null,H=Xr,W=_t;if(Xr=H||y,_t=W||R,fn(a,r),_t=W,Xr=H,hn(r),d&8192)e:for(a=r.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(o===null||R||Xr||_t||Da(r)),o=null,a=r;;){if(a.tag===5||a.tag===26){if(o===null){R=o=a;try{if(v=R.stateNode,y)T=v.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{N=R.stateNode;var Q=R.memoizedProps.style,G=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;N.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(me){Ze(R,R.return,me)}}}else if(a.tag===6){if(o===null){R=a;try{R.stateNode.nodeValue=y?"":R.memoizedProps}catch(me){Ze(R,R.return,me)}}}else if(a.tag===18){if(o===null){R=a;try{var q=R.stateNode;y?dw(q,!0):dw(R.stateNode,!1)}catch(me){Ze(R,R.return,me)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,ru(r,o))));break;case 19:fn(a,r),hn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,ru(r,d)));break;case 30:break;case 21:break;default:fn(a,r),hn(r)}}function hn(r){var a=r.flags;if(a&2){try{for(var o,d=r.return;d!==null;){if(hx(d)){o=d;break}d=d.return}if(o==null)throw Error(s(160));switch(o.tag){case 27:var y=o.stateNode,v=hm(r);nu(r,v,y);break;case 5:var T=o.stateNode;o.flags&32&&(oi(T,""),o.flags&=-33);var N=hm(r);nu(r,N,T);break;case 3:case 4:var R=o.stateNode.containerInfo,H=hm(r);mm(r,H,R);break;default:throw Error(s(161))}}catch(W){Ze(r,r.return,W)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Sx(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Sx(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Zr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)gx(r,a.alternate,a),a=a.sibling}function Da(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Rs(4,a,a.return),Da(a);break;case 1:wr(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&dx(a,a.return,o),Da(a);break;case 27:hl(a.stateNode);case 26:case 5:wr(a,a.return),Da(a);break;case 22:a.memoizedState===null&&Da(a);break;case 30:Da(a);break;default:Da(a)}r=r.sibling}}function Qr(r,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var d=a.alternate,y=r,v=a,T=v.flags;switch(v.tag){case 0:case 11:case 15:Qr(y,v,o),rl(4,v);break;case 1:if(Qr(y,v,o),d=v,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(H){Ze(d,d.return,H)}if(d=v,y=d.updateQueue,y!==null){var N=d.stateNode;try{var R=y.shared.hiddenCallbacks;if(R!==null)for(y.shared.hiddenCallbacks=null,y=0;y<R.length;y++)Qb(R[y],N)}catch(H){Ze(d,d.return,H)}}o&&T&64&&ux(v),sl(v,v.return);break;case 27:mx(v);case 26:case 5:Qr(y,v,o),o&&d===null&&T&4&&fx(v),sl(v,v.return);break;case 12:Qr(y,v,o);break;case 31:Qr(y,v,o),o&&T&4&&bx(y,v);break;case 13:Qr(y,v,o),o&&T&4&&xx(y,v);break;case 22:v.memoizedState===null&&Qr(y,v,o),sl(v,v.return);break;case 30:break;default:Qr(y,v,o)}a=a.sibling}}function gm(r,a){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&Go(o))}function ym(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Go(r))}function Qn(r,a,o,d){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)_x(r,a,o,d),a=a.sibling}function _x(r,a,o,d){var y=a.flags;switch(a.tag){case 0:case 11:case 15:Qn(r,a,o,d),y&2048&&rl(9,a);break;case 1:Qn(r,a,o,d);break;case 3:Qn(r,a,o,d),y&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Go(r)));break;case 12:if(y&2048){Qn(r,a,o,d),r=a.stateNode;try{var v=a.memoizedProps,T=v.id,N=v.onPostCommit;typeof N=="function"&&N(T,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(R){Ze(a,a.return,R)}}else Qn(r,a,o,d);break;case 31:Qn(r,a,o,d);break;case 13:Qn(r,a,o,d);break;case 23:break;case 22:v=a.stateNode,T=a.alternate,a.memoizedState!==null?v._visibility&2?Qn(r,a,o,d):al(r,a):v._visibility&2?Qn(r,a,o,d):(v._visibility|=2,Ci(r,a,o,d,(a.subtreeFlags&10256)!==0||!1)),y&2048&&gm(T,a);break;case 24:Qn(r,a,o,d),y&2048&&ym(a.alternate,a);break;default:Qn(r,a,o,d)}}function Ci(r,a,o,d,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var v=r,T=a,N=o,R=d,H=T.flags;switch(T.tag){case 0:case 11:case 15:Ci(v,T,N,R,y),rl(8,T);break;case 23:break;case 22:var W=T.stateNode;T.memoizedState!==null?W._visibility&2?Ci(v,T,N,R,y):al(v,T):(W._visibility|=2,Ci(v,T,N,R,y)),y&&H&2048&&gm(T.alternate,T);break;case 24:Ci(v,T,N,R,y),y&&H&2048&&ym(T.alternate,T);break;default:Ci(v,T,N,R,y)}a=a.sibling}}function al(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=r,d=a,y=d.flags;switch(d.tag){case 22:al(o,d),y&2048&&gm(d.alternate,d);break;case 24:al(o,d),y&2048&&ym(d.alternate,d);break;default:al(o,d)}a=a.sibling}}var il=8192;function Ai(r,a,o){if(r.subtreeFlags&il)for(r=r.child;r!==null;)Ex(r,a,o),r=r.sibling}function Ex(r,a,o){switch(r.tag){case 26:Ai(r,a,o),r.flags&il&&r.memoizedState!==null&&z2(o,Zn,r.memoizedState,r.memoizedProps);break;case 5:Ai(r,a,o);break;case 3:case 4:var d=Zn;Zn=yu(r.stateNode.containerInfo),Ai(r,a,o),Zn=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=il,il=16777216,Ai(r,a,o),il=d):Ai(r,a,o));break;default:Ai(r,a,o)}}function Tx(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function ol(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o];Mt=d,Cx(d,r)}Tx(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)jx(r),r=r.sibling}function jx(r){switch(r.tag){case 0:case 11:case 15:ol(r),r.flags&2048&&Rs(9,r,r.return);break;case 3:ol(r);break;case 12:ol(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,su(r)):ol(r);break;default:ol(r)}}function su(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o];Mt=d,Cx(d,r)}Tx(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Rs(8,a,a.return),su(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,su(a));break;default:su(a)}r=r.sibling}}function Cx(r,a){for(;Mt!==null;){var o=Mt;switch(o.tag){case 0:case 11:case 15:Rs(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Go(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,Mt=d;else e:for(o=r;Mt!==null;){d=Mt;var y=d.sibling,v=d.return;if(yx(d),d===o){Mt=null;break e}if(y!==null){y.return=v,Mt=y;break e}Mt=v}}}var ZR={getCacheForType:function(r){var a=Ut(xt),o=a.data.get(r);return o===void 0&&(o=r(),a.data.set(r,o)),o},cacheSignal:function(){return Ut(xt).controller.signal}},QR=typeof WeakMap=="function"?WeakMap:Map,Ye=0,rt=null,Le=null,Ve=0,Je=0,En=null,Os=!1,Ni=!1,vm=!1,es=0,mt=0,Ds=0,Ma=0,bm=0,Tn=0,ki=0,ll=null,mn=null,xm=!1,au=0,Ax=0,iu=1/0,ou=null,Ms=null,Nt=0,Ps=null,Ri=null,ts=0,wm=0,Sm=null,Nx=null,cl=0,_m=null;function jn(){return(Ye&2)!==0&&Ve!==0?Ve&-Ve:M.T!==null?Nm():Hf()}function kx(){if(Tn===0)if((Ve&536870912)===0||He){var r=Qa;
vendor: 14,460 bytes, line 8
8Qa<<=1,(Qa&3932160)===0&&(Qa=262144),Tn=r}else Tn=536870912;return r=Sn.current,r!==null&&(r.flags|=32),Tn}function pn(r,a,o){(r===rt&&(Je===2||Je===9)||r.cancelPendingCommit!==null)&&(Oi(r,0),Ls(r,Ve,Tn,!1)),ft(r,o),((Ye&2)===0||r!==rt)&&(r===rt&&((Ye&2)===0&&(Ma|=o),mt===4&&Ls(r,Ve,Tn,!1)),Sr(r))}function Rx(r,a,o){if((Ye&6)!==0)throw Error(s(327));var d=!o&&(a&127)===0&&(a&r.expiredLanes)===0||ct(r,a),y=d?n2(r,a):Tm(r,a,!0),v=d;do{if(y===0){Ni&&!d&&Ls(r,a,0,!1);break}else{if(o=r.current.alternate,v&&!e2(o)){y=Tm(r,a,!1),v=!1;continue}if(y===2){if(v=a,r.errorRecoveryDisabledLanes&v)var T=0;else T=r.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){a=T;e:{var N=r;y=ll;var R=N.current.memoizedState.isDehydrated;if(R&&(Oi(N,T).flags|=256),T=Tm(N,T,!1),T!==2){if(vm&&!R){N.errorRecoveryDisabledLanes|=v,Ma|=v,y=4;break e}v=mn,mn=y,v!==null&&(mn===null?mn=v:mn.push.apply(mn,v))}y=T}if(v=!1,y!==2)continue}}if(y===1){Oi(r,0),Ls(r,a,0,!0);break}e:{switch(d=r,v=y,v){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:Ls(d,a,Tn,!Os);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(y=au+300-en(),10<y)){if(Ls(d,a,Tn,!Os),Ce(d,0,!0)!==0)break e;ts=a,d.timeoutHandle=lw(Ox.bind(null,d,o,mn,ou,xm,a,Tn,Ma,ki,Os,v,"Throttled",-0,0),y);break e}Ox(d,o,mn,ou,xm,a,Tn,Ma,ki,Os,v,null,-0,0)}}break}while(!0);Sr(r)}function Ox(r,a,o,d,y,v,T,N,R,H,W,Q,G,q){if(r.timeoutHandle=-1,Q=a.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ur},Ex(a,v,Q);var me=(v&62914560)===v?au-en():(v&4194048)===v?Ax-en():0;if(me=I2(Q,me),me!==null){ts=v,r.cancelPendingCommit=me(Ux.bind(null,r,a,v,o,d,y,T,N,R,W,Q,null,G,q)),Ls(r,v,T,!H);return}}Ux(r,a,v,o,d,y,T,N,R)}function e2(r){for(var a=r;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],v=y.getSnapshot;y=y.value;try{if(!xn(v(),y))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ls(r,a,o,d){a&=~bm,a&=~Ma,r.suspendedLanes|=a,r.pingedLanes&=~a,d&&(r.warmLanes|=a),d=r.expirationTimes;for(var y=a;0<y;){var v=31-Kt(y),T=1<<v;d[v]=-1,y&=~T}o!==0&&ya(r,o,a)}function lu(){return(Ye&6)===0?(ul(0),!1):!0}function Em(){if(Le!==null){if(Je===0)var r=Le.return;else r=Le,Gr=Ta=null,Uh(r),Si=null,Fo=0,r=Le;for(;r!==null;)cx(r.alternate,r),r=r.return;Le=null}}function Oi(r,a){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,x2(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),ts=0,Em(),rt=r,Le=o=$r(r.current,null),Ve=a,Je=0,En=null,Os=!1,Ni=ct(r,a),vm=!1,ki=Tn=bm=Ma=Ds=mt=0,mn=ll=null,xm=!1,(a&8)!==0&&(a|=a&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=a;0<d;){var y=31-Kt(d),v=1<<y;a|=r[y],d&=~v}return es=a,Nc(),o}function Dx(r,a){ke=null,M.H=el,a===wi||a===zc?(a=Yb(),Je=3):a===Ah?(a=Yb(),Je=4):Je=a===nm?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,En=a,Le===null&&(mt=1,Jc(r,zn(a,r.current)))}function Mx(){var r=Sn.current;return r===null?!0:(Ve&4194048)===Ve?Vn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?r===Vn:!1}function Px(){var r=M.H;return M.H=el,r===null?el:r}function Lx(){var r=M.A;return M.A=ZR,r}function cu(){mt=4,Os||(Ve&4194048)!==Ve&&Sn.current!==null||(Ni=!0),(Ds&134217727)===0&&(Ma&134217727)===0||rt===null||Ls(rt,Ve,Tn,!1)}function Tm(r,a,o){var d=Ye;Ye|=2;var y=Px(),v=Lx();(rt!==r||Ve!==a)&&(ou=null,Oi(r,a)),a=!1;var T=mt;e:do try{if(Je!==0&&Le!==null){var N=Le,R=En;switch(Je){case 8:Em(),T=6;break e;case 3:case 2:case 9:case 6:Sn.current===null&&(a=!0);var H=Je;if(Je=0,En=null,Di(r,N,R,H),o&&Ni){T=0;break e}break;default:H=Je,Je=0,En=null,Di(r,N,R,H)}}t2(),T=mt;break}catch(W){Dx(r,W)}while(!0);return a&&r.shellSuspendCounter++,Gr=Ta=null,Ye=d,M.H=y,M.A=v,Le===null&&(rt=null,Ve=0,Nc()),T}function t2(){for(;Le!==null;)zx(Le)}function n2(r,a){var o=Ye;Ye|=2;var d=Px(),y=Lx();rt!==r||Ve!==a?(ou=null,iu=en()+500,Oi(r,a)):Ni=ct(r,a);e:do try{if(Je!==0&&Le!==null){a=Le;var v=En;t:switch(Je){case 1:Je=0,En=null,Di(r,a,v,1);break;case 2:case 9:if(Kb(v)){Je=0,En=null,Ix(a);break}a=function(){Je!==2&&Je!==9||rt!==r||(Je=7),Sr(r)},v.then(a,a);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Kb(v)?(Je=0,En=null,Ix(a)):(Je=0,En=null,Di(r,a,v,7));break;case 5:var T=null;switch(Le.tag){case 26:T=Le.memoizedState;case 5:case 27:var N=Le;if(T?_w(T):N.stateNode.complete){Je=0,En=null;var R=N.sibling;if(R!==null)Le=R;else{var H=N.return;H!==null?(Le=H,uu(H)):Le=null}break t}}Je=0,En=null,Di(r,a,v,5);break;case 6:Je=0,En=null,Di(r,a,v,6);break;case 8:Em(),mt=6;break e;default:throw Error(s(462))}}r2();break}catch(W){Dx(r,W)}while(!0);return Gr=Ta=null,M.H=d,M.A=y,Ye=o,Le!==null?0:(rt=null,Ve=0,Nc(),mt)}function r2(){for(;Le!==null&&!Qt();)zx(Le)}function zx(r){var a=ox(r.alternate,r,es);r.memoizedProps=r.pendingProps,a===null?uu(r):Le=a}function Ix(r){var a=r,o=a.alternate;switch(a.tag){case 15:case 0:a=tx(o,a,a.pendingProps,a.type,void 0,Ve);break;case 11:a=tx(o,a,a.pendingProps,a.type.render,a.ref,Ve);break;case 5:Uh(a);default:cx(o,a),a=Le=Lb(a,es),a=ox(o,a,es)}r.memoizedProps=r.pendingProps,a===null?uu(r):Le=a}function Di(r,a,o,d){Gr=Ta=null,Uh(a),Si=null,Fo=0;var y=a.return;try{if(qR(r,y,a,o,Ve)){mt=1,Jc(r,zn(o,r.current)),Le=null;return}}catch(v){if(y!==null)throw Le=y,v;mt=1,Jc(r,zn(o,r.current)),Le=null;return}a.flags&32768?(He||d===1?r=!0:Ni||(Ve&536870912)!==0?r=!1:(Os=r=!0,(d===2||d===9||d===3||d===6)&&(d=Sn.current,d!==null&&d.tag===13&&(d.flags|=16384))),Bx(a,r)):uu(a)}function uu(r){var a=r;do{if((a.flags&32768)!==0){Bx(a,Os);return}r=a.return;var o=WR(a.alternate,a,es);if(o!==null){Le=o;return}if(a=a.sibling,a!==null){Le=a;return}Le=a=r}while(a!==null);mt===0&&(mt=5)}function Bx(r,a){do{var o=YR(r.alternate,r);if(o!==null){o.flags&=32767,Le=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(r=r.sibling,r!==null)){Le=r;return}Le=r=o}while(r!==null);mt=6,Le=null}function Ux(r,a,o,d,y,v,T,N,R){r.cancelPendingCommit=null;do du();while(Nt!==0);if((Ye&6)!==0)throw Error(s(327));if(a!==null){if(a===r.current)throw Error(s(177));if(v=a.lanes|a.childLanes,v|=hh,an(r,o,v,T,N,R),r===rt&&(Le=rt=null,Ve=0),Ri=a,Ps=r,ts=o,wm=v,Sm=y,Nx=d,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,o2(ma,function(){return qx(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=M.T,M.T=null,y=F.p,F.p=2,T=Ye,Ye|=4;try{XR(r,a,o)}finally{Ye=T,F.p=y,M.T=d}}Nt=1,Vx(),$x(),Hx()}}function Vx(){if(Nt===1){Nt=0;var r=Ps,a=Ri,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var d=F.p;F.p=2;var y=Ye;Ye|=4;try{wx(a,r);var v=zm,T=Cb(r.containerInfo),N=v.focusedElem,R=v.selectionRange;if(T!==N&&N&&N.ownerDocument&&jb(N.ownerDocument.documentElement,N)){if(R!==null&&lh(N)){var H=R.start,W=R.end;if(W===void 0&&(W=H),"selectionStart"in N)N.selectionStart=H,N.selectionEnd=Math.min(W,N.value.length);else{var Q=N.ownerDocument||document,G=Q&&Q.defaultView||window;if(G.getSelection){var q=G.getSelection(),me=N.textContent.length,Ee=Math.min(R.start,me),tt=R.end===void 0?Ee:Math.min(R.end,me);!q.extend&&Ee>tt&&(T=tt,tt=Ee,Ee=T);var V=Tb(N,Ee),I=Tb(N,tt);if(V&&I&&(q.rangeCount!==1||q.anchorNode!==V.node||q.anchorOffset!==V.offset||q.focusNode!==I.node||q.focusOffset!==I.offset)){var $=Q.createRange();$.setStart(V.node,V.offset),q.removeAllRanges(),Ee>tt?(q.addRange($),q.extend(I.node,I.offset)):($.setEnd(I.node,I.offset),q.addRange($))}}}}for(Q=[],q=N;q=q.parentNode;)q.nodeType===1&&Q.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<Q.length;N++){var J=Q[N];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}_u=!!Lm,zm=Lm=null}finally{Ye=y,F.p=d,M.T=o}}r.current=a,Nt=2}}function $x(){if(Nt===2){Nt=0;var r=Ps,a=Ri,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var d=F.p;F.p=2;var y=Ye;Ye|=4;try{gx(r,a.alternate,a)}finally{Ye=y,F.p=d,M.T=o}}Nt=3}}function Hx(){if(Nt===4||Nt===3){Nt=0,ys();var r=Ps,a=Ri,o=ts,d=Nx;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Nt=5:(Nt=0,Ri=Ps=null,Gx(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(Ms=null),Xn(o),a=a.stateNode,tn&&typeof tn.onCommitFiberRoot=="function")try{tn.onCommitFiberRoot(pa,a,void 0,(a.current.flags&128)===128)}catch{}if(d!==null){a=M.T,y=F.p,F.p=2,M.T=null;try{for(var v=r.onRecoverableError,T=0;T<d.length;T++){var N=d[T];v(N.value,{componentStack:N.stack})}}finally{M.T=a,F.p=y}}(ts&3)!==0&&du(),Sr(r),y=r.pendingLanes,(o&261930)!==0&&(y&42)!==0?r===_m?cl++:(cl=0,_m=r):cl=0,ul(0)}}function Gx(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Go(a)))}function du(){return Vx(),$x(),Hx(),qx()}function qx(){if(Nt!==5)return!1;var r=Ps,a=wm;wm=0;var o=Xn(ts),d=M.T,y=F.p;try{F.p=32>o?32:o,M.T=null,o=Sm,Sm=null;var v=Ps,T=ts;if(Nt=0,Ri=Ps=null,ts=0,(Ye&6)!==0)throw Error(s(331));var N=Ye;if(Ye|=4,jx(v.current),_x(v,v.current,T,o),Ye=N,ul(0,!1),tn&&typeof tn.onPostCommitFiberRoot=="function")try{tn.onPostCommitFiberRoot(pa,v)}catch{}return!0}finally{F.p=y,M.T=d,Gx(r,a)}}function Fx(r,a,o){a=zn(o,a),a=tm(r.stateNode,a,2),r=As(r,a,2),r!==null&&(ft(r,2),Sr(r))}function Ze(r,a,o){if(r.tag===3)Fx(r,r,o);else for(;a!==null;){if(a.tag===3){Fx(a,r,o);break}else if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ms===null||!Ms.has(d))){r=zn(o,r),o=K0(2),d=As(a,o,2),d!==null&&(W0(o,d,a,r),ft(d,2),Sr(d));break}}a=a.return}}function jm(r,a,o){var d=r.pingCache;if(d===null){d=r.pingCache=new QR;var y=new Set;d.set(a,y)}else y=d.get(a),y===void 0&&(y=new Set,d.set(a,y));y.has(o)||(vm=!0,y.add(o),r=s2.bind(null,r,a,o),a.then(r,r))}function s2(r,a,o){var d=r.pingCache;d!==null&&d.delete(a),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,rt===r&&(Ve&o)===o&&(mt===4||mt===3&&(Ve&62914560)===Ve&&300>en()-au?(Ye&2)===0&&Oi(r,0):bm|=o,ki===Ve&&(ki=0)),Sr(r)}function Kx(r,a){a===0&&(a=Wt()),r=Sa(r,a),r!==null&&(ft(r,a),Sr(r))}function a2(r){var a=r.memoizedState,o=0;a!==null&&(o=a.retryLane),Kx(r,o)}function i2(r,a){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,y=r.memoizedState;y!==null&&(o=y.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(s(314))}d!==null&&d.delete(a),Kx(r,o)}function o2(r,a){return Co(r,a)}var fu=null,Mi=null,Cm=!1,hu=!1,Am=!1,zs=0;function Sr(r){r!==Mi&&r.next===null&&(Mi===null?fu=Mi=r:Mi=Mi.next=r),hu=!0,Cm||(Cm=!0,c2())}function ul(r,a){if(!Am&&hu){Am=!0;do for(var o=!1,d=fu;d!==null;){if(r!==0){var y=d.pendingLanes;if(y===0)var v=0;else{var T=d.suspendedLanes,N=d.pingedLanes;v=(1<<31-Kt(42|r)+1)-1,v&=y&~(T&~N),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Jx(d,v))}else v=Ve,v=Ce(d,d===rt?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(v&3)===0||ct(d,v)||(o=!0,Jx(d,v));d=d.next}while(o);Am=!1}}function l2(){Wx()}function Wx(){hu=Cm=!1;var r=0;zs!==0&&b2()&&(r=zs);for(var a=en(),o=null,d=fu;d!==null;){var y=d.next,v=Yx(d,a);v===0?(d.next=null,o===null?fu=y:o.next=y,y===null&&(Mi=o)):(o=d,(r!==0||(v&3)!==0)&&(hu=!0)),d=y}Nt!==0&&Nt!==5||ul(r),zs!==0&&(zs=0)}function Yx(r,a){for(var o=r.suspendedLanes,d=r.pingedLanes,y=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var T=31-Kt(v),N=1<<T,R=y[T];R===-1?((N&o)===0||(N&d)!==0)&&(y[T]=Ot(N,a)):R<=a&&(r.expiredLanes|=N),v&=~N}if(a=rt,o=Ve,o=Ce(r,r===a?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===a&&(Je===2||Je===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Ao(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||ct(r,o)){if(a=o&-o,a===r.callbackPriority)return a;switch(d!==null&&Ao(d),Xn(o)){case 2:case 8:o=gc;break;case 32:o=ma;break;case 268435456:o=Ir;break;default:o=ma}return d=Xx.bind(null,r),o=Co(o,d),r.callbackPriority=a,r.callbackNode=o,a}return d!==null&&d!==null&&Ao(d),r.callbackPriority=2,r.callbackNode=null,2}function Xx(r,a){if(Nt!==0&&Nt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(du()&&r.callbackNode!==o)return null;var d=Ve;return d=Ce(r,r===rt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(Rx(r,d,a),Yx(r,en()),r.callbackNode!=null&&r.callbackNode===o?Xx.bind(null,r):null)}function Jx(r,a){if(du())return null;Rx(r,a,!0)}function c2(){w2(function(){(Ye&6)!==0?Co(ha,l2):Wx()})}function Nm(){if(zs===0){var r=bi;r===0&&(r=Za,Za<<=1,(Za&261888)===0&&(Za=256)),zs=r}return zs}function Zx(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:wc(""+r)}function Qx(r,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,r.id&&o.setAttribute("form",r.id),a.parentNode.insertBefore(o,a),r=new FormData(r),o.parentNode.removeChild(o),r}function u2(r,a,o,d,y){if(a==="submit"&&o&&o.stateNode===y){var v=Zx((y[cn]||null).action),T=d.submitter;T&&(a=(a=T[cn]||null)?Zx(a.formAction):T.getAttribute("formAction"),a!==null&&(v=a,T=null));var N=new Tc("action","action",null,d,y);r.push({event:N,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(zs!==0){var R=T?Qx(y,T):new FormData(y);Yh(o,{pending:!0,data:R,method:y.method,action:v},null,R)}}else typeof v=="function"&&(N.preventDefault(),R=T?Qx(y,T):new FormData(y),Yh(o,{pending:!0,data:R,method:y.method,action:v},v,R))},currentTarget:y}]})}}for(var km=0;km<fh.length;km++){var Rm=fh[km],d2=Rm.toLowerCase(),f2=Rm[0].toUpperCase()+Rm.slice(1);Jn(d2,"on"+f2)}Jn(kb,"onAnimationEnd"),Jn(Rb,"onAnimationIteration"),Jn(Ob,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(AR,"onTransitionRun"),Jn(NR,"onTransitionStart"),Jn(kR,"onTransitionCancel"),Jn(Db,"onTransitionEnd"),ai("onMouseEnter",["mouseout","mouseover"]),ai("onMouseLeave",["mouseout","mouseover"]),ai("onPointerEnter",["pointerout","pointerover"]),ai("onPointerLeave",["pointerout","pointerover"]),va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),va("onSelect","focusout contextmenu dragend focu
8sin keydown keyup mousedown mouseup selectionchange".split(" ")),va("onBeforeInput",["compositionend","keypress","textInput","paste"]),va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dl="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(" "),h2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dl));function ew(r,a){a=(a&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],y=d.event;d=d.listeners;e:{var v=void 0;if(a)for(var T=d.length-1;0<=T;T--){var N=d[T],R=N.instance,H=N.currentTarget;if(N=N.listener,R!==v&&y.isPropagationStopped())break e;v=N,y.currentTarget=H;try{v(y)}catch(W){Ac(W)}y.currentTarget=null,v=R}else for(T=0;T<d.length;T++){if(N=d[T],R=N.instance,H=N.currentTarget,N=N.listener,R!==v&&y.isPropagationStopped())break e;v=N,y.currentTarget=H;try{v(y)}catch(W){Ac(W)}y.currentTarget=null,v=R}}}}function ze(r,a){var o=a[Gf];o===void 0&&(o=a[Gf]=new Set);var d=r+"__bubble";o.has(d)||(tw(a,r,2,!1),o.add(d))}function Om(r,a,o){var d=0;a&&(d|=4),tw(o,r,d,a)}var mu="_reactListening"+Math.random().toString(36).slice(2);function Dm(r){if(!r[mu]){r[mu]=!0,Wv.forEach(function(o){o!=="selectionchange"&&(h2.has(o)||Om(o,!1,r),Om(o,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[mu]||(a[mu]=!0,Om("selectionchange",!1,a))}}function tw(r,a,o,d){switch(kw(a)){case 2:var y=V2;break;case 8:y=$2;break;default:y=Wm}o=y.bind(null,a,o,r),y=void 0,!Qf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),d?y!==void 0?r.addEventListener(a,o,{capture:!0,passive:y}):r.addEventListener(a,o,!0):y!==void 0?r.addEventListener(a,o,{passive:y}):r.addEventListener(a,o,!1)}function Mm(r,a,o,d,y){var v=d;if((a&1)===0&&(a&2)===0&&d!==null)e:for(;;){if(d===null)return;var T=d.tag;if(T===3||T===4){var N=d.stateNode.containerInfo;if(N===y)break;if(T===4)for(T=d.return;T!==null;){var R=T.tag;if((R===3||R===4)&&T.stateNode.containerInfo===y)return;T=T.return}for(;N!==null;){if(T=ni(N),T===null)return;if(R=T.tag,R===5||R===6||R===26||R===27){d=v=T;continue e}N=N.parentNode}}d=d.return}ib(function(){var H=v,W=Jf(o),Q=[];e:{var G=Mb.get(r);if(G!==void 0){var q=Tc,me=r;switch(r){case"keypress":if(_c(o)===0)break e;case"keydown":case"keyup":q=iR;break;case"focusin":me="focus",q=rh;break;case"focusout":me="blur",q=rh;break;case"beforeblur":case"afterblur":q=rh;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=cb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Wk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=cR;break;case kb:case Rb:case Ob:q=Jk;break;case Db:q=dR;break;case"scroll":case"scrollend":q=Fk;break;case"wheel":q=hR;break;case"copy":case"cut":case"paste":q=Qk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=db;break;case"toggle":case"beforetoggle":q=pR}var Ee=(a&4)!==0,tt=!Ee&&(r==="scroll"||r==="scrollend"),V=Ee?G!==null?G+"Capture":null:G;Ee=[];for(var I=H,$;I!==null;){var J=I;if($=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||$===null||V===null||(J=Do(I,V),J!=null&&Ee.push(fl(I,J,$))),tt)break;I=I.return}0<Ee.length&&(G=new q(G,me,null,o,W),Q.push({event:G,listeners:Ee}))}}if((a&7)===0){e:{if(G=r==="mouseover"||r==="pointerover",q=r==="mouseout"||r==="pointerout",G&&o!==Xf&&(me=o.relatedTarget||o.fromElement)&&(ni(me)||me[ti]))break e;if((q||G)&&(G=W.window===W?W:(G=W.ownerDocument)?G.defaultView||G.parentWindow:window,q?(me=o.relatedTarget||o.toElement,q=H,me=me?ni(me):null,me!==null&&(tt=l(me),Ee=me.tag,me!==tt||Ee!==5&&Ee!==27&&Ee!==6)&&(me=null)):(q=null,me=H),q!==me)){if(Ee=cb,J="onMouseLeave",V="onMouseEnter",I="mouse",(r==="pointerout"||r==="pointerover")&&(Ee=db,J="onPointerLeave",V="onPointerEnter",I="pointer"),tt=q==null?G:Oo(q),$=me==null?G:Oo(me),G=new Ee(J,I+"leave",q,o,W),G.target=tt,G.relatedTarget=$,J=null,ni(W)===H&&(Ee=new Ee(V,I+"enter",me,o,W),Ee.target=$,Ee.relatedTarget=tt,J=Ee),tt=J,q&&me)t:{for(Ee=m2,V=q,I=me,$=0,J=V;J;J=Ee(J))$++;J=0;for(var we=I;we;we=Ee(we))J++;for(;0<$-J;)V=Ee(V),$--;for(;0<J-$;)I=Ee(I),J--;for(;$--;){if(V===I||I!==null&&V===I.alternate){Ee=V;break t}V=Ee(V),I=Ee(I)}Ee=null}else Ee=null;q!==null&&nw(Q,G,q,Ee,!1),me!==null&&tt!==null&&nw(Q,tt,me,Ee,!0)}}
vendor: 5,189 bytes, lines 8-9
8e:{if(G=H?Oo(H):window,q=G.nodeName&&G.nodeName.toLowerCase(),q==="select"||q==="input"&&G.type==="file")var Fe=bb;else if(yb(G))if(xb)Fe=TR;else{Fe=_R;var xe=SR}else q=G.nodeName,!q||q.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&Yf(H.elementType)&&(Fe=bb):Fe=ER;if(Fe&&(Fe=Fe(r,H))){vb(Q,Fe,o,W);break e}xe&&xe(r,G,H),r==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&Wf(G,"number",G.value)}switch(xe=H?Oo(H):window,r){case"focusin":(yb(xe)||xe.contentEditable==="true")&&(di=xe,ch=H,Vo=null);break;case"focusout":Vo=ch=di=null;break;case"mousedown":uh=!0;break;case"contextmenu":case"mouseup":case"dragend":uh=!1,Ab(Q,o,W);break;case"selectionchange":if(CR)break;case"keydown":case"keyup":Ab(Q,o,W)}var Re;if(ah)e:{switch(r){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else ui?pb(r,o)&&($e="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&($e="onCompositionStart");$e&&(fb&&o.locale!=="ko"&&(ui||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&ui&&(Re=ob()):(ws=W,eh="value"in ws?ws.value:ws.textContent,ui=!0)),xe=pu(H,$e),0<xe.length&&($e=new ub($e,r,null,o,W),Q.push({event:$e,listeners:xe}),Re?$e.data=Re:(Re=gb(o),Re!==null&&($e.data=Re)))),(Re=yR?vR(r,o):bR(r,o))&&($e=pu(H,"onBeforeInput"),0<$e.length&&(xe=new ub("onBeforeInput","beforeinput",null,o,W),Q.push({event:xe,listeners:$e}),xe.data=Re)),u2(Q,r,H,o,W)}ew(Q,a)})}function fl(r,a,o){return{instance:r,listener:a,currentTarget:o}}function pu(r,a){for(var o=a+"Capture",d=[];r!==null;){var y=r,v=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||v===null||(y=Do(r,o),y!=null&&d.unshift(fl(r,y,v)),y=Do(r,a),y!=null&&d.push(fl(r,y,v))),r.tag===3)return d;r=r.return}return[]}function m2(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function nw(r,a,o,d,y){for(var v=a._reactName,T=[];o!==null&&o!==d;){var N=o,R=N.alternate,H=N.stateNode;if(N=N.tag,R!==null&&R===d)break;N!==5&&N!==26&&N!==27||H===null||(R=H,y?(H=Do(o,v),H!=null&&T.unshift(fl(o,H,R))):y||(H=Do(o,v),H!=null&&T.push(fl(o,H,R)))),o=o.return}T.length!==0&&r.push({event:a,listeners:T})}var p2=/\r\n?/g,g2=/\u0000|\uFFFD/g;function rw(r){return(typeof r=="string"?r:""+r).replace(p2,`
9`).replace(g2,"")}function sw(r,a){return a=rw(a),rw(r)===a}function et(r,a,o,d,y,v){switch(o){case"children":typeof d=="string"?a==="body"||a==="textarea"&&d===""||oi(r,d):(typeof d=="number"||typeof d=="bigint")&&a!=="body"&&oi(r,""+d);break;case"className":bc(r,"class",d);break;case"tabIndex":bc(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":bc(r,o,d);break;case"style":sb(r,d,v);break;case"data":if(a!=="object"){bc(r,"data",d);break}case"src":case"href":if(d===""&&(a!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=wc(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"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 v=="function"&&(o==="formAction"?(a!=="input"&&et(r,a,"name",y.name,y,null),et(r,a,"formEncType",y.formEncType,y,null),et(r,a,"formMethod",y.formMethod,y,null),et(r,a,"formTarget",y.formTarget,y,null)):(et(r,a,"encType",y.encType,y,null),et(r,a,"method",y.method,y,null),et(r,a,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=wc(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=Ur);break;case"onScroll":d!=null&&ze("scroll",r);break;case"onScrollEnd":d!=null&&ze("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(s(61));if(o=d.__html,o!=null){if(y.children!=null)throw Error(s(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=wc(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
9ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":ze("beforetoggle",r),ze("toggle",r),vc(r,"popover",d);break;case"xlinkActuate":Br(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Br(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Br(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Br(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Br(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Br(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Br(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Br(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Br(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":vc(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Gk.get(o)||o,vc(r,o,d))}}function Pm(r,a,o,d,y,v){switch(o){case"style":sb(r,d,v);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(s(61));if(o=d.__html,o!=null){if(y.children!=null)throw Error(s(60));r.innerHTML=o}}break;case"children":typeof d=="string"?oi(r,d):(typeof d=="number"||typeof d=="bigint")&&oi(r,""+d);break;case"onScroll":d!=null&&ze("scroll",r);break;case"onScrollEnd":d!=null&&ze("scrollend",r);break;case"onClick":d!=null&&(r.onclick=Ur);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yv.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(y=o.endsWith("Capture"),a=o.slice(2,y?o.length-7:void 0),v=r[cn]||null,v=v!=null?v[o]:null,typeof v=="function"&&r.removeEventListener(a,v,y),typeof d=="function")){typeof v!="function"&&v!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(a,d,y);break e}o in r?r[o]=d:d===!0?r.setAttribute(o,""):vc(r,o,d)}}}function $t(r,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",r),ze("load",r);var d=!1,y=!1,v;for(v in o)if(o.hasOwnProperty(v)){var T=o[v];if(T!=null)switch(v){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:et(r,a,v,T,o,null)}}y&&et(r,a,"srcSet",o.srcSet,o,null),d&&et(r,a,"src",o.src,o,null);return;case"input":ze("invalid",r);var N=v=T=y=null,R=null,H=null;for(d in o)if(o.hasOwnProperty(d)){var W=o[d];if(W!=null)switch(d){case"name":y=W;break;case"type":T=W;break;case"checked":R=W;break;case"defaultChecked":H=W;break;case"value":v=W;break;case"defaultValue":N=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(s(137,a));break;default:et(r,a,d,W,o,null)}}eb(r,v,N,R,H,T,y,!1);return;case"select":ze("invalid",r),d=T=v=null;for(y in o)if(o.hasOwnProperty(y)&&(N=o[y],N!=null))switch(y){case"value":v=N;break;case"defaultValue":T=N;break;case"multiple":d=N;default:et(r,a,y,N,o,null)}a=v,o=T,r.multiple=!!d,a!=null?ii(r,!!d,a,!1):o!=null&&ii(r,!!d,o,!0);return;case"textarea":ze("invalid",r),v=y=d=null;for(T in o)if(o.hasOwnProperty(T)&&(N=o[T],N!=null))switch(T){case"value":d=N;break;case"defaultValue":y=N;break;case"children":v=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(s(91));break;default:et(r,a,T,N,o,null)}nb(r,d,y,v);return;case"option":for(R in o)o.hasOwnProperty(R)&&(d=o[R],d!=null)&&(R==="selected"?r.selected=d&&typeof d!="function"&&typeof d!="symbol":et(r,a,R,d,o,null));return;case"dialog":ze("beforetoggle",r),ze("toggle",r),ze("cancel",r),ze("close",r);break;case"iframe":case"object":ze("load",r);break;case"video":case"audio":for(d=0;d<dl.length;d++)ze(dl[d],r);break;case"image":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"embed":case"source":case"link":ze("error",r),ze("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(H in o)if(o.hasOwnProperty(H)&&(d=o[H],d!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:et(r,a,H,d,o,null)}return;default:if(Yf(a)){for(W in o)o.hasOwnProperty(W)&&(d=o[W],d!==void 0&&Pm(r,a,W,d,o,void 0));return}}for(N in o)o.hasOwnProperty(N)&&(d=o[N],d!=null&&et(r,a,N,d,o,null))}function y2(r,a,o,d){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,v=null,T=null,N=null,R=null,H=null,W=null;for(q in o){var Q=o[q];if(o.hasOwnProperty(q)&&Q!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":R=Q;default:d.hasOwnProperty(q)||et(r,a,q,null,d,Q)}}for(var G in d){var q=d[G];
vendor: 7,321 bytes, line 9
9if(Q=o[G],d.hasOwnProperty(G)&&(q!=null||Q!=null))switch(G){case"type":v=q;break;case"name":y=q;break;case"checked":H=q;break;case"defaultChecked":W=q;break;case"value":T=q;break;case"defaultValue":N=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,a));break;default:q!==Q&&et(r,a,G,q,d,Q)}}Kf(r,T,N,R,H,W,v,y);return;case"select":q=T=N=G=null;for(v in o)if(R=o[v],o.hasOwnProperty(v)&&R!=null)switch(v){case"value":break;case"multiple":q=R;default:d.hasOwnProperty(v)||et(r,a,v,null,d,R)}for(y in d)if(v=d[y],R=o[y],d.hasOwnProperty(y)&&(v!=null||R!=null))switch(y){case"value":G=v;break;case"defaultValue":N=v;break;case"multiple":T=v;default:v!==R&&et(r,a,y,v,d,R)}a=N,o=T,d=q,G!=null?ii(r,!!o,G,!1):!!d!=!!o&&(a!=null?ii(r,!!o,a,!0):ii(r,!!o,o?[]:"",!1));return;case"textarea":q=G=null;for(N in o)if(y=o[N],o.hasOwnProperty(N)&&y!=null&&!d.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:et(r,a,N,null,d,y)}for(T in d)if(y=d[T],v=o[T],d.hasOwnProperty(T)&&(y!=null||v!=null))switch(T){case"value":G=y;break;case"defaultValue":q=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(s(91));break;default:y!==v&&et(r,a,T,y,d,v)}tb(r,G,q);return;case"option":for(var me in o)G=o[me],o.hasOwnProperty(me)&&G!=null&&!d.hasOwnProperty(me)&&(me==="selected"?r.selected=!1:et(r,a,me,null,d,G));for(R in d)G=d[R],q=o[R],d.hasOwnProperty(R)&&G!==q&&(G!=null||q!=null)&&(R==="selected"?r.selected=G&&typeof G!="function"&&typeof G!="symbol":et(r,a,R,G,d,q));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 Ee in o)G=o[Ee],o.hasOwnProperty(Ee)&&G!=null&&!d.hasOwnProperty(Ee)&&et(r,a,Ee,null,d,G);for(H in d)if(G=d[H],q=o[H],d.hasOwnProperty(H)&&G!==q&&(G!=null||q!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,a));break;default:et(r,a,H,G,d,q)}return;default:if(Yf(a)){for(var tt in o)G=o[tt],o.hasOwnProperty(tt)&&G!==void 0&&!d.hasOwnProperty(tt)&&Pm(r,a,tt,void 0,d,G);for(W in d)G=d[W],q=o[W],!d.hasOwnProperty(W)||G===q||G===void 0&&q===void 0||Pm(r,a,W,G,d,q);return}}for(var V in o)G=o[V],o.hasOwnProperty(V)&&G!=null&&!d.hasOwnProperty(V)&&et(r,a,V,null,d,G);for(Q in d)G=d[Q],q=o[Q],!d.hasOwnProperty(Q)||G===q||G==null&&q==null||et(r,a,Q,G,d,q)}function aw(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function v2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var y=o[d],v=y.transferSize,T=y.initiatorType,N=y.duration;if(v&&N&&aw(T)){for(T=0,N=y.responseEnd,d+=1;d<o.length;d++){var R=o[d],H=R.startTime;if(H>N)break;var W=R.transferSize,Q=R.initiatorType;W&&aw(Q)&&(R=R.responseEnd,T+=W*(R<N?1:(N-H)/(R-H)))}if(--d,a+=8*(v+T)/(y.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Lm=null,zm=null;function gu(r){return r.nodeType===9?r:r.ownerDocument}function iw(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 ow(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function Im(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Bm=null;function b2(){var r=window.event;return r&&r.type==="popstate"?r===Bm?!1:(Bm=r,!0):(Bm=null,!1)}var lw=typeof setTimeout=="function"?setTimeout:void 0,x2=typeof clearTimeout=="function"?clearTimeout:void 0,cw=typeof Promise=="function"?Promise:void 0,w2=typeof queueMicrotask=="function"?queueMicrotask:typeof cw<"u"?function(r){return cw.resolve(null).then(r).catch(S2)}:lw;function S2(r){setTimeout(function(){throw r})}function Is(r){return r==="head"}function uw(r,a){var o=a,d=0;do{var y=o.nextSibling;if(r.removeChild(o),y&&y.nodeType===8)if(o=y.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(y),Ii(a);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")hl(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,hl(o);for(var v=o.firstChild;v;){var T=v.nextSibling,N=v.nodeName;v[Ro]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=T}}else o==="body"&&hl(r.ownerDocument.body);o=y}while(o);Ii(a)}function dw(r,a){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function Um(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Um(o),qf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function _2(r,a,o,d){for(;r.nodeType===1;){var y=o;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Ro])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var v=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=$n(r.nextSibling),r===null)break}return null}function E2(r,a,o){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=$n(r.nextSibling),r===null))return null;return r}function fw(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=$n(r.nextSibling),r===null))return null;return r}function Vm(r){return r.data==="$?"||r.data==="$~"}function $m(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function T2(r,a){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||o.readyState!=="loading")a();else{var d=function(){a(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function $n(r){for(;r!=null;
vendor: 5,110 bytes, line 9
9r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Hm=null;function hw(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(a===0)return $n(r.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}r=r.nextSibling}return null}function mw(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return r;a--}else o!=="/$"&&o!=="/&"||a++}r=r.previousSibling}return null}function pw(r,a,o){switch(a=gu(o),r){case"html":if(r=a.documentElement,!r)throw Error(s(452));return r;case"head":if(r=a.head,!r)throw Error(s(453));return r;case"body":if(r=a.body,!r)throw Error(s(454));return r;default:throw Error(s(451))}}function hl(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);qf(r)}var Hn=new Map,gw=new Set;function yu(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ns=F.d;F.d={f:j2,r:C2,D:A2,C:N2,L:k2,m:R2,X:D2,S:O2,M:M2};function j2(){var r=ns.f(),a=lu();return r||a}function C2(r){var a=ri(r);a!==null&&a.tag===5&&a.type==="form"?D0(a):ns.r(r)}var Pi=typeof document>"u"?null:document;function yw(r,a,o){var d=Pi;if(d&&typeof a=="string"&&a){var y=Pn(a);y='link[rel="'+r+'"][href="'+y+'"]',typeof o=="string"&&(y+='[crossorigin="'+o+'"]'),gw.has(y)||(gw.add(y),r={rel:r,crossOrigin:o,href:a},d.querySelector(y)===null&&(a=d.createElement("link"),$t(a,"link",r),Dt(a),d.head.appendChild(a)))}}function A2(r){ns.D(r),yw("dns-prefetch",r,null)}function N2(r,a){ns.C(r,a),yw("preconnect",r,a)}function k2(r,a,o){ns.L(r,a,o);var d=Pi;if(d&&r&&a){var y='link[rel="preload"][as="'+Pn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(y+='[imagesrcset="'+Pn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(y+='[imagesizes="'+Pn(o.imageSizes)+'"]')):y+='[href="'+Pn(r)+'"]';var v=y;switch(a){case"style":v=Li(r);break;case"script":v=zi(r)}Hn.has(v)||(r=p({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:r,as:a},o),Hn.set(v,r),d.querySelector(y)!==null||a==="style"&&d.querySelector(ml(v))||a==="script"&&d.querySelector(pl(v))||(a=d.createElement("link"),$t(a,"link",r),Dt(a),d.head.appendChild(a)))}}function R2(r,a){ns.m(r,a);var o=Pi;if(o&&r){var d=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+Pn(d)+'"][href="'+Pn(r)+'"]',v=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=zi(r)}if(!Hn.has(v)&&(r=p({rel:"modulepreload",href:r},a),Hn.set(v,r),o.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(pl(v)))return}d=o.createElement("link"),$t(d,"link",r),Dt(d),o.head.appendChild(d)}}}function O2(r,a,o){ns.S(r,a,o);var d=Pi;if(d&&r){var y=si(d).hoistableStyles,v=Li(r);a=a||"default";var T=y.get(v);if(!T){var N={loading:0,preload:null};if(T=d.querySelector(ml(v)))N.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":a},o),(o=Hn.get(v))&&Gm(r,o);var R=T=d.createElement("link");Dt(R),$t(R,"link",r),R._p=new Promise(function(H,W){R.onload=H,R.onerror=W}),R.addEventListener("load",function(){N.loading|=1}),R.addEventListener("error",function(){N.loading|=2}),N.loading|=4,vu(T,a,d)}T={type:"stylesheet",instance:T,count:1,state:N},y.set(v,T)}}}function D2(r,a){ns.X(r,a);var o=Pi;if(o&&r){var d=si(o).hoistableScripts,y=zi(r),v=d.get(y);v||(v=o.querySelector(pl(y)),v||(r=p({src:r,async:!0},a),(a=Hn.get(y))&&qm(r,a),v=o.createElement("script"),Dt(v),$t(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(y,v))}}function M2(r,a){ns.M(r,a);var o=Pi;if(o&&r){var d=si(o).hoistableScripts,y=zi(r),v=d.get(y);v||(v=o.querySelector(pl(y)),v||(r=p({src:r,async:!0,type:"module"},a),(a=Hn.get(y))&&qm(r,a),v=o.createElement("script"),Dt(v),$t(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(y,v))}}function vw(r,a,o,d){var y=(y=ue.current)?yu(y):null;if(!y)throw Error(s(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Li(o.href),o=si(y).hoistableStyles,d=o.get(a),d||(d={type:"style",instance:null,count:0,state:null},o.set(a,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Li(o.href);var v=si(y).hoistableStyles,T=v.get(r);if(T||(y=y.ownerDocument||y,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,T),(v=y.querySelector(ml(r)))&&!v._p&&(T.instance=v,T.state.loading=5),Hn.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Hn.set(r,o),v||P2(y,r,o,T.state))),a&&d===null)throw Error(s(528,""));return T}if(a&&d!==null)throw Error(s(529,""));return null;
vendor: 4,702 bytes, line 9
9case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=zi(o),o=si(y).hoistableScripts,d=o.get(a),d||(d={type:"script",instance:null,count:0,state:null},o.set(a,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,r))}}function Li(r){return'href="'+Pn(r)+'"'}function ml(r){return'link[rel="stylesheet"]['+r+"]"}function bw(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function P2(r,a,o,d){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?d.loading=1:(a=r.createElement("link"),d.preload=a,a.addEventListener("load",function(){return d.loading|=1}),a.addEventListener("error",function(){return d.loading|=2}),$t(a,"link",o),Dt(a),r.head.appendChild(a))}function zi(r){return'[src="'+Pn(r)+'"]'}function pl(r){return"script[async]"+r}function xw(r,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var d=r.querySelector('style[data-href~="'+Pn(o.href)+'"]');if(d)return a.instance=d,Dt(d),d;var y=p({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Dt(d),$t(d,"style",y),vu(d,o.precedence,r),a.instance=d;case"stylesheet":y=Li(o.href);var v=r.querySelector(ml(y));if(v)return a.state.loading|=4,a.instance=v,Dt(v),v;d=bw(o),(y=Hn.get(y))&&Gm(d,y),v=(r.ownerDocument||r).createElement("link"),Dt(v);var T=v;return T._p=new Promise(function(N,R){T.onload=N,T.onerror=R}),$t(v,"link",d),a.state.loading|=4,vu(v,o.precedence,r),a.instance=v;case"script":return v=zi(o.src),(y=r.querySelector(pl(v)))?(a.instance=y,Dt(y),y):(d=o,(y=Hn.get(v))&&(d=p({},o),qm(d,y)),r=r.ownerDocument||r,y=r.createElement("script"),Dt(y),$t(y,"link",d),r.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(d=a.instance,a.state.loading|=4,vu(d,o.precedence,r));return a.instance}function vu(r,a,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,v=y,T=0;T<d.length;T++){var N=d[T];if(N.dataset.precedence===a)v=N;else if(v!==y)break}v?v.parentNode.insertBefore(r,v.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(r,a.firstChild))}function Gm(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function qm(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var bu=null;function ww(r,a,o){if(bu===null){var d=new Map,y=bu=new Map;y.set(o,d)}else y=bu,d=y.get(o),d||(d=new Map,y.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),y=0;y<o.length;y++){var v=o[y];if(!(v[Ro]||v[It]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var T=v.getAttribute(a)||"";T=r+T;var N=d.get(T);N?N.push(v):d.set(T,[v])}}return d}function Sw(r,a,o){r=r.ownerDocument||r,r.head.insertBefore(o,a==="title"?r.querySelector("head > title"):null)}function L2(r,a,o){if(o===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function _w(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function z2(r,a,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var y=Li(d.href),v=a.querySelector(ml(y));if(v){a=v._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=xu.bind(r),a.then(r,r)),o.state.loading|=4,o.instance=v,Dt(v);return}v=a.ownerDocument||a,d=bw(d),(y=Hn.get(y))&&Gm(d,y),v=v.createElement("link"),Dt(v);var T=v;T._p=new Promise(function(N,R){T.onload=N,T.onerror=R}),$t(v,"link",d),o.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=xu.bind(r),a.addEventListener("load",o),a.addEventListener("error",o))}}var Fm=0;function I2(r,a){return r.stylesheets&&r.count===0&&Su(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&Su(r,r.stylesheets),r.unsuspend){var v=r.unsu
vendor: 4,249 bytes, line 9
9spend;r.unsuspend=null,v()}},6e4+a);0<r.imgBytes&&Fm===0&&(Fm=62500*v2());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Su(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Fm?50:800)+a);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function xu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Su(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var wu=null;function Su(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,wu=new Map,a.forEach(B2,r),wu=null,xu.call(r))}function B2(r,a){if(!(a.state.loading&4)){var o=wu.get(r);if(o)var d=o.get(null);else{o=new Map,wu.set(r,o);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<y.length;v++){var T=y[v];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(o.set(T.dataset.precedence,T),d=T)}d&&o.set(null,d)}y=a.instance,T=y.getAttribute("data-precedence"),v=o.get(T)||d,v===d&&o.set(null,y),o.set(T,y),this.count++,d=xu.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),v?v.parentNode.insertBefore(y,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),a.state.loading|=4}}var gl={$$typeof:A,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function U2(r,a,o,d,y,v,T,N,R){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=bs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bs(0),this.hiddenUpdates=bs(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=v,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Ew(r,a,o,d,y,v,T,N,R,H,W,Q){return r=new U2(r,a,o,T,R,H,W,Q,N),a=1,v===!0&&(a|=24),v=wn(3,null,null,a),r.current=v,v.stateNode=r,a=Th(),a.refCount++,r.pooledCache=a,a.refCount++,v.memoizedState={element:d,isDehydrated:o,cache:a},Nh(v),r}function Tw(r){return r?(r=mi,r):mi}function jw(r,a,o,d,y,v){y=Tw(y),d.context===null?d.context=y:d.pendingContext=y,d=Cs(a),d.payload={element:o},v=v===void 0?null:v,v!==null&&(d.callback=v),o=As(r,d,a),o!==null&&(pn(o,r,a),Wo(o,r,a))}function Cw(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<a?o:a}}function Km(r,a){Cw(r,a),(r=r.alternate)&&Cw(r,a)}function Aw(r){if(r.tag===13||r.tag===31){var a=Sa(r,67108864);a!==null&&pn(a,r,67108864),Km(r,67108864)}}function Nw(r){if(r.tag===13||r.tag===31){var a=jn();a=ei(a);var o=Sa(r,a);o!==null&&pn(o,r,a),Km(r,a)}}var _u=!0;function V2(r,a,o,d){var y=M.T;M.T=null;var v=F.p;try{F.p=2,Wm(r,a,o,d)}finally{F.p=v,M.T=y}}function $2(r,a,o,d){var y=M.T;M.T=null;var v=F.p;try{F.p=8,Wm(r,a,o,d)}finally{F.p=v,M.T=y}}function Wm(r,a,o,d){if(_u){var y=Ym(d);if(y===null)Mm(r,a,d,Eu,o),Rw(r,d);else if(G2(y,r,a,o,d))d.stopPropagation();else if(Rw(r,d),a&4&&-1<H2.indexOf(r)){for(;y!==null;){var v=ri(y);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var T=vr(v.pendingLanes);if(T!==0){var N=v;for(N.pendingLanes|=2,N.entangledLanes|=2;T;){var R=1<<31-Kt(T);N.entanglements[1]|=R,T&=~R}Sr(v),(Ye&6)===0&&(iu=en()+500,ul(0))}}break;case 31:case 13:N=Sa(v,2),N!==null&&pn(N,v,2),lu(),Km(v,2)}if(v=Ym(d),v===null&&Mm(r,a,d,Eu,o),v===y)break;y=v}y!==null&&d.stopPropagation()}else Mm(r,a,d,null,o)}}function Ym(r){return r=Jf(r),Xm(r)}var Eu=null;function Xm(r){if(Eu=null,r=ni(r),r!==null){var a=l(r);if(a===null)r=null;else{var o=a.tag;if(o===13){if(r=c(a),r!==null)return r;r=null}else if(o===31){if(r=f(a),r!==null)return r;r=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Eu=r,null}function kw(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 3,765 bytes, line 9
9: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(Vf()){case ha:return 2;case gc:return 8;case ma:case No:return 32;case Ir:return 268435456;default:return 32}default:return 32}}var Jm=!1,Bs=null,Us=null,Vs=null,yl=new Map,vl=new Map,$s=[],H2="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 Rw(r,a){switch(r){case"focusin":case"focusout":Bs=null;break;case"dragenter":case"dragleave":Us=null;break;case"mouseover":case"mouseout":Vs=null;break;case"pointerover":case"pointerout":yl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":vl.delete(a.pointerId)}}function bl(r,a,o,d,y,v){return r===null||r.nativeEvent!==v?(r={blockedOn:a,domEventName:o,eventSystemFlags:d,nativeEvent:v,targetContainers:[y]},a!==null&&(a=ri(a),a!==null&&Aw(a)),r):(r.eventSystemFlags|=d,a=r.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),r)}function G2(r,a,o,d,y){switch(a){case"focusin":return Bs=bl(Bs,r,a,o,d,y),!0;case"dragenter":return Us=bl(Us,r,a,o,d,y),!0;case"mouseover":return Vs=bl(Vs,r,a,o,d,y),!0;case"pointerover":var v=y.pointerId;return yl.set(v,bl(yl.get(v)||null,r,a,o,d,y)),!0;case"gotpointercapture":return v=y.pointerId,vl.set(v,bl(vl.get(v)||null,r,a,o,d,y)),!0}return!1}function Ow(r){var a=ni(r.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){r.blockedOn=a,Fv(r.priority,function(){Nw(o)});return}}else if(a===31){if(a=f(o),a!==null){r.blockedOn=a,Fv(r.priority,function(){Nw(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Tu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var o=Ym(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Xf=d,o.target.dispatchEvent(d),Xf=null}else return a=ri(o),a!==null&&Aw(a),r.blockedOn=o,!1;a.shift()}return!0}function Dw(r,a,o){Tu(r)&&o.delete(a)}function q2(){Jm=!1,Bs!==null&&Tu(Bs)&&(Bs=null),Us!==null&&Tu(Us)&&(Us=null),Vs!==null&&Tu(Vs)&&(Vs=null),yl.forEach(Dw),vl.forEach(Dw)}function ju(r,a){r.blockedOn===a&&(r.blockedOn=null,Jm||(Jm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,q2)))}var Cu=null;function Mw(r){Cu!==r&&(Cu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cu===r&&(Cu=null);for(var a=0;a<r.length;a+=3){var o=r[a],d=r[a+1],y=r[a+2];if(typeof d!="function"){if(Xm(d||o)===null)continue;break}var v=ri(o);v!==null&&(r.splice(a,3),a-=3,Yh(v,{pending:!0,data:y,method:o.method,action:d}
9,d,y))}}))}function Ii(r){function a(R){return ju(R,r)}Bs!==null&&ju(Bs,r),Us!==null&&ju(Us,r),Vs!==null&&ju(Vs,r),yl.forEach(a),vl.forEach(a);for(var o=0;o<$s.length;o++){var d=$s[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<$s.length&&(o=$s[0],o.blockedOn===null);)Ow(o),o.blockedOn===null&&$s.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var y=o[d],v=o[d+1],T=y[cn]||null;if(typeof v=="function")T||Mw(o);else if(T){var N=null;if(v&&v.hasAttribute("formAction")){if(y=v,T=v[cn]||null)N=T.formAction;else if(Xm(y)!==null)continue}else N=T.action;typeof N=="function"?o[d+1]=N:(o.splice(d,3),d-=3),Mw(o)}}}function Pw(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(T){return y=T})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Zm(r){this._internalRoot=r}Au.prototype.render=Zm.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(s(409));var o=a.current,d=jn();jw(o,d,r,a,null,null)},Au.prototype.unmount=Zm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;jw(r.current,2,null,r,null,null),lu(),a[ti]=null}};function Au(r){this._internalRoot=r}Au.prototype.unstable_scheduleHydration=function(r){if(r){var a=Hf();r={blockedOn:null,target:r,priority:a};for(var o=0;o<$s.length&&a!==0&&a<$s[o].priority;o++);$s.splice(o,0,r),o===0&&Ow(r)}};var Lw=t.version;if(Lw!=="19.2.4")throw Error(s(527,Lw,"19.2.4"));F.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(s(188)):(r=Object.keys(r).join(","),Error(s(268,r)));return r=m(a),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var F2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nu.isDisabled&&Nu.supportsFiber)try{pa=Nu.inject(F2),tn=Nu}catch{}}return wl.createRoot=function(r,a){if(!i(r))throw Error(s(299));var o=!1,d="",y=H0,v=G0,T=q0;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError)),a=Ew(r,1,!1,null,null,o,d,null,y,v,T,Pw),r[ti]=a.current,Dm(r),new Zm(a)},wl.hydrateRoot=function(r,a,o){if(!i(r))throw Error(s(299));var d=!1,y="",v=H0,T=G0,N=q0,R=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(y=o.identifierPrefix),o.onUncaughtError!==void 0&&(v=o.onUncaughtError),o.onCaughtError!==void 0&&(T=o.onCaughtError),o.onRecoverableError!==void 0&&(N=o.onRecoverableError),o.formState!==void 0&&(R=o.formState)),a=Ew(r,1,!0,a,o??null,d,y,R,v,T,N,Pw),a.context=Tw(null),o=a.current,d=jn(),d=ei(d),y=Cs(d),y.callback=null,As(o,y,d),o=d,a.current.lanes=o,ft(a,o),Sr(a),r[ti]=a.current,Dm(r),new Au(a)},wl.version="19.2.4",wl}var Fw;function nO(){if(Fw)return tp.exports;Fw=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(),tp.exports=tO(),tp.exports}var rO=nO();var ty=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pE=/^[\\/]{2}/;function sO(e,t){return t+e.replace(/\\/g,"/")}var Kw="popstate";function Ww(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function aO(e={}){function t(s,i){let l=i.state?.masked,{pathname:c,search:f,hash:h}=l||s.location;return tg("",{pathname:c,search:f,hash:h},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,i){return typeof i=="string"?i:Il(i)}return oO(t,n,null,e)}function dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ur(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function iO(){return Math.random().toString(36).substring(2,10)}function Yw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}
9function tg(e,t,n=null,s,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?po(t):t,state:n,key:t&&t.key||s||iO(),mask:i}}function Il({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function po(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function oO(e,t,n,s={}){let{window:i=document.defaultView,v5Compat:l=!1}=s,c=i.history,f="POP",h=null,m=g();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function g(){return(c.state||{idx:null}).idx}function p(){f="POP";let E=g(),j=E==null?null:E-m;m=E,h&&h({action:f,location:_.location,delta:j})}function b(E,j){f="PUSH";let C=Ww(E)?E:tg(_.location,E,j);m=g()+1;let A=Yw(C,m),k=_.createHref(C.mask||C);try{c.pushState(A,"",k)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(k)}l&&h&&h({action:f,location:_.location,delta:1})}function w(E,j){f="REPLACE";let C=Ww(E)?E:tg(_.location,E,j);m=g();let A=Yw(C,m),k=_.createHref(C.mask||C);c.replaceState(A,"",k),l&&h&&h({action:f,location:_.location,delta:0})}function S(E){return lO(i,E)}let _={get action(){return f},get location(){return e(i,c)},listen(E){if(h)throw new Error("A history only accepts one active listener");return i.addEventListener(Kw,p),h=E,()=>{i.removeEventListener(Kw,p),h=null}},createHref(E){return t(i,E)},createURL:S,encodeLocation(E){let j=S(E);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:b,replace:w,go(E){return c.go(E)}};return _}function lO(e,t,n=!1){let s="http://localhost";e&&(s=e.location.origin!=="null"?e.location.origin:e.location.href),dt(s,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Il(t);return i=i.replace(/ $/,"%20"),!n&&pE.test(i)&&(i=s+i),new URL(i,s)}function gE(e,t,n="/"){return cO(e,t,n,!1)}function cO(e,t,n,s,i){let l=typeof t=="string"?po(t):t,c=cs(l.pathname||"/",n);if(c==null)return null;let f=uO(e),h=null,m=wO(c);for(let g=0;h==null&&g<f.length;++g)h=xO(f[g],m,s);return h}function uO(e){let t=yE(e);return dO(t),t}function yE(e,t=[],n=[],s="",i=!1){let l=(c,f,h=i,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(s)&&h)return;dt(g.relativePath.startsWith(s),`Absolute route path "${g.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(s.length)}let p=or([s,g.relativePath]),b=n.concat(g);c.children&&c.children.length>0&&(dt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),yE(c.children,t,b,p,h)),!(c.path==null&&!c.index)&&t.push({path:p,score:vO(p,c.index),routesMeta:b.map((w,S)=>{let[_,E]=xE(w.relativePath,w.caseSensitive,S===b.length-1);return{...w,matcher:_,compiledParams:E}})})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))l(c,f);else for(let h of vE(c.path))l(c,f,!0,h)}),t}function vE(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return i?[l,""]:[l];let c=vE(s.join("/")),f=[];return f.push(...c.map(h=>h===""?l:[l,h].join("/"))),i&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function dO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bO(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var fO=/^:[\w-]+$/,hO=3,mO=2,pO=1,gO=10,yO=-2,Xw=e=>e==="*";function vO(e,t){let n=e.split("/"),s=n.length;return n.some(Xw)&&(s+=yO),t&&(s+=mO),n.filter(i=>!Xw(i)).reduce((i,l)=>i+(fO.test(l)?hO:l===""?pO:gO),s)}function bO(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function xO(e,t,n=!1){let{routesMeta:s}=e,i={},l="/",c=[];for(let f=0;f<s.length;++f){let h=s[f],m=f===s.length-1,g=l==="/"?t:t.slice(l.length)||"/",p={path:h.relativePath,caseSensitive:h.caseSensitive,end:m},b=h.matcher&&h.compiledParams?bE(p,g,h.matcher,h.compiledParams):xd(p,g),w=h.route;if(!b&&m&&n&&!s[s.length-1].route.index&&(b=xd({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!b)return null;
9Object.assign(i,b.params),c.push({params:i,pathname:or([l,b.pathname]),pathnameBase:EO(or([l,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(l=or([l,b.pathnameBase]))}return c}function xd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=xE(e.path,e.caseSensitive,e.end);return bE(e,t,n,s)}function bE(e,t,n,s){let i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),f=i.slice(1);return{params:s.reduce((m,{paramName:g,isOptional:p},b)=>{if(g==="*"){let S=f[b]||"";c=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const w=f[b];return p&&!w?m[g]=void 0:m[g]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:c,pattern:e}}function xE(e,t=!1,n=!0){ur(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h,m,g)=>{if(s.push({paramName:f,isOptional:h!=null}),h){let p=g.charAt(m+c.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),s]}function wO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ur(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function cs(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}function SO(e,t="/"){let{pathname:n,search:s="",hash:i=""}=typeof e=="string"?po(e):e,l;return n?(n=wE(n),n.startsWith("/")?l=Jw(n.substring(1),"/"):l=Jw(n,t)):l=t,{pathname:l,search:TO(s),hash:jO(i)}}function Jw(e,t){let n=wd(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ap(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _O(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ny(e){let t=_O(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Jd(e,t,n,s=!1){let i;typeof e=="string"?i=po(e):(i={...e},dt(!i.pathname||!i.pathname.includes("?"),ap("?","pathname","search",i)),dt(!i.pathname||!i.pathname.includes("#"),ap("#","pathname","hash",i)),dt(!i.search||!i.search.includes("#"),ap("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":i.pathname,f;if(c==null)f=n;else{let p=t.length-1;if(!s&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),p-=1;i.pathname=b.join("/")}f=p>=0?t[p]:"/"}let h=SO(i,f),m=c&&c!=="/"&&c.endsWith("/"),g=(l||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}var wE=e=>e.replace(/[\\/]{2,}/g,"/"),or=e=>wE(e.join("/")),wd=e=>e.replace(/\/+$/,""),EO=e=>wd(e).replace(/^\/*/,"/"),TO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,CO=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function AO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function NO(e){let t=e.map(n=>n.route.path).filter(Boolean);return or(t)||"/"}var SE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _E(e,t){let n=e;if(typeof n!="string"||!ty.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,i=!1;if(SE)try{let l=new URL(window.location.href),c=pE.test(n)?new URL(sO(n,l.protocol)):new URL(n),f=cs(c.pathname,t);c.origin===l.origin&&f!=null?n=f+c.search+c.hash:i=!0}catch{ur(!1,`<Link to="${n}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var EE=["POST","PUT","PATCH","DELETE"];new Set(EE);var kO=["GET",...EE];new Set(kO);var RO=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function OO(e){try{return RO.includes(new URL(e).protocol)}catch{return!1}}var go=x.createContext(null);go.displayName="DataRouter";var Zd=x.createContext(null);Zd.displayName="DataRouterState";var TE=x.createContext(!1);function DO(){return x.useContext(TE)}var jE=x.createContext({isTransitioning:!1});jE.displayName="ViewTransition";var MO=x.createContext(new Map);MO.displayName="Fetchers";var PO=x.createContext(null);PO.displayName="Await";var Rn=x.createContext(null);Rn.displayName="Navigation";var rc=x.createContext(null);rc.displayName="Location";var Kn=x.createContext({outlet:null,matches:[],isDataRoute:!1});Kn.displayName="Route";var ry=x.createContext(null);ry.displayName="RouteError";var CE="REACT_ROUTER_ERROR",LO="REDIRECT",zO="ROUTE_ERROR_RESPONSE";function IO(e){if(e.startsWith(`${CE}:${LO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function BO(e){if(e.startsWith(`${CE}:${zO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new CO(t.status,t.statusText,t.data)}catch{}}function UO(e,{relative:t}={}){dt(yo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=x.useContext(Rn),{hash:i,pathname:l,search:c}=ac(e,{relative:t}),f=l;return n!=="/"&&(f=l==="/"?n:or([n,l])),s.createHref({pathname:f,search:c,hash:i})}function yo(){return x.useContext(rc)!=null}function On(){return dt(yo(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(rc).location}var AE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function NE(e){x.useContext(Rn).static||x.useLayoutEffect(e)}function sc(){let{isDataRoute:e}=x.useContext(Kn);return e?tD():VO()}function VO(){dt(yo(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(go),{basename:t,navigator:n}=x.useContext(Rn),{matches:s}=x.useContext(Kn),{pathname:i}=On(),l=JSON.stringify(ny(s)),c=x.useRef(!1);return NE(()=>{c.current=!0}),x.useCallback((h,m={})=>{if(ur(c.current,AE),!c.current)return;if(typeof h=="number"){n.go(h);return}let g=Jd(h,JSON.parse(l),i,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:or([t,g.pathname])),(m.replace?n.replace:n.push)(g,m.state,m)},[t,n,l,i,e])}var $O=x.createContext(null);function HO(e){let t=x.useContext(Kn).outlet;return x.useMemo(()=>t&&x.createElement($O.Provider,{value:e},t),[t,e])}function kE(){let{matches:e}=x.useContext(Kn);return e[e.length-1]?.params??{}}function ac(e,{relative:t}={}){let{matches:n}=x.useContext(Kn),{pathname:s}=On(),i=JSON.stringify(ny(n));return x.useMemo(()=>Jd(e,JSON.parse(i),s,t==="path"),[e,i,s,t])}function GO(e,t){return RE(e,t)}function RE(e,t,n){dt(yo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=x.useContext(Rn),{matches:i}=x.useContext(Kn),l=i[i.length-1],c=l?l.params:{},f=l?l.pathname:"/",h=l?l.pathnameBase:"/",m=l&&l.route;{let E=m&&m.path||"";DE(f,!m||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
11Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let g=On(),p;if(t){let E=typeof t=="string"?po(t):t;dt(h==="/"||E.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${E.pathname}" was given in the \`location\` prop.`),p=E}else p=g;let b=p.pathname||"/",w=b;if(h!=="/"){let E=h.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(E.length).join("/")}let S=n&&n.state.matches.length?n.state.matches.map(E=>Object.assign(E,{route:n.manifest[E.route.id]||E.route})):gE(e,{pathname:w});ur(m||S!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),ur(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=YO(S&&S.map(E=>Object.assign({},E,{params:Object.assign({},c,E.params),pathname:or([h,s.encodeLocation?s.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?h:or([h,s.encodeLocation?s.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),i,n);return t&&_?x.createElement(rc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},_):_}function qO(){let e=eD(),t=AO(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},l={padding:"2px 4px",backgroundColor:s},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:l},"ErrorBoundary")," or"," ",x.createElement("code",{style:l},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application 
11Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,c)}var FO=x.createElement(qO,null),OE=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=BO(e.digest);n&&(e=n)}let t=e!==void 0?x.createElement(Kn.Provider,{value:this.props.routeContext},x.createElement(ry.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(KO,{error:e},t):t}};OE.contextType=TE;var ip=new WeakMap;function KO({children:e,error:t}){let{basename:n}=x.useContext(Rn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=IO(t.digest);if(s){let i=ip.get(t);if(i)throw i;let l=_E(s.location,n),c=l.absoluteURL||l.to;if(OO(c))throw new Error("Invalid redirect location");if(SE&&!ip.get(t))if(l.isExternal||s.reloadDocument)window.location.href=c;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:s.replace}));throw ip.set(t,f),f}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c}`})}}return e}function WO({routeContext:e,match:t,children:n}){let s=x.useContext(go);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(Kn.Provider,{value:e},n)}function YO(e,t=[],n){let s=n?.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let i=e,l=s?.errors;if(l!=null){let g=i.findIndex(p=>p.route.id&&l?.[p.route.id]!==void 0);dt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,g+1))}let c=!1,f=-1;if(n&&s){c=s.renderFallback;for(let g=0;g<i.length;g++){let p=i[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=g),p.route.id){let{loaderData:b,errors:w}=s,S=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||S){n.isStatic&&(c=!0),f>=0?i=i.slice(0,f+1):i=[i[0]];break}}}}let h=n?.onError,m=s&&h?(g,p)=>{h(g,{location:s.location,params:s.matches?.[0]?.params??{},pattern:NO(s.matches),errorInfo:p})}:void 0;return i.reduceRight((g,p,b)=>{let w,S=!1,_=null,E=null;s&&(w=l&&p.route.id?l[p.route.id]:void 0,_=p.route.errorElement||FO,c&&(f<0&&b===0?(DE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):f===b&&(S=!0,E=p.route.hydrateFallbackElement||null)));let j=t.concat(i.slice(0,b+1)),C=()=>{let A;return w?A=_:S?A=E:p.route.Component?A=x.createElement(p.route.Component,null):p.route.element?A=p.route.element:A=g,x.createElement(WO,{match:p,routeContext:{outlet:g,matches:j,isDataRoute:s!=null},children:A})};return s&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?x.createElement(OE,{location:s.location,revalidation:s.revalidation,component:_,error:w,children:C(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:m}):C()},null)}function sy(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function XO(e){let t=x.useContext(go);return dt(t,sy(e)),t}function JO(e){let t=x.useContext(Zd);return dt(t,sy(e)),t}function ZO(e){let t=x.useContext(Kn);return dt(t,sy(e)),t}function ay(e){let t=ZO(e),n=t.matches[t.matches.length-1];return dt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function QO(){return ay("useRouteId")}function eD(){let e=x.useContext(ry),t=JO("useRouteError"),n=ay("useRouteError");return e!==void 0?e:t.errors?.[n]}function tD(){let{router:e}=XO("useNavigate"),t=ay("useNavigate"),n=x.useRef(!1);return NE(()=>{n.current=!0}),x.useCallback(async(i,l={})=>{ur(n.current,AE),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var Zw={};function DE(e,t,n){!t&&!Zw[e]&&(Zw[e]=!0,ur(!1,n))}
11x.memo(nD);function nD({routes:e,manifest:t,future:n,state:s,isStatic:i,onError:l}){return RE(e,void 0,{manifest:t,state:s,isStatic:i,onError:l})}function Qd({to:e,replace:t,state:n,relative:s}){dt(yo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=x.useContext(Rn);ur(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=x.useContext(Kn),{pathname:c}=On(),f=sc(),h=Jd(e,ny(l),c,s==="path"),m=JSON.stringify(h);return x.useEffect(()=>{f(JSON.parse(m),{replace:t,state:n,relative:s})},[f,m,s,t,n]),null}function rD(e){return HO(e.context)}function Tt(e){dt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sD({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:i,static:l=!1,useTransitions:c}){dt(!yo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=x.useMemo(()=>({basename:f,navigator:i,static:l,useTransitions:c,future:{}}),[f,i,l,c]);typeof n=="string"&&(n=po(n));let{pathname:m="/",search:g="",hash:p="",state:b=null,key:w="default",mask:S}=n,_=x.useMemo(()=>{let E=cs(m,f);return E==null?null:{location:{pathname:E,search:g,hash:p,state:b,key:w,mask:S},navigationType:s}},[f,m,g,p,b,w,s,S]);return ur(_!=null,`<Router basename="${f}"> is not able to match the URL "${m}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:x.createElement(Rn.Provider,{value:h},x.createElement(rc.Provider,{children:t,value:_}))}function aD({children:e,location:t}){return GO(ng(e),t)}function ng(e,t=[]){let n=[];return x.Children.forEach(e,(s,i)=>{if(!x.isValidElement(s))return;let l=[...t,i];if(s.type===x.Fragment){n.push.apply(n,ng(s.props.children,l));return}dt(s.type===Tt,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dt(!s.props.index||!s.props.children,"An index route cannot have child routes.");let c={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=ng(s.props.children,l)),n.push(c)}),n}var sd="get",ad="application/x-www-form-urlencoded";function ef(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function iD(e){return ef(e)&&e.tagName.toLowerCase()==="button"}function oD(e){return ef(e)&&e.tagName.toLowerCase()==="form"}function lD(e){return ef(e)&&e.tagName.toLowerCase()==="input"}function cD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uD(e,t){return e.button===0&&(!t||t==="_self")&&!cD(e)}var ku=null;function dD(){if(ku===null)try{new FormData(document.createElement("form"),0),ku=!1}catch{ku=!0}return ku}var fD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function op(e){return e!=null&&!fD.has(e)?(ur(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ad}"`),null):e}function hD(e,t){let n,s,i,l,c;if(oD(e)){let f=e.getAttribute("action");s=f?cs(f,t):null,n=e.getAttribute("method")||sd,i=op(e.getAttribute("enctype"))||ad,l=new FormData(e)}else if(iD(e)||lD(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(s=h?cs(h,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||sd,i=op(e.getAttribute("formenctype"))||op(f.getAttribute("enctype"))||ad,l=new FormData(f,e),!dD()){let{name:m,type:g,value:p}=e;if(g==="image"){let b=m?`${m}.`:"";l.append(`${b}x`,"0"),l.append(`${b}y`,"0")}
11else m&&l.append(m,p)}}else{if(ef(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=sd,s=null,i=ad,c=e}return l&&i==="text/plain"&&(c=l,l=void 0),{action:s,method:n.toLowerCase(),encType:i,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function iy(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ME(e,t,n,s){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${s}`:i.pathname=`${i.pathname}.${s}`:i.pathname==="/"?i.pathname=`_root.${s}`:t&&cs(i.pathname,t)==="/"?i.pathname=`${wd(t)}/_root.${s}`:i.pathname=`${wd(i.pathname)}.${s}`,i}async function mD(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pD(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gD(e,t,n){let s=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await mD(l,n);return c.links?c.links():[]}return[]}));return xD(s.flat(1).filter(pD).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Qw(e,t,n,s,i,l){let c=(h,m)=>n[m]?h.route.id!==n[m].route.id:!0,f=(h,m)=>n[m].pathname!==h.pathname||n[m].route.path?.endsWith("*")&&n[m].params["*"]!==h.params["*"];return l==="assets"?t.filter((h,m)=>c(h,m)||f(h,m)):l==="data"?t.filter((h,m)=>{let g=s.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(c(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let p=h.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function yD(e,t,{includeHydrateFallback:n}={}){return vD(e.map(s=>{let i=t.routes[s.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function vD(e){return[...new Set(e)]}function bD(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function xD(e,t){let n=new Set;return new Set(t),e.reduce((s,i)=>{let l=JSON.stringify(bD(i));return n.has(l)||(n.add(l),s.push({key:l,link:i})),s},[])}function oy(){let e=x.useContext(go);return iy(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function wD(){let e=x.useContext(Zd);return iy(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ly=x.createContext(void 0);ly.displayName="FrameworkContext";function tf(){let e=x.useContext(ly);return iy(e,"You must render this element inside a <HydratedRouter> element"),e}function SD(e,t){let n=x.useContext(ly),[s,i]=x.useState(!1),[l,c]=x.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:g,onTouchStart:p}=t,b=x.useRef(null);x.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=j=>{j.forEach(C=>{c(C.isIntersecting)})},E=new IntersectionObserver(_,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),x.useEffect(()=>{if(s){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[s]);let w=()=>{i(!0)},S=()=>{i(!1),c(!1)};return n?e!=="intent"?[l,b,{}]:[l,b,{onFocus:Sl(f,w),onBlur:Sl(h,S),onMouseEnter:Sl(m,w),onMouseLeave:Sl(g,S),onTouchStart:Sl(p,w)}]:[!1,b,{}]}function Sl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _D({page:e,...t}){let n=DO(),{nonce:s}=tf(),{router:i}=oy(),l=x.useMemo(()=>gE(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?(t.nonce==null&&s&&(t={...t,nonce:s}
11),n?x.createElement(TD,{page:e,matches:l,...t}):x.createElement(jD,{page:e,matches:l,...t})):null}function ED(e){let{manifest:t,routeModules:n}=tf(),[s,i]=x.useState([]);return x.useEffect(()=>{let l=!1;return gD(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),s}function TD({page:e,matches:t,...n}){let s=On(),{future:i}=tf(),{basename:l}=oy(),c=x.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let f=ME(e,l,i.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,m=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?h=!0:m.push(g.route.id);return h&&m.length>0&&f.searchParams.set("_routes",m.join(",")),[f.pathname+f.search]},[l,i.v8_trailingSlashAwareDataRequests,e,s,t]);return x.createElement(x.Fragment,null,c.map(f=>x.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function jD({page:e,matches:t,...n}){let s=On(),{future:i,manifest:l,routeModules:c}=tf(),{basename:f}=oy(),{loaderData:h,matches:m}=wD(),g=x.useMemo(()=>Qw(e,t,m,l,s,"data"),[e,t,m,l,s]),p=x.useMemo(()=>Qw(e,t,m,l,s,"assets"),[e,t,m,l,s]),b=x.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let _=new Set,E=!1;if(t.forEach(C=>{let A=l.routes[C.route.id];!A||!A.hasLoader||(!g.some(k=>k.route.id===C.route.id)&&C.route.id in h&&c[C.route.id]?.shouldRevalidate||A.hasClientLoader?E=!0:_.add(C.route.id))}),_.size===0)return[];let j=ME(e,f,i.v8_trailingSlashAwareDataRequests,"data");return E&&_.size>0&&j.searchParams.set("_routes",t.filter(C=>_.has(C.route.id)).map(C=>C.route.id).join(",")),[j.pathname+j.search]},[f,i.v8_trailingSlashAwareDataRequests,h,s,l,g,t,e,c]),w=x.useMemo(()=>yD(p,l),[p,l]),S=ED(p);return x.createElement(x.Fragment,null,b.map(_=>x.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),w.map(_=>x.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),S.map(({key:_,link:E})=>x.createElement("link",{key:_,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function CD(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var AD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{AD&&(window.__reactRouterVersion="7.18.1")}catch{}function ND({basename:e,children:t,useTransitions:n,window:s}){let i=x.useRef();i.current==null&&(i.current=aO({window:s,v5Compat:!0}));let l=i.current,[c,f]=x.useState({action:l.action,location:l.location}),h=x.useCallback(m=>{n===!1?f(m):x.startTransition(()=>f(m))},[n]);return x.useLayoutEffect(()=>l.listen(h),[l,h]),x.createElement(sD,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:n})}var Gt=x.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:i,reloadDocument:l,replace:c,mask:f,state:h,target:m,to:g,preventScrollReset:p,viewTransition:b,defaultShouldRevalidate:w,...S},_){let{basename:E,navigator:j,useTransitions:C}=x.useContext(Rn),A=typeof g=="string"&&ty.test(g),k=_E(g,E);g=k.to;let D=UO(g,{relative:i}),B=On(),L=null;if(f){let ce=Jd(f,[],B.mask?B.mask.pathname:"/",!0);E!=="/"&&(ce.pathname=ce.pathname==="/"?E:or([E,ce.pathname])),L=j.createHref(ce)}let[P,U,z]=SD(s,S),Y=OD(g,{replace:c,mask:f,state:h,target:m,preventScrollReset:p,relative:i,viewTransition:b,defaultShouldRevalidate:w,useTransitions:C});function se(ce){t&&t(ce),ce.defaultPrevented||Y(ce)}let de=!(k.isExternal||l),fe=x.createElement("a",{...S,...z,href:(de?L:void 0)||k.absoluteURL||D,onClick:de?se:t,ref:CD(_,U),target:m,"data-discover":!A&&n==="render"?"true":void 0});return P&&!A?x.createElement(x.Fragment,null,fe,x.createElement(_D,{page:D})):fe});Gt.displayName="Link";var PE=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:i=!1,style:l,to:c,viewTransition:f,children:h,...m},g){let p=ac(c,{relative:m.relative}),b=On(),w=x.useContext(Zd),{navigator:S,basename:_}=x.useContext(Rn),E=w!=null&&zD(p)&&f===!0,j=S.encodeLocation?S.encodeLocation(p).pathname:p.pathname,C=b.pathname,A=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(C=C.toLowerCase(),A=A?A.toLowerCase():null,j=j.toLowerCase()),A&&_&&(A=cs(A,_)||A);const k=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let D=C===j||!i&&C.startsWith(j)&&C.charAt(k)==="/",B=A!=null&&(A===j||!i&&A.startsWith(j)&&A.charAt(j.length)==="/"),L={isActive:D,isPending:B,isTransitioning:E},P=D?t:void 0,U;typeof s=="function"?U=s(L):U=[s,D?"active":null,B?"pending":null,E?"transitioning":null].filter(
11Boolean).join(" ");let z=typeof l=="function"?l(L):l;return x.createElement(Gt,{...m,"aria-current":P,className:U,ref:g,style:z,to:c,viewTransition:f},typeof h=="function"?h(L):h)});PE.displayName="NavLink";var kD=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:i,state:l,method:c=sd,action:f,onSubmit:h,relative:m,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:b,...w},S)=>{let{useTransitions:_}=x.useContext(Rn),E=PD(),j=LD(f,{relative:m}),C=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&ty.test(f),k=D=>{if(h&&h(D),D.defaultPrevented)return;D.preventDefault();let B=D.nativeEvent.submitter,L=B?.getAttribute("formmethod")||c,P=()=>E(B||D.currentTarget,{fetcherKey:t,method:L,navigate:n,replace:i,state:l,relative:m,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:b});_&&n!==!1?x.startTransition(()=>P()):P()};return x.createElement("form",{ref:S,method:C,action:j,onSubmit:s?h:k,...w,"data-discover":!A&&e==="render"?"true":void 0})});kD.displayName="Form";function RD(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function LE(e){let t=x.useContext(go);return dt(t,RD(e)),t}function OD(e,{target:t,replace:n,mask:s,state:i,preventScrollReset:l,relative:c,viewTransition:f,defaultShouldRevalidate:h,useTransitions:m}={}){let g=sc(),p=On(),b=ac(e,{relative:c}
11);return x.useCallback(w=>{if(uD(w,t)){w.preventDefault();let S=n!==void 0?n:Il(p)===Il(b),_=()=>g(e,{replace:S,mask:s,state:i,preventScrollReset:l,relative:c,viewTransition:f,defaultShouldRevalidate:h});m?x.startTransition(()=>_()):_()}},[p,g,b,n,s,i,t,e,l,c,f,h,m])}var DD=0,MD=()=>`__${String(++DD)}__`;function PD(){let{router:e}=LE("useSubmit"),{basename:t}=x.useContext(Rn),n=QO(),s=e.fetch,i=e.navigate;return x.useCallback(async(l,c={})=>{let{action:f,method:h,encType:m,formData:g,body:p}=hD(l,t);if(c.navigate===!1){let b=c.fetcherKey||MD();await s(b,n,c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:p,formMethod:c.method||h,formEncType:c.encType||m,flushSync:c.flushSync})}else await i(c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:p,formMethod:c.method||h,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[s,i,t,n])}function LD(e,{relative:t}={}){let{basename:n}=x.useContext(Rn),s=x.useContext(Kn);dt(s,"useFormAction must be used inside a RouteContext");let[i]=s.matches.slice(-1),l={...ac(e||".",{relative:t})},c=On();if(e==null){l.search=c.search;let f=new URLSearchParams(l.search),h=f.getAll("index");if(h.some(g=>g==="")){f.delete("index"),h.filter(p=>p).forEach(p=>f.append("index",p));let g=f.toString();l.search=g?`?${g}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:or([n,l.pathname])),Il(l)}function zD(e,{relative:t}={}){let n=x.useContext(jE);dt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=LE("useViewTransitionState"),i=ac(e,{relative:t});if(!n.isTransitioning)return!1;let l=cs(n.currentLocation.pathname,s)||n.currentLocation.pathname,c=cs(n.nextLocation.pathname,s)||n.nextLocation.pathname;return xd(i.pathname,c)!=null||xd(i.pathname,l)!=null}var ic=mE();const zE=fE(ic),ID="modulepreload",BD=function(e){return"/"+e},eS={},UD=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let h=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");i=h(n.map(m=>{if(m=BD(m),m in eS)return;eS[m]=!0;const g=m.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":ID,g||(b.as="script"),b.crossOrigin="",b.href=m,f&&b.setAttribute("nonce",f),document.head.appendChild(b),g)return new Promise((w,S)=>{b.addEventListener("load",w),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return i.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})},Bl=x.createContext({});function nf(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const VD=typeof window<"u",rf=VD?x.useLayoutEffect:x.useEffect,sf=x.createContext(null);function cy(e,t){e.indexOf(t)===-1&&e.push(t)}function Sd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Or=(e,t,n)=>n>t?t:n<e?e:n;let uy=()=>{};const ra={},IE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),BE=e=>typeof e=="object"&&e!==null,UE=e=>/^0[^.\s]+$/u.test(e);function VE(e){let t;return()=>(t===void 0&&(t=e()),t)}const Fn=e=>e,oc=(...e)=>e.reduce((t,n)=>s=>n(t(s))),Ul=(e,t,n)=>{const s=t-e;return s?(n-e)/s:1};class dy{constructor(){this.subscriptions=[]}add(t){return cy(this.subscriptions,t),()=>Sd(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let l=0;l<i;l++){const c=this.subscriptions[l];c&&c(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Nn=e=>e*1e3,qn=e=>e/1e3,$E=(e,t)=>t?e*(1e3/t):0,HE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$D=1e-7,HD=12;function GD(e,t,n,s,i){let l,c,f=0;do c=t+(n-t)/2,l=HE(c,s,i)-e,l>0?n=c:t=c;while(Math.abs(l)>$D&&++f<HD);return c}function lc(e,t,n,s){if(e===t&&n===s)return Fn;const i=l=>GD(l,0,1,e,n);return l=>l===0||l===1?l:HE(i(l),t,s)}const GE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qE=e=>t=>1-e(1-t),FE=lc(.33,1.53,.69,.99),fy=qE(FE),KE=GE(fy),WE=e=>e>=1?1:(e*=2)<1?.5*fy(e):.5*(2-Math.pow(2,-10*(e-1))),hy=e=>1-Math.sin(Math.acos(e)),YE=qE(hy),XE=GE(hy),qD=lc(.42,0,1,1),FD=lc(0,0,.58,1),JE=lc(.42,0,.58,1),KD=e=>Array.isArray(e)&&typeof e[0]!="number",ZE=e=>Array.isArray(e)&&typeof e[0]=="number",WD={linear:Fn,easeIn:qD,easeInOut:JE,easeOut:FD,circIn:hy,circInOut:XE,circOut:YE,backIn:fy,backInOut:KE,backOut:FE,anticipate:WE},YD=e=>typeof e=="string",tS=e=>{if(ZE(e)){uy(e.length===4);const[t,n,s,i]=e;return lc(t,n,s,i)}else if(YD(e))return WD[e];return e},Ru=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function XD(e){let t=new Set,n=new Set,s=!1,i=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function f(m){l.has(m)&&(h.schedule(m),e()),m(c)}const h={schedule:(m,g=!1,p=!1)=>{const w=p&&s?t:n;return g&&l.add(m),w.add(m),m},cancel:m=>{n.delete(m),l.delete(m)},process:m=>{if(c=m,s){i=!0;return}s=!0;const g=t;t=n,n=g,t.forEach(f),t.clear(),s=!1,i&&(i=!1,h.process(m))}};return h}const JD=40;function QE(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Ru.reduce((A,k)=>(A[k]=XD(l),A),{}),{setup:f,read:h,resolveKeyframes:m,preUpdate:g,update:p,preRender:b,render:w,postRender:S}=c,_=()=>{const A=ra.useManualTiming,k=A?i.timestamp:performance.now();n=!1,A||(i.delta=s?1e3/60:Math.max(Math.min(k-i.timestamp,JD),1)),i.timestamp=k,i.isProcessing=!0,f.process(i),h.process(i),m.process(i),g.process(i),p.process(i),b.process(i),w.process(i),S.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(_))},E=()=>{n=!0,s=!0,i.isProcessing||e(_)};return{schedule:Ru.reduce((A,k)=>{const D=c[k];return A[k]=(B,L=!1,P=!1)=>(n||E(),D.schedule(B,L,P)),A},{}),cancel:A=>{for(let k=0;k<Ru.length;k++)c[Ru[k]].cancel(A)},state:i,steps:c}}const{schedule:nt,cancel:sa,state:Ht,steps:lp}=QE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Fn,!0);let id;function ZD(){id=void 0}const rn={now:()=>(id===void 0&&rn.set(Ht.isProcessing||ra.useManualTiming?Ht.timestamp:performance.now()),id),set:e=>{id=e,queueMicrotask(ZD)}},eT=e=>t=>typeof t=="string"&&t.startsWith(e),tT=eT("--"),QD=eT("var(--"),my=e=>QD(e)?eM.test(e.split("/*")[0].trim()):!1,eM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nS(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const vo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Vl={...vo,transform:e=>Or(0,1,e)},Ou={...vo,default:1},Ol=e=>Math.round(e*1e5)/1e5,py=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function tM(e){return e==null}const nM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gy=(e,t)=>n=>!!(typeof n=="string"&&nM.test(n)&&n.startsWith(e)||t&&!tM(n)&&Object.prototype.hasOwnProperty.call(n,t)),nT=(e,t,n)=>s=>
vendor: 89,289 bytes, line 11
11{if(typeof s!="string")return s;const[i,l,c,f]=s.match(py);return{[e]:parseFloat(i),[t]:parseFloat(l),[n]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},rM=e=>Or(0,255,e),cp={...vo,transform:e=>Math.round(rM(e))},$a={test:gy("rgb","red"),parse:nT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+cp.transform(e)+", "+cp.transform(t)+", "+cp.transform(n)+", "+Ol(Vl.transform(s))+")"};function sM(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const rg={test:gy("#"),parse:sM,transform:$a.transform},cc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),as=cc("deg"),kr=cc("%"),ge=cc("px"),aM=cc("vh"),iM=cc("vw"),rS={...kr,parse:e=>kr.parse(e)/100,transform:e=>kr.transform(e*100)},Xi={test:gy("hsl","hue"),parse:nT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+kr.transform(Ol(t))+", "+kr.transform(Ol(n))+", "+Ol(Vl.transform(s))+")"},Ct={test:e=>$a.test(e)||rg.test(e)||Xi.test(e),parse:e=>$a.test(e)?$a.parse(e):Xi.test(e)?Xi.parse(e):rg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$a.transform(e):Xi.transform(e),getAnimatableNone:e=>{const t=Ct.parse(e);return t.alpha=0,Ct.transform(t)}},oM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lM(e){return isNaN(e)&&typeof e=="string"&&(e.match(py)?.length||0)+(e.match(oM)?.length||0)>0}const rT="number",sT="color",cM="var",uM="var(",sS="${}",dM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function oo(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let l=0;const f=t.replace(dM,h=>(Ct.test(h)?(s.color.push(l),i.push(sT),n.push(Ct.parse(h))):h.startsWith(uM)?(s.var.push(l),i.push(cM),n.push(h)):(s.number.push(l),i.push(rT),n.push(parseFloat(h))),++l,sS)).split(sS);return{values:n,split:f,indexes:s,types:i}}function fM(e){return oo(e).values}function aT({split:e,types:t}){const n=e.length;return s=>{let i="";for(let l=0;l<n;l++)if(i+=e[l],s[l]!==void 0){const c=t[l];c===rT?i+=Ol(s[l]):c===sT?i+=Ct.transform(s[l]):i+=s[l]}return i}}function hM(e){return aT(oo(e))}const mM=e=>typeof e=="number"?0:Ct.test(e)?Ct.getAnimatableNone(e):e,pM=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:mM(e);function gM(e){const t=oo(e);return aT(t)(t.values.map((s,i)=>pM(s,t.split[i])))}const lr={test:lM,parse:fM,createTransformer:hM,getAnimatableNone:gM};function up(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yM({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,l=0,c=0;if(!t)i=l=c=n;else{const f=n<.5?n*(1+t):n+t-n*t,h=2*n-f;i=up(h,f,e+1/3),l=up(h,f,e),c=up(h,f,e-1/3)}return{red:Math.round(i*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:s}}function _d(e,t){return n=>n>0?t:e}const st=(e,t,n)=>e+(t-e)*n,dp=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},vM=[rg,$a,Xi],bM=e=>vM.find(t=>t.test(e));function aS(e){const t=bM(e);if(!t)return!1;let n=t.parse(e);return t===Xi&&(n=yM(n)),n}const iS=(e,t)=>{const n=aS(e),s=aS(t);if(!n||!s)return _d(e,t);const i={...n};return l=>(i.red=dp(n.red,s.red,l),i.green=dp(n.green,s.green,l),i.blue=dp(n.blue,s.blue,l),i.alpha=st(n.alpha,s.alpha,l),$a.transform(i))},sg=new Set(["none","hidden"]);function xM(e,t){return sg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function wM(e,t){return n=>st(e,t,n)}function yy(e){return typeof e=="number"?wM:typeof e=="string"?my(e)?_d:Ct.test(e)?iS:EM:Array.isArray(e)?iT:typeof e=="object"?Ct.test(e)?iS:SM:_d}function iT(e,t){const n=[...e],s=n.length,i=e.map((l,c)=>yy(l)(l,t[c]));return l=>{for(let c=0;c<s;c++)n[c]=i[c](l);return n}}function SM(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=yy(e[i])(e[i],t[i]));return i=>{for(const l in s)n[l]=s[l](i);return n}}function _M(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const l=t.types[i],c=e.indexes[l][s[l]],f=e.values[c]??0;n[i]=f,s[l]++}return n}const EM=(e,t)=>{const n=lr.createTransformer(t),s=oo(e),i=oo(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?sg.has(e)&&!i.values.length||sg.has(t)&&!s.values.length?xM(e,t):oc(iT(_M(s,i),i.values),n):_d(e,t)};function oT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?st(e,t,n):yy(e)(e,t)}const TM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>nt.update(t,n),stop:()=>sa(t),now:()=>Ht.isProcessing?Ht.timestamp:rn.now()}},lT=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let l=0;l<i;l++)s+=Math.round(e(l/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ed=2e4;function vy(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ed;)t+=n,s=e.next(t);return t>=Ed?1/0:t}function jM(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(vy(s),Ed);return{type:"keyframes",ease:l=>s.next(i*l).value/t,duration:qn(i)}}const gt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ag(e,t){return e*Math.sqrt(1-t*t)}const CM=12;function AM(e,t,n){let s=n;for(let i=1;i<CM;i++)s=s-e(s)/t(s);return s}const fp=.001;function NM({duration:e=gt.duration,bounce:t=gt.bounce,velocity:n=gt.velocity,mass:s=gt.mass}){let i,l,c=1-t;c=Or(gt.minDamping,gt.maxDamping,c),e=Or(gt.minDuration,gt.maxDuration,qn(e)),c<1?(i=m=>{const g=m*c,p=g*e,b=g-n,w=ag(m,c),S=Math.exp(-p);return fp-b/w*S},l=m=>{const p=m*c*e,b=p*n+n,w=Math.pow(c,2)*Math.pow(m,2)*e,S=Math.exp(-p),_=ag(Math.pow(m,2),c);return(-i(m)+fp>0?-1:1)*((b-w)*S)/_}):(i=m=>{const g=Math.exp(-m*e),p=(m-n)*e+1;return-fp+g*p},l=m=>{const g=Math.exp(-m*e),p=(n-m)*(e*e);return g*p});const f=5/e,h=AM(i,l,f);if(e=Nn(e),isNaN(h))return{stiffness:gt.stiffness,damping:gt.damping,duration:e};{const m=Math.pow(h,2)*s;return{stiffness:m,damping:c*2*Math.sqrt(s*m),duration:e}}}const kM=["duration","bounce"],RM=["stiffness","damping","mass"];function oS(e,t){return t.some(n=>e[n]!==void 0)}function OM(e){let t={velocity:gt.velocity,stiffness:gt.stiffness,damping:gt.damping,mass:gt.mass,isResolvedFromDuration:!1,...e};if(!oS(e,RM)&&oS(e,kM))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,l=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:gt.mass,stiffness:i,damping:l}}else{const n=NM({...e,velocity:0});t={...t,...n,mass:gt.mass},t.isResolvedFromDuration=!0}return t}function Td(e=gt.visualDuration,t=gt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],f={done:!1,value:l},{stiffness:h,damping:m,mass:g,duration:p,velocity:b,isResolvedFromDuration:w}=OM({...n,velocity:-qn(n.velocity||0)}),S=b||0,_=m/(2*Math.sqrt(h*g)),E=c-l,j=qn(Math.sqrt(h/g)),C=Math.abs(E)<5;s||(s=C?gt.restSpeed.granular:gt.restSpeed.default),i||(i=C?gt.restDelta.granular:gt.restDelta.default);let A,k,D,B,L,P;if(_<1)D=ag(j,_),B=(S+_*j*E)/D,A=z=>{const Y=Math.exp(-_*j*z);return c-Y*(B*Math.sin(D*z)+E*Math.cos(D*z))},L=_*j*B+E*D,P=_*j*E-B*D,k=z=>Math.exp(-_*j*z)*(L*Math.sin(D*z)+P*Math.cos(D*z));else if(_===1){A=Y=>c-Math.exp(-j*Y)*(E+(S+j*E)*Y);const z=S+j*E;k=Y=>Math.exp(-j*Y)*(j*z*Y-S)}else{const z=j*Math.sqrt(_*_-1);A=fe=>{const ce=Math.exp(-_*j*fe),M=Math.min(z*fe,300);return c-ce*((S+_*j*E)*Math.sinh(M)+z*E*Math.cosh(M))/z};const Y=(S+_*j*E)/z,se=_*j*Y-E*z,de=_*j*E-Y*z;k=fe=>{const ce=Math.exp(-_*j*fe),M=Math.min(z*fe,300);return ce*(se*Math.sinh(M)+de*Math.cosh(M))}}const U={calculatedDuration:w&&p||null,velocity:z=>Nn(k(z)),next:z=>{if(!w&&_<1){const se=Math.exp(-_*j*z),de=Math.sin(D*z),fe=Math.cos(D*z),ce=c-se*(B*de+E*fe),M=Nn(se*(L*de+P*fe));return f.done=Math.abs(M)<=s&&Math.abs(c-ce)<=i,f.value=f.done?c:ce,f}const Y=A(z);if(w)f.done=z>=p;else{const se=Nn(k(z));f.done=Math.abs(se)<=s&&Math.abs(c-Y)<=i}return f.value=f.done?c:Y,f},toString:()=>{const z=Math.min(vy(U),Ed),Y=lT(se=>U.next(z*se).value,z,30);return z+"ms "+Y},toTransition:()=>{}};return U}Td.applyToOptions=e=>{const t=jM(e,100,Td);return e.ease=t.ease,e.duration=Nn(t.duration),e.type="keyframes",e};const DM=5;function cT(e,t,n){const s=Math.max(t-DM,0);return $E(n-e(s),t-s)}function ig({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:h,restDelta:m=.5,restSpeed:g}){const p=e[0],b={done:!1,value:p},w=P=>f!==void 0&&P<f||h!==void 0&&P>h,S=P=>f===void 0?h:h===void 0||Math.abs(f-P)<Math.abs(h-P)?f:h;let _=n*t;const E=p+_,j=c===void 0?E:c(E);j!==E&&(_=j-p);const C=P=>-_*Math.exp(-P/s),A=P=>j+C(P),k=P=>{const U=C(P),z=A(P);b.done=Math.abs(U)<=m,b.value=b.done?j:z};let D,B;const L=P=>{w(b.value)&&(D=P,B=Td({keyframes:[b.value,S(b.value)],velocity:cT(A,P,b.value),damping:i,stiffness:l,restDelta:m,restSpeed:g}))};return L(0),{calculatedDuration:null,next:P=>{let U=!1;return!B&&D===void 0&&(U=!0,k(P),L(P)),D!==void 0&&P>=D?B.next(P-D):(!U&&k(P),b)}}}function MM(e,t,n){const s=[],i=n||ra.mix||oT,l=e.length-1;for(let c=0;c<l;c++){let f=i(e[c],e[c+1]);if(t){const h=Array.isArray(t)?t[c]||Fn:t;f=oc(h,f)}s.push(f)}return s}function PM(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const l=e.length;if(uy(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=MM(t,s,i),h=f.length,m=g=>{if(c&&g<e[0])return t[0];let p=0;if(h>1)for(;p<e.length-2&&!(g<e[p+1]);p++);const b=Ul(e[p],e[p+1],g);return f[p](b)};return n?g=>m(Or(e[0],e[l-1],g)):m}function LM(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Ul(0,t,s);e.push(st(n,1,i))}}function zM(e){const t=[0];return LM(t,e.length-1),t}function IM(e,t){return e.map(n=>n*t)}function BM(e,t){return e.map(()=>t||JE).splice(0,e.length-1)}function Dl({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=KD(s)?s.map(tS):tS(s),l={done:!1,value:t[0]},c=IM(n&&n.length===t.length?n:zM(t),e),f=PM(c,t,{ease:Array.isArray(i)?i:BM(t,i)});return{calculatedDuration:e,next:h=>(l.value=f(h),l.done=h>=e,l)}}const UM=e=>e!==null;function af(e,{repeat:t,repeatType:n="loop"},s,i=1){const l=e.filter(UM),f=i<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!f||s===void 0?l[f]:s}const VM={decay:ig,inertia:ig,tween:Dl,keyframes:Dl,spring:Td};function uT(e){typeof e.type=="string"&&(e.type=VM[e.type])}class by{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const $M=e=>e/100;class jd extends by{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==rn.now()&&this.tick(rn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;uT(t);const{type:n=Dl,repeat:s=0,repeatDelay:i=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const h=n||Dl;h!==Dl&&typeof f[0]!="number"&&(this.mixKeyframes=oc($M,oT(f[0],f[1])),f=[0,100]);const m=h({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...f].reverse(),velocity:-c})),m.calculatedDuration===null&&(m.calculatedDuration=vy(m));const{calculatedDuration:g}=m;this.calculatedDuration=g,this.resolvedDuration=g+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=m}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:h}=this;if(this.startTime===null)return s.next(0);const{delay:m=0,keyframes:g,repeat:p,repeatType:b,repeatDelay:w,type:S,onUpdate:_,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const j=this.currentTime-m*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?j<0:j>i;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let A=this.currentTime,k=s;if(p){const P=Math.min(this.currentTime,i)/f;let U=Math.floor(P),z=P%1;!z&&P>=1&&(z=1),z===1&&U--,U=Math.min(U,p+1),U%2&&(b==="reverse"?(z=1-z,w&&(z-=w/f)):b==="mirror"&&(k=c)),A=Or(0,1,z)*f}let D;C?(this.delayState.value=g[0],D=this.delayState):D=k.next(A),l&&!C&&(D.value=l(D.value));let{done:B}=D;!C&&h!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return L&&S!==ig&&(D.value=af(g,this.options,E,this.speed)),_&&_(D.value),L&&this.finish(),D}then(t,n){return this.finished.then(t,n)}get duration(){return qn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+qn(t)}get time(){return qn(this.currentTime)}set time(t){t=Nn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return cT(s=>this.generator.next(s).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(rn.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=qn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=TM,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(rn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function HM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ha=e=>e*180/Math.PI,og=e=>{const t=Ha(Math.atan2(e[1],e[0]));return lg(t)},GM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:og,rotateZ:og,skewX:e=>Ha(Math.atan(e[1])),skewY:e=>Ha(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},lg=e=>(e=e%360,e<0&&(e+=360),e),lS=og,cS=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uS=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cS,scaleY:uS,scale:e=>(cS(e)+uS(e))/2,rotateX:e=>lg(Ha(Math.atan2(e[6],e[5]))),rotateY:e=>lg(Ha(Math.atan2(-e[2],e[0]))),rotateZ:lS,rotate:lS,skewX:e=>Ha(Math.atan(e[4])),skewY:e=>Ha(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function cg(e){return e.includes("scale")?1:0}function ug(e,t){if(!e||e==="none")return cg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=qM,i=n;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=GM,i=f}if(!i)return cg(t);const l=s[t],c=i[1].split(",").map(KM);return typeof l=="function"?l(c):c[l]}const FM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ug(n,t)};function KM(e){return parseFloat(e.trim())}const bo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xo=new Set([...bo,"pathRotation"]),dS=e=>e===vo||e===ge,WM=new Set(["x","y","z"]),YM=bo.filter(e=>!WM.has(e));function XM(e){const t=[];return YM.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const ea={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:s})=>{const i=e.max-e.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:s})=>{const i=e.max-e.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ug(t,"x"),y:(e,{transform:t})=>ug(t,"y")};ea.translateX=ea.x;ea.translateY=ea.y;const qa=new Set;let dg=!1,fg=!1,hg=!1;function dT(){if(fg){const e=Array.from(qa).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=XM(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([l,c])=>{s.getValue(l)?.set(c)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}fg=!1,dg=!1,qa.forEach(e=>e.complete(hg)),qa.clear()}function fT(){qa.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fg=!0)})}function JM(){hg=!0,fT(),dT(),hg=!1}class xy{constructor(t,n,s,i,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(qa.add(this),dg||(dg=!0,nt.read(fT),nt.resolveKeyframes(dT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const l=i?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(s&&n){const f=s.readValue(n,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),i&&l===void 0&&i.set(t[0])}HM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qa.delete(this)}cancel(){this.state==="scheduled"&&(qa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ZM=e=>e.startsWith("--");function hT(e,t,n){ZM(t)?e.style.setProperty(t,n):e.style[t]=n}const QM={};function mT(e,t){const n=VE(e);return()=>QM[t]??n()}const eP=mT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),pT=mT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cl=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,fS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cl([0,.65,.55,1]),circOut:Cl([.55,0,1,.45]),backIn:Cl([.31,.01,.66,-.59]),backOut:Cl([.33,1.53,.69,.99])};function gT(e,t){if(e)return typeof e=="function"?pT()?lT(e,t):"ease-out":ZE(e)?Cl(e):Array.isArray(e)?e.map(n=>gT(n,t)||fS.easeOut):fS[e]}function tP(e,t,n,{delay:s=0,duration:i=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:h}={},m=void 0){const g={[t]:n};h&&(g.offset=h);const p=gT(f,i);Array.isArray(p)&&(g.easing=p);const b={delay:s,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return m&&(b.pseudoElement=m),e.animate(g,b)}function yT(e){return typeof e=="function"&&"applyToOptions"in e}function nP({type:e,...t}){return yT(e)&&pT()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vT extends by{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:h}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,uy(typeof t.type!="string");const m=nP(t);this.animation=tP(n,s,i,m,l),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const g=af(i,this.options,f,this.speed);this.updateMotionValue&&this.updateMotionValue(g),hT(n,s,g),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return qn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+qn(t)}get time(){return qn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Nn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&eP()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),Fn):i(this)}}const bT={anticipate:WE,backInOut:KE,circInOut:XE};function rP(e){return e in bT}function sP(e){typeof e.ease=="string"&&rP(e.ease)&&(e.ease=bT[e.ease])}const hp=10;class aP extends vT{constructor(t){sP(t),uT(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:l,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const f=new jd({...c,autoplay:!1}),h=Math.max(hp,rn.now()-this.startTime),m=Or(0,hp,h-hp),g=f.sample(h).value,{name:p}=this.options;l&&p&&hT(l,p,g),n.setWithVelocity(f.sample(Math.max(0,h-m)).value,g,m),f.stop()}}const hS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(lr.test(e)||e==="0")&&!e.startsWith("url("));function iP(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function oP(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=hS(i,t),f=hS(l,t);return!c||!f?!1:iP(e)||(n==="spring"||yT(n))&&s}function mg(e){e.duration=0,e.type="keyframes"}const xT=new Set(["opacity","clipPath","filter","transform"]),lP=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function cP(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&lP.test(e[t]))return!0;return!1}const uP=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),dP=VE(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fP(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:l,type:c,keyframes:f}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=t.owner.getProps();return dP()&&n&&(xT.has(n)||uP.has(n)&&cP(f))&&(n!=="transform"||!g)&&!m&&!s&&i!=="mirror"&&l!==0&&c!=="inertia"}const hP=40;class mP extends by{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:h,motionValue:m,element:g,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=rn.now();const b={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:l,repeatType:c,name:h,motionValue:m,element:g,...p},w=g?.KeyframeResolver||xy;this.keyframeResolver=new w(f,(S,_,E)=>this.onKeyframesResolved(S,_,b,!E),h,m,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:h,isHandoff:m,onUpdate:g}=s;this.resolvedAt=rn.now();let p=!0;oP(t,l,c,f)||(p=!1,(ra.instantAnimations||!h)&&g?.(af(t,s,n)),t[0]=t[t.length-1],mg(s),s.repeat=0);const w={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>hP?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},S=p&&!m&&fP(w),_=w.motionValue?.owner?.current;let E;if(S)try{E=new aP({...w,element:_})}catch{E=new jd(w)}else E=new jd(w);E.finished.then(()=>{this.notifyFinished()}).catch(Fn),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),JM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function wT(e,t,n,s=0,i=1){const l=Array.from(e).sort((m,g)=>m.sortNodePosition(g)).indexOf(t),c=e.size,f=(c-1)*s;return typeof n=="function"?n(l,c):i===1?l*s:f-l*s}const mS=30,pP=e=>!isNaN(parseFloat(e));class gP{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=rn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=rn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=pP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new dy);const s=this.events[t].add(n);return t==="change"?()=>{s(),nt.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=rn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>mS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,mS);return $E(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lo(e,t){return new gP(e,t)}function wy(e,t){if(e?.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Sy(e,t){const n=e?.[t]??e?.default??e;return n!==e?wy(n,e):n}const yP={type:"spring",stiffness:500,damping:25,restSpeed:10},vP=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bP={type:"keyframes",duration:.8},xP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wP=(e,{keyframes:t})=>t.length>2?bP:xo.has(e)?e.startsWith("scale")?vP(t[1]):yP:xP,SP=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function _P(e){for(const t in e)if(!SP.has(t))return!0;return!1}const _y=(e,t,n,s={},i,l)=>c=>{const f=Sy(s,e)||{},h=f.delay||s.delay||0;let{elapsed:m=0}=s;m=m-Nn(h);const g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-m,onUpdate:b=>{t.set(b),f.onUpdate&&f.onUpdate(b)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:i};_P(f)||Object.assign(g,wP(e,g)),g.duration&&(g.duration=Nn(g.duration)),g.repeatDelay&&(g.repeatDelay=Nn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let p=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(mg(g),g.delay===0&&(p=!0)),(ra.instantAnimations||ra.skipAnimations||i?.shouldSkipAnimations||f.skipAnimations)&&(p=!0,mg(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,p&&!l&&t.get()!==void 0){const b=af(g.keyframes,f);if(b!==void 0){nt.update(()=>{g.onUpdate(b),g.onComplete()});return}}return f.isSync?new jd(g):new mP(g)},EP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function TP(e){const t=EP.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}function ST(e,t,n=1){const[s,i]=TP(e);if(!s)return;const l=window.getComputedStyle(t).getPropertyValue(s);if(l){const c=l.trim();return IE(c)?parseFloat(c):c}return my(i)?ST(i,t,n+1):i}function pS(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Ey(e,t,n,s){if(typeof t=="function"){const[i,l]=pS(s);t=t(n!==void 0?n:e.custom,i,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,l]=pS(s);t=t(n!==void 0?n:e.custom,i,l)}return t}function Fa(e,t,n){const s=e.getProps();return Ey(s,t,n!==void 0?n:s.custom,e)}const _T=new Set(["width","height","top","left","right","bottom",...bo]),pg=e=>Array.isArray(e);function jP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,lo(n))}function CP(e){return pg(e)?e[e.length-1]||0:e}function AP(e,t){const n=Fa(e,t);let{transitionEnd:s={},transition:i={},...l}=n||{};l={...l,...s};for(const c in l){const f=CP(l[c]);jP(e,c,f)}}const qt=e=>!!(e&&e.getVelocity);function NP(e){return!!(qt(e)&&e.add)}function gg(e,t){const n=e.getValue("willChange");if(NP(n))return n.add(t);if(!n&&ra.WillChange){const s=new ra.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Ty(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const kP="framerAppearId",ET="data-"+Ty(kP);function TT(e){return e.props[ET]}function RP({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function jT(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:l,transitionEnd:c,...f}=t;const h=e.getDefaultTransition();l=l?wy(l,h):h;const m=l?.reduceMotion,g=l?.skipAnimations;s&&(l=s);const p=[],b=i&&e.animationState&&e.animationState.getState()[i],w=l?.path;w&&w.animateVisualElement(e,f,l,n,p);for(const S in f){const _=e.getValue(S,e.latestValues[S]??null),E=f[S];if(E===void 0||b&&RP(b,S))continue;const j={delay:n,...Sy(l||{},S)};g&&(j.skipAnimations=!0);const C=_.get();if(C!==void 0&&!_.isAnimating()&&!Array.isArray(E)&&E===C&&!j.velocity){nt.update(()=>_.set(E));continue}let A=!1;if(window.MotionHandoffAnimation){const B=TT(e);if(B){const L=window.MotionHandoffAnimation(B,S,nt);L!==null&&(j.startTime=L,A=!0)}}gg(e,S);const k=m??e.shouldReduceMotion;_.start(_y(S,_,E,k&&_T.has(S)?{type:!1}:j,e,A));const D=_.animation;D&&p.push(D)}if(c){const S=()=>nt.update(()=>{c&&AP(e,c)});p.length?Promise.all(p).then(S):S()}return p}function yg(e,t,n={}){const s=Fa(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const l=s?()=>Promise.all(jT(e,s,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:p}=i;return OP(e,t,h,m,g,p,n)}:()=>Promise.resolve(),{when:f}=i;if(f){const[h,m]=f==="beforeChildren"?[l,c]:[c,l];return h().then(()=>m())}else return Promise.all([l(),c(n.delay)])}function OP(e,t,n=0,s=0,i=0,l=1,c){const f=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),f.push(yg(h,t,{...c,delay:n+(typeof s=="function"?0:s)+wT(e.variantChildren,h,s,i,l)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(f)}function DP(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(l=>yg(e,l,n));s=Promise.all(i)}else if(typeof t=="string")s=yg(e,t,n);else{const i=typeof t=="function"?Fa(e,t,n.custom):t;s=Promise.all(jT(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const MP={test:e=>e==="auto",parse:e=>e},CT=e=>t=>t.test(e),AT=[vo,ge,kr,as,iM,aM,MP],gS=e=>AT.find(CT(e));function PP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||UE(e):!0}const LP=new Set(["brightness","contrast","saturate","opacity"]);function zP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(py)||[];if(!s)return e;const i=n.replace(s,"");let l=LP.has(t)?1:0;return s!==n&&(l*=100),t+"("+l+i+")"}const IP=/\b([a-z-]*)\(.*?\)/gu,vg={...lr,getAnimatableNone:e=>{const t=e.match(IP);return t?t.map(zP).join(" "):e}},bg={...lr,getAnimatableNone:e=>{const t=lr.parse(e);return lr.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},yS={...vo,transform:Math.round},BP={rotate:as,pathRotation:as,rotateX:as,rotateY:as,rotateZ:as,scale:Ou,scaleX:Ou,scaleY:Ou,scaleZ:Ou,skew:as,skewX:as,skewY:as,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:Vl,originX:rS,originY:rS,originZ:ge},Cd={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,inset:ge,insetBlock:ge,insetBlockStart:ge,insetBlockEnd:ge,insetInline:ge,insetInlineStart:ge,insetInlineEnd:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,paddingBlock:ge,paddingBlockStart:ge,paddingBlockEnd:ge,paddingInline:ge,paddingInlineStart:ge,paddingInlineEnd:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,marginBlock:ge,marginBlockStart:ge,marginBlockEnd:ge,marginInline:ge,marginInlineStart:ge,marginInlineEnd:ge,fontSize:ge,backgroundPositionX:ge,backgroundPositionY:ge,...BP,zIndex:yS,fillOpacity:Vl,strokeOpacity:Vl,numOctaves:yS},UP={...Cd,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:vg,WebkitFilter:vg,mask:bg,WebkitMask:bg},NT=e=>UP[e],VP=new Set([vg,bg]);function kT(e,t){let n=NT(e);return VP.has(n)||(n=lr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $P=new Set(["auto","none","0"]);function HP(e,t,n){let s=0,i;for(;s<e.length&&!i;){const l=e[s];typeof l=="string"&&!$P.has(l)&&oo(l).values.length&&(i=e[s]),s++}if(i&&n)for(const l of t)e[l]=kT(n,i)}class GP extends xy{constructor(t,n,s,i,l){super(t,n,s,i,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let g=0;g<t.length;g++){let p=t[g];if(typeof p=="string"&&(p=p.trim(),my(p))){const b=ST(p,n.current);b!==void 0&&(t[g]=b),g===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!_T.has(s)||t.length!==2)return;const[i,l]=t,c=gS(i),f=gS(l),h=nS(i),m=nS(l);if(h!==m&&ea[s]){this.needsMeasurement=!0;return}if(c!==f)if(dS(c)&&dS(f))for(let g=0;g<t.length;g++){const p=t[g];typeof p=="string"&&(t[g]=parseFloat(p))}else ea[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||PP(t[i]))&&s.push(i);s.length&&HP(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ea[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const l=s.length-1,c=s[l];s[l]=ea[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,h])=>{t.getValue(f).set(h)}),this.resolveNoneKeyframes()}}const jy=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function RT(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(s=>s!=null)}const xg=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function od(e){return BE(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Cy}=QE(queueMicrotask,!1),nr={x:!1,y:!1};function OT(){return nr.x||nr.y}function qP(e){return e==="x"||e==="y"?nr[e]?null:(nr[e]=!0,()=>{nr[e]=!1}):nr.x||nr.y?null:(nr.x=nr.y=!0,()=>{nr.x=nr.y=!1})}function DT(e,t){const n=RT(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function FP(e){return!(e.pointerType==="touch"||OT())}function KP(e,t,n={}){const[s,i,l]=DT(e,n);return s.forEach(c=>{let f=!1,h=!1,m;const g=()=>{c.removeEventListener("pointerleave",S)},p=E=>{m&&(m(E),m=void 0),g()},b=E=>{f=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),h&&(h=!1,p(E))},w=()=>{f=!0,window.addEventListener("pointerup",b,i),window.addEventListener("pointercancel",b,i)},S=E=>{if(E.pointerType!=="touch"){if(f){h=!0;return}p(E)}},_=E=>{if(!FP(E))return;h=!1;const j=t(c,E);typeof j=="function"&&(m=j,c.addEventListener("pointerleave",S,i))};c.addEventListener("pointerenter",_,i),c.addEventListener("pointerdown",w,i)}),l}const MT=(e,t)=>t?e===t?!0:MT(e,t.parentElement):!1,Ay=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,WP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function YP(e){return WP.has(e.tagName)||e.isContentEditable===!0}const XP=new Set(["INPUT","SELECT","TEXTAREA"]);function JP(e){return XP.has(e.tagName)||e.isContentEditable===!0}const ld=new WeakSet;function vS(e){return t=>{t.key==="Enter"&&e(t)}}function mp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZP=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=vS(()=>{if(ld.has(n))return;mp(n,"down");const i=vS(()=>{mp(n,"up")}),l=()=>mp(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function bS(e){return Ay(e)&&!OT()}const xS=new WeakSet;function QP(e,t,n={}){const[s,i,l]=DT(e,n),c=f=>{const h=f.currentTarget;if(!bS(f)||xS.has(f))return;ld.add(h),n.stopPropagation&&xS.add(f);const m=t(h,f),g={...i,capture:!0},p=(S,_)=>{window.removeEventListener("pointerup",b,g),window.removeEventListener("pointercancel",w,g),ld.has(h)&&ld.delete(h),bS(S)&&typeof m=="function"&&m(S,{success:_})},b=S=>{p(S,h===window||h===document||n.useGlobalTarget||MT(h,S.target))},w=S=>{p(S,!1)};window.addEventListener("pointerup",b,g),window.addEventListener("pointercancel",w,g)};return s.forEach(f=>{(n.useGlobalTarget?window:f).addEventListener("pointerdown",c,i),od(f)&&(f.addEventListener("focus",m=>ZP(m,i)),!YP(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function Ny(e){return BE(e)&&"ownerSVGElement"in e}const cd=new WeakMap;let ud;const PT=(e,t,n)=>(s,i)=>i&&i[0]?i[0][e+"Size"]:Ny(s)&&"getBBox"in s?s.getBBox()[t]:s[n],e5=PT("inline","width","offsetWidth"),t5=PT("block","height","offsetHeight");function n5({target:e,borderBoxSize:t}){cd.get(e)?.forEach(n=>{n(e,{get width(){return e5(e,t)},get height(){return t5(e,t)}})})}function r5(e){e.forEach(n5)}function s5(){typeof ResizeObserver>"u"||(ud=new ResizeObserver(r5))}function a5(e,t){ud||s5();const n=RT(e);return n.forEach(s=>{let i=cd.get(s);i||(i=new Set,cd.set(s,i)),i.add(t),ud?.observe(s)}),()=>{n.forEach(s=>{const i=cd.get(s);i?.delete(t),i?.size||ud?.unobserve(s)})}}const dd=new Set;let Ji;function i5(){Ji=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};dd.forEach(t=>t(e))},window.addEventListener("resize",Ji)}function o5(e){return dd.add(e),Ji||i5(),()=>{dd.delete(e),!dd.size&&typeof Ji=="function"&&(window.removeEventListener("resize",Ji),Ji=void 0)}}function wS(e,t){return typeof e=="function"?o5(e):a5(e,t)}function l5(e){return Ny(e)&&e.tagName==="svg"}const c5=[...AT,Ct,lr],u5=e=>c5.find(CT(e)),SS=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zi=()=>({x:SS(),y:SS()}),_S=()=>({min:0,max:0}),Rt=()=>({x:_S(),y:_S()}),d5=new WeakMap;function of(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function $l(e){return typeof e=="string"||Array.isArray(e)}const ky=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ry=["initial",...ky];function lf(e){return of(e.animate)||Ry.some(t=>$l(e[t]))}function LT(e){return!!(lf(e)||e.variants)}function f5(e,t,n){for(const s in t){const i=t[s],l=n[s];if(qt(i))e.addValue(s,i);else if(qt(l))e.addValue(s,lo(i,{owner:e}));else if(l!==i)if(e.hasValue(s)){const c=e.getValue(s);c.liveStyle===!0?c.jump(i):c.hasAnimated||c.set(i)}else{const c=e.getStaticValue(s);e.addValue(s,lo(c!==void 0?c:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Ad={current:null},Oy={current:!1},h5=typeof window<"u";function zT(){if(Oy.current=!0,!!h5)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ad.current=e.matches;e.addEventListener("change",t),t()}else Ad.current=!1}const ES=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Nd={};function IT(e){Nd=e}function m5(){return Nd}class p5{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:l,blockInitialAnimation:c,visualState:f},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=rn.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,nt.render(this.render,!1,!0))};const{latestValues:m,renderState:g}=f;this.latestValues=m,this.baseTarget={...m},this.initialValues=n.initial?{...m}:{},this.renderState=g,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=l,this.options=h,this.blockInitialAnimation=!!c,this.isControllingVariants=lf(n),this.isVariantNode=LT(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...b}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in b){const S=b[w];m[w]!==void 0&&qt(S)&&S.set(m[w])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,d5.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Oy.current||zT(),this.shouldReduceMotion=Ad.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),sa(this.notifyUpdate),sa(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&xT.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:f,times:h,ease:m,duration:g}=n.accelerate,p=new vT({element:this.current,name:t,keyframes:f,times:h,ease:m,duration:Nn(g)}),b=c(p);this.valueSubscriptions.set(t,()=>{b(),p.cancel()});return}const s=xo.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&nt.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),l&&l()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Nd){const n=Nd[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Rt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ES.length;s++){const i=ES[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const l="on"+i,c=t[l];c&&(this.propEventSubscriptions[i]=this.on(i,c))}this.prevMotionValues=f5(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=lo(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(IE(s)||UE(s))?s=parseFloat(s):!u5(s)&&lr.test(n)&&(s=kT(t,n)),this.setBaseTarget(t,qt(s)?s.get():s)),qt(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const l=Ey(this.props,n,this.presenceContext?.custom);l&&(s=l[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!qt(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new dy),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Cy.render(this.render)}}class BT extends p5{constructor(){super(...arguments),this.KeyframeResolver=GP}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class oa{constructor(t){this.isMounted=!1,this.node=t}update(){}}function UT({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function g5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function y5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function pp(e){return e===void 0||e===1}function wg({scale:e,scaleX:t,scaleY:n}){return!pp(e)||!pp(t)||!pp(n)}function Ua(e){return wg(e)||VT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function VT(e){return TS(e.x)||TS(e.y)}function TS(e){return e&&e!=="0%"}function kd(e,t,n){const s=e-n,i=t*s;return n+i}function jS(e,t,n,s,i){return i!==void 0&&(e=kd(e,i,s)),kd(e,n,s)+t}function Sg(e,t=0,n=1,s,i){e.min=jS(e.min,t,n,s,i),e.max=jS(e.max,t,n,s,i)}function $T(e,{x:t,y:n}){Sg(e.x,t.translate,t.scale,t.originPoint),Sg(e.y,n.translate,n.scale,n.originPoint)}const CS=.999999999999,AS=1.0000000000001;function v5(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let l,c;for(let f=0;f<i;f++){l=n[f],c=l.projectionDelta;const{visualElement:h}=l.options;h&&h.props.style&&h.props.style.display==="contents"||(s&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(jr(e.x,-l.scroll.offset.x),jr(e.y,-l.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,$T(e,c)),s&&Ua(l.latestValues)&&fd(e,l.latestValues,l.layout?.layoutBox))}t.x<AS&&t.x>CS&&(t.x=1),t.y<AS&&t.y>CS&&(t.y=1)}function jr(e,t){e.min+=t,e.max+=t}function NS(e,t,n,s,i=.5){const l=st(e.min,e.max,i);Sg(e,t,n,l,s)}function kS(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function fd(e,t,n){const s=n??e;NS(e.x,kS(t.x,s.x),t.scaleX,t.scale,t.originX),NS(e.y,kS(t.y,s.y),t.scaleY,t.scale,t.originY)}function HT(e,t){return UT(y5(e.getBoundingClientRect(),t))}function b5(e,t,n){const s=HT(e,n),{scroll:i}=t;return i&&(jr(s.x,i.offset.x),jr(s.y,i.offset.y)),s}const x5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w5=bo.length;function S5(e,t,n){let s="",i=!0;for(let c=0;c<w5;c++){const f=bo[c],h=e[f];if(h===void 0)continue;let m=!0;if(typeof h=="number")m=h===(f.startsWith("scale")?1:0);else{const g=parseFloat(h);m=f.startsWith("scale")?g===1:g===0}if(!m||n){const g=xg(h,Cd[f]);if(!m){i=!1;const p=x5[f]||f;s+=`${p}(${g}) `}n&&(t[f]=g)}}const l=e.pathRotation;return l&&(i=!1,s+=`rotate(${xg(l,Cd.pathRotation)}) `),s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Dy(e,t,n){const{style:s,vars:i,transformOrigin:l}=e;let c=!1,f=!1;for(const h in t){const m=t[h];if(xo.has(h)){c=!0;continue}else if(tT(h)){i[h]=m;continue}else{const g=xg(m,Cd[h]);h.startsWith("origin")?(f=!0,l[h]=g):s[h]=g}}if(t.transform||(c||n?s.transform=S5(t,e.transform,n):s.transform&&(s.transform="none")),f){const{originX:h="50%",originY:m="50%",originZ:g=0}=l;s.transformOrigin=`${h} ${m} ${g}`}}function GT(e,{style:t,vars:n},s,i){const l=e.style;let c;for(c in t)l[c]=t[c];i?.applyProjectionStyles(l,s);for(c in n)l.setProperty(c,n[c])}function RS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _l={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=RS(e,t.target.x),s=RS(e,t.target.y);return`${n}% ${s}%`}},_5={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=lr.parse(e);if(i.length>5)return s;const l=lr.createTransformer(e),c=typeof i[0]!="number"?1:0,f=n.x.scale*t.x,h=n.y.scale*t.y;i[0+c]/=f,i[1+c]/=h;const m=st(f,h,.5);return typeof i[2+c]=="number"&&(i[2+c]/=m),typeof i[3+c]=="number"&&(i[3+c]/=m),l(i)}},_g={borderRadius:{..._l,applyTo:[...jy]},borderTopLeftRadius:_l,borderTopRightRadius:_l,borderBottomLeftRadius:_l,borderBottomRightRadius:_l,boxShadow:_5};function qT(e,{layout:t,layoutId:n}){return xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_g[e]||e==="opacity")}function My(e,t,n){const s=e.style,i=t?.style,l={};if(!s)return l;for(const c in s)(qt(s[c])||i&&qt(i[c])||qT(c,e)||n?.getValue(c)?.liveStyle!==void 0)&&(l[c]=s[c]);return l}function E5(e){return window.getComputedStyle(e)}class T5 extends BT{constructor(){super(...arguments),this.type="html",this.renderInstance=GT}readValueFromInstance(t,n){if(xo.has(n))return this.projection?.isProjecting?cg(n):FM(t,n);{const s=E5(t),i=(tT(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return HT(t,n)}build(t,n,s){Dy(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return My(t,n,s)}}const j5={offset:"stroke-dashoffset",array:"stroke-dasharray"},C5={offset:"strokeDashoffset",array:"strokeDasharray"};function A5(e,t,n=1,s=0,i=!0){e.pathLength=1;const l=i?j5:C5;e[l.offset]=`${-s}`,e[l.array]=`${t} ${n}`}const N5=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function FT(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:l=1,pathOffset:c=0,...f},h,m,g){if(Dy(e,f,m),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b}=e;p.transform&&(b.transform=p.transform,delete p.transform),(b.transform||p.transformOrigin)&&(b.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),b.transform&&(b.transformBox=g?.transformBox??"fill-box",delete p.transformBox);for(const w of N5)p[w]!==void 0&&(b[w]=p[w],delete p[w]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),s!==void 0&&(p.scale=s),i!==void 0&&A5(p,i,l,c,!1)}const KT=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),WT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function k5(e,t,n,s){GT(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(KT.has(i)?i:Ty(i),t.attrs[i])}function YT(e,t,n){const s=My(e,t,n);for(const i in e)if(qt(e[i])||qt(t[i])){const l=bo.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[l]=e[i]}return s}class R5 extends BT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Rt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xo.has(n)){const s=NT(n);return s&&s.default||0}return n=KT.has(n)?n:Ty(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return YT(t,n,s)}build(t,n,s){FT(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){k5(t,n,s,i)}mount(t){this.isSVGTag=WT(t.tagName),super.mount(t)}}const O5=Ry.length;function XT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?XT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<O5;n++){const s=Ry[n],i=e.props[s];($l(i)||i===!1)&&(t[s]=i)}return t}function JT(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const D5=[...ky].reverse(),M5=ky.length;function P5(e){return t=>Promise.all(t.map(({animation:n,options:s})=>DP(e,n,s)))}function L5(e){let t=P5(e),n=OS(),s=!0,i=!1;const l=m=>(g,p)=>{const b=Fa(e,p,m==="exit"?e.presenceContext?.custom:void 0);if(b){const{transition:w,transitionEnd:S,..._}=b;g={...g,..._,...S}}return g};function c(m){t=m(e)}function f(m){const{props:g}=e,p=XT(e.parent)||{},b=[],w=new Set;let S={},_=1/0;for(let j=0;j<M5;j++){const C=D5[j],A=n[C],k=g[C]!==void 0?g[C]:p[C],D=$l(k),B=C===m?A.isActive:null;B===!1&&(_=j);let L=k===p[C]&&k!==g[C]&&D;if(L&&(s||i)&&e.manuallyAnimateOnMount&&(L=!1),A.protectedKeys={...S},!A.isActive&&B===null||!k&&!A.prevProp||of(k)||typeof k=="boolean")continue;if(C==="exit"&&A.isActive&&B!==!0){A.prevResolvedValues&&(S={...S,...A.prevResolvedValues});continue}const P=z5(A.prevProp,k);let U=P||C===m&&A.isActive&&!L&&D||j>_&&D,z=!1;const Y=Array.isArray(k)?k:[k];let se=Y.reduce(l(C),{});B===!1&&(se={});const{prevResolvedValues:de={}}=A,fe={...de,...se},ce=X=>{U=!0,w.has(X)&&(z=!0,w.delete(X)),A.needsAnimating[X]=!0;const oe=e.getValue(X);oe&&(oe.liveStyle=!1)};for(const X in fe){const oe=se[X],ee=de[X];if(S.hasOwnProperty(X))continue;let O=!1;pg(oe)&&pg(ee)?O=!JT(oe,ee)||P:O=oe!==ee,O?oe!=null?ce(X):w.add(X):oe!==void 0&&w.has(X)?ce(X):A.protectedKeys[X]=!0}A.prevProp=k,A.prevResolvedValues=se,A.isActive&&(S={...S,...se}),(s||i)&&e.blockInitialAnimation&&(U=!1);const M=L&&P;U&&(!M||z)&&b.push(...Y.map(X=>{const oe={type:C};if(typeof X=="string"&&(s||i)&&!M&&e.manuallyAnimateOnMount&&e.parent){const{parent:ee}=e,O=Fa(ee,X);if(ee.enteringChildren&&O){const{delayChildren:K}=O.transition||{};oe.delay=wT(ee.enteringChildren,e,K)}}return{animation:X,options:oe}}))}if(w.size){const j={};if(typeof g.initial!="boolean"){const C=Fa(e,Array.isArray(g.initial)?g.initial[0]:g.initial);C&&C.transition&&(j.transition=C.transition)}w.forEach(C=>{const A=e.getBaseTarget(C),k=e.getValue(C);k&&(k.liveStyle=!0),j[C]=A??null}),b.push({animation:j})}let E=!!b.length;return s&&(g.initial===!1||g.initial===g.animate)&&!e.manuallyAnimateOnMount&&(E=!1),s=!1,i=!1,E?t(b):Promise.resolve()}function h(m,g){if(n[m].isActive===g)return Promise.resolve();e.variantChildren?.forEach(b=>b.animationState?.setActive(m,g)),n[m].isActive=g;const p=f(m);for(const b in n)n[b].protectedKeys={};return p}return{animateChanges:f,setActive:h,setAnimateFunction:c,getState:()=>n,reset:()=>{n=OS(),i=!0}}}function z5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!JT(t,e):!1}function Pa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function OS(){return{animate:Pa(!0),whileInView:Pa(),whileHover:Pa(),whileTap:Pa(),whileDrag:Pa(),whileFocus:Pa(),exit:Pa()}}function Eg(e,t){e.min=t.min,e.max=t.max}function er(e,t){Eg(e.x,t.x),Eg(e.y,t.y)}function DS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ZT=1e-4,I5=1-ZT,B5=1+ZT,QT=.01,U5=0-QT,V5=0+QT;function sn(e){return e.max-e.min}function $5(e,t,n){return Math.abs(e-t)<=n}function MS(e,t,n,s=.5){e.origin=s,e.originPoint=st(t.min,t.max,e.origin),e.scale=sn(n)/sn(t),e.translate=st(n.min,n.max,e.origin)-e.originPoint,(e.scale>=I5&&e.scale<=B5||isNaN(e.scale))&&(e.scale=1),(e.translate>=U5&&e.translate<=V5||isNaN(e.translate))&&(e.translate=0)}function Ml(e,t,n,s){MS(e.x,t.x,n.x,s?s.originX:void 0),MS(e.y,t.y,n.y,s?s.originY:void 0)}function PS(e,t,n,s=0){const i=s?st(n.min,n.max,s):n.min;e.min=i+t.min,e.max=e.min+sn(t)}function H5(e,t,n,s){PS(e.x,t.x,n.x,s?.x),PS(e.y,t.y,n.y,s?.y)}function LS(e,t,n,s=0){const i=s?st(n.min,n.max,s):n.min;e.min=t.min-i,e.max=e.min+sn(t)}function Rd(e,t,n,s){LS(e.x,t.x,n.x,s?.x),LS(e.y,t.y,n.y,s?.y)}function zS(e,t,n,s,i){return e-=t,e=kd(e,1/n,s),i!==void 0&&(e=kd(e,1/i,s)),e}function G5(e,t=0,n=1,s=.5,i,l=e,c=e){if(kr.test(t)&&(t=parseFloat(t),t=st(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=st(l.min,l.max,s);e===l&&(f-=t),e.min=zS(e.min,t,n,f,i),e.max=zS(e.max,t,n,f,i)}function IS(e,t,[n,s,i],l,c){G5(e,t[n],t[s],t[i],t.scale,l,c)}const q5=["x","scaleX","originX"],F5=["y","scaleY","originY"];function BS(e,t,n,s){IS(e.x,t,q5,n?n.x:void 0,s?s.x:void 0),IS(e.y,t,F5,n?n.y:void 0,s?s.y:void 0)}function US(e){return e.translate===0&&e.scale===1}function ej(e){return US(e.x)&&US(e.y)}function VS(e,t){return e.min===t.min&&e.max===t.max}function K5(e,t){return VS(e.x,t.x)&&VS(e.y,t.y)}function $S(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tj(e,t){return $S(e.x,t.x)&&$S(e.y,t.y)}function HS(e){return sn(e.x)/sn(e.y)}function GS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Er(e){return[e("x"),e("y")]}function W5(e,t,n){let s="";const i=e.x.translate/t.x,l=e.y.translate/t.y,c=n?.z||0;if((i||l||c)&&(s=`translate3d(${i}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:m,rotate:g,pathRotation:p,rotateX:b,rotateY:w,skewX:S,skewY:_}=n;m&&(s=`perspective(${m}px) ${s}`),g&&(s+=`rotate(${g}deg) `),p&&(s+=`rotate(${p}deg) `),b&&(s+=`rotateX(${b}deg) `),w&&(s+=`rotateY(${w}deg) `),S&&(s+=`skewX(${S}deg) `),_&&(s+=`skewY(${_}deg) `)}const f=e.x.scale*t.x,h=e.y.scale*t.y;return(f!==1||h!==1)&&(s+=`scale(${f}, ${h})`),s||"none"}const Y5=jy.length,qS=e=>typeof e=="string"?parseFloat(e):e,FS=e=>typeof e=="number"||ge.test(e);function X5(e,t,n,s,i,l){i?(e.opacity=st(0,n.opacity??1,J5(s)),e.opacityExit=st(t.opacity??1,0,Z5(s))):l&&(e.opacity=st(t.opacity??1,n.opacity??1,s));for(let c=0;c<Y5;c++){const f=jy[c];let h=KS(t,f),m=KS(n,f);if(h===void 0&&m===void 0)continue;h||(h=0),m||(m=0),h===0||m===0||FS(h)===FS(m)?(e[f]=Math.max(st(qS(h),qS(m),s),0),(kr.test(m)||kr.test(h))&&(e[f]+="%")):e[f]=m}(t.rotate||n.rotate)&&(e.rotate=st(t.rotate||0,n.rotate||0,s))}function KS(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const J5=nj(0,.5,YE),Z5=nj(.5,.95,Fn);function nj(e,t,n){return s=>s<e?0:s>t?1:n(Ul(e,t,s))}function Q5(e,t,n){const s=qt(e)?e:lo(e);return s.start(_y("",s,t,n)),s.animation}function Hl(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)}const eL=(e,t)=>e.depth-t.depth;class tL{constructor(){this.children=[],this.isDirty=!1}add(t){cy(this.children,t),this.isDirty=!0}remove(t){Sd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eL),this.isDirty=!1,this.children.forEach(t)}}function nL(e,t){const n=rn.now(),s=({timestamp:i})=>{const l=i-n;l>=t&&(sa(s),e(l-t))};return nt.setup(s,!0),()=>sa(s)}function hd(e){return qt(e)?e.get():e}class rL{constructor(){this.members=[]}add(t){cy(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Sd(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(Sd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:l}=t.options;(i===void 0||i!==l)&&(t.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const md={hasAnimatedSinceResize:!0,hasEverUpdated:!1},gp=["","X","Y","Z"],sL=1e3;let aL=0;function yp(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function rj(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=TT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",nt,!(i||l))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&rj(s)}function sj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(c={},f=t?.()){this.id=aL++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(lL),this.nodes.forEach(mL),this.nodes.forEach(pL),this.nodes.forEach(cL)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new tL)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new dy),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const h=this.eventHandlers.get(c);h&&h.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=Ny(c)&&!l5(c),this.instance=c;const{layoutId:f,layout:h,visualElement:m}=this.options;if(m&&!m.current&&m.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||f)&&(this.isLayoutDirty=!0),e){let g,p=0;const b=()=>this.root.updateBlockedByResize=!1;nt.read(()=>{p=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==p&&(p=w,this.root.updateBlockedByResize=!0,g&&g(),g=nL(b,250),md.hasAnimatedSinceResize&&(md.hasAnimatedSinceResize=!1,this.nodes.forEach(XS)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&m&&(f||h)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:p,hasRelativeLayoutChanged:b,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||m.getDefaultTransition()||xL,{onLayoutAnimationStart:_,onLayoutAnimationComplete:E}=m.getProps(),j=!this.targetLayout||!tj(this.targetLayout,w),C=!p&&b;if(this.options.layoutRoot||this.resumeFrom||C||p&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...Sy(S,"layout"),onPlay:_,onComplete:E};(m.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(g,C,A.path)}else p||XS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),sa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gL),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const p=this.path[g];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:f,layout:h}=this.options;if(f===void 0&&!h)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(dL),this.nodes.forEach(WS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(YS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(fL),this.nodes.forEach(hL),this.nodes.forEach(iL),this.nodes.forEach(oL)):this.nodes.forEach(YS),this.clearAllSnapshots();const f=rn.now();Ht.delta=Or(0,1e3/60,f-Ht.timestamp),Ht.timestamp=f,Ht.isProcessing=!0,lp.update.process(Ht),lp.preRender.process(Ht),lp.render.process(Ht),Ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(uL),this.sharedNodes.forEach(yL)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!sn(this.snapshot.measuredBox.x)&&!sn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Rt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const h=s(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!i)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!ej(this.projectionDelta),h=this.getTransformTemplate(),m=h?h(this.latestValues,""):void 0,g=m!==this.prevTransformTemplateValue;c&&this.instance&&(f||Ua(this.latestValues)||g)&&(i(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let h=this.removeElementScroll(f);return c&&(h=this.removeTransform(h)),wL(h),{animationId:this.root.animationId,measuredBox:f,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Rt();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(SL))){const{scroll:m}=this.root;m&&(jr(f.x,m.offset.x),jr(f.y,m.offset.y))}return f}removeElementScroll(c){const f=Rt();if(er(f,c),this.scroll?.wasRoot)return f;for(let h=0;h<this.path.length;h++){const m=this.path[h],{scroll:g,options:p}=m;m!==this.root&&g&&p.layoutScroll&&(g.wasRoot&&er(f,c),jr(f.x,g.offset.x),jr(f.y,g.offset.y))}return f}applyTransform(c,f=!1,h){const m=h||Rt();er(m,c);for(let g=0;g<this.path.length;g++){const p=this.path[g];!f&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(jr(m.x,-p.scroll.offset.x),jr(m.y,-p.scroll.offset.y)),Ua(p.latestValues)&&fd(m,p.latestValues,p.layout?.layoutBox)}return Ua(this.latestValues)&&fd(m,this.latestValues,this.layout?.layoutBox),m}removeTransform(c){const f=Rt();er(f,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];if(!Ua(m.latestValues))continue;let g;m.instance&&(wg(m.latestValues)&&m.updateSnapshot(),g=Rt(),er(g,m.measurePageBox())),BS(f,m.latestValues,m.snapshot?.layoutBox,g)}return Ua(this.latestValues)&&BS(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==f;if(!(c||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:p}=this.options;if(!this.layout||!(g||p))return;this.resolvedRelativeTargetAt=Ht.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Rt(),this.targetWithTransforms=Rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),H5(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):er(this.target,this.layout.layoutBox),$T(this.target,this.targetDelta)):er(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||wg(this.parent.latestValues)||VT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,h){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Rt(),this.relativeTargetOrigin=Rt(),Rd(this.relativeTargetOrigin,f,h,this.options.layoutAnchor||void 0),er(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Ht.timestamp&&(h=!1),h)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;er(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;v5(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Rt());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(DS(this.prevProjectionDelta.x,this.projectionDelta.x),DS(this.prevProjectionDelta.y,this.projectionDelta.y)),Ml(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!GS(this.projectionDelta.x,this.prevProjectionDelta.x)||!GS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zi(),this.projectionDelta=Zi(),this.projectionDeltaWithTransform=Zi()}setAnimationOrigin(c,f=!1,h){const m=this.snapshot,g=m?m.latestValues:{},p={...this.latestValues},b=Zi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const w=Rt(),S=m?m.source:void 0,_=this.layout?this.layout.source:void 0,E=S!==_,j=this.getStack(),C=!j||j.members.length<=1,A=!!(E&&!C&&this.options.crossfade===!0&&!this.path.some(bL));this.animationProgress=0;let k;const D=h?.interpolateProjection(c);this.mixTargetDelta=B=>{const L=B/1e3,P=D?.(L);P?(b.x.translate=P.x,b.x.scale=st(c.x.scale,1,L),b.x.origin=c.x.origin,b.x.originPoint=c.x.originPoint,b.y.translate=P.y,b.y.scale=st(c.y.scale,1,L),b.y.origin=c.y.origin,b.y.originPoint=c.y.originPoint):(JS(b.x,c.x,L),JS(b.y,c.y,L)),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rd(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),vL(this.relativeTarget,this.relativeTargetOrigin,w,L),k&&K5(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Rt()),er(k,this.relativeTarget)),E&&(this.animationValues=p,X5(p,g,this.latestValues,L,A,C)),P&&P.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(sa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nt.update(()=>{md.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=lo(0)),this.motionValue.jump(0,!1),this.currentAnimation=Q5(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:h,layout:m,latestValues:g}=c;if(!(!f||!h||!m)){if(this!==c&&this.layout&&m&&aj(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||Rt();const p=sn(this.layout.layoutBox.x);h.x.min=c.target.x.min,h.x.max=h.x.min+p;const b=sn(this.layout.layoutBox.y);h.y.min=c.target.y.min,h.y.max=h.y.min+b}er(f,h),fd(f,g),Ml(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new rL),this.sharedNodes.get(c).add(f);const m=f.options.initialPromotionConfig;f.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:h}=c;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(f=!0),!f)return;const m={};h.z&&yp("z",c,m,this.animationValues);for(let g=0;g<gp.length;g++)yp(`rotate${gp[g]}`,c,m,this.animationValues),yp(`skew${gp[g]}`,c,m,this.animationValues);c.render();for(const g in m)c.setStaticValue(g,m[g]),this.animationValues&&(this.animationValues[g]=m[g]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=hd(f?.pointerEvents)||"",c.transform=h?h(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=hd(f?.pointerEvents)||""),this.hasProjected&&!Ua(this.latestValues)&&(c.transform=h?h({},""):"none",this.hasProjected=!1);return}c.visibility="";const g=m.animationValues||m.latestValues;this.applyTransformsToTarget();let p=W5(this.projectionDeltaWithTransform,this.treeScale,g);h&&(p=h(g,p)),c.transform=p;const{x:b,y:w}=this.projectionDelta;c.transformOrigin=`${b.origin*100}% ${w.origin*100}% 0`,m.animationValues?c.opacity=m===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:c.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const S in _g){if(g[S]===void 0)continue;const{correct:_,applyTo:E,isCSSVariable:j}=_g[S],C=p==="none"?g[S]:_(g[S],m);if(E){const A=E.length;for(let k=0;k<A;k++)c[E[k]]=C}else j?this.options.visualElement.renderState.vars[S]=C:c[S]=C}this.options.layoutId&&(c.pointerEvents=m===this?hd(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(WS),this.root.sharedNodes.clear()}}}function iL(e){e.updateLayout()}function oL(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,l=t.source!==e.layout.source;if(i==="size")Er(g=>{const p=l?t.measuredBox[g]:t.layoutBox[g],b=sn(p);p.min=n[g].min,p.max=p.min+b});else if(i==="x"||i==="y"){const g=i==="x"?"y":"x";Eg(l?t.measuredBox[g]:t.layoutBox[g],n[g])}else aj(i,t.layoutBox,n)&&Er(g=>{const p=l?t.measuredBox[g]:t.layoutBox[g],b=sn(n[g]);p.max=p.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+b)});const c=Zi();Ml(c,n,t.layoutBox);const f=Zi();l?Ml(f,e.applyTransform(s,!0),t.measuredBox):Ml(f,n,t.layoutBox);const h=!ej(c);let m=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:p,layout:b}=g;if(p&&b){const w=e.options.layoutAnchor||void 0,S=Rt();Rd(S,t.layoutBox,p.layoutBox,w);const _=Rt();Rd(_,n,b.layoutBox,w),tj(S,_)||(m=!0),g.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=S,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function lL(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cL(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function uL(e){e.clearSnapshot()}function WS(e){e.clearMeasurements()}function dL(e){e.isLayoutDirty=!0,e.updateLayout()}function YS(e){e.isLayoutDirty=!1}function fL(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function hL(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function XS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mL(e){e.resolveTargetDelta()}function pL(e){e.calcProjection()}
11function gL(e){e.resetSkewAndRotation()}function yL(e){e.removeLeadSnapshot()}function JS(e,t,n){e.translate=st(t.translate,0,n),e.scale=st(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ZS(e,t,n,s){e.min=st(t.min,n.min,s),e.max=st(t.max,n.max,s)}function vL(e,t,n,s){ZS(e.x,t.x,n.x,s),ZS(e.y,t.y,n.y,s)}function bL(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xL={duration:.45,ease:[.4,0,.1,1]},QS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),e1=QS("applewebkit/")&&!QS("chrome/")?Math.round:Fn;function t1(e){e.min=e1(e.min),e.max=e1(e.max)}function wL(e){t1(e.x),t1(e.y)}function aj(e,t,n){return e==="position"||e==="preserve-aspect"&&!$5(HS(t),HS(n),.2)}function SL(e){return e!==e.root&&e.scroll?.wasRoot}const _L=sj({attachResizeListener:(e,t)=>Hl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),EL=e=>!e.isLayoutDirty&&e.willUpdate(!1);function n1(){const e=new Set,t=new WeakMap,n=()=>e.forEach(EL);return{add:s=>{e.add(s),t.set(s,s.addEventListener("willUpdate",n))},remove:s=>{e.delete(s);const i=t.get(s);i&&(i(),t.delete(s)),n()},dirty:n}}const vp={current:void 0},ij=sj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vp.current){const e=new _L({});e.mount(window),e.setOptions({layoutScroll:!0}),vp.current=e}return vp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Gl=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function r1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function TL(...e){return t=>{let n=!1;const s=e.map(i=>{const l=r1(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<s.length;i++){const l=s[i];typeof l=="function"?l():r1(e[i],null)}}}}function jL(...e){return x.useCallback(TL(...e),e)}class CL extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(od(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=od(s)&&s.offsetWidth||0,l=od(s)&&s.offsetHeight||0,c=getComputedStyle(n),f=this.props.sizeRef.current;f.height=parseFloat(c.height),f.width=parseFloat(c.width),f.top=n.offsetTop,f.left=n.offsetLeft,f.right=i-f.width-f.left,f.bottom=l-f.height-f.top,f.direction=c.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function AL({children:e,isPresent:t,anchorX:n,anchorY:s,root:i,pop:l}){const c=x.useId(),f=x.useRef(null),h=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=x.useContext(Gl),g=e.props?.ref??e?.ref,p=jL(f,g);return x.useInsertionEffect(()=>{const{width:b,height:w,top:S,left:_,right:E,bottom:j,direction:C}=h.current;if(t||l===!1||!f.current||!b||!w)return;const A=C==="rtl",k=n==="left"?A?`right: ${E}`:`left: ${_}`:A?`left: ${_}`:`right: ${E}`,D=s==="bottom"?`bottom: ${j}`:`top: ${S}`;f.current.dataset.motionPopId=c;const B=document.createElement("style");m&&(B.nonce=m);const L=i??document.head;return L.appendChild(B),B.sheet&&B.sheet.insertRule(`
12          [data-motion-pop-id="${c}"] {
13            position: absolute !important;
14            width: ${b}px !important;
15            height: ${w}px !important;
16            ${k}px !important;
17            ${D}px !important;
18          }
19        `),()=>{f.current?.removeAttribute("data-motion-pop-id"),L.contains(B)&&L.removeChild(B)}},[t]),u.jsx(CL,{isPresent:t,childRef:f,sizeRef:h,pop:l,children:l===!1?e:x.cloneElement(e,{ref:p})})}const NL=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:l,mode:c,anchorX:f,anchorY:h,root:m})=>{const g=nf(kL),p=x.useId(),b=x.useRef(n),w=x.useRef(s);rf(()=>{b.current=n,w.current=s});let S=!0,_=x.useMemo(()=>(S=!1,{id:p,initial:t,isPresent:n,custom:i,onExitComplete:E=>{g.set(E,!0);for(const j of g.values())if(!j)return;s&&s()},register:E=>(g.set(E,!1),()=>{g.delete(E),!b.current&&!g.size&&w.current?.()})}),[n,g,s]);return l&&S&&(_={..._}),x.useMemo(()=>{g.forEach((E,j)=>g.set(j,!1))},[n]),x.useEffect(()=>{!n&&!g.size&&s&&s()},[n]),e=u.jsx(AL,{pop:c==="popLayout",isPresent:n,anchorX:f,anchorY:h,root:m,children:e}),u.jsx(sf.Provider,{value:_,children:e})};function kL(){return new Map}function oj(e=!0){const t=x.useContext(sf);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,l=x.useId();x.useEffect(()=>{if(e)return i(l)},[e]);const c=x.useCallback(()=>e&&s&&s(l),[l,s,e]);return!n&&s?[!1,c]:[!0]}const Du=e=>e.key||"";function s1(e){const t=[];
19return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const RL=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:l="sync",propagate:c=!1,anchorX:f="left",anchorY:h="top",root:m})=>{const[g,p]=oj(c),b=x.useMemo(()=>s1(e),[e]),w=c&&!g?[]:b.map(Du),S=x.useRef(!0),_=x.useRef(b),E=nf(()=>new Map),j=x.useRef(new Set),[C,A]=x.useState(b),[k,D]=x.useState(b);rf(()=>{S.current=!1,_.current=b;for(let P=0;P<k.length;P++){const U=Du(k[P]);w.includes(U)?(E.delete(U),j.current.delete(U)):E.get(U)!==!0&&E.set(U,!1)}},[k,w.length,w.join("-")]);const B=[];if(b!==C){let P=[...b];for(let U=0;U<k.length;U++){const z=k[U],Y=Du(z);w.includes(Y)||(P.splice(U,0,z),B.push(z))}return l==="wait"&&B.length&&(P=B),D(s1(P)),A(b),null}const{forceRender:L}=x.useContext(Bl);return u.jsx(u.Fragment,{children:k.map(P=>{const U=Du(P),z=c&&!g?!1:b===k||w.includes(U),Y=()=>{if(j.current.has(U))return;if(E.has(U))j.current.add(U),E.set(U,!0);else return;let se=!0;E.forEach(de=>{de||(se=!1)}),se&&(L?.(),D(_.current),c&&p?.(),s&&s())};return u.jsx(NL,{isPresent:z,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:l,root:m,onExitComplete:z?void 0:Y,anchorX:f,anchorY:h,children:P},U)})})},OL=x.createContext(null);function DL(){const e=x.useRef(!1);return rf(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ML(){const e=DL(),[t,n]=x.useState(0),s=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>nt.postRender(s),[s]),t]}const lj=e=>e===!0,PL=e=>lj(e===!0)||e==="id",LL=({children:e,id:t,inherit:n=!0})=>{const s=x.useContext(Bl),i=x.useContext(OL),[l,c]=ML(),f=x.useRef(null),h=s.id||i;f.current===null&&(PL(n)&&h&&(t=t?h+"-"+t:h),f.current={id:t,group:lj(n)&&s.group||n1()});const m=x.useMemo(()=>({...f.current,forceRender:l}),[c]);return u.jsx(Bl.Provider,{value:m,children:e})},cj=x.createContext({strict:!1}),a1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let i1=!1;function zL(){if(i1)return;const e={};for(const t in a1)e[t]={isEnabled:n=>a1[t].some(s=>!!n[s])};IT(e),i1=!0}function uj(){return zL(),m5()}function IL(e){const t=uj();for(const n in e)t[n]={...t[n],...e[n]};IT(t)}const BL=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Od(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||BL.has(e)}let dj=e=>!Od(e);function fj(e){typeof e=="function"&&(dj=t=>t.startsWith("on")?!Od(t):e(t))}try{fj(require("@emotion/is-prop-valid").default)}catch{}function UL(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||qt(e[i])||(dj(i)||n===!0&&Od(i)||!t&&!Od(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}function hj({children:e,isValidProp:t,...n}){t&&fj(t);const s=x.useContext(Gl);n={...s,...n},n.transition=wy(n.transition,s.transition),n.isStatic=nf(()=>n.isStatic);const i=x.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return u.jsx(Gl.Provider,{value:i,children:e})}const cf=x.createContext({});function VL(e,t){if(lf(e)){const{initial:n,animate:s}=e;return{initial:n===!1||$l(n)?n:void 0,animate:$l(s)?s:void 0}}return e.inherit!==!1?t:{}}function $L(e){const{initial:t,animate:n}=VL(e,x.useContext(cf));return x.useMemo(()=>({initial:t,animate:n}),[o1(t),o1(n)])}function o1(e){return Array.isArray(e)?e.join(" "):e}const Py=()=>({style:{},transform:{},transformOrigin:{},vars:{}});
vendor: 12,168 bytes, line 19
19function mj(e,t,n){for(const s in t)!qt(t[s])&&!qT(s,n)&&(e[s]=t[s])}function HL({transformTemplate:e},t){return x.useMemo(()=>{const n=Py();return Dy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function GL(e,t){const n=e.style||{},s={};return mj(s,n,e),Object.assign(s,HL(e,t)),s}function qL(e,t){const n={},s=GL(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const pj=()=>({...Py(),attrs:{}});function FL(e,t,n,s){const i=x.useMemo(()=>{const l=pj();return FT(l,t,WT(s),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};mj(l,e.style,e),i.style={...l,...i.style}}return i}const KL=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ly(e){return typeof e!="string"||e.includes("-")?!1:!!(KL.indexOf(e)>-1||/[A-Z]/u.test(e))}function WL(e,t,n,{latestValues:s},i,l=!1,c){const h=(c??Ly(e)?FL:qL)(t,s,i,e),m=UL(t,typeof e=="string",l),g=e!==x.Fragment?{...m,...h,ref:n}:{},{children:p}=t,b=x.useMemo(()=>qt(p)?p.get():p,[p]);return x.createElement(e,{...g,children:b})}function YL({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:XL(n,s,i,e),renderState:t()}}function XL(e,t,n,s){const i={},l=s(e,{});for(const b in l)i[b]=hd(l[b]);let{initial:c,animate:f}=e;const h=lf(e),m=LT(e);t&&m&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let g=n?n.initial===!1:!1;g=g||c===!1;const p=g?f:c;if(p&&typeof p!="boolean"&&!of(p)){const b=Array.isArray(p)?p:[p];for(let w=0;w<b.length;w++){const S=Ey(e,b[w]);if(S){const{transitionEnd:_,transition:E,...j}=S;for(const C in j){let A=j[C];if(Array.isArray(A)){const k=g?A.length-1:0;A=A[k]}A!==null&&(i[C]=A)}for(const C in _)i[C]=_[C]}}}return i}const gj=e=>(t,n)=>{const s=x.useContext(cf),i=x.useContext(sf),l=()=>YL(e,t,s,i);return n?l():nf(l)},JL=gj({scrapeMotionValuesFromProps:My,createRenderState:Py}),ZL=gj({scrapeMotionValuesFromProps:YT,createRenderState:pj}),QL=Symbol.for("motionComponentSymbol");function e3(e,t,n){const s=x.useRef(n);x.useInsertionEffect(()=>{s.current=n});const i=x.useRef(null);return x.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const c=s.current;if(typeof c=="function")if(l){const f=c(l);typeof f=="function"&&(i.current=f)}else i.current?(i.current(),i.current=null):c(l);else c&&(c.current=l)},[t])}const yj=x.createContext({});function Fi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function t3(e,t,n,s,i,l){const{visualElement:c}=x.useContext(cf),f=x.useContext(cj),h=x.useContext(sf),m=x.useContext(Gl),g=m.reducedMotion,p=m.skipAnimations,b=x.useRef(null),w=x.useRef(!1);s=s||f.renderer,!b.current&&s&&(b.current=s(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:g,skipAnimations:p,isSVG:l}),w.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const S=b.current,_=x.useContext(yj);S&&!S.projection&&i&&(S.type==="html"||S.type==="svg")&&n3(b.current,n,i,_);const E=x.useRef(!1);x.useInsertionEffect(()=>{S&&E.current&&S.update(n,h)});const j=n[ET],C=x.useRef(!!j&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(j)&&window.MotionHasOptimisedAnimation?.(j));return rf(()=>{w.current=!0,S&&(E.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),C.current&&S.animationState&&S.animationState.animateChanges())}),x.useEffect(()=>{S&&(!C.current&&S.animationState&&S.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(j)}),C.current=!1),S.enteringChildren=void 0)}),S}function n3(e,t,n,s){const{layoutId:i,layout:l,drag:c,dragConstraints:f,layoutScroll:h,layoutRoot:m,layoutAnchor:g,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vj(e.parent)),e.projection.setOptions({layoutId:i,layout:l,alwaysMeasureLayout:!!c||f&&Fi(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,crossfade:p,layoutScroll:h,layoutRoot:m,layoutAnchor:g})}function vj(e){if(e)return e.options.allowProjection!==!1?e.projection:vj(e.parent)}function bp(e,{forwardMotionProps:t=!1,type:n}={},s,i){s&&IL(s);const l=n?n==="svg":Ly(e),c=l?ZL:JL;function f(m,g){let p;const b={...x.useContext(Gl),...m,layoutId:r3(m)},{isStatic:w}=b,S=$L(m),_=c(m,w);if(!w&&typeof window<"u"){s3();const E=a3(b);p=E.MeasureLayout,S.visualElement=t3(e,_,b,i,E.ProjectionNode,l)}return u.jsxs(cf.Provider,{value:S,children:[p&&S.visualElement?u.jsx(p,{visualElement:S.visualElement,...b}):null,WL(e,m,e3(_,S.visualElement,g),_,w,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=x.forwardRef(f);return h[QL]=e,h}function r3({layoutId:e}){const t=x.useContext(Bl).id;return t&&e!==void 0?t+"-"+e:e}function s3(e,t){x.useContext(cj).strict}function a3(e){const t=uj(),{drag:n,layout:s}=t;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(e)||s?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function i3(e,t){if(typeof Proxy>"u")return bp;const n=new Map,s=(l,c)=>bp(l,c,e,t),i=(l,c)=>s(l,c);return new Proxy(i,{get:(l,c)=>c==="create"?s:(n.has(c)||n.set(c,bp(c,void 0,e,t)),n.get(c))})}const o3=(e,t)=>t.isSVG??Ly(e)?new R5(t):new T5(t,{allowProjection:e!==x.Fragment});class l3 extends oa{constructor(t){super(t),t.animationState||(t.animationState=L5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();of(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let c3=0;class u3 extends oa{constructor(){super(...arguments),this.id=c3++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&s===!1){if(this.isExitComplete){const{initial:l,custom:c}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const f=Fa(this.node,l,c);if(f){const{transition:h,transitionEnd:m,...g}=f;for(const p in g)this.node.getValue(p)?.jump(g[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const d3={animation:{Feature:l3},exit:{Feature:u3}};function uc(e){return{point:{x:e.pageX,y:e.pageY}}}const f3=e=>t=>Ay(t)&&e(t,uc(t));function Pl(e,t,n,s){return Hl(e,t,f3(n),s)}const bj=({current:e})=>e?e.ownerDocument.defaultView:null,l1=(e,t)=>Math.abs(e-t);function h3(e,t){const n=l1(e.x,t.x),s=l1(e.y,t.y);return Math.sqrt(n**2+s**2)}const c1=new Set(["auto","scroll"]);class xj{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Mu(this.lastRawMoveEventInfo,this.transformPagePoint));const S=xp(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,E=h3(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!E)return;const{point:j}=S,{timestamp:C}=Ht;this.history.push({...j,timestamp:C});const{onStart:A,onMove:k}=this.handlers;_||(A&&A(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,S)},this.handlePointerMove=(S,_)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=_,this.lastMoveEventInfo=Mu(_,this.transformPagePoint),nt.update(this.updatePoint,!0)},this.handlePointerUp=(S,_)=>{this.end();const{onEnd:E,onSessionEnd:j,resumeAnimation:C}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=xp(S.type==="pointercancel"?this.lastMoveEventInfo:Mu(_,this.transformPagePoint),this.history);this.startEvent&&E&&E(S,A),j&&j(S,A)},!Ay(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=c,this.contextWindow=i||window;const h=uc(t),m=Mu(h,this.transformPagePoint),{point:g}=m,{timestamp:p}=Ht;this.history=[{...g,timestamp:p}];const{onSessionStart:b}=n;b&&b(t,xp(m,this.history));const w={passive:!0,capture:!0};this.removeListeners=oc(Pl(this.contextWindow,"pointermove",this.handlePointerMove,w),Pl(this.contextWindow,"pointerup",this.handlePointerUp,w),Pl(this.contextWindow,"pointercancel",this.handlePointerUp,w)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(c1.has(s.overflowX)||c1.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:i.x-n.x,y:i.y-n.y};l.x===0&&l.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,i),nt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),sa(this.updatePoint)}}function Mu(e,t){return t?{point:t(e.point)}:e}function u1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xp({point:e},t){return{point:e,delta:u1(e,wj(t)),offset:u1(e,m3(t)),velocity:p3(t,.1)}}function m3(e){return e[0]}function wj(e){return e[e.length-1]}function p3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=wj(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>Nn(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&i.timestamp-s.timestamp>Nn(t)*2&&(s=e[1]);const l=qn(i.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const c={x:(i.x-s.x)/l,y:(i.y-s.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function g3(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?st(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?st(n,e,s.max):Math.min(e,n)),e}function d1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function y3(e,{top:t,left:n,bottom:s,right:i}){return{x:d1(e.x,n,i),y:d1(e.y,t,s)}}function f1(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function v3(e,t){return{x:f1(e.x,t.x),y:f1(e.y,t.y)}}function b3(e,t){let n=.5;const s=sn(e),i=sn(t);return i>s?n=Ul(t.min,t.max-s,e.min):s>i&&(n=Ul(e.min,e.max-i,t.min)),Or(0,1,n)}function x3(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Tg=.35;function w3(e=Tg){return e===!1?e=0:e===!0&&(e=Tg),{x:h1(e,"left","right"),y:h1(e,"to
19p","bottom")}}function h1(e,t,n){return{min:m1(e,t),max:m1(e,n)}}function m1(e,t){return typeof e=="number"?e:e[t]||0}const S3=new WeakMap;class _3{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Rt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const l=p=>{n&&this.snapToCursor(uc(p).point),this.stopAnimation()},c=(p,b)=>{const{drag:w,dragPropagation:S,onDragStart:_}=this.getProps();if(w&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qP(w),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Er(j=>{let C=this.getAxisMotionValue(j).get()||0;if(kr.test(C)){const{projection:A}=this.visualElement;if(A&&A.layout){const k=A.layout.layoutBox[j];k&&(C=sn(k)*(parseFloat(C)/100))}}this.originPoint[j]=C}),_&&nt.update(()=>_(p,b),!1,!0),gg(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},f=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b;const{dragPropagation:w,dragDirectionLock:S,onDirectionLock:_,onDrag:E}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:j}=b;if(S&&this.currentDirection===null){this.currentDirection=T3(j),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",b.point,j),this.updateAxis("y",b.point,j),this.visualElement.render(),E&&nt.update(()=>E(p,b),!1,!0)},h=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b,this.stop(p,b),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:g}=this.getProps();this.panSession=new xj(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:h,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:s,contextWindow:bj(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!i||!s)return;const{velocity:c}=i;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&nt.postRender(()=>f(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!Pu(t,i,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(c=g3(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Fi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=y3(s.layoutBox,t):this.constraints=!1,this.elastic=w3(n),i!==this.constraints&&!Fi(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&Er(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=x3(s.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fi(t))return!1;const s=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const l=b5(s,i.root,this.visualElement.getTransformPagePoint());let c=v3(i.layout.layoutBox,l);if(n){const f=n(g5(c));this.hasMutatedConstraints=!!f,f&&(c=UT(f))}return c}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),h=this.constraints||{},m=Er(g=>{if(!Pu(g,n,this.currentDirection))return;let p=h&&h[g]||{};(c===!0||c===g)&&(p={min:0,max:0});const b=i?200:1e6,w=i?40:1e7,S={type:"inertia",velocity:s?t[g]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...p};return this.startAxisValueAnimation(g,S)});return Promise.all(m).then(f)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return gg(this.visualElement,t),s.start(_y(t,s,0,n,this.visualElement,!1))}stopAnimation(){Er(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Er(n=>{const{drag:s}=this.getProps();if(!Pu(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,l=this.getAxisMotionValue(n);if(i&&i.layout){const{min:c,max:f}=i.layout.layoutBox[n],h=l.get()||0;l.set(t[n]-st(c,f,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Fi(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Er(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const h=f.get();i[c]=b3({min:h,max:h},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),Er(c=>{if(!Pu(c,t,null))return;const f=this.getAxisMotionValue(c),{min:h,max:m}=this.constraints[c];f.set(st(h,m,i[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;S3.set(this.visualElement,this);const t=this.visualElement.current,n=Pl(t,"pointerdown",m=>{const{drag:g,dragListener:p=!0}=this.getProps(),b=m.target,w=b!==t&&JP(b);g&&p&&!w&&this.start(m)});let s;const i=()=>{const{dragConstraints:m}=this.getProps();Fi(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),s||(s=E3(t,m.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",i);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),nt.read(i);const f=Hl(window,"resize",()=>this.scalePositionWithinConstraints()),h=l.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Er(p=>{const b=this.getAxisMotionValue(p);b&&(this.originPoint[p]+=m[p].translate,b.set(b.get()+m[p].translate))}),this.visualElement.render())}));return()=>{f(),n(),c(),h&&h(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:l=!1,dragElastic:c=Tg,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function p1(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function E3(e,t,n){const s=wS(e,p1(n)),i=wS(t,p1(n));return()=>{s(),i()}}function Pu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function T3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class j3 extends oa{constructor(t){super(t),this.removeGroupControls=Fn,this.removeListeners=Fn,this.controls=new _3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Fn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const wp=e=>(t,n)=>{e&&nt.update(()=>e(t,n),!1,!0)};class C3 extends oa{constructor(){super(...arguments),this.removePointerDownListener=Fn}onPointerDown(t){this.session=new xj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bj(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:wp(t),onStart:wp(n),onMove:wp(s),onEnd:(l,c)=>{delete this.session,i&&nt.postRender(()=>i(l,c))}}}mount(){this.removePointerDownListener=Pl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Sp=!1;class A3 extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),s&&s.register&&i&&s.register(l),Sp&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),md.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:l}=this.props,{projection:c}=s;return c&&(c.isPresent=l,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Sp=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||nt.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Cy.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Sp=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Sj(e){const[t,n]=oj(),s=x.useContext(Bl);return u.jsx(A3,{...e,layoutGroup:s,switchLayoutGroup:x.useContext(yj),isPresent:t,safeToRemove:n})}const N3={pan:{Feature:C3},drag:{Feature:j3,ProjectionNode:ij,MeasureLayout:Sj}};
19function g1(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,l=s[i];l&&nt.postRender(()=>l(t,uc(t)))}class k3 extends oa{mount(){const{current:t}=this.node;t&&(this.unmount=KP(t,(n,s)=>(g1(this.node,s,"Start"),i=>g1(this.node,i,"End"))))}unmount(){}}class R3 extends oa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oc(Hl(this.node.current,"focus",()=>this.onFocus()),Hl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function y1(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),l=s[i];l&&nt.postRender(()=>l(t,uc(t)))}class O3 extends oa{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=QP(t,(i,l)=>(y1(this.node,l,"Start"),(c,{success:f})=>y1(this.node,c,f?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const jg=new WeakMap,_p=new WeakMap,D3=e=>{const t=jg.get(e.target);t&&t(e)},M3=e=>{e.forEach(D3)};function P3({root:e,...t}){const n=e||document;_p.has(n)||_p.set(n,{});const s=_p.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(M3,{root:e,...t})),s[i]}function L3(e,t,n){const s=P3(t);return jg.set(e,n),s.observe(e),()=>{jg.delete(e),s.unobserve(e)}}const z3={some:0,all:1};class I3 extends oa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:l}=t,c={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:z3[i]},f=h=>{const{isIntersecting:m}=h;if(this.isInView===m||(this.isInView=m,l&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:g,onViewportLeave:p}=this.node.getProps(),b=m?g:p;b&&b(h)};this.stopObserver=L3(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(B3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function B3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const U3={inView:{Feature:I3},tap:{Feature:O3},focus:{Feature:R3},hover:{Feature:k3}},V3={layout:{ProjectionNode:ij,MeasureLayout:Sj}},$3={...d3,...U3,...N3,...V3},co=i3($3,o3);function _j(){!Oy.current&&zT();const[e]=x.useState(Ad.current);return e}const Ej=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();const H3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const G3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase());const v1=e=>{const t=G3(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ep={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 q3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},F3=x.createContext({}),K3=()=>x.useContext(F3),W3=x.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:s,className:i="",children:l,iconNode:c,...f},h)=>{const{size:m=24,strokeWidth:g=2,absoluteStrokeWidth:p=!1,color:b="currentColor",className:w=""}=K3()??{},S=s??p?Number(n??g)*24/Number(t??m):n??g;return x.createElement("svg",{ref:h,...Ep,width:t??m??Ep.width,height:t??m??Ep.height,stroke:e??b,strokeWidth:S,className:Ej("lucide",w,i),...!l&&!q3(f)&&{"aria-hidden":"true"},...f},[...c.map(([_,E])=>
19x.createElement(_,E)),...Array.isArray(l)?l:[l]])});const Se=(e,t)=>{const n=x.forwardRef(({className:s,...i},l)=>x.createElement(W3,{ref:l,iconNode:t,className:Ej(`lucide-${H3(v1(e))}`,`lucide-${e}`,s),...i}));return n.displayName=v1(e),n};const Y3=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],zy=Se("arrow-down",Y3);const X3=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ql=Se("arrow-left",X3);const J3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Tj=Se("arrow-right",J3);const Z3=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],jj=Se("arrow-up",Z3);const Q3=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],uf=Se("calendar-days",Q3);const e4=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],t4=Se("calendar",e4);const n4=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cj=Se("check",n4);const r4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Iy=Se("chevron-down",r4);const s4=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],a4=Se("chevron-left",s4);const i4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],o4=Se("chevron-right",i4);const l4=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],c4=Se("chevron-up",l4);const u4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],d4=Se("circle-check",u4);const f4=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],h4=Se("cloud-upload",f4);const m4=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],p4=Se("earth",m4);const g4=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],By=Se("external-link",g4);const y4=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Aj=Se("eye-off",y4);const v4=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Nj=Se("eye",v4);const b4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],x4=Se("file-text",b4);const w4=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],S4=Se("flame",w4);const _4=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Uy=Se("flask-conical",_4);const E4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],T4=Se("globe",E4);const j4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],C4=Se("grid-3x3",j4);const A4=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],N4=Se("house",A4);const k4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Vy=Se("image",k4);const R4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],O4=Se("info",R4);const D4=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],us=Se("layers",D4);const M4=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],P4=Se("layout-dashboard",M4);const L4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],z4=Se("layout-list",L4);const I4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$y=Se("loader-circle",I4);const B4=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],kj=Se("lock",B4);const U4=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],V4=Se("log-out",U4);const $4=[["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"}]],Hy=Se("mail",$4);const H4=[["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"}]],Rj=Se("map-pin",H4);const G4=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],q4=Se("moon",G4);const F4=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}
vendor: 4,512 bytes, line 19
19],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],Gy=Se("newspaper",F4);const K4=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],W4=Se("octagon-x",K4);const Y4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],X4=Se("panel-left",Y4);const J4=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Z4=Se("pause",J4);const Q4=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ez=Se("play",Q4);const tz=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ta=Se("plus",tz);const nz=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],rz=Se("presentation",nz);const sz=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],az=Se("scale",sz);const iz=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],oz=Se("search",iz);const lz=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],cz=Se("shield",lz);const uz=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],dz=Se("sun",uz);const fz=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Oj=Se("tag",fz);const hz=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Dj=Se("trash-2",hz);const mz=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],pz=Se("triangle-alert",mz);const gz=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],qy=Se("upload",gz);const yz=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Mj=Se("users",yz);const vz=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],bz=Se("wrench",vz);const xz=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Dr=Se("x",xz);const wz=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Sz=Se("zap",wz);function Pj(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pj(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Lj(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pj(e))&&(s&&(s+=" "),s+=t);return s}const _z=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},Ez=(e,t)=>
vendor: 5,012 bytes, line 19
19({classGroupId:e,validator:t}),zj=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Dd="-",b1=[],Tz="arbitrary..",jz=e=>{const t=Az(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Cz(c);const f=c.split(Dd),h=f[0]===""&&f.length>1?1:0;return Ij(f,h,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const h=s[c],m=n[c];return h?m?_z(m,h):h:m||b1}return n[c]||b1}}},Ij=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const m=Ij(e,t+1,l);if(m)return m}const c=n.validators;if(c===null)return;const f=t===0?e.join(Dd):e.slice(t).join(Dd),h=c.length;for(let m=0;m<h;m++){const g=c[m];if(g.validator(f))return g.classGroupId}},Cz=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Tz+s:void 0})(),Az=e=>{const{theme:t,classGroups:n}=e;return Nz(n,t)},Nz=(e,t)=>{const n=zj();for(const s in e){const i=e[s];Fy(i,n,s,t)}return n},Fy=(e,t,n,s)=>{const i=e.length;for(let l=0;l<i;l++){const c=e[l];kz(c,t,n,s)}},kz=(e,t,n,s)=>{if(typeof e=="string"){Rz(e,t,n);return}if(typeof e=="function"){Oz(e,t,n,s);return}Dz(e,t,n,s)},Rz=(e,t,n)=>{const s=e===""?t:Bj(t,e);s.classGroupId=n},Oz=(e,t,n,s)=>{if(Mz(e)){Fy(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Ez(n,e))},Dz=(e,t,n,s)=>{const i=Object.entries(e),l=i.length;for(let c=0;c<l;c++){const[f,h]=i[c];Fy(h,Bj(t,f),n,s)}},Bj=(e,t)=>{let n=e;const s=t.split(Dd),i=s.length;for(let l=0;l<i;l++){const c=s[l];let f=n.nextPart.get(c);f||(f=zj(),n.nextPart.set(c,f)),n=f}return n},Mz=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Pz=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(l,c)=>{n[l]=c,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(l){let c=n[l];if(c!==void 0)return c;if((c=s[l])!==void 0)return i(l,c),c},set(l,c){l in n?n[l]=c:i(l,c)}}},Cg="!",x1=":",Lz=[],w1=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),zz=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const l=[];let c=0,f=0,h=0,m;const g=i.length;for(let _=0;_<g;_++){const E=i[_];if(c===0&&f===0){if(E===x1){l.push(i.slice(h,_)),h=_+1;continue}if(E==="/"){m=_;continue}}E==="["?c++:E==="]"?c--:E==="("?f++:E===")"&&f--}const p=l.length===0?i:i.slice(h);let b=p,w=!1;p.endsWith(Cg)?(b=p.slice(0,-1),w=!0):p.startsWith(Cg)&&(b=p.slice(1),w=!0);const S=m&&m>h?m-h:void 0;return w1(l,w,b,S)};if(t){const i=t+x1,l=s;s=c=>c.startsWith(i)?l(c.slice(i.length)):w1(Lz,!1,c,void 0,!0)}if(n){const i=s;s=l=>n({className:l,parseClassName:i})}return s},Iz=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let l=0;l<n.length;l++){const c=n[l],f=c[0]==="[",h=t.has(c);f||h?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(c)):i.push(c)}return i.length>0&&(i.sort(),s.push(...i)),s}},Bz=e=>({cache:Pz(e.cacheSize),parseClassName:zz(e),sortModifiers:Iz(e),...jz(e)}),Uz=/\s+/,Vz=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:l}=t,c=[],f=e.trim().split(Uz);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:p,modifiers:b,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:_}=n(g);if(p){h=g+(h.length>0?" "+h:h);continue}let E=!!_,j=s(E?S.substring(0,_):S);if(!j){if(!E){h=g+(h.length>0?" "+h:h);continue}if(j=s(S),!j){h=g+(h.length>0?" "+h:h);continue}E=!1}const C=b.length===0?"":b.length===1?b[0]:l(b).join(":"),A=w?C+Cg:C,k=A+j;if(c.indexOf(k)>-1)continue;c.push(k);const D=i(j,E);for(let B=0;B<D.length;++B){const L=D[B];c.push(A+L)}h=g+(h.length>0?" "+h:h)}return h},$z=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=Uj(n))&&(i&&(i+=" "),i+=s);return i},Uj=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Uj(e[s]))&&(n&&(n+=" "),n+=t);return n},Hz=(e,...t)=>{let n,s,i,l;const c=h=>{const m=t.reduce((g,p)=>p(g),e());return n=Bz(m),s=n.cache.get,i=n.cache.set,l=f,f(h)},f=h=>{const m=s(h);if(m)return m;const g=Vz(h,n);return i(h,g),g};return l=c,(...h)=>l($z(...h))},Gz=[],kt=e=>{const t=n=>n[e]||Gz;return t.isThemeGetter=!0,t},Vj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$j=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qz=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kz=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gs=e=>qz.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),qs=e=>!!e&&Number.isInteger(Number(e)),Tp=e=>e.endsWith("%")&&Me(e.slice(0,-1)),rs=e=>Fz.test(e),Hj=()=>!0,Jz=e=>Kz.test(e)&&!Wz.test(e),Ky=()=>!1,Zz=e=>Yz.test(e),Qz=e=>Xz.test(e),eI=e=>
vendor: 4,534 bytes, line 19
19!pe(e)&&!be(e),tI=e=>la(e,Fj,Ky),pe=e=>Vj.test(e),La=e=>la(e,Kj,Jz),S1=e=>la(e,cI,Me),nI=e=>la(e,Yj,Hj),rI=e=>la(e,Wj,Ky),_1=e=>la(e,Gj,Ky),sI=e=>la(e,qj,Qz),Lu=e=>la(e,Xj,Zz),be=e=>$j.test(e),El=e=>Ja(e,Kj),aI=e=>Ja(e,Wj),E1=e=>Ja(e,Gj),iI=e=>Ja(e,Fj),oI=e=>Ja(e,qj),zu=e=>Ja(e,Xj,!0),lI=e=>Ja(e,Yj,!0),la=(e,t,n)=>{const s=Vj.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ja=(e,t,n=!1)=>{const s=$j.exec(e);return s?s[1]?t(s[1]):n:!1},Gj=e=>e==="position"||e==="percentage",qj=e=>e==="image"||e==="url",Fj=e=>e==="length"||e==="size"||e==="bg-size",Kj=e=>e==="length",cI=e=>e==="number",Wj=e=>e==="family-name",Yj=e=>e==="number"||e==="weight",Xj=e=>e==="shadow",uI=()=>{const e=kt("color"),t=kt("font"),n=kt("text"),s=kt("font-weight"),i=kt("tracking"),l=kt("leading"),c=kt("breakpoint"),f=kt("container"),h=kt("spacing"),m=kt("radius"),g=kt("shadow"),p=kt("inset-shadow"),b=kt("text-shadow"),w=kt("drop-shadow"),S=kt("blur"),_=kt("perspective"),E=kt("aspect"),j=kt("ease"),C=kt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...k(),be,pe],B=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],P=()=>[be,pe,h],U=()=>[Gs,"full","auto",...P()],z=()=>[qs,"none","subgrid",be,pe],Y=()=>["auto",{span:["full",qs,be,pe]},qs,be,pe],se=()=>[qs,"auto",be,pe],de=()=>["auto","min","max","fr",be,pe],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ce=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...P()],F=()=>[Gs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],X=()=>[Gs,"screen","full","dvw","lvw","svw","min","max","fit",...P()],oe=()=>[Gs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],ee=()=>[e,be,pe],O=()=>[...k(),E1,_1,{position:[be,pe]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",iI,tI,{size:[be,pe]}],ne=()=>[Tp,El,La],ie=()=>["","none","full",m,be,pe],ue=()=>["",Me,El,La],ae=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[Me,Tp,E1,_1],Oe=()=>["","none",S,be,pe],De=()=>["none",Me,be,pe],Ue=()=>["none",Me,be,pe],yt=()=>[Me,be,pe],lt=()=>[Gs,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rs],breakpoint:[rs],color:[Hj],container:[rs],"drop-shadow":[rs],ease:["in","out","in-out"],font:[eI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rs],shadow:[rs],spacing:["px",Me],text:[rs],"text-shadow":[rs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gs,pe,be,E]}],container:["container"],columns:[{columns:[Me,pe,be,f]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{"inset-s":U(),start:U()}],end:[{"inset-e":U(),end:U()}],"inset-bs":[{"inset-bs":U()}],"inset-be":[{"inset-be":U()}],top:[{top:U()}
vendor: 4,765 bytes, line 19
19],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[qs,"auto",be,pe]}],basis:[{basis:[Gs,"full","auto",f,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,Gs,"auto","initial","none",pe]}],grow:[{grow:["",Me,be,pe]}],shrink:[{shrink:["",Me,be,pe]}],order:[{order:[qs,"first","last","none",be,pe]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...ce()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ce(),"baseline"]}],"place-self":[{"place-self":["auto",...ce()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[f,"screen",...F()]}],"min-w":[{"min-w":[f,"screen","none",...F()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,El,La]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,lI,nI]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tp,pe]}],"font-family":[{font:[aI,rI,t]}],"font-features":[{"font-features":[pe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,be,pe]}],"line-clamp":[{"line-clamp":[Me,"none",be,S1]}],leading:[{leading:[l,...P()]}],"list-image":[{"list-image":["none",be,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",be,La]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Me,"auto",be,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qs,be,pe],radial:["",be,pe],conic:[qs,be,pe]},oI,sI]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:ne()}
vendor: 7,445 bytes, line 19
19],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,be,pe]}],"outline-w":[{outline:["",Me,El,La]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",g,zu,Lu]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",p,zu,Lu]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Me,La]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",b,zu,Lu]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Me,be,pe]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[be,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,pe]}],filter:[{filter:["","none",be,pe]}],blur:[{blur:Oe()}],brightness:[{brightness:[Me,be,pe]}],contrast:[{contrast:[Me,be,pe]}],"drop-shadow":[{"drop-shadow":["","none",w,zu,Lu]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Me,be,pe]}],"hue-rotate":[{"hue-rotate":[Me,be,pe]}],invert:[{invert:["",Me,be,pe]}],saturate:[{saturate:[Me,be,pe]}],sepia:[{sepia:["",Me,be,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",be,pe]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[Me,be,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Me,be,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,be,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,be,pe]}],"backdrop-invert":[{"backdrop-invert":["",Me,be,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Me,be,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Me,be,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,be,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",be,pe]}],ease:[{ease:["linear","initial",j,be,pe]}],delay:[{delay:[Me,be,pe]}],animate:[{animate:["none",C,be,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,be,pe]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Ue()}],"scale-x":[{"scale-x":Ue()}],"scale-y":[{"scale-y":Ue()}],"scale-z":[{"scale-z":Ue()}],"scale-3d":["scale-3d"],skew:[{skew:yt()}],"skew-x":[{"skew-x":yt()}],"skew-y":[{"skew-y":yt()}],transform:[{transform:[be,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:lt()}],"translate-x":[{"translate-x":lt()}],"translate-y":[{"translate-y":lt()}],"translate-z":[{"translate-z":lt()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}
19],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,pe]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Me,El,La,S1]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},dI=Hz(uI);function re(...e){return dI(Lj(e))}function Md(e){const[t,n,s]=e.split("-").map(Number);return new Date(t,n-1,s)}const Wy=1200;function fI(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function hI(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}function Jj(e,t=Wy){if(fI()){window.scrollTo(0,e);return}const n=window.scrollY,s=e-n,i=performance.now(),l=c=>{const f=Math.min((c-i)/t,1);window.scrollTo(0,n+s*hI(f)),f<1&&requestAnimationFrame(l)};requestAnimationFrame(l)}const mI=16;function pI(){const e=getComputedStyle(document.documentElement).getPropertyValue("--site-header-height"),t=parseFloat(e);return Number.isFinite(t)?t:88}function Yy(e,t=Wy){const n=document.getElementById(e);if(!n)return;const s=n.getBoundingClientRect().top+window.scrollY-pI()-mI;Jj(s,t)}function gI(e=Wy){Jj(0,e)}function yI({items:e,className:t}){const[n,s]=x.useState(!1),i=On(),l=i.pathname+i.hash;return x.useEffect(()=>{const c=()=>s(window.innerWidth<768);return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),e.length===0?null:u.jsx("nav",{className:re("flex items-center gap-1 overflow-visible rounded-full border border-border bg-card/70 py-1 pl-1 pr-1.5 shadow-sm backdrop-blur-lg dark:border-white/10 dark:bg-white/[0.06]",t),"aria-label":"Main navigation",children:e.map(c=>{const f=c.icon,h=l===c.href;return u.jsxs(Gt,{to:c.href,onClick:()=>{c.href.includes("#")||gI()},"aria-current":h?"true":void 0,className:re("relative cursor-pointer rounded-full px-3.5 py-2 text-sm font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",h?"text-primary":"text-muted-foreground hover:text-foreground"),children:[u.jsx("span",{className:"relative z-10 flex items-center gap-1.5",children:n?u.jsx(f,{className:"h-[18px] w-[18px]",strokeWidth:2.5}):c.label}),h&&u.jsx(co.div,{layoutId:"glow-nav-lamp",className:"absolute inset-0 -z-0 rounded-full bg-primary/10",initial:!1,transition:{type:"spring",stiffness:300,damping:30},children:u.jsxs("div",{className:"absolute -top-2 left-1/2 h-1 w-8 -translate-x-1/2 roun
19ded-t-full bg-primary",children:[u.jsx("div",{className:"absolute -left-2 -top-2 h-6 w-12 rounded-full bg-primary/20 blur-md"}),u.jsx("div",{className:"absolute -top-1 h-6 w-8 rounded-full bg-primary/20 blur-md"}),u.jsx("div",{className:"absolute left-2 top-0 h-4 w-4 rounded-full bg-primary/20 blur-sm"})]})})]},c.href)})})}const Zj="(prefers-color-scheme: dark)",vI=["dark","light","system"],Qj=x.createContext(void 0);function T1(e){return e===null?!1:vI.includes(e)}function j1(){return window.matchMedia(Zj).matches?"dark":"light"}function bI(){const e=document.createElement("style");return e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.remove()})})}}function xI(e){return e instanceof HTMLElement?!!(e.isContentEditable||e.closest("input, textarea, select, [contenteditable='true']")):!1}function wI({children:e,defaultTheme:t="system",storageKey:n="theme",disableTransitionOnChange:s=!0,...i}){const[l,c]=x.useState(()=>{const g=localStorage.getItem(n);return T1(g)?g:t}),f=x.useCallback(g=>{localStorage.setItem(n,g),c(g)},[n]),h=x.useCallback(g=>{const p=document.documentElement,b=g==="system"?j1():g,w=s?bI():null;p.classList.remove("light","dark"),p.classList.add(b),w&&w()},[s]);x.useEffect(()=>{if(h(l),l!=="system")return;const g=window.matchMedia(Zj),p=()=>{h("system")};return g.addEventListener("change",p),()=>{g.removeEventListener("change",p)}},[l,h]),x.useEffect(()=>{const g=p=>{p.repeat||p.metaKey||p.ctrlKey||p.altKey||xI(p.target)||p.key.toLowerCase()==="d"&&c(b=>{const w=b==="dark"?"light":b==="light"?"dark":j1()==="dark"?"light":"dark";return localStorage.setItem(n,w),w})};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[n]),x.useEffect(()=>{const g=p=>{if(p.storageArea===localStorage&&p.key===n){if(T1(p.newValue)){c(p.newValue);return}c(t)}};return window.addEventListener("storage",g),()=>{window.removeEventListener("storage",g)}},[t,n]);const m=x.useMemo(()=>({theme:l,setTheme:f}),[l,f]);return u.jsx(Qj.Provider,{...i,value:m,children:e})}const SI=()=>{const e=x.useContext(Qj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function C1(){const{theme:e,setTheme:t}=SI(),n=e==="dark",s=()=>t(n?"light":"dark");return u.jsx("button",{type:"button",role:"switch","aria-checked":n,"aria-label":n?"Switch to light mode":"Switch to dark mode",onClick:s,className:"relative inline-flex h-7 w-[52px] shrink-0 items-center rounded-full border border-border bg-secondary transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:u.jsx("span",{className:re("flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-sm transition-transform duration-300 ease-out motion-reduce:transition-none",n?"translate-x-[27px]":"translate-x-1"),children:n?u.jsx(q4,{className:"h-3 w-3"}):u.jsx(dz,{className:"h-3 w-3"})})})}function A1(e={}){const{rootMargin:t="0px"}=e,n=x.useRef(null),[s,i]=x.useState(!1);return x.useEffect(()=>{const l=n.current;if(!l)return;const c=new IntersectionObserver(([f])=>i(f.isIntersecting),{threshold:0,rootMargin:t});return c.observe(l),()=>c.disconnect()},[t]),{ref:n,isInView:s}}const N1="NextGO Epi";function ca(e){x.useEffect(()=>{document.title=e?`${N1} | ${e}`:N1},[e])}const _I=`
20attribute vec2 position;
21varying vec2 vUv;
22void main() {
23  vUv = position * 0.5 + 0.5;
24  gl_Position = vec4(position, 0.0, 1.0);
25}
26`,EI=`
27precision highp float;
28varying vec2 vUv;
29
30uniform vec2  u_resolution;
31uniform float u_time;
32uniform float u_grain;
33uniform vec3  u_colors[4];
34uniform vec3  u_bg;
35
36vec3 permute(vec3 x) { return mod(((x*34.0)+1.0)*x, 289.0); }
37
38float snoise(vec2 v){
39  const vec4 C = vec4(0.211324865405187, 0.366025403784439,
40           -0.577350269189626, 0.024390243902439);
41  vec2 i  = floor(v + dot(v, C.yy) );
42  vec2 x0 = v -   i + dot(i, C.xx);
43  vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
44  vec4 x12 = x0.xyxy + C.xxzz;
45  x12.xy -= i1;
46  i = mod(i, 289.0);
47  vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))
48  + i.x + vec3(0.0, i1.x, 1.0 ));
49  vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy),
50    dot(x12.zw,x12.zw)), 0.0);
51  m = m*m ;
52  m = m*m ;
53  vec3 x = 2.0 * fract(p * C.www) - 1.0;
54  vec3 h = abs(x) - 0.5;
55  vec3 ox = floor(x + 0.5);
56  vec3 a0 = x - ox;
57  m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
58  vec3 g;
59  g.x  = a0.x  * x0.x  + h.x  * x0.y;
60  g.yz = a0.yz * x12.xz + h.yz * x12.yw;
61  return 130.0 * dot(m, g);
62}
63
64void main() {
65  vec2 uv = vUv;
66  float ratio = u_resolution.x / u_resolution.y;
67  vec2 p = uv - 0.5;
68  p.x *= ratio;
69
70  float t = u_time * 0.1;
71
72  float n1 = snoise(p * 0.4 + vec2(t * 0.2, -t * 0.3));
73  float n2 = snoise(p * 0.55 + vec2(-t * 0.15, t * 0.25) + n1 * 0.25);
74  float n3 = snoise(p * 0.75 + vec2(t * 0.1, -t * 0.2) + n2 * 0.2);
75
76  vec3 col = u_bg;
77
78  float dist = length(p) * 1.5;
79
80  // Vignette uses UN-stretched uv-space distance (not the aspect-corrected
81  // p) so it stays a gentle circular falloff regardless of how wide the
82  // container is, instead of an ellipse that clips a wide/short banner's
83  // top and bottom into near-black.
84  float vDist = length(uv - 0.5) * 1.4;
85  float vignette = 1.0 - smoothstep(0.55, 1.6, vDist);
86
87  col = mix(col, u_colors[0], smoothstep(-0.2, 0.5, n1) * 0.85);
88  col = mix(col, u_colors[1], smoothstep(-0.1, 0.6, n2) * 0.7);
89  col = mix(col, u_colors[2], smoothstep(-0.3, 0.4, n3) * 0.6);
90  col = mix(col, u_colors[3], smoothstep(0.0, 0.7, n1 * n2) * 0.5);
91
92  float glow = smoothstep(0.8, 0.0, dist) * 0.3;
93  col += u_colors[1] * glow;
94
95  col = mix(col * 0.2, col, vignette);
96
97  float grain = fract(sin(dot(uv, vec2(12.9898, 78.233))) * 43758.5453 + u_time);
98  col += (grain - 0.5) * u_grain * 0.1;
99
100  gl_FragColor = vec4(col, 1.0);
101}
102`,TI=["#4b6070","#70572a","#1b2931","#171717"],jI="#171717";function k1(e){const t=e.replace("#","");return[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255]}function df({bg:e=jI,colors:t=TI,speed:n=2,grain:s=.3,height:i="100vh",className:l,children:c,fadeBottom:f=!1}){const h=x.useRef(null),m=x.useRef(null);return x.useEffect(()=>{const g=h.current,p=m.current;if(!g||!p)return;const b=g.getContext("webgl",{preserveDrawingBuffer:!0});if(!b)return;const w=(P,U)=>{const z=b.createShader(P);return b.shaderSource(z,U),b.compileShader(z),z},S=b.createProgram();b.attachShader(S,w(b.VERTEX_SHADER,_I)),b.attachShader(S,w(b.FRAGMENT_SHADER,EI)),b.linkProgram(S),b.useProgram(S);const _=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,_),b.bufferData(b.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),b.STATIC_DRAW);const E=b.getAttribLocation(S,"position");b.enableVertexAttribArray(E),b.vertexAttribPointer(E,2,b.FLOAT,!1,0,0);const j={res:b.getUniformLocation(S,"u_resolution"),time:b.getUniformLocation(S,"u_time"),grain:b.getUniformLocation(S,"u_grain"),colors:b.getUniformLocation(S,"u_colors"),bg:b.getUniformLocation(S,"u_bg")},C=()=>{const P=Math.min(window.devicePixelRatio,2);g.width=p.clientWidth*P,g.height=p.clientHeight*P,b.viewport(0,0,g.width,g.height)},A=new ResizeObserver(C);A.observe(p),C();const k=P=>{b.uniform2f(j.res,g.width,g.height),b.uniform1f(j.time,P*n),b.uniform1f(j.grain,s),b.uniform3f(j.bg,...k1(e));const U=new Float32Array(t.slice(0,4).flatMap(k1));b.uniform3fv(j.colors,U),b.drawArrays(b.TRIANGLE_STRIP,0,4)};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return k(0),()=>A.disconnect();let B;const L=P=>{k(P*.001),B=requestAnimationFrame(L)};return B=requestAnimationFrame(L),()=>{A.disconnect(),cancelAnimationFrame(B)}},[e,t,n,s]),u.jsxs("div",{ref:m,style:{minHeight:i,backgroundColor:e},className:re("relative flex w-full overflow-hidden",l),children:[u.jsx("canvas",{ref:h,className:"pointer-events-none absolute inset-0 h-full w-full"}),f&&u.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-40 bg-gradient-to-b from-transparent to-background sm:h-56"}),u.jsx("div",{className:"relative w-full",children:c})]})}function Xy(e={}){const{threshold:t=.15,rootMargin:n="0px"}=e,s=x.useRef(null),[i,l]=x.useState(!1);return x.useEffect(()=>{const c=s.current;if(!c)return;if(typeof IntersectionObserver>"u"){l(!0);return}const f=new IntersectionObserver(([h])=>{h.isIntersecting&&(l(!0),f.unobserve(c))},{threshold:t,rootMargin:n});return f.observe(c),()=>f.disconnect()},[t,n]),{ref:s,isVisible:i}}const CI={0:0,1:80,2:160,3:240};function Ge({children:e,delay:t=0,className:n,as:s="div"}){const{ref:i,isVisible:l}=Xy();return u.jsx(s,{ref:i,style:{transitionDelay:l?`${CI[t]}ms`:"0ms"},className:re("transition-[opacity,transform] duration-[400ms] ease-out motion-reduce:transition-none motion-reduce:opacity-100 motion-reduce:translate-y-0",l?"opacity-100 translate-y-0":"opacity-0 translate-y-2",n),children:e})}const jp="#4b6070",Cp="#70572a";function eC({href:e,children:t,label:n,className:s}){const i=x.useId().replace(/:/g,""),l=f=>{e.startsWith("#")&&(f.preventDefault(),Yy(e.slice(1)),window.history.pushState(null,"",e))},c={unopaq:`unopaq-${i}`,unopaq2:`unopaq2-${i}`,unopaq3:`unopaq3-${i}`};return u.jsxs("div",{className:`group relative mx-8 inline-block ${s??""}`,children:[u.jsxs("svg",{style:{position:"absolute",width:0,height:0},children:[u.jsx("filter",{width:"300%",x:"-100%",height:"300%",y:"-100%",id:c.unopaq,children:u.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 9 0"})}),u.jsx("filter",{width:"300%",x:"-100%",height:"300%",y:"-100%",id:c.unopaq2,children:u.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 3 0"})}),u.jsx("filter",{width:"300%",x:"-100%",height:"300%",y:"-100%",id:c.unopaq3,children:u.jsx("feColorMatrix",{values:"1 0 0 0.2 0 0 1 0 0.2 0 0 0 1 0.2 0 0 0 0 2 0"})})]}),u.jsx("a",{href:e,onClick:l,className:"absolute inset-0 z-20 cursor-pointer rounded-[17px] outline-none","aria-label":n}),u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 -z-20 overflow-hidden opacity-50 transition-opacity duration-300 group-hover:opacity-75 group-active:opacity-100",style:{filter:`blur(2em) url(#${c.unopaq})`},children:u.jsx("div",{className:"absolute inset-[-150%] group-hover:animate-[speen_8s_cubic-bezier(0.56,0.15,0.28,0.86)_infinite,woah_4s_infinite]",style:{background:`linear-gradient(90deg, ${Cp} 30%, #0000 50%, ${jp} 70%)`}})}),u.jsx("div",{className:"absolute inset-[-0.125em] -z-20 overflow-hidden opacity-50 transition-opacity duration-300 group-hover:opacity-75 group-active:opacity-100",style:{filter:`blur(0.25em) url(#${c.unopaq2})`,borderRadius:"0.75em"},children:u.jsx("div",{className:"absolute inset-[-150%] group-hover:animate-[speen_8s_cubic-bezier(0.56,0.15,0.28,0.86)_infinite,woah_4s_infinite]",style:{background:`linear-gradient(90deg, ${Cp} 20%, #0000 45% 55%, ${jp} 80%)`}})}),u.jsx("div",{className:"rounded-[inherit] bg-[#0005] p-0.5",style:{clipPath:'path("M 138 0 C 169 0 174 5 174 33 C 174 61 169 66 138 66 L 33 66 C 5 66 0 61 0 33 C 0 5 5 0 33 0 Z")'},children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-[-2px] -z-10 overflow-hidden rounded-[inherit] opacity-50 transition-opacity duration-300 group-hover:opacity-75 group-active:opacity-100",style:{filter:`blur(2px) url(#${c.unopaq3})`},children:u.jsx("div",{className:"absolute inset-[-150%] group-hover:animate-[speen_8s_cubic-bezier(0.56,0.15,0.28,0.86)_infinite,woah_4s_infinite]",style:{background:`linear-gradient(90deg, ${Cp} 30%, #0000 45% 55%, ${jp} 70%)`}})}),u.jsx("div",{className:"flex h-[60px] w-[176px] flex-col items-center justify-center gap-1.5 overflow-hidden bg-[#111215] font-mono text-sm font-medium text-white [&_svg]:size-4",style:{clipPath:'path("M 138 0 C 163 0 168 5 168 30 C 168 55 163 60 138 60 L 30 60 C 5 60 0 55 0 30 C 0 5 5 0 30 0 Z")',borderRadius:"0.875em"},children:u.jsx("span",{className:"flex items-center gap-2",children:t})})]})})]}),u.jsx("style",{children:`
103        @keyframes speen {
104          0% { transform: rotate(10deg); }
105          50% { transform: rotate(190deg); }
106          100% { transform: rotate(370deg); }
107        }
108        @keyframes woah {
109          0%, 100% { transform: scale(1); }
110          50% { transform: scale(0.75); }
111        }
112      `})]})}const AI=10;function NI({words:e,finalText:t,as:n="span",className:s,intervalMs:i=2200,morphMs:l=900}){const f=`goo-${x.useId().replace(/:/g,"")}`,h=x.useRef(null),m=x.useRef(null),g=x.useRef(null),p=x.useRef(null),b=e.join("\0"),w=x.useMemo(()=>t?[...e,t]:e,[b,t]),S=!t;x.useEffect(()=>{const E=p.current,j=m.current,C=g.current,A=h.current;if(!E||!j||!C||!A||w.length===0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){j.textContent=t??w[0],E.style.filter="none";return}j.textContent=w[0],E.style.filter=`url(#${f})`;let D=0,B=0,L;const P=()=>{const U=S?(D+1)%w.length:D+1,z=w[D],Y=w[U];j.textContent=z,C.textContent=Y,j.style.opacity="1",C.style.opacity="0";const se=performance.now(),de=fe=>{const ce=Math.min((fe-se)/l,1);j.style.opacity=String(1-ce),C.style.opacity=String(ce),A.setAttribute("stdDeviation",String(Math.sin(ce*Math.PI)*AI)),ce<1?B=requestAnimationFrame(de):(D=U,j.textContent=Y,j.style.opacity="1",!S&&D===w.length-1&&(window.clearInterval(L),E.style.filter="none"))};B=requestAnimationFrame(de)};return L=window.setInterval(P,i),()=>{window.clearInterval(L),cancelAnimationFrame(B)}},[w,S,t,i,l,f]);const _=w.reduce((E,j)=>j.length>E.length?j:E,"");return u.jsxs(n,{className:re("relative inline-block align-baseline",s),children:[u.jsx("svg",{"aria-hidden":"true",style:{position:"absolute",width:0,height:0},children:u.jsxs("filter",{id:f,children:[u.jsx("feGaussianBlur",{ref:h,in:"SourceGraphic",stdDeviation:"0",result:"blurred"}),u.jsx("feColorMatrix",{in:"blurred",mode:"matrix",values:"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 18 -7"})]})}),u.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-nowrap",children:_}),u.jsxs("span",{ref:p,className:"absolute inset-0",children:[u.jsx("span",{ref:m,"aria-hidden":"true",className:"absolute inset-0 whitespace-nowrap"}),u.jsx("span",{ref:g,"aria-hidden":"true",className:"absolute inset-0 whitespace-nowrap"})]}),u.jsx("span",{className:"sr-only",children:t??e.join(" ")})]})}const kI=["We","Are","NextGO","EPI"];function RI(){return u.jsx("section",{id:"hero",className:"relative",children:u.jsx("div",{style:{marginTop:"calc(-1 * var(--site-header-height, 88px))"},children:u.jsxs(df,{height:"100vh",className:"mb-16",fadeBottom:!0,children:[u.jsx("img",{src:"/images/contact/team-photo-v2.png",alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 right-[4%] hidden w-[45%] object-cover opacity-45 md:block",style:{objectPosition:"center 38%",transform:"scale(1)",maskImage:"radial-gradient(ellipse 55% 48% at 50% 42%, black 20%, transparent 85%)",WebkitMaskImage:"radial-gradient(ellipse 55% 48% at 50% 42%, black 20%, transparent 85%)"}}),u.jsx("img",{src:"/images/contact/team-photo-v2.png",alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover opacity-20 md:hidden",style:{objectPosition:"center 30%",maskImage:"linear-gradient(to bottom, black 0%, black 30%, transparent 68%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, black 30%, transparent 68%)"}}),u.jsxs("div",{className:"mx-auto flex h-full max-w-[1320px] flex-col items-start justify-center gap-6 px-6 md:px-12",style:{paddingTop:"var(--site-header-height, 88px)"},children:[u.jsx(Ge,{as:"p",className:"font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"NextGO Epi · Gallium Oxide Epitaxy"}),u.jsx("h1",{className:"max-w-3xl text-3xl font-semibold tracking-tight text-white sm:text-6xl",children:u.jsx(NI,{words:kI,finalText:"We Are NextGO EPI"})}),u.jsx(Ge,{delay:1,as:"p",className:"max-w-xl text-base leading-relaxed text-white/70 sm:text-lg",children:"The only European company producing Gallium Oxide epitaxial wafer
112s at industrial quality up to 4 inches — the electrically active layer at the heart of EV charging, renewable energy inverters, and AI data centers."}),u.jsx(Ge,{delay:2,children:u.jsxs(eC,{href:"#mission",label:"Learn more about NextGO Epi",children:["Learn More",u.jsx(zy,{})]})})]})]})})})}function OI(e){const[t,n]=x.useState(null),s=e.join(",");return x.useEffect(()=>{const i=s.split(",").filter(Boolean).map(c=>document.getElementById(c)).filter(c=>c!==null);if(i.length===0)return;const l=new IntersectionObserver(c=>{c.forEach(f=>{f.isIntersecting&&n(f.target.id)})},{threshold:0,rootMargin:"-45% 0px -53% 0px"});return i.forEach(c=>l.observe(c)),()=>l.disconnect()},[s]),t}function DI({items:e,visible:t=!0}){const n=OI(e.map(i=>i.id)),s=i=>{Yy(i)};return u.jsx("nav",{"aria-label":"Section navigation","aria-hidden":!t,className:re("fixed left-7 top-1/2 z-50 hidden -translate-y-1/2 flex-col gap-[22px] transition-opacity duration-300 min-[900px]:flex",t?"opacity-100":"pointer-events-none opacity-0"),children:e.map(i=>{const l=i.id===n;return u.jsxs("button",{type:"button","aria-label":i.label,"aria-current":l,onClick:()=>s(i.id),className:"group relative flex h-2 w-2 items-center",children:[u.jsx("span",{className:re("h-2 w-2 rounded-full border transition-all duration-[400ms]",l?"border-primary bg-primary ring-4 ring-primary/15":"border-border bg-border")}),u.jsx("span",{className:re("pointer-events-none absolute left-[18px] whitespace-nowrap font-mono text-[10.5px] transition-opacity duration-300",l?"text-primary opacity-100":"text-muted-foreground opacity-0"),children:i.label})]},i.id)})})}const Ag=["/images/section-backgrounds/plexus-amber-blue.jpg","/images/section-backgrounds/crystal-circuit-frame.jpg","/images/section-backgrounds/faceted-chip.jpg","/images/section-backgrounds/plexus-network.jpg"],MI="/images/company/wafer-stack-bokeh.jpg";function PI(e){const t=[...e];for(let n=t.length-1;n>0;n--){const s=Math.floor(Math.random()*(n+1));[t[n],t[s]]=[t[s],t[n]]}return t}const[LI,zI,II,BI]=PI(Ag);function ua(){return Ag[Math.floor(Math.random()*Ag.length)]}const UI=ua(),VI=ua(),$I=ua(),HI=ua(),pd=ua(),GI=ua(),qI=ua();ua();const FI=new Set(["Ga₂O₃","β-Ga₂O₃"]);function Mr({text:e,as:t="h2",className:n}){const{ref:s,isVisible:i}=Xy(),l=e.trim().split(/\s+/);return u.jsx(t,{ref:s,className:n,children:l.map((c,f)=>u.jsxs("span",{style:{transitionDelay:i?`${f*35}ms`:"0ms"},className:re("inline-block transition-[opacity,transform] duration-500 ease-out motion-reduce:transition-none motion-reduce:opacity-100 motion-reduce:translate-y-0",i?"opacity-100 translate-y-0":"opacity-0 translate-y-3.5",FI.has(c)&&"normal-case"),children:[c," "]},`${c}-${f}`))})}function Ft({src:e,opacity:t=.3}){return u.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 left-1/2 hidden w-screen -translate-x-1/2 overflow-hidden dark:block",children:[u.jsx("img",{src:e,alt:"",className:"h-full w-full object-cover",style:{opacity:t}}),u.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, var(--background) 0%, transparent 15%, transparent 85%, var(--background) 100%)"}})]})}const R1=8;function KI(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function dc(){const e=x.useRef(null),t=x.useCallback(s=>{const i=e.current;if(!i||KI())return;const l=i.getBoundingClientRect(),c=(s.clientX-l.left)/l.width-.5,f=(s.clientY-l.top)/l.height-.5;i.style.transform=`perspective(600px) rotateX(${f*-R1}deg) rotateY(${c*R1}deg) translateY(-3px)`},[]),n=x.useCallback(()=>{const s=e.current;s&&(s.style.transform="")},[]);return{ref:e,onMouseMove:t,onMouseLeave:n}}function WI(){const{ref:e,onMouseMove:t,onMouseLeave:n}=dc();return u.jsxs("section",{id:"mission",className:"relative flex flex-col gap-6 md:flex-row",children:[u.jsx(Ft,{src:LI}),u.jsxs("div",{className:"glass-card flex-1 overflow-hidden px-6 py-12 md:px-10 md:py-16",children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Company"}),u.jsx(Mr,{as:"h1",text:"Yesterday's loss becomes tomorrow's energy",className:"mb-8 font-serif text-3xl font-medium leading-[1.35]"}),u.jsx(Ge,{delay:1,as:"p",className:"text-base leading-relaxed text-muted-foreground",children:"As a premier deep-tech VC backed spin-off from the Leibniz-Institut für Kristallzüchtung (IKZ), NextGO Epi GmbH stands at the vanguard of the wide-bandgap semiconductor revolution in Europe. NextGO Epi is the only European company producing Gallium Oxide epitaxial wafer
112s at industrial quality up to 4 inches — the electrically active layer at the heart of EV charging, renewable energy inverters, and AI data centers."}),u.jsx(Ge,{delay:2,as:"blockquote",className:"mt-10 border-l-2 border-primary pl-6 font-serif text-lg italic leading-relaxed text-foreground",children:`"Gallium oxide is to power electronics what silicon was to computing, and Europe should own that value chain. We're building the material layer that makes the next energy revolution possible, and we're building it in Europe."`})]}),u.jsx(Ge,{delay:1,className:"md:w-[320px] md:shrink-0",children:u.jsx("div",{ref:e,onMouseMove:t,onMouseLeave:n,style:{transformStyle:"preserve-3d"},className:"h-full min-h-[280px] w-full rounded-xl border border-border transition-shadow duration-300 will-change-transform hover:shadow-lg",children:u.jsx("div",{className:"h-full w-full overflow-hidden rounded-xl",children:u.jsx("img",{src:"/images/company/IKZ.jpg",alt:"IKZ institute building",className:"h-full w-full object-cover"})})})})]})}const YI="NextGO Epi is an industry leader thanks to its specialized expertise, gained from over a decade of experience in gallium oxide epitaxy, as well as its exclusive AI-powered monitoring system.",XI=[{title:"MOCVD-grown Epiwafer",image:"/images/technology/mocvd-grown-epiwafer.jpg",paragraphs:["NextGO Epi is a startup company delivering Gallium Oxide Technology for power, RF, and photodetector applications.","We own the exclusive Metal-Organic Chemical Vapor Deposition (MOCVD) technology to deliver the high-quality Ga2O3 epiwafer to our customers."]},{title:"AI-Power Process",image:"/images/technology/ai-power-process.jpg",paragraphs:["Our deep-learning-algorithm–based one-step intelligent production system includes customized epitaxial structure suggestion and quality inspection to provide Ga2O3 epitaxy solutions that were not available in the past.","Our world-leading In-Situ growth monitoring algorithm allows us to control the growth rate, doping, optical properties, and alloy concentration during the growth."]},{title:"Device Demonstration",image:"/images/technology/device-demonstration.jpg",paragraphs:["Our epiwafer has been processed to be high-performance power device by our collaboration partner with industrial scale clean room facility.","We welcome industrial partners to join the reliability test and further product development in various applications and explore the potential of Gallium Oxide."]}];function JI({item:e}){const{ref:t,onMouseMove:n,onMouseLeave:s}=dc();return u.jsxs("div",{ref:t,onMouseMove:n,onMouseLeave:s,style:{transformStyle:"preserve-3d"},className:"glass-card flex h-full flex-col overflow-hidden p-6 shadow-lg transition-shadow duration-300 will-change-transform hover:shadow-xl",children:[u.jsx("div",{style:{transform:"translateZ(20px)"},className:"overflow-hidden rounded-lg",children:u.jsx("img",{src:e.image,alt:e.title,className:"aspect-[4/3] w-full object-cover"})}),u.jsxs("div",{style:{transform:"translateZ(10px)"},className:"mt-5 flex-1",children:[u.jsx("h3",{className:"text-lg font-semibold leading-tight",children:e.title}),u.jsx("div",{className:"mt-2 space-y-3 text-sm leading-relaxed text-muted-foreground",children:e.paragraphs.map((i,l)=>u.jsx("p",{children:i},l))})]})]})}function ZI(){return u.jsxs("section",{id:"technology",className:"relative py-16 md:py-24",children:[u.jsx(Ft,{src:MI}),u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Technology"}),u.jsx(Mr,{as:"h2",text:"Our Technology",className:"text-2xl font-semibold"}),u.jsx(Ge,{delay:1,as:"p",className:"mt-[18px] text-base leading-relaxed text-muted-foreground",children:YI}),u.jsx("div",{className:"mt-10 grid gap-6 md:grid-cols-3",children:XI.map((e,t)=>u.jsx(Ge,{delay:Math.min(t+1,3),children:u.jsx(JI,{item:e})},e.title))})]})}const tC=[{name:"Dr. Ta-Shun Chou",role:"Co-Founder & CEO",bio:"Ph.D. in chemistry specializing in crystal growth theory and AI, completed at IKZ (2020–2023), where he achieved breakthroughs in high-quality Ga₂O₃ epitaxial layers.",photo:"/images/founders/ta-shun-chou.png"},{name:"Dr. Andreas Popp",role:"Co-Founder · Group Leader, Gallium Oxide Epitaxy at IKZ",bio:'Graduated with honors in physics in 2017, joined IKZ in late 2017, and has led the "Gallium Oxide Epitaxy" research group since 2019, securing several million in funding.',photo:"/images/founders/andreas-popp.png"},{name:"Dr. Andreas Fiedler",role:"Co-Founder · Group Leader, Al-Ga-Oxide Electronics at IKZ",bio:"Experimental physicist specializing in semiconductor physics and electronic devices, heading the BMFTR-NanoMatFutur All-GO-HEMT early-career research group.",ph
112oto:"/images/founders/andreas-fiedler.png"}],QI=300,e6=300,O1=50;function t6(e,t,n){let s=e-t;return s>n/2&&(s-=n),s<-n/2&&(s+=n),s}function n6({founders:e,intervalMs:t=4500}){const[n,s]=x.useState(0),[i,l]=x.useState(!0),[c,f]=x.useState(!1),h=x.useRef(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);x.useEffect(()=>{if(!i||h.current||e.length<=1)return;const w=setInterval(()=>{s(S=>(S+1)%e.length)},t);return()=>clearInterval(w)},[i,t,e.length]);const m=x.useCallback(w=>{s(w),l(!1)},[]),g=x.useCallback(()=>{s(w=>(w-1+e.length)%e.length),l(!1)},[e.length]),p=x.useCallback(()=>{s(w=>(w+1)%e.length),l(!1)},[e.length]),b=x.useCallback((w,S)=>{const{offset:_,velocity:E}=S,j=Math.abs(_.x)*E.x;_.x<-O1||j<-1e3?p():(_.x>O1||j>1e3)&&g(),f(!1)},[p,g]);return u.jsxs(hj,{reducedMotion:"user",children:[u.jsxs("div",{className:"relative mx-auto max-w-full overflow-hidden",children:[u.jsx("div",{className:"relative flex h-[660px] items-center justify-center sm:h-[700px]",children:e.map((w,S)=>{const _=t6(S,n,e.length),E=_===0;return u.jsxs(co.button,{type:"button",onClick:()=>{c||m(S)},"aria-label":`Show ${w.name}`,"aria-current":E,animate:{x:_*e6,scale:E?1:.82,opacity:1,zIndex:E?10:5-Math.abs(_)},transition:{type:"spring",stiffness:260,damping:28},drag:E?"x":!1,dragConstraints:{left:0,right:0},dragElastic:.7,onDragStart:()=>f(!0),onDragEnd:b,whileDrag:{cursor:"grabbing"},style:{width:QI},className:re("glass-card absolute overflow-hidden text-left transition-[border-color] duration-300 hover:border-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",E&&"cursor-grab active:cursor-grabbing"),children:[u.jsx("div",{className:"aspect-[3/4] overflow-hidden rounded-t-xl",children:u.jsx("img",{src:w.photo,alt:w.name,draggable:!1,className:re("h-full w-full object-cover contrast-[1.05] transition-[filter] duration-500",E?"grayscale-0":"grayscale")})}),u.jsxs("div",{className:"p-6",children:[u.jsx("div",{className:"text-base font-semibold",children:w.name}),u.jsx("div",{className:"mb-3 font-mono text-[11.5px] text-primary",children:w.role}),u.jsx("p",{className:"text-[13.5px] leading-relaxed text-muted-foreground",children:w.bio})]})]},w.name)})}),u.jsx("button",{type:"button",onClick:g,"aria-label":"Previous founder",className:"absolute left-4 top-1/2 hidden h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-border bg-card/80 text-muted-foreground backdrop-blur transition-colors hover:border-primary hover:text-foreground md:flex",children:u.jsx(a4,{className:"h-5 w-5",strokeWidth:1.75})}),u.jsx("button",{type:"button",onClick:p,"aria-label":"Next founder",className:"absolute right-4 top-1/2 hidden h-10 w-10 -translate-y-1/2 items-center justify-center rounded-full border border-border bg-card/80 text-muted-foreground backdrop-blur transition-colors hover:border-primary hover:text-foreground md:flex",children:u.jsx(o4,{className:"h-5 w-5",strokeWidth:1.75})})]}),u.jsxs("div",{className:"mt-6 flex items-center justify-center gap-4",children:[u.jsx("button",{type:"button",onClick:()=>l(w=>!w),"aria-label":i?"Pause carousel":"Play carousel",className:"flex h-7 w-7 items-center justify-center rounded-full border border-border text-muted-foreground transition-colors hover:border-primary hover:text-foreground",children:i?u.jsx(Z4,{className:"h-3.5 w-3.5"}):u.jsx(ez,{className:"h-3.5 w-3.5"})}),u.jsx("div",{className:"flex gap-1.5",children:e.map((w,S)=>u.jsx("button",{type:"button",onClick:()=>m(S),"aria-label":`Go to ${w.name}`,className:re("h-1.5 rounded-full transition-all",S===n?"w-4 bg-primary":"w-1.5 bg-muted-foreground/30 hover:bg-muted-foreground/50")},w.name))})]})]})}function r6(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function s6(e,t,n=1500){const[s,i]=x.useState(0),l=x.useRef(!1);return x.useEffect(()=>{if(!t||l.current)return;if(l.current=!0,r6()){i(e);return}let c;const f=performance.now();function h(m){const g=Math.min((m-f)/n,1),p=1-Math.pow(1-g,3);i(Math.round(p*e)),g<1&&(c=requestAnimationFrame(h))}return c=requestAnimationFrame(h),()=>cancelAnimationFrame(c)},[t,e,n]),s}const a6=[{value:10,suffix:"",label:"Years of experience"},{value:30,suffix:"+",label:"Customers & partners worldwide"},{value:30,suffix:"+",label:"Scientific publications"},{value:2,suffix:"",label:"International patents"}];function D1({insetStyle:e,startAngle:t,reverse:n,duration:s,opacity:i=1}){return u.jsx(co.div,{className:"absolute",style:e,initial:{rotate:t},animate:{rotate:t+(n?-360:360)},transition:{duration:s,repeat:1/0,ease:"linear"},children:u.jsxs("span",{className:"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2",children:[u.jsx("span",{className:"absolute -inset-1 rounded-full bg-primary/30 blur-sm",style:{opacity:i}}),u.jsx("span",{className:"relative block h-1.5 w-1.5 rounded-full bg-primary",style:{opacity:i}})]})})}function Jy({size:e=56,duration:t=10,startAngle:n=0,reverse:s=!1,secondRing:i=!1,secondRingTilt3D:l=!1,className:c,children:f}){const h=_j(),g={inset:Math.round(e*.14)},p=i&&l,b=u.jsx("div",{className:"absolute rounded-full border border-primary/10",style:g}),w=u.jsx(D1,{insetStyle:g,startAngle:n+180,reverse:!s,duration:t*.7,opacity:.8});return u.jsxs("div",{className:re("relative flex shrink-0 items-center justify-center",c),style:{height:e,width:e},children:[u.jsx("div",{className:"absolute inset-0 rounded-full border border-primary/15"}),i&&(p?u.jsx("div",{className:"absolute inset-0 z-20",style:{perspective:600},children:u.jsxs("div",{className:"absolute inset-0",style:{transformStyle:"preserve-3d",transform:"rotateX(60deg)"},children:[b,!h&&w]})}):b),!h&&u.jsxs(u.Fragment,{children:[u.jsx(D1,{insetStyle:{inset:0},startAngle:n,reverse:s,duration:t}),i&&!p&&w]}),f&&u.jsx("div",{className:"relative z-10 flex items-center justify-center",children:f})]})}function i6({value:e,suffix:t,label:n,active:s,index:i}
112){const l=s6(e,s),c=7+i*1.8,f=i*90,h=i%2===1;return u.jsxs("div",{className:"text-center",children:[u.jsxs("div",{className:"relative mx-auto flex h-20 items-center justify-center md:h-24",children:[u.jsx(Jy,{size:132,duration:c,startAngle:f,reverse:h,secondRing:!0,className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),u.jsxs("div",{className:"relative z-10 font-mono text-5xl font-bold tabular-nums text-foreground md:text-6xl",children:[l,t]})]}),u.jsx("p",{className:"mt-3 font-mono text-xs uppercase tracking-[0.12em] text-muted-foreground",children:n})]})}function o6(){const{ref:e,isVisible:t}=Xy();return u.jsxs("div",{ref:e,className:"mt-16 py-8 md:py-10",children:[u.jsx(Ge,{as:"p",className:"mb-10 text-center font-mono text-xs uppercase tracking-[0.12em] text-primary md:mb-12",children:"Our achievements"}),u.jsx("div",{className:"grid grid-cols-2 gap-y-10 md:grid-cols-4 md:gap-x-6",children:a6.map((n,s)=>u.jsx(i6,{...n,active:t,index:s},n.label))})]})}function l6(){return u.jsxs("section",{id:"about",className:"relative py-16 md:py-24",children:[u.jsx(Ft,{src:zI}),u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"About us"}),u.jsx(Mr,{as:"h2",text:"Built by the researchers who invented the process",className:"text-2xl font-semibold"}),u.jsx(Ge,{delay:1,as:"p",className:"mt-[18px] text-base leading-relaxed text-muted-foreground",children:"The founding team brings more than 10 years of combined experience in Gallium Oxide research and epitaxy, underpinned by 2 international patents and 30+ scientific publications."}),u.jsx(Ge,{delay:2,className:"mt-10",children:u.jsx(n6,{founders:tC})}),u.jsx(o6,{})]})}const Ap=[{year:"2016",title:"First Semiconducting β-Ga₂O₃ Layer Grown By MOVPE Worldwide",description:"Demonstrated the first semiconducting β-Ga₂O₃ layer grown by MOVPE worldwide with variable doping between 2×10¹⁷ cm⁻³ and 3×10¹⁹ cm⁻³ but still limited electron mobility.",reference:["Baldini et al., 2016 — M. Baldini, M. Albrecht, A. Fiedler, K. Irmscher, D. Klimm, R. Schewski & G. Wagner: Semiconducting Sn-doped β-Ga₂O₃ homoepitaxial layers grown by metal organic vapour-phase epitaxy. J. Mater. Sci. 51 3650 (2016)."]},{year:"2016",title:"First Device Demonstration",description:"Demonstration of the first transistor exceeding the critical electrical breakdown field of GaN and SiC based on our β-Ga₂O₃ layer technology.",reference:["Green et al., 2016 — A. J. Green, K. D. Chabak, E. R. Heller, R. C. Fitch, M. Baldini, A. Fiedler, K. Irmscher, G. Wagner, Z. Galazka, S. E. Tetlak, A. Crespo, K. Leedy & G. H. Jessen: 3.8-MV/cm Breakdown Strength of MOVPE-Grown Sn-Doped β-Ga2O3 MOSFETs. IEEE Electron Device Letters 37, 7 (2016)."]},{year:"2017",title:"Understanding Of The Defect Formation And Influence On (100)",description:"Development of a quantitative model that addresses the influence of incoherent twin boundaries on the electrical properties in β-Ga₂O₃. Incoherent twin boundaries are generated when twinned regions coalesce during layer growth.",reference:["Fiedler et al., 2017 — A. Fiedler, R. Schewski, M. Baldini, Z. Galazka, G. Wagner, M. Albrecht & K. Irmscher: Influence of incoherent twin boundaries on the electrical properties of β-Ga2O3 layers homoepitaxially grown by metal-organic vapor phase epitaxy. J. Appl. Phys. 122, 165701 (2017)."]},{year:"2017",title:"First Demonstration Of A High Mobility β-Ga₂O₃ Layer Via MOVPE",description:"Demonstration of first β-Ga₂O₃ layers grown via MOVPE exceeding electron mobilities of 130 cm²/Vs on (010) substrates at a charge carrier concentration of 1×10¹⁷ cm⁻³.",reference:["Baldini et al., 2017 — M. Baldini, M. Albrecht, A. Fiedler, K. Irmscher, R. Schewski & G. Wagner: Si- and Sn-Doped Homoepitaxial β-Ga2O3 Layers Grown by MOVPE on (010)-Oriented Substrates. ECS Journal of Solid State Science and Technology, 6 (2) Q3040 (2017)."]},{year:"2019",title:"Pristine, Smooth Layers Via Correct Miscut Direction",description:"Thorough comprehensive studying of the crystal structure, we developed the right miscut orientation for (100) layer growth to suppress any structural defects by twinning or faceting.",reference:["Schewski et al., 2019 — R. Schewski, K. Lion, A. Fiedler, C. Wouters, A. Popp, S. V. Levchenko, T. Schulz, M. Schmidbauer, S. Bin Anooz, R. Grüneberg, Z. Galazka, G. Wagner, K. Irmscher, M. Scheffler, C. Draxl & M. Albrecht: Step-flow growth in homoepitaxy of β-Ga2O3 (100) – The influence of the miscut direction and facet
112ing. APL Mater. 7, 022515 (2019)."]},{year:"2021",title:"First High Growth-Rate (100) Step-Flow Breakthrough",description:"Growth rates over 1 µm/h using a 4° offcut that suppresses twin defects.",reference:["Chou et al., 2021 — T. S. Chou, P. Seyidov, S. Bin Anooz, R. Grüneberg, T. T. V. Tran, K. Irmscher, M. Albrecht, Z. Galazka, J. Schwarzkopf & A. Popp: Fast homoepitaxial growth of (100) β-Ga2O3 thin films via MOVPE. AIP Advances 11, 115323 (2021)."]},{year:"2022",title:"AI Integration & In-Situ Metrology",description:"In-situ reflectance spectroscopy paired with deep-learning models to control n-type Si-doping kinetics.",reference:["Chou et al., 2022 — T. S. Chou, S. Bin Anooz, R. Grüneberg, K. Irmscher, N. Dropka, J. Rehm, T. T. V. Tran, W. Miller, P. Seyidov, M. Albrecht & A. Popp: Toward Precise n-Type Doping Control in MOVPE-Grown β-Ga2O3 Thin Films by Deep-Learning Approach. Crystals 12(1), 8 (2022)."]},{year:"2023",title:"Thick Film Scaling",description:"Low-defect 4 µm thick films by suppressing parasitic particle formation.",reference:["Chou et al., 2023 — T. S. Chou, P. Seyidov, S. Bin Anooz, R. Grüneberg, M. Pietsch, J. Rehm, T. T. V. Tran, K. Tetzner, Z. Galazka, M. Albrecht, K. Irmscher, A. Fiedler & A. Popp: Suppression of particle formation by gas-phase pre-reactions in (100) MOVPE-grown β-Ga2O3 films for vertical device application. Appl. Phys. Lett. 122, 052102 (2023)."]},{year:"2025",title:"Predictive Step-Bunching Control",description:"Combined Random Forest machine learning with the classical Cabrera–Vermilyea model to definitively map and eliminate step-bunching instabilities under high-doping conditions. Extended growth frameworks to (001) surfaces.",reference:["Chou et al., 2025 — T. S. Chou, S. Bin Anooz, N. Dropka, H. H. Chen, Z. Galazka, M. Albrecht, A. Fiedler & A. Popp: Optimizing the morphology transition on MOVPE-grown (100) β-Ga2O3 film between step-flow growth and step-bunching: A machine learning-assisted approach. APL Mater. 13, 051110 (2025).","Chen et al., 2026 — H. H. Chen, T. S. Chou, S. Bin Anooz, Z. Galazka, A. Kwasniewski, S. Bergmann & A. Popp: Morphology investigation of metalorganic vapor phase epitaxy homoepitaxial (001) β-Ga2O3 growth on on-axis and 6° off-axis substrate. J. Vac. Sci. Technol. A 44, 032706 (2026)."]},{year:"2025",title:"NextGO Epi GmbH Founded",description:"IKZ incubates and spins off NextGO Epi, co-founded by Dr. Ta-Shun Chou, Dr. Andreas Popp, and Dr. Andreas Fiedler.",reference:[]}],c6=["The development of metalorganic vapor phase epitaxy (MOVPE) of beta-gallium oxide (β-Ga₂O₃) at the Leibniz-Institut für Kristallzüchtung (IKZ) in Berlin represents a highly structured bridge between fundamental surface physics and commercially scalable technology. Because β-Ga₂O₃ features an ultrawide bandgap of ~4.8 eV and an exceptionally high theoretical critical breakdown field of 8 MV/cm, it is uniquely positioned to redefine high-power switching applications.","Rather than treating epitaxy as an isolated thin-film deposition process, IKZ established a comprehensive framework coupling native crystal wafering, precise kinetic control, in-situ metrology, and deep-learning optimization. This systematic approach ultimately paved the way for the foundation of Europe's first high-power gallium oxide commercial spin-off: NextGO Epi GmbH."],u6=[{heading:"Overcoming phase and surface instabilities on the (100) and (001) planes",paragraphs:["Industrial implementation requires cost-effective wafer preparation. The monoclinic crystal system of β-Ga₂O₃ possesses a natural cleavage plane along the (100) orientation, making it the most financially viable surface for scaling. However, early attempts to grow homoepitaxial layers on flat, on-axis (100) substrates yielded dense networks of planar twin defects and stacking faults. This degradation stems from the double positioning of gallium adatoms within the complex unit cell.","IKZ bypassed this fundamental roadblock by intentionally miscutting the substrates—introducing a 4° off-orientation toward the [00-1] crystal axis. This geometry shortens the terrace width below the critical diffusion length of the gallium adatoms, causing a complete shift from highly defective tw
112o-dimensional island nucleation into an atomically pristine step-flow growth mode. (Fiedler et al., 2017; Schewski et al., 2019; Chou et al., 2021).","Beyond the (100) plane, IKZ successfully adapted this paradigm to the (001) orientation. By tuning the precise stoichiometry via the molecular input flow rate, researchers systematically mapped out the thermodynamic boundaries governing step-flow behavior across different orientations (Chen et al., 2026)."]},{heading:"High-rate growth scaling for vertical power devices",paragraphs:["For commercial high-voltage power devices (such as vertical Schottky barrier diodes or trench MOSFETs), epitaxial layers must be several micrometers thick to successfully sustain high blocking voltages. Standard wide-bandgap epitaxy typically functions at slow deposition rates to avoid structural breakdown, which creates a severe throughput bottleneck.","IKZ disrupted this limitation by developing a fast homoepitaxial process inside a vertical low-pressure showerhead reactor. By suppressing parasitic gas-phase reactions and optimizing the precursor delivery, IKZ demonstrated stable growth rates exceeding several µm/h, successfully producing highly crystalline, crack-free, Si-doped (100) films up to 3 µm thick (Chou et al., 2021). To push performance thresholds further, researchers isolated and neutralized external parasitic particulates within the chamber, enabling the stable growth of high-mobility 4 µm thick films (Chou et al., 2023)."]},{heading:"Smart growth control: AI integration and in-situ reflectance",paragraphs:["As IKZ pushed film boundaries toward higher thickness and higher doping configurations (>10¹⁸ cm⁻³), they encountered a severe crystalline defect known as step-bunching. This occurs when microstructural impurities or low supersaturation cause individual atomic steps to aggregate into large, multi-atomic ridges, which severely scatters transport electrons and degrades device breakdown metrics.","To manage this multi-variable parameter space, IKZ became a global pioneer in embedding artificial intelligence directly into the MOCVD workflow:"],bullets:[{label:"Real-time Metrology",text:"Incorporating continuous in-situ laser reflectance spectroscopy allowed researchers to map precise growth rates and instantaneously track surface morphology transitions during execution (Chou et al., 2022)."},{label:"Machine Learning Classifiers",text:"By pairing experimental data with the Cabrera–Vermilyea model, the team trained a Random Forest (RF) algorithm. This model successfully mapped the complex, non-linear boundaries between temperature, doping concentration, and precursor supersaturation, granting operators a predictive map to safely bypass step-bunching regimes (Chou et al., 2025)."},{label:"Doping Predictors",text:"Deep learning models, specifically Forest Deep Neural Networks (fDNN), were developed to precisely control n-type silicon incorporation, allowing for precise doping profiles across both the (100) and (010) planes (Chou et al., 2022)."}]}],d6={heading:"The transition to industry: the foundation of NextGO Epi GmbH",paragraphs:["By late 2024, the MOVPE group at IKZ had successfully answered the primary industrial 
112concerns surrounding gallium oxide: they achieved uniform wafer deposition, rapid growth scaling, highly reliable n-type doping control, and minimized structural defects. Crucially, their deep-learning-algorithm framework provided an automated, reproducible closed-loop process suitable for factory environments rather than just physics laboratories.","Recognizing this market readiness, IKZ incubated and successfully spun off NextGO Epi in 2025, co-founded by the leading figures of the core research team, including Dr. Ta-Shun Chou, Dr. Andreas Popp and Dr. Andreas Fiedler."]},nC=["T. S. Chou","A. Fiedler","A. Popp"],f6=new RegExp(`(${nC.map(e=>e.replace(/\./g,"\\.")).join("|")})`,"g");function M1(e){return e.split(f6).map((t,n)=>nC.includes(t)?u.jsx("strong",{className:"font-semibold text-foreground",children:t},n):t)}const rC=x.forwardRef(({item:e,index:t,isActive:n,isLast:s},i)=>u.jsxs("div",{ref:i,"data-index":t,className:re("relative",s?"pb-0":"pb-11"),children:[u.jsx("div",{className:re("absolute -left-8 top-1 h-3 w-3 rounded-full border-2 transition-all duration-[400ms]",n?"border-primary bg-primary ring-4 ring-primary/15":"border-border bg-background")}),u.jsx("div",{className:"mb-1.5 font-mono text-[13px] text-primary",children:e.year}),u.jsx("h4",{className:"mb-1.5 text-[16.5px] font-semibold normal-case",children:e.title}),u.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:M1(e.description)}),e.reference.length>0&&u.jsx("div",{className:"mt-2 space-y-1.5",children:e.reference.map((l,c)=>u.jsx("p",{className:"font-mono text-xs leading-relaxed text-muted-foreground/70",children:M1(l)},c))})]}));rC.displayName="TimelineItem";function h6(){const e=x.useRef([]),[t,n]=x.useState(0);x.useEffect(()=>{const i=e.current.filter(c=>c!==null);if(i.length===0)return;const l=new IntersectionObserver(c=>{const f=window.innerHeight*.4;c.forEach(h=>{const m=Number(h.target.dataset.index),g=h.boundingClientRect.top<f;n(g?p=>Math.max(p,m+1):p=>Math.min(p,m))})},{threshold:0,rootMargin:"-40% 0px -60% 0px"});return i.forEach(c=>l.observe(c)),()=>l.disconnect()},[]);const s=t/Ap.length*100;return u.jsxs("div",{className:"relative mt-14 pl-8",children:[u.jsx("div",{className:"absolute bottom-1.5 left-[5px] top-1.5 w-0.5 bg-border"}),u.jsx("div",{className:"absolute left-[5px] top-1.5 w-0.5 bg-primary transition-[height] duration-500 ease-out motion-reduce:transition-none",style:{height:`${s}%`}}),Ap.map((i,l)=>u.jsx(rC,{ref:c=>{e.current[l]=c},index:l,item:i,isActive:l<t,isLast:l===Ap.length-1},`${i.year}-${i.title}`))]})}const P1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,L1=Lj,ff=(e,t)=>n=>{var s;if(t?.variants==null)return L1(e,n?.class,n?.className);const{variants:i,defaultVariants:l}=t,c=Object.keys(i).map(m=>{const g=n?.[m],p=l?.[m];if(g===null)return null;const b=P1(g)||P1(p);return i[m][b]}),f=n&&Object.entries(n).reduce((m,g)=>{let[p,b]=g;return b===void 0||(m[p]=b),m},{}),h=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((m,g)=>{let{class:p,className:b,...w}=g;return Object.entries(w).every(S=>{let[_,E]=S;return Array.isArray(E)?E.includes({...l,...f}[_]):{...l,...f}[_]===E})?[...m,p,b]:m},[]);return L1(e,c,h,n?.class,n?.className)};function z1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sC(...e){return t=>{let n=!1;const s=e.map(i=>{const l=z1(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<s.length;i++){const l=s[i];typeof l=="function"?l():z1(e[i],null)}}}}function We(...e){return x.useCallback(sC(...e),e)}function uo(e){const t=m6(e),n=x.forwardRef((s,i)=>{const{children:l,...c}=s,f=x.Children.toArray(l),h=f.find(p6);if(h){const m=h.props.children,g=f.map(p=>p===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:p);return u.jsx(t,{...c,ref:i,children:x.isValidElement(m)?x.cloneElement(m,void 0,g):null})}return u.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var Zy=uo("Slot");function m6(e){const t=x.forwardRef((n,s)=>{const{children:i,...l}=n;if(x.isValidElement(i)){const c=y6(i),f=g6(l,i.props);return i.type!==x.Fragment&&(f.ref=s?sC(s,c):c),x.cloneElement(i,f)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aC=Symbol("radix.slottable");function iC(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=aC,t}function p6(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aC}function g6(e,t){const n={...t};for(const s in t){const i=e[s],l=t[s];/^on[A-Z]/.test(s)?i&&l?n[s]=(...f)=>{const h=l(...f);return i(...f),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...l}
vendor: 6,720 bytes, line 112
112:s==="className"&&(n[s]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function y6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var v6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],je=v6.reduce((e,t)=>{const n=uo(`Primitive.${t}`),s=x.forwardRef((i,l)=>{const{asChild:c,...f}=i,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(h,{...f,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function b6(e,t){e&&ic.flushSync(()=>e.dispatchEvent(t))}var oC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),x6="VisuallyHidden",lC=x.forwardRef((e,t)=>u.jsx(je.span,{...e,ref:t,style:{...oC,...e.style}}));lC.displayName=x6;var w6=lC;function S6(e,t){const n=x.createContext(t),s=l=>{const{children:c,...f}=l,h=x.useMemo(()=>f,Object.values(f));return u.jsx(n.Provider,{value:h,children:c})};s.displayName=e+"Provider";function i(l){const c=x.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,i]}function Dn(e,t=[]){let n=[];function s(l,c){const f=x.createContext(c),h=n.length;n=[...n,c];const m=p=>{const{scope:b,children:w,...S}=p,_=b?.[e]?.[h]||f,E=x.useMemo(()=>S,Object.values(S));return u.jsx(_.Provider,{value:E,children:w})};m.displayName=l+"Provider";function g(p,b){const w=b?.[e]?.[h]||f,S=x.useContext(w);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[m,g]}const i=()=>{const l=n.map(c=>x.createContext(c));return function(f){const h=f?.[e]||l;return x.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return i.scopeName=e,[s,_6(i,...t)]}function _6(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=s.reduce((f,{useScope:h,scopeName:m})=>{const p=h(l)[`__scope${m}`];return{...f,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Qy(e){const t=e+"CollectionProvider",[n,s]=Dn(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=_=>{const{scope:E,children:j}=_,C=te.useRef(null),A=te.useRef(new Map).current;return u.jsx(i,{scope:E,itemMap:A,collectionRef:C,children:j})};c.displayName=t;const f=e+"CollectionSlot",h=uo(f),m=te.forwardRef((_,E)=>{const{scope:j,children:C}=_,A=l(f,j),k=We(E,A.collectionRef);return u.jsx(h,{ref:k,children:C})});m.displayName=f;const g=e+"CollectionItemSlot",p="data-radix-collection-item",b=uo(g),w=te.forwardRef((_,E)=>{const{scope:j,children:C,...A}=_,k=te.useRef(null),D=We(E,k),B=l(g,j);return te.useEffect(()=>(B.itemMap.set(k,{ref:k,...A}),()=>{B.itemMap.delete(k)})),u.jsx(b,{[p]:"",ref:D,children:C})});w.displayName=g;function S(_){const E=l(e+"CollectionConsumer",_);return te.useCallback(()=>{const C=E.collectionRef.current;if(!C)return[];const A=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((B,L)=>A.indexOf(B.ref.current)-A.indexOf(L.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:c,Slot:m,ItemSlot:w},S,s]}function Ae(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var At=globalThis?.document?x.useLayoutEffect:()=>{},E6=hE[" useInsertionEffect ".trim().toString()]||At;function dr({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,l,c]=T6({defaultProp:t,onChange:n}),f=e!==void 0,h=f?e:i;{const g=x.useRef(e!==void 0);x.useEffect(()=>{const p=g.current;p!==f&&console.warn(`${s} is changing from ${p?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,s])}const m=x.useCallback(g=>{if(f){const p=j6(g)?g(e):g;p!==e&&c.current?.(p)}else l(g)},[f,e,l,c]);return[h,m]}function T6({defaultProp:e,onChange:t}){const[n,s]=x.useState(e),i=x.useRef(n),l=x.useRef(t);return E6(()=>{l.current=t},[t]),x.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,s,l]}function j6(e){return typeof e=="function"}function C6(e,t){return x.useReducer((n,s)=>t[n][s]??n,e)}var ms=e=>{const{present:t,children:n}=e,s=A6(t),i=typeof n=="function"?n({present:s.isPresent}):x.Children.only(n),l=We(s.ref,N6(i));return typeof n=="function"||s.isPresent?x.cloneElement(i,{ref:l}):null};ms.displayName="Presence";function A6(e){const[t,n]=x.useState(),s=x.useRef(null),i=x.useRef(e),l=x.useRef("none"),c=e?"mounted":"unmounted",[f,h]=C6(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const m=Iu(s.current);l.current=f==="mounted"?m:"none"},[f]),At(()=>{const m=s.current,g=i.current;if(g!==e){const b=l.current,w=Iu(m);e?h("MOUNT"):w==="none"||m?.display==="none"?h("UNMOUNT"):h(g&&b!==w?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,h]),At(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,p=w=>{const _=Iu(s.current).includes(CSS.escape(w.animationName));if(w.target===t&&_&&(h("ANIMATION_END"),!i.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},b=w=>{w.target===t&&(l.current=Iu(s.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:x.useCallback(m=>{s.current=m?getComputedStyle(m):null,n(m)},[])}}function Iu(e){return e?.animationName||"none"}function N6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var k6=hE[" useId ".trim().toString()]||(()=>{}),R6=0;function cr(e){const[t,n]=x.useState(k6());return At(()=>{n(s=>s??String(R6++))},[e]),e||(t?`radix-${t}`:"")}var hf="Collapsible",[O6,cC]=Dn(hf),[D6,ev]=O6(hf),uC=x.forwardRef((e,t)=>
112{const{__scopeCollapsible:n,open:s,defaultOpen:i,disabled:l,onOpenChange:c,...f}=e,[h,m]=dr({prop:s,defaultProp:i??!1,onChange:c,caller:hf});return u.jsx(D6,{scope:n,disabled:l,contentId:cr(),open:h,onOpenToggle:x.useCallback(()=>m(g=>!g),[m]),children:u.jsx(je.div,{"data-state":nv(h),"data-disabled":l?"":void 0,...f,ref:t})})});uC.displayName=hf;var dC="CollapsibleTrigger",fC=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...s}=e,i=ev(dC,n);return u.jsx(je.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":nv(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...s,ref:t,onClick:Ae(e.onClick,i.onOpenToggle)})});fC.displayName=dC;var tv="CollapsibleContent",hC=x.forwardRef((e,t)=>{const{forceMount:n,...s}=e,i=ev(tv,e.__scopeCollapsible);return u.jsx(ms,{present:n||i.open,children:({present:l})=>u.jsx(M6,{...s,ref:t,present:l})})});hC.displayName=tv;var M6=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:s,children:i,...l}=e,c=ev(tv,n),[f,h]=x.useState(s),m=x.useRef(null),g=We(t,m),p=x.useRef(0),b=p.current,w=x.useRef(0),S=w.current,_=c.open||f,E=x.useRef(_),j=x.useRef(void 0);return x.useEffect(()=>{const C=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(C)},[]),At(()=>{const C=m.current;if(C){j.current=j.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const A=C.getBoundingClientRect();p.current=A.height,w.current=A.width,E.current||(C.style.transitionDuration=j.current.transitionDuration,C.style.animationName=j.current.animationName),h(s)}},[c.open,s]),u.jsx(je.div,{"data-state":nv(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!_,...l,ref:g,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":S?`${S}px`:void 0,...e.style},children:_&&i})});function nv(e){return e?"open":"closed"}var P6=uC,L6=fC,z6=hC,I6=x.createContext(void 0);function mf(e){const t=x.useContext(I6);return e||t||"ltr"}var mr="Accordion",B6=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[rv,U6,V6]=Qy(mr),[pf]=Dn(mr,[V6,cC]),sv=cC(),mC=te.forwardRef((e,t)=>{const{type:n,...s}=e,i=s,l=s;return u.jsx(rv.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?u.jsx(q6,{...l,ref:t}):u.jsx(G6,{...i,ref:t})})});mC.displayName=mr;var[pC,$6]=pf(mr),[gC,H6]=pf(mr,{collapsible:!1}),G6=te.forwardRef((e,t)=>{const{value:n,defaultValue:s,onValueChange:i=()=>{},collapsible:l=!1,...c}=e,[f,h]=dr({prop:n,defaultProp:s??"",onChange:i,caller:mr});return u.jsx(pC,{scope:e.__scopeAccordion,value:te.useMemo(()=>f?[f]:[],[f]),onItemOpen:h,onItemClose:te.useCallback(()=>l&&h(""),[l,h]),children:u.jsx(gC,{scope:e.__scopeAccordion,collapsible:l,children:u.jsx(yC,{...c,ref:t})})})}),q6=te.forwardRef((e,t)=>{const{value:n,defaultValue:s,onValueChange:i=()=>{},...l}=e,[c,f]=dr({prop:n,defaultProp:s??[],onChange:i,caller:mr}),h=te.useCallback(g=>f((p=[])=>[...p,g]),[f]),m=te.useCallback(g=>f((p=[])=>p.filter(b=>b!==g)),[f]);return u.jsx(pC,{scope:e.__scopeAccordion,value:c,onItemOpen:h,onItemClose:m,children:u.jsx(gC,{scope:e.__scopeAccordion,collapsible:!0,children:u.jsx(yC,{...l,ref:t})})})}),[F6,gf]=pf(mr),yC=te.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:s,dir:i,orientation:l="vertical",...c}=e,f=te.useRef(null),h=We(f,t),m=U6(n),p=mf(i)==="ltr",b=Ae(e.onKeyDown,w=>{if(!B6.includes(w.key))return;const S=w.target,_=m().filter(P=>!P.ref.current?.disabled),E=_.findIndex(P=>P.ref.current===S),j=_.length;if(E===-1)return;w.preventDefault();let C=E;const A=0,k=j-1,D=()=>{C=E+1,C>k&&(C=A)},B=()=>{C=E-1,C<A&&(C=k)};switch(w.key){case"Home":C=A;break;case"End":C=k;break;case"ArrowRight":l==="horizontal"&&(p?D():B());break;case"ArrowDown":l==="vertical"&&D();break;case"ArrowLeft":l==="horizontal"&&(p?B():D());break;case"ArrowUp":l==="vertical"&&B();break}const L=C%j;_[L].ref.current?.focus()});return u.jsx(F6,{scope:n,disabled:s,direction:i,orientation:l,children:u.jsx(rv.Slot,{scope:n,children:u.jsx(je.div,{...c,"data-orientation":l,ref:h,onKeyDown:s?void 0:b})})})}),Pd="AccordionItem",[K6,av]=pf(Pd),vC=te.forwardRef((e,t)=>
vendor: 5,226 bytes, line 112
112{const{__scopeAccordion:n,value:s,...i}=e,l=gf(Pd,n),c=$6(Pd,n),f=sv(n),h=cr(),m=s&&c.value.includes(s)||!1,g=l.disabled||e.disabled;return u.jsx(K6,{scope:n,open:m,disabled:g,triggerId:h,children:u.jsx(P6,{"data-orientation":l.orientation,"data-state":EC(m),...f,...i,ref:t,disabled:g,open:m,onOpenChange:p=>{p?c.onItemOpen(s):c.onItemClose(s)}})})});vC.displayName=Pd;var bC="AccordionHeader",xC=te.forwardRef((e,t)=>{const{__scopeAccordion:n,...s}=e,i=gf(mr,n),l=av(bC,n);return u.jsx(je.h3,{"data-orientation":i.orientation,"data-state":EC(l.open),"data-disabled":l.disabled?"":void 0,...s,ref:t})});xC.displayName=bC;var Ng="AccordionTrigger",wC=te.forwardRef((e,t)=>{const{__scopeAccordion:n,...s}=e,i=gf(mr,n),l=av(Ng,n),c=H6(Ng,n),f=sv(n);return u.jsx(rv.ItemSlot,{scope:n,children:u.jsx(L6,{"aria-disabled":l.open&&!c.collapsible||void 0,"data-orientation":i.orientation,id:l.triggerId,...f,...s,ref:t})})});wC.displayName=Ng;var SC="AccordionContent",_C=te.forwardRef((e,t)=>{const{__scopeAccordion:n,...s}=e,i=gf(mr,n),l=av(SC,n),c=sv(n);return u.jsx(z6,{role:"region","aria-labelledby":l.triggerId,"data-orientation":i.orientation,...c,...s,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});_C.displayName=SC;function EC(e){return e?"open":"closed"}var W6=mC,Y6=vC,X6=xC,J6=wC,Z6=_C;function ds(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current?.(...n),[])}function Q6(e,t=globalThis?.document){const n=ds(e);x.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var eB="DismissableLayer",kg="dismissableLayer.update",tB="dismissableLayer.pointerDownOutside",nB="dismissableLayer.focusOutside",I1,TC=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yf=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...h}=e,m=x.useContext(TC),[g,p]=x.useState(null),b=g?.ownerDocument??globalThis?.document,[,w]=x.useState({}),S=We(t,L=>p(L)),_=Array.from(m.layers),[E]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=_.indexOf(E),C=g?_.indexOf(g):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,k=C>=j,D=aB(L=>{const P=L.target,U=[...m.branches].some(z=>z.contains(P));!k||U||(i?.(L),c?.(L),L.defaultPrevented||f?.())},b),B=iB(L=>{const P=L.target;[...m.branches].some(z=>z.contains(P))||(l?.(L),c?.(L),L.defaultPrevented||f?.())},b);return Q6(L=>{C===m.layers.size-1&&(s?.(L),!L.defaultPrevented&&f&&(L.preventDefault(),f()))},b),x.useEffect(()=>{if(g)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(I1=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),B1(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=I1)}},[g,b,n,m]),x.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),B1())},[g,m]),x.useEffect(()=>{const L=()=>w({});return document.addEventListener(kg,L),()=>document.removeEventListener(kg,L)},[]),u.jsx(je.div,{...h,ref:S,style:{pointerEvents:A?k?"auto":"none":void 0,...e.style},onFocusCapture:Ae(e.onFocusCapture,B.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)})});yf.displayName=eB;var rB="DismissableLayerBranch",sB=x.forwardRef((e,t)=>{const n=x.useContext(TC),s=x.useRef(null),i=We(t,s);return x.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),u.jsx(je.div,{...e,ref:i})});sB.displayName=rB;function aB(e,t=globalThis?.document){const n=ds(e),s=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const l=f=>{if(f.target&&!s.current){let h=function(){jC(tB,n,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=h,t.addEventListener("click",i.current,{once:!0})):h()}else t.removeEventListener("click",i.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function iB(e,t=globalThis?.document){const n=ds(e),s=x.useRef(!1);return x.useEffect(()=>{const i=l=>{l.target&&!s.current&&jC(nB,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function B1(){const e=new CustomEvent(kg);document.dispatchEvent(e)}function jC(e,t,n,{discrete:s}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?b6(i,l):i.dispatchEvent(l)}var Np="focusScope.autoFocusOnMount",kp="focusScope.autoFocusOnUnmount",U1={bubbles:!1,cancelable:!0},oB="FocusScope",iv=x.forwardRef((e,t)=>
vendor: 4,433 bytes, line 112
112{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[f,h]=x.useState(null),m=ds(i),g=ds(l),p=x.useRef(null),b=We(t,_=>h(_)),w=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(s){let _=function(A){if(w.paused||!f)return;const k=A.target;f.contains(k)?p.current=k:Ks(p.current,{select:!0})},E=function(A){if(w.paused||!f)return;const k=A.relatedTarget;k!==null&&(f.contains(k)||Ks(p.current,{select:!0}))},j=function(A){if(document.activeElement===document.body)for(const D of A)D.removedNodes.length>0&&Ks(f)};document.addEventListener("focusin",_),document.addEventListener("focusout",E);const C=new MutationObserver(j);return f&&C.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",E),C.disconnect()}}},[s,f,w.paused]),x.useEffect(()=>{if(f){$1.add(w);const _=document.activeElement;if(!f.contains(_)){const j=new CustomEvent(Np,U1);f.addEventListener(Np,m),f.dispatchEvent(j),j.defaultPrevented||(lB(hB(CC(f)),{select:!0}),document.activeElement===_&&Ks(f))}return()=>{f.removeEventListener(Np,m),setTimeout(()=>{const j=new CustomEvent(kp,U1);f.addEventListener(kp,g),f.dispatchEvent(j),j.defaultPrevented||Ks(_??document.body,{select:!0}),f.removeEventListener(kp,g),$1.remove(w)},0)}}},[f,m,g,w]);const S=x.useCallback(_=>{if(!n&&!s||w.paused)return;const E=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,j=document.activeElement;if(E&&j){const C=_.currentTarget,[A,k]=cB(C);A&&k?!_.shiftKey&&j===k?(_.preventDefault(),n&&Ks(A,{select:!0})):_.shiftKey&&j===A&&(_.preventDefault(),n&&Ks(k,{select:!0})):j===C&&_.preventDefault()}},[n,s,w.paused]);return u.jsx(je.div,{tabIndex:-1,...c,ref:b,onKeyDown:S})});iv.displayName=oB;function lB(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(Ks(s,{select:t}),document.activeElement!==n)return}function cB(e){const t=CC(e),n=V1(t,e),s=V1(t.reverse(),e);return[n,s]}function CC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function V1(e,t){for(const n of e)if(!uB(n,{upTo:t}))return n}function uB(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function dB(e){return e instanceof HTMLInputElement&&"select"in e}function Ks(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dB(e)&&t&&e.select()}}var $1=fB();function fB(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=H1(e,t),e.unshift(t)},remove(t){e=H1(e,t),e[0]?.resume()}}}function H1(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function hB(e){return e.filter(t=>t.tagName!=="A")}var mB="Portal",vf=x.forwardRef((e,t)=>{const{container:n,...s}=e,[i,l]=x.useState(!1);At(()=>l(!0),[]);const c=n||i&&globalThis?.document?.body;return c?zE.createPortal(u.jsx(je.div,{...s,ref:t}),c):null});vf.displayName=mB;var Rp=0;function AC(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??G1()),document.body.insertAdjacentElement("beforeend",e[1]??G1()),Rp++,()=>{Rp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Rp--}},[])}function G1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ar=function(){return Ar=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Ar.apply(this,arguments)};function wo(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}function pB(e,t,n,s){function i(l){return l instanceof n?l:new n(function(c){c(l)})}
vendor: 5,268 bytes, lines 112-127
112return new(n||(n=Promise))(function(l,c){function f(g){try{m(s.next(g))}catch(p){c(p)}}function h(g){try{m(s.throw(g))}catch(p){c(p)}}function m(g){g.done?l(g.value):i(g.value).then(f,h)}m((s=s.apply(e,t||[])).next())})}function gB(e,t,n){if(n||arguments.length===2)for(var s=0,i=t.length,l;s<i;s++)(l||!(s in t))&&(l||(l=Array.prototype.slice.call(t,0,s)),l[s]=t[s]);return e.concat(l||Array.prototype.slice.call(t))}var gd="right-scroll-bar-position",yd="width-before-scroll-bar",yB="with-scroll-bars-hidden",vB="--removed-body-scroll-bar-size";function Op(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function bB(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=t,n.facade}var xB=typeof window<"u"?x.useLayoutEffect:x.useEffect,q1=new WeakMap;function wB(e,t){var n=bB(null,function(s){return e.forEach(function(i){return Op(i,s)})});return xB(function(){var s=q1.get(n);if(s){var i=new Set(s),l=new Set(e),c=n.current;i.forEach(function(f){l.has(f)||Op(f,null)}),l.forEach(function(f){i.has(f)||Op(f,c)})}q1.set(n,e)},[e]),n}function SB(e){return e}function _B(e,t){t===void 0&&(t=SB);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,s);return n.push(c),function(){n=n.filter(function(f){return f!==c})}},assignSyncMedium:function(l){for(s=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(f){return l(f)},filter:function(){return n}}},assignMedium:function(l){s=!0;var c=[];if(n.length){var f=n;n=[],f.forEach(l),c=n}var h=function(){var g=c;c=[],g.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(g){c.push(g),m()},filter:function(g){return c=c.filter(g),n}}}};return i}function EB(e){e===void 0&&(e={});var t=_B(null);return t.options=Ar({async:!0,ssr:!1},e),t}var NC=function(e){var t=e.sideCar,n=wo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return x.createElement(s,Ar({},n))};NC.isSideCarExport=!0;function TB(e,t){return e.useMedium(t),NC}var kC=EB(),Dp=function(){},bf=x.forwardRef(function(e,t){var n=x.useRef(null),s=x.useState({onScrollCapture:Dp,onWheelCapture:Dp,onTouchMoveCapture:Dp}),i=s[0],l=s[1],c=e.forwardProps,f=e.children,h=e.className,m=e.removeScrollBar,g=e.enabled,p=e.shards,b=e.sideCar,w=e.noRelative,S=e.noIsolation,_=e.inert,E=e.allowPinchZoom,j=e.as,C=j===void 0?"div":j,A=e.gapMode,k=wo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=b,B=wB([n,t]),L=Ar(Ar({},k),i);return x.createElement(x.Fragment,null,g&&x.createElement(D,{sideCar:kC,removeScrollBar:m,shards:p,noRelative:w,noIsolation:S,inert:_,setCallbacks:l,allowPinchZoom:!!E,lockRef:n,gapMode:A}),c?x.cloneElement(x.Children.only(f),Ar(Ar({},L),{ref:B})):x.createElement(C,Ar({},L,{className:h,ref:B}),f))});bf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bf.classNames={fullWidth:yd,zeroRight:gd};var jB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jB();return t&&e.setAttribute("nonce",t),e}function AB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function NB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=CB())&&(AB(t,n),NB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},RB=function(){var e=kB();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},RC=function(){var e=RB(),t=function(n){var s=n.styles,i=n.dynamic;return e(s,i),null};return t},OB={left:0,top:0,right:0,gap:0},Mp=function(e){return parseInt(e||"",10)||0},DB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Mp(n),Mp(s),Mp(i)]},MB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return OB;var t=DB(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},PB=RC(),eo="data-scroll-locked",LB=function(e,t,n,s){var i=e.left,l=e.top,c=e.right,f=e.gap;return n===void 0&&(n="margin"),`
113  .`.concat(yB,` {
114   overflow: hidden `).concat(s,`;
115   padding-right: `).concat(f,"px ").concat(s,`;
116  }
117  body[`).concat(eo,`] {
118    overflow: hidden `).concat(s,`;
119    overscroll-behavior: contain;
120    `).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
121    padding-left: `.concat(i,`px;
122    padding-top: `).concat(l,`px;
123    padding-right: `).concat(c,`px;
124    margin-left:0;
125    margin-top:0;
126    margin-right: `).concat(f,"px ").concat(s,`;
127    `),n==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";
127")].filter(Boolean).join(""),`
128  }
129  
130  .`).concat(gd,` {
131    right: `).concat(f,"px ").concat(s,`;
132  }
133  
134  .`).concat(yd,` {
135    margin-right: `).concat(f,"px ").concat(s,`;
136  }
137  
138  .`).concat(gd," .").concat(gd,` {
139    right: 0 `).concat(s,`;
140  }
141  
142  .`).concat(yd," .").concat(yd,` {
143    margin-right: 0 `).concat(s,`;
144  }
145  
146  body[`).concat(eo,`] {
147    `).concat(vB,": ").concat(f,`px;
148  }
149`)},F1=function(){var e=parseInt(document.body.getAttribute(eo)||"0",10);return isFinite(e)?e:0},zB=function(){x.useEffect(function(){return document.body.setAttribute(eo,(F1()+1).toString()),function(){var e=F1()-1;e<=0?document.body.removeAttribute(eo):document.body.setAttribute(eo,e.toString())}},[])},IB=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;zB();var l=x.useMemo(function(){return MB(i)},[i]);return x.createElement(PB,{styles:LB(l,!t,i,n?"":"!important")})},Rg=!1;if(typeof window<"u")try{var Bu=Object.defineProperty({},"passive",{get:function(){return Rg=!0,!0}});window.addEventListener("test",Bu,Bu),window.removeEventListener("test",Bu,Bu)}catch{Rg=!1}var Bi=Rg?{passive:!1}:!1,BB=function(e){return e.tagName==="TEXTAREA"},OC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!BB(e)&&n[t]==="visible")},UB=function(e){return OC(e,"overflowY")},VB=function(e){return OC(e,"overflowX")},K1=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=DC(e,s);if(i){var l=MC(e,s),c=l[1],f=l[2];if(c>f)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},$B=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},HB=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},DC=function(e,t){return e==="v"?UB(t):VB(t)},MC=function(e,t){return e==="v"?$B(t):HB(t)},GB=function(e,t){return e==="h"&&t==="rtl"?-1:1},qB=function(e,t,n,s,i){var l=GB(e,window.getComputedStyle(t).direction),c=l*s,f=n.target,h=t.contains(f),m=!1,g=c>0,p=0,b=0;do{if(!f)break;var w=MC(e,f),S=w[0],_=w[1],E=w[2],j=_-E-l*S;(S||j)&&DC(e,f)&&(p+=j,b+=S);var C=f.parentNode;f=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(g&&Math.abs(p)<1||!g&&Math.abs(b)<1)&&(m=!0),m},Uu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W1=function(e){return[e.deltaX,e.deltaY]},Y1=function(e){return e&&"current"in e?e.current:e},FB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KB=function(e){return`
150  .block-interactivity-`.concat(e,` {pointer-events: none;}
151  .allow-interactivity-`).concat(e,` {pointer-events: all;}
152`)},WB=0,Ui=[];function YB(e){var t=x.useRef([]),n=x.useRef([0,0]),s=x.useRef(),i=x.useState(WB++)[0],l=x.useState(RC)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var _=gB([e.lockRef.current],(e.shards||[]).map(Y1),!0).filter(Boolean);return _.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=x.useCallback(function(_,E){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!c.current.allowPinchZoom;var j=Uu(_),C=n.current,A="deltaX"in _?_.deltaX:C[0]-j[0],k="deltaY"in _?_.deltaY:C[1]-j[1],D,B=_.target,L=Math.abs(A)>Math.abs(k)?"h":"v";if("touches"in _&&L==="h"&&B.type==="range")return!1;var P=window.getSelection(),U=P&&P.anchorNode,z=U?U===B||U.contains(B):!1;if(z)return!1;var Y=K1(L,B);if(!Y)return!0;if(Y?D=L:(D=L==="v"?"h":"v",Y=K1(L,B)),!Y)return!1;if(!s.current&&"changedTouches"in _&&(A||k)&&(s.current=D),!D)return!0;var se=s.current||D;return qB(se,E,_,se==="h"?A:k)},[]),h=x.useCallback(function(_){var E=_;if(!(!Ui.length||Ui[Ui.length-1]!==l)){var j="deltaY"in E?W1(E):Uu(E),C=t.current.filter(function(D){return D.name===E.type&&(D.target===E.target||E.target===D.shadowParent)&&FB(D.delta,j)})[0];
vendor: 8,477 bytes, lines 152-156
152if(C&&C.should){E.cancelable&&E.preventDefault();return}if(!C){var A=(c.current.shards||[]).map(Y1).filter(Boolean).filter(function(D){return D.contains(E.target)}),k=A.length>0?f(E,A[0]):!c.current.noIsolation;k&&E.cancelable&&E.preventDefault()}}},[]),m=x.useCallback(function(_,E,j,C){var A={name:_,delta:E,target:j,should:C,shadowParent:XB(j)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(k){return k!==A})},1)},[]),g=x.useCallback(function(_){n.current=Uu(_),s.current=void 0},[]),p=x.useCallback(function(_){m(_.type,W1(_),_.target,f(_,e.lockRef.current))},[]),b=x.useCallback(function(_){m(_.type,Uu(_),_.target,f(_,e.lockRef.current))},[]);x.useEffect(function(){return Ui.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Bi),document.addEventListener("touchmove",h,Bi),document.addEventListener("touchstart",g,Bi),function(){Ui=Ui.filter(function(_){return _!==l}),document.removeEventListener("wheel",h,Bi),document.removeEventListener("touchmove",h,Bi),document.removeEventListener("touchstart",g,Bi)}},[]);var w=e.removeScrollBar,S=e.inert;return x.createElement(x.Fragment,null,S?x.createElement(l,{styles:KB(i)}):null,w?x.createElement(IB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function XB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const JB=TB(kC,YB);var ov=x.forwardRef(function(e,t){return x.createElement(bf,Ar({},e,{ref:t,sideCar:JB}))});ov.classNames=bf.classNames;var ZB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vi=new WeakMap,Vu=new WeakMap,$u={},Pp=0,PC=function(e){return e&&(e.host||PC(e.parentNode))},QB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=PC(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},eU=function(e,t,n,s){var i=QB(t,Array.isArray(e)?e:[e]);$u[n]||($u[n]=new WeakMap);var l=$u[n],c=[],f=new Set,h=new Set(i),m=function(p){!p||f.has(p)||(f.add(p),m(p.parentNode))};i.forEach(m);var g=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))g(b);else try{var w=b.getAttribute(s),S=w!==null&&w!=="false",_=(Vi.get(b)||0)+1,E=(l.get(b)||0)+1;Vi.set(b,_),l.set(b,E),c.push(b),_===1&&S&&Vu.set(b,!0),E===1&&b.setAttribute(n,"true"),S||b.setAttribute(s,"true")}catch(j){console.error("aria-hidden: cannot operate on ",b,j)}})};return g(t),f.clear(),Pp++,function(){c.forEach(function(p){var b=Vi.get(p)-1,w=l.get(p)-1;Vi.set(p,b),l.set(p,w),b||(Vu.has(p)||p.removeAttribute(s),Vu.delete(p)),w||p.removeAttribute(n)}),Pp--,Pp||(Vi=new WeakMap,Vi=new WeakMap,Vu=new WeakMap,$u={})}},LC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=ZB(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),eU(s,i,n,"aria-hidden")):function(){return null}},xf="Dialog",[zC,IC]=Dn(xf),[tU,pr]=zC(xf),BC=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,f=x.useRef(null),h=x.useRef(null),[m,g]=dr({prop:s,defaultProp:i??!1,onChange:l,caller:xf});return u.jsx(tU,{scope:t,triggerRef:f,contentRef:h,contentId:cr(),titleId:cr(),descriptionId:cr(),open:m,onOpenChange:g,onOpenToggle:x.useCallback(()=>g(p=>!p),[g]),modal:c,children:n})};BC.displayName=xf;var UC="DialogTrigger",VC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=pr(UC,n),l=We(t,i.triggerRef);return u.jsx(je.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":uv(i.open),...s,ref:l,onClick:Ae(e.onClick,i.onOpenToggle)})});VC.displayName=UC;var lv="DialogPortal",[nU,$C]=zC(lv,{forceMount:void 0}),HC=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,l=pr(lv,t);return u.jsx(nU,{scope:t,forceMount:n,children:x.Children.map(s,c=>u.jsx(ms,{present:n||l.open,children:u.jsx(vf,{asChild:!0,container:i,children:c})}))})};HC.displayName=lv;var Ld="DialogOverlay",GC=x.forwardRef((e,t)=>{const n=$C(Ld,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,l=pr(Ld,e.__scopeDialog);return l.modal?u.jsx(ms,{present:s||l.open,children:u.jsx(sU,{...i,ref:t})}):null});GC.displayName=Ld;var rU=uo("DialogOverlay.RemoveScroll"),sU=x.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=pr(Ld,n);return u.jsx(ov,{as:rU,allowPinchZoom:!0,shards:[i.contentRef],children:u.jsx(je.div,{"data-state":uv(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Ka="DialogContent",qC=x.forwardRef((e,t)=>{const n=$C(Ka,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,l=pr(Ka,e.__scopeDialog);return u.jsx(ms,{present:s||l.open,children:l.modal?u.jsx(aU,{...i,ref:t}):u.jsx(iU,{...i,ref:t})})});qC.displayName=Ka;var aU=x.forwardRef((e,t)=>{const n=pr(Ka,e.__scopeDialog),s=x.useRef(null),i=We(t,n.contentRef,s);return x.useEffect(()=>{const l=s.current;if(l)return LC(l)},[]),u.jsx(FC,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&l.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,l=>l.preventDefault())})}),iU=x.forwardRef((e,t)=>{const n=pr(Ka,e.__scopeDialog),s=x.useRef(!1),i=x.useRef(!1);return u.jsx(FC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(s.current||n.triggerRef.current?.focus(),l.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;n.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),FC=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,f=pr(Ka,n),h=x.useRef(null),m=We(t,h);return AC(),u.jsxs(u.Fragment,{children:[u.jsx(iv,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:l,children:u.jsx(yf,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":uv(f.open),...c,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(lU,{titleId:f.titleId}),u.jsx(uU,{contentRef:h,descriptionId:f.descriptionId})]})]})}),cv="DialogTitle",KC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=pr(cv,n);return u.jsx(je.h2,{id:i.titleId,...s,ref:t})});KC.displayName=cv;var WC="DialogDescription",YC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=pr(WC,n);return u.jsx(je.p,{id:i.descriptionId,...s,ref:t})});YC.displayName=WC;var XC="DialogClose",JC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=pr(XC,n);return u.jsx(je.button,{type:"button",...s,ref:t,onClick:Ae(e.onClick,()=>i.onOpenChange(!1))})});JC.displayName=XC;function uv(e){return e?"open":"closed"}var ZC="DialogTitleWarning",[oU,QC]=S6(ZC,{contentName:Ka,titleName:cv,docsSlug:"dialog"}),lU=({titleId:e})=>{const t=QC(ZC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
153
154If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
155
156For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},cU="DialogDescriptionWarning",uU=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${QC(cU).contentName}}.`;return x.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},dv=BC,dU=VC,fv=HC,hv=GC,mv=qC,pv=KC,eA=YC,wf=JC,tA="AlertDialog",[fU]=Dn(tA,[IC]),ps=IC(),nA=e=>{const{__scopeAlertDialog:t,...n}=e,s=ps(t);return u.jsx(dv,{...s,...n,modal:!0})};nA.displayName=tA;var hU="AlertDialogTrigger",rA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=ps(n);return u.jsx(dU,{...i,...s,ref:t})});rA.displayName=hU;var mU="AlertDialogPortal",sA=e=>{const{__scopeAlertDialog:t,...n}=e,s=ps(t);return u.jsx(fv,{...s,...n})};sA.displayName=mU;var pU="AlertDialogOverlay",aA=x.forwardRef((e,t)=>
156{const{__scopeAlertDialog:n,...s}=e,i=ps(n);return u.jsx(hv,{...i,...s,ref:t})});aA.displayName=pU;var to="AlertDialogContent",[gU,yU]=fU(to),vU=iC("AlertDialogContent"),iA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:s,...i}=e,l=ps(n),c=x.useRef(null),f=We(t,c),h=x.useRef(null);return u.jsx(oU,{contentName:to,titleName:oA,docsSlug:"alert-dialog",children:u.jsx(gU,{scope:n,cancelRef:h,children:u.jsxs(mv,{role:"alertdialog",...l,...i,ref:f,onOpenAutoFocus:Ae(i.onOpenAutoFocus,m=>{m.preventDefault(),h.current?.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[u.jsx(vU,{children:s}),u.jsx(xU,{contentRef:c})]})})})});iA.displayName=to;var oA="AlertDialogTitle",lA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=ps(n);return u.jsx(pv,{...i,...s,ref:t})});lA.displayName=oA;var cA="AlertDialogDescription",uA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=ps(n);return u.jsx(eA,{...i,...s,ref:t})});uA.displayName=cA;var bU="AlertDialogAction",dA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,i=ps(n);return u.jsx(wf,{...i,...s,ref:t})});dA.displayName=bU;var fA="AlertDialogCancel",hA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,{cancelRef:i}=yU(fA,n),l=ps(n),c=We(t,i);return u.jsx(wf,{...l,...s,ref:c})});hA.displayName=fA;var xU=({contentRef:e})=>{const t=`\`${to}\` requires a description for the component to be accessible for screen reader users.
157
158You can add a description to the \`${to}\` by passing a \`${cA}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
159
160Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${to}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
161
162For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return x.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},wU=nA,SU=rA,_U=sA,EU=aA,TU=iA,jU=dA,CU=hA,AU=lA,NU=uA,Lp={exports:{}},zp={};var X1;function kU(){if(X1)return zp;X1=1;var e=Xd();function t(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var n=typeof Object.is=="function"?Object.is:t,s=e.useState,i=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function f(p,b){var w=b(),S=s({inst:{value:w,getSnapshot:b}}),_=S[0].inst,E=S[1];return l(function(){_.value=w,_.getSnapshot=b,h(_)&&E({inst:_})},[p,w,b]),i(function(){return h(_)&&E({inst:_}),p(function(){h(_)&&E({inst:_})})},[p]),c(w),w}function h(p){var b=p.getSnapshot;p=p.value;try{var w=b();return!n(p,w)}catch{return!0}}function m(p,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return zp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,zp}var J1;function RU(){return J1||(J1=1,Lp.exports=kU()),Lp.exports}var OU=RU();function DU(){return OU.useSyncExternalStore(MU,()=>!0,()=>!1)}function MU(){return()=>{}}var gv="Avatar",[PU]=Dn(gv),[LU,mA]=PU(gv),pA=x.forwardRef((e,t)=>{const{__scopeAvatar:n,...s}=e,[i,l]=x.useState("idle");return u.jsx(LU,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:l,children:u.jsx(je.span,{...s,ref:t})})});pA.displayName=gv;var gA="AvatarImage",zU=x.forwardRef((e,t)=>{const{__scopeAvatar:n,src:s,onLoadingStatusChange:i=()=>{},...l}=e,c=mA(gA,n),f=IU(s,l),h=ds(m=>{i(m),c.onImageLoadingStatusChange(m)});return At(()=>{f!=="idle"&&h(f)},[f,h]),f==="loaded"?u.jsx(je.img,{...l,ref:t,src:s}):null});zU.displayName=gA;var yA="AvatarFallback",vA=x.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:s,...i}
vendor: 4,809 bytes, line 162
162=e,l=mA(yA,n),[c,f]=x.useState(s===void 0);return x.useEffect(()=>{if(s!==void 0){const h=window.setTimeout(()=>f(!0),s);return()=>window.clearTimeout(h)}},[s]),c&&l.imageLoadingStatus!=="loaded"?u.jsx(je.span,{...i,ref:t}):null});vA.displayName=yA;function Z1(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function IU(e,{referrerPolicy:t,crossOrigin:n}){const s=DU(),i=x.useRef(null),l=s?(i.current||(i.current=new window.Image),i.current):null,[c,f]=x.useState(()=>Z1(l,e));return At(()=>{f(Z1(l,e))},[l,e]),At(()=>{const h=p=>()=>{f(p)};if(!l)return;const m=h("loaded"),g=h("error");return l.addEventListener("load",m),l.addEventListener("error",g),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",m),l.removeEventListener("error",g)}},[l,n,t]),c}var BU=pA,UU=vA;function yv(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function vv(e){const[t,n]=x.useState(void 0);return At(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,f;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;c=m.inlineSize,f=m.blockSize}else c=e.offsetWidth,f=e.offsetHeight;n({width:c,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Sf="Checkbox",[VU]=Dn(Sf),[$U,bv]=VU(Sf);function HU(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:i,disabled:l,form:c,name:f,onCheckedChange:h,required:m,value:g="on",internal_do_not_use_render:p}=e,[b,w]=dr({prop:n,defaultProp:i??!1,onChange:h,caller:Sf}),[S,_]=x.useState(null),[E,j]=x.useState(null),C=x.useRef(!1),A=S?!!c||!!S.closest("form"):!0,k={checked:b,disabled:l,setChecked:w,control:S,setControl:_,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:C,required:m,defaultChecked:na(i)?!1:i,isFormControl:A,bubbleInput:E,setBubbleInput:j};return u.jsx($U,{scope:t,...k,children:GU(p)?p(k):s})}var bA="CheckboxTrigger",xA=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},i)=>{const{control:l,value:c,disabled:f,checked:h,required:m,setControl:g,setChecked:p,hasConsumerStoppedPropagationRef:b,isFormControl:w,bubbleInput:S}=bv(bA,e),_=We(i,g),E=x.useRef(h);return x.useEffect(()=>{const j=l?.form;if(j){const C=()=>p(E.current);return j.addEventListener("reset",C),()=>j.removeEventListener("reset",C)}},[l,p]),u.jsx(je.button,{type:"button",role:"checkbox","aria-checked":na(h)?"mixed":h,"aria-required":m,"data-state":jA(h),"data-disabled":f?"":void 0,disabled:f,value:c,...s,ref:_,onKeyDown:Ae(t,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:Ae(n,j=>{p(C=>na(C)?!0:!C),S&&w&&(b.current=j.isPropagationStopped(),b.current||j.stopPropagation())})})});xA.displayName=bA;var wA=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:i,defaultChecked:l,required:c,disabled:f,value:h,onCheckedChange:m,form:g,...p}=e;return u.jsx(HU,{__scopeCheckbox:n,checked:i,defaultChecked:l,disabled:f,required:c,onCheckedChange:m,name:s,form:g,value:h,internal_do_not_use_render:({isFormControl:b})=>u.jsxs(u.Fragment,{children:[u.jsx(xA,{...p,ref:t,__scopeCheckbox:n}),b&&u.jsx(TA,{__scopeCheckbox:n})]})})});wA.displayName=Sf;var SA="CheckboxIndicator",_A=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...i}=e,l=bv(SA,n);return u.jsx(ms,{present:s||na(l.checked)||l.checked===!0,children:u.jsx(je.span,{"data-state":jA(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});_A.displayName=SA;var EA="CheckboxBubbleInput",TA=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:i,checked:l,defaultChecked:c,required:f,disabled:h,name:m,value:g,form:p,bubbleInput:b,setBubbleInput:w}=bv(EA,e),S=We(n,w),_=yv(l),E=vv(s);x.useEffect(()=>{const C=b;if(!C)return;const A=window.HTMLInputElement.prototype,D=Object.getOwnPropertyDescriptor(A,"checked").set,B=!i.current;if(_!==l&&D){const L=new Event("click",{bubbles:B});C.indeterminate=na(l),D.call(C,na(l)?!1:l),C.dispatchEvent(L)}},[b,_,l,i]);const j=x.useRef(na(l)?!1:l);return u.jsx(je.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??j.current,required:f,disabled:h,name:m,value:g,form:p,...t,tabIndex:-1,ref:S,style:{...t.style,...E,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});TA.displayName=EA;function GU(e){return typeof e=="function"}function na(e){return e==="indeterminate"}function jA(e){return na(e)?"indeterminate":e?"checked":"unchecked"}const qU=["top","right","bottom","left"],aa=Math.min,Cn=Math.max,zd=Math.round,Hu=Math.floor,Rr=e=>({x:e,y:e}
vendor: 7,042 bytes, line 162
162),FU={left:"right",right:"left",bottom:"top",top:"bottom"};function Og(e,t,n){return Cn(e,aa(t,n))}function fs(e,t){return typeof e=="function"?e(t):e}function hs(e){return e.split("-")[0]}function So(e){return e.split("-")[1]}function xv(e){return e==="x"?"y":"x"}function wv(e){return e==="y"?"height":"width"}function Nr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Sv(e){return xv(Nr(e))}function KU(e,t,n){n===void 0&&(n=!1);const s=So(e),i=Sv(e),l=wv(i);let c=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=Id(c)),[c,Id(c)]}function WU(e){const t=Id(e);return[Dg(e),t,Dg(t)]}function Dg(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Q1=["left","right"],e_=["right","left"],YU=["top","bottom"],XU=["bottom","top"];function JU(e,t,n){switch(e){case"top":case"bottom":return n?t?e_:Q1:t?Q1:e_;case"left":case"right":return t?YU:XU;default:return[]}}function ZU(e,t,n,s){const i=So(e);let l=JU(hs(e),n==="start",s);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(Dg)))),l}function Id(e){const t=hs(e);return FU[t]+e.slice(t.length)}function QU(e){return{top:0,right:0,bottom:0,left:0,...e}}function CA(e){return typeof e!="number"?QU(e):{top:e,right:e,bottom:e,left:e}}function Bd(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function t_(e,t,n){let{reference:s,floating:i}=e;const l=Nr(t),c=Sv(t),f=wv(c),h=hs(t),m=l==="y",g=s.x+s.width/2-i.width/2,p=s.y+s.height/2-i.height/2,b=s[f]/2-i[f]/2;let w;switch(h){case"top":w={x:g,y:s.y-i.height};break;case"bottom":w={x:g,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:p};break;case"left":w={x:s.x-i.width,y:p};break;default:w={x:s.x,y:s.y}}switch(So(t)){case"start":w[c]-=b*(n&&m?-1:1);break;case"end":w[c]+=b*(n&&m?-1:1);break}return w}async function e8(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:l,rects:c,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:b=!1,padding:w=0}=fs(t,e),S=CA(w),E=f[b?p==="floating"?"reference":"floating":p],j=Bd(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(E)))==null||n?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:m,rootBoundary:g,strategy:h})),C=p==="floating"?{x:s,y:i,width:c.floating.width,height:c.floating.height}:c.reference,A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),k=await(l.isElement==null?void 0:l.isElement(A))?await(l.getScale==null?void 0:l.getScale(A))||{x:1,y:1}:{x:1,y:1},D=Bd(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:C,offsetParent:A,strategy:h}):C);return{top:(j.top-D.top+S.top)/k.y,bottom:(D.bottom-j.bottom+S.bottom)/k.y,left:(j.left-D.left+S.left)/k.x,right:(D.right-j.right+S.right)/k.x}}const t8=50,n8=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,f=c.detectOverflow?c:{...c,detectOverflow:e8},h=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:p}=t_(m,s,h),b=s,w=0;const S={};for(let _=0;_<l.length;_++){const E=l[_];if(!E)continue;const{name:j,fn:C}=E,{x:A,y:k,data:D,reset:B}=await C({x:g,y:p,initialPlacement:s,placement:b,strategy:i,middlewareData:S,rects:m,platform:f,elements:{reference:e,floating:t}});g=A??g,p=k??p,S[j]={...S[j],...D},B&&w<t8&&(w++,typeof B=="object"&&(B.placement&&(b=B.placement),B.rects&&(m=B.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):B.rects),{x:g,y:p}=t_(m,b,h)),_=-1)}return{x:g,y:p,placement:b,strategy:i,middlewareData:S}},r8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:l,platform:c,elements:f,middlewareData:h}=t,{element:m,padding:g=0}=fs(e,t)||{};if(m==null)return{};const p=CA(g),b={x:n,y:s},w=Sv(i),S=wv(w),_=await c.getDimensions(m),E=w==="y",j=E?"top":"left",C=E?"bottom":"right",A=E?"clientHeight":"clientWidth",k=l.reference[S]+l.reference[w]-b[w]-l.floating[S],D=b[w]-l.reference[w],B=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let L=B?B[A]:0;(!L||!await(c.isElement==null?void 0:c.isElement(B)))&&(L=f.floating[A]||l.floating[S]);const P=k/2-D/2,U=L/2-_[S]/2-1,z=aa(p[j],U),Y=aa(p[C],U),se=z,de=L-_[S]-Y,fe=L/2-_[S]/2+P,ce=Og(se,fe,de),M=!h.arrow&&So(i)!=null&&fe!==ce&&l.reference[S]/2-(fe<se?z:Y)-_[S]/2<0,F=M?fe<se?fe-se:fe-de:0;return{[w]:b[w]+F,data:{[w]:ce,centerOffset:fe-ce-F,...M&&{alignmentOffset:F}},reset:M}}}),s8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:l,rects:c,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0,...E}=fs(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const j=hs(i),C=Nr(f),A=hs(f)===f,k=await(h.isRTL==null?void 0:h.isRTL(m.floating)),D=b||(A||!_?[Id(f)]:WU(f)),B=S!=="none";!b&&B&&D.push(...ZU(f,_,S,k));const L=[f,...D],P=await h.detectOverflow(t,E),U=[];let z=((s=l.flip)==null?void 0:s.overflows)||[];if(g&&U.push(P[j]),p){const fe=KU(i,c,k);U.push(P[fe[0]],P[fe[1]])}if(z=[...z,{placement:i,overflows:U}],!U.every(fe=>fe<=0)){var Y,se;const fe=(((Y=l.flip)==null?void 0:Y.index)||0)+1,ce=L[fe];if(ce&&(!(p==="alignment"?C!==Nr(ce):!1)||z.every(X=>Nr(X.placement)===C?X.overflows[0]>0:!0)))return{data:{index:fe,overflows:z},reset:{placement:ce}};let M=(se=z.filter(F=>F.overflows[0]<=0).sort((F,X)=>F.overflows[1]-X.overflows[1])[0])==null?void 0:se.placement;if(!M)switch(w){case"bestFit":{var de;const F=(de=z.filter(X=>{if(B){const oe=Nr(X.placement);return oe===C||oe==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(oe=>oe>0).reduce((oe,ee)=>oe+ee,0)]).sort((X,oe)=>X[1]-oe[1])[0])==null?void 0:de[0];F&&(M=F);break}case"initialPlacement":M=f;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function n_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function r_(e){return qU.some(t=>e[t]>=0)}const a8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...l}=fs(e,t);switch(i){case"referenceHidden":{const c=await s.detectOverflow(t,{...l,elementContext:"reference"}),f=n_(c,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:r_(f)}}}case"escaped":{const c=await s.detectOverflow(t,{...l,altBoundary:!0}),f=n_(c,n.floating);return{data:{escapedOffsets:f,escaped:r_(f)}}}default:return{}}}}},AA=new Set(["left","top"]);async function i8(e,t){const{placement:n,platform:s,elements:i}=e,l=await(s.isRTL==null?void 0:s.isRTL(i.floating)),c=hs(n),f=So(n),h=Nr(n)==="y",m=AA.has(c)?-1:1,g=l&&h?-1:1,p=fs(t,e);let{mainAxis:b,crossAxis:w,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}
162:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof S=="number"&&(w=f==="end"?S*-1:S),h?{x:w*g,y:b*m}:{x:b*m,y:w*g}}const o8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:l,placement:c,middlewareData:f}=t,h=await i8(t,e);return c===((n=f.offset)==null?void 0:n.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:l+h.y,data:{...h,placement:c}}}}},l8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:j=>{let{x:C,y:A}=j;return{x:C,y:A}}},...m}=fs(e,t),g={x:n,y:s},p=await l.detectOverflow(t,m),b=Nr(hs(i)),w=xv(b);let S=g[w],_=g[b];if(c){const j=w==="y"?"top":"left",C=w==="y"?"bottom":"right",A=S+p[j],k=S-p[C];S=Og(A,S,k)}if(f){const j=b==="y"?"top":"left",C=b==="y"?"bottom":"right",A=_+p[j],k=_-p[C];_=Og(A,_,k)}const E=h.fn({...t,[w]:S,[b]:_});return{...E,data:{x:E.x-n,y:E.y-s,enabled:{[w]:c,[b]:f}}}}}},c8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:i,rects:l,middlewareData:c}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=fs(e,t),g={x:n,y:s},p=Nr(i),b=xv(p);let w=g[b],S=g[p];const _=fs(f,t),E=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(h){const A=b==="y"?"height":"width",k=l.reference[b]-l.floating[A]+E.mainAxis,D=l.reference[b]+l.reference[A]-E.mainAxis;w<k?w=k:w>D&&(w=D)}if(m){var j,C;const A=b==="y"?"width":"height",k=AA.has(hs(i)),D=l.reference[p]-l.floating[A]+(k&&((j=c.offset)==null?void 0:j[p])||0)+(k?0:E.crossAxis),B=l.reference[p]+l.reference[A]+(k?0:((C=c.offset)==null?void 0:C[p])||0)-(k?E.crossAxis:0);S<D?S=D:S>B&&(S=B)}return{[b]:w,[p]:S}}}},u8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:l,platform:c,elements:f}=t,{apply:h=()=>{},...m}=fs(e,t),g=await c.detectOverflow(t,m),p=hs(i),b=So(i),w=Nr(i)==="y",{width:S,height:_}=l.floating;let E,j;p==="top"||p==="bottom"?(E=p,j=b===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(j=p,E=b==="end"?"top":"bottom");const C=_-g.top-g.bottom,A=S-g.left-g.right,k=aa(_-g[E],C),D=aa(S-g[j],A),B=!t.middlewareData.shift;let L=k,P=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=A),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(L=C),B&&!b){const z=Cn(g.left,0),Y=Cn(g.right,0),se=Cn(g.top,0),de=Cn(g.bottom,0);w?P=S-2*(z!==0||Y!==0?z+Y:Cn(g.left,g.right)):L=_-2*(se!==0||de!==0?se+de:Cn(g.top,g.bottom))}await h({...t,availableWidth:P,availableHeight:L});const U=await c.getDimensions(f.floating);return S!==U.width||_!==U.height?{reset:{rects:!0}}:{}}}};function _f(){return typeof window<"u"}function _o(e){return NA(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(NA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NA(e){return _f()?e instanceof Node||e instanceof kn(e).Node:!1}function fr(e){return _f()?e instanceof Element||e instanceof kn(e).Element:!1}function gs(e){return _f()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function s_(e){return!_f()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function fc(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&i!=="inline"&&i!=="contents"}function d8(e){return/^(table|td|th)$/.test(_o(e))}function Ef(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const f8=/transform|translate|scale|rotate|perspective|filter/,h8=/paint|layout|strict|content/,za=e=>!!e&&e!=="none";let Ip;function _v(e){const t=fr(e)?hr(e):e;return za(t.transform)||za(t.translate)||za(t.scale)||za(t.rotate)||za(t.perspective)||!Ev()&&(za(t.backdropFilter)||za(t.filter))||f8.test(t.willChange||"")||h8.test(t.contain||"")}function m8(e){let t=ia(e);for(;gs(t)&&!fo(t);){if(_v(t))return t;if(Ef(t))return null;t=ia(t)}return null}function Ev(){return Ip==null&&(Ip=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ip}function fo(e){return/^(html|body|#document)$/.test(_o(e))}function hr(e){return kn(e).getComputedStyle(e)}function Tf(e){return fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ia(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||s_(e)&&e.host||Pr(e);return s_(t)?t.host:t}function kA(e){const t=ia(e);return fo(t)?e.ownerDocument?e.ownerDocument.body:e.body:gs(t)&&fc(t)?t:kA(t)}function Fl(e,t,n){var s;
vendor: 4,172 bytes, line 162
162t===void 0&&(t=[]),n===void 0&&(n=!0);const i=kA(e),l=i===((s=e.ownerDocument)==null?void 0:s.body),c=kn(i);if(l){const f=Mg(c);return t.concat(c,c.visualViewport||[],fc(i)?i:[],f&&n?Fl(f):[])}else return t.concat(i,Fl(i,[],n))}function Mg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RA(e){const t=hr(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=gs(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:s,f=zd(n)!==l||zd(s)!==c;return f&&(n=l,s=c),{width:n,height:s,$:f}}function Tv(e){return fr(e)?e:e.contextElement}function no(e){const t=Tv(e);if(!gs(t))return Rr(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:l}=RA(t);let c=(l?zd(n.width):n.width)/s,f=(l?zd(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const p8=Rr(0);function OA(e){const t=kn(e);return!Ev()||!t.visualViewport?p8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Wa(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=Tv(e);let c=Rr(1);t&&(s?fr(s)&&(c=no(s)):c=no(e));const f=g8(l,n,s)?OA(l):Rr(0);let h=(i.left+f.x)/c.x,m=(i.top+f.y)/c.y,g=i.width/c.x,p=i.height/c.y;if(l){const b=kn(l),w=s&&fr(s)?kn(s):s;let S=b,_=Mg(S);for(;_&&s&&w!==S;){const E=no(_),j=_.getBoundingClientRect(),C=hr(_),A=j.left+(_.clientLeft+parseFloat(C.paddingLeft))*E.x,k=j.top+(_.clientTop+parseFloat(C.paddingTop))*E.y;h*=E.x,m*=E.y,g*=E.x,p*=E.y,h+=A,m+=k,S=kn(_),_=Mg(S)}}return Bd({width:g,height:p,x:h,y:m})}function jf(e,t){const n=Tf(e).scrollLeft;return t?t.left+n:Wa(Pr(e)).left+n}function DA(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-jf(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function y8(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const l=i==="fixed",c=Pr(s),f=t?Ef(t.floating):!1;if(s===c||f&&l)return n;let h={scrollLeft:0,scrollTop:0},m=Rr(1);const g=Rr(0),p=gs(s);if((p||!p&&!l)&&((_o(s)!=="body"||fc(c))&&(h=Tf(s)),p)){const w=Wa(s);m=no(s),g.x=w.x+s.clientLeft,g.y=w.y+s.clientTop}const b=c&&!p&&!l?DA(c,h):Rr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+g.x+b.x,y:n.y*m.y-h.scrollTop*m.y+g.y+b.y}}function v8(e){return Array.from(e.getClientRects())}function b8(e){const t=Pr(e),n=Tf(e),s=e.ownerDocument.body,i=Cn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=Cn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let c=-n.scrollLeft+jf(e);const f=-n.scrollTop;return hr(s).direction==="rtl"&&(c+=Cn(t.clientWidth,s.clientWidth)-i),{width:i,height:l,x:c,y:f}}const a_=25;function x8(e,t){const n=kn(e),s=Pr(e),i=n.visualViewport;let l=s.clientWidth,c=s.clientHeight,f=0,h=0;if(i){l=i.width,c=i.height;const g=Ev();(!g||g&&t==="fixed")&&(f=i.offsetLeft,h=i.offsetTop)}const m=jf(s);if(m<=0){const g=s.ownerDocument,p=g.body,b=getComputedStyle(p),w=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(s.clientWidth-p.clientWidth-w);S<=a_&&(l-=S)}else m<=a_&&(l+=m);return{width:l,height:c,x:f,y:h}}function w8(e,t){const n=Wa(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,l=gs(e)?no(e):Rr(1),c=e.clientWidth*l.x,f=e.clientHeight*l.y,h=i*l.x,m=s*l.y;return{width:c,height:f,x:h,y:m}}function i_(e,t,n){let s;if(t==="viewport")s=x8(e,n);else if(t==="document")s=b8(Pr(e));else if(fr(t))s=w8(t,n);else{const i=OA(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Bd(s)}function MA(e,t){const n=ia(e);return n===t||!fr(n)||fo(n)?!1:hr(n).position==="fixed"||MA(n,t)}function S8(e,t){const n=t.get(e);if(n)return n;let s=Fl(e,[],!1).filter(f=>fr(f)&&_o(f)!=="body"),i=null;const l=hr(e).position==="fixed";let c=l?ia(e):e;for(;fr(c)&&!fo(c);){const f=hr(c),h=_v(c);!h&&f.position==="fixed"&&(i=null),(l?!h&&!i:!h&&f.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||fc(c)&&!h&&MA(e,c))?s=s.filter(g=>g!==c):i=f,c=ia(c)}return t.set(e,s),s}function _8(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const c=[...n==="clippingAncestors"?Ef(t)?[]:S8(t,this._c):[].concat(n),s],f=i_(t,c[0],i);
vendor: 4,841 bytes, line 162
162let h=f.top,m=f.right,g=f.bottom,p=f.left;for(let b=1;b<c.length;b++){const w=i_(t,c[b],i);h=Cn(w.top,h),m=aa(w.right,m),g=aa(w.bottom,g),p=Cn(w.left,p)}return{width:m-p,height:g-h,x:p,y:h}}function E8(e){const{width:t,height:n}=RA(e);return{width:t,height:n}}function T8(e,t,n){const s=gs(t),i=Pr(t),l=n==="fixed",c=Wa(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const h=Rr(0);function m(){h.x=jf(i)}if(s||!s&&!l)if((_o(t)!=="body"||fc(i))&&(f=Tf(t)),s){const w=Wa(t,!0,l,t);h.x=w.x+t.clientLeft,h.y=w.y+t.clientTop}else i&&m();l&&!s&&i&&m();const g=i&&!s&&!l?DA(i,f):Rr(0),p=c.left+f.scrollLeft-h.x-g.x,b=c.top+f.scrollTop-h.y-g.y;return{x:p,y:b,width:c.width,height:c.height}}function Bp(e){return hr(e).position==="static"}function o_(e,t){if(!gs(e)||hr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function PA(e,t){const n=kn(e);if(Ef(e))return n;if(!gs(e)){let i=ia(e);for(;i&&!fo(i);){if(fr(i)&&!Bp(i))return i;i=ia(i)}return n}let s=o_(e,t);for(;s&&d8(s)&&Bp(s);)s=o_(s,t);return s&&fo(s)&&Bp(s)&&!_v(s)?n:s||m8(e)||n}const j8=async function(e){const t=this.getOffsetParent||PA,n=this.getDimensions,s=await n(e.floating);return{reference:T8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function C8(e){return hr(e).direction==="rtl"}const A8={convertOffsetParentRelativeRectToViewportRelativeRect:y8,getDocumentElement:Pr,getClippingRect:_8,getOffsetParent:PA,getElementRects:j8,getClientRects:v8,getDimensions:E8,getScale:no,isElement:fr,isRTL:C8};function LA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function N8(e,t){let n=null,s;const i=Pr(e);function l(){var f;clearTimeout(s),(f=n)==null||f.disconnect(),n=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:g,top:p,width:b,height:w}=m;if(f||t(),!b||!w)return;const S=Hu(p),_=Hu(i.clientWidth-(g+b)),E=Hu(i.clientHeight-(p+w)),j=Hu(g),A={rootMargin:-S+"px "+-_+"px "+-E+"px "+-j+"px",threshold:Cn(0,aa(1,h))||1};let k=!0;function D(B){const L=B[0].intersectionRatio;if(L!==h){if(!k)return c();L?c(!1,L):s=setTimeout(()=>{c(!1,1e-7)},1e3)}L===1&&!LA(m,e.getBoundingClientRect())&&c(),k=!1}try{n=new IntersectionObserver(D,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(D,A)}n.observe(e)}return c(!0),l}function k8(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=Tv(e),g=i||l?[...m?Fl(m):[],...t?Fl(t):[]]:[];g.forEach(j=>{i&&j.addEventListener("scroll",n,{passive:!0}),l&&j.addEventListener("resize",n)});const p=m&&f?N8(m,n):null;let b=-1,w=null;c&&(w=new ResizeObserver(j=>{let[C]=j;C&&C.target===m&&w&&t&&(w.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var A;(A=w)==null||A.observe(t)})),n()}),m&&!h&&w.observe(m),t&&w.observe(t));let S,_=h?Wa(e):null;h&&E();function E(){const j=Wa(e);_&&!LA(_,j)&&n(),_=j,S=requestAnimationFrame(E)}return n(),()=>{var j;g.forEach(C=>{i&&C.removeEventListener("scroll",n),l&&C.removeEventListener("resize",n)}),p?.(),(j=w)==null||j.disconnect(),w=null,h&&cancelAnimationFrame(S)}}const R8=o8,O8=l8,D8=s8,M8=u8,P8=a8,l_=r8,L8=c8,z8=(e,t,n)=>{const s=new Map,i={platform:A8,...n},l={...i.platform,_c:s};return n8(e,t,{...i,platform:l})};var I8=typeof document<"u",B8=function(){},vd=I8?x.useLayoutEffect:B8;function Ud(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!Ud(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const l=i[s];if(!(l==="_owner"&&e.$$typeof)&&!Ud(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function zA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c_(e,t){const n=zA(e);return Math.round(t*n)/n}function Up(e){const t=x.useRef(e);return vd(()=>{t.current=e}),t}function U8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[g,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,w]=x.useState(s);Ud(b,s)||w(s);const[S,_]=x.useState(null),[E,j]=x.useState(null),C=x.useCallback(X=>{X!==B.current&&(B.current=X,_(X))},[]),A=x.useCallback(X=>{X!==L.current&&(L.current=X,j(X))},[]),k=l||S,D=c||E,B=x.useRef(null),L=x.useRef(null),P=x.useRef(g),U=h!=null,z=Up(h),Y=Up(i),se=Up(m),de=x.useCallback(()=>
vendor: 1,543 bytes, line 162
162{if(!B.current||!L.current)return;const X={placement:t,strategy:n,middleware:b};Y.current&&(X.platform=Y.current),z8(B.current,L.current,X).then(oe=>{const ee={...oe,isPositioned:se.current!==!1};fe.current&&!Ud(P.current,ee)&&(P.current=ee,ic.flushSync(()=>{p(ee)}))})},[b,t,n,Y,se]);vd(()=>{m===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(X=>({...X,isPositioned:!1})))},[m]);const fe=x.useRef(!1);vd(()=>(fe.current=!0,()=>{fe.current=!1}),[]),vd(()=>{if(k&&(B.current=k),D&&(L.current=D),k&&D){if(z.current)return z.current(k,D,de);de()}},[k,D,de,z,U]);const ce=x.useMemo(()=>({reference:B,floating:L,setReference:C,setFloating:A}),[C,A]),M=x.useMemo(()=>({reference:k,floating:D}),[k,D]),F=x.useMemo(()=>{const X={position:n,left:0,top:0};if(!M.floating)return X;const oe=c_(M.floating,g.x),ee=c_(M.floating,g.y);return f?{...X,transform:"translate("+oe+"px, "+ee+"px)",...zA(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:ee}},[n,f,M.floating,g.x,g.y]);return x.useMemo(()=>({...g,update:de,refs:ce,elements:M,floatingStyles:F}),[g,de,ce,M,F])}const V8=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?l_({element:s.current,padding:i}).fn(n):{}:s?l_({element:s,padding:i}).fn(n):{}}}},$8=(e,t)=>{const n=R8(e);return{name:n.name,fn:n.fn,options:[e,t]}},H8=(e,t)=>{const n=O8(e);return{name:n.name,fn:n.fn,options:[e,t]}},G8=(e,t)=>({fn:L8(e).fn,options:[e,t]}),q8=(e,t)=>
vendor: 35,945 bytes, line 162
162{const n=D8(e);return{name:n.name,fn:n.fn,options:[e,t]}},F8=(e,t)=>{const n=M8(e);return{name:n.name,fn:n.fn,options:[e,t]}},K8=(e,t)=>{const n=P8(e);return{name:n.name,fn:n.fn,options:[e,t]}},W8=(e,t)=>{const n=V8(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Y8="Arrow",IA=x.forwardRef((e,t)=>{const{children:n,width:s=10,height:i=5,...l}=e;return u.jsx(je.svg,{...l,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});IA.displayName=Y8;var X8=IA,jv="Popper",[BA,Cf]=Dn(jv),[J8,UA]=BA(jv),VA=e=>{const{__scopePopper:t,children:n}=e,[s,i]=x.useState(null);return u.jsx(J8,{scope:t,anchor:s,onAnchorChange:i,children:n})};VA.displayName=jv;var $A="PopperAnchor",HA=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...i}=e,l=UA($A,n),c=x.useRef(null),f=We(t,c),h=x.useRef(null);return x.useEffect(()=>{const m=h.current;h.current=s?.current||c.current,m!==h.current&&l.onAnchorChange(h.current)}),s?null:u.jsx(je.div,{...i,ref:f})});HA.displayName=$A;var Cv="PopperContent",[Z8,Q8]=BA(Cv),GA=x.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:S,..._}=e,E=UA(Cv,n),[j,C]=x.useState(null),A=We(t,ae=>C(ae)),[k,D]=x.useState(null),B=vv(k),L=B?.width??0,P=B?.height??0,U=s+(l!=="center"?"-"+l:""),z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Y=Array.isArray(m)?m:[m],se=Y.length>0,de={padding:z,boundary:Y.filter(tV),altBoundary:se},{refs:fe,floatingStyles:ce,placement:M,isPositioned:F,middlewareData:X}=U8({strategy:"fixed",placement:U,whileElementsMounted:(...ae)=>k8(...ae,{animationFrame:w==="always"}),elements:{reference:E.anchor},middleware:[$8({mainAxis:i+P,alignmentAxis:c}),h&&H8({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?G8():void 0,...de}),h&&q8({...de}),F8({...de,apply:({elements:ae,rects:he,availableWidth:ve,availableHeight:Oe})=>{const{width:De,height:Ue}=he.reference,yt=ae.floating.style;yt.setProperty("--radix-popper-available-width",`${ve}px`),yt.setProperty("--radix-popper-available-height",`${Oe}px`),yt.setProperty("--radix-popper-anchor-width",`${De}px`),yt.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),k&&W8({element:k,padding:f}),nV({arrowWidth:L,arrowHeight:P}),b&&K8({strategy:"referenceHidden",...de})]}),[oe,ee]=KA(M),O=ds(S);At(()=>{F&&O?.()},[F,O]);const K=X.arrow?.x,Z=X.arrow?.y,ne=X.arrow?.centerOffset!==0,[ie,ue]=x.useState();return At(()=>{j&&ue(window.getComputedStyle(j).zIndex)},[j]),u.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:F?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[X.transformOrigin?.x,X.transformOrigin?.y].join(" "),...X.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Z8,{scope:n,placedSide:oe,onArrowChange:D,arrowX:K,arrowY:Z,shouldHideArrow:ne,children:u.jsx(je.div,{"data-side":oe,"data-align":ee,..._,ref:A,style:{..._.style,animation:F?void 0:"none"}})})})});GA.displayName=Cv;var qA="PopperArrow",eV={top:"bottom",right:"left",bottom:"top",left:"right"},FA=x.forwardRef(function(t,n){const{__scopePopper:s,...i}=t,l=Q8(qA,s),c=eV[l.placedSide];return u.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:u.jsx(X8,{...i,ref:n,style:{...i.style,display:"block"}})})});FA.displayName=qA;function tV(e){return e!==null}var nV=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:i}=t,c=i.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[m,g]=KA(n),p={start:"0%",center:"50%",end:"100%"}[g],b=(i.arrow?.x??0)+f/2,w=(i.arrow?.y??0)+h/2;let S="",_="";return m==="bottom"?(S=c?p:`${b}px`,_=`${-h}px`):m==="top"?(S=c?p:`${b}px`,_=`${s.floating.height+h}px`):m==="right"?(S=`${-h}px`,_=c?p:`${w}px`):m==="left"&&(S=`${s.floating.width+h}px`,_=c?p:`${w}px`),{data:{x:S,y:_}}}});function KA(e){const[t,n="center"]=e.split("-");return[t,n]}var WA=VA,YA=HA,XA=GA,JA=FA,Vp="rovingFocusGroup.onEntryFocus",rV={bubbles:!1,cancelable:!0},hc="RovingFocusGroup",[Pg,ZA,sV]=Qy(hc),[aV,QA]=Dn(hc,[sV]),[iV,oV]=aV(hc),eN=x.forwardRef((e,t)=>u.jsx(Pg.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Pg.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(lV,{...e,ref:t})})}));eN.displayName=hc;var lV=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...p}=e,b=x.useRef(null),w=We(t,b),S=mf(l),[_,E]=dr({prop:c,defaultProp:f??null,onChange:h,caller:hc}),[j,C]=x.useState(!1),A=ds(m),k=ZA(n),D=x.useRef(!1),[B,L]=x.useState(0);return x.useEffect(()=>{const P=b.current;if(P)return P.addEventListener(Vp,A),()=>P.removeEventListener(Vp,A)},[A]),u.jsx(iV,{scope:n,orientation:s,dir:S,loop:i,currentTabStopId:_,onItemFocus:x.useCallback(P=>E(P),[E]),onItemShiftTab:x.useCallback(()=>C(!0),[]),onFocusableItemAdd:x.useCallback(()=>L(P=>P+1),[]),onFocusableItemRemove:x.useCallback(()=>L(P=>P-1),[]),children:u.jsx(je.div,{tabIndex:j||B===0?-1:0,"data-orientation":s,...p,ref:w,style:{outline:"none",...e.style},onMouseDown:Ae(e.onMouseDown,()=>{D.current=!0}),onFocus:Ae(e.onFocus,P=>{const U=!D.current;if(P.target===P.currentTarget&&U&&!j){const z=new CustomEvent(Vp,rV);if(P.currentTarget.dispatchEvent(z),!z.defaultPrevented){const Y=k().filter(M=>M.focusable),se=Y.find(M=>M.active),de=Y.find(M=>M.id===_),ce=[se,de,...Y].filter(Boolean).map(M=>M.ref.current);rN(ce,g)}}D.current=!1}),onBlur:Ae(e.onBlur,()=>C(!1))})})}),tN="RovingFocusGroupItem",nN=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:i=!1,tabStopId:l,children:c,...f}=e,h=cr(),m=l||h,g=oV(tN,n),p=g.currentTabStopId===m,b=ZA(n),{onFocusableItemAdd:w,onFocusableItemRemove:S,currentTabStopId:_}=g;return x.useEffect(()=>{if(s)return w(),()=>S()},[s,w,S]),u.jsx(Pg.ItemSlot,{scope:n,id:m,focusable:s,active:i,children:u.jsx(je.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...f,ref:t,onMouseDown:Ae(e.onMouseDown,E=>{s?g.onItemFocus(m):E.preventDefault()}),onFocus:Ae(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:Ae(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){g.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const j=dV(E,g.orientation,g.dir);if(j!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let A=b().filter(k=>k.focusable).map(k=>k.ref.current);if(j==="last")A.reverse();else if(j==="prev"||j==="next"){j==="prev"&&A.reverse();const k=A.indexOf(E.currentTarget);A=g.loop?fV(A,k+1):A.slice(k+1)}setTimeout(()=>rN(A))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:_!=null}):c})})});nN.displayName=tN;var cV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dV(e,t,n){const s=uV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return cV[s]}function rN(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function fV(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var hV=eN,mV=nN,pV="Label",sN=x.forwardRef((e,t)=>u.jsx(je.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));sN.displayName=pV;var gV=sN;function u_(e,[t,n]){return Math.min(n,Math.max(t,e))}var yV=[" ","Enter","ArrowUp","ArrowDown"],vV=[" ","Enter"],Ya="Select",[Af,Nf,bV]=Qy(Ya),[Eo]=Dn(Ya,[bV,Cf]),kf=Cf(),[xV,da]=Eo(Ya),[wV,SV]=Eo(Ya),aN=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:i,onOpenChange:l,value:c,defaultValue:f,onValueChange:h,dir:m,name:g,autoComplete:p,disabled:b,required:w,form:S}=e,_=kf(t),[E,j]=x.useState(null),[C,A]=x.useState(null),[k,D]=x.useState(!1),B=mf(m),[L,P]=dr({prop:s,defaultProp:i??!1,onChange:l,caller:Ya}),[U,z]=dr({prop:c,defaultProp:f,onChange:h,caller:Ya}),Y=x.useRef(null),se=E?S||!!E.closest("form"):!0,[de,fe]=x.useState(new Set),ce=Array.from(de).map(M=>M.props.value).join(";");return u.jsx(WA,{..._,children:u.jsxs(xV,{required:w,scope:t,trigger:E,onTriggerChange:j,valueNode:C,onValueNodeChange:A,valueNodeHasChildren:k,onValueNodeHasChildrenChange:D,contentId:cr(),value:U,onValueChange:z,open:L,onOpenChange:P,dir:B,triggerPointerDownPosRef:Y,disabled:b,children:[u.jsx(Af.Provider,{scope:t,children:u.jsx(wV,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(M=>{fe(F=>new Set(F).add(M))},[]),onNativeOptionRemove:x.useCallback(M=>{fe(F=>{const X=new Set(F);return X.delete(M),X})},[]),children:n})}),se?u.jsxs(CN,{"aria-hidden":!0,required:w,tabIndex:-1,name:g,autoComplete:p,value:U,onChange:M=>z(M.target.value),disabled:b,form:S,children:[U===void 0?u.jsx("option",{value:""}):null,Array.from(de)]},ce):null]})})};aN.displayName=Ya;var iN="SelectTrigger",oN=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...i}=e,l=kf(n),c=da(iN,n),f=c.disabled||s,h=We(t,c.onTriggerChange),m=Nf(n),g=x.useRef("touch"),[p,b,w]=NN(_=>{const E=m().filter(A=>!A.disabled),j=E.find(A=>A.value===c.value),C=kN(E,_,j);C!==void 0&&c.onValueChange(C.value)}),S=_=>{f||(c.onOpenChange(!0),w()),_&&(c.triggerPointerDownPosRef.current={x:Math.round(_.pageX),y:Math.round(_.pageY)})};return u.jsx(YA,{asChild:!0,...l,children:u.jsx(je.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":AN(c.value)?"":void 0,...i,ref:h,onClick:Ae(i.onClick,_=>{_.currentTarget.focus(),g.current!=="mouse"&&S(_)}),onPointerDown:Ae(i.onPointerDown,_=>{g.current=_.pointerType;const E=_.target;E.hasPointerCapture(_.pointerId)&&E.releasePointerCapture(_.pointerId),_.button===0&&_.ctrlKey===!1&&_.pointerType==="mouse"&&(S(_),_.preventDefault())}),onKeyDown:Ae(i.onKeyDown,_=>{const E=p.current!=="";!(_.ctrlKey||_.altKey||_.metaKey)&&_.key.length===1&&b(_.key),!(E&&_.key===" ")&&yV.includes(_.key)&&(S(),_.preventDefault())})})})});oN.displayName=iN;var lN="SelectValue",cN=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,children:l,placeholder:c="",...f}=e,h=da(lN,n),{onValueNodeHasChildrenChange:m}=h,g=l!==void 0,p=We(t,h.onValueNodeChange);return At(()=>{m(g)},[m,g]),u.jsx(je.span,{...f,ref:p,style:{pointerEvents:"none"},children:AN(h.value)?u.jsx(u.Fragment,{children:c}):l})});cN.displayName=lN;var _V="SelectIcon",uN=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...i}=e;return u.jsx(je.span,{"aria-hidden":!0,...i,ref:t,children:s||"▼"})});uN.displayName=_V;var EV="SelectPortal",dN=e=>u.jsx(vf,{asChild:!0,...e});dN.displayName=EV;var Xa="SelectContent",fN=x.forwardRef((e,t)=>{const n=da(Xa,e.__scopeSelect),[s,i]=x.useState();if(At(()=>{i(new DocumentFragment)},[]),!n.open){const l=s;return l?ic.createPortal(u.jsx(hN,{scope:e.__scopeSelect,children:u.jsx(Af.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),l):null}return u.jsx(mN,{...e,ref:t})});fN.displayName=Xa;var rr=10,[hN,fa]=Eo(Xa),TV="SelectContentImpl",jV=uo("SelectContent.RemoveScroll"),mN=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:l,onPointerDownOutside:c,side:f,sideOffset:h,align:m,alignOffset:g,arrowPadding:p,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:_,avoidCollisions:E,...j}=e,C=da(Xa,n),[A,k]=x.useState(null),[D,B]=x.useState(null),L=We(t,ae=>k(ae)),[P,U]=x.useState(null),[z,Y]=x.useState(null),se=Nf(n),[de,fe]=x.useState(!1),ce=x.useRef(!1);x.useEffect(()=>{if(A)return LC(A)},[A]),AC();const M=x.useCallback(ae=>{const[he,...ve]=se().map(Ue=>Ue.ref.current),[Oe]=ve.slice(-1),De=document.activeElement;for(const Ue of ae)if(Ue===De||(Ue?.scrollIntoView({block:"nearest"}),Ue===he&&D&&(D.scrollTop=0),Ue===Oe&&D&&(D.scrollTop=D.scrollHeight),Ue?.focus(),document.activeElement!==De))return},[se,D]),F=x.useCallback(()=>M([P,A]),[M,P,A]);x.useEffect(()=>{de&&F()},[de,F]);const{onOpenChange:X,triggerPointerDownPosRef:oe}=C;x.useEffect(()=>{if(A){let ae={x:0,y:0};const he=Oe=>{ae={x:Math.abs(Math.round(Oe.pageX)-(oe.current?.x??0)),y:Math.abs(Math.round(Oe.pageY)-(oe.current?.y??0))}},ve=Oe=>{ae.x<=10&&ae.y<=10?Oe.preventDefault():A.contains(Oe.target)||X(!1),document.removeEventListener("pointermove",he),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",ve,{capture:!0})}}},[A,X,oe]),x.useEffect(()=>{const ae=()=>X(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[X]);const[ee,O]=NN(ae=>{const he=se().filter(De=>!De.disabled),ve=he.find(De=>De.ref.current===document.activeElement),Oe=kN(he,ae,ve);Oe&&setTimeout(()=>Oe.ref.current.focus())}),K=x.useCallback((ae,he,ve)=>{const Oe=!ce.current&&!ve;(C.value!==void 0&&C.value===he||Oe)&&(U(ae),Oe&&(ce.current=!0))},[C.value]),Z=x.useCallback(()=>A?.focus(),[A]),ne=x.useCallback((ae,he,ve)=>{const Oe=!ce.current&&!ve;(C.value!==void 0&&C.value===he||Oe)&&Y(ae)},[C.value]),ie=s==="popper"?Lg:pN,ue=ie===Lg?{side:f,sideOffset:h,align:m,alignOffset:g,arrowPadding:p,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:_,avoidCollisions:E}:{};return u.jsx(hN,{scope:n,content:A,viewport:D,onViewportChange:B,itemRefCallback:K,selectedItem:P,onItemLeave:Z,itemTextRefCallback:ne,focusSelectedItem:F,selectedItemText:z,position:s,isPositioned:de,searchRef:ee,children:u.jsx(ov,{as:jV,allowPinchZoom:!0,children:u.jsx(iv,{asChild:!0,trapped:C.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Ae(i,ae=>{C.trigger?.focus({preventScroll:!0}),ae.preventDefault()}),children:u.jsx(yf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:u.jsx(ie,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ae=>ae.preventDefault(),...j,...ue,onPlaced:()=>fe(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:Ae(j.onKeyDown,ae=>{const he=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!he&&ae.key.length===1&&O(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Oe=se().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Oe=Oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const De=ae.target,Ue=Oe.indexOf(De);Oe=Oe.slice(Ue+1)}setTimeout(()=>M(Oe)),ae.preventDefault()}})})})})})})});mN.displayName=TV;var CV="SelectItemAlignedPosition",pN=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...i}=e,l=da(Xa,n),c=fa(Xa,n),[f,h]=x.useState(null),[m,g]=x.useState(null),p=We(t,L=>g(L)),b=Nf(n),w=x.useRef(!1),S=x.useRef(!0),{viewport:_,selectedItem:E,selectedItemText:j,focusSelectedItem:C}=c,A=x.useCallback(()=>{if(l.trigger&&l.valueNode&&f&&m&&_&&E&&j){const L=l.trigger.getBoundingClientRect(),P=m.getBoundingClientRect(),U=l.valueNode.getBoundingClientRect(),z=j.getBoundingClientRect();if(l.dir!=="rtl"){const De=z.left-P.left,Ue=U.left-De,yt=L.left-Ue,lt=L.width+yt,zr=Math.max(lt,P.width),gr=window.innerWidth-rr,Wn=u_(Ue,[rr,Math.max(rr,gr-zr)]);f.style.minWidth=lt+"px",f.style.left=Wn+"px"}else{const De=P.right-z.right,Ue=window.innerWidth-U.right-De,yt=window.innerWidth-L.right-Ue,lt=L.width+yt,zr=Math.max(lt,P.width),gr=window.innerWidth-rr,Wn=u_(Ue,[rr,Math.max(rr,gr-zr)]);f.style.minWidth=lt+"px",f.style.right=Wn+"px"}const Y=b(),se=window.innerHeight-rr*2,de=_.scrollHeight,fe=window.getComputedStyle(m),ce=parseInt(fe.borderTopWidth,10),M=parseInt(fe.paddingTop,10),F=parseInt(fe.borderBottomWidth,10),X=parseInt(fe.paddingBottom,10),oe=ce+M+de+X+F,ee=Math.min(E.offsetHeight*5,oe),O=window.getComputedStyle(_),K=parseInt(O.paddingTop,10),Z=parseInt(O.paddingBottom,10),ne=L.top+L.height/2-rr,ie=se-ne,ue=E.offsetHeight/2,ae=E.offsetTop+ue,he=ce+M+ae,ve=oe-he;if(he<=ne){const De=Y.length>0&&E===Y[Y.length-1].ref.current;f.style.bottom="0px";const Ue=m.clientHeight-_.offsetTop-_.offsetHeight,yt=Math.max(ie,ue+(De?Z:0)+Ue+F),lt=he+yt;f.style.height=lt+"px"}else{const De=Y.length>0&&E===Y[0].ref.current;f.style.top="0px";const yt=Math.max(ne,ce+_.offsetTop+(De?K:0)+ue)+ve;f.style.height=yt+"px",_.scrollTop=he-ne+_.offsetTop}f.style.margin=`${rr}px 0`,f.style.minHeight=ee+"px",f.style.maxHeight=se+"px",s?.(),requestAnimationFrame(()=>w.current=!0)}},[b,l.trigger,l.valueNode,f,m,_,E,j,l.dir,s]);At(()=>A(),[A]);const[k,D]=x.useState();At(()=>{m&&D(window.getComputedStyle(m).zIndex)},[m]);const B=x.useCallback(L=>{L&&S.current===!0&&(A(),C?.(),S.current=!1)},[A,C]);return u.jsx(NV,{scope:n,contentWrapper:f,shouldExpandOnScrollRef:w,onScrollButtonChange:B,children:u.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:u.jsx(je.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});pN.displayName=CV;var AV="SelectPopperPosition",Lg=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:i=rr,...l}=e,c=kf(n);return u.jsx(XA,{...c,...l,ref:t,align:s,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Lg.displayName=AV;var[NV,Av]=Eo(Xa,{}),zg="SelectViewport",gN=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...i}=e,l=fa(zg,n),c=Av(zg,n),f=We(t,l.onViewportChange),h=x.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(Af.Slot,{scope:n,children:u.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ae(i.onScroll,m=>{const g=m.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:b}=c;if(b?.current&&p){const w=Math.abs(h.current-g.scrollTop);if(w>0){const S=window.innerHeight-rr*2,_=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),j=Math.max(_,E);if(j<S){const C=j+w,A=Math.min(S,C),k=C-A;p.style.height=A+"px",p.style.bottom==="0px"&&(g.scrollTop=k>0?k:0,p.style.justifyContent="flex-end")}}}h.current=g.scrollTop})})})]})});gN.displayName=zg;var yN="SelectGroup",[kV,RV]=Eo(yN),OV=x.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=cr();return u.jsx(kV,{scope:n,id:i,children:u.jsx(je.div,{role:"group","aria-labelledby":i,...s,ref:t})})});OV.displayName=yN;var vN="SelectLabel",DV=x.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=RV(vN,n);return u.jsx(je.div,{id:i.id,...s,ref:t})});DV.displayName=vN;var Vd="SelectItem",[MV,bN]=Eo(Vd),xN=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:i=!1,textValue:l,...c}=e,f=da(Vd,n),h=fa(Vd,n),m=f.value===s,[g,p]=x.useState(l??""),[b,w]=x.useState(!1),S=We(t,C=>h.itemRefCallback?.(C,s,i)),_=cr(),E=x.useRef("touch"),j=()=>{i||(f.onValueChange(s),f.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(MV,{scope:n,value:s,disabled:i,textId:_,isSelected:m,onItemTextChange:x.useCallback(C=>{p(A=>A||(C?.textContent??"").trim())},[]),children:u.jsx(Af.ItemSlot,{scope:n,value:s,disabled:i,textValue:g,children:u.jsx(je.div,{role:"option","aria-labelledby":_,"data-highlighted":b?"":void 0,"aria-selected":m&&b,"data-state":m?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...c,ref:S,onFocus:Ae(c.onFocus,()=>w(!0)),onBlur:Ae(c.onBlur,()=>w(!1)),onClick:Ae(c.onClick,()=>{E.current!=="mouse"&&j()}),onPointerUp:Ae(c.onPointerUp,()=>{E.current==="mouse"&&j()}),onPointerDown:Ae(c.onPointerDown,C=>{E.current=C.pointerType}),onPointerMove:Ae(c.onPointerMove,C=>{E.current=C.pointerType,i?h.onItemLeave?.():E.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(c.onPointerLeave,C=>{C.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:Ae(c.onKeyDown,C=>{h.searchRef?.current!==""&&C.key===" "||(vV.includes(C.key)&&j(),C.key===" "&&C.preventDefault())})})})})});xN.displayName=Vd;var Al="SelectItemText",wN=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,...l}=e,c=da(Al,n),f=fa(Al,n),h=bN(Al,n),m=SV(Al,n),[g,p]=x.useState(null),b=We(t,j=>p(j),h.onItemTextChange,j=>f.itemTextRefCallback?.(j,h.value,h.disabled)),w=g?.textContent,S=x.useMemo(()=>u.jsx("option",{value:h.value,disabled:h.disabled,children:w},h.value),[h.disabled,h.value,w]),{onNativeOptionAdd:_,onNativeOptionRemove:E}=m;return At(()=>(_(S),()=>E(S)),[_,E,S]),u.jsxs(u.Fragment,{children:[u.jsx(je.span,{id:h.textId,...l,ref:b}),h.isSelected&&c.valueNode&&!c.valueNodeHasChildren?ic.createPortal(l.children,c.valueNode):null]})});wN.displayName=Al;var SN="SelectItemIndicator",_N=x.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return bN(SN,n).isSelected?u.jsx(je.span,{"aria-hidden":!0,...s,ref:t}):null});_N.displayName=SN;var Ig="SelectScrollUpButton",EN=x.forwardRef((e,t)=>{const n=fa(Ig,e.__scopeSelect),s=Av(Ig,e.__scopeSelect),[i,l]=x.useState(!1),c=We(t,s.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=h.scrollTop>0;l(m)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),i?u.jsx(jN,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});EN.displayName=Ig;var Bg="SelectScrollDownButton",TN=x.forwardRef((e,t)=>{const n=fa(Bg,e.__scopeSelect),s=Av(Bg,e.__scopeSelect),[i,l]=x.useState(!1),c=We(t,s.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=h.scrollHeight-h.clientHeight,g=Math.ceil(h.scrollTop)<m;l(g)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),i?u.jsx(jN,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});TN.displayName=Bg;var jN=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...i}=e,l=fa("SelectScrollButton",n),c=x.useRef(null),f=Nf(n),h=x.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return x.useEffect(()=>()=>h(),[h]),At(()=>{f().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),u.jsx(je.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ae(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(s,50))}),onPointerMove:Ae(i.onPointerMove,()=>{l.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(s,50))}),onPointerLeave:Ae(i.onPointerLeave,()=>{h()})})}),PV="SelectSeparator",LV=x.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return u.jsx(je.div,{"aria-hidden":!0,...s,ref:t})});LV.displayName=PV;var Ug="SelectArrow",zV=x.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=kf(n),l=da(Ug,n),c=fa(Ug,n);return l.open&&c.position==="popper"?u.jsx(JA,{...i,...s,ref:t}):null});zV.displayName=Ug;var IV="SelectBubbleInput",CN=x.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const i=x.useRef(null),l=We(s,i),c=yv(t);return x.useEffect(()=>{const f=i.current;if(!f)return;const h=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(h,"value").set;if(c!==t&&g){const p=new Event("change",{bubbles:!0});g.call(f,t),f.dispatchEvent(p)}},[c,t]),u.jsx(je.select,{...n,style:{...oC,...n.style},ref:l,defaultValue:t})});CN.displayName=IV;function AN(e){return e===""||e===void 0}function NN(e){const t=ds(e),n=x.useRef(""),s=x.useRef(0),i=x.useCallback(c=>{const f=n.current+c;t(f),(function h(m){n.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(f)},[t]),l=x.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,i,l]}function kN(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=BV(e,Math.max(l,0));i.length===1&&(c=c.filter(m=>m!==n));const h=c.find(m=>m.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}function BV(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var UV=aN,VV=oN,$V=cN,HV=uN,GV=dN,qV=fN,FV=gN,KV=xN,WV=wN,YV=_N,XV=EN,JV=TN,Rf="Switch",[ZV]=Dn(Rf),[QV,e$]=ZV(Rf),RN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,name:s,checked:i,defaultChecked:l,required:c,disabled:f,value:h="on",onCheckedChange:m,form:g,...p}=e,[b,w]=x.useState(null),S=We(t,A=>w(A)),_=x.useRef(!1),E=b?g||!!b.closest("form"):!0,[j,C]=dr({prop:i,defaultProp:l??!1,onChange:m,caller:Rf});return u.jsxs(QV,{scope:n,checked:j,disabled:f,children:[u.jsx(je.button,{type:"button",role:"switch","aria-checked":j,"aria-required":c,"data-state":PN(j),"data-disabled":f?"":void 0,disabled:f,value:h,...p,ref:S,onClick:Ae(e.onClick,A=>{C(k=>!k),E&&(_.current=A.isPropagationStopped(),_.current||A.stopPropagation())})}),E&&u.jsx(MN,{control:b,bubbles:!_.current,name:s,value:h,checked:j,required:c,disabled:f,form:g,style:{transform:"translateX(-100%)"}})]})});RN.displayName=Rf;var ON="SwitchThumb",DN=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...s}=e,i=e$(ON,n);return u.jsx(je.span,{"data-state":PN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})});DN.displayName=ON;var t$="SwitchBubbleInput",MN=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:s=!0,...i},l)=>{const c=x.useRef(null),f=We(c,l),h=yv(n),m=vv(t);return x.useEffect(()=>{const g=c.current;if(!g)return;const p=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(p,"checked").set;if(h!==n&&w){const S=new Event("click",{bubbles:s});w.call(g,n),g.dispatchEvent(S)}},[h,n,s]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:f,style:{...i.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});MN.displayName=t$;function PN(e){return e?"checked":"unchecked"}var n$=RN,r$=DN,Of="Tabs",[s$]=Dn(Of,[QA]),LN=QA(),[a$,Nv]=s$(Of),zN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:i,defaultValue:l,orientation:c="horizontal",dir:f,activationMode:h="automatic",...m}=e,g=mf(f),[p,b]=dr({prop:s,onChange:i,defaultProp:l??"",caller:Of});return u.jsx(a$,{scope:n,baseId:cr(),value:p,onValueChange:b,orientation:c,dir:g,activationMode:h,children:u.jsx(je.div,{dir:g,"data-orientation":c,...m,ref:t})})});zN.displayName=Of;var IN="TabsList",BN=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...i}=e,l=Nv(IN,n),c=LN(n);return u.jsx(hV,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:s,children:u.jsx(je.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:t})})});BN.displayName=IN;var UN="TabsTrigger",VN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:i=!1,...l}=e,c=Nv(UN,n),f=LN(n),h=GN(c.baseId,s),m=qN(c.baseId,s),g=s===c.value;return u.jsx(mV,{asChild:!0,...f,focusable:!i,active:g,children:u.jsx(je.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:h,...l,ref:t,onMouseDown:Ae(e.onMouseDown,p=>{!i&&p.button===0&&p.ctrlKey===!1?c.onValueChange(s):p.preventDefault()}),onKeyDown:Ae(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&c.onValueChange(s)}),onFocus:Ae(e.onFocus,()=>{const p=c.activationMode!=="manual";!g&&!i&&p&&c.onValueChange(s)})})})});VN.displayName=UN;var $N="TabsContent",HN=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:i,children:l,...c}=e,f=Nv($N,n),h=GN(f.baseId,s),m=qN(f.baseId,s),g=s===f.value,p=x.useRef(g);return x.useEffect(()=>{const b=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(b)},[]),u.jsx(ms,{present:i||g,children:({present:b})=>u.jsx(je.div,{"data-state":g?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:b&&l})})});HN.displayName=$N;function GN(e,t){return`${e}-trigger-${t}`}function qN(e,t){return`${e}-content-${t}`}var i$=zN,o$=BN,l$=VN,c$=HN,[Df]=Dn("Tooltip",[Cf]),Mf=Cf(),FN="TooltipProvider",u$=700,Vg="tooltip.open",[d$,kv]=Df(FN),KN=e=>{const{__scopeTooltip:t,delayDuration:n=u$,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:l}=e,c=x.useRef(!0),f=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),u.jsx(d$,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(h.current),c.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(m=>{f.current=m},[]),disableHoverableContent:i,children:l})};KN.displayName=FN;var Kl="Tooltip",[f$,mc]=Df(Kl),WN=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:i,onOpenChange:l,disableHoverableContent:c,delayDuration:f}=e,h=kv(Kl,e.__scopeTooltip),m=Mf(t),[g,p]=x.useState(null),b=cr(),w=x.useRef(0),S=c??h.disableHoverableContent,_=f??h.delayDuration,E=x.useRef(!1),[j,C]=dr({prop:s,defaultProp:i??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Vg))):h.onClose(),l?.(L)},caller:Kl}),A=x.useMemo(()=>j?E.current?"delayed-open":"instant-open":"closed",[j]),k=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,E.current=!1,C(!0)},[C]),D=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,C(!1)},[C]),B=x.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{E.current=!0,C(!0),w.current=0},_)},[_,C]);return x.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),u.jsx(WA,{...m,children:u.jsx(f$,{scope:t,contentId:b,open:j,stateAttribute:A,trigger:g,onTriggerChange:p,onTriggerEnter:x.useCallback(()=>{h.isOpenDelayedRef.current?B():k()},[h.isOpenDelayedRef,B,k]),onTriggerLeave:x.useCallback(()=>{S?D():(window.clearTimeout(w.current),w.current=0)},[D,S]),onOpen:k,onClose:D,disableHoverableContent:S,children:n})})};WN.displayName=Kl;var $g="TooltipTrigger",YN=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,i=mc($g,n),l=kv($g,n),c=Mf(n),f=x.useRef(null),h=We(t,f,i.onTriggerChange),m=x.useRef(!1),g=x.useRef(!1),p=x.useCallback(()=>m.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(YA,{asChild:!0,...c,children:u.jsx(je.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...s,ref:h,onPointerMove:Ae(e.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!l.isPointerInTransitRef.current&&(i.onTriggerEnter(),g.current=!0)}),onPointerLeave:Ae(e.onPointerLeave,()=>{i.onTriggerLeave(),g.current=!1}),onPointerDown:Ae(e.onPointerDown,()=>{i.open&&i.onClose(),m.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ae(e.onFocus,()=>{m.current||i.onOpen()}),onBlur:Ae(e.onBlur,i.onClose),onClick:Ae(e.onClick,i.onClose)})})});YN.displayName=$g;var Rv="TooltipPortal",[h$,m$]=Df(Rv,{forceMount:void 0}),XN=e=>{const{__scopeTooltip:t,forceMount:n,children:s,container:i}=e,l=mc(Rv,t);return u.jsx(h$,{scope:t,forceMount:n,children:u.jsx(ms,{present:n||l.open,children:u.jsx(vf,{asChild:!0,container:i,children:s})})})};XN.displayName=Rv;var ho="TooltipContent",JN=x.forwardRef((e,t)=>{const n=m$(ho,e.__scopeTooltip),{forceMount:s=n.forceMount,side:i="top",...l}=e,c=mc(ho,e.__scopeTooltip);return u.jsx(ms,{present:s||c.open,children:c.disableHoverableContent?u.jsx(ZN,{side:i,...l,ref:t}):u.jsx(p$,{side:i,...l,ref:t})})}),p$=x.forwardRef((e,t)=>{const n=mc(ho,e.__scopeTooltip),s=kv(ho,e.__scopeTooltip),i=x.useRef(null),l=We(t,i),[c,f]=x.useState(null),{trigger:h,onClose:m}=n,g=i.current,{onPointerInTransitChange:p}=s,b=x.useCallback(()=>{f(null),p(!1)},[p]),w=x.useCallback((S,_)=>{const E=S.currentTarget,j={x:S.clientX,y:S.clientY},C=b$(j,E.getBoundingClientRect()),A=x$(j,C),k=w$(_.getBoundingClientRect()),D=_$([...A,...k]);f(D),p(!0)},[p]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(h&&g){const S=E=>w(E,g),_=E=>w(E,h);return h.addEventListener("pointerleave",S),g.addEventListener("pointerleave",_),()=>{h.removeEventListener("pointerleave",S),g.removeEventListener("pointerleave",_)}}},[h,g,w,b]),x.useEffect(()=>{if(c){const S=_=>{const E=_.target,j={x:_.clientX,y:_.clientY},C=h?.contains(E)||g?.contains(E),A=!S$(j,c);C?b():A&&(b(),m())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[h,g,c,m,b]),u.jsx(ZN,{...e,ref:l})}),[g$,y$]=Df(Kl,{isInside:!1}),v$=iC("TooltipContent"),ZN=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:c,...f}=e,h=mc(ho,n),m=Mf(n),{onClose:g}=h;return x.useEffect(()=>(document.addEventListener(Vg,g),()=>document.removeEventListener(Vg,g)),[g]),x.useEffect(()=>{if(h.trigger){const p=b=>{b.target?.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),u.jsx(yf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:u.jsxs(XA,{"data-state":h.stateAttribute,...m,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(v$,{children:s}),u.jsx(g$,{scope:n,isInside:!0,children:u.jsx(w6,{id:h.contentId,role:"tooltip",children:i||s})})]})})});JN.displayName=ho;var QN="TooltipArrow",ek=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,i=Mf(n);return y$(QN,n).isInside?null:u.jsx(JA,{...i,...s,ref:t})});ek.displayName=QN;function b$(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,s,i,l)){case l:return"left";case i:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function x$(e,t,n=5){const s=[];
162switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function w$(e){const{top:t,right:n,bottom:s,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:s},{x:i,y:s}]}function S$(e,t){const{x:n,y:s}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const f=t[l],h=t[c],m=f.x,g=f.y,p=h.x,b=h.y;g>s!=b>s&&n<(p-m)*(s-g)/(b-g)+m&&(i=!i)}return i}function _$(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),E$(t)}function E$(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const i=e[s];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var T$=KN,j$=WN,C$=YN,A$=XN,N$=JN,k$=ek;function Ov({className:e,orientation:t="horizontal",...n}){return u.jsx(i$,{"data-slot":"tabs","data-orientation":t,orientation:t,className:re("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const R$=ff("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:h-fit data-[variant=line]:rounded-none data-[variant=line]:p-0",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Dv({className:e,variant:t="default",...n}){return u.jsx(o$,{"data-slot":"tabs-list","data-variant":t,className:re(R$({variant:t}),e),...n})}function Mv({className:e,...t}){return u.jsx(l$,{"data-slot":"tabs-trigger",className:re("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:rounded-t-lg group-data-[variant=line]/tabs-list:rounded-b-none group-data-[variant=line]/tabs-list:px-4 group-data-[variant=line]/tabs-list:py-2.5 group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-primary/10 group-data-[variant=line]/tabs-list:data-[state=active]:text-primary dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-primary/15","data-[state=active]:bg-background data-[state=active]:text-primary dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-primary","after:absolute after:bg-primary after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5",e),...t})}function Pv({className:e,...t}){return u.jsx(c$,{"data-slot":"tabs-content",className:re("flex-1 outline-none",e),...t})}function d_({heading:e,paragraphs:t,bullets:n}){return u.jsxs("div",{className:"w-full",children:[u.jsx("h3",{className:"mb-3 text-xl font-semibold",children:e}),u.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[t.map((s,i)=>u.jsx("p",{children:s},i)),n&&u.jsx("ul",{className:"space-y-3 pl-1",children:n.map(s=>u.jsxs("li",{className:"flex gap-2.5",children:[u.jsx("span",{className:"mt-2 h-1 w-1 shrink-0 rounded-full bg-primary"}),u.jsxs("span",{children:[u.jsxs("span",{className:"font-semibold text-foreground",children:[s.label,": "]}),s.text]})]},s.label))})]})]})}const Gu=[{value:"stability",label:"Phase & Surface Stability"},{value:"scaling",label:"Growth Scaling"},{value:"ai-control",label:"AI & In-Situ Control"}];function O$(){return u.jsxs("section",{id:"history",className:"relative",children:[u.jsx(Ft,{src:II}),u.jsxs("div",{className:"glass-card overflow-hidden px-6 py-12 md:px-10 md:py-16",children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"History / Development from research to product"}),u.jsx(Mr,{as:"h2",text:"From a research breakthrough to a commercial spin-off",className:"mb-3 text-2xl font-semibold"}),u.jsx(Ge,{delay:1,className:"space-y-4 text-base leading-relaxed text-muted-foreground",children:c6.map((e,t)=>u.jsx("p",{children:e},t))}),u.jsx(Ge,{delay:2,className:"mt-12",children:u.jsxs(Ov,{defaultValue:Gu[0].value,children:[u.jsx(Dv,{variant:"line",className:"h-auto w-full flex-wrap justify-start gap-1 border-b border-border dark:border-white/10",children:Gu.map(e=>u.jsx(Mv,{value:e.value,className:"text-sm",children:e.label},e.value))}),u6.map((e,t)=>u.jsx(Pv,{value:Gu[t].value,className:"pt-8",children:u.jsx(d_,{...e})},Gu[t].value))]})}),u.jsx(h6,{}),u.jsx("div",{className:"mt-14 border-t border-border pt-10 dark:border-white/10",children:u.jsx(Ge,{children:u.jsx(d_,{...d6})})})]})]})}const D$=["Leibniz-Institut für Kristallzüchtung (IKZ)","Investitionsbank Berlin","INAM — Innovation Network for Advanced Materials","Advanced Materials Lab","Gallox Semiconductors","Novel Crystal Technology, Inc.","GARENSEMI","Fujia Gallium"],M$=["Novel Crystal Technology, Inc.","GARENSEMI 镓仁半导体","Fujia Gallium 富加镓业","Gao Semi 镓和半导体"];function P$(){return u.jsxs("div",{className:"glass-card overflow-hidden px-6 py-12 md:px-10 md:py-16",children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Substrate Suppliers"}),u.jsx(Mr,{as:"h2",text:"Our Ga₂O₃ substrate suppliers",className:"text-2xl font-semibold"}),u.jsx("div",{className:"mt-11 grid grid-cols-2 gap-4 md:grid-cols-4",children:M$.map((e,t)=>u.jsx(Ge,{delay:Math.min(Math.floor(t/2)+1,3),children:u.jsx("div",{className:"flex min-h-[76px] items-center justify-center rounded-xl border border-border px-4 py-6 text-center font-mono text-[12.5px] text-muted-foreground transition-[border-color,color,transform] duration-300 hover:-translate-y-0.5 hover:border-primary hover:text-foreground",children:e})},e))})]})}function L$(){return u.jsxs("section",{id:"partners",className:"relative",children:[u.jsx(Ft,{src:BI}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"glass-card overflow-hidden px-6 py-12 md:px-10 md:py-16",children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Partners"}),u.jsx(Mr,{as:"h2",text:"Backed by Europe's advanced materials network",className:"text-2xl font-semibold"}),u.jsx("div",{className:"mt-11 grid grid-cols-2 gap-4 md:grid-cols-4",children:D$.map((e,t)=>u.jsx(Ge,{delay:Math.min(Math.floor(t/2)+1,3),children:u.jsx("div",{className:"flex min-h-[76px] items-center justify-center rounded-xl border border-border px-4 py-6 text-center font-mono text-[12.5px] text-muted-foreground transition-[border-color,color,transform] duration-300 hover:-translate-y-0.5 hover:border-primary hover:text-foreground",children:e})},e))})]}),u.jsx(P$,{})]})]})}const z$=[{id:"mission",label:"Mission"}
162,{id:"technology",label:"Technology"},{id:"about",label:"About us"},{id:"history",label:"History"},{id:"partners",label:"Partners"}];function I$({railVisible:e}){return u.jsxs(u.Fragment,{children:[u.jsx(DI,{items:z$,visible:e}),u.jsxs("div",{className:"mx-auto max-w-[1320px] space-y-6 px-6 py-16 md:px-12 md:py-24",children:[u.jsx(WI,{}),u.jsx(ZI,{}),u.jsx(l6,{}),u.jsx(O$,{}),u.jsx(L$,{})]})]})}const B$=[{number:"01",icon:Sz,image:"/images/why-gallium-oxide/01-ultra-wide-bandgap.png",title:"Ultra-wide bandgap",description:"A bandgap of approximately 4.8 eV enables higher breakdown voltage and lower energy losses.",callout:"Charge an EV in under 10 minutes"},{number:"02",icon:us,image:"/images/why-gallium-oxide/02-cost-effective-growth.png",title:"Cost-effective growth",description:"Grown from the melt, enabling larger wafers at higher volume and lower cost than SiC or GaN.",callout:"6-inch epiwafer below €1000 by 2027-2028"},{number:"03",icon:cz,image:"/images/why-gallium-oxide/03-radiation-hardness.png",title:"High-temp & radiation hardness",description:"Remains durable in high-temperature operation and high-radiation environments."},{number:"04",icon:S4,image:"/images/why-gallium-oxide/04-solar-flame-detection.jpg",title:"Solar-blind flame detection",description:"Filters out solar interference, isolating deep-UV light below 270nm for precise flame detection."}],f_={stack:us,grid:C4,list:z4},h_=50;function U$({cards:e,className:t,defaultLayout:n="grid",showLayoutSwitcher:s=!1}
162){const[i,l]=x.useState(n),[c,f]=x.useState(null),[h,m]=x.useState(0),[g,p]=x.useState(!1);if(e.length===0)return null;const b=(j,C)=>{const{offset:A,velocity:k}=C,D=Math.abs(A.x)*k.x;A.x<-h_||D<-1e3?m(B=>(B+1)%e.length):(A.x>h_||D>1e3)&&m(B=>(B-1+e.length)%e.length),p(!1)},w=()=>{const j=[];for(let C=0;C<e.length;C++){const A=(h+C)%e.length;j.push({...e[A],stackPosition:C})}return j.reverse()},S=(j,C)=>{switch(i){case"stack":return{top:j*8,left:j*8,zIndex:e.length-j,rotate:(j-1)*2};case"grid":return{top:0,left:0,zIndex:C?10:1,rotate:0};case"list":return{top:0,left:0,zIndex:1,rotate:0}}},_={stack:"relative mx-auto h-72 w-72",grid:"grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4",list:"flex flex-col gap-3"},E=i==="stack"?w():e.map((j,C)=>({...j,stackPosition:C}));return u.jsx(hj,{reducedMotion:"user",children:u.jsxs("div",{className:re("space-y-8",t),children:[s&&u.jsx("div",{className:"mx-auto flex w-fit items-center gap-1 rounded-lg border border-border bg-secondary/50 p-1",children:Object.keys(f_).map(j=>{const C=f_[j];return u.jsx("button",{type:"button",onClick:()=>l(j),"aria-label":`Switch to ${j} layout`,"aria-pressed":i===j,className:re("rounded-md p-2 transition-colors",i===j?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-secondary hover:text-foreground"),children:u.jsx(C,{className:"h-4 w-4"})},j)})}),u.jsx(LL,{children:u.jsx(co.div,{layout:!0,className:_[i],children:u.jsx(RL,{mode:"popLayout",children:E.map(j=>{const C=c===j.id,A=i==="stack"&&j.stackPosition===0,k=S(j.stackPosition,C);return u.jsxs(co.div,{layoutId:j.id,initial:{opacity:0,scale:.85},animate:{opacity:1,scale:C?1.05:1,x:0,...k},exit:{opacity:0,scale:.85},transition:{type:"spring",stiffness:300,damping:26},drag:A?"x":!1,dragConstraints:{left:0,right:0},dragElastic:.7,onDragStart:()=>p(!0),onDragEnd:b,whileDrag:{cursor:"grabbing"},onClick:()=>{g||f(C?null:j.id)},className:re("cursor-pointer",i==="stack"&&"absolute h-72 w-72",i==="stack"&&A&&"cursor-grab active:cursor-grabbing",i==="grid"&&"relative h-full",i==="list"&&"w-full"),children:[i==="grid"&&u.jsx(V$,{card:j,isExpanded:C,index:j.stackPosition}),i==="stack"&&u.jsx($$,{card:j,isTopCard:A}),i==="list"&&u.jsx(H$,{card:j,isExpanded:C})]},j.id)})})})}),i==="stack"&&e.length>1&&u.jsx("div",{className:"flex justify-center gap-1.5",children:e.map((j,C)=>u.jsx("button",{type:"button",onClick:()=>m(C),"aria-label":`Go to card ${C+1}`,className:re("h-1.5 rounded-full transition-all",C===h?"w-4 bg-primary":"w-1.5 bg-muted-foreground/30 hover:bg-muted-foreground/50")},C))})]})})}function V$({card:e,isExpanded:t,index:n=0}){const{ref:s,onMouseMove:i,onMouseLeave:l}=dc(),c=e.icon,f=8+n*1.5,h=n*90,m=n%2===1;return u.jsxs("div",{ref:s,onMouseMove:i,onMouseLeave:l,style:{transformStyle:"preserve-3d"},className:"group relative flex h-full flex-col transition-shadow duration-300 will-change-transform hover:shadow-lg motion-reduce:transition-none",children:[u.jsx("div",{className:re("glass-card absolute inset-0 overflow-hidden",t&&"border-primary ring-2 ring-primary/20 dark:border-primary")}),u.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 z-10 h-3.5 w-3.5 -translate-x-1.5 -translate-y-1.5 border-l-2 border-t-2 border-white opacity-0 transition-all duration-300 group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100"}),u.jsx("span",{className:"pointer-events-none absolute right-1.5 top-1.5 z-10 h-3.5 w-3.5 translate-x-1.5 -translate-y-1.5 border-r-2 border-t-2 border-white opacity-0 transition-all duration-300 group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100"}),u.jsx("span",{className:"pointer-events-none absolute bottom-1.5 left-1.5 z-10 h-3.5 w-3.5 -translate-x-1.5 translate-y-1.5 border-b-2 border-l-2 border-white opacity-0 transition-all duration-300 group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100"}),u.jsx("span",{className:"pointer-events-none absolute bottom-1.5 right-1.5 z-10 h-3.5 w-3.5 translate-x-1.5 translate-y-1.5 border-b-2 border-r-2 border-white opacity-0 transition-all duration-300 group-hover:translate-x-0 group-hover:translate-y-0 group-hover:opacity-100"}),e.number&&u.jsx("div",{className:"pointer-events-none absolute right-3 top-3 h-20 w-24 overflow-hidden rounded-lg",children:u.jsx("span",{className:"absolute -top-2 right-0 select-none font-mono text-[84px] font-bold leading-none text-primary opacity-[0.08] transition-all duration-300 group-hover:scale-105 group-hover:opacity-[0.16]",children:e.number})}),u.jsxs("div",{className:"relative flex flex-col p-[22px]",children:[u.jsx(Jy,{size:40,duration:f,startAngle:h,reverse:m,children:u.jsx(c,{className:"relative h-5 w-5 text-primary transition-transform duration-300 group-hover:-rotate-[4deg] group-hover:scale-[1.15]",strokeWidth:2})}),u.jsx("div",{style:{transform:"translateZ(20px)"},className:"relative mb-3 mt-3.5 text-[17px] font-semibold",children:e.title}),e.image&&u.jsx("div",{className:"relative mb-3 overflow-hidden rounded-lg",children:u.jsx("img",{src:e.image,alt:"",className:"aspect-[16/10] w-full object-cover transition-transform duration-500 group-hover:scale-105"})}),u.jsx("p",{style:{transform:"translateZ(10px)"},className:"relative text-sm leading-relaxed text-muted-foreground",children:e.description}),u.jsx("div",{className:re("relative mt-4 border-t border-border pt-3 font-mono text-[12.5px] text-primary transition-colors duration-300 group-hover:border-primary/40",!e.callout&&"invisible"),children:e.callout??"placeholder"})]})]})}function $$({card:e,isTopCard:t}){const n=e.icon;return u.jsxs("div",{className:"glass-card relative flex h-full w-full flex-col overflow-hidden p-6 shadow-lg",children:[e.number&&u.jsx("span",{className:"pointer-events-none absolute -top-2 right-2 select-none font-mono text-6xl font-bold leading-none text-primary opacity-[0.08]",children:e.number}),e.image?u.jsx("div",{className:"relative h-12 w-12 overflow-hidden rounded-lg border border-border",children:u.jsx("img",{src:e.image,alt:"",className:"h-full w-full object-cover"})}):u.jsx(n,{className:"relative h-6 w-6 text-primary",strokeWidth:2}),u.jsx("div",{className:"relative mb-2 mt-4 text-lg font-semibold",children:e.title}),u.jsx("p",{className:"relative line-clamp-4 text-sm leading-relaxed text-muted-foreground",children:e.description}),t&&u.jsx("span",{className:"pointer-events-none absolute bottom-3 left-0 right-0 text-center font-mono text-[10.5px] uppercase tracking-wide text-muted-foreground
162/60",children:"Drag to explore"})]})}function H$({card:e,isExpanded:t}){const n=e.icon;return u.jsxs("div",{className:re("glass-card flex items-center gap-4 p-4 transition-colors duration-300",t?"border-primary ring-2 ring-primary/20 dark:border-primary":"hover:border-primary/50"),children:[u.jsx("div",{className:"h-10 w-10 shrink-0 overflow-hidden rounded-lg border border-border",children:e.image?u.jsx("img",{src:e.image,alt:"",className:"h-full w-full object-cover"}):u.jsx("div",{className:"flex h-full w-full items-center justify-center text-primary",children:u.jsx(n,{className:"h-5 w-5",strokeWidth:2})})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"font-semibold",children:e.title}),u.jsx("p",{className:"truncate text-sm text-muted-foreground",children:e.description})]}),e.callout&&u.jsx("div",{className:"hidden shrink-0 font-mono text-xs text-primary sm:block",children:e.callout})]})}const G$=B$.map(e=>({id:e.number,...e}));function q$(){return u.jsxs("section",{id:"why-gallium-oxide",className:"relative mx-auto max-w-[1320px] px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:UI}),u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Why Gallium Oxide"}),u.jsx(Mr,{as:"h2",text:"The material behind the next power electronics revolution",className:"mb-4 text-3xl font-semibold leading-tight"}),u.jsxs(Ge,{delay:1,as:"div",className:"mb-11 space-y-4 text-base leading-relaxed text-muted-foreground",children:[u.jsx("p",{children:"Our modern society relies on a vast array of electrical and electronic systems, almost all of which require the conversion of electrical energy from one form to another to make it usable for us. However, this process is highly inefficient: according to industry reports, a staggering 65% of all generated energy in 2021 was lost in Germany, primarily due to flaring and power conversion inefficiencies."}),u.jsx("p",{children:"Efficient power electronics are therefore a critical success factor for the global green energy transition. As a next-generation semiconductor material, beta-Gallium Oxide (β-Ga2O3) has the potential to drastically reduce these conversion losses, cut system costs, and make a significant, measurable contribution to climate protection."}),u.jsx("p",{children:"While the intrinsic material properties of β-Ga2O3 are revolutionary, its real-world performance depends entirely on the quality of the crystalline layers. At NextGO Epi, we specialize in high-quality MOCVD (Metal-Organic Chemical Vapor Deposition) technology. By controlling the growth rate, doping, and alloy concentration at an atomic level, we transform raw material potential into high-performance epiwafers ready for industrial power and RF applications."})]}),u.jsx(Ge,{delay:2,children:u.jsx(U$,{cards:G$,defaultLayout:"grid"})})]})}const F$="Max-Born-Straße 2a, 12489 Berlin-Bezirk Treptow-Köpenick, Germany",K$="[email protected]";function W$(){return u.jsxs("section",{id:"contact",className:"relative mx-auto max-w-[1320px] px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:VI}),u.jsxs("div",{className:"glass-card relative grid overflow-hidden md:grid-cols-2",children:[u.jsx("img",{src:"/images/contact/team-photo.png",alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover object-[center_25%] opacity-15 md:hidden"}),u.jsxs("div",{className:"relative p-8 md:p-12",children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Contact"}),u.jsx(Mr,{as:"h2",text:"Get in touch",className:"mb-4 text-2xl font-semibold"}),u.jsx(Ge,{delay:1,as:"p",className:"mb-8 text-base leading-relaxed text-muted-foreground",children:"Interested in partnering, investing, or learning more about our gallium oxide epitaxy process? We'd like to hear from you."}),u.jsx(Ge,{delay:2,children:u.jsxs(eC,{href:`mailto:${K$}`,label:"Contact Us",children:[u.jsx(Hy,{})," Contact Us"]})}),u.jsx("p",{className:"mt-6 font-mono text-xs text-muted-foreground",children:F$})]}),u.jsx("div",{className:"group relative hidden overflow-hidden md:block",style:{height:440},children:u.jsx("img",{src:"/images/contact/team-photo.png",alt:"NextGO Epi team at a trade-show booth with Ga₂O₃ wafer samples",className:"absolute inset-0 h-full w-full object-cover object-[center_25%] transition-transform duration-500 group-hover:scale-105"})})]})]})}function Y$(){ca();const{ref:e,isInView:t}=A1(),{ref:n,isInView:s}=A1();return u.jsxs(u.Fragment,{children:[u.jsx(RI,{}),u.jsx("div",{ref:e,children:u.jsx(I$,{railVisible:t&&!s})}),u.jsx("div",{ref:n,children:u.jsx(q$,{})}),u.jsx(W$,{})]})}const X$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
162class Lv extends Error{constructor(t,n="FunctionsError",s){super(t),this.name=n,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class J$ extends Lv{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class m_ extends Lv{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class p_ extends Lv{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Hg;(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"})(Hg||(Hg={}));class Z${constructor(t,{headers:n={},customFetch:s,region:i=Hg.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=X$(s)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return pB(this,arguments,void 0,function*(n,s={}){var i,l;let c,f,h;try{const{headers:m,method:g,body:p,signal:b,timeout:w}=s;let S={},{region:_}=s;_||(_=this.region);const E=new URL(`${this.url}/${n}`);_&&_!=="any"&&(S["x-region"]=_,E.searchParams.set("forceFunctionRegion",_));let j;const C=!!m&&Object.keys(m).some(P=>P.toLowerCase()==="content-type");p&&!C?typeof Blob<"u"&&p instanceof Blob||p instanceof ArrayBuffer?(S["Content-Type"]="application/octet-stream",j=p):typeof p=="string"?(S["Content-Type"]="text/plain",j=p):typeof FormData<"u"&&p instanceof FormData?j=p:(S["Content-Type"]="application/json",j=JSON.stringify(p)):p&&typeof p!="string"&&!(typeof Blob<"u"&&p instanceof Blob)&&!(p instanceof ArrayBuffer)&&!(typeof FormData<"u"&&p instanceof FormData)?j=JSON.stringify(p):j=p;let A=b;w&&(f=new AbortController,c=setTimeout(()=>f.abort(),w),b?(A=f.signal,h=()=>f.abort(),b.addEventListener("abort",h)):A=f.signal);const k=yield this.fetch(E.toString(),{method:g||"POST",headers:Object.assign(Object.assign(Object.assign({},S),this.headers),m),body:j,signal:A}).catch(P=>{throw new J$(P)}),D=k.headers.get("x-relay-error");if(D&&D==="true")throw new m_(k);if(!k.ok)throw new p_(k);let B=((i=k.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim().toLowerCase(),L;return B==="application/json"?L=yield k.json():B==="application/octet-stream"||B==="application/pdf"?L=yield k.blob():B==="text/event-stream"?L=k:B==="multipart/form-data"?L=yield k.formData():L=yield k.text(),{data:L,error:null,response:k}}catch(m){return{data:null,error:m,response:m instanceof p_||m instanceof m_?m.context:void 0}}finally{c&&clearTimeout(c),h&&((l=s.signal)===null||l===void 0||l.removeEventListener("abort",h))}})}}const tk=3,g_=e=>Math.min(1e3*2**e,3e4),Q$=[520,503],nk=["GET","HEAD","OPTIONS"];var y_=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
162de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function v_(e,t){return new Promise(n=>{if(t?.aborted){n();return}const s=setTimeout(()=>{t?.removeEventListener("abort",i),n()},e);function i(){clearTimeout(s),n()}t?.addEventListener("abort",i)})}function eH(e,t,n,s){return!(!s||n>=tk||!nk.includes(e)||!Q$.includes(t))}var tH=class{constructor(e){var t,n,s,i,l;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=(s=e.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(l=e.retry)!==null&&l!==void 0?l:!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 s=this.fetch;let l=(async()=>{let c=0;for(;;){const m={};n.headers.forEach((p,b)=>{m[b]=p}),c>0&&(m["X-Retry-Count"]=String(c));let g;try{g=await s(n.url.toString(),{method:n.method,headers:m,body:JSON.stringify(n.body,(p,b)=>typeof b=="bigint"?b.toString():b),signal:n.signal})}catch(p){if(p?.name==="AbortError"||p?.code==="ABORT_ERR"||!nk.includes(n.method))throw p;if(n.retryEnabled&&c<tk){const b=g_(c);c++,await v_(b,n.signal);continue}throw p}if(eH(n.method,g.status,c,n.retryEnabled)){var f,h;const p=(f=(h=g.headers)===null||h===void 0?void 0:h.get("Retry-After"))!==null&&f!==void 0?f:null,b=p!==null?Math.max(0,parseInt(p,10)||0)*1e3:g_(c);await g.text(),c++,await v_(b,n.signal);continue}return await n.processResponse(g)}})();return this.shouldThrowOnError||(l=l.catch(c=>{var f;let h="",m="",g="";const p=c?.cause;if(p){var b,w,S,_;const C=(b=p?.message)!==null&&b!==void 0?b:"",A=(w=p?.code)!==null&&w!==void 0?w:"";h=`${(S=c?.name)!==null&&S!==void 0?S:"FetchError"}: ${c?.message}`,h+=`
163
164Caused by: ${(_=p?.name)!==null&&_!==void 0?_:"Error"}: ${C}`,A&&(h+=` (${A})`),p?.stack&&(h+=`
165${p.stack}`)}else{var E;h=(E=c?.stack)!==null&&E!==void 0?E:""}const j=this.url.toString().length;return c?.name==="AbortError"||c?.code==="ABORT_ERR"?(g="",m="Request was aborted (timeout or manual cancellation)",j>this.urlLengthLimit&&(m+=`. Note: Your request URL is ${j} 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.`)):(p?.name==="HeadersOverflowError"||p?.code==="UND_ERR_HEADERS_OVERFLOW")&&(g="",m="HTTP headers exceeded server limits (typically 16KB)",j>this.urlLengthLimit&&(m+=`. Your request URL is ${j} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=c?.name)!==null&&f!==void 0?f:"FetchError"}: ${c?.message}`,details:h,hint:m,code:g},data:null,count:null,status:0,statusText:""}})),l.then(e,t)}async processResponse(e){var t=this;let n=null,s=null,i=null,l=e.status,c=e.statusText;if(e.ok){var f,h;if(t.method!=="HEAD"){var m;const b=await e.text();if(b!=="")if(t.headers.get("Accept")==="text/csv")s=b;else if(t.headers.get("Accept")&&(!((m=t.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text")))s=b;else try{s=JSON.parse(b)}catch{if(n={message:b},s=null,t.shouldThrowOnError)throw new y_({message:b,details:"",hint:"",code:""})}}const g=(f=t.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),p=(h=e.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");g&&p&&p.length>1&&(i=parseInt(p[1])),t.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(n={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,i=null,l=406,c="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const g=await e.text();try{n=JSON.parse(g),Array.isArray(n)&&e.status===404&&(s=[],n=null,l=200,c="OK")}catch{e.status===404&&g===""?(l=204,c="No Content"):n={message:g}}if(n&&t.shouldThrowOnError)throw new y_(n)}return{success:n===null,error:n,data:s,count:i,status:l,statusText:c}}returns(){return this}overrideTypes(){return this}},nH=class extends tH{throwOnError(){return super.throwOnError()}select(e){let t=!1;const n=(e??"*").split("").map(s=>/\s/.test(s)&&!t?"":(s==='"'&&(t=!t),s)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:s,referencedTable:i=s}={}){const l=i?`${i}.order`:"order",c=this.url.searchParams.get(l);return this.url.searchParams.set(l,`${c?`${c},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const s=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:s=n}={}){const i=typeof s>"u"?"offset":`${s}.offset`,l=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(l,`${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}
165explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:s=!1,wal:i=!1,format:l="text"}={}){var c;const f=[e?"analyze":null,t?"verbose":null,n?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),h=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${l}; for="${h}"; options=${f};`),l==="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 b_=new RegExp("[,()]");var Ki=class extends nH{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(s=>typeof s=="string"&&b_.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(s=>typeof s=="string"&&b_.test(s)?`"${s}"`:`${s}`).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:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const l=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${l}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>n!==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 s=n?`${n}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},rH=class{constructor(e,{headers:t={},schema:n,fetch:s,urlLengthLimit:i=8e3,retry:l}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=s,this.urlLengthLimit=i,this.retry=l}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:s}=t??{},i=n?"HEAD":"GET";let l=!1;const c=(e??"*").split("").map(m=>/\s/.test(m)&&!l?"":(m==='"'&&(l=!l),m)).join(""),{url:f,headers:h}=this.cloneRequestState();return f.searchParams.set("select",c),s&&h.append("Prefer",`count=${s}`),new Ki({method:i,url:f,headers:h,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var s;const i="POST",{url:l,headers:c}=this.cloneRequestState();if(t&&c.append("Prefer",`count=${t}`),n||c.append("Prefer","missing=default"),Array.isArray(e)){const f=e.reduce((h,m)=>h.concat(Object.keys(m)),[]);if(f.length>0){const h=[...new Set(f)].map(m=>`"${m}"`);l.searchParams.set("columns",h.join(","))}}return new Ki({method:i,url:l,headers:c,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:s,defaultToNull:i=!0}={}){var l;const c="POST",{url:f,headers:h}=this.cloneRequestState();if(h.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&f.searchParams.set("on_conflict",t),s&&h.append("Prefer",`count=${s}`),i||h.append("Prefer","missing=default"),Array.isArray(e)){const m=e.reduce((g,p)=>g.concat(Object.keys(p)),[]);if(m.length>0){const g=[...new Set(m)].map(p=>`"${p}"`);f.searchParams.set("columns",g.join(","))}}return new Ki({method:c,url:f,headers:h,schema:this.schema,body:e,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const s="PATCH",{url:i,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new Ki({method:s,url:i,headers:l,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:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Ki({method:n,url:s,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Wl(e){"@babel/helpers - typeof";return Wl=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},Wl(e)}function sH(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Wl(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aH(e){var t=sH(e,"string");return Wl(t)=="symbol"?t:t+""}
165function iH(e,t,n){return(t=aH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x_(Object(n),!0).forEach(function(s){iH(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x_(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}var oH=class rk{constructor(t,{headers:n={},schema:s,fetch:i,timeout:l,urlLengthLimit:c=8e3,retry:f}={}){this.url=t,this.headers=new Headers(n),this.schemaName=s,this.urlLengthLimit=c;const h=i??globalThis.fetch;l!==void 0&&l>0?this.fetch=(m,g)=>{const p=new AbortController,b=setTimeout(()=>p.abort(),l),w=g?.signal;if(w){if(w.aborted)return clearTimeout(b),h(m,g);const S=()=>{clearTimeout(b),p.abort()};return w.addEventListener("abort",S,{once:!0}),h(m,qu(qu({},g),{},{signal:p.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",S)})}return h(m,qu(qu({},g),{},{signal:p.signal})).finally(()=>clearTimeout(b))}:this.fetch=h,this.retry=f}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new rH(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 rk(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:s=!1,get:i=!1,count:l}={}){var c;let f;const h=new URL(`${this.url}/rpc/${t}`);let m;const g=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(g)),p=s&&Object.values(n).some(g);p?(f="POST",m=n):s||i?(f=s?"HEAD":"GET",Object.entries(n).filter(([w,S])=>S!==void 0).map(([w,S])=>[w,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([w,S])=>{h.searchParams.append(w,S)})):(f="POST",m=n);const b=new Headers(this.headers);return p?b.set("Prefer",l?`count=${l},return=minimal`:"return=minimal"):l&&b.set("Prefer",`count=${l}`),new Ki({method:f,url:h,headers:b,schema:this.schemaName,body:m,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class lH{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 s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.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 i=globalThis.process;if(i){const l=i.versions;if(l&&l.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
166
167Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const cH="2.110.9",uH=`realtime-js/${cH}`,dH="1.0.0",sk="2.0.0",fH=sk,hH=1e4,mH=100,Ws={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ak={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Gg={connecting:"connecting",closing:"closing",closed:"closed"};class pH{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 s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(s))}_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,s;const i=(s=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var n,s;const i=(s=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&s!==void 0?s:{},c=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,c)}_encodeUserBroadcastPush(t,n,s){var i,l;const c=new TextEncoder,f=c.encode(t.topic),h=c.encode((i=t.ref)!==null&&i!==void 0?i:""),m=c.encode((l=t.join_ref)!==null&&l!==void 0?l:""),g=c.encode(t.payload.event),p=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},b=c.encode(Object.keys(p).length===0?"":JSON.stringify(p));if(m.length>255)throw new Error(`joinRef length ${m.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`topic length ${f.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`userEvent length ${g.length} exceeds maximum of 255`);if(b.length>255)throw new Error(`metadata length ${b.length} exceeds maximum of 255`);const w=this.USER_BROADCAST_PUSH_META_LENGTH+m.length+h.length+f.length+g.length+b.length,S=new ArrayBuffer(this.HEADER_LENGTH+w),_=new DataView(S),E=new Uint8Array(S);let j=0;_.setUint8(j++,this.KINDS.userBroadcastPush),_.setUint8(j++,m.length),_.setUint8(j++,h.length),_.setUint8(j++,f.length),_.setUint8(j++,g.length),_.setUint8(j++,b.length),_.setUint8(j++,n),E.set(m,j),j+=m.length,E.set(h,j),j+=h.length,E.set(f,j),j+=f.length,E.set(g,j),j+=g.length,E.set(b,j),j+=b.length;var C=new Uint8Array(S.byteLength+s.byteLength);return C.set(new Uint8Array(S),0),C.set(new Uint8Array(s),S.byteLength),C.buffer}decode(t,n){if(this._isArrayBuffer(t)){let s=this._binaryDecode(t);return n(s)}if(typeof t=="string"){const s=JSON.parse(t),[i,l,c,f,h]=s;
167return n({join_ref:i,ref:l,topic:c,event:f,payload:h})}return n({})}_binaryDecode(t){const n=new DataView(t),s=n.getUint8(0),i=new TextDecoder;if(s===this.KINDS.userBroadcast)return this._decodeUserBroadcast(t,n,i)}_decodeUserBroadcast(t,n,s){const i=n.getUint8(1),l=n.getUint8(2),c=n.getUint8(3),f=n.getUint8(4);let h=this.HEADER_LENGTH+4;const m=s.decode(t.slice(h,h+i));h=h+i;const g=s.decode(t.slice(h,h+l));h=h+l;const p=s.decode(t.slice(h,h+c));h=h+c;const b=t.slice(h,t.byteLength),w=f===this.JSON_ENCODING?JSON.parse(s.decode(b)):b,S={type:this.BROADCAST_EVENT,event:g,payload:w};return c>0&&(S.meta=JSON.parse(p)),{join_ref:null,ref:null,topic:m,event:this.BROADCAST_EVENT,payload:S}}_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(([s])=>n.includes(s)))}}var at;(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"})(at||(at={}));const w_=(e,t,n={})=>{var s;const i=(s=n.skipTypes)!==null&&s!==void 0?s:[];return t?Object.keys(t).reduce((l,c)=>(l[c]=gH(c,e,t,i),l),{}):{}},gH=(e,t,n,s)=>{const i=t.find(f=>f.name===e),l=i?.type,c=n[e];return l&&!s.includes(l)?ik(l,c):qg(c)},ik=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return xH(t,n)}switch(e){case at.bool:return yH(t);case at.float4:case at.float8:case at.int2:case at.int4:case at.int8:case at.numeric:case at.oid:return vH(t);case at.json:case at.jsonb:return bH(t);case at.timestamp:return wH(t);case at.abstime:case at.date:case at.daterange:case at.int4range:case at.int8range:case at.money:case at.reltime:case at.text:case at.time:case at.timestamptz:case at.timetz:case at.tsrange:case at.tstzrange:return qg(t);default:return qg(t)}},qg=e=>e,yH=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},vH=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},bH=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},xH=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,s=e[n];if(e[0]==="{"&&s==="}"){let l;const c=e.slice(1,n);try{l=JSON.parse("["+c+"]")}catch{l=c?c.split(","):[]}return l.map(f=>ik(t,f))}return e},wH=e=>typeof e=="string"?e.replace(" ","T"):e,ok=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 ro=e=>typeof e=="function"?e:function(){return e},SH=typeof self<"u"?self:null,Wi=typeof window<"u"?window:null,Tr=SH||Wi||globalThis,_H="2.0.0",EH=1e4,TH=1e3,jH=100,Cr={connecting:0,open:1,closing:2,closed:3},gn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},is={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Fg={longpoll:"longpoll",websocket:"websocket"},CH={complete:4},Kg="base64url.bearer.phx.",Fu=class{constructor(e,t,n,s){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 21,865 bytes, lines 167-168
167matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},lk=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))}},AH=class{constructor(e,t,n){this.state=gn.closed,this.topic=e,this.params=ro(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Fu(this,is.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new lk(()=>{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=gn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=gn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=gn.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=gn.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 Fu(this,is.leave,ro({}),this.timeout).send(),this.state=gn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(is.reply,(s,i)=>{this.trigger(this.replyEventName(i),s)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=gn.closed,this.bindings=[]}onClose(e){this.on(is.close,e)}onError(e){return this.on(is.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 s=new Fu(this,e,function(){return t},n);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=gn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(is.close,"leave")},n=new Fu(this,is.leave,ro({}),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,s){return this.topic!==e?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=gn.joining,this.joinPush.resend(e))}trigger(e,t,n,s){let i=this.onMessage(e,t,n,s);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let l=this.bindings.filter(c=>c.event===e&&this.filterBindings(c,t,n));for(let c=0;c<l.length;c++)l[c].callback(i,n,s||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===gn.closed}isErrored(){return this.state===gn.errored}isJoined(){return this.state===gn.joined}isJoining(){return this.state===gn.joining}isLeaving(){return this.state===gn.leaving}},$d=class{static request(e,t,n,s,i,l,c){if(Tr.XDomainRequest){let f=new Tr.XDomainRequest;return this.xdomainRequest(f,e,t,s,i,l,c)}else if(Tr.XMLHttpRequest){let f=new Tr.XMLHttpRequest;return this.xhrRequest(f,e,t,n,s,i,l,c)}else{if(Tr.fetch&&Tr.AbortController)return this.fetchRequest(e,t,n,s,i,l,c);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,s,i,l,c){let f={method:e,headers:n,body:s},h=null;return i&&(h=new AbortController,setTimeout(()=>h.abort(),i),f.signal=h.signal),Tr.fetch(t,f).then(m=>m.text()).then(m=>this.parseJSON(m)).then(m=>c&&c(m)).catch(m=>{m.name==="AbortError"&&l?l():c&&c(null)}),h}static xdomainRequest(e,t,n,s,i,l,c){return e.timeout=i,e.open(t,n),e.onload=()=>{let f=this.parseJSON(e.responseText);c&&c(f)},l&&(e.ontimeout=l),e.onprogress=()=>{},e.send(s),e}static xhrRequest(e,t,n,s,i,l,c,f){e.open(t,n,!0),e.timeout=l;for(let[h,m]of Object.entries(s))e.setRequestHeader(h,m);return e.onerror=()=>f&&f(null),e.onreadystatechange=()=>{if(e.readyState===CH.complete&&f){let h=this.parseJSON(e.responseText);f(h)}},c&&(e.ontimeout=c),e.send(i),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 s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let i=t?`${t}[${s}]`:s,l=e[s];typeof l=="object"?n.push(this.serialize(l,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(l))}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)}`}},NH=e=>{let t="",n=new Uint8Array(e),s=n.byteLength;for(let i=0;i<s;i++)t+=String.fromCharCode(n[i]);return btoa(t)},$i=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Kg)&&(this.authToken=atob(t[1].slice(Kg.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=Cr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Fg.websocket),"$1/"+Fg.longpoll)}endpointURL(){return $d.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Cr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Cr.open||this.readyState===Cr.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:s,messages:i}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else n=0;switch(n){case 200:i.forEach(l=>{setTimeout(()=>this.onmessage({data:l}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Cr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=NH(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;const n=t+jH,s=e.slice(t,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},s.join(`
168`),()=>this.onerror("timeout"),i=>{!i||i.status!==200?(this.awaitingBatchAck=!1,this.onerror(i&&i.status),this.closeAndRetry(1011,"internal server error",!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let i of this.reqs)i.abort();this.readyState=Cr.closed;let s=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",s)):this.onclose(s)}ajax(e,t,n,s,i){let l,c=()=>{this.reqs.delete(l),s()};l=$d.request(e,this.endpointURL(),t,n,this.timeout,c,f=>{this.reqs.delete(l),this.isActive()&&i(f)}),this.reqs.add(l)}},kH=class Nl{constructor(t,n={}){let s=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,i=>{let{onJoin:l,onLeave:c,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Nl.syncState(this.state,i,l,c),this.pendingDiffs.forEach(h=>{this.state=Nl.syncDiff(this.state,h,l,c)}),this.pendingDiffs=[],f()}),this.channel.on(s.diff,i=>{let{onJoin:l,onLeave:c,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Nl.syncDiff(this.state,i,l,c),f())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Nl.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,s,i){let l=this.toNullProtoObj(this.clone(t));n=this.toNullProtoObj(n);let c=Object.create(null),f=Object.create(null);return this.map(l,(h,m)=>{n[h]||(f[h]=m)}),this.map(n,(h,m)=>{let g=l[h];if(g){let p=m.metas.map(_=>_.phx_ref),b=g.metas.map(_=>_.phx_ref),w=m.metas.filter(_=>b.indexOf(_.phx_ref)<0),S=g.metas.filter(_=>p.indexOf(_.phx_ref)<0);w.length>0&&(c[h]=m,c[h].metas=w),S.length>0&&(f[h]=this.clone(g),f[h].metas=S)}else c[h]=m}),this.syncDiff(l,{joins:c,leaves:f},s,i)}static syncDiff(t,n,s,i){t=this.toNullProtoObj(t);let{joins:l,leaves:c}=this.clone(n);return s||(s=function(){}),i||(i=function(){}),this.map(l,(f,h)=>{let m=t[f];if(t[f]=this.clone(h),m){let g=t[f].metas.map(b=>b.phx_ref),p=m.metas.filter(b=>g.indexOf(b.phx_ref)<0);t[f].metas.unshift(...p)}s(f,m,h)}),this.map(c,(f,h)=>{let m=t[f];if(!m)return;let g=h.metas.map(p=>p.phx_ref);m.metas=m.metas.filter(p=>g.indexOf(p.phx_ref)<0),i(f,m,h),m.metas.length===0&&delete t[f]}),t}static list(t,n){return n||(n=function(s,i){return i}),this.map(t,(s,i)=>n(s,i))}static map(t,n){return Object.getOwnPropertyNames(t).map(s=>n(s,t[s]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let n=Object.create(null);return Object.getOwnPropertyNames(t).forEach(s=>{n[s]=t[s]}),n}static clone(t){return JSON.parse(JSON.stringify(t))}},Ku={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,s,i,l,c]=JSON.parse(e);return t({join_ref:n,ref:s,topic:i,event:l,payload:c})}},binaryEncode(e){let{join_ref:t,ref:n,event:s,topic:i,payload:l}=e,c=new TextEncoder,f=c.encode(t),h=c.encode(n),m=c.encode(i),g=c.encode(s);this.assertFieldSize(f.byteLength,"join_ref"),this.assertFieldSize(h.byteLength,"ref"),this.assertFieldSize(m.byteLength,"topic"),this.assertFieldSize(g.byteLength,"event");let p=this.META_LENGTH+f.byteLength+h.byteLength+m.byteLength+g.byteLength,b=new ArrayBuffer(this.HEADER_LENGTH+p),w=new Uint8Array(b),S=new DataView(b),_=0;S.setUint8(_++,this.KINDS.push),S.setUint8(_++,f.byteLength),S.setUint8(_++,h.byteLength),S.setUint8(_++,m.byteLength),S.setUint8(_++,g.byteLength),w.set(f,_),_+=f.byteLength,w.set(h,_),_+=h.byteLength,w.set(m,_),_+=m.byteLength,w.set(g,_),_+=g.byteLength;var E=new Uint8Array(b.byteLength+l.byteLength);return E.set(w,0),E.set(new Uint8Array(l),b.byteLength),E.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,n){let s=t.getUint8(1),i=t.getUint8(2),l=t.getUint8(3),c=this.HEADER_LENGTH+this.META_LENGTH-1,f=n.decode(e.slice(c,c+s));c=c+s;let h=n.decode(e.slice(c,c+i));c=c+i;let m=n.decode(e.slice(c,c+l));c=c+l;let g=e.slice(c,e.byteLength);return{join_ref:f,ref:null,topic:h,event:m,payload:g}},decodeReply(e,t,n){let s=t.getUint8(1),i=t.getUint8(2),l=t.getUint8(3),c=t.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,h=n.decode(e.slice(f,f+s));f=f+s;let m=n.decode(e.slice(f,f+i));f=f+i;let g=n.decode(e.slice(f,f+l));f=f+l;let p=n.decode(e.slice(f,f+c));f=f+c;let b=e.slice(f,e.byteLength),w={status:p,response:b};return{join_ref:h,ref:m,topic:g,event:is.reply,payload:w}},decodeBroadcast(e,t,n){let s=t.getUint8(1),i=t.getUint8(2),l=this.HEADER_LENGTH+2,c=n.decode(e.slice(l,l+s));l=l+s;let f=n.decode(e.slice(l,l+i));l=l+i;let h=e.slice(l,e.byteLength);return{join_ref:null,ref:null,topic:c,event:f,payload:h}}},RH=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||EH,this.transport=t.transport||Tr.WebSocket||$i,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Tr&&Tr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Ku.encode.bind(Ku),this.defaultDecoder=Ku.decode.bind(Ku),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!==$i?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;Wi&&Wi.addEventListener&&(Wi.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),s=this.connectClock)}),Wi.addEventListener("pageshow",i=>{s===this.connectClock&&(s=null,this.connect())}),Wi.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=i=>t.rejoinAfterMs?t.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>t.reconnectAfterMs?t.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(i,l,c)=>{console.log(`${i}: ${l}`,c)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ro(t.params||{}),this.endPoint=`${e}/${Fg.websocket}`,this.vsn=t.vsn||_H,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new lk(()=>{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&&ro(t.authToken)}getLongPollTransport(){return $i}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=$d.appendParams($d.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=ro(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==$i?this.connectWithFallback($i,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 s=this.onMessage(i=>{i.ref===t&&(this.off([s]),e(Date.now()-n))});return!0}transportName(e){return e===$i?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Kg}${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,s=!0,i,l,c=this.transportName(e),f=h=>{this.log("transport",`falling back to ${c}...`,h),this.off([i,l]),s=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${c}`))return f("memorized");this.fallbackTimer=setTimeout(f,t),l=this.onError(h=>{this.log("transport","error",h),s&&!n&&(clearTimeout(this.fallbackTimer),f(h))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!s){let h=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${h}`,"true"),this.log("transport",`established ${h} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,t),this.ping(h=>{this.log("transport","connected to primary after",h),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(),TH,"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 s=this.conn;this.waitForBufferDone(s,()=>{t?s.close(t,n||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(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===Cr.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)}
168triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(is.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Cr.connecting:return"connecting";case Cr.open:return"open";case Cr.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 AH(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:s,ref:i,join_ref:l}=e;this.log("push",`${t} ${n} (${l}, ${i})`,s)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:s,payload:i,ref:l,join_ref:c}=t;if(l&&l===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",f)}catch(h){this.log("error","error in heartbeat callback",h)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${n} ${s} ${l&&"("+l+")"||""}`.trim(),i);for(let f=0;f<this.channels.length;f++){const h=this.channels[f];h.isMember(n,s,i,c)&&h.trigger(s,i,l,c)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,s])=>{try{s(...t)}catch(i){this.log("error",`error in ${e} callback`,i)}})}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 Ll{constructor(t,n){const s=DH(n);this.presence=new kH(t.getChannel(),s),this.presence.onJoin((i,l,c)=>{const f=Ll.onJoinPayload(i,l,c);t.getChannel().trigger("presence",f)}),this.presence.onLeave((i,l,c)=>{const f=Ll.onLeavePayload(i,l,c);t.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ll.transformState(this.presence.state)}static transformState(t){return t=OH(t),Object.getOwnPropertyNames(t).reduce((n,s)=>{const i=t[s];return n[s]=bd(i),n},{})}static onJoinPayload(t,n,s){const i=S_(n),l=bd(s);return{event:"join",key:t,currentPresences:i,newPresences:l}}static onLeavePayload(t,n,s){const i=S_(n),l=bd(s);return{event:"leave",key:t,currentPresences:i,leftPresences:l}}}function bd(e){return e.metas.map(t=>{const n=Object.getOwnPropertyDescriptors(t),s=Object.defineProperties({},n);return s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s})}function OH(e){return JSON.parse(JSON.stringify(e))}function DH(e){return e?.events&&{events:e.events}}function S_(e){return e?.metas?bd(e):[]}var __;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(__||(__={}));class MH{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Ll(this.channel.channelAdapter,n)}}function PH(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
168if(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 LH{constructor(t,n,s){const i=zH(s);this.channel=t.getSocket().channel(n,i),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,s){let i;try{i=this.channel.push(t,n,s)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>mH){const l=this.channel.pushBuffer.shift();l.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${l.event}`,l.payload())}return i}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===Ws.joined}isJoined(){return this.state===Ws.joined}isJoining(){return this.state===Ws.joining}isClosed(){return this.state===Ws.closed}isLeaving(){return this.state===Ws.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function zH(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const IH=/[,()"\\]/,BH=e=>IH.test(e)||e!==e.trim(),UH=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,E_=e=>{const t=e===null?"null":String(e);return BH(t)?UH(t):t},VH=e=>e===null?"null":String(e),$H=(e,t)=>{if(e==="in"){const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(i=>E_(i)).join(",")})`}return e==="is"?`is.${VH(t)}`:`${e}.${E_(t)}`};class HH{constructor(){this.filters=[]}add(t,n,s,i=!1){const l=i?"not.":"";return this.filters.push(`${t}=${l}${$H(n,s)}`),this}eq(t,n){return this.add(t,"eq",n)}neq(t,n){return this.add(t,"neq",n)}gt(t,n){return this.add(t,"gt",n)}gte(t,n){return this.add(t,"gte",n)}lt(t,n){return this.add(t,"lt",n)}lte(t,n){return this.add(t,"lte",n)}in(t,n){return this.add(t,"in",n)}like(t,n){return this.add(t,"like",n)}ilike(t,n){return this.add(t,"ilike",n)}match(t,n){return this.add(t,"match",n)}imatch(t,n){return this.add(t,"imatch",n)}is(t,n){return this.add(t,"is",n)}isDistinct(t,n){return this.add(t,"isdistinct",n)}not(t,n,s){return this.add(t,n,s,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var T_;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(T_||(T_={}));var Qi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Qi||(Qi={}));var os;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(os||(os={}));class zl{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:{}},s){var i,l;if(this.topic=t,this.params=n,this.socket=s,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new LH(this.socket.socketAdapter,t,this.params),this.presence=new MH(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=ok(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((l=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||l===void 0)&&l.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 s,i,l;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:c,presence:f,private:h}}=this.params,m=(i=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(w=>w.filter))!==null&&i!==void 0?i:[],g=!!this.bindings[Qi.PRESENCE]&&this.bindings[Qi.PRESENCE].length>0||((l=this.params.config.presence)===null||l===void 0?void 0:l.enabled)===!0,p={},b={broadcast:c,presence:Object.assign(Object.assign({},f),{enabled:g}),postgres_changes:m,private:h};this.socket.accessTokenValue&&(p.access_token=this.socket.accessTokenValue),this._onError(w=>{t?.(os.CHANNEL_ERROR,PH(w))}),this._onClose(()=>t?.(os.CLOSED)),this.updateJoinPayload(Object.assign({config:b},p)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:w})=>{if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t?.(os.SUBSCRIBED);return}this._updatePostgresBindings(w,t)}).receive("error",w=>{this.state=Ws.errored;const S=Object.values(w).join(", ")||"error";t?.(os.CHANNEL_ERROR,new Error(S,{cause:w}))}).receive("timeout",()=>{t?.(os.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var s;const i=this.bindings.postgres_changes,l=(s=i?.length)!==null&&s!==void 0?s:0,c=[];for(let f=0;f<l;f++){const h=i[f],{filter:{event:m,schema:g,table:p,filter:b}}=h,w=t&&t[f];if(w&&w.event===m&&zl.isFilterValueEqual(w.schema,g)&&zl.isFilterValueEqual(w.table,p)&&zl.isFilterValueEqual(w.filter,b))c.push(Object.assign(Object.assign({},h),{id:w.id}));else{this.unsubscribe(),this.state=Ws.errored,n?.(os.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=c,this.state!=Ws.errored&&n&&n(os.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,s){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),l=t===Qi.PRESENCE||t===Qi.POSTGRES_CHANGES;if(i&&l)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,s)}async httpSend(t,n,s={}){var i;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const l=n instanceof ArrayBuffer||ArrayBuffer.isView(n),c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":l?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&f.searchParams.set("private","true");const h={method:"POST",headers:c,body:l?n:JSON.stringify(n)},m=await this._fetchWithTimeout(f.toString(),h,(i=s.timeout)!==null&&i!==void 0?i:this.timeout);if(m.status===202)return{success:!0};if(m.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
168ime-js/migrations/httpsend-server-version.md"));let g=m.statusText;try{const p=await m.json();g=p.error||p.message||g}catch{}return Promise.reject(new Error(g))}async send(t,n={}){var s,i;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:l,payload:c}=t,f={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(f.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:f,body:JSON.stringify({messages:[{topic:this.subTopic,event:l,payload:c,private:this.private}]})};try{const m=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);return await((i=m.body)===null||i===void 0?void 0:i.cancel()),m.ok?"ok":"error"}catch(m){return m instanceof Error&&m.name==="AbortError"?"timed out":"error"}}else return new Promise(l=>{var c,f,h;const m=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((h=(f=(c=this.params)===null||c===void 0?void 0:c.config)===null||f===void 0?void 0:f.broadcast)===null||h===void 0)&&h.ack)&&l("ok"),m.receive("ok",()=>l("ok")),m.receive("error",()=>l("error")),m.receive("timeout",()=>l("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,s){const i=new AbortController,l=setTimeout(()=>i.abort(),s),c=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(l),c}_on(t,n,s){const i=t.toLocaleLowerCase(),l=n?.filter;(l instanceof HH||typeof l=="object"&&l!==null&&typeof l.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:l.build()}));const c=this.channelAdapter.on(t,s),f={type:i,filter:n,callback:s,ref:c};return this.bindings[i]?this.bindings[i].push(f):this.bindings[i]=[f],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,s)=>{var i,l,c,f,h,m,g;const p=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(p,s))return!1;const b=(i=this.bindings[p])===null||i===void 0?void 0:i.find(w=>w.ref===t.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(p))if("id"in b){const w=b.id,S=(l=b.filter)===null||l===void 0?void 0:l.event;return w&&((c=n.ids)===null||c===void 0?void 0:c.includes(w))&&(S==="*"||S?.toLocaleLowerCase()===((f=n.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const w=(m=(h=b?.filter)===null||h===void 0?void 0:h.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===((g=n?.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===p})}_notThisChannelEvent(t,n){const{close:s,error:i,leave:l,join:c}=ak;return n&&[s,i,l,c].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,s)=>{if(typeof n=="object"&&"ids"in n){const i=n.data,{schema:l,table:c,commit_timestamp:f,type:h,errors:m}=i;return Object.assign(Object.assign({},{schema:l,table:c,commit_timestamp:f,eventType:h,new:{},old:{},errors:m}),this._getPayloadRecords(i))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const s of t.bindings[n])this._on(s.type,s.filter,s.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=w_(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=w_(t.columns,t.old_record)),n}}class GH{constructor(t,n){this.socket=new RH(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,s,i=1e4){return new Promise(l=>{setTimeout(()=>l("timeout"),i),this.socket.disconnect(()=>{t(),l("ok")},n,s)})}push(t){this.socket.push(t)}log(t,n,s){this.socket.log(t,n,s)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Gg.connecting}isDisconnecting(){return this.socket.connectionState()==Gg.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const j_={HEARTBEAT_INTERVAL:25e3},qH=[1e3,2e3,5e3,1e4],FH=1e4;function KH(){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 WH(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return KH()}const YH=`
169  addEventListener("message", (e) => {
170    if (e.data.event === "start") {
171      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
172    }
173  });`;class XH{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 s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
173,this.ref=0,this.serializer=new pH,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=l=>l?(...c)=>l(...c):(...c)=>fetch(...c),!(!((s=n?.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const i=this._initializeOptions(n);this.socketAdapter=new GH(t,i),this.httpEndpoint=ok(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 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 s=>{const i=await s.unsubscribe();return s.teardown(),i}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,s){this.socketAdapter.log(t,n,s)}connectionState(){return this.socketAdapter.connectionState()||Gg.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const s=`realtime:${t}`,i=this.getChannels().find(l=>l.topic===s);if(i)return i;{const l=new zl(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(l),l}}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}
173this._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,s=!1;if(t)n=t,s=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(i=>{const l={access_token:n,version:uH};n&&i.updateJoinPayload(l),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(ak.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,s)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),t&&t(n,s))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=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 s=new Blob([YH],{type:"application/javascript"});n=URL.createObjectURL(s)}return n}_initializeOptions(t){var n,s,i,l,c,f,h,m,g,p,b,w;this.worker=(n=t?.worker)!==null&&n!==void 0?n:!1,this.accessToken=(s=t?.accessToken)!==null&&s!==void 0?s:null;const S={};S.timeout=(i=t?.timeout)!==null&&i!==void 0?i:hH,S.heartbeatIntervalMs=(l=t?.heartbeatIntervalMs)!==null&&l!==void 0?l:j_.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(c=t?.disconnectOnEmptyChannelsAfterMs)!==null&&c!==void 0?c:2*((f=t?.heartbeatIntervalMs)!==null&&f!==void 0?f:j_.HEARTBEAT_INTERVAL),S.transport=(h=t?.transport)!==null&&h!==void 0?h:lH.getWebSocketConstructor(),S.params=t?.params,S.logger=t?.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(t?.heartbeatCallback),S.sessionStorage=(m=t?.sessionStorage)!==null&&m!==void 0?m:WH(),S.reconnectAfterMs=(g=t?.reconnectAfterMs)!==null&&g!==void 0?g:(C=>qH[C-1]||FH);let _,E;const j=(p=t?.vsn)!==null&&p!==void 0?p:fH;switch(j){case dH:_=(C,A)=>A(JSON.stringify(C)),E=(C,A)=>A(JSON.parse(C));break;case sk:_=this.serializer.encode.bind(this.serializer),E=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=j,S.encode=(b=t?.encode)!==null&&b!==void 0?b:_,S.decode=(w=t?.decode)!==null&&w!==void 0?w:E,S.beforeReconnect=this._reconnectAuth.bind(this),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,S.params=Object.assign(Object.assign({},S.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,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
173var Yl=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 JH(e,t,n){const s=new URL(t,e);if(n)for(const[i,l]of Object.entries(n))l!==void 0&&s.searchParams.set(i,l);return s.toString()}async function ZH(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 QH(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:s,query:i,body:l,headers:c}){const f=JH(e.baseUrl,s,i),h=await ZH(e.auth),m=await t(f,{method:n,headers:{...l?{"Content-Type":"application/json"}:{},...h,...c},body:l?JSON.stringify(l):void 0}),g=await m.text(),p=(m.headers.get("content-type")||"").includes("application/json"),b=p&&g?JSON.parse(g):g;if(!m.ok){const w=p?b:void 0,S=w?.error;throw new Yl(S?.message??`Request failed with status ${m.status}`,{status:m.status,icebergType:S?.type,icebergCode:S?.code,details:w})}return{status:m.status,headers:m.headers,data:b}}}}function Wu(e){return e.join("�")}var e7=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Wu(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(e,t){const 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/${Wu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Wu(e.namespace)}`}),!0}catch(t){if(t instanceof Yl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Yl&&n.status===409)return;throw n}}};function Hi(e){return e.join("�")}var t7=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/${Hi(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/${Hi(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/${Hi(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/${Hi(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/${Hi(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/${Hi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Yl&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Yl&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},n7=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=QH({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new e7(this.client,t),this.tableOps=new t7(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)}
173async 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 Xl(e){"@babel/helpers - typeof";return Xl=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},Xl(e)}function r7(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Xl(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function s7(e){var t=r7(e,"string");return Xl(t)=="symbol"?t:t+""}function a7(e,t,n){return(t=s7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C_(Object(n),!0).forEach(function(s){a7(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C_(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}var Pf=class extends Error{constructor(e,t="storage",n,s){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Lf(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Wg=class extends Pf{constructor(e,t,n,s="storage"){super(e,s,t,n),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return _e({},super.toJSON())}},ck=class extends Pf{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Hd(e,t,n){const s=_e({},e),i=t.toLowerCase();for(const l of Object.keys(s))l.toLowerCase()===i&&delete s[l];return s[i]=n,s}function i7(e){const t={};for(const[n,s]of Object.entries(e))t[n.toLowerCase()]=s;return t}const o7=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),l7=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)},Yg=e=>{if(Array.isArray(e))return e.map(n=>Yg(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,s])=>{const i=n.replace(/([-_][a-z])/gi,l=>l.toUpperCase().replace(/[-_]/g,""));t[i]=Yg(s)}),t},c7=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),uk=e=>e.split("/").map(encodeURIComponent).join("/"),A_=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)},u7=async(e,t,n,s)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const i=e;let l=parseInt(String(i.status),10);Number.isFinite(l)||(l=500),i.json().then(c=>{const f=c?.statusCode||c?.code||l+"";t(new Wg(A_(c),l,f,s))}).catch(()=>{const c=l+"";t(new Wg(i.statusText||`HTTP ${l} error`,l,c,s))})}else t(new ck(A_(e),e,s))},d7=(e,t,n,s)=>{const i={method:e,headers:t?.headers||{}};if(e==="GET"||e==="HEAD"||!s)return _e(_e({},i),n);if(l7(s)){var l;const c=t?.headers||{};let f;for(const[h,m]of Object.entries(c))h.toLowerCase()==="content-type"&&(f=m);i.headers=Hd(c,"Content-Type",(l=f)!==null&&l!==void 0?l:"application/json"),i.body=JSON.stringify(s)}else i.body=s;return t?.duplex&&(i.duplex=t.duplex),_e(_e({},i),n)};async function Tl(e,t,n,s,i,l,c){return new Promise((f,h)=>{e(n,d7(t,s,i,l)).then(m=>{if(!m.ok)throw m;if(s?.noResolveJson)return m;if(c==="vectors"){const g=m.headers.get("content-type");if(m.headers.get("content-length")==="0"||m.status===204)return{};if(!g||!g.includes("application/json"))return{}}return m.json()}).then(m=>f(m)).catch(m=>
173u7(m,h,s,c))})}function dk(e="storage"){return{get:async(t,n,s,i)=>Tl(t,"GET",n,s,i,void 0,e),post:async(t,n,s,i,l)=>Tl(t,"POST",n,i,l,s,e),put:async(t,n,s,i,l)=>Tl(t,"PUT",n,i,l,s,e),head:async(t,n,s,i)=>Tl(t,"HEAD",n,_e(_e({},s),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,s,i,l)=>Tl(t,"DELETE",n,i,l,s,e)}}const f7=dk("storage"),{get:Jl,post:ar,put:Xg,head:h7,remove:Zl}=f7,An=dk("vectors");var To=class{constructor(e,t={},n,s="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=i7(t),this.fetch=o7(n),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Hd(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(Lf(n))return{data:null,error:n};throw n}}};let fk;fk=Symbol.toStringTag;var m7=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[fk]="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(Lf(t))return{data:null,error:t};throw t}}};let hk;hk=Symbol.toStringTag;var p7=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[hk]="BlobDownloadBuilder",this.promise=null}asStream(){return new m7(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(Lf(t))return{data:null,error:t};throw t}}};const $p={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},N_={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var g7=class extends To{constructor(e,t={},n,s){super(e,t,s,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,s){var i=this;return i.handleOperation(async()=>{let l;const c=_e(_e({},N_),s);let f=_e(_e({},i.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const h=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),h&&l.append("metadata",i.encodeMetadata(h)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),h&&!l.has("metadata")&&l.append("metadata",i.encodeMetadata(h))):(l=n,f["cache-control"]=`max-age=${c.cacheControl}`,f["content-type"]=c.contentType,h&&(f["x-metadata"]=i.toBase64(i.encodeMetadata(h))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),s?.headers)for(const[b,w]of Object.entries(s.headers))f=Hd(f,b,w);const m=i._removeEmptyFolders(t),g=i._getFinalPath(m),p=await(e=="PUT"?Xg:ar)(i.fetch,`${i.url}/object/${g}`,l,_e({headers:f},c?.duplex?{duplex:c.duplex}:{}));return{path:m,id:p.Id,fullPath:p.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,s){var i=this;const l=i._removeEmptyFolders(e),c=i._getFinalPath(l),f=new URL(i.url+`/object/upload/sign/${c}`);return f.searchParams.set("token",t),i.handleOperation(async()=>{let h;const m=_e(_e({},N_),s);let g=_e(_e({},i.headers),{"x-upsert":String(m.upsert)});const p=m.metadata;if(typeof Blob<"u"&&n instanceof Blob?(h=new FormData,h.append("cacheControl",m.cacheControl),p&&h.append("metadata",i.encodeMetadata(p)),h.append("",n)):typeof FormData<"u"&&n instanceof FormData?(h=n,h.has("cacheControl")||h.append("cacheControl",m.cacheControl),p&&!h.has("metadata")&&h.append("metadata",i.encodeMetadata(p))):(h=n,g["cache-control"]=`max-age=${m.cacheControl}`,g["content-type"]=m.contentType,p&&(g["x-metadata"]=i.toBase64(i.encodeMetadata(p))),(typeof ReadableStream<"u"&&h instanceof ReadableStream||h&&typeof h=="object"&&"pipe"in h&&typeof h.pipe=="function")&&!m.duplex&&(m.duplex="half")),s?.headers)for(const[b,w]of Object.entries(s.headers))g=Hd(g,b,w);return{path:l,fullPath:(await Xg(i.fetch,f.toString(),h,_e({headers:g},m?.duplex?{duplex:m.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=_e({},n.headers);t?.upsert&&(i["x-upsert"]="true");const l=await ar(n.fetch,`${n.url}/object/upload/sign/${s}`,{},{headers:i}),c=new URL(n.url+l.url),f=c.searchParams.get("token");if(!f)throw new Pf("No token returned by API");return{signedUrl:c.toString(),path:e,token:f}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var s=this;return s.handleOperation(async()=>await ar(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,de
173stinationBucket:n?.destinationBucket},{headers:s.headers}))}async copy(e,t,n){var s=this;return s.handleOperation(async()=>({path:(await ar(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(e,t,n){var s=this;return s.handleOperation(async()=>{let i=s._getFinalPath(e);const l=typeof n?.transform=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let c=await ar(s.fetch,`${s.url}/object/sign/${i}`,_e({expiresIn:t},l?{transform:n.transform}:{}),{headers:s.headers});const f=new URLSearchParams;n?.download&&f.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&f.set("cacheNonce",String(n.cacheNonce));const h=f.toString();return{signedUrl:encodeURI(`${s.url}${c.signedURL}${h?`&${h}`:""}`)}})}async createSignedUrls(e,t,n){var s=this;return s.handleOperation(async()=>{const i=await ar(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:t,paths:e},{headers:s.headers}),l=new URLSearchParams;n?.download&&l.set("download",n.download===!0?"":n.download),n?.cacheNonce!=null&&l.set("cacheNonce",String(n.cacheNonce));const c=l.toString();return i.map(f=>_e(_e({},f),{},{signedUrl:f.signedURL?encodeURI(`${s.url}${f.signedURL}${c?`&${c}`:""}`):null}))})}download(e,t,n){const s=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set("cacheNonce",String(t.cacheNonce));const l=i.toString(),c=this._getFinalPath(e),f=()=>Jl(this.fetch,`${this.url}/${s}/${c}${l?`?${l}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new p7(f,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Yg(await Jl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await h7(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(Lf(i)){var s;const l=i instanceof Wg?i.status:i instanceof ck?(s=i.originalError)===null||s===void 0?void 0:s.status:void 0;if(l!==void 0&&[400,404].includes(l))return{data:!1,error:i}}throw i}}getPublicUrl(e,t){const n=this._getFinalPath(e),s=new URLSearchParams;t?.download&&s.set("download",t.download===!0?"":t.download),t?.transform&&this.applyTransformOptsToQuery(s,t.transform),t?.cacheNonce!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),l=typeof t?.transform=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${n}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Zl(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var s=this;return s.handleOperation(async()=>{const i=uk(s._getFinalPath(e)),l=new URLSearchParams;t?.transformations&&l.set("transformations","true");const c=l.toString();return await Zl(s.fetch,`${s.url}/cdn/${i}${c?`?${c}`:""}`,{},{headers:s.headers},n)})}async list(e,t,n){var s=this;return s.handleOperation(async()=>{const i=t?.sortBy?_e(_e({},$p.sortBy),t.sortBy):$p.sortBy,l=_e(_e(_e({},$p),t),{},{sortBy:i,prefix:e||""});return await ar(s.fetch,`${s.url}/object/list/${s.bucketId}`,l,{headers:s.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const s=_e({},e);return await ar(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,s,{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("qual
173ity",t.quality.toString()),e}};const y7="2.110.9",pc={"X-Client-Info":`storage-js/${y7}`};var v7=class extends To{constructor(e,t={},n,s){const i=new URL(e);s?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const l=i.href.replace(/\/$/,""),c=_e(_e({},pc),t);super(l,c,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Jl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Jl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await ar(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 Xg(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 ar(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Zl(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var s=this;return s.handleOperation(async()=>{const i=new URLSearchParams;t?.transformations&&i.set("transformations","true");const l=i.toString();return await Zl(s.fetch,`${s.url}/cdn/${uk(e)}${l?`?${l}`:""}`,{},{headers:s.headers},n)})}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():""}},b7=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=_e(_e({},pc),t);super(s,i,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ar(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 s=n.toString(),i=s?`${t.url}/bucket?${s}`:`${t.url}/bucket`;return await Jl(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Zl(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!c7(e))throw new Pf("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 n7({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(n,{get(i,l){const c=i[l];return typeof c!="function"?c:async(...f)=>{try{return{data:await c.apply(i,f),error:null}}catch(h){if(s)throw h;return{data:null,error:h}}}}})}},x7=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=_e(_e({},pc),{},{"Content-Type":"application/json"},t);super(s,i,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await An.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await An.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await An.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await An.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},w7=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=_e(_e({},pc),{},{"Content-Type":"application/json"},t);super(s,i,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 An.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await An.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");
173if(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 An.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await An.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 An.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},S7=class extends To{constructor(e,t={},n){const s=e.replace(/\/$/,""),i=_e(_e({},pc),{},{"Content-Type":"application/json"},t);super(s,i,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await An.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await An.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await An.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await An.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},_7=class extends S7{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new E7(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)}},E7=class extends x7{constructor(e,t,n,s){super(e,t,s),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,_e(_e({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,_e(_e({},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 T7(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},T7=class extends w7{constructor(e,t,n,s,i){super(e,t,i),this.vectorBucketName=n,this.indexName=s}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,_e(_e({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,_e(_e({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,_e(_e({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,_e(_e({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,_e(_e({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},j7=class extends v7{constructor(e,t={},n,s){super(e,t,n,s)}from(e){return new g7(this.url,this.headers,e,this.fetch)}get vectors(){return new _7(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new b7(this.url+"/iceberg",this.headers,this.fetch)}};const mk="2.110.9",ls=30*1e3,kl=3,Hp=kl*ls,C7=2*ls,A7="http://localhost:9999",N7="supabase.auth.token",k7={"X-Client-Info":`gotrue-js/${mk}`},Jg="X-Supabase-Api-Version",pk={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},R7=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,O7=600*1e3;class Ql extends Error{constructor(t,n,s){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function le(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class D7 extends Ql{constructor(t,n,s){super(t,n,s),this.name="AuthApiError",this.status=n,this.code=s}}function k_(e){return le(e)&&e.name==="AuthApiError"}class ir extends Ql{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Lr extends Ql{constructor(t,n,s,i){super(t,s,i),this.name=n,this.status=s}}class Pt extends Lr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Yu(e){return le(e)&&e.name==="AuthSessionMissingError"}class Gi extends Lr{constructor(){super("Auth session or user missing","AuthInvalidToken
173ResponseError",500,void 0)}}class Xu extends Lr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ju extends Lr{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 M7(e){return le(e)&&e.name==="AuthImplicitGrantRedirectError"}class R_ extends Lr{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 P7 extends Lr{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 Zg extends Lr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Zu(e){return le(e)&&e.name==="AuthRetryableFetchError"}class O_ extends Lr{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function L7(e){return le(e)&&e.name==="AuthRefreshDiscardedError"}class D_ extends Lr{constructor(t,n,s){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Gd extends Lr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const qd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),M_=` 	
174\r=`.split(""),z7=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<M_.length;t+=1)e[M_[t].charCodeAt(0)]=-2;for(let t=0;t<qd.length;t+=1)e[qd[t].charCodeAt(0)]=t;return e})();function P_(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;n(qd[s]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const s=t.queue>>t.queuedBits-6&63;n(qd[s]),t.queuedBits-=6}}function gk(e,t,n){const s=z7[e];if(s>-1)for(t.queue=t.queue<<6|s,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function L_(e){const t=[],n=c=>{t.push(String.fromCodePoint(c))},s={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},l=c=>{U7(c,s,n)};for(let c=0;c<e.length;c+=1)gk(e.charCodeAt(c),i,l);return t.join("")}function I7(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 B7(e,t){for(let n=0;n<e.length;n+=1){let s=e.charCodeAt(n);if(s>55295&&s<=56319){const i=(s-55296)*1024&65535;s=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}I7(s,t)}}function U7(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let s=1;s<6;s+=1)if((e>>7-s&1)===0){t.utf8seq=s;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function so(e){const t=[],n={queue:0,queuedBits:0},s=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)gk(e.charCodeAt(i),n,s);return new Uint8Array(t)}function V7(e){const t=[];return B7(e,n=>t.push(n)),new Uint8Array(t)}function Ga(e){const t=[],n={queue:0,queuedBits:0},s=i=>{t.push(i)};return e.forEach(i=>P_(i,n,s)),P_(null,n,s),t.join("")}function $7(e){return Math.round(Date.now()/1e3)+e}function H7(){return Symbol("auth-callback")}const Xt=()=>typeof window<"u"&&typeof document<"u",Ia={tested:!1,writable:!1},yk=()=>
174{if(!Xt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ia.tested)return Ia.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ia.tested=!0,Ia.writable=!0}catch{Ia.tested=!0,Ia.writable=!1}return Ia.writable};function G7(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,l)=>{t[l]=i})}catch{}return n.searchParams.forEach((s,i)=>{t[i]=s}),t}const vk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),q7=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Yi=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},tr=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Et=async(e,t)=>{await e.removeItem(t)};class zf{constructor(){this.promise=new zf.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}zf.promiseConstructor=Promise;function Qu(e){const t=e.split(".");if(t.length!==3)throw new Gd("Invalid JWT structure");for(let s=0;s<t.length;s++)if(!R7.test(t[s]))throw new Gd("JWT not in base64url format");return{header:JSON.parse(L_(t[0])),payload:JSON.parse(L_(t[1])),signature:so(t[2]),raw:{header:t[0],payload:t[1]}}}async function F7(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function K7(e,t){return new Promise((s,i)=>{(async()=>{for(let l=0;l<1/0;l++)try{const c=await e(l);if(!t(l,null,c)){s(c);return}}catch(c){if(!t(l,c)){i(c);return}}})()})}function W7(e){return("0"+e.toString(16)).substr(-2)}function Y7(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=n.length;let i="";for(let l=0;l<56;l++)i+=n.charAt(Math.floor(Math.random()*s));return i}return crypto.getRandomValues(t),Array.from(t,W7).join("")}async function X7(e){const n=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(s);return Array.from(i).map(l=>String.fromCharCode(l)).join("")}async function J7(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 X7(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ba(e,t,n=!1){const s=Y7();let i=s;n&&(i+="/recovery"),await Yi(e,`${t}-code-verifier`,i);const l=await J7(s);return[l,s===l?"plain":"s256"]}const Z7=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Q7(e){const t=e.headers.get(Jg);if(!t||!t.match(Z7))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function eG(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 tG(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 nG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ss(e){if(!nG.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function sr(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 Gp(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const s=n.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${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 rG(e,t){return new Proxy(e,{get:(n,s,i)=>{if(s==="__isInsecureUserWarningProxy")return!0;
174if(typeof s=="symbol"){const l=s.toString();if(l==="Symbol(Symbol.toPrimitive)"||l==="Symbol(Symbol.toStringTag)"||l==="Symbol(util.inspect.custom)"||l==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,s,i)}return!t.value&&typeof s=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,s,i)}})}function z_(e){return JSON.parse(JSON.stringify(e))}const Va=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)},sG=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function I_(e){var t;if(!q7(e))throw new Zg(Va(e),0);if(sG.includes(e.status))throw new Zg(Va(e),e.status);let n;try{n=await e.json()}catch(l){throw new ir(Va(l),l)}let s;const i=Q7(e);if(i&&i.getTime()>=pk["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?s=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(s=n.error_code),s){if(s==="weak_password")throw new D_(Va(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(s==="session_not_found")throw new Pt}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((l,c)=>l&&typeof c=="string",!0))throw new D_(Va(n),e.status,n.weak_password.reasons);throw new D7(Va(n),e.status||500,s)}const aG=(e,t,n,s)=>{const i={method:e,headers:t?.headers||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),i.body=JSON.stringify(s),Object.assign(Object.assign({},i),n))};async function ye(e,t,n,s){var i;const l=Object.assign({},s?.headers);l[Jg]||(l[Jg]=pk["2024-01-01"].name),s?.jwt&&(l.Authorization=`Bearer ${s.jwt}`);const c=(i=s?.query)!==null&&i!==void 0?i:{};s?.redirectTo&&(c.redirect_to=s.redirectTo);const f=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",h=await iG(e,t,n+f,{headers:l,noResolveJson:s?.noResolveJson},{},s?.body);return s?.xform?s?.xform(h):{data:Object.assign({},h),error:null}}async function iG(e,t,n,s,i,l){const c=aG(t,s,i,l);let f;try{f=await e(n,Object.assign({},c))}catch(h){throw new Zg(Va(h),0)}if(f.ok||await I_(f),s?.noResolveJson)return f;try{return await f.json()}catch(h){await I_(h)}}function Gn(e){var t;let n=null;cG(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=$7(e.expires_in)));const s=(t=e.user)!==null&&t!==void 0?t:typeof e?.id=="string"?e:null;return{data:{session:n,user:s},error:null}}function B_(e){const t=Gn(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,s)=>n&&typeof s=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ys(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function oG(e){return{data:e,error:null}}function lG(e){const{action_link:t,email_otp:n,hashed_token:s,redirect_to:i,verification_type:l}=e,c=wo(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:t,email_otp:n,hashed_token:s,redirect_to:i,verification_type:l},h=Object.assign({},c);return{data:{properties:f,user:h},error:null}}function U_(e){return e}function cG(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const qp=["global","local","others"];class uG{constructor({url:t="",headers:n={},fetch:s,experimental:i}){this.url=t,this.headers=n,this.fetch=vk(s),this.experimental=i??{},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=qp[0]){if(qp.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qp.join(", ")}`);try{return await ye(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(s){if(le(s))return{data:null,error:s};throw s}}async inviteUserByEmail(t,n={}){try{return await ye(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ys})}catch(s){if(le(s))return{data:{user:null},error:s};throw s}}async generateLink(t){try{const{options:n}=t,s=wo(t,["options"]),i=Object.assign(Object.assign({},s),n);return"newEmail"in s&&(i.new_email=s?.newEmail,delete i.newEmail),await ye(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:lG,redirectTo:n?.redirectTo})}catch(n){if(le(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ys})}catch(n){if(le(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,s,i,l,c,f,h;try{const m={nextPage:null,lastPage:0,total:0},g=await ye(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&s!==void 0?s:"",per_page:(l=(i=t?.perPage)===null||i===void 0?void 0:i.toString())!==null&&l!==void 0?l:""},xform:U_});if(g.error)throw g.error;const p=await g.json(),b=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,w=(h=(f=g.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&h!==void 0?h:[];return w.length>0&&(w.forEach(S=>{const _=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);m[`${E}Page`]=_}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},p),m),error:null}}catch(m){if(le(m))return{data:{users:[]},error:m};throw m}}async getUserById(t){ss(t);try{return await ye(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ys})}catch(n){if(le(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ss(t);try{return await ye(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Ys})}catch(s){if(le(s))return{data:{user:null},error:s};throw s}}async deleteUser(t,n=!1){ss(t);
174try{return await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ys})}catch(s){if(le(s))return{data:{user:null},error:s};throw s}}async _listFactors(t){ss(t.userId);try{const{data:n,error:s}=await ye(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:s}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ss(t.userId),ss(t.id);try{return{data:await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,s,i,l,c,f,h;try{const m={nextPage:null,lastPage:0,total:0},g=await ye(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(n=t?.page)===null||n===void 0?void 0:n.toString())!==null&&s!==void 0?s:"",per_page:(l=(i=t?.perPage)===null||i===void 0?void 0:i.toString())!==null&&l!==void 0?l:""},xform:U_});if(g.error)throw g.error;const p=await g.json(),b=(c=g.headers.get("x-total-count"))!==null&&c!==void 0?c:0,w=(h=(f=g.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&h!==void 0?h:[];return w.length>0&&(w.forEach(S=>{const _=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),E=JSON.parse(S.split(";")[1].split("=")[1]);m[`${E}Page`]=_}),m.total=parseInt(b)),{data:Object.assign(Object.assign({},p),m),error:null}}catch(m){if(le(m))return{data:{clients:[]},error:m};throw m}}async _createOAuthClient(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await ye(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await ye(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(le(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(t){try{return await ye(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t?.type&&(n.type=t.type),await ye(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:s=>{var i;return{data:{providers:(i=s?.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(n){if(le(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await ye(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await ye(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await ye(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(le(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(t){try{return await ye(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){sr(this.experimental),ss(t.userId);try{return await ye(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(le(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){sr(this.experimental),ss(t.userId),ss(t.passkeyId);
174try{return await ye(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(le(n))return{data:null,error:n};throw n}}}function V_(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&yk()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class dG extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function fG(){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 bk(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function hG(e){return parseInt(e,16)}function mG(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,s=>s.toString(16).padStart(2,"0")).join("")}function pG(e){var t;const{chainId:n,domain:s,expirationTime:i,issuedAt:l=new Date,nonce:c,notBefore:f,requestId:h,resources:m,scheme:g,uri:p,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(!s)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(!p)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(`
175`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=bk(e.address),S=g?`${g}://${s}`:s,_=e.statement?`${e.statement}
176`:"",E=`${S} wants you to sign in with your Ethereum account:
177${w}
178
179${_}`;let j=`URI: ${p}
180Version: ${b}
181Chain ID: ${n}${c?`
182Nonce: ${c}`:""}
183Issued At: ${l.toISOString()}`;if(i&&(j+=`
184Expiration Time: ${i.toISOString()}`),f&&(j+=`
185Not Before: ${f.toISOString()}`),h&&(j+=`
186Request ID: ${h}`),m){let C=`
187Resources:`;for(const A of m){if(!A||typeof A!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${A}`);C+=`
188- ${A}`}j+=C}return`${E}
189${j}`}class jt extends Error{constructor({message:t,code:n,cause:s,name:i}){var l;super(t,{cause:s}),this.__isWebAuthnError=!0,this.name=(l=i??(s instanceof Error?s.name:void 0))!==null&&l!==void 0?l:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Fd extends jt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function gG({error:e,options:t}){var n,s,i;const{publicKey:l}=t;if(!l)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new jt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=l.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new jt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((s=l.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new jt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=l.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new jt({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 jt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new jt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return l.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new jt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new jt({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;
189if(xk(c)){if(l.rp.id!==c)return new jt({message:`The RP ID "${l.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(l.user.id.byteLength<1||l.user.id.byteLength>64)return new jt({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 jt({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 jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function yG({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 jt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new jt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const s=window.location.hostname;if(xk(s)){if(n.rpId!==s)return new jt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new jt({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 jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class vG{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 Qg=new vG;function $_(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:s}=e,i=wo(e,["challenge","user","excludeCredentials"]),l=so(t).buffer,c=Object.assign(Object.assign({},n),{id:so(n.id).buffer}),f=Object.assign(Object.assign({},i),{challenge:l,user:c});if(s&&s.length>0){f.excludeCredentials=new Array(s.length);for(let h=0;h<s.length;h++){const m=s[h];f.excludeCredentials[h]=Object.assign(Object.assign({},m),{id:so(m.id).buffer,type:m.type||"public-key",transports:m.transports})}}return f}function H_(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,s=wo(e,["challenge","allowCredentials"]),i=so(t).buffer,l=Object.assign(Object.assign({},s),{challenge:i});if(n&&n.length>0){l.allowCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const f=n[c];l.allowCredentials[c]=Object.assign(Object.assign({},f),{id:so(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return l}function G_(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:Ga(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ga(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function q_(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,s=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ga(new Uint8Array(i.authenticatorData)),clientDataJSON:Ga(new Uint8Array(i.clientDataJSON)),signature:Ga(new Uint8Array(i.signature)),userHandle:i.userHandle?Ga(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function xk(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Kd(){var e,t;return!!(Xt()&&"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 wk(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Fd("Browser returned unexpected credential type",t)}:{data:null,error:new Fd("Empty credential response",t)}}
189catch(t){return{data:null,error:gG({error:t,options:e})}}}async function Sk(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Fd("Browser returned unexpected credential type",t)}:{data:null,error:new Fd("Empty credential response",t)}}catch(t){return{data:null,error:yG({error:t,options:e})}}}const bG={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},xG={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Wd(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),s={};for(const i of e)if(i)for(const l in i){const c=i[l];if(c!==void 0)if(Array.isArray(c))s[l]=c;else if(n(c))s[l]=c;else if(t(c)){const f=s[l];t(f)?s[l]=Wd(f,c):s[l]=Wd(c)}else s[l]=c}return s}function wG(e,t){return Wd(bG,e,t||{})}function SG(e,t){return Wd(xG,e,t||{})}class _G{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:s,signal:i},l){var c;try{const{data:f,error:h}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!f)return{data:null,error:h};const m=i??Qg.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:g}=f.webauthn.credential_options.publicKey;if(!g.name){const p=s;if(p)g.name=`${g.id}:${p}`;else{const w=(await this.client.getUser()).data.user,S=((c=w?.user_metadata)===null||c===void 0?void 0:c.name)||w?.email||w?.id||"User";g.name=`${g.id}:${S}`}}g.displayName||(g.displayName=g.name)}switch(f.webauthn.type){case"create":{const g=wG(f.webauthn.credential_options.publicKey,l?.create),{data:p,error:b}=await wk({publicKey:g,signal:m});return p?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:p}},error:null}:{data:null,error:b}}case"request":{const g=SG(f.webauthn.credential_options.publicKey,l?.request),{data:p,error:b}=await Sk(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:g,signal:m}));return p?{data:{factorId:t,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:p}},error:null}:{data:null,error:b}}}}catch(f){return le(f)?{data:null,error:f}:{data:null,error:new ir("Unexpected error in challenge",f)}}}async _verify({challengeId:t,factorId:n,webauthn:s}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:s})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},l){if(!n)return{data:null,error:new Ql("rpId is required for WebAuthn authentication")};try{if(!Kd())return{data:null,error:new ir("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:s},signal:i},{request:l});if(!c)return{data:null,error:f};const{webauthn:h}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:h.type,rpId:n,rpOrigins:s,credential_response:h.credential_response}})}catch(c){return le(c)?{data:null,error:c}:{data:null,error:new ir("Unexpected error in authenticate",c)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},l){if(!n)return{data:null,error:new Ql("rpId is required for WebAuthn registration")};try{if(!Kd())return{data:null,error:new ir("Browser does not support WebAuthn",null)};const{data:c,error:f}=await this._enroll({friendlyName:t});if(!c)return await this.client.mfa.listFactors().then(g=>{var p;return(p=g.data)===null||p===void 0?void 0:p.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===t&&b.status!=="unverified")}).then(g=>g?this.client.mfa.unenroll({factorId:g?.id}):void 0),{data:null,error:f};const{data:h,error:m}=await this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:n,rpOrigins:s},signal:i},{create:l});return h?this._verify({factorId:c.id,challengeId:h.challengeId,webauthn:{rpId:n,rpOrigins:s,type:h.webauthn.type,credential_response:h.webauthn.credential_response}}):{data:null,error:m}}catch(c){return le(c)?{data:null,error:c}:{data:null,error:new ir("Unexpected error in register",c)}}}}fG();const EG={url:A7,storageKey:N7,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:k7,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},qi={};class ec{get jwks(){var t,n;return(n=(t=qi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){qi[this.storageKey]=Object.assign(Object.assign({},qi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=qi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){qi[this.storageKey]=Object.assign(Object.assign({},qi[this.storageKey]),{cachedAt:t})}constructor(t){var n,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const l=Object.assign(Object.assign({},EG),t);if(this.storageKey=l.storageKey,this.instanceID=(n=ec.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,ec.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!l.debug,typeof l.debug=="function"&&(this.logger=l.debug),this.instanceID>
1890&&Xt()){const c=`${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(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=l.persistSession,this.autoRefreshToken=l.autoRefreshToken,this.experimental=(s=l.experimental)!==null&&s!==void 0?s:{},this.admin=new uG({url:l.url,headers:l.headers,fetch:l.fetch,experimental:this.experimental}),this.url=l.url,this.headers=l.headers,this.fetch=vk(l.fetch),this.detectSessionInUrl=l.detectSessionInUrl,this.flowType=l.flowType,this.hasCustomAuthorizationHeader=l.hasCustomAuthorizationHeader,this.throwOnError=l.throwOnError,this.lockAcquireTimeout=l.lockAcquireTimeout,l.lock!=null&&(this.lock=l.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new _G(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?(l.storage?this.storage=l.storage:yk()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=V_(this.memoryStorage)),l.userStorage&&(this.userStorage=l.userStorage)):(this.memoryStorage={},this.storage=V_(this.memoryStorage)),Xt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c),(c.data.event==="TOKEN_REFRESHED"||c.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}l.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${mk}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();
189const n=await this.initializePromise,s=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const i of s)await this._notifyAllSubscribers(i.event,i.session,i.broadcast);return n}async _initialize(){var t;try{let n={},s="none";if(Xt()&&(n=G7(window.location.href),this._isImplicitGrantCallback(n)?s="implicit":await this._isPKCECallback(n)&&(s="pkce")),Xt()&&this.detectSessionInUrl&&s!=="none"){const{data:i,error:l}=await this._getSessionFromURL(n,s);if(l){if(this._debug("#_initialize()","error detecting session from URL",l),M7(l)){const h=(t=l.details)===null||t===void 0?void 0:t.code;if(h==="identity_already_exists"||h==="identity_not_found"||h==="single_identity_not_deletable")return{error:l}}return{error:l}}const{session:c,redirectType:f}=i;return this._debug("#_initialize()","detected session in URL",c,"redirect type",f),await this._saveSession(c),setTimeout(async()=>{f==="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 le(n)?this._returnResult({error:n}):this._returnResult({error:new ir("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,s,i;try{const l=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(n=t?.options)===null||n===void 0?void 0:n.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(i=t?.options)===null||i===void 0?void 0:i.captchaToken}},xform:Gn}),{data:c,error:f}=l;if(f||!c)return this._returnResult({data:{user:null,session:null},error:f});const h=c.session,m=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(l){if(le(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signUp(t){var n,s,i;try{let l;if("email"in t){const{email:g,password:p,options:b}=t;let w=null,S=null;this.flowType==="pkce"&&([w,S]=await Ba(this.storage,this.storageKey)),l=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:b?.emailRedirectTo,body:{email:g,password:p,data:(n=b?.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:b?.captchaToken},code_challenge:w,code_challenge_method:S},xform:Gn})}else if("phone"in t){const{phone:g,password:p,options:b}=t;l=await ye(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:g,password:p,data:(s=b?.data)!==null&&s!==void 0?s:{},channel:(i=b?.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:b?.captchaToken}},xform:Gn})}else throw new Xu("You must provide either an email or phone number and a password");const{data:c,error:f}=l;if(f||!c)return await Et(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:f});const h=c.session,m=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(l){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithPassword(t){try{let n;if("email"in t){const{email:l,password:c,options:f}=t;n=await ye(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:l,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:B_})}else if("phone"in t){const{phone:l,password:c,options:f}=t;n=await ye(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:l,password:c,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:B_})}else throw new Xu("You must provide either an email or phone number and a password");const{data:s,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!s||!s.session||!s.user){const l=new Gi;return this._returnResult({data:{user:null,session:null},error:l})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:i})}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,s,i,l;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(l=t.options)===null||l===void 0?void 0:l.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):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,s,i,l,c,f,h,m,g,p,b;let w,S;if("message"in t)w=t.message,S=t.signature;else{const{chain:_,wallet:E,statement:j,options:C}=t;let A;if(Xt())if(typeof E=="object")A=E;else{const U=window;if("ethereum"in U&&typeof U.ethereum=="object"&&"request"in U.ethereum&&typeof U.ethereum.request=="function")A=U.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"||!C?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");A=E}const k=new URL((n=C?.url)!==null&&n!==void 0?n:window.location.href),D=await A.request({method:"eth_requestAccounts"}).then(U=>U).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!D||D.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const B=bk(D[0]);let L=(s=C?.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!L){const U=await A.request({method:"eth_chainId"});L=hG(U)}const P={domain:k.host,address:B,statement:j,uri:k.href,version:"1",chainId:L,nonce:(i=C?.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(c=(l=C?.signInWithEthereum)===null||l===void 0?void 0:l.issuedAt)!==null&&c!==void 0?c:new Date,expirationTime:(f=C?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(h=C?.signInWithEthereum)===null||h===void 0?void 0:h.notBefore,requestId:(m=C?.signInWithEthereum)===null||m===void 0?void 0:m.requestId,resources:(g=C?.signInWithEthereum)===null||g===void 0?void 0:g.resources};w=pG(P),S=await A.request({method:"personal_sign",params:[mG(w),B]})}try{const{data:_,error:E}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:S},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(b=t.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:Gn});if(E)throw E;if(!_||!_.session||!_.user){const j=new Gi;return this._returnResult({data:{user:null,session:null},error:j})}return _.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),this._returnResult({data:Object.assign({},_),error:E})}catch(_){if(le(_))return this._returnResult({data:{user:null,session:null},error:_});throw _}}async signInWithSolana(t){var n,s,i,l,c,f,h,m,g,p,b,w;let S,_;if("message"in t)S=t.message,_=t.signature;else{const{chain:E,wallet:j,statement:C,options:A}=t;let k;if(Xt())if(typeof j=="object")k=j;else{const B=window;if("solana"in B&&typeof B.solana=="object"&&("signIn"in B.solana&&typeof B.solana.signIn=="function"||"signMessage"in B.solana&&typeof B.solana.signMessage=="function"))k=B.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 j!="object"||!A?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=j}const D=new URL((n=A?.url)!==null&&n!==void 0?n:window.location.href);
189if("signIn"in k&&k.signIn){const B=await k.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},A?.signInWithSolana),{version:"1",domain:D.host,uri:D.href}),C?{statement:C}:null));let L;if(Array.isArray(B)&&B[0]&&typeof B[0]=="object")L=B[0];else if(B&&typeof B=="object"&&"signedMessage"in B&&"signature"in B)L=B;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in L&&"signature"in L&&(typeof L.signedMessage=="string"||L.signedMessage instanceof Uint8Array)&&L.signature instanceof Uint8Array)S=typeof L.signedMessage=="string"?L.signedMessage:new TextDecoder().decode(L.signedMessage),_=L.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in k)||typeof k.signMessage!="function"||!("publicKey"in k)||typeof k!="object"||!k.publicKey||!("toBase58"in k.publicKey)||typeof k.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${D.host} wants you to sign in with your Solana account:`,k.publicKey.toBase58(),...C?["",C,""]:[""],"Version: 1",`URI: ${D.href}`,`Issued At: ${(i=(s=A?.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((l=A?.signInWithSolana)===null||l===void 0)&&l.notBefore?[`Not Before: ${A.signInWithSolana.notBefore}`]:[],...!((c=A?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${A.signInWithSolana.expirationTime}`]:[],...!((f=A?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${A.signInWithSolana.chainId}`]:[],...!((h=A?.signInWithSolana)===null||h===void 0)&&h.nonce?[`Nonce: ${A.signInWithSolana.nonce}`]:[],...!((m=A?.signInWithSolana)===null||m===void 0)&&m.requestId?[`Request ID: ${A.signInWithSolana.requestId}`]:[],...!((p=(g=A?.signInWithSolana)===null||g===void 0?void 0:g.resources)===null||p===void 0)&&p.length?["Resources",...A.signInWithSolana.resources.map(L=>`- ${L}`)]:[]].join(`
190`);const B=await k.signMessage(new TextEncoder().encode(S),"utf8");if(!B||!(B instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");_=B}}try{const{data:E,error:j}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:Ga(_)},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:Gn});if(j)throw j;if(!E||!E.session||!E.user){const C=new Gi;return this._returnResult({data:{user:null,session:null},error:C})}return E.session&&(await this._saveSession(E.session),await this._notifyAllSubscribers("SIGNED_IN",E.session)),this._returnResult({data:Object.assign({},E),error:j})}catch(E){if(le(E))return this._returnResult({data:{user:null,session:null},error:E});throw E}}async _exchangeCodeForSession(t){const n=await tr(this.storage,`${this.storageKey}-code-verifier`),[s,i]=(n??"").split("/");try{if(!s&&this.flowType==="pkce")throw new P7;const{data:l,error:c}=await ye(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:s},xform:Gn});if(await Et(this.storage,`${this.storageKey}-code-verifier`),c)throw c;if(!l||!l.session||!l.user){const f=new Gi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:f})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l.session)),this._returnResult({data:Object.assign(Object.assign({},l),{redirectType:i??null}),error:c})}catch(l){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(l))return this._returnResult({data:{user:null,session:null,redirectType:null},error:l});throw l}}async signInWithIdToken(t){try{const{options:n,provider:s,token:i,access_token:l,nonce:c}=t,f=await ye(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:i,access_token:l,nonce:c,gotrue_meta_security:{captcha_token:n?.captchaToken}},xform:Gn}),{data:h,error:m}=f;if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!h||!h.session||!h.user){const g=new Gi;return this._returnResult({data:{user:null,session:null},error:g})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",h.session)),this._returnResult({data:h,error:m})}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,s,i,l,c;try{if("email"in t){const{email:f,options:h}=t;let m=null,g=null;this.flowType==="pkce"&&([m,g]=await Ba(this.storage,this.storageKey));const{error:p}=await ye(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:f,data:(n=h?.data)!==null&&n!==void 0?n:{},create_user:(s=h?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:m,code_challenge_method:g},redirectTo:h?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:p})}if("phone"in t){const{phone:f,options:h}=t,{data:m,error:g}=await ye(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:f,data:(i=h?.data)!==null&&i!==void 0?i:{},create_user:(l=h?.shouldCreateUser)!==null&&l!==void 0?l:!0,gotrue_meta_security:{captcha_token:h?.captchaToken},channel:(c=h?.channel)!==null&&c!==void 0?c:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:m?.message_id},error:g})}throw new Xu("You must provide either an email or phone number.")}catch(f){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(f))return this._returnResult({data:{user:null,session:null},error:f});throw f}}async verifyOtp(t){var n,s;try{let i,l;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,l=(s=t.options)===null||s===void 0?void 0:s.captchaToken);const{data:c,error:f}=await ye(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:l}}),redirectTo:i,xform:Gn});if(f)throw f;if(!c)throw new Error("An error occurred on token verification.");const h=c.session,m=c.user;return h?.access_token&&(await this._saveSession(h),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",h)),this._returnResult({data:{user:m,session:h},error:null})}catch(i){if(le(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,s,i,l,c;try{let f=null,h=null;this.flowType==="pkce"&&([f,h]=await Ba(this.storage,this.storageKey));const m=await ye(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:(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&s!==void 0?s:void 0}),!((i=t?.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:h}),headers:this.headers,xform:oG});return!((l=m.data)===null||l===void 0)&&l.url&&Xt()&&!(!((c=t.options)===null||c===void 0)&&c.skipBrowserRedirect)&&window.location.assign(m.data.url),this._returnResult(m)}catch(f){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;if(s)throw s;if(!n)throw new Pt;const{error:i}=await ye(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(le(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:s,type:i,options:l}=t;
190let c=null,f=null;this.flowType==="pkce"&&([c,f]=await Ba(this.storage,this.storageKey));const{error:h}=await ye(this.fetch,"POST",n,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:l?.captchaToken},code_challenge:c,code_challenge_method:f},redirectTo:l?.emailRedirectTo});return h&&await Et(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h})}else if("phone"in t){const{phone:s,type:i,options:l}=t,{data:c,error:f}=await ye(this.fetch,"POST",n,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:l?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:c?.message_id},error:f})}throw new Xu("You must provide either an email or phone number and a type")}catch(n){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await s,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=n();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await tr(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 s=t.expires_at?t.expires_at*1e3-Date.now()<Hp:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",t.expires_at),!s){if(this.userStorage){const c=await tr(this.userStorage,this.storageKey+"-user");c?.user?t.user=c.user:t.user=Gp()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const c={value:this.suppressGetSessionWarning};t.user=rG(t.user,c),c.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:l}=await this._callRefreshToken(t.refresh_token);if(l){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const f=await tr(this.storage,this.storageKey);if(f&&f.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:l})}return this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await ye(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ys}):await this._useSession(async n=>{var s,i,l;const{data:c,error:f}=n;if(f)throw f;return!(!((s=c.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Pt}:await ye(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(l=(i=c.session)===null||i===void 0?void 0:i.access_token)!==null&&l!==void 0?l:void 0,xform:Ys})})}catch(n){if(le(n))return Yu(n)&&(await this._removeSession(),await Et(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n)):await this._updateUser(t,n)}async _updateUser(t,n={}){try{return await this._useSession(async s=>{const{data:i,error:l}=s;if(l)throw l;if(!i.session)throw new Pt;const c=i.session;let f=null,h=null;this.flowType==="pkce"&&t.email!=null&&([f,h]=await Ba(this.storage,this.storageKey));const{data:m,error:g}=await ye(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n?.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:f,code_challenge_method:h}),jwt:c.access_token,xform:Ys});if(g)throw g;return c.user=m.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),this._returnResult({data:{user:c.user},error:null})})}catch(s){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Pt;const n=Date.now()/1e3;let s=n,i=!0,l=null;const{payload:c}=Qu(t.access_token);if(c.exp&&(s=c.exp,i=s<=n),i){const{data:f,error:h}=await this._callRefreshToken(t.refresh_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!f)return{data:{user:null,session:null},error:null};l=f}else{const{data:f,error:h}=await this._getUser(t.access_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});l={access_token:t.access_token,refresh_token:t.refresh_token,user:f.user,token_type:"bearer",expires_in:s-n,expires_at:s},await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)}return this._returnResult({data:{user:l.user,session:l},error:null})}catch(n){if(le(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async n=>{var s;if(!t){const{data:c,error:f}=n;if(f)throw f;t=(s=c.session)!==null&&s!==void 0?s:void 0}if(!t?.refresh_token)throw new Pt;const{data:i,error:l}=await this._callRefreshToken(t.refresh_token);return l?this._returnResult({data:{user:null,session:null},error:l}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(le(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var s;try{if(!Xt())throw new Ju("No browser detected.");
190if(t.error||t.error_description||t.error_code)throw new Ju(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 R_("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ju("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 R_("No code detected.");const{data:A,error:k}=await this._exchangeCodeForSession(t.code);if(k)throw k;const D=new URL(window.location.href);return D.searchParams.delete("code"),window.history.replaceState(window.history.state,"",D.toString()),{data:{session:A.session,redirectType:(s=A.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:i,provider_refresh_token:l,access_token:c,refresh_token:f,expires_in:h,expires_at:m,token_type:g}=t;if(!c||!h||!f||!g)throw new Ju("No session defined in URL");const p=Math.round(Date.now()/1e3),b=parseInt(h);let w=p+b;m&&(w=parseInt(m));const S=w-p;S*1e3<=ls&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${b}s`);const _=w-b;p-_>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",_,w,p):p-_<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",_,w,p);const{data:E,error:j}=await this._getUser(c);if(j)throw j;const C={provider_token:i,provider_refresh_token:l,access_token:c,expires_in:b,expires_at:w,refresh_token:f,token_type:g,user:E.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:C,redirectType:t.type},error:null})}catch(i){if(le(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const n=await tr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var s;const i=async()=>{await this._removeSession(),await Et(this.storage,`${this.storageKey}-code-verifier`)},{data:l,error:c}=n;if(c&&!Yu(c))return this._returnResult({error:c});const f=(s=l.session)===null||s===void 0?void 0:s.access_token;if(f){const{error:h}=await this.admin.signOut(f,t);if(h&&!(k_(h)&&(h.status===404||h.status===401||h.status===403)||Yu(h)))return t!=="others"&&await i(),this._returnResult({error:h})}return t!=="others"&&await i(),this._returnResult({error:null})})}onAuthStateChange(t){const n=H7(),s={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,s),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:s}}}async _emitInitialSession(t){return await this._useSession(async n=>{var s,i;try{const{data:{session:l},error:c}=n;if(c)throw c;await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",l)),this._debug("INITIAL_SESSION","callback id",t,"session",l)}catch(l){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",l),Yu(l)||Zu(l)||k_(l)&&(l.code==="refresh_token_not_found"||l.code==="refresh_token_already_used"||l.code==="session_expired")?console.warn(l):console.error(l)}})}async resetPasswordForEmail(t,n={}){let s=null,i=null;this.flowType==="pkce"&&([s,i]=await Ba(this.storage,this.storageKey,!0));try{return await ye(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:s,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(l){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(l))return this._returnResult({data:null,error:l});throw l}}async getUserIdentities(){var t;try{const{data:n,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(le(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:s,error:i}=await this._useSession(async l=>{var c,f,h,m,g;const{data:p,error:b}=l;if(b)throw b;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(c=t.options)===null||c===void 0?void 0:c.redirectTo,scopes:(f=t.options)===null||f===void 0?void 0:f.scopes,queryParams:(h=t.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:!0});return await ye(this.fetch,"GET",w,{headers:this.headers,jwt:(g=(m=p.session)===null||m===void 0?void 0:m.access_token)!==null&&g!==void 0?g:void 0})});if(i)throw i;return Xt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s?.url),this._returnResult({data:{provider:t.provider,url:s?.url},error:null})}catch(s){if(le(s))return this._returnResult({data:{provider:t.provider,url:null},error:s});throw s}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var s;try{const{error:i,data:{session:l}}=n;if(i)throw i;const{options:c,provider:f,token:h,access_token:m,nonce:g}=t,p=await ye(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=l?.access_token)!==null&&s!==void 0?s:void 0,body:{provider:f,id_token:h,access_token:m,nonce:g,link_identity:!0,gotrue_meta_security:{captcha_token:c?.captchaToken}},xform:Gn}),{data:b,error:w}=p;return w?this._returnResult({data:{user:null,session:null},error:w}
190):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new Gi}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(i){if(await Et(this.storage,`${this.storageKey}-code-verifier`),le(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var s,i;const{data:l,error:c}=n;if(c)throw c;return await ye(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(s=l.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const s=Date.now();return await K7(async i=>(i>0&&await F7(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await ye(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Gn})),(i,l)=>{const c=200*Math.pow(2,i);return l&&Zu(l)&&Date.now()+c-s<ls})}catch(s){if(this._debug(n,"error",s),le(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}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 s=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",s),Xt()&&!n.skipBrowserRedirect&&window.location.assign(s),{data:{provider:t,url:s},error:null}}async _recoverAndRefresh(){var t,n;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const i=await tr(this.storage,this.storageKey);if(i&&this.userStorage){let c=await tr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:i.user},await Yi(this.userStorage,this.storageKey+"-user",c)),i.user=(t=c?.user)!==null&&t!==void 0?t:Gp()}else if(i&&!i.user&&!i.user){const c=await tr(this.storage,this.storageKey+"-user");c&&c?.user?(i.user=c.user,await Et(this.storage,this.storageKey+"-user"),await Yi(this.storage,this.storageKey,i)):i.user=Gp()}if(this._debug(s,"session from storage",i),!this._isValidSession(i)){this._debug(s,"session is not valid"),i!==null&&await this._removeSession();return}const l=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Hp;if(this._debug(s,`session has${l?"":" not"} expired with margin of ${Hp}s`),l){if(this.autoRefreshToken&&i.refresh_token){const{error:c}=await this._callRefreshToken(i.refresh_token);c&&(L7(c)?this._debug(s,"refresh discarded by commit guard",c):this._debug(s,"refresh failed",c))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:f}=await this._getUser(i.access_token);!f&&c?.user?(i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(s,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(s,"error",i),Zu(i)?console.warn(i):console.error(i);return}finally{this._debug(s,"end")}}async _callRefreshToken(t){var n,s;if(!t)throw new Pt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const i="#_callRefreshToken()";this._debug(i,"begin");try{this.refreshingDeferred=new zf;const l=await tr(this.storage,this.storageKey),{data:c,error:f}=await this._refreshAccessToken(t);if(f)throw f;if(!c.session)throw new Pt;const h=await tr(this.storage,this.storageKey);if(l!==null&&(h===null||h.refresh_token!==l.refresh_token)){this._debug(i,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:h?"replaced":"cleared"});const b={data:null,error:new O_};return this.refreshingDeferred.resolve(b),b}const g=this._sessionRemovalEpoch;if(await this._saveSession(c.session),this._sessionRemovalEpoch!==g){this._debug(i,"commit guard (post-save): _removeSession ran during _saveSession, und
190oing write"),await Et(this.storage,this.storageKey),this.userStorage&&await Et(this.userStorage,this.storageKey+"-user");const b={data:null,error:new O_};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const p={data:c.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(p),p}catch(l){if(this._debug(i,"error",l),le(l)){const c={data:null,error:l};if(!Zu(l)){const f=await tr(this.storage,this.storageKey);!!(f?.expires_at&&f.expires_at*1e3>Date.now())?this._debug(i,"proactive refresh failed, access token still valid — preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:c,expiresAt:Date.now()+C7},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(c),c}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(l),l}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,s=!0){if(this._pendingInitNotifications!==null&&s){this._pendingInitNotifications.push({event:t,session:n,broadcast:s});return}const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:t,session:n});const l=[],c=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(t,n)}catch(h){l.push(h)}});if(await Promise.all(c),l.length>0){for(let f=0;f<l.length;f+=1)console.error(l[f]);throw l[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),s=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&n.user&&await Yi(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const l=z_(i);await Yi(this.storage,this.storageKey,l)}else{const i=z_(n);await Yi(this.storage,this.storageKey,i)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Et(this.storage,this.storageKey),await Et(this.storage,this.storageKey+"-code-verifier"),await Et(this.storage,this.storageKey+"-user"),this.userStorage&&await Et(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Xt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ls);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 dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:s}}=n;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((s.expires_at*1e3-t)/ls);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ls}ms, refresh threshold is ${kl} ticks`),i<=kl&&await this._callRefreshToken(s.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 dG)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async n=>{const{data:{session:s}}=n;
190if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((s.expires_at*1e3-t)/ls);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ls}ms, refresh threshold is ${kl} ticks`),i<=kl&&await this._callRefreshToken(s.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Xt()||!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})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{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()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,s){const i=[`provider=${encodeURIComponent(n)}`];if(s?.redirectTo&&i.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s?.scopes&&i.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[l,c]=await Ba(this.storage,this.storageKey),f=new URLSearchParams({code_challenge:`${encodeURIComponent(l)}`,code_challenge_method:`${encodeURIComponent(c)}`});i.push(f.toString())}if(s?.queryParams){const l=new URLSearchParams(s.queryParams);i.push(l.toString())}return s?.skipBrowserRedirect&&i.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var s;const{data:i,error:l}=n;return l?this._returnResult({data:null,error:l}):await ye(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(s=i?.session)===null||s===void 0?void 0:s.access_token})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var s,i;const{data:l,error:c}=n;if(c)return this._returnResult({data:null,error:c});const f=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:h,error:m}=await ye(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(s=l?.session)===null||s===void 0?void 0:s.access_token});return m?this._returnResult({data:null,error:m}):(t.factorType==="totp"&&h.type==="totp"&&(!((i=h?.totp)===null||i===void 0)&&i.qr_code)&&(h.totp.qr_code=`data:image/svg+xml;utf-8,${h.totp.qr_code}`),this._returnResult({data:h,error:null}))})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){const n=async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:c}=s;if(c)return this._returnResult({data:null,error:c});const f=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?G_(t.webauthn.credential_response):q_(t.webauthn.credential_response)})}:{code:t.code}),{data:h,error:m}=await ye(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:f,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});return m?this._returnResult({data:null,error:m}):(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:m}))})}catch(s){if(le(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(t){const n=async()=>{try{return await this._useSession(async s=>{var i;const{data:l,error:c}=s;if(c)return this._returnResult({data:null,error:c});const f=await ye(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});if(f.error)return f;const{data:h}=f;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:$_(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:H_(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(s){if(le(s))return this._returnResult({data:null,error:s});throw s}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(t){const{data:n,error:s}=await this._challenge({factorId:t.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:s}=await this.getUser();if(s)return{data:null,error:s};const i={all:[],phone:[],totp:[],webauthn:[]};for(const l of(t=n?.factors)!==null&&t!==void 0?t:[])i.all.push(l),l.status==="verified"&&i[l.factor_type].push(l);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,s,i,l;if(t)try{const{payload:w}=Qu(t);let S=null;w.aal&&(S=w.aal);let _=S;const{data:{user:E},error:j}=await this.getUser(t);if(j)return this._returnResult({data:null,error:j});((s=(n=E?.factors)===null||n===void 0?void 0:n.filter(k=>k.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(_="aal2");const A=w.amr||[];return{data:{currentLevel:S,nextLevel:_,currentAuthenticationMethods:A},error:null}}catch(w){if(le(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:c},error:f}
190=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!c)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:h}=Qu(c.access_token);let m=null;h.aal&&(m=h.aal);let g=m;((l=(i=c.user.factors)===null||i===void 0?void 0:i.filter(w=>w.status==="verified"))!==null&&l!==void 0?l:[]).length>0&&(g="aal2");const b=h.amr||[];return{data:{currentLevel:m,nextLevel:g,currentAuthenticationMethods:b},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;return i?this._returnResult({data:null,error:i}):s?await ye(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new Pt})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new Pt});const c=await ye(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&Xt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(le(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(t,n){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new Pt});const c=await ye(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return c.data&&c.data.redirect_url&&Xt()&&!n?.skipBrowserRedirect&&window.location.assign(c.data.redirect_url),c})}catch(s){if(le(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;return s?this._returnResult({data:null,error:s}):n?await ye(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Pt})})}catch(t){if(le(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;return i?this._returnResult({data:null,error:i}):s?(await ye(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Pt})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let s=n.keys.find(f=>f.kid===t);if(s)return s;const i=Date.now();if(s=this.jwks.keys.find(f=>f.kid===t),s&&this.jwks_cached_at+O7>i)return s;const{data:l,error:c}=await ye(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(c)throw c;return!l.keys||l.keys.length===0||(this.jwks=l,this.jwks_cached_at=i,s=l.keys.find(f=>f.kid===t),!s)?null:s}async getClaims(t,n={}){try{let s=t;if(!s){const{data:w,error:S}
190=await this.getSession();if(S||!w.session)return this._returnResult({data:null,error:S});s=w.session.access_token}const{header:i,payload:l,signature:c,raw:{header:f,payload:h}}=Qu(s);if(!n?.allowExpired)try{eG(l.exp)}catch(w){throw new Gd(w instanceof Error?w.message:"JWT validation failed")}const m=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n?.keys?{keys:n.keys}:n?.jwks);if(!m){const{error:w}=await this.getUser(s);if(w)throw w;return{data:{claims:l,header:i,signature:c},error:null}}const g=tG(i.alg),p=await crypto.subtle.importKey("jwk",m,g,!0,["verify"]);if(!await crypto.subtle.verify(g,p,c,V7(`${f}.${h}`)))throw new Gd("Invalid JWT signature");return{data:{claims:l,header:i,signature:c},error:null}}catch(s){if(le(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(t){var n,s,i;sr(this.experimental);try{if(!Kd())return this._returnResult({data:null,error:new ir("Browser does not support WebAuthn",null)});const{data:l,error:c}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t?.options)===null||n===void 0?void 0:n.captchaToken}});if(c||!l)return this._returnResult({data:null,error:c});const f=H_(l.options),h=(i=(s=t?.options)===null||s===void 0?void 0:s.signal)!==null&&i!==void 0?i:Qg.createNewAbortSignal(),{data:m,error:g}=await Sk({publicKey:f,signal:h});if(g||!m)return this._returnResult({data:null,error:g??new ir("WebAuthn ceremony failed",null)});const p=q_(m);return this._verifyPasskeyAuthentication({challengeId:l.challenge_id,credential:p})}catch(l){if(le(l))return this._returnResult({data:null,error:l});throw l}}async registerPasskey(t){var n,s;sr(this.experimental);try{if(!Kd())return this._returnResult({data:null,error:new ir("Browser does not support WebAuthn",null)});const{data:i,error:l}=await this._startPasskeyRegistration();if(l||!i)return this._returnResult({data:null,error:l});const c=$_(i.options),f=(s=(n=t?.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Qg.createNewAbortSignal(),{data:h,error:m}=await wk({publicKey:c,signal:f});if(m||!h)return this._returnResult({data:null,error:m??new ir("WebAuthn ceremony failed",null)});const g=G_(h);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:g})}catch(i){if(le(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){sr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Pt});const{data:i,error:l}=await ye(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})})}catch(t){if(le(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){sr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Pt});const{data:l,error:c}=await ye(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:l,error:null})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;sr(this.experimental);try{const{data:s,error:i}=await ye(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 i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})}catch(s){if(le(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(t){sr(this.experimental);try{const{data:n,error:s}=await ye(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Gn});return s?this._returnResult({data:null,error:s}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){sr(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:s}=t;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Pt});const{data:i,error:l}=await ye(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:c=>({data:c,error:null})});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})})}catch(t){if(le(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){sr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Pt});const{data:l,error:c}=await ye(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:t.friendlyName}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:l,error:null})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){sr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Pt});const{error:l}
190=await ye(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return l?this._returnResult({data:null,error:l}):this._returnResult({data:null,error:null})})}catch(n){if(le(n))return this._returnResult({data:null,error:n});throw n}}}ec.nextInstanceID={};const TG=ec,jG="2.110.9";let Rl="",Yd;if(typeof Deno<"u"){var Fp;Rl="deno",Yd=(Fp=Deno.version)===null||Fp===void 0?void 0:Fp.deno}else if(typeof document<"u")Rl="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Rl="react-native";else{var Kp;Rl="node";const e=globalThis.process;Yd=e==null||(Kp=e.version)===null||Kp===void 0?void 0:Kp.replace(/^v/,"")}const _k=[`runtime=${Rl}`];Yd&&_k.push(`runtime-version=${Yd}`);const CG={"X-Client-Info":`supabase-js/${jG}; ${_k.join("; ")}`},AG={headers:CG},NG={schema:"public"},kG={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},RG={},OG={enabled:!1,respectSamplingDecision:!0};function DG(e,t,n,s){function i(l){return l instanceof n?l:new n(function(c){c(l)})}return new(n||(n=Promise))(function(l,c){function f(g){try{m(s.next(g))}catch(p){c(p)}}function h(g){try{m(s.throw(g))}catch(p){c(p)}}function m(g){g.done?l(g.value):i(g.value).then(f,h)}m((s=s.apply(e,[])).next())})}let Wp=null;const MG="@opentelemetry/api";function PG(){return Wp===null&&(Wp=import(MG).catch(()=>null)),Wp}function LG(){return DG(this,void 0,void 0,function*(){try{const e=yield PG();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 zG(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,s,i,l]=t;if(n.length!==2||s.length!==32||i.length!==16||l.length!==2)return null;const c=/^[0-9a-f]+$/i;return!c.test(n)||!c.test(s)||!c.test(i)||!c.test(l)||s==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:n,traceId:s,parentId:i,traceFlags:l,isSampled:(parseInt(l,16)&1)===1}}function IG(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 s of t)try{if(typeof s=="string"){if(BG(n.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(n.hostname))return!0}else if(typeof s=="function"&&s(n))return!0}catch{continue}return!1}function BG(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 UG(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 tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function VG(e,t){if(tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(tc(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $G(e){var t=VG(e,"string");return tc(t)=="symbol"?t:t+""}function HG(e,t,n){return(t=$G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F_(Object(n),!0).forEach(function(s){HG(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F_(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}const GG=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),qG=()=>Headers,Ek=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),FG="sb_temp_",K_=new Set,KG=e=>{var t,n;if(!e.startsWith("sb_")||Ek(e)||e.startsWith(FG))return;const s=(t=(n=e.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:"unknown";K_.has(s)||(K_.add(s),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is;
190 if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},W_=(e,t,n,s,i,l)=>{const c=GG(s),f=qG(),h=i?.enabled===!0,m=i?.respectSamplingDecision!==!1,g=h?UG(t):null,p=!(l?.omitApiKeyAsBearer&&Ek(e));return async(b,w)=>{const S=await n();let _=new f(w?.headers);if(_.has("apikey")||_.set("apikey",e),!_.has("Authorization")){const E=S??(p?e:null);E&&_.set("Authorization",`Bearer ${E}`)}if(g){const E=await WG(b,g,m);E&&(E.traceparent&&!_.has("traceparent")&&_.set("traceparent",E.traceparent),E.tracestate&&!_.has("tracestate")&&_.set("tracestate",E.tracestate),E.baggage&&!_.has("baggage")&&_.set("baggage",E.baggage))}return c(b,pt(pt({},w),{},{headers:_}))}};async function WG(e,t,n){if(!IG(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const s=await LG();if(!s||!s.traceparent)return null;if(n){const i=zG(s.traceparent);if(i&&!i.isSampled)return null}return s}function Y_(e){return typeof e=="boolean"?{enabled:e}:e}function YG(e){return e.endsWith("/")?e:e+"/"}function XG(e,t){var n,s,i,l,c,f;const{db:h,auth:m,realtime:g,global:p}=e,{db:b,auth:w,realtime:S,global:_}=t,E=Y_(e.tracePropagation),j=Y_(t.tracePropagation),C={db:pt(pt({},b),h),auth:pt(pt({},w),m),realtime:pt(pt({},S),g),storage:{},global:pt(pt(pt({},_),p),{},{headers:pt(pt({},(n=_?.headers)!==null&&n!==void 0?n:{}),(s=p?.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(i=(l=E?.enabled)!==null&&l!==void 0?l:j?.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(c=(f=E?.respectSamplingDecision)!==null&&f!==void 0?f:j?.respectSamplingDecision)!==null&&c!==void 0?c:!0},accessToken:async()=>""};return e.accessToken?C.accessToken=e.accessToken:delete C.accessToken,C}function JG(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(YG(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var ZG=class extends TG{constructor(e){super(e)}},QG=class{constructor(e,t,n){var s,i;this.supabaseUrl=e,this.supabaseKey=t;const l=JG(e);if(!t)throw new Error("supabaseKey is required.");KG(t),this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,f={db:NG,realtime:RG,auth:pt(pt({},kG),{},{storageKey:c}),global:AG,tracePropagation:OG},h=XG(n??{},f);if(this.settings=h,this.storageKey=(s=h.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=h.global.headers)!==null&&i!==void 0?i:{},h.accessToken)this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(g,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}});else{var m;this.auth=this._initSupabaseAuthClient((m=h.auth)!==null&&m!==void 0?m:{},this.headers,h.global.fetch)}this.fetch=W_(t,e,this._getSessionToken.bind(this),h.global.fetch,h.tracePropagation),this.functionsFetch=W_(t,e,this._getSessionToken.bind(this),h.global.fetch,h.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(pt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},h.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(g=>this.realtime.setAuth(g)).catch(g=>console.warn("Failed to set initial Realtime auth token:",g)),this.rest=new oH(new URL("rest/v1",l).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch,timeout:h.db.timeout,urlLengthLimit:h.db.urlLengthLimit}),this.storage=new j7(this.storageUrl.href,this.headers,this.fetch,n?.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new Z$(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
190channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:s}=await e.auth.getSession();return(t=(n=s.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:s,userStorage:i,storageKey:l,flowType:c,lock:f,debug:h,throwOnError:m,experimental:g,lockAcquireTimeout:p,skipAutoInitialize:b},w,S){const _={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ZG({url:this.authUrl.href,headers:pt(pt({},_),w),storageKey:l,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:s,userStorage:i,flowType:c,lock:f,debug:h,throwOnError:m,experimental:g,fetch:S,lockAcquireTimeout:p,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(E=>E.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new XH(this.realtimeUrl.href,pt(pt({},e),{},{params:pt(pt({},{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"||e==="INITIAL_SESSION")&&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 e9=(e,t,n)=>new QG(e,t,n);function t9(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}t9()&&console.warn("⚠️  Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");const n9="https://lljjggqwutsnhdjdnuar.supabase.co",r9="sb_publishable_ncY19yXIICKbsT6KBHHL3Q_XS_pR0zo",Te=e9(n9,r9,{auth:{persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0}}),Tk="00000000-0000-0000-0000-000000000001",jk="id, epiwafer_intro, epiwafer_sub_types, epilayer_specs, wafer_specs, specs_footnote, substrates_intro, substrate_comparison, substrates_closing_note, updated_by, updated_at";async function s9(){const{data:e,error:t}=await Te.from("research_papers").select("id, title, authors, abstract, doi_url, journal, published_at, image_path, status, created_at, updated_at").eq("status","published").order("published_at",{ascending:!1});if(t)throw t;return e??[]}async function X_(e,t,n="newest"){const{data:s,error:i}=await Te.from("research_papers").select("id, title, authors, abstract, doi_url, journal, published_at, image_path, status, created_at, updated_at").eq("status","published").order("published_at",{ascending:n==="oldest"}).range(e,e+t-1);if(i)throw i;const l=s??[];return{papers:l,hasMore:l.length===t}}async function Ck(){const{data:e,error:t}=await Te.from("research_papers").select("id, title, authors, abstract, doi_url, journal, published_at, image_path, status, created_at, updated_at").order("created_at",{ascending:!1});if(t)throw t;return e??[]}async function a9(e,t){if(t){const{data:i,error:l}=await Te.from("research_papers").update(e).eq("id",t).select("id, title, authors, abstract, doi_url, journal, published_at, image_path, status, created_at, updated_at").maybeSingle();if(l)throw l;return i}const{data:n,error:s}=await Te.from("research_papers").insert(e).select("id, title, authors, abstract, doi_url, journal, published_at, image_path, status, created_at, updated_at").maybeSingle();if(s)throw s;return n}async function i9(e){const{error:t}=await Te.from("research_papers").delete().eq("id",e);if(t)throw t}async function o9(e){let t=Te.from("news").select("id, title, summary, body, image_path, status, published_at, created_at, updated_at").eq("status","published").order("published_at",{ascending:!1});const{data:n,error:s}=await t;if(s)throw s;return n??[]}async function l9(e){const{data:t,error:n}=await Te.from("news").select("id, title, summary, body, image_path, status, published_at, created_at, updated_at").eq("id",e).maybeSingle();if(n)throw n;return t}async function HF(){const{data:e,error:t}=await Te.from("news").select("id, title, summary, body, image_path, status, published_at, created_at, updated_at").order("created_at",{ascending:!1});if(t)throw t;return e??[]}async function GF(e,t){if(t){const{data:i,error:l}=await Te.from("news").update(e).eq("id",t).select("id, title, summary, body, image_path, status, published_at, created_at, updated_at").maybeSingle();if(l)throw l;return i}const{data:n,error:s}=await Te.from("news").insert(e).select("id, title, summary, body, image_path, status, published_at, created_at, updated_at").maybeSingle();if(s)throw s;return n}async function qF(e){const{error:t}=await Te.from("news").delete().eq("id",e);if(t)throw t}async function c9(){const{data:e,error:t}=await Te.from("conferences").select("id, title, description, start_date, end_date, start_time, end_time, time_format, venue, location, external_url, image_path, status, created_at, updated_at").eq("status","published").order("start_date",{ascending:!1});if(t)throw t;return e??[]}async function u9(e){const{data:t,error:n}=await Te.from("conferences").select("id, title, description, start_date, end_date, start_time, end_time, time_format, venue, location, external_url, image_path, status, created_at, updated_at").eq("id",e).maybeSingle();if(n)throw n;return t}async function Ak(){const{data:e,error:t}=await Te.from("conferences").select("id, title, description, start_date, end_date, start_time, end_time, time_format, venue, location, external_url, image_path, status, created_at, updated_at").order("created_at",{ascending:!1});if(t)throw t;return e??[]}async function d9(e,t){if(t){const{data:i,error:l}=await Te.from("conferences").update(e).eq("id",t).select("id, title, description, start_date, end_date, start_time, end_time, time_format, venue, location, external_url, image_path, status, created_at, updated_at").maybeSingle();if(l)throw l;return i}const{data:n,error:s}=await Te.from("conferences").insert(e).select("id, title, description, start_date, end_date, start_time, end_time, time_format, venue, location, external_url, image_path, status, created_at, updated_at").maybeSingle();if(s)throw s;return n}async function f9(e){const{error:t}=await Te.from("conferences").delete().eq("id",e);if(t)throw t}async function Nk(){const{data:e,error:t}=await Te.from("products_page").select(jk).eq("id",Tk).maybeSingle();if(t)throw t;return e}async function h9(e){const{data:t,error:n}=await Te.from("products_page").update(e).eq("id",Tk).select(jk).maybeSingle();if(n)throw n;return t}async function kk(){const{data:e,error:t}=await Te.from("tags").select("id, name, color, created_at").order("name",{ascending:!0});if(t)throw t;return e??[]}async function m9(e,t){const{data:n,error:s}=await Te.from("tags").insert({name:e,color:t}).select("id, name, color, created_at").maybeSingle();if(s)throw s;return n}async function p9(e){const{error:t}=await Te.from("tags").delete().eq("id",e);if(t)throw t}async function Rk(e){const{data:t,error:n}=await Te.from("conference_tags").select("tag_id, tags(id, name, color, created_at)").eq("conference_id",e);if(n)throw n;return(t??[]).map(s=>s.tags)}async function g9(e,t){if(await Te.from("conference_tags").delete().eq("conference_id",e),t.length===0)return;const n=t.map(i=>({conference_id:e,tag_id:i})),{error:s}=await Te.from("conference_tags").insert(n);if(s)throw s}async function y9(){const{data:e,error:t}=await Te.from("conference_tags").select("conference_id, tags(id, name, color, created_at)");if(t)throw t;const n={};for(const s of e??[])n[s.conference_id]||(n[s.conference_id]=[]),n[s.conference_id].push(s.tags);return n}async function mo(e,t){const{data:n}=await Te.auth.getSession(),s=n.session?.access_token;if(!s)throw new Error("Not authenticated");const i=new FormData;i.append("file",e);const l=await fetch(`/api/upload?type=${t}`,{method:"POST",headers:{Authorization:`Bearer ${s}`},body:i});if(!l.ok){const f=await l.json().catch(()=>({}));throw new Error(f.error??`Upload failed (${l.status})`)}const{url:c}=await l.json();return c}async function v9(e){return mo(e,"research")}async function b9(e){return mo(e,"conferences")}async function FF(e){return mo(e,"news")}async function x9(e){return mo(e,"products")}function J_(e){return!!e&&e.includes("/storage/v1/object/public/")}async function w9(e){const t={migrated:0,skipped:0,failed:[]},[n,s]=await Promise.all([Ck(),Ak()]);
190for(const i of n){if(!J_(i.image_path)){t.skipped++;continue}try{e?.(`Research: ${i.title}`);const l=await(await fetch(i.image_path)).blob(),c=new File([l],"image",{type:l.type||"image/png"}),f=await mo(c,"research"),{error:h}=await Te.from("research_papers").update({image_path:f}).eq("id",i.id);if(h)throw h;t.migrated++}catch(l){t.failed.push({id:i.id,title:i.title,error:l instanceof Error?l.message:String(l)})}}for(const i of s){if(!J_(i.image_path)){t.skipped++;continue}try{e?.(`Conference: ${i.title}`);const l=await(await fetch(i.image_path)).blob(),c=new File([l],"image",{type:l.type||"image/png"}),f=await mo(c,"conferences"),{error:h}=await Te.from("conferences").update({image_path:f}).eq("id",i.id);if(h)throw h;t.migrated++}catch(l){t.failed.push({id:i.id,title:i.title,error:l instanceof Error?l.message:String(l)})}}return t}function S9({paper:e}){const{ref:t,onMouseMove:n,onMouseLeave:s}=dc(),i=e.published_at?new Date(e.published_at).toLocaleDateString("en-US",{year:"numeric",month:"short"}):null;return u.jsxs("div",{ref:t,onMouseMove:n,onMouseLeave:s,style:{transformStyle:"preserve-3d"},className:"glass-card flex h-full flex-col overflow-hidden p-8 shadow-lg transition-shadow duration-300 will-change-transform hover:shadow-xl",children:[u.jsxs("div",{style:{transform:"translateZ(20px)"},className:"flex flex-1 flex-col",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[!e.image_path&&u.jsx(x4,{className:"mt-1 size-5 shrink-0 text-primary",strokeWidth:2}),u.jsx("h3",{className:"text-xl font-semibold leading-tight normal-case",children:e.title})]}),e.image_path&&u.jsx("div",{className:"mt-5 overflow-hidden rounded-lg",children:u.jsx("img",{src:e.image_path,alt:"",className:"aspect-[16/9] w-full object-cover"})}),e.authors.length>0&&u.jsx("p",{className:"mt-2.5 text-sm text-muted-foreground",children:e.authors.join(", ")}),u.jsx("p",{className:"mt-4 whitespace-pre-line text-sm leading-relaxed text-muted-foreground",children:e.abstract}),e.doi_url&&u.jsxs("a",{href:e.doi_url,target:"_blank",rel:"noopener noreferrer",className:"mt-5 inline-flex w-fit items-center gap-2 rounded-md border border-primary/40 px-3.5 py-2 font-mono text-xs text-primary transition-colors hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:["View at publisher ",u.jsx(By,{className:"size-3.5"})]})]}),u.jsxs("div",{style:{transform:"translateZ(10px)"},className:"mt-6 flex items-center justify-between border-t border-border pt-4 font-mono text-[12.5px] text-primary",children:[u.jsx("span",{className:"truncate",children:e.journal??"Preprint"}),u.jsx("span",{className:"shrink-0 text-muted-foreground",children:i})]})]})}function Xe({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:re("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function Xs({...e}){return u.jsx(UV,{"data-slot":"select",...e})}function Js({...e}){return u.jsx($V,{"data-slot":"select-value",...e})}function Zs({className:e,size:t="default",children:n,...s}){return u.jsxs(VV,{"data-slot":"select-trigger","data-size":t,className:re("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...s,children:[n,u.jsx(HV,{asChild:!0,children:u.jsx(Iy,{className:"size-4 opacity-50"})})]})}function Qs({className:e,children:t,position:n="item-aligned",align:s="center",...i}){return u.jsx(GV,{children:u.jsxs(qV,{"data-slot":"select-content",className:re("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
190de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:s,...i,children:[u.jsx(_9,{}),u.jsx(FV,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),u.jsx(E9,{})]})})}function vn({className:e,children:t,...n}){return u.jsxs(KV,{"data-slot":"select-item",className:re("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[u.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(YV,{children:u.jsx(Cj,{className:"size-4"})})}),u.jsx(WV,{children:t})]})}function _9({className:e,...t}){return u.jsx(XV,{"data-slot":"select-scroll-up-button",className:re("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(c4,{className:"size-4"})})}function E9({className:e,...t}){return u.jsx(JV,{"data-slot":"select-scroll-down-button",className:re("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Iy,{className:"size-4"})})}const Z_=9;function T9(){ca("Research");const[e,t]=x.useState([]),[n,s]=x.useState(!0),[i,l]=x.useState(!1),[c,f]=x.use
190State(null),[h,m]=x.useState(!0),[g,p]=x.useState(""),[b,w]=x.useState("newest"),S=x.useRef(null),_=g.trim().length>0;x.useEffect(()=>{_||(s(!0),f(null),X_(0,Z_,b).then(({papers:k,hasMore:D})=>{t(k),m(D)}).catch(k=>f(k.message)).finally(()=>s(!1)))},[b,_]);const[E,j]=x.useState(null);x.useEffect(()=>{!_||E||(s(!0),f(null),s9().then(j).catch(k=>f(k.message)).finally(()=>s(!1)))},[_,E]);const C=x.useCallback(()=>{i||!h||_||(l(!0),X_(e.length,Z_,b).then(({papers:k,hasMore:D})=>{t(B=>[...B,...k]),m(D)}).catch(k=>f(k.message)).finally(()=>l(!1)))},[e.length,b,h,i,_]);x.useEffect(()=>{const k=S.current;if(!k||_)return;const D=new IntersectionObserver(B=>B[0].isIntersecting&&C(),{rootMargin:"400px"});return D.observe(k),()=>D.disconnect()},[C,_]);const A=x.useMemo(()=>{if(!_)return e;const k=g.trim().toLowerCase();return(E??[]).filter(D=>[D.title,D.journal??"",...D.authors].join(" ").toLowerCase().includes(k))},[_,E,e,g]);return u.jsxs("section",{className:"relative mx-auto max-w-[1400px] px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:HI}),u.jsxs("div",{className:"mb-10 flex flex-col gap-6 md:flex-row md:items-end md:justify-between",children:[u.jsxs("div",{children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Research"}),u.jsx(Mr,{as:"h2",text:"Published research papers",className:"text-3xl font-semibold leading-tight"})]}),u.jsxs("div",{className:"flex w-full flex-col gap-3 sm:flex-row md:w-auto",children:[u.jsxs("div",{className:"relative w-full sm:max-w-xs",children:[u.jsx(oz,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),u.jsx(Xe,{type:"search",placeholder:"Search by title, author, journal...",value:g,onChange:k=>p(k.target.value),className:"pl-9"})]}),u.jsxs(Xs,{value:b,onValueChange:k=>w(k),children:[u.jsx(Zs,{className:"w-full sm:w-[160px]",children:u.jsx(Js,{})}),u.jsxs(Qs,{children:[u.jsx(vn,{value:"newest",children:"Newest first"}),u.jsx(vn,{value:"oldest",children:"Oldest first"})]})]})]})]}),n&&u.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map((k,D)=>u.jsx("div",{className:"glass-card h-[420px] animate-pulse"},D))}),c&&u.jsx("p",{className:"rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-sm text-destructive",children:c}),!n&&!c&&A.length===0&&u.jsx("div",{className:"glass-card p-12 text-center",children:u.jsx("p",{className:"text-muted-foreground",children:_?"No papers match your search.":"No research papers published yet."})}),!n&&!c&&A.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:A.map(k=>u.jsx(S9,{paper:k},k.id))}),!_&&u.jsxs("div",{ref:S,className:"mt-10 flex justify-center",children:[i&&u.jsx($y,{className:"size-6 animate-spin text-primary"}),!h&&e.length>0&&u.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:"You've reached the end."})]})]})]})}function j9(){ca("News & Announcements");const[e,t]=x.useState([]),[n,s]=x.useState(!0),[i,l]=x.useState(null);return x.useEffect(()=>{o9().then(t).catch(c=>l(c.message)).finally(()=>s(!1))},[]),u.jsxs(u.Fragment,{children:[u.jsx("div",{style:{marginTop:"calc(-1 * var(--site-header-height, 88px))"},children:u.jsx(df,{height:"calc(500px + var(--site-header-height, 88px))",className:"mb-16",children:u.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-4 px-6 text-center",style:{paddingTop:"var(--site-header-height, 88px)"},children:[u.jsx("span",{className:"rounded-full border border-white/20 bg-white/10 px-4 py-1 text-xs font-medium text-white/80 backdrop-blur",children:"Powered by NextGO Epi"}),u.jsx("h1",{className:"max-w-2xl text-4xl font-semibold tracking-tight text-white sm:text-6xl",children:"News & Announcements"}),u.jsx("p",{className:"max-w-md text-sm text-white/70 sm:text-base",children:"Updates on our Ga2O3 epitaxial wafer research, partnerships, and milestones as we scale toward commercial power electronics."})]})})}),u.jsxs("section",{className:"relative mx-auto max-w-[1320px] px-6 pb-16 md:px-12 md:pb-24",children:[u.jsx(Ft,{src:pd}),n&&u.jsx("div",{className:"space-y-5",children:[...Array(3)].map((c,f)=>u.jsx("div",{className:"glass-card h-28 animate-pulse"},f))}),i&&u.jsx("p",{className:"rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-sm text-destructive",children:i}),!n&&!i&&e.length===0&&u.jsx("div",{className:"glass-card p-12 text-center",children:u.jsx("p",{className:"text-muted-foreground",children:"No news published yet."})}),!n&&!i&&e.length>0&&u.jsx("div",{className:"space-y-5",children:e.map(c=>{const f=c.published_at?new Date(c.published_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):null;return u.jsxs(Gt,{to:`/news/${c.id}`,className:"glass-card group flex items-center gap-6 p-6 transition-colors hover:border-primary/40 dark:hover:border-primary/40",children:[c.image_path&&u.jsx("div",{className:"hidden aspect-[4/3] w-24 shrink-0 overflow-hidden rounded-lg border border-border sm:block",children:u.jsx("img",{src:c.image_path,alt:"",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[f&&u.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.12em] text-primary",children:f}),u.jsx("h3",{className:"mt-2 text-xl font-semibold leading-tight",children:c.title}),u.jsx("p",{className:"mt-2 line-clamp-2 text-sm text-muted-foreground",children:c.summary})]}),u.jsx(Tj,{className:"size-5 shrink-0 text-muted-foreground transition-all group-hover:translate-x-1 group-hover:text-primary"})]},c.id)})})]})]})}function C9(){const{id:e}=kE(),[t,n]=x.useState(null),[s,i]=x.useState(!0),[l,c]=x.useState(null);if(ca(t?t.title:"News"),x.useEffect(()=>{e&&l9(e).then(g=>{!g||g.status!=="published"?c("This article is not available."):n(g)}
190).catch(()=>c("This article is not available.")).finally(()=>i(!1))},[e]),s)return u.jsxs("section",{className:"relative mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:pd}),u.jsx("div",{className:"glass-card h-64 animate-pulse"})]});if(l||!t)return u.jsxs("section",{className:"relative mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:pd}),u.jsxs(Gt,{to:"/news",className:"mb-6 inline-flex items-center gap-2 font-mono text-xs text-muted-foreground hover:text-foreground",children:[u.jsx(ql,{className:"size-3.5"})," Back to news"]}),u.jsx("p",{className:"text-muted-foreground",children:l??"Article not found."})]});const f=t.published_at?new Date(t.published_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):null,h=u.jsxs(Gt,{to:"/news",className:"mb-8 inline-flex items-center gap-2 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",children:[u.jsx(ql,{className:"size-3.5"})," Back to news"]}),m=u.jsxs(u.Fragment,{children:[t.summary&&u.jsx("p",{className:"text-lg leading-relaxed text-muted-foreground",children:t.summary}),u.jsx("div",{className:re(t.summary&&"mt-10","whitespace-pre-line text-base leading-relaxed text-foreground/90","[&_p]:mb-4 [&_p:last-child]:mb-0","[&_h2]:mb-3 [&_h2]:mt-8 [&_h2]:text-2xl [&_h2]:font-semibold [&_h2:first-child]:mt-0","[&_h3]:mb-2 [&_h3]:mt-6 [&_h3]:text-xl [&_h3]:font-semibold [&_h3:first-child]:mt-0","[&_ul]:mb-4 [&_ul]:list-disc [&_ul]:pl-5","[&_ol]:mb-4 [&_ol]:list-decimal [&_ol]:pl-5","[&_li]:mb-1.5","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2 hover:[&_a]:text-primary/80"),dangerouslySetInnerHTML:{__html:t.body}})]});return t.image_path?u.jsxs("article",{children:[u.jsx("div",{style:{marginTop:"calc(-1 * var(--site-header-height, 88px))"},children:u.jsxs(df,{height:"calc(420px + var(--site-header-height, 88px))",className:"mb-16",fadeBottom:!0,children:[u.jsx("img",{src:t.image_path,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover opacity-[0.22]",style:{maskImage:"radial-gradient(ellipse 62% 55% at 50% 48%, black 20%, transparent 85%)",WebkitMaskImage:"radial-gradient(ellipse 62% 55% at 50% 48%, black 20%, transparent 85%)"}}),u.jsx("div",{className:"relative flex h-full w-full flex-col items-start justify-center gap-4 px-6 md:px-12",style:{paddingTop:"var(--site-header-height, 88px)"},children:u.jsxs("div",{className:"mx-auto w-full max-w-3xl",children:[u.jsx("p",{className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"News"}),u.jsx("h1",{className:"max-w-2xl text-3xl font-semibold leading-tight text-white md:text-4xl",children:t.title}),f&&u.jsx("p",{className:"mt-4 font-mono text-sm text-white/70",children:f})]})})]})}),u.jsxs("section",{className:"relative mx-auto max-w-3xl px-6 pb-16 pt-10 md:px-12 md:pb-24",children:[h,m]})]}):u.jsxs("article",{className:"relative mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:pd}),h,u.jsx("p",{className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"News"}),u.jsx("h1",{className:"text-3xl font-semibold leading-tight md:text-4xl",children:t.title}),f&&u.jsx("p",{className:"mt-4 font-mono text-sm text-muted-foreground",children:f}),u.jsx("div",{className:"mt-6",children:m})]})}const A9=ff("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Pe({className:e,variant:t="default",size:n="default",asChild:s=!1,...i}){const l=s?Zy:"button";return u.jsx(l,{"data-slot":"button","data-variant":t,"data-size":n,className:re(A9({variant:t,size:n,className:e})),...i})}function N9({...e}){return u.jsx(dv,{"data-slot":"dialog",...e})}function k9({...e}){return u.jsx(fv,{"data-slot":"dialog-portal",...e})}function R9({className:e,...t}){return u.jsx(hv,{"data-slot":"dialog-overlay",className:re("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function O9({className:e,children:t,showCloseButton:n=!0,...s}){return u.jsxs(k9,{"data-slot":"dialog-portal",children:[u.jsx(R9,{}),u.jsxs(mv,{"data-slot":"dialog-content",className:re("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
190ded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...s,children:[t,n&&u.jsxs(wf,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(Dr,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function D9({className:e,...t}){return u.jsx(pv,{"data-slot":"dialog-title",className:re("text-lg leading-none font-semibold",e),...t})}function Q_({specs:e}){return u.jsx("div",{className:"divide-y divide-border text-sm",children:e.map(t=>u.jsxs("div",{className:"flex items-center justify-between gap-4 py-2.5",children:[u.jsxs("span",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:[t.label,t.note]}),u.jsx("span",{className:"text-right font-medium",children:t.value})]},t.label))})}function M9({label:e,image:t,onOpen:n}){const{ref:s,onMouseMove:i,onMouseLeave:l}=dc();return u.jsxs("button",{ref:s,type:"button",onClick:n,onMouseMove:i,onMouseLeave:l,style:{transformStyle:"preserve-3d"},className:"glass-card group w-full max-w-[160px] overflow-hidden text-left shadow-md transition-shadow duration-300 will-change-transform hover:shadow-lg",children:[u.jsx("div",{style:{transform:"translateZ(20px)"},className:"overflow-hidden rounded-t-lg",children:u.jsx("img",{src:t,alt:e,className:"aspect-square w-full object-cover"})}),u.jsx("figcaption",{style:{transform:"translateZ(10px)"},className:"p-2 text-center font-mono text-[10px] uppercase tracking-wide text-muted-foreground",children:e})]})}function P9({subType:e}){const[t,n]=x.useState(null);return u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold leading-tight",children:e.deviceType}),u.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:e.devices}),e.sizesImage&&u.jsxs("div",{className:"mt-6",children:[u.jsx("p",{className:"mb-3 font-mono text-xs uppercase tracking-wide text-muted-foreground",children:"Available sizes"}),u.jsxs("div",{className:"overflow-hidden rounded-lg bg-[#111215] p-4",children:[u.jsx("img",{src:e.sizesImage,alt:e.sizesLabel,className:"h-auto w-full"}),u.jsx("p",{className:"mt-3 text-center text-xs text-muted-foreground",children:e.sizesLabel})]})]}),e.materialsImage&&u.jsxs("div",{className:"mt-6",children:[u.jsx("p",{className:"mb-3 font-mono text-xs uppercase tracking-wide text-muted-foreground",children:e.materialsLabel}),u.jsx("div",{className:"overflow-hidden rounded-lg bg-[#111215] p-4",children:u.jsx("img",{src:e.materialsImage,alt:e.materialsLabel,className:"h-auto w-full"})})]}),u.jsxs("div",{className:"mt-8",children:[u.jsx("p",{className:"mb-3 font-mono text-xs uppercase tracking-wide text-muted-foreground",children:"Applications"}),u.jsx("div",{className:"flex flex-wrap gap-4",children:e.applications.map(s=>u.jsx(M9,{label:s.label,image:s.image,onOpen:()=>n(s)},s.label))})]}),u.jsx(N9,{open:t!==null,onOpenChange:s=>!s&&n(null),children:u.jsxs(O9,{className:"max-w-2xl border-none bg-transparent p-0 shadow-none",children:[u.jsx(D9,{className:"sr-only",children:t?.label}),t&&u.jsxs("figure",{className:"overflow-hidden rounded-lg bg-background",children:[u.jsx("img",{src:t.image,alt:t.label,className:"w-full object-contain"}),u.jsx("figcaption",{className:"p-4 text-center font-mono text-xs uppercase tracking-wide text-muted-foreground",children:t.label})]})]})})]})}function L9({intro:e,subTypes:t,epilayerSpecs:n,waferSpecs:s,specsFootnote:i}){return t.length===0?null:u.jsxs("div",{children:[u.jsx(Ge,{as:"p",className:"mb-8 max-w-2xl text-base leading-relaxed text-muted-foreground",children:e}),u.jsxs(Ov,{defaultValue:t[0].id,children:[u.jsx(Dv,{variant:"line",className:"h-auto w-full flex-wrap justify-start gap-1 border-b border-border dark:border-white/10",children:t.map(l=>u.jsx(Mv,{value:l.id,className:"text-sm",children:l.name},l.id))}),t.map(l=>u.jsx(Pv,{value:l.id,className:"pt-8",children:u.jsx(P9,{subType:l})},l.id))]}),u.jsxs("div",{className:"glass-card mt-12 overflow-hidden p-6 md:p-8",children:[u.jsx("h3",{className:"mb-6 text-lg font-semibold",children:"Structure and specification of layers"}),u.jsxs("div",{className:"grid gap-8 md:grid-cols-2",children:[u.jsxs("div",{children:[u.jsx("p",{className:"mb-2 font-mono text-xs uppercase tracking-wide text-primary",children:"Doped Epilayer Specification"}),u.jsx(Q_,{specs:n})]}),u.jsxs("div",{children:[u.jsx("p",{className:"mb-2 font-mono text-xs uppercase tracking-wide text-primary",children:"β-Ga₂O₃ Wafer Specification"}),u.jsx(Q_,{specs:s})]})]}),u.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:i})]})]})}function z9({intro:e,comparison:t,closingNote:n}){return u.jsxs("div",{children:[u.jsx(Ge,{as:"p",className:"mb-8 max-w-2xl text-base leading-relaxed text-muted-foreground",children:e}),u.jsx("div",{className:"glass-card overflow-hidden",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"border-b border-border",children:[u.jsx("th",{className:"p-4 text-left font-mono text-xs uppercase tracking-wide text-muted-foreground",children:"Item"}),t.map(s=>u.jsx("th",{className:"p-4 text-left font-mono text-xs uppercase tracking-wide text-primary",children:s.method},s.method))]})}),u.jsx("tbody",{children:[["Material","material"],["Orientation","orientation"],["Available Sizes","availableSizes"],["Thickness","thickness"],["Resistivity","resistivity"],["XRD FWHM","xrdFwhm"],["Defect Density","defectDensity"],["Surface","surface"]].map(([s,i])=>u.jsxs("tr",{className:"border-b border-border last:border-b-0",children:[u.jsx("td",{className:"p-4 font-mono text-xs uppercase tracking-wide text-muted-foreground",children:s}),t.map(l=>u.jsx("td",{className:"p-4",children:l[i]},l.method))]},s))})]})})}),u.jsx("p",{className:"mt-6 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:n})]})}function I9(){ca("Products");
190const[e,t]=x.useState(null),[n,s]=x.useState(!0),[i,l]=x.useState(null);return x.useEffect(()=>{Nk().then(t).catch(c=>l(c.message)).finally(()=>s(!1))},[]),u.jsxs("section",{className:"relative mx-auto max-w-[1400px] px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:qI}),u.jsxs("div",{className:"relative mb-10",children:[u.jsx(Ge,{as:"p",className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Products"}),u.jsx(Mr,{as:"h1",text:"Epiwafers and substrates",className:"text-3xl font-semibold leading-tight"})]}),n&&u.jsx("div",{className:"relative space-y-6",children:[...Array(3)].map((c,f)=>u.jsx("div",{className:"glass-card h-64 animate-pulse"},f))}),i&&u.jsx("p",{className:"relative rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-sm text-destructive",children:i}),!n&&!i&&e&&u.jsxs("div",{className:"relative",children:[u.jsx(L9,{intro:e.epiwafer_intro,subTypes:e.epiwafer_sub_types,epilayerSpecs:e.epilayer_specs,waferSpecs:e.wafer_specs,specsFootnote:e.specs_footnote}),u.jsxs("div",{className:"mt-16 border-t border-border pt-16",children:[u.jsx("h2",{className:"mb-6 text-2xl font-semibold leading-tight",children:"Substrates"}),u.jsx(z9,{intro:e.substrates_intro,comparison:e.substrate_comparison,closingNote:e.substrates_closing_note})]})]})]})}const B9=[{value:"amber",label:"Amber"},{value:"blue",label:"Blue"},{value:"emerald",label:"Emerald"},{value:"rose",label:"Rose"},{value:"violet",label:"Violet"},{value:"cyan",label:"Cyan"},{value:"orange",label:"Orange"},{value:"pink",label:"Pink"}],nc={amber:"bg-amber-500/15 text-amber-300 border-amber-500/30",blue:"bg-blue-500/15 text-blue-300 border-blue-500/30",emerald:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",rose:"bg-rose-500/15 text-rose-300 border-rose-500/30",violet:"bg-violet-500/15 text-violet-300 border-violet-500/30",cyan:"bg-cyan-500/15 text-cyan-300 border-cyan-500/30",orange:"bg-orange-500/15 text-orange-300 border-orange-500/30",pink:"bg-pink-500/15 text-pink-300 border-pink-500/30"},U9=[{icon:rz,label:"Keynotes & Panels"},{icon:bz,label:"Workshops & Consultations"},{icon:p4,label:"Global Collaboration"}],eE=3,V9=300;function tE(e){return e.replace(/^dr\.?\s*/i,"").trim().toLowerCase()}function $9(e){const t=tE(e);return tC.find(n=>tE(n.name)===t)}function H9(){ca("Conferences");const[e,t]=x.useState([]),[n,s]=x.useState({}
190),[i,l]=x.useState(!0),[c,f]=x.useState(null),[h,m]=x.useState(eE),[g,p]=x.useState(!1),b=x.useRef(null);x.useEffect(()=>{Promise.all([c9(),y9()]).then(([C,A])=>{t(C),s(A)}).catch(C=>f(C.message)).finally(()=>l(!1))},[]);const w=new Date().toISOString().slice(0,10),S=e.filter(C=>C.end_date>=w).sort((C,A)=>C.start_date.localeCompare(A.start_date)),_=S.slice(0,h),E=h<S.length,j=x.useCallback(()=>{p(!0);const C=setTimeout(()=>{m(A=>Math.min(A+eE,S.length)),p(!1)},V9);return()=>clearTimeout(C)},[S.length]);return x.useEffect(()=>{const C=b.current;if(!C||!E)return;const A=new IntersectionObserver(k=>k[0].isIntersecting&&!g&&j(),{rootMargin:"400px"});return A.observe(C),()=>A.disconnect()},[j,E,g]),u.jsxs(u.Fragment,{children:[u.jsx("div",{style:{marginTop:"calc(-1 * var(--site-header-height, 88px))"},children:u.jsx(df,{height:"calc(500px + var(--site-header-height, 88px))",className:"mb-16",children:u.jsxs("div",{className:"relative flex h-full w-full flex-col items-center justify-center gap-4 px-6 text-center",style:{paddingTop:"var(--site-header-height, 88px)"},children:[u.jsx("span",{className:"rounded-full border border-white/20 bg-white/10 px-4 py-1 text-xs font-medium text-white/80 backdrop-blur",children:"Powered by NextGO Epi"}),u.jsx("h1",{className:"max-w-2xl text-4xl font-semibold tracking-tight text-white sm:text-6xl",children:"Events and Conferences"}),u.jsx(Ge,{as:"p",className:"max-w-2xl text-xs text-white/70 sm:text-sm",children:"At NextGO Epi, we believe the most impactful advancements in public health begin with collaboration and the exchange of knowledge. Through conferences, symposiums, workshops, and industry events, we partner with researchers, healthcare professionals, government agencies, and industry leaders to share expertise in genomics, epidemiology, bioinformatics, and emerging public health technologies. Whether delivering keynote presentations, participating in panel discussions, leading technical workshops, or providing strategic consultations, our team is committed to transforming scientific innovation into real-world solutions that improve global health. If you're interested in booking a speaking engagement or scheduling a consultation, we invite you to connect with us and explore how we can contribute to your next event or initiative."}),u.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-4",children:U9.map(({icon:C,label:A},k)=>u.jsxs("div",{className:re("group flex items-center gap-3 rounded-xl border border-white/15 bg-white/[0.06] px-5 py-4 backdrop-blur","transition-all duration-300 ease-out will-change-transform","hover:-translate-y-1.5 hover:scale-[1.02] hover:border-primary/50","motion-reduce:transition-none motion-reduce:hover:translate-y-0 motion-reduce:hover:scale-100"),style:{boxShadow:"0 0 0 rgba(234, 179, 8, 0)",transition:"box-shadow 300ms ease-out, transform 300ms ease-out"},onMouseEnter:D=>D.currentTarget.style.boxShadow="0 8px 32px rgba(234, 179, 8, 0.25)",onMouseLeave:D=>D.currentTarget.style.boxShadow="0 0 0 rgba(234, 179, 8, 0)",children:[u.jsxs("div",{className:"relative flex size-10 shrink-0 items-center justify-center",children:[u.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-300 group-hover:opacity-100",children:u.jsx(Jy,{size:40,duration:8+k*1.5,startAngle:k*90,reverse:k%2===1})}),u.jsx(C,{className:"relative z-10 size-5 text-primary",strokeWidth:2})]}),u.jsx("span",{className:"font-mono text-sm text-white",children:A})]},A))})]})})}),u.jsxs("section",{className:"relative mx-auto max-w-[1400px] px-6 pb-16 md:px-12 md:pb-24",children:[u.jsx(Ft,{src:GI}),c&&u.jsx("p",{className:"relative rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-sm text-destructive",children:c}),i&&u.jsx("div",{className:"relative space-y-6",children:[...Array(3)].map((C,A)=>u.jsx("div",{className:"glass-card h-64 animate-pulse"},A))}),!i&&!c&&u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"relative mb-4 font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Upcoming events"}),S.length===0?u.jsx("div",{className:"glass-card relative p-8 text-center",children:u.jsx("p",{className:"text-sm text-muted-foreground",children:"No upcoming events."})}):u.jsx("div",{className:"relative space-y-6",children:_.map(C=>u.jsx(G9,{conference:C,tags:n[C.id]??[]},C.id))}),S.length>0&&u.jsxs("div",{ref:b,className:"relative mt-10 flex justify-center",children:[g&&u.jsx($y,{className:"size-6 animate-spin text-primary"}),!E&&!g&&u.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:"You've reached the end."})]})]})]})]})}function G9({conference:e,tags:t}){const n=Md(e.start_date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),s=Md(e.end_date).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),i=t.map(l=>({tag:l,founder:$9(l.name)}
190)).filter(l=>!!l.founder);return u.jsxs("div",{className:"glass-card relative overflow-hidden p-6 shadow-lg transition-shadow duration-300 hover:shadow-xl md:p-8",children:[i.length>0&&u.jsx("div",{className:"absolute right-5 top-5 z-10 flex -space-x-3 md:right-7 md:top-7",children:i.map(({founder:l},c)=>u.jsx("img",{src:l.photo,alt:l.name,title:l.name,className:"size-10 rounded-full border-2 border-card object-cover shadow-md dark:border-white/10",style:{zIndex:i.length-c}},l.name))}),u.jsxs("div",{className:"mb-3 flex items-center gap-2 font-mono text-sm text-muted-foreground",children:[u.jsx(uf,{className:"size-4 text-primary"}),u.jsx("span",{children:n===s?n:`${n} – ${s}`})]}),u.jsx("h3",{className:"pr-16 text-xl font-semibold leading-tight md:pr-20 md:text-2xl",children:e.title}),t.length>0&&u.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:t.map(l=>u.jsx("span",{className:re("rounded-md border px-2.5 py-1 font-mono text-xs uppercase tracking-wide",nc[l.color]),children:l.name},l.id))}),e.image_path&&u.jsx("div",{className:"mt-5 overflow-hidden rounded-lg",children:u.jsx("img",{src:e.image_path,alt:"",className:"aspect-[16/9] w-full object-cover"})}),(e.venue||e.location)&&u.jsxs("p",{className:"mt-5 flex items-center gap-2 font-mono text-sm text-muted-foreground",children:[u.jsx(Rj,{className:"size-4 shrink-0 text-primary"}),[e.venue,e.location].filter(Boolean).join(", ")]}),u.jsx("p",{className:"mt-3 whitespace-pre-line text-base leading-relaxed text-muted-foreground",children:e.description}),e.external_url&&u.jsxs("a",{href:e.external_url,target:"_blank",rel:"noopener noreferrer",className:"mt-5 flex items-center gap-2 border-t border-border pt-4 font-mono text-sm text-primary transition-colors hover:text-primary/80",children:[u.jsx(By,{className:"size-4"})," Event website / registration"]})]})}function q9(){const{id:e}=kE(),[t,n]=x.useState(null),[s,i]=x.useState([]),[l,c]=x.useState(!0),[f,h]=x.useState(null);if(ca(t?t.title:"Conferences"),x.useEffect(()=>{e&&u9(e).then(p=>{if(!p||p.status!=="published"){h("This event is not available.");return}return n(p),Rk(p.id).then(i)}).catch(()=>h("This event is not available.")).finally(()=>c(!1))},[e]),l)return u.jsx("section",{className:"mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:u.jsx("div",{className:"glass-card h-64 animate-pulse"})});if(f||!t)return u.jsxs("section",{className:"mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:[u.jsxs(Gt,{to:"/conferences",className:"mb-6 inline-flex items-center gap-2 font-mono text-xs text-muted-foreground hover:text-foreground",children:[u.jsx(ql,{className:"size-3.5"})," Back to conferences"]}),u.jsx("p",{className:"text-muted-foreground",children:f??"Event not found."})]});const m=Md(t.start_date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),g=Md(t.end_date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return u.jsxs("article",{className:"mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:[u.jsxs(Gt,{to:"/conferences",className:"mb-8 inline-flex items-center gap-2 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",children:[u.jsx(ql,{className:"size-3.5"})," Back to conferences"]}),u.jsx("p",{className:"mb-[18px] font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Conference"}),u.jsx("h1",{className:"text-3xl font-semibold leading-tight md:text-4xl",children:t.title}),s.length>0&&u.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:s.map(p=>u.jsx("span",{className:`rounded-md border px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide ${nc[p.color]}`,children:p.name},p.id))}),u.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 font-mono text-sm text-muted-foreground",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(t4,{className:"size-3.5 text-primary"}),m===g?m:`${m} – ${g}`]}),(t.venue||t.location)&&u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(Rj,{className:"size-3.5 text-primary"}
190),[t.venue,t.location].filter(Boolean).join(", ")]})]}),t.external_url&&u.jsx(Pe,{asChild:!0,variant:"outline",className:"mt-6",children:u.jsxs("a",{href:t.external_url,target:"_blank",rel:"noopener noreferrer",children:[u.jsx(By,{className:"size-4"})," Visit event website"]})}),t.image_path&&u.jsx("div",{className:"mt-8 overflow-hidden rounded-xl border border-border dark:border-white/10",children:u.jsx("img",{src:t.image_path,alt:"",className:"aspect-[16/9] w-full object-cover"})}),u.jsx("div",{className:"mt-10",children:u.jsx("p",{className:"whitespace-pre-line text-base leading-relaxed text-foreground/90",children:t.description})})]})}function F9(){const e=_j();return u.jsxs("div",{className:"relative mx-auto mb-8 flex h-32 w-32 items-center justify-center",children:[u.jsx("div",{className:"absolute inset-0 rounded-full border border-primary/15"}),u.jsx("div",{className:"absolute inset-3 rounded-full border border-primary/10"}),!e&&u.jsx(co.div,{className:"absolute inset-0",animate:{rotate:360},transition:{duration:14,repeat:1/0,ease:"linear"},children:u.jsxs("span",{className:"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2",children:[u.jsx("span",{className:"absolute -inset-1.5 rounded-full bg-primary/30 blur-sm"}),u.jsx("span",{className:"relative block h-2 w-2 rounded-full bg-primary"})]})}),u.jsx("div",{className:"glass-card relative z-10 flex h-16 w-16 items-center justify-center rounded-full",children:u.jsx(az,{className:"h-6 w-6 text-primary"})})]})}function jl({label:e,children:t}){return u.jsxs("div",{className:"border-t border-border pt-6 first:border-t-0 first:pt-0 dark:border-white/10",children:[u.jsx("p",{className:"mb-3 font-mono text-xs uppercase tracking-[0.12em] text-primary",children:e}),u.jsx("div",{className:"space-y-3 text-sm leading-relaxed text-muted-foreground",children:t})]})}function K9(){return ca("Impressum"),u.jsxs("section",{className:"relative mx-auto max-w-3xl px-6 py-16 md:px-12 md:py-24",children:[u.jsx(Ft,{src:$I}),u.jsxs("div",{className:"mb-12 text-center",children:[u.jsx(F9,{}),u.jsx(Ge,{as:"h1",className:"text-3xl font-semibold leading-tight md:text-4xl",children:"Impressum"})]}),u.jsx("div",{className:"glass-card overflow-hidden p-8 md:p-12",children:u.jsxs("div",{className:"space-y-6",children:[u.jsxs(jl,{label:"Company",children:[u.jsx("p",{className:"text-base font-semibold text-foreground",children:"NextGO Epi GmbH"}),u.jsx("p",{className:"font-mono text-sm",children:"Max-Born-Str. 2"}),u.jsx("p",{className:"font-mono text-sm",children:"12489 Berlin"}),u.jsx("p",{className:"font-mono text-sm",children:u.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})}),u.jsx("p",{className:"font-mono text-sm",children:"+49 (30) 246499 313"})]}),u.jsxs(jl,{label:"Register of Companies",children:[u.jsx("p",{children:"Registered with the Amtsgericht Berlin-Charlottenburg (Berlin-Charlottenburg Local Court)"}),u.jsx("p",{className:"font-mono text-foreground",children:"Register Number: HRB 274637 B"})]}),u.jsx(jl,{label:"Representation and form of organization",children:u.jsx("p",{children:"NextGO Epi GmbH is represented by its Managing Director, Dr. Ta-Shun Chou."})}),u.jsx(jl,{label:"VAT ID number",children:u.jsx("p",{className:"font-mono text-foreground",children:"DE455290236"})}),u.jsxs(jl,{label:"Disclaimer of liability",children:[u.jsx("p",{children:"NextGO Epi GmbH makes every effort to ensure that the information provided on its website is accurate and up to date. Nevertheless, errors and ambiguities cannot be completely ruled out. NextGO Epi GmbH shall therefore not be liable for the up-to-dateness, accuracy, completeness, or quality of the information provided."}),u.jsx("p",{children:"NextGO Epi GmbH shall not be liable for any material or non-material damage caused directly or indirectly by the use or non-use of the information provided, or by the use of incorrect or incomplete information, unless it can be proven that NextGO Epi GmbH acted with intent or gross negligence. The same applies to software available for download free of charge."}),u.jsx("p",{children:"NextGO Epi GmbH reserves the right to modify, supplement, or delete this website – in part or in 
190whole – or to discontinue the publication temporarily or permanently without further notice."}),u.jsx("p",{children:"Responsibility for “third-party content” that is made available, for example, by direct or indirect links (hyperlinks) to other providers, requires, among other things, actual knowledge of illegal or punishable content. “Third-party content” is marked accordingly. NextGO Epi GmbH has no control whatsoever over “third-party content,” nor does it endorse such content. NextGO Epi GmbH has no actual knowledge of any illegal or offensive content on the linked websites of third-party providers. Should the linked websites of third-party providers contain illegal or offensive content nonetheless, NextGO Epi GmbH expressly disassociates itself from such content."})]})]})})]})}const Ok=x.createContext(void 0);function W9({children:e}){const[t,n]=x.useState(null),[s,i]=x.useState(null),[l,c]=x.useState(!0),f=async b=>{const{data:w,error:S}=await Te.from("admins").select("id, user_id, email, full_name, role, invited_by, created_at").eq("user_id",b).maybeSingle();if(S){i(null);return}i(w)};x.useEffect(()=>{let b=!0;Te.auth.getSession().then(({data:S})=>{b&&(n(S.session),S.session?.user?f(S.session.user.id).finally(()=>b&&c(!1)):c(!1))});const{data:w}=Te.auth.onAuthStateChange((S,_)=>{(async()=>(n(_),_?.user?await f(_.user.id):i(null),c(!1)))()});return()=>{b=!1,w.subscription.unsubscribe()}},[]);const h=async(b,w)=>{const{error:S}=await Te.auth.signInWithPassword({email:b,password:w});return S?{error:S.message??"Sign-in failed. Please check your credentials."}:{error:null}},m=async()=>{await Te.auth.signOut(),i(null),n(null)},g=async()=>{t?.user&&await f(t.user.id)},p=x.useMemo(()=>({session:t,user:t?.user??null,admin:s,role:s?.role??null,loading:l,signIn:h,signOut:m,refreshAdmin:g}),[t,s,l]);return u.jsx(Ok.Provider,{value:p,children:e})}function If(){const e=x.useContext(Ok);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function Y9({className:e,...t}){return u.jsx(gV,{"data-slot":"label",className:re("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const X9=ff("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function Ie({className:e,orientation:t="vertical",...n}){return u.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:re(X9({orientation:t}),e),...n})}function Be({className:e,...t}){return u.jsx(Y9,{"data-slot":"field-label",className:re("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",e),...t})}function ao({className:e,...t}){return u.jsx("p",{"data-slot":"field-description",className:re("text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function Dk({className:e,children:t,errors:n,...s}){const i=x.useMemo(()=>
190{if(t)return t;if(!n?.length)return null;const l=[...new Map(n.map(c=>[c?.message,c])).values()];return l?.length==1?l[0]?.message:u.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:l.map((c,f)=>c?.message&&u.jsx("li",{children:c.message},f))})},[t,n]);return i?u.jsx("div",{role:"alert","data-slot":"field-error",className:re("text-sm font-normal text-destructive",e),...s,children:i}):null}const J9="/images/section-backgrounds/plexus-amber-blue.jpg";function Z9(){const{signIn:e,session:t,admin:n,loading:s}=If(),i=sc(),[l,c]=x.useState(""),[f,h]=x.useState(""),[m,g]=x.useState(!1),[p,b]=x.useState(null),[w,S]=x.useState(!1);if(s)return null;if(t&&n)return u.jsx(Qd,{to:"/admin",replace:!0});const _=async E=>{E.preventDefault(),b(null),S(!0);const{error:j}=await e(l.trim(),f);if(S(!1),j){b(j);return}i("/admin")};return u.jsxs("div",{className:"relative flex min-h-svh items-center justify-center bg-background px-6 py-16",children:[u.jsx(Ft,{src:J9}),u.jsxs("div",{className:"relative w-full max-w-sm",children:[u.jsxs("div",{className:"mb-8 flex flex-col items-center gap-3 text-center",children:[u.jsxs("span",{className:"flex items-center gap-2.5 dark:hidden",children:[u.jsx(us,{className:"size-7 text-primary"}),u.jsx("span",{className:"text-xl font-semibold tracking-tight",children:"NextGO Epi"})]}),u.jsx("img",{src:"/images/company/nextgoepi-logo-white.png",alt:"NextGO Epi",className:"hidden h-12 w-auto dark:block"}),u.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Admin Control Panel"})]}),u.jsx("div",{className:"glass-card overflow-hidden p-8 shadow-lg",children:u.jsxs("form",{onSubmit:_,className:"space-y-5",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"email",children:"Email"}),u.jsx(Xe,{id:"email",type:"email",autoComplete:"email",required:!0,value:l,onChange:E=>c(E.target.value),placeholder:"[email protected]"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"password",children:"Password"}),u.jsxs("div",{className:"relative",children:[u.jsx(Xe,{id:"password",type:m?"text":"password",autoComplete:"current-password",required:!0,value:f,onChange:E=>h(E.target.value),className:"pr-10"}),u.jsx("button",{type:"button",onClick:()=>g(E=>!E),className:"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground transition-colors hover:text-foreground","aria-label":m?"Hide password":"Show password",children:m?u.jsx(Aj,{className:"size-4"}):u.jsx(Nj,{className:"size-4"})})]})]}),p&&u.jsx(Dk,{children:p==="Invalid login credentials"?"Wrong email or password. Please try again.":p}),u.jsxs(Pe,{type:"submit",size:"lg",disabled:w,className:"w-full",children:[u.jsx(kj,{className:"size-4"}),w?"Signing in...":"Sign in"]})]})}),u.jsx("div",{className:"mt-6 text-center",children:u.jsx(Gt,{to:"/",className:"font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",children:"← Back to site"})})]})]})}const Q9="/images/section-backgrounds/plexus-amber-blue.jpg",Yp=8,eq=typeof window<"u"&&window.location.hash.includes("type=invite");function tq(){const{session:e,admin:t,loading:n,signOut:s}=If(),i=sc(),[l,c]=x.useState(""),[f,h]=x.useState(""),[m,g]=x.useState(!1),[p,b]=x.useState(null),[w,S]=x.useState(!1);if(n)return null;if(e&&t?.role&&!eq)return u.jsx(Qd,{to:"/admin",replace:!0});const _=async E=>{if(E.preventDefault(),b(null),l.length<Yp){b(`Password must be at least ${Yp} characters.`);return}if(l!==f){b("Passwords don't match.");return}S(!0);const{error:j}=await Te.auth.updateUser({password:l});if(S(!1),j){b(j.message);return}i("/admin",{replace:!0})};return u.jsxs("div",{className:"relative flex min-h-svh items-center justify-center bg-background px-6 py-16",children:[u.jsx(Ft,{src:Q9}),u.jsxs("div",{className:"relative w-full max-w-sm",children:[u.jsxs("div",{className:"mb-8 flex flex-col items-center gap-3 text-center",children:[u.jsxs("span",{className:"flex items-center gap-2.5 dark:hidden",children:[u.jsx(us,{className:"size-7 text-primary"}),u.jsx("span",{className:"text-xl font-semibold tracking-tight",children:"NextGO Epi"})]}),u.jsx("img",{src:"/images/company/nextgoepi-logo-white.png",alt:"NextGO Epi",className:"hidden h-12 w-auto dark:block"}),u.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-primary",children:"Admin Control Panel"})]}),u.jsx("div",{className:"glass-card overflow-hidden p-8 shadow-lg",children:e?u.jsxs("form",{onSubmit:_,className:"space-y-5",children:[u.jsxs("div",{className:"space-y-1 text-center",children:[u.jsxs("p",{className:"text-sm font-medium",children:["Welcome",t?.full_name?`, ${t.full_name}`:""]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Set a password to finish setting up your account."})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"password",children:"New password"}),u.jsxs("div",{className:"relative",children:[u.jsx(Xe,{id:"password",type:m?"text":"password",autoComplete:"new-password",required:!0,value:l,onCh
190ange:E=>c(E.target.value),className:"pr-10"}),u.jsx("button",{type:"button",onClick:()=>g(E=>!E),className:"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground transition-colors hover:text-foreground","aria-label":m?"Hide password":"Show password",children:m?u.jsx(Aj,{className:"size-4"}):u.jsx(Nj,{className:"size-4"})})]}),u.jsxs(ao,{children:["At least ",Yp," characters."]})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"confirm-password",children:"Confirm password"}),u.jsx(Xe,{id:"confirm-password",type:m?"text":"password",autoComplete:"new-password",required:!0,value:f,onChange:E=>h(E.target.value)})]}),p&&u.jsx(Dk,{children:p}),u.jsxs(Pe,{type:"submit",size:"lg",disabled:w,className:"w-full",children:[u.jsx(kj,{className:"size-4"}),w?"Saving...":"Set password and continue"]}),u.jsx("button",{type:"button",onClick:()=>s(),className:"block w-full text-center font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",children:"Not you? Sign out"})]}):u.jsxs("div",{className:"space-y-4 text-center",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"This invite link is invalid or has expired. Ask a Super Admin to send you a new one."}),u.jsx(Pe,{asChild:!0,size:"lg",className:"w-full",children:u.jsx(Gt,{to:"/admin/login",children:"Back to sign in"})})]})})]})]})}const Xp=768;function nq(){const[e,t]=x.useState(void 0);return x.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Xp-1}px)`),s=()=>{t(window.innerWidth<Xp)};return n.addEventListener("change",s),t(window.innerWidth<Xp),()=>n.removeEventListener("change",s)},[]),!!e}function rq({...e}){return u.jsx(dv,{"data-slot":"sheet",...e})}function sq({...e}){return u.jsx(fv,{"data-slot":"sheet-portal",...e})}function aq({className:e,...t}){return u.jsx(hv,{"data-slot":"sheet-overlay",className:re("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function iq({className:e,children:t,side:n="right",showCloseButton:s=!0,...i}){return u.jsxs(sq,{children:[u.jsx(aq,{}),u.jsxs(mv,{"data-slot":"sheet-content",className:re("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",n==="right"&&"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",n==="left"&&"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",n==="top"&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",n==="bottom"&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...i,children:[t,s&&u.jsxs(wf,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(Dr,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function oq({className:e,...t}){return u.jsx("div",{"data-slot":"sheet-header",className:re("flex flex-col gap-1.5 p-4",e),...t})}function lq({className:e,...t}){return u.jsx(pv,{"data-slot":"sheet-title",className:re("font-semibold text-foreground",e),...t})}function cq({className:e,...t}){return u.jsx(eA,{"data-slot":"sheet-description",className:re("text-sm text-muted-foreground",e),...t})}function uq({delayDuration:e=0,...t}){return u.jsx(T$,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function dq({...e}){return u.jsx(j$,{"data-slot":"tooltip",...e})}function fq({...e}){return u.jsx(C$,{"data-slot":"tooltip-trigger",...e})}function hq({className:e,sideOffset:t=0,children:n,...s}){return u.jsx(A$,{children:u.jsxs(N$,{"data-slot":"tooltip-content",sideOffset:t,className:re("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
190de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...s,children:[n,u.jsx(k$,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}const mq="sidebar_state",pq=3600*24*7,gq="16rem",yq="18rem",vq="3rem",bq="b",Mk=x.createContext(null);function Bf(){const e=x.useContext(Mk);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function xq({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:i,children:l,...c}){const f=nq(),[h,m]=x.useState(!1),[g,p]=x.useState(e),b=t??g,w=x.useCallback(j=>{const C=typeof j=="function"?j(b):j;n?n(C):p(C),document.cookie=`${mq}=${C}; path=/; max-age=${pq}`},[n,b]),S=x.useCallback(()=>f?m(j=>!j):w(j=>!j),[f,w,m]);x.useEffect(()=>{const j=C=>{C.key===bq&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),S())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[S]);const _=b?"expanded":"collapsed",E=x.useMemo(()=>({state:_,open:b,setOpen:w,isMobile:f,openMobile:h,setOpenMobile:m,toggleSidebar:S}),[_,b,w,f,h,m,S]);return u.jsx(Mk.Provider,{value:E,children:u.jsx(uq,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":gq,"--sidebar-width-icon":vq,...i},className:re("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...c,children:l})})})}function wq({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:i,...l}){const{isMobile:c,state:f,openMobile:h,setOpenMobile:m}=Bf();return n==="none"?u.jsx("div",{"data-slot":"sidebar",className:re("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...l,children:i}):c?u.jsx(rq,{open:h,onOpenChange:m,...l,children:u.jsxs(iq,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yq},side:e,children:[u.jsxs(oq,{className:"sr-only",children:[u.jsx(lq,{children:"Sidebar"}),u.jsx(cq,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):u.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:re("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:re("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...l,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:i})})]})}function Sq({className:e,onClick:t,...n}){const{toggleSidebar:s}=Bf();return u.jsxs(Pe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:re("size-7",e),onClick:i=>{t?.(i),s()},...n,children:[u.jsx(X4,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function _q({className:e,...t}){const{toggleSidebar:n}=Bf();return u.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:re("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Eq({className:e,...t}){return u.jsx("main",{"data-slot":"sidebar-inset",className:re("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function Tq({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:re("flex flex-col gap-2 p-2",e),...t})}function jq({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:re("flex flex-col gap-2 p-2",e),...t})}function Cq({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:re("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Aq({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:re("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Nq({className:e,asChild:t=!1,...n}){const s=t?Zy:"div";return u.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:re("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground
190/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function nE({className:e,...t}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:re("flex w-full min-w-0 flex-col gap-1",e),...t})}function rE({className:e,...t}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:re("group/menu-item relative",e),...t})}const kq=ff("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function sE({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:i,className:l,...c}){const f=e?Zy:"button",{isMobile:h,state:m}=Bf(),g=u.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":t,className:re(kq({variant:n,size:s}),l),...c});return i?(typeof i=="string"&&(i={children:i}),u.jsxs(dq,{children:[u.jsx(fq,{asChild:!0,children:g}),u.jsx(hq,{side:"right",align:"center",hidden:m!=="collapsed"||h,...i})]})):g}function Rq({className:e,size:t="default",...n}){return u.jsx(BU,{"data-slot":"avatar","data-size":t,className:re("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...n})}function Oq({className:e,...t}){return u.jsx(UU,{"data-slot":"avatar-fallback",className:re("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}const Dq=[{to:"/admin",label:"Dashboard",icon:P4,end:!0},{to:"/admin/research",label:"Research Papers",icon:Uy,end:!1},{to:"/admin/news",label:"News",icon:Gy,end:!1},{to:"/admin/products",label:"Products",icon:us,end:!1},{to:"/admin/conferences",label:"Conferences",icon:uf,end:!1},{to:"/admin/tags",label:"Tags",icon:Oj,end:!1},{to:"/admin/staff",label:"Staff",icon:Mj,end:!1}];function Mq(){const{session:e,admin:t,loading:n,signOut:s}=If(),i=sc();if(n)return null;if(!e||!t)return u.jsx(Qd,{to:"/admin/login",replace:!0});const l=async()=>{await s(),i("/admin/login")},c=t.full_name.split(" ").map(f=>f[0]).slice(0,2).join("").toUpperCase();return u.jsxs(xq,{children:[u.jsxs(wq,{collapsible:"icon",children:[u.jsx(Tq,{children:u.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[u.jsx(us,{className:"size-5 shrink-0 text-primary"}),u.jsxs("div",{className:"flex flex-col group-data-[collapsible=icon]:hidden",children:[u.jsx("span",{className:"text-sm font-semibold leading-tight",children:"NextGO Epi"}),u.jsx("span",{className:"text-xs text-muted-foreground",children:"Control Panel"})]})]})}),u.jsx(Cq,{children:u.jsxs(Aq,{children:[u.jsx(Nq,{children:"Content"}),u.jsx(nE,{children:Dq.map(f=>{const h=f.icon;return u.jsx(rE,{children:u.jsx(sE,{asChild:!0,isActive:!1,children:u.jsxs(PE,{to:f.to,end:f.end,children:[u.jsx(h,{className:"size-4"}),u.jsx("span",{children:f.label})]})})},f.to)})})]})}),u.jsxs(jq,{children:[u.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 group-data-[collapsible=icon]:justify-center",children:[u.jsx(Rq,{className:"size-7",children:u.jsx(Oq,{className:"bg-primary/15 text-xs text-primary",children:c})}),u.jsxs("div",{className:"flex flex-col group-data-[collapsible=icon]:hidden",children:[u.jsx("span",{className:"text-xs font-medium leading-tight",children:t.full_name}),u.jsx("span",{className:"text-[11px] text-muted-foreground",children:t.role.replace("_"," ")})]})]}),u.jsx(nE,{children:u.jsx(rE,{children:u.jsx(sE,{asChild:!0,children:u.jsxs(Pe,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:l,children:[u.jsx(V4,{className:"size-4"}),u.jsx("span",{children:"Sign out"})]})})})})]}),u.jsx(_q,{})]}),u.jsxs(Eq,{children:[u.jsxs("header",{className:"flex h-14 items-center gap-3 border-b bg-background/80 px-6 backdrop-blur",children:[u.jsx(Sq,{}),u.jsx("div",{className:"flex-1"}),u.jsx("a",{href:"/",className:"font-mono text-xs text-muted-foreground transition-colors hover:text-foreground",children:"View site →"})]}),u.jsx("div",{className:"flex-1 p-6",children:u.jsx(rD,{})})]})]})}function Lt({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:re("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Jt({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:re("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Zt({className:e,...t}){return u.jsx("div",{"data-slot":"card-title",className:re("leading-none font-semibold",e),...t})}function zt({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:re("px-6",e),...t})}function Pq(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Lq=e=>{switch(e){case"success":return Bq;case"info":return Vq;case"warning":return Uq;case"error":return $q;default:return null}},zq=Array(12).fill(0),Iq=({visible:e,className:t})=>te.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 6,040 bytes, line 190
190Boolean).join(" "),"data-visible":e},te.createElement("div",{className:"sonner-spinner"},zq.map((n,s)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Bq=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Uq=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Vq=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),$q=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Hq=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Gq=()=>{const[e,t]=te.useState(document.hidden);return te.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ey=1;class qq{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:s,...i}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ey++,c=this.toasts.find(h=>h.id===l),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:s}),{...h,...t,id:l,dismissible:f,title:s}):h):this.addToast({title:s,...i,dismissible:f,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let l=s!==void 0,c;const f=i.then(async m=>{if(c=["resolve",m],te.isValidElement(m))l=!1,this.create({id:s,type:"default",message:m});else if(Kq(m)&&!m.ok){l=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${m.status}`):n.error,b=typeof n.description=="function"?await n.description(`HTTP error! status: ${m.status}`):n.description,S=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:b,...S})}else if(m instanceof Error){l=!1;const p=typeof n.error=="function"?await n.error(m):n.error,b=typeof n.description=="function"?await n.description(m):n.description,S=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:b,...S})}else if(n.success!==void 0){l=!1;const p=typeof n.success=="function"?await n.success(m):n.success,b=typeof n.description=="function"?await n.description(m):n.description,S=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:s,type:"success",description:b,...S})}}).catch(async m=>{if(c=["reject",m],n.error!==void 0){l=!1;const g=typeof n.error=="function"?await n.error(m):n.error,p=typeof n.description=="function"?await n.description(m):n.description,w=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:p,...w})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),n.finally==null||n.finally.call(n)}),h=()=>new Promise((m,g)=>f.then(()=>c[0]==="reject"?g(c[1]):m(c[1])).catch(g));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(t,n)=>{const s=n?.id||ey++;return this.create({jsx:t(s),id:s,...n}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const yn=new qq,Fq=(e,t)=>{const n=t?.id||ey++;return yn.addToast({title:e,...t,id:n}),n},Kq=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Wq=Fq,Yq=()=>yn.toasts,Xq=()=>yn.getActiveToasts(),qe=Object.assign(Wq,{success:yn.success,info:yn.info,warning:yn.warning,error:yn.error,custom:yn.custom,message:yn.message,promise:yn.promise,dismiss:yn.dismiss,loading:yn.loading},{getHistory:Yq,getToasts:Xq});Pq
vendor: 14,873 bytes, line 190
190("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 948 bytes, line 190
190ed(e){return e.label!==void 0}const Jq=3,Zq="24px",Qq="16px",aE=4e3,eF=356,tF=14,nF=45,rF=200;function _r(...e){return e.filter(Boolean).join(" ")}function sF(e){const[t,n]=e.split("-"),s=[];return t&&s.push(t),n&&s.push(n),s}const aF=e=>{var t,n,s,i,l,c,f,h,m;const{invert:g,toast:p,unstyled:b,interacting:w,setHeights:S,visibleToasts:_,heights:E,index:j,toasts:C,expanded:A,removeToast:k,defaultRichColors:D,closeButton:B,style:L,cancelButtonStyle:P,actionButtonStyle:U,className:z="",descriptionClassName:Y="",duration:se,position:de,gap:fe,expandByDefault:ce,classNames:M,icons:F,closeButtonAriaLabel:X="Close toast"}=e,[oe,ee]=te.useState(null),[O,K]=te.useState(null),[Z,ne]=te.useState(!1),[ie,ue]=te.useState(!1),[ae,he]=te.useState(!1),[ve,Oe]=te.useState(!1),[De,Ue]=te.useState(!1),[yt,lt]=te.useState(0),[zr,gr]=te.useState(0),Wn=te.useRef(p.duration||se||aE),jo=te.useRef(null),bn=te.useRef(null),Co=j===0,Ao=j+1<=_,Qt=p.type,ys=p.dism
vendor: 5,366 bytes, line 190
190issible!==!1,en=p.className||"",Vf=p.descriptionClassName||"",ha=te.useMemo(()=>E.findIndex(Ce=>Ce.toastId===p.id)||0,[E,p.id]),gc=te.useMemo(()=>{var Ce;return(Ce=p.closeButton)!=null?Ce:B},[p.closeButton,B]),ma=te.useMemo(()=>p.duration||se||aE,[p.duration,se]),No=te.useRef(0),Ir=te.useRef(0),yc=te.useRef(0),vs=te.useRef(null),[pa,tn]=de.split("-"),Yn=te.useMemo(()=>E.reduce((Ce,ct,Ot)=>Ot>=ha?Ce:Ce+ct.height,0),[E,ha]),Kt=Gq(),$f=p.invert||g,ko=Qt==="loading";Ir.current=te.useMemo(()=>ha*fe+Yn,[ha,Yn]),te.useEffect(()=>{Wn.current=ma},[ma]),te.useEffect(()=>{ne(!0)},[]),te.useEffect(()=>{const Ce=bn.current;if(Ce){const ct=Ce.getBoundingClientRect().height;return gr(ct),S(Ot=>[{toastId:p.id,height:ct,position:p.position},...Ot]),()=>S(Ot=>Ot.filter(Wt=>Wt.toastId!==p.id))}},[S,p.id]),te.useLayoutEffect(()=>{if(!Z)return;const Ce=bn.current,ct=Ce.style.height;Ce.style.height="auto";const Ot=Ce.getBoundingClientRect().height;Ce.style.height=ct,gr(Ot),S(Wt=>Wt.find(ft=>ft.toastId===p.id)?Wt.map(ft=>ft.toastId===p.id?{...ft,height:Ot}:ft):[{toastId:p.id,height:Ot,position:p.position},...Wt])},[Z,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const yr=te.useCallback(()=>{ue(!0),lt(Ir.current),S(Ce=>Ce.filter(ct=>ct.toastId!==p.id)),setTimeout(()=>{k(p)},rF)},[p,k,S,Ir]);te.useEffect(()=>{if(p.promise&&Qt==="loading"||p.duration===1/0||p.type==="loading")return;let Ce;return A||w||Kt?(()=>{if(yc.current<No.current){const Wt=new Date().getTime()-No.current;Wn.current=Wn.current-Wt}yc.current=new Date().getTime()})():Wn.current!==1/0&&(No.current=new Date().getTime(),Ce=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),yr()},Wn.current)),()=>clearTimeout(Ce)},[A,w,p,Qt,Kt,yr]),te.useEffect(()=>{p.delete&&(yr(),p.onDismiss==null||p.onDismiss.call(p,p))},[yr,p.delete]);function Za(){var Ce;if(F?.loading){var ct;return te.createElement("div",{className:_r(M?.loader,p==null||(ct=p.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":Qt==="loading"},F.loading)}return te.createElement(Iq,{className:_r(M?.loader,p==null||(Ce=p.classNames)==null?void 0:Ce.loader),visible:Qt==="loading"})}const Qa=p.icon||F?.[Qt]||Lq(Qt);var ga,vr;return te.createElement("li",{tabIndex:0,ref:bn,className:_r(z,en,M?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,M?.default,M?.[Qt],p==null||(n=p.classNames)==null?void 0:n[Qt]),"data-sonner-toast":"","data-rich-colors":(ga=p.richColors)!=null?ga:D,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":Z,"data-promise":!!p.promise,"data-swiped":De,"data-removed":ie,"data-visible":Ao,"data-y-position":pa,"data-x-position":tn,"data-index":j,"data-front":Co,"data-swiping":ae,"data-dismissible":ys,"data-type":Qt,"data-invert":$f,"data-swipe-out":ve,"data-swipe-direction":O,"data-expanded":!!(A||ce&&Z),"data-testid":p.testId,style:{"--index":j,"--toasts-before":j,"--z-index":C.length-j,"--offset":`${ie?yt:Ir.current}px`,"--initial-height":ce?"auto":`${zr}px`,...L,...p.style},onDragEnd:()=>{he(!1),ee(null),vs.current=null},onPointerDown:Ce=>{Ce.button!==2&&(ko||!ys||(jo.current=new Date,lt(Ir.current),Ce.target.setPointerCapture(Ce.pointerId),Ce.target.tagName!=="BUTTON"&&(he(!0),vs.current={x:Ce.clientX,y:Ce.clientY})))},onPointerUp:()=>{var Ce,ct,Ot;if(ve||!ys)return;vs.current=null;const Wt=Number(((Ce=bn.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),bs=Number(((ct=bn.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ft=new Date().getTime()-((Ot=jo.current)==null?void 0:Ot.getTime()),an=oe==="x"?Wt:bs,ya=Math.abs(an)/ft;if(Math.abs(an)>=nF||ya>.11){lt(Ir.current),p.onDismiss==null||p.onDismiss.call(p,p),K(oe==="x"?Wt>0?"right":"left":bs>0?"down":"up"),yr(),Oe(!0);return}else{var on,ln;(on=bn.current)==null||on.style.setProperty("--swipe-amount-x","0px"),(ln=bn.current)==null||ln.style.setProperty("--swipe-amount-y","0px")}Ue(!1),he(!1),ee(null)},onPointerMove:Ce=>{var ct,Ot,Wt;if(!vs.current||!ys||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const ft=Ce.clientY-vs.current.y,an=Ce.clientX-vs.current.x;var ya;const on=(ya=e.swipeDirections)!=null?ya:sF(de);!oe&&(Math.abs(an)>1||Math.abs(ft)>1)&&ee(Math.abs(an)>Math.abs(ft)?"x":"y");let ln={x:0,y:0};const ei=Xn=>1/(1.5+Math.abs(Xn)/20);if(oe==="y"){if(on.includes("top")||on.includes("bottom"))if(on.includes("top")&&ft<0||on.includes("bottom")&&ft>0)ln.y=ft;else{const Xn=ft*ei(ft);ln.y=Math.abs(Xn)<Math.abs(ft)?Xn:ft}}else if(oe==="x"&&(on.includes("left")||on.includes("right")))if(on.includes("left")&&an<0||on.includes("right")&&an>0)ln.x=an;else{const Xn=an*ei(an);ln.x=Math.abs(Xn)<Math.abs(an)?Xn:an}(Math.abs(ln.x)>0||Math.abs(ln.y)>0)&&Ue(!0),(Ot=bn.current)==null||Ot.style.setProperty("--swipe-amount-x",`${ln.x}px`),(Wt=bn.current)==null||Wt.style.setProperty("--swipe-amount-y",`${ln.y}px`)}},gc&&!p.jsx&&Qt!=="loading"?te.createElement("button",{"aria-label":X,"data-disabled":ko,"data-close-button":!0,onClick:ko||!ys?()=>{}:()=>{yr(),p.onDismiss==null||p.onDismiss.call(p,p)},className:_r(M?.closeButton,p==null||(s=p.classNames)==null?void 0:s.closeButton)},(vr=F?.close)!=null?vr:Hq):null,(Qt||p.icon||p.promise)&&p.icon!==null&&(F?.[Qt]!==null||p.icon)?te.createElement("div",{"data-icon":"",className:_r(M?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)}
vendor: 6,011 bytes, line 190
190,p.promise||p.type==="loading"&&!p.icon?p.icon||Za():null,p.type!=="loading"?Qa:null):null,te.createElement("div",{"data-content":"",className:_r(M?.content,p==null||(l=p.classNames)==null?void 0:l.content)},te.createElement("div",{"data-title":"",className:_r(M?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?te.createElement("div",{"data-description":"",className:_r(Y,Vf,M?.description,p==null||(f=p.classNames)==null?void 0:f.description)},typeof p.description=="function"?p.description():p.description):null),te.isValidElement(p.cancel)?p.cancel:p.cancel&&ed(p.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:Ce=>{ed(p.cancel)&&ys&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ce),yr())},className:_r(M?.cancelButton,p==null||(h=p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,te.isValidElement(p.action)?p.action:p.action&&ed(p.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||U,onClick:Ce=>{ed(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ce),!Ce.defaultPrevented&&yr())},className:_r(M?.actionButton,p==null||(m=p.classNames)==null?void 0:m.actionButton)},p.action.label):null)};function iE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function iF(e,t){const n={};return[e,t].forEach((s,i)=>{const l=i===1,c=l?"--mobile-offset":"--offset",f=l?Qq:Zq;function h(m){["top","right","bottom","left"].forEach(g=>{n[`${c}-${g}`]=typeof m=="number"?`${m}px`:m})}typeof s=="number"||typeof s=="string"?h(s):typeof s=="object"?["top","right","bottom","left"].forEach(m=>{s[m]===void 0?n[`${c}-${m}`]=f:n[`${c}-${m}`]=typeof s[m]=="number"?`${s[m]}px`:s[m]}):h(f)}),n}const oF=te.forwardRef(function(t,n){const{id:s,invert:i,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:h,className:m,offset:g,mobileOffset:p,theme:b="light",richColors:w,duration:S,style:_,visibleToasts:E=Jq,toastOptions:j,dir:C=iE(),gap:A=tF,icons:k,containerAriaLabel:D="Notifications"}=t,[B,L]=te.useState([]),P=te.useMemo(()=>s?B.filter(Z=>Z.toasterId===s):B.filter(Z=>!Z.toasterId),[B,s]),U=te.useMemo(()=>Array.from(new Set([l].concat(P.filter(Z=>Z.position).map(Z=>Z.position)))),[P,l]),[z,Y]=te.useState([]),[se,de]=te.useState(!1),[fe,ce]=te.useState(!1),[M,F]=te.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=te.useRef(null),oe=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=te.useRef(null),O=te.useRef(!1),K=te.useCallback(Z=>{L(ne=>{var ie;return(ie=ne.find(ue=>ue.id===Z.id))!=null&&ie.delete||yn.dismiss(Z.id),ne.filter(({id:ue})=>ue!==Z.id)})},[]);return te.useEffect(()=>yn.subscribe(Z=>{if(Z.dismiss){requestAnimationFrame(()=>{L(ne=>ne.map(ie=>ie.id===Z.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{zE.flushSync(()=>{L(ne=>{const ie=ne.findIndex(ue=>ue.id===Z.id);return ie!==-1?[...ne.slice(0,ie),{...ne[ie],...Z},...ne.slice(ie+1)]:[Z,...ne]})})})}),[B]),te.useEffect(()=>{if(b!=="system"){F(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:ne})=>{F(ne?"dark":"light")})}catch{Z.addListener(({matches:ie})=>{try{F(ie?"dark":"light")}catch(ue){console.error(ue)}})}},[b]),te.useEffect(()=>{B.length<=1&&de(!1)},[B]),te.useEffect(()=>{const Z=ne=>{var ie;if(c.every(he=>ne[he]||ne.code===he)){var ae;de(!0),(ae=X.current)==null||ae.focus()}ne.code==="Escape"&&(document.activeElement===X.current||(ie=X.current)!=null&&ie.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[c]),te.useEffect(()=>{if(X.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,O.current=!1)}},[X.current]),te.createElement("section",{ref:n,"aria-label":`${D} ${oe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((Z,ne)=>{var ie;const[ue,ae]=Z.split("-");return P.length?te.createElement("ol",{key:Z,dir:C==="auto"?iE():C,tabIndex:-1,ref:X,className:m,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":ue,"data-x-position":ae,style:{"--front-toast-height":`${((ie=z[0])==null?void 0:ie.height)||0}px`,"--width":`${eF}px`,"--gap":`${A}px`,..._,...iF(g,p)},onBlur:he=>{O.current&&!he.currentTarget.contains(he.relatedTarget)&&(O.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||O.current||(O.current=!0,ee.current=he.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{fe||de(!1)},onDragEnd:()=>de(!1),onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||ce(!0)},onPointerUp:()=>ce(!1)},P.filter(he=>!he.position&&ne===0||he.position===Z).map((he,ve)=>{var Oe,De;return te.createElement(aF,{key:he.id,icons:k,index:ve,toast:he,defaultRichColors:w,duration:(Oe=j?.duration)!=null?Oe:S,className:j?.className,descriptionClassName:j?.descriptionClassName,invert:i,visibleToasts:E,closeButton:(De=j?.closeButton)!=null?De:h,interacting:fe,position:Z,style:j?.style,unstyled:j?.unstyled,classNames:j?.classNames,cancelButtonStyle:j?.cancelButtonStyle,actionButtonStyle:j?.actionButtonStyle,closeButtonAriaLabel:j?.closeButtonAriaLabel,removeToast:K,toasts:P.filter(Ue=>Ue.position==he.position),heights:z.filter(Ue=>Ue.position==he.position),setHeights:Y,expandByDefault:f,gap:A,expanded:se,swipeDirections:t.swipeDirections})})):null}))});
190function lF(){const[e,t]=x.useState(null),[n,s]=x.useState(!0);return x.useEffect(()=>{(async()=>{const[i,l,c,f,h,m,g,p]=await Promise.all([Te.from("research_papers").select("id",{count:"exact",head:!0}).eq("status","published"),Te.from("research_papers").select("id",{count:"exact",head:!0}).eq("status","draft"),Te.from("news").select("id",{count:"exact",head:!0}).eq("status","published"),Te.from("news").select("id",{count:"exact",head:!0}).eq("status","draft"),Te.from("conferences").select("id",{count:"exact",head:!0}).eq("status","published"),Te.from("conferences").select("id",{count:"exact",head:!0}).eq("status","draft"),Te.from("tags").select("id",{count:"exact",head:!0}),Te.from("admins").select("id",{count:"exact",head:!0})]);t({research:{published:i.count??0,draft:l.count??0},news:{published:c.count??0,draft:f.count??0},conferences:{published:h.count??0,draft:m.count??0},tags:g.count??0,staff:p.count??0}),s(!1)})()},[]),n||!e?u.jsx("div",{className:"h-48 animate-pulse rounded-lg border border-border bg-card dark:bg-white/[0.06]"}):u.jsxs("div",{className:"space-y-8",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Dashboard"}),u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Overview of published and draft content."})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[u.jsx(Jp,{to:"/admin/research",icon:Uy,title:"Research Papers",published:e.research.published,draft:e.research.draft}),u.jsx(Jp,{to:"/admin/news",icon:Gy,title:"News",published:e.news.published,draft:e.news.draft}),u.jsx(Jp,{to:"/admin/conferences",icon:uf,title:"Conferences",published:e.conferences.published,draft:e.conferences.draft}),u.jsx(oE,{to:"/admin/tags",icon:Oj,title:"Tags",count:e.tags,label:"tags"}),u.jsx(oE,{to:"/admin/staff",icon:Mj,title:"Staff",count:e.staff,label:"members"})]}),u.jsx(cF,{})]})}function cF(){const[e,t]=x.useState(!1),[n,s]=x.useState(null),i=async()=>{t(!0),s(null);try{const l=await w9(c=>s(c));l.failed.length>0?(qe.error(`Migrated ${l.migrated}, ${l.failed.length} failed — check console`),console.error("Image migration failures:",l.failed)):qe.success(`Migrated ${l.migrated} image${l.migrated===1?"":"s"} to R2 (${l.skipped} already done)`)}catch(l){qe.error(l instanceof Error?l.message:"Migration failed")}finally{t(!1),s(null)}};return u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsxs(Jt,{className:"flex flex-row items-center justify-between pb-3",children:[u.jsx(Zt,{className:"text-base font-medium",children:"Image storage migration"}),u.jsx(h4,{className:"size-4 text-primary"})]}),u.jsxs(zt,{className:"space-y-3",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"Copies research/conference images still on Supabase Storage to the Cloudflare R2 bucket and updates their records. Safe to run more than once."}),u.jsx(Pe,{type:"button",variant:"secondary",disabled:e,onClick:i,children:e?n??"Migrating…":"Migrate images to R2"})]})]})}function Jp({to:e,icon:t,title:n,published:s,draft:i}){return u.jsx(Gt,{to:e,children:u.jsxs(Lt,{className:"transition-colors hover:border-primary/40 dark:bg-white/[0.06]",children:[u.jsxs(Jt,{className:"flex flex-row items-center justify-between pb-3",children:[u.jsx(Zt,{className:"text-base font-medium",children:n}),u.jsx(t,{className:"size-4 text-primary"})]}),u.jsxs(zt,{className:"space-y-1",children:[u.jsxs("p",{className:"text-2xl font-semibold",children:[s," ",u.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"published"})]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i," draft",i===1?"":"s"]}),u.jsxs("span",{className:"mt-2 inline-flex items-center gap-1 font-mono text-xs text-primary opacity-0 transition-opacity group-hover:opacity-100",children:["Manage ",u.jsx(Tj,{className:"size-3"})]})]})]})})}function oE({to:e,icon:t,title:n,count:s,label:i}){return u.jsx(Gt,{to:e,children:u.jsxs(Lt,{className:"transition-colors hover:border-primary/40 dark:bg-white/[0.06]",children:[u.jsxs(Jt,{className:"flex flex-row items-center justify-between pb-3",children:[u.jsx(Zt,{className:"text-base font-medium",children:n}),u.jsx(t,{className:"size-4 text-primary"})]}),u.jsx(zt,{children:u.jsxs("p",{className:"text-2xl font-semibold",children:[s," ",u.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:i})]})})]})})}function zv({...e}){return u.jsx(wU,{"data-slot":"alert-dialog",...e})}function Iv({...e}){return u.jsx(SU,{"data-slot":"alert-dialog-trigger",...e})}function uF({...e}){return u.jsx(_U,{"data-slot":"alert-dialog-portal",...e})}function dF({className:e,...t}){return u.jsx(EU,{"data-slot":"alert-dialog-overlay",className:re("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Bv({className:e,size:t="default",...n}){return u.jsxs(uF,{children:[u.jsx(dF,{}),u.jsx(TU,{"data-slot":"alert-dialog-content","data-size":t,className:re("group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
190ded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",e),...n})]})}function Uv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-dialog-header",className:re("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function Vv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-dialog-footer",className:re("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function $v({className:e,...t}){return u.jsx(AU,{"data-slot":"alert-dialog-title",className:re("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function Hv({className:e,...t}){return u.jsx(NU,{"data-slot":"alert-dialog-description",className:re("text-sm text-muted-foreground",e),...t})}function Gv({className:e,variant:t="default",size:n="default",...s}){return u.jsx(Pe,{variant:t,size:n,asChild:!0,children:u.jsx(jU,{"data-slot":"alert-dialog-action",className:re(e),...s})})}function qv({className:e,variant:t="outline",size:n="default",...s}){return u.jsx(Pe,{variant:t,size:n,asChild:!0,children:u.jsx(CU,{"data-slot":"alert-dialog-cancel",className:re(e),...s})})}function Uf({title:e,description:t,onNew:n,newLabel:s,children:i}){return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:e}),t&&u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),u.jsxs(Pe,{onClick:n,children:[u.jsx(ta,{className:"size-4"})," ",s]})]}),i]})}function Pk({title:e,onBack:t,onSave:n,onDelete:s,saving:i,children:l,saveLabel:c="Save"}){return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(Pe,{variant:"ghost",size:"icon",onClick:t,children:u.jsx(ql,{className:"size-4"})}),u.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:e})]}),l,u.jsxs("div",{className:"flex items-center justify-between border-t pt-6",children:[u.jsx("div",{children:s&&u.jsxs(zv,{children:[u.jsx(Iv,{asChild:!0,children:u.jsx(Pe,{variant:"destructive",disabled:i,children:"Delete"})}),u.jsxs(Bv,{children:[u.jsxs(Uv,{children:[u.jsx($v,{children:"Delete this entry?"}),u.jsx(Hv,{children:"This action cannot be undone. The entry will be permanently removed from the site."})]}),u.jsxs(Vv,{children:[u.jsx(qv,{children:"Cancel"}),u.jsx(Gv,{onClick:s,children:"Delete"})]})]})]})}),u.jsx(Pe,{onClick:n,disabled:i,children:i?"Saving...":c})]})]})}function io({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:re("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function Lk({className:e,size:t="default",...n}){return u.jsx(n$,{"data-slot":"switch","data-size":t,className:re("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...n,children:u.jsx(r$,{"data-slot":"switch-thumb",className:re("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dar
190k:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}const Zp={title:"",authors:[],abstract:"",doi_url:"",journal:"",published_at:"",image_path:"",status:"draft"};function fF(){const[e,t]=x.useState([]),[n,s]=x.useState(!0),[i,l]=x.useState(null),[c,f]=x.useState(!1),[h,m]=x.useState(Zp),[g,p]=x.useState(""),[b,w]=x.useState(!1),[S,_]=x.useState(!1),E=()=>{Ck().then(t).finally(()=>s(!1))};x.useEffect(E,[]);const j=()=>{m(Zp),p(""),l(null),f(!0)},C=U=>{m({title:U.title,authors:U.authors,abstract:U.abstract,doi_url:U.doi_url??"",journal:U.journal??"",published_at:U.published_at?U.published_at.slice(0,10):"",image_path:U.image_path??"",status:U.status}),l(U.id),f(!1)},A=()=>{f(!1),l(null),m(Zp)},k=()=>{const U=g.trim();U&&(m(z=>({...z,authors:[...z.authors,U]})),p(""))},D=U=>{m(z=>({...z,authors:z.authors.filter((Y,se)=>se!==U)}))},B=async U=>{const z=U.target.files?.[0];if(z){_(!0);try{const Y=await v9(z);m(se=>({...se,image_path:Y})),qe.success("Image uploaded")}catch(Y){qe.error(Y instanceof Error?Y.message:"Upload failed")}finally{_(!1)}}},L=async()=>{if(!h.title.trim()){qe.error("Title is required");return}w(!0);try{const U={title:h.title.trim(),authors:h.authors,abstract:h.abstract,doi_url:h.doi_url.trim()||null,journal:h.journal.trim()||null,published_at:h.published_at?new Date(h.published_at).toISOString():null,image_path:h.image_path||null,status:h.status,created_by:(await Te.auth.getUser()).data.user?.id??null};await a9(U,c?void 0:i??void 0),qe.success(c?"Paper created":"Paper saved"),A(),E()}catch(U){qe.error(U instanceof Error?U.message:"Save failed")}finally{w(!1)}},P=async()=>{if(i){w(!0);try{await i9(i),qe.success("Paper deleted"),A(),E()}catch(U){qe.error(U instanceof Error?U.message:"Delete failed")}finally{w(!1)}}};return c||i?u.jsx(Pk,{title:c?"New research paper":"Edit research paper",onBack:A,onSave:L,onDelete:c?void 0:P,saving:b,children:u.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[u.jsxs(Lt,{className:"lg:col-span-2 dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Details"})}),u.jsxs(zt,{className:"space-y-5",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"title",children:"Title"}),u.jsx(Xe,{id:"title",value:h.title,onChange:U=>m(z=>({...z,title:U.target.value})),placeholder:"Paper title"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Authors"}
190),u.jsx(ao,{children:"Add each author's name, press Enter or click Add."}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Xe,{value:g,onChange:U=>p(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),k())},placeholder:"Author name"}),u.jsxs(Pe,{type:"button",variant:"outline",onClick:k,children:[u.jsx(ta,{className:"size-4"})," Add"]})]}),h.authors.length>0&&u.jsx("div",{className:"flex flex-wrap gap-2",children:h.authors.map((U,z)=>u.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-secondary px-2.5 py-1 text-sm",children:[U,u.jsx("button",{type:"button",onClick:()=>D(z),className:"text-muted-foreground hover:text-foreground",children:u.jsx(Dr,{className:"size-3"})})]},z))})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"abstract",children:"Abstract"}),u.jsx(io,{id:"abstract",value:h.abstract,onChange:U=>m(z=>({...z,abstract:U.target.value})),rows:6,placeholder:"Full abstract..."})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"journal",children:"Journal / Conference"}),u.jsx(Xe,{id:"journal",value:h.journal,onChange:U=>m(z=>({...z,journal:U.target.value})),placeholder:"e.g. Applied Physics Letters"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"published_at",children:"Publication date"}),u.jsx(Xe,{id:"published_at",type:"date",value:h.published_at,onChange:U=>m(z=>({...z,published_at:U.target.value}))})]})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"doi_url",children:"DOI / Publisher URL"}),u.jsx(Xe,{id:"doi_url",type:"url",value:h.doi_url,onChange:U=>m(z=>({...z,doi_url:U.target.value})),placeholder:"https://doi.org/..."})]})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Publishing"})}),u.jsx(zt,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:"Published"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Toggle on to show on the public site"})]}),u.jsx(Lk,{checked:h.status==="published",onCheckedChange:U=>m(z=>({...z,status:U?"published":"draft"}))})]})})]}),u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Card image"})}),u.jsxs(zt,{className:"space-y-4",children:[h.image_path?u.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-border",children:[u.jsx("img",{src:h.image_path,alt:"",className:"aspect-[16/10] w-full object-cover"}),u.jsx(Pe,{type:"button",variant:"destructive",size:"icon-xs",className:"absolute right-2 top-2",onClick:()=>m(U=>({...U,image_path:""})),children:u.jsx(Dr,{className:"size-3"})})]}):u.jsx("div",{className:"flex aspect-[16/10] items-center justify-center rounded-lg border border-dashed border-border text-muted-foreground",children:u.jsx(Vy,{className:"size-8"})}),u.jsxs("label",{children:[u.jsx("input",{type:"file",accept:"image/*",onChange:B,className:"hidden",disabled:S}),u.jsx(Pe,{type:"button",variant:"outline",className:"w-full",disabled:S,asChild:!0,children:u.jsxs("span",{children:[u.jsx(qy,{className:"size-4"})," ",S?"Uploading...":"Upload image"]})})]})]})]})]})]})}):u.jsx(Uf,{title:"Research Papers",description:"Create and manage published research papers.",onNew:j,newLabel:"New paper",children:n?u.jsx("div",{className:"space-y-3",children:[...Array(3)].map((U,z)=>u.jsx("div",{className:"h-16 animate-pulse rounded-lg border border-border bg-card dark:bg-white/[0.06]"},z))}):e.length===0?u.jsx(Lt,{className:"dark:bg-white/[0.06]",children:u.jsx(zt,{className:"py-12 text-center",children:u.jsx("p",{className:"text-muted-foreground",children:'No research papers yet. Click "New paper" to create one.'})})}):u.jsx("div",{className:"space-y-3",children:e.map(U=>u.jsxs("button",{onClick:()=>C(U),className:"flex w-full items-center justify-between rounded-lg border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 dark:bg-white/[0.06]",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate font-medium",children:U.title}),u.jsxs("p",{className:"mt-0.5 truncate font-mono text-xs text-muted-foreground",children:[U.journal??"No journal"," · ",U.authors.length," author",U.authors.length===1?"":"s"]})]}),u.jsx(hF,{status:U.status})]},U.id))})})}function hF({status:e}){return u.jsx("span",{className:e==="published"?"rounded-md border border-emerald-500/30 bg-emerald-500/15 px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide text-emerald-300":"rounded-md border border-border bg-muted px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:e})}function mF({...e}){return u.jsx(W6,{"data-slot":"accordion",...e})}function td({className:e,...t}){return u.jsx(Y6,{"data-slot":"accordion-item",className:re("border-b last:border-b-0",e),...t})}
190function nd({className:e,children:t,...n}){return u.jsx(X6,{className:"flex",children:u.jsxs(J6,{"data-slot":"accordion-trigger",className:re("flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,u.jsx(Iy,{className:"pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"})]})})}function rd({className:e,children:t,...n}){return u.jsx(Z6,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:u.jsx("div",{className:re("pt-0 pb-4",e),children:t})})}const pF={epiwafer_intro:"",epiwafer_sub_types:[],epilayer_specs:[],wafer_specs:[],specs_footnote:"",substrates_intro:"",substrate_comparison:[],substrates_closing_note:""};function gF(){return{id:crypto.randomUUID(),name:"",deviceType:"",devices:"",sizesLabel:"",sizesImage:"",applications:[]}}function yF(){return{method:"",material:"",orientation:"",availableSizes:"",thickness:"",resistivity:"",xrdFwhm:"",defectDensity:"",surface:""}}function lE(e,t,n){if(n<0||n>=e.length)return e;const s=[...e],[i]=s.splice(t,1);return s.splice(n,0,i),s}function Qp({value:e,onChange:t,aspect:n="aspect-video"}){const[s,i]=x.useState(!1),l=async c=>{const f=c.target.files?.[0];if(f){i(!0);try{const h=await x9(f);t(h),qe.success("Image uploaded")}catch(h){qe.error(h instanceof Error?h.message:"Upload failed")}finally{i(!1),c.target.value=""}}};return u.jsxs("div",{className:"space-y-2",children:[e?u.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-border bg-[#111215]",children:[u.jsx("img",{src:e,alt:"",className:re("w-full object-contain p-2",n)}),u.jsx(Pe,{type:"button",variant:"destructive",size:"icon-xs",className:"absolute right-2 top-2",onClick:()=>t(""),children:u.jsx(Dr,{className:"size-3"})})]}):u.jsx("div",{className:re("flex items-center justify-center rounded-lg border border-dashed border-border text-muted-foreground",n),children:u.jsx(Vy,{className:"size-6"})}),u.jsxs("label",{children:[u.jsx("input",{type:"file",accept:"image/*",onChange:l,className:"hidden",disabled:s}),u.jsx(Pe,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:s,asChild:!0,children:u.jsxs("span",{children:[u.jsx(qy,{className:"size-3.5"})," ",s?"Uploading...":e?"Replace image":"Upload image"]})})]})]})}function vF({subType:e,index:t,count:n,onChange:s,onRemove:i,onMove:l}){const c=g=>s({...e,...g}),f=()=>c({applications:[...e.applications,{label:"",image:""}]}),h=(g,p)=>c({applications:e.applications.map((b,w)=>w===g?{...b,...p}:b)}),m=g=>c({applications:e.applications.filter((p,b)=>b!==g)});return u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsxs(Jt,{className:"flex-row items-center justify-between space-y-0",children:[u.jsx(Zt,{className:"text-base",children:e.name||`Sub-type ${t+1}`}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(Pe,{type:"button",variant:"ghost",size:"icon-xs",disabled:t===0,onClick:()=>l(-1),children:u.jsx(jj,{className:"size-3.5"})}),u.jsx(Pe,{type:"button",variant:"ghost",size:"icon-xs",disabled:t===n-1,onClick:()=>l(1),children:u.jsx(zy,{className:"size-3.5"})}),u.jsx(Pe,{type:"button",variant:"destructive",size:"icon-xs",onClick:i,children:u.jsx(Dr,{className:"size-3.5"})})]})]}),u.jsxs(zt,{className:"space-y-5",children:[u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{children:"Name"}),u.jsx(Xe,{value:e.name,onChange:g=>c({name:g.target.value}),placeholder:"e.g. Ga₂O₃ on conductive Ga₂O₃"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Device type"}),u.jsx(Xe,{value:e.deviceType,onChange:g=>c({deviceType:g.target.value}),placeholder:"e.g. High-Voltage Power electronics Ga₂O₃ Epiwafer"})]})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Devices"}),u.jsx(io,{value:e.devices,onChange:g=>c({devices:g.target.value}),rows:2})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{children:"Sizes label"}),u.jsx(Xe,{value:e.sizesLabel,onChange:g=>c({sizesLabel:g.target.value}),placeholder:"Leave blank if using a materials image instead"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Sizes image"}),u.jsx(Qp,{value:e.sizesImage,onChange:g=>c({sizesImage:g})})]})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{children:"Materials label (optional)"}),u.jsx(Xe,{value:e.materialsLabel??"",onChange:g=>c({materialsLabel:g.target.value}),placeholder:"e.g. 4 inch / 100 mm — Silicon (Si), Silicon Carbide (SiC)..."})]}
190),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Materials image (optional)"}),u.jsx(Qp,{value:e.materialsImage??"",onChange:g=>c({materialsImage:g})})]})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Applications"}),u.jsx("div",{className:"space-y-3",children:e.applications.map((g,p)=>u.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border p-3",children:[u.jsx("div",{className:"w-24 shrink-0",children:u.jsx(Qp,{value:g.image,onChange:b=>h(p,{image:b}),aspect:"aspect-square"})}),u.jsx(Xe,{value:g.label,onChange:b=>h(p,{label:b.target.value}),placeholder:"Application label",className:"flex-1"}),u.jsx(Pe,{type:"button",variant:"ghost",size:"icon-xs",onClick:()=>m(p),children:u.jsx(Dr,{className:"size-3.5"})})]},p))}),u.jsxs(Pe,{type:"button",variant:"outline",size:"sm",onClick:f,children:[u.jsx(ta,{className:"size-3.5"})," Add application"]})]})]})]})}function cE({rows:e,onChange:t}){const n=(l,c)=>t(e.map((f,h)=>h===l?{...f,...c}:f)),s=l=>t(e.filter((c,f)=>f!==l)),i=()=>t([...e,{label:"",value:""}]);return u.jsxs("div",{className:"space-y-2",children:[e.map((l,c)=>u.jsxs("div",{className:"grid grid-cols-[1fr_1fr_4rem_auto] items-center gap-2",children:[u.jsx(Xe,{value:l.label,onChange:f=>n(c,{label:f.target.value}),placeholder:"Label"}),u.jsx(Xe,{value:l.value,onChange:f=>n(c,{value:f.target.value}),placeholder:"Value"}),u.jsx(Xe,{value:l.note??"",onChange:f=>n(c,{note:f.target.value}),placeholder:"Note"}),u.jsx(Pe,{type:"button",variant:"ghost",size:"icon-xs",onClick:()=>s(c),children:u.jsx(Dr,{className:"size-3.5"})})]},c)),u.jsxs(Pe,{type:"button",variant:"outline",size:"sm",onClick:i,children:[u.jsx(ta,{className:"size-3.5"})," Add row"]})]})}const bF=[{key:"material",label:"Material"},{key:"orientation",label:"Orientation"},{key:"availableSizes",label:"Available Sizes"},{key:"thickness",label:"Thickness"},{key:"resistivity",label:"Resistivity"},{key:"xrdFwhm",label:"XRD FWHM"},{key:"defectDensity",label:"Defect Density"},{key:"surface",label:"Surface"}];function xF({column:e,index:t,count:n,onChange:s,onRemove:i,onMove:l}){const c=f=>s({...e,...f});return u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsxs(Jt,{className:"flex-row items-center justify-between space-y-0",children:[u.jsx(Zt,{className:"text-base",children:e.method||`Growth method ${t+1}`}),u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(Pe,{type:"button",variant:"ghost",size:"icon-xs",disabled:t===0,onClick:()=>l(-1),children:u.jsx(jj,{className:"size-3.5"})}),u.jsx(Pe,{type:"button",variant:"ghost",size:"icon-xs",disabled:t===n-1,onClick:()=>l(1),children:u.jsx(zy,{className:"size-3.5"})}),u.jsx(Pe,{type:"button",variant:"destructive",size:"icon-xs",onClick:i,children:u.jsx(Dr,{className:"size-3.5"})})]})]}),u.jsxs(zt,{className:"space-y-4",children:[u.jsxs(Ie,{children:[u.jsx(Be,{children:"Growth method name"}),u.jsx(Xe,{value:e.method,onChange:f=>c({method:f.target.value}),placeholder:"e.g. Casting/VB Growth"})]}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:bF.map(({key:f,label:h})=>u.jsxs(Ie,{children:[u.jsx(Be,{children:h}),u.jsx(Xe,{value:e[f],onChange:m=>c({[f]:m.target.value})})]},f))})]})]})}function wF(){const[e,t]=x.useState(!0),[n,s]=x.useState(pF),[i,l]=x.useState(!1),[c,f]=x.use
190State(null);x.useEffect(()=>{Nk().then(p=>{if(!p)return;const{id:b,updated_at:w,updated_by:S,..._}=p;s(_),f(_.epiwafer_sub_types[0]?.id??null)}).finally(()=>t(!1))},[]);const h=()=>{const p=gF();s(b=>({...b,epiwafer_sub_types:[...b.epiwafer_sub_types,p]})),f(p.id)},m=p=>{s(b=>{const w=b.epiwafer_sub_types.filter(S=>S.id!==p);return c===p&&f(w[0]?.id??null),{...b,epiwafer_sub_types:w}})},g=async()=>{l(!0);try{const p=(await Te.auth.getUser()).data.user?.id??null;await h9({...n,updated_by:p}),qe.success("Products page saved")}catch(p){qe.error(p instanceof Error?p.message:"Save failed")}finally{l(!1)}};return e?u.jsx("div",{className:"space-y-3",children:[...Array(3)].map((p,b)=>u.jsx("div",{className:"h-32 animate-pulse rounded-lg border border-border bg-card dark:bg-white/[0.06]"},b))}):u.jsxs("div",{className:"space-y-6 pb-12",children:[u.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Products"}),u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Edit the content shown on the public /products page. Saving here goes live immediately."})]}),u.jsx(Pe,{onClick:g,disabled:i,children:i?"Saving...":"Save changes"})]}),u.jsxs(mF,{type:"multiple",defaultValue:["epiwafers","sub-types","specs","substrates"],className:"space-y-4",children:[u.jsxs(td,{value:"epiwafers",className:"rounded-lg border border-border px-4 dark:bg-white/[0.06]",children:[u.jsx(nd,{className:"text-base font-semibold",children:"Epiwafers intro"}),u.jsx(rd,{children:u.jsx(io,{value:n.epiwafer_intro,onChange:p=>s(b=>({...b,epiwafer_intro:p.target.value})),rows:4})})]}),u.jsxs(td,{value:"sub-types",className:"rounded-lg border border-border px-4 dark:bg-white/[0.06]",children:[u.jsxs(nd,{className:"text-base font-semibold",children:["Epiwafer sub-types (",n.epiwafer_sub_types.length,")"]}),u.jsx(rd,{children:n.epiwafer_sub_types.length===0?u.jsxs(Pe,{type:"button",variant:"outline",onClick:h,children:[u.jsx(ta,{className:"size-4"})," Add sub-type"]}):u.jsxs(Ov,{value:c??void 0,onValueChange:f,children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-border dark:border-white/10",children:[u.jsx(Dv,{variant:"line",className:"h-auto flex-wrap justify-start gap-1",children:n.epiwafer_sub_types.map((p,b)=>u.jsx(Mv,{value:p.id,className:"text-sm",children:p.name||`Sub-type ${b+1}`},p.id))}),u.jsxs(Pe,{type:"button",variant:"ghost",size:"sm",className:"mb-1",onClick:h,children:[u.jsx(ta,{className:"size-3.5"})," Add sub-type"]})]}),n.epiwafer_sub_types.map((p,b)=>u.jsx(Pv,{value:p.id,className:"pt-6",children:u.jsx(vF,{subType:p,index:b,count:n.epiwafer_sub_types.length,onChange:w=>s(S=>({...S,epiwafer_sub_types:S.epiwafer_sub_types.map((_,E)=>E===b?w:_)})),onRemove:()=>m(p.id),onMove:w=>s(S=>({...S,epiwafer_sub_types:lE(S.epiwafer_sub_types,b,b+w)}))})},p.id))]})})]}),u.jsxs(td,{value:"specs",className:"rounded-lg border border-border px-4 dark:bg-white/[0.06]",children:[u.jsx(nd,{className:"text-base font-semibold",children:"Structure and specification of layers"}),u.jsxs(rd,{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("p",{className:"mb-2 text-sm font-medium text-primary",children:"Doped Epilayer Specification"}),u.jsx(cE,{rows:n.epilayer_specs,onChange:p=>s(b=>({...b,epilayer_specs:p}))})]}),u.jsxs("div",{children:[u.jsx("p",{className:"mb-2 text-sm font-medium text-primary",children:"β-Ga₂O₃ Wafer Specification"}),u.jsx(cE,{rows:n.wafer_specs,onChange:p=>s(b=>({...b,wafer_specs:p}))})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Footnote"}),u.jsx(Xe,{value:n.specs_footnote,onChange:p=>s(b=>({...b,specs_footnote:p.target.value})),placeholder:"*Substrate dependent."})]})]})]}),u.jsxs(td,{value:"substrates",className:"rounded-lg border border-border px-4 dark:bg-white/[0.06]",children:[u.jsx(nd,{className:"text-base font-semibold",children:"Substrates"}),u.jsxs(rd,{className:"space-y-5",children:[u.jsxs(Ie,{children:[u.jsx(Be,{children:"Intro"}),u.jsx(io,{value:n.substrates_intro,onChange:p=>s(b=>({...b,substrates_intro:p.target.value})),rows:3})]}),u.jsxs("div",{className:"space-y-4",children:[n.substrate_comparison.map((p,b)=>u.jsx(xF,{column:p,index:b,count:n.substrate_comparison.length,onChange:w=>s(S=>({...S,substrate_comparison:S.substrate_comparison.map((_,E)=>E===b?w:_)})),onRemove:()=>s(w=>({...w,substrate_comparison:w.substrate_comparison.filter((S,_)=>_!==b)})),onMove:w=>s(S=>({...S,substrate_comparison:lE(S.substrate_comparison,b,b+w)}))},b)),u.jsxs(Pe,{type:"button",variant:"outline",onClick:()=>s(p=>({...p,substrate_comparison:[...p.substrate_comparison,yF()]})),children:[u.jsx(ta,{className:"size-4"})," Add growth method"]})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Closing note"}),u.jsx(io,{value:n.substrates_closing_note,onChange:p=>s(b=>({...b,substrates_closing_note:p.target.value})),rows:3})]})]})]})]}),u.jsx("div",{className:"flex justify-end border-t pt-6",children:u.jsx(Pe,{onClick:g,disabled:i,children:i?"Saving...":"Save changes"})})]})}function SF({className:e,...t}){return u.jsx(wA,{"data-slot":"checkbox",className:re("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:u.jsx(_A,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:u.jsx(Cj,{className:"size-3.5"})})})}
190function _F({value:e,onChange:t}){const n=e==="intl";return u.jsx("button",{type:"button",role:"switch","aria-checked":n,"aria-label":n?"Switch to US time format":"Switch to international time format",onClick:()=>t(n?"us":"intl"),className:"relative inline-flex h-7 w-[92px] shrink-0 items-center rounded-full border border-border bg-secondary transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:u.jsxs("span",{className:re("flex h-5 w-[42px] items-center justify-center gap-1 rounded-full bg-primary text-[10px] font-semibold text-primary-foreground shadow-sm transition-transform duration-300 ease-out motion-reduce:transition-none",n?"translate-x-[46px]":"translate-x-1"),children:[u.jsx(T4,{className:"h-3 w-3"}),n?"INTL":"US"]})})}const EF=Array.from({length:24},(e,t)=>String(t).padStart(2,"0")),TF=Array.from({length:12},(e,t)=>String(t+1)),uE=Array.from({length:60},(e,t)=>String(t).padStart(2,"0"));function dE({value:e,onChange:t,format:n,idPrefix:s}){const[i,l]=e?e.split(":"):["",""],c=i===""?null:parseInt(i,10),f=l??"",h=(b,w)=>{if(b===null||w===""){t("");return}t(`${String(b).padStart(2,"0")}:${w}`)};if(n==="intl")return u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsxs(Xs,{value:i||void 0,onValueChange:b=>h(parseInt(b,10),f||"00"),children:[u.jsx(Zs,{id:`${s}-hour`,className:"w-[72px]",size:"sm",children:u.jsx(Js,{placeholder:"HH"})}),u.jsx(Qs,{children:EF.map(b=>u.jsx(vn,{value:b,children:b},b))})]}),u.jsx("span",{className:"text-muted-foreground",children:":"}),u.jsxs(Xs,{value:f||void 0,onValueChange:b=>h(c??0,b),children:[u.jsx(Zs,{className:"w-[72px]",size:"sm",children:u.jsx(Js,{placeholder:"MM"})}),u.jsx(Qs,{children:uE.map(b=>u.jsx(vn,{value:b,children:b},b))})]})]});const m=c===null?null:c>=12?"PM":"AM",g=c===null?"":String(c%12===0?12:c%12),p=(b,w,S)=>{if(b===""||S===""){t("");return}const _=parseInt(b,10),E=w==="AM"?_===12?0:_:_===12?12:_+12;t(`${String(E).padStart(2,"0")}:${S}`)};return u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsxs(Xs,{value:g||void 0,onValueChange:b=>p(b,m??"AM",f||"00"),children:[u.jsx(Zs,{id:`${s}-hour`,className:"w-[68px]",size:"sm",children:u.jsx(Js,{placeholder:"HH"})}),u.jsx(Qs,{children:TF.map(b=>u.jsx(vn,{value:b,children:b},b))})]}),u.jsx("span",{className:"text-muted-foreground",children:":"}),u.jsxs(Xs,{value:f||void 0,onValueChange:b=>p(g||"12",m??"AM",b),children:[u.jsx(Zs,{className:"w-[72px]",size:"sm",children:u.jsx(Js,{placeholder:"MM"})}),u.jsx(Qs,{children:uE.map(b=>u.jsx(vn,{value:b,children:b},b))})]}),u.jsxs(Xs,{value:m??void 0,onValueChange:b=>p(g||"12",b,f||"00"),children:[u.jsx(Zs,{className:"w-[76px]",size:"sm",children:u.jsx(Js,{placeholder:"AM"})}),u.jsxs(Qs,{children:[u.jsx(vn,{value:"AM",children:"AM"}),u.jsx(vn,{value:"PM",children:"PM"})]})]})]})}const eg={title:"",description:"",start_date:new Date().toISOString().slice(0,10),end_date:new Date().toISOString().slice(0,10),start_time:"",end_time:"",time_format:"us",venue:"",location:"",external_url:"",image_path:"",status:"draft"};function jF(){const[e,t]=x.useState([]),[n,s]=x.useState([]),[i,l]=x.useState(!0),[c,f]=x.use
190State(null),[h,m]=x.useState(!1),[g,p]=x.useState(eg),[b,w]=x.useState([]),[S,_]=x.useState(!1),[E,j]=x.useState(!1),C=()=>{Promise.all([Ak(),kk()]).then(([z,Y])=>{t(z),s(Y)}).finally(()=>l(!1))};x.useEffect(C,[]);const A=()=>{p(eg),w([]),f(null),m(!0)},k=async z=>{p({title:z.title,description:z.description,start_date:z.start_date,end_date:z.end_date,start_time:z.start_time?.slice(0,5)??"",end_time:z.end_time?.slice(0,5)??"",time_format:z.time_format??"us",venue:z.venue??"",location:z.location??"",external_url:z.external_url??"",image_path:z.image_path??"",status:z.status}),f(z.id),m(!1);try{const Y=await Rk(z.id);w(Y.map(se=>se.id))}catch{w([])}},D=()=>{m(!1),f(null),p(eg),w([])},B=z=>{w(Y=>Y.includes(z)?Y.filter(se=>se!==z):[...Y,z])},L=async z=>{const Y=z.target.files?.[0];if(Y){j(!0);try{const se=await b9(Y);p(de=>({...de,image_path:se})),qe.success("Image uploaded")}catch(se){qe.error(se instanceof Error?se.message:"Upload failed")}finally{j(!1)}}},P=async()=>{if(!g.title.trim()){qe.error("Title is required");return}_(!0);try{const z={title:g.title.trim(),description:g.description,start_date:g.start_date,end_date:g.end_date,start_time:g.start_time||null,end_time:g.end_time||null,time_format:g.time_format,venue:g.venue.trim()||null,location:g.location.trim()||null,external_url:g.external_url.trim()||null,image_path:g.image_path||null,status:g.status,created_by:(await Te.auth.getUser()).data.user?.id??null},Y=await d9(z,h?void 0:c??void 0);await g9(Y.id,b),qe.success(h?"Conference created":"Conference saved"),D(),C()}catch(z){qe.error(z instanceof Error?z.message:"Save failed")}finally{_(!1)}},U=async()=>{if(c){_(!0);try{await f9(c),qe.success("Conference deleted"),D(),C()}catch(z){qe.error(z instanceof Error?z.message:"Delete failed")}finally{_(!1)}}};return h||c?u.jsx(Pk,{title:h?"New conference":"Edit conference",onBack:D,onSave:P,onDelete:h?void 0:U,saving:S,children:u.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[u.jsxs(Lt,{className:"lg:col-span-2 dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Details"})}),u.jsxs(zt,{className:"space-y-5",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"title",children:"Title"}),u.jsx(Xe,{id:"title",value:g.title,onChange:z=>p(Y=>({...Y,title:z.target.value})),placeholder:"Conference name"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"description",children:"Description"}),u.jsx(io,{id:"description",value:g.description,onChange:z=>p(Y=>({...Y,description:z.target.value})),rows:4,placeholder:"Short description..."})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"start_date",children:"Start date"}),u.jsx(Xe,{id:"start_date",type:"date",value:g.start_date,onChange:z=>p(Y=>({...Y,start_date:z.target.value}))})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"end_date",children:"End date"}),u.jsx(Xe,{id:"end_date",type:"date",value:g.end_date,onChange:z=>p(Y=>({...Y,end_date:z.target.value}))})]})]}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-muted-foreground",children:"Time format"}),u.jsx(_F,{value:g.time_format,onChange:z=>p(Y=>({...Y,time_format:z}))})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"start_time-hour",children:"Start time"}),u.jsx(dE,{idPrefix:"start_time",format:g.time_format,value:g.start_time,onChange:z=>p(Y=>({...Y,start_time:z}))}),u.jsx(ao,{children:"Optional."})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"end_time-hour",children:"End time"}),u.jsx(dE,{idPrefix:"end_time",format:g.time_format,value:g.end_time,onChange:z=>p(Y=>({...Y,end_time:z}))}),u.jsx(ao,{children:"Optional."})]})]}),u.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"venue",children:"Venue"}),u.jsx(Xe,{id:"venue",value:g.venue,onChange:z=>p(Y=>({...Y,venue:z.target.value})),placeholder:"e.g. Messe München"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"location",children:"Location"}),u.jsx(Xe,{id:"location",value:g.location,onChange:z=>p(Y=>({...Y,location:z.target.value})),placeholder:"e.g. Munich, Germany"})]})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"external_url",children:"Event website"}),u.jsx(Xe,{id:"external_url",type:"url",value:g.external_url,onChange:z=>p(Y=>({...Y,external_url:z.target.value})),placeholder:"https://..."})]})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Publishing"})}),u.jsx(zt,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:"Published"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Toggle on to show on the public site"})]}),u.jsx(Lk,{checked:g.status==="published",onCheckedChange:z=>p(Y=>({...Y,status:z?"published":"draft"}))})]})})]}),u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Event image"})}),u.jsxs(zt,{className:"space-y-4",children:[g.image_path?u.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-border",children:[u.jsx("img",{src:g.image_path,alt:"",className:"aspect-[16/9] w-full object-cover"}),u.jsx(Pe,{type:"button",variant:"destructive",size:"icon-xs",className:"absolute right-2 top-2",onClick:()=>p(z=>({...z,image_path:""})),children:u.jsx(Dr,{className:"size-3"})})]}):u.jsx("div",{className:"flex aspect-[16/9] items-center justify-center rounded-lg border border-dashed border-border text-muted-foreground",children:u.jsx(Vy,{className:"size-8"})}),u.jsxs("label",{children:[u.jsx("input",{type:"file",accept:"image/*",onChange:L,className:"hidden",disabled:E}),u.jsx(Pe,{type:"button",variant:"outline",className:"w-full",disabled:E,asChild:!0,children:u.jsxs("span",{children:[u.jsx(qy,{className:"size-4"})," ",E?"Uploading...":"Upload image"]})})]})]})]}),u.jsxs(Lt,{className:"dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Tags"})}),u.jsx(zt,{className:"space-y-3",children:n.length===0?u.jsx(ao,{children:"No tags yet. Create some in the Tags page to sort conferences."}):n.map(z=>u.jsxs("label",{className:"flex cursor-pointer items-center gap-3 rounded-md border border-border p-2.5 transition-colors hover:bg-accent/50",children:[u.jsx(SF,{checked:b.includes(z.id),onCheckedChange:()=>B(z.id)}),u.jsx("span",{className:`rounded-md border px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide ${nc[z.color]}`,children:z.name})]},z.id))})]})]})]})}):u.jsx(Uf,{title:"Conferences",description:"Create and manage conference entries.",onNew:A,newLabel:"New conference",children:i?u.jsx("div",{className:"space-y-3",children:[...Array(3)].map((z,Y)=>u.jsx("div",{className:"h-16 animate-pulse rounded-lg border border-border bg-card dark:bg-white/[0.06]"},Y))}):e.length===0?u.jsx(Lt,{className:"dark:bg-white/[0.06]",children:u.jsx(zt,{className:"py-12 text-center",children:u.jsx("p",{className:"text-muted-foreground",children:'No conferences yet. Click "New conference" to create one.'})})}):u.jsx("div",{className:"space-y-3",children:e.map(z=>u.jsxs("button",{onClick:()=>
190k(z),className:"flex w-full items-center justify-between rounded-lg border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 dark:bg-white/[0.06]",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate font-medium",children:z.title}),u.jsxs("p",{className:"mt-0.5 truncate font-mono text-xs text-muted-foreground",children:[z.start_date," → ",z.end_date,z.venue?` · ${z.venue}`:""]})]}),u.jsx(CF,{status:z.status})]},z.id))})})}function CF({status:e}){return u.jsx("span",{className:e==="published"?"rounded-md border border-emerald-500/30 bg-emerald-500/15 px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide text-emerald-300":"rounded-md border border-border bg-muted px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:e})}function AF(){const[e,t]=x.useState([]),[n,s]=x.useState(!0),[i,l]=x.useState(""),[c,f]=x.useState("amber"),[h,m]=x.useState(!1),g=()=>{kk().then(t).finally(()=>s(!1))};x.useEffect(g,[]);const p=async()=>{if(!i.trim()){qe.error("Tag name is required");return}m(!0);try{await m9(i.trim(),c),qe.success("Tag created"),l(""),f("amber"),g()}catch(w){qe.error(w instanceof Error?w.message:"Create failed")}finally{m(!1)}},b=async w=>{try{await p9(w),qe.success("Tag deleted"),g()}catch(S){qe.error(S instanceof Error?S.message:"Delete failed")}};return u.jsx(Uf,{title:"Tags",description:"Create colored sorting tags for conferences. These will also drive the future calendar view.",onNew:()=>{},newLabel:"",children:u.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[u.jsxs(Lt,{className:"lg:col-span-1 dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"New tag"})}),u.jsxs(zt,{className:"space-y-5",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"tag-name",children:"Name"}),u.jsx(Xe,{id:"tag-name",value:i,onChange:w=>l(w.target.value),placeholder:"e.g. Conference, Workshop"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Color"}),u.jsx("div",{className:"grid grid-cols-4 gap-2",children:B9.map(w=>u.jsxs("button",{type:"button",onClick:()=>f(w.value),className:`flex flex-col items-center gap-1.5 rounded-md border p-2 transition-all ${c===w.value?"border-primary ring-2 ring-primary/20":"border-border hover:border-primary/40"}`,children:[u.jsx("span",{className:`h-6 w-6 rounded-full border ${nc[w.value]}`}),u.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide text-muted-foreground",children:w.label})]},w.value))})]}),u.jsxs(Pe,{onClick:p,disabled:h,className:"w-full",children:[u.jsx(ta,{className:"size-4"})," Create tag"]})]})]}),u.jsxs(Lt,{className:"lg:col-span-2 dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Existing tags"})}),u.jsx(zt,{children:n?u.jsx("div",{className:"space-y-3",children:[...Array(3)].map((w,S)=>u.jsx("div",{className:"h-12 animate-pulse rounded-md border border-border"},S))}):e.length===0?u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No tags yet. Create one to start sorting conferences."}):u.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(w=>u.jsxs("div",{className:"group inline-flex items-center gap-2 rounded-md border border-border bg-card p-1 pl-3 dark:bg-white/[0.04]",children:[u.jsx("span",{className:`rounded border px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide ${nc[w.color]}`,children:w.name}),u.jsxs(zv,{children:[u.jsx(Iv,{asChild:!0,children:u.jsx(Pe,{variant:"ghost",size:"icon-xs",className:"text-muted-foreground hover:text-destructive",children:u.jsx(Dj,{className:"size-3"})})}),u.jsxs(Bv,{children:[u.jsxs(Uv,{children:[u.jsxs($v,{children:['Delete "',w.name,'"?']}),u.jsx(Hv,{children:"This will remove the tag from all conferences it's attached to."})]}),u.jsxs(Vv,{children:[u.jsx(qv,{children:"Cancel"}),u.jsx(Gv,{onClick:()=>b(w.id),children:"Delete"})]})]})]})]},w.id))})})]})]})})}const NF={super_admin:"Super Admin",admin:"Admin",staff:"Staff"};function kF(){const{admin:e}=If(),t=e?.role==="super_admin",[n,s]=x.useState([]),[i,l]=x.useState(!0),[c,f]=x.use
190State(""),[h,m]=x.useState(""),[g,p]=x.useState("staff"),[b,w]=x.useState(!1),S=()=>{Te.from("admins").select("id, user_id, email, full_name, role, invited_by, created_at").order("created_at",{ascending:!0}).then(({data:C})=>{s(C??[]),l(!1)})};x.useEffect(S,[]);const _=async()=>{if(!c.trim()||!h.trim()){qe.error("Name and email are required");return}w(!0);try{const{data:C}=await Te.auth.getSession(),A=await fetch("https://lljjggqwutsnhdjdnuar.supabase.co/functions/v1/invite-admin",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${C.session?.access_token}`},body:JSON.stringify({email:h.trim(),full_name:c.trim(),role:g})});if(!A.ok){const k=await A.json().catch(()=>({}));throw new Error(k.error??`Failed (${A.status})`)}qe.success(`Invitation sent to ${h.trim()}`),f(""),m(""),p("staff"),S()}catch(C){qe.error(C instanceof Error?C.message:"Invitation failed")}finally{w(!1)}},E=async(C,A)=>{try{const{error:k}=await Te.from("admins").update({role:A}).eq("id",C);if(k)throw k;qe.success("Role updated"),S()}catch(k){qe.error(k instanceof Error?k.message:"Update failed")}},j=async(C,A)=>{try{const{data:k}=await Te.auth.getSession(),D=await fetch("https://lljjggqwutsnhdjdnuar.supabase.co/functions/v1/remove-admin",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${k.session?.access_token}`},body:JSON.stringify({user_id:A})});if(!D.ok){const B=await D.json().catch(()=>({}));throw new Error(B.error??`Failed (${D.status})`)}qe.success("Admin removed"),S()}catch(k){qe.error(k instanceof Error?k.message:"Removal failed")}};return u.jsx(Uf,{title:"Staff",description:"Invite and manage administrators who can edit the site.",onNew:()=>{},newLabel:"",children:u.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[t&&u.jsxs(Lt,{className:"lg:col-span-1 dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Invite new member"})}),u.jsxs(zt,{className:"space-y-5",children:[u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"staff-name",children:"Full name"}),u.jsx(Xe,{id:"staff-name",value:c,onChange:C=>f(C.target.value),placeholder:"Jane Smith"})]}),u.jsxs(Ie,{children:[u.jsx(Be,{htmlFor:"staff-email",children:"Email"}),u.jsx(Xe,{id:"staff-email",type:"email",value:h,onChange:C=>m(C.target.value),placeholder:"[email protected]"}),u.jsx(ao,{children:"They'll receive an email invitation to set their own password."})]}),u.jsxs(Ie,{children:[u.jsx(Be,{children:"Role"}),u.jsxs(Xs,{value:g,onValueChange:C=>p(C),children:[u.jsx(Zs,{children:u.jsx(Js,{})}),u.jsxs(Qs,{children:[u.jsx(vn,{value:"staff",children:"Staff (read only)"}),u.jsx(vn,{value:"admin",children:"Admin (full content access)"}),u.jsx(vn,{value:"super_admin",children:"Super Admin (manage staff)"})]})]})]}),u.jsxs(Pe,{onClick:_,disabled:b,className:"w-full",children:[u.jsx(Hy,{className:"size-4"})," ",b?"Sending...":"Send invitation"]})]})]}),u.jsxs(Lt,{className:t?"lg:col-span-2 dark:bg-white/[0.06]":"lg:col-span-3 dark:bg-white/[0.06]",children:[u.jsx(Jt,{children:u.jsx(Zt,{children:"Team members"})}),u.jsxs(zt,{children:[i?u.jsx("div",{className:"space-y-3",children:[...Array(3)].map((C,A)=>u.jsx("div",{className:"h-16 animate-pulse rounded-md border border-border"},A))}):n.length===0?u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No staff members yet."}):u.jsx("div",{className:"space-y-3",children:n.map(C=>
190u.jsxs("div",{className:"flex items-center gap-4 rounded-lg border border-border bg-card p-4 dark:bg-white/[0.04]",children:[u.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/15 font-mono text-sm text-primary",children:C.full_name.split(" ").map(A=>A[0]).slice(0,2).join("").toUpperCase()}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate font-medium",children:C.full_name}),u.jsx("p",{className:"truncate text-sm text-muted-foreground",children:C.email})]}),t&&C.id!==e?.id?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(Xs,{value:C.role,onValueChange:A=>E(C.id,A),children:[u.jsx(Zs,{className:"w-36",children:u.jsx(Js,{})}),u.jsxs(Qs,{children:[u.jsx(vn,{value:"staff",children:"Staff"}),u.jsx(vn,{value:"admin",children:"Admin"}),u.jsx(vn,{value:"super_admin",children:"Super Admin"})]})]}),u.jsxs(zv,{children:[u.jsx(Iv,{asChild:!0,children:u.jsx(Pe,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-destructive",children:u.jsx(Dj,{className:"size-4"})})}),u.jsxs(Bv,{children:[u.jsxs(Uv,{children:[u.jsxs($v,{children:["Remove ",C.full_name,"?"]}),u.jsx(Hv,{children:"They will lose access to the admin panel immediately."})]}),u.jsxs(Vv,{children:[u.jsx(qv,{children:"Cancel"}),u.jsx(Gv,{onClick:()=>j(C.id,C.user_id),children:"Remove"})]})]})]})]}):u.jsx("span",{className:"rounded-md border border-border px-2 py-0.5 font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:NF[C.role]})]},C.id))}),!t&&u.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:"Only Super Admins can invite new members or change roles."})]})]})]})})}function RF(){return u.jsx("footer",{className:"bg-background",children:u.jsxs("div",{className:"mx-auto max-w-[1320px] px-6 py-12 md:px-12",children:[u.jsxs("div",{className:"flex flex-col gap-8 md:flex-row md:items-start md:justify-between",children:[u.jsxs("div",{className:"max-w-sm",children:[u.jsx("p",{className:"text-lg font-semibold tracking-tight",children:"NextGO Epi"}),u.jsx("img",{src:"/images/company/nextgoepi-logo-white.png",alt:"NextGO Epi",className:"mt-3 hidden h-8 w-auto dark:block"}),u.jsx("p",{className:"mt-3 text-sm leading-relaxed text-muted-foreground",children:"Beta-Gallium Oxide epitaxy for the next generation of power electronics."})]}),u.jsxs("nav",{className:"flex flex-col gap-3 text-sm sm:flex-row sm:gap-8",children:[u.jsx(Gt,{to:"/research",className:"text-muted-foreground transition-colors hover:text-foreground",children:"Research"}),u.jsx(Gt,{to:"/news",className:"text-muted-foreground transition-colors hover:text-foreground",children:"News"}),u.jsx(Gt,{to:"/conferences",className:"text-muted-foreground transition-colors hover:text-foreground",children:"Conferences"}),u.jsx(Gt,{to:"/privacy",className:"text-muted-foreground transition-colors hover:text-foreground",children:"Privacy Policy"}),u.jsx(Gt,{to:"/impressum",className:"text-muted-foreground transition-colors hover:text-foreground",children:"Impressum"})]})]}),u.jsxs("div",{className:"mt-10 font-mono text-xs text-muted-foreground",children:["© ",new Date().getFullYear()," NextGO Epi. All rights reserved."]})]})})}const OF=x.lazy(()=>UD(()=>import("./AdminNewsEditor-DRUI6vcF.js"),[]).then(e=>({default:e.AdminNewsEditor}))),DF=[{href:"/",label:"Home",icon:N4},{href:"/news",label:"News",icon:Gy},{href:"/products",label:"Products",icon:us},{href:"/conferences",label:"Conferences",icon:uf},{href:"/research",label:"Research",icon:Uy},{href:"/#contact",label:"Contact Us",icon:Hy}];function MF(){const[e,t]=x.useState(!1),n=x.useRef(null),{pathname:s}=On(),l=["/","/news","/conferences"].includes(s)&&!e;return x.useEffect(()=>{const c=()=>t(window.scrollY>40);return c(),window.addEventListener("scroll",c,{passive:!0}),()=>window.removeEventListener("scroll",c)},[]),x.useEffect(()=>{const c=n.current;if(!c)return;const f=()=>document.documentElement.style.setProperty("--site-header-height",`${c.offsetHeight}px`);f();const h=new ResizeObserver(f);return h.observe(c),()=>h.disconnect()},[]),u.jsx("header",{ref:n,className:re("sticky top-0 z-10 border-b transition-all duration-300",e?"glass-card rounded-none border-x-0 border-t-0 shadow-md":"border-transparent bg-transparent"),children:u.jsxs("div",{className:"mx-auto max-w-[1320px] px-6 py-4 md:px-12 md:py-5",children:[u.jsxs("div",{className:"flex items-center justify-center gap-8 md:justify-between",children:[u.jsxs("a",{href:"/",className:"hidden items-center gap-2 md:flex",children:[u.jsxs("span",{className:"flex items-center gap-2.5 dark:hidden",children:[u.jsx(us,{className:"size-6 text-primary"}),u.jsx("span",{className:re("text-lg font-semibold tracking-tight transition-colors",l&&"text-white"),children:"NextGO Epi"})]}),u.jsx("img",{src:"/images/company/nextgoepi-logo-white.png",alt:"NextGO Epi",className:"hidden h-10 w-auto dark:block"})]}),u.jsx(yI,{items:DF}),u.jsx("div",{className:"hidden md:block",children:u.jsx(C1,{})})]}),s==="/"&&u.jsx("div",{className:"mt-3 flex justify-center md:hidden",children:u.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[u.jsxs("span",{className:"flex items-center gap-2 dark:hidden",children:[u.jsx(us,{className:"size-5 text-primary"}),u.jsx("span",{className:re("text-base font-semibold tracking-tight transition-colors",l&&"text-white"),children:"NextGO Epi"})]}),u.jsx("img",{src:"/images/company/nextgoepi-logo-white.png",alt:"NextGO Epi",className:"hidden h-8 w-auto dark:block"})]})}),u.jsx("div",{className:"mt-3 flex justify-center md:hidden",children:u.jsx(C1,{})})]})})}function Fs({children:e}){const t=On();return x.useEffect(()=>{if(t.hash){const n=t.hash.slice(1),s=setTimeout(()=>{Yy(n)},100);return()=>clearTimeout(s)}},[t.pathname,t.hash]),u.jsxs("div",{className:"min-h-svh bg-background",children:[u.jsx(MF,{}),u.jsx("main",{className:"overflow-x-clip bg-background text-foreground",children:e}),u.jsx(RF,{})]})}function PF(){return u.jsxs(aD,{children:[u.jsx(Tt,{path:"/",element:u.jsx(Fs,{children:u.jsx(Y$,{})})}),u.jsx(Tt,{path:"/research",element:u.jsx(Fs,{children:u.jsx(T9,{})})}),u.jsx(Tt,{path:"/news",element:u.jsx(Fs,{children:u.jsx(j9,{})})}),u.jsx(Tt,{path:"/news/:id",element:u.jsx(Fs,{children:u.jsx(C9,{})})}),u.jsx(Tt,{path:"/products",element:u.jsx(Fs,{children:u.jsx(I9,{})})}),u.jsx(Tt,{path:"/conferences",element:u.jsx(Fs,{children:u.jsx(H9,{})})}),u.jsx(Tt,{path:"/conferences/:id",element:u.jsx(Fs,{children:u.jsx(q9,{})})}),u.jsx(Tt,{path:"/impressum",element:u.jsx(Fs,{children:u.jsx(K9,{})})}),u.jsx(Tt,{path:"/admin/login",element:u.jsx(Z9,{})}),u.jsx(Tt,{path:"/admin/accept-invite",element:u.jsx(tq,{})}),u.jsxs(Tt,{path:"/admin",element:u.jsx(Mq,{}),children:[u.jsx(Tt,{index:!0,element:u.jsx(lF,{})}),u.jsx(Tt,{path:"research",element:u.jsx(fF,{})}),u.jsx(Tt,{path:"news",element:u.jsx(x.Suspense,{fallback:u.jsx("div",{className:"h-48 animate-pulse rounded-lg border border-border bg-card dark:bg-white/[0.06]"}),children:u.jsx(OF,{})})}),u.jsx(Tt,{path:"products",element:u.jsx(wF,{})}),u.jsx(Tt,{path:"conferences",element:u.jsx(jF,{})}),u.jsx(Tt,{path:"tags",element:u.jsx(AF,{})}),u.jsx(Tt,{path:"staff",element:u.jsx(kF,{})})]}),u.jsx(Tt,{path:"*",element:u.jsx(Qd,{to:"/",replace:!0})})]})}var LF=(e,t,n,s,i,l,c,f)=>{let h=document.documentElement,m=["light","dark"];
vendor: 1,992 bytes, line 190
190function g(w){(Array.isArray(e)?e:[e]).forEach(S=>{let _=S==="class",E=_&&l?i.map(j=>l[j]||j):i;_?(h.classList.remove(...E),h.classList.add(l&&l[w]?l[w]:w)):h.setAttribute(S,w)}),p(w)}function p(w){f&&m.includes(w)&&(h.style.colorScheme=w)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)g(s);else try{let w=localStorage.getItem(t)||n,S=c&&w==="system"?b():w;g(S)}catch{}},zF=x.createContext(void 0),IF={setTheme:e=>{},themes:[]},BF=()=>{var e;return(e=x.useContext(zF))!=null?e:IF};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:s,enableColorScheme:i,defaultTheme:l,value:c,themes:f,nonce:h,scriptProps:m})=>{let g=JSON.stringify([n,t,l,e,f,c,s,i]).slice(1,-1);return x.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?h:"",dangerouslySetInnerHTML:{__html:`(${LF.toString()})(${g})`}})});const UF=({...e})=>{const{theme:t="system"}=BF();return u.jsx(oF,{theme:t,className:"toaster group",icons:{success:u.jsx(d4,{className:"size-4"}),info:u.jsx(O4,{className:"size-4"}),warning:u.jsx(pz,{className:"size-4"}),error:u.jsx(W4,{className:"size-4"}),loading:u.jsx($y,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})};rO.createRoot(document.getElementById("root")).render(u.jsx(x.StrictMode,{children:u.jsxs(wI,{defaultTheme:"dark",children:[u.jsx(ND,{children:u.jsx(W9,{children:u.jsx(PF,{})})}),u.jsx(UF,{})]})}));export{mE as $,YA as A,Pe as B,XA as C,yf as D,Jt as E,iv as F,Zt as G,zt as H,Xe as I,Ie as J,Be as K,Lk as L,Vy as M,Uf as N,HF as O,je as P,qF as Q,WA as R,Zy as S,io as T,qy as U,qe as V,Te as W,Dr as X,GF as Y,FF as Z,UD as _,cr as a,We as b,Se as c,Ae as d,ms as e,vf as f,Cf as g,LC as h,ov as i,u as j,Dn as k,uo as l,AC as m,JA as n,re as o,VF as p,fE as q,x as r,te as s,Lj as t,dr as u,zE as v,Xd as w,RU as x,Pk as y,Lt 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.