Files
cdcbrief-glm/dist/assets/index-DT0rQidg.js
T

1588 lines
680 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();function nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xd={exports:{}},eo={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var a0;function tC(){if(a0)return eo;a0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:u}}return eo.Fragment=t,eo.jsx=i,eo.jsxs=i,eo}var s0;function nC(){return s0||(s0=1,xd.exports=tC()),xd.exports}var E=nC(),Sd={exports:{}},Ae={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var o0;function iC(){if(o0)return Ae;o0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(k){return k===null||typeof k!="object"?null:(k=v&&k[v]||k["@@iterator"],typeof k=="function"?k:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,R={};function C(k,F,T){this.props=k,this.context=F,this.refs=R,this.updater=T||A}C.prototype.isReactComponent={},C.prototype.setState=function(k,F){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,F,"setState")},C.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function P(){}P.prototype=C.prototype;function N(k,F,T){this.props=k,this.context=F,this.refs=R,this.updater=T||A}var q=N.prototype=new P;q.constructor=N,D(q,C.prototype),q.isPureReactComponent=!0;var Z=Array.isArray;function L(){}var K={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ne(k,F,T){var le=T.ref;return{$$typeof:e,type:k,key:F,ref:le!==void 0?le:null,props:T}}function re(k,F){return ne(k.type,F,k.props)}function ie(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function ae(k){var F={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(T){return F[T]})}var be=/\/+/g;function ee(k,F){return typeof k=="object"&&k!==null&&k.key!=null?ae(""+k.key):F.toString(36)}function $(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(L,L):(k.status="pending",k.then(function(F){k.status==="pending"&&(k.status="fulfilled",k.value=F)},function(F){k.status==="pending"&&(k.status="rejected",k.reason=F)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function O(k,F,T,le,ce){var ue=typeof k;(ue==="undefined"||ue==="boolean")&&(k=null);var Ee=!1;if(k===null)Ee=!0;else switch(ue){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(k.$$typeof){case e:case t:Ee=!0;break;case g:return Ee=k._init,O(Ee(k._payload),F,T,le,ce)}}if(Ee)return ce=ce(k),Ee=le===""?"."+ee(k,0):le,Z(ce)?(T="",Ee!=null&&(T=Ee.replace(be,"$&/")+"/"),O(ce,F,T,"",function(wt){return wt})):ce!=null&&(ie(ce)&&(ce=re(ce,T+(ce.key==null||k&&k.key===ce.key?"":(""+ce.key).replace(be,"$&/")+"/")+Ee)),F.push(ce)),1;Ee=0;var Ve=le===""?".":le+":";if(Z(k))for(var Se=0;Se<k.length;Se++)le=k[Se],ue=Ve+ee(le,Se),Ee+=O(le,F,T,ue,ce);else if(Se=x(k),typeof Se=="function")for(k=Se.call(k),Se=0;!(le=k.next()).done;)le=le.value,ue=Ve+ee(le,Se++),Ee+=O(le,F,T,ue,ce);else if(ue==="object"){if(typeof k.then=="function")return O($(k),F,T,le,ce);throw F=String(k),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Q(k,F,T){if(k==null)return k;var le=[],ce=0;return O(k,le,"","",function(ue){return F.call(T,ue,ce++)}),le}function J(k){if(k._status===-1){var F=k._result;F=F(),F.then(function(T){(k._status===0||k._status===-1)&&(k._status=1,k._result=T)},function(T){(k._status===0||k._status===-1)&&(k._status=2,k._result=T)}),k._status===-1&&(k._status=0,k._result=F)}if(k._status===1)return k._result.default;throw k._result}var fe=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},w={map:Q,forEach:function(k,F,T){Q(k,function(){F.apply(this,arguments)},T)},count:function(k){var F=0;return Q(k,function(){F++}),F},toArray:function(k){return Q(k,function(F){return F})||[]},only:function(k){if(!ie(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ae.Activity=y,Ae.Children=w,Ae.Component=C,Ae.Fragment=i,Ae.Profiler=o,Ae.PureComponent=N,Ae.StrictMode=a,Ae.Suspense=p,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(k){return K.H.useMemoCache(k)}},Ae.cache=function(k){return function(){return k.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(k,F,T){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var le=D({},k.props),ce=k.key;if(F!=null)for(ue in F.key!==void 0&&(ce=""+F.key),F)!V.call(F,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&F.ref===void 0||(le[ue]=F[ue]);var ue=arguments.length-2;if(ue===1)le.children=T;else if(1<ue){for(var Ee=Array(ue),Ve=0;Ve<ue;Ve++)Ee[Ve]=arguments[Ve+2];le.children=Ee}return ne(k.type,ce,le)},Ae.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},Ae.createElement=function(k,F,T){var le,ce={},ue=null;if(F!=null)for(le in F.key!==void 0&&(ue=""+F.key),F)V.call(F,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ce[le]=F[le]);var Ee=arguments.length-2;if(Ee===1)ce.children=T;else if(1<Ee){for(var Ve=Array(Ee),Se=0;Se<Ee;Se++)Ve[Se]=arguments[Se+2];ce.children=Ve}if(k&&k.defaultProps)for(le in Ee=k.defaultProps,Ee)ce[le]===void 0&&(ce[le]=Ee[le]);return ne(k,ue,ce)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(k){return{$$typeof:d,render:k}},Ae.isValidElement=ie,Ae.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:J}},Ae.memo=function(k,F){return{$$typeof:m,type:k,compare:F===void 0?null:F}},Ae.startTransition=function(k){var F=K.T,T={};K.T=T;try{var le=k(),ce=K.S;ce!==null&&ce(T,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(L,fe)}catch(ue){fe(ue)}finally{F!==null&&T.types!==null&&(F.types=T.types),K.T=F}},Ae.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Ae.use=function(k){return K.H.use(k)},Ae.useActionState=function(k,F,T){return K.H.useActionState(k,F,T)},Ae.useCallback=function(k,F){return K.H.useCallback(k,F)},Ae.useContext=function(k){return K.H.useContext(k)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(k,F){return K.H.useDeferredValue(k,F)},Ae.useEffect=function(k,F){return K.H.useEffect(k,F)},Ae.useEffectEvent=function(k){return K.H.useEffectEvent(k)},Ae.useId=function(){return K.H.useId()},Ae.useImperativeHandle=function(k,F,T){return K.H.useImperativeHandle(k,F,T)},Ae.useInsertionEffect=function(k,F){return K.H.useInsertionEffect(k,F)},Ae.useLayoutEffect=function(k,F){return K.H.useLayoutEffect(k,F)},Ae.useMemo=function(k,F){return K.H.useMemo(k,F)},Ae.useOptimistic=function(k,F){return K.H.useOptimistic(k,F)},Ae.useReducer=function(k,F,T){return K.H.useReducer(k,F,T)},Ae.useRef=function(k){return K.H.useRef(k)},Ae.useState=function(k){return K.H.useState(k)},Ae.useSyncExternalStore=function(k,F,T){return K.H.useSyncExternalStore(k,F,T)},Ae.useTransition=function(){return K.H.useTransition()},Ae.version="19.2.4",Ae}var l0;function im(){return l0||(l0=1,Sd.exports=iC()),Sd.exports}var W=im();const nr=nm(W);var wd={exports:{}},to={},Td={exports:{}},Ed={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var u0;function rC(){return u0||(u0=1,(function(e){function t(O,Q){var J=O.length;O.push(Q);e:for(;0<J;){var fe=J-1>>>1,w=O[fe];if(0<o(w,Q))O[fe]=Q,O[J]=w,J=fe;else break e}}function i(O){return O.length===0?null:O[0]}function a(O){if(O.length===0)return null;var Q=O[0],J=O.pop();if(J!==Q){O[0]=J;e:for(var fe=0,w=O.length,k=w>>>1;fe<k;){var F=2*(fe+1)-1,T=O[F],le=F+1,ce=O[le];if(0>o(T,J))le<w&&0>o(ce,T)?(O[fe]=ce,O[le]=J,fe=le):(O[fe]=T,O[F]=J,fe=F);else if(le<w&&0>o(ce,J))O[fe]=ce,O[le]=J,fe=le;else break e}}return Q}function o(O,Q){var J=O.sortIndex-Q.sortIndex;return J!==0?J:O.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],m=[],g=1,y=null,v=3,x=!1,A=!1,D=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function q(O){for(var Q=i(m);Q!==null;){if(Q.callback===null)a(m);else if(Q.startTime<=O)a(m),Q.sortIndex=Q.expirationTime,t(p,Q);else break;Q=i(m)}}function Z(O){if(D=!1,q(O),!A)if(i(p)!==null)A=!0,L||(L=!0,ae());else{var Q=i(m);Q!==null&&$(Z,Q.startTime-O)}}var L=!1,K=-1,V=5,ne=-1;function re(){return R?!0:!(e.unstable_now()-ne<V)}function ie(){if(R=!1,L){var O=e.unstable_now();ne=O;var Q=!0;try{e:{A=!1,D&&(D=!1,P(K),K=-1),x=!0;var J=v;try{t:{for(q(O),y=i(p);y!==null&&!(y.expirationTime>O&&re());){var fe=y.callback;if(typeof fe=="function"){y.callback=null,v=y.priorityLevel;var w=fe(y.expirationTime<=O);if(O=e.unstable_now(),typeof w=="function"){y.callback=w,q(O),Q=!0;break t}y===i(p)&&a(p),q(O)}else a(p);y=i(p)}if(y!==null)Q=!0;else{var k=i(m);k!==null&&$(Z,k.startTime-O),Q=!1}}break e}finally{y=null,v=J,x=!1}Q=void 0}}finally{Q?ae():L=!1}}}var ae;if(typeof N=="function")ae=function(){N(ie)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,ee=be.port2;be.port1.onmessage=ie,ae=function(){ee.postMessage(null)}}else ae=function(){C(ie,0)};function $(O,Q){K=C(function(){O(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(O){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var J=v;v=Q;try{return O()}finally{v=J}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(O,Q){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var J=v;v=O;try{return Q()}finally{v=J}},e.unstable_scheduleCallback=function(O,Q,J){var fe=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?fe+J:fe):J=fe,O){case 1:var w=-1;break;case 2:w=250;break;case 5:w=1073741823;break;case 4:w=1e4;break;default:w=5e3}return w=J+w,O={id:g++,callback:Q,priorityLevel:O,startTime:J,expirationTime:w,sortIndex:-1},J>fe?(O.sortIndex=J,t(m,O),i(p)===null&&O===i(m)&&(D?(P(K),K=-1):D=!0,$(Z,J-fe))):(O.sortIndex=w,t(p,O),A||x||(A=!0,L||(L=!0,ae()))),O},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(O){var Q=v;return function(){var J=v;v=Q;try{return O.apply(this,arguments)}finally{v=J}}}})(Ed)),Ed}var c0;function aC(){return c0||(c0=1,Td.exports=rC()),Td.exports}var Ad={exports:{}},Ot={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var f0;function sC(){if(f0)return Ot;f0=1;var e=im();function t(p){var m="https://react.dev/errors/"+p;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 #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:p,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ot.createPortal=function(p,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 u(p,m,null,g)},Ot.flushSync=function(p){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=m,a.p=g,a.d.f()}},Ot.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},Ot.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Ot.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,y=d(g,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):g==="script"&&a.d.X(p,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ot.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=d(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},Ot.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=d(g,m.crossOrigin);a.d.L(p,g,{crossOrigin:y,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})}},Ot.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=d(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},Ot.requestFormReset=function(p){a.d.r(p)},Ot.unstable_batchedUpdates=function(p,m){return p(m)},Ot.useFormState=function(p,m,g){return c.H.useFormState(p,m,g)},Ot.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ot.version="19.2.4",Ot}var d0;function oC(){if(d0)return Ad.exports;d0=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(),Ad.exports=sC(),Ad.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var h0;function lC(){if(h0)return to;h0=1;var e=aC(),t=im(),i=oC();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var r=n,s=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(s=r.return),n=r.return;while(n)}return r.tag===3?s:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function p(n){if(u(n)!==n)throw Error(a(188))}function m(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(a(188));return r!==n?null:n}for(var s=n,l=r;;){var f=s.return;if(f===null)break;var h=f.alternate;if(h===null){if(l=f.return,l!==null){s=l;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===s)return p(f),n;if(h===l)return p(f),r;h=h.sibling}throw Error(a(188))}if(s.return!==l.return)s=f,l=h;else{for(var b=!1,S=f.child;S;){if(S===s){b=!0,s=f,l=h;break}if(S===l){b=!0,l=f,s=h;break}S=S.sibling}if(!b){for(S=h.child;S;){if(S===s){b=!0,s=h,l=f;break}if(S===l){b=!0,l=h,s=f;break}S=S.sibling}if(!b)throw Error(a(189))}}if(s.alternate!==l)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:r}function g(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=g(n),r!==null)return r;n=n.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),N=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function ae(n){return n===null||typeof n!="object"?null:(n=ie&&n[ie]||n["@@iterator"],typeof n=="function"?n:null)}var be=Symbol.for("react.client.reference");function ee(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===be?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case D:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case Z:return"Suspense";case L:return"SuspenseList";case ne:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case A:return"Portal";case N:return n.displayName||"Context";case P:return(n._context.displayName||"Context")+".Consumer";case q:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case K:return r=n.displayName||null,r!==null?r:ee(n.type)||"Memo";case V:r=n._payload,n=n._init;try{return ee(n(r))}catch{}}return null}var $=Array.isArray,O=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},fe=[],w=-1;function k(n){return{current:n}}function F(n){0>w||(n.current=fe[w],fe[w]=null,w--)}function T(n,r){w++,fe[w]=n.current,n.current=r}var le=k(null),ce=k(null),ue=k(null),Ee=k(null);function Ve(n,r){switch(T(ue,r),T(ce,n),T(le,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?kb(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=kb(r),n=Db(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(le),T(le,n)}function Se(){F(le),F(ce),F(ue)}function wt(n){n.memoizedState!==null&&T(Ee,n);var r=le.current,s=Db(r,n.type);r!==s&&(T(ce,n),T(le,s))}function Nt(n){ce.current===n&&(F(le),F(ce)),Ee.current===n&&(F(Ee),Ws._currentValue=J)}var un,Ln;function Rt(n){if(un===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);un=r&&r[1]||"",Ln=-1<s.stack.indexOf(`
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+un+n+Ln}var wi=!1;function Ti(n,r){if(!n||wi)return"";wi=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(H){var U=H}Reflect.construct(n,[],X)}else{try{X.call()}catch(H){U=H}n.call(X.prototype)}}else{try{throw Error()}catch(H){U=H}(X=n())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(H){if(H&&U&&typeof H.stack=="string")return[H.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),b=h[0],S=h[1];if(b&&S){var _=b.split(`
`),I=S.split(`
`);for(f=l=0;l<_.length&&!_[l].includes("DetermineComponentFrameRoot");)l++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(l===_.length||f===I.length)for(l=_.length-1,f=I.length-1;1<=l&&0<=f&&_[l]!==I[f];)f--;for(;1<=l&&0<=f;l--,f--)if(_[l]!==I[f]){if(l!==1||f!==1)do if(l--,f--,0>f||_[l]!==I[f]){var G=`
`+_[l].replace(" at new "," at ");return n.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",n.displayName)),G}while(1<=l&&0<=f);break}}}finally{wi=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?Rt(s):""}function ea(n,r){switch(n.tag){case 26:case 27:case 5:return Rt(n.type);case 16:return Rt("Lazy");case 13:return n.child!==r&&r!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return Ti(n.type,!1);case 11:return Ti(n.type.render,!1);case 1:return Ti(n.type,!0);case 31:return Rt("Activity");default:return""}}function cn(n){try{var r="",s=null;do r+=ea(n,s),s=n,n=n.return;while(n);return r}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}var Ei=Object.prototype.hasOwnProperty,Ai=e.unstable_scheduleCallback,vr=e.unstable_cancelCallback,xr=e.unstable_shouldYield,Sr=e.unstable_requestPaint,Tt=e.unstable_now,se=e.unstable_getCurrentPriorityLevel,B=e.unstable_ImmediatePriority,te=e.unstable_UserBlockingPriority,ye=e.unstable_NormalPriority,ke=e.unstable_LowPriority,Ce=e.unstable_IdlePriority,Zt=e.log,Zn=e.unstable_setDisableYieldValue,Lt=null,gt=null;function Pt(n){if(typeof Zt=="function"&&Zn(n),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Lt,n)}catch{}}var Ke=Math.clz32?Math.clz32:VT,Ci=Math.log,En=Math.LN2;function VT(n){return n>>>=0,n===0?32:31-(Ci(n)/En|0)|0}var Vo=256,Ho=262144,Fo=4194304;function wr(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function qo(n,r,s){var l=n.pendingLanes;if(l===0)return 0;var f=0,h=n.suspendedLanes,b=n.pingedLanes;n=n.warmLanes;var S=l&134217727;return S!==0?(l=S&~h,l!==0?f=wr(l):(b&=S,b!==0?f=wr(b):s||(s=S&~n,s!==0&&(f=wr(s))))):(S=l&~h,S!==0?f=wr(S):b!==0?f=wr(b):s||(s=l&~n,s!==0&&(f=wr(s)))),f===0?0:r!==0&&r!==f&&(r&h)===0&&(h=f&-f,s=r&-r,h>=s||h===32&&(s&4194048)!==0)?r:f}function us(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function HT(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function up(){var n=Fo;return Fo<<=1,(Fo&62914560)===0&&(Fo=4194304),n}function oc(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function cs(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function FT(n,r,s,l,f,h){var b=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var S=n.entanglements,_=n.expirationTimes,I=n.hiddenUpdates;for(s=b&~s;0<s;){var G=31-Ke(s),X=1<<G;S[G]=0,_[G]=-1;var U=I[G];if(U!==null)for(I[G]=null,G=0;G<U.length;G++){var H=U[G];H!==null&&(H.lane&=-536870913)}s&=~X}l!==0&&cp(n,l,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(b&~r))}function cp(n,r,s){n.pendingLanes|=r,n.suspendedLanes&=~r;var l=31-Ke(r);n.entangledLanes|=r,n.entanglements[l]=n.entanglements[l]|1073741824|s&261930}function fp(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var l=31-Ke(s),f=1<<l;f&r|n[l]&r&&(n[l]|=r),s&=~f}}function dp(n,r){var s=r&-r;return s=(s&42)!==0?1:lc(s),(s&(n.suspendedLanes|r))!==0?0:s}function lc(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function uc(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function hp(){var n=Q.p;return n!==0?n:(n=window.event,n===void 0?32:$b(n.type))}function mp(n,r){var s=Q.p;try{return Q.p=n,r()}finally{Q.p=s}}var _i=Math.random().toString(36).slice(2),Et="__reactFiber$"+_i,Vt="__reactProps$"+_i,ta="__reactContainer$"+_i,cc="__reactEvents$"+_i,qT="__reactListeners$"+_i,GT="__reactHandles$"+_i,pp="__reactResources$"+_i,fs="__reactMarker$"+_i;function fc(n){delete n[Et],delete n[Vt],delete n[cc],delete n[qT],delete n[GT]}function na(n){var r=n[Et];if(r)return r;for(var s=n.parentNode;s;){if(r=s[ta]||s[Et]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=jb(n);n!==null;){if(s=n[Et])return s;n=jb(n)}return r}n=s,s=n.parentNode}return null}function ia(n){if(n=n[Et]||n[ta]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function ds(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function ra(n){var r=n[pp];return r||(r=n[pp]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function xt(n){n[fs]=!0}var gp=new Set,yp={};function Tr(n,r){aa(n,r),aa(n+"Capture",r)}function aa(n,r){for(yp[n]=r,n=0;n<r.length;n++)gp.add(r[n])}var YT=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bp={},vp={};function XT(n){return Ei.call(vp,n)?!0:Ei.call(bp,n)?!1:YT.test(n)?vp[n]=!0:(bp[n]=!0,!1)}function Go(n,r,s){if(XT(r))if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+s)}}function Yo(n,r,s){if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+s)}}function $n(n,r,s,l){if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(r,s,""+l)}}function fn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function xp(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function KT(n,r,s){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,h=l.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return f.call(this)},set:function(b){s=""+b,h.call(this,b)}}),Object.defineProperty(n,r,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function dc(n){if(!n._valueTracker){var r=xp(n)?"checked":"value";n._valueTracker=KT(n,r,""+n[r])}}function Sp(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),l="";return n&&(l=xp(n)?n.checked?"true":"false":n.value),n=l,n!==s?(r.setValue(n),!0):!1}function Xo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var QT=/[\n"\\]/g;function dn(n){return n.replace(QT,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function hc(n,r,s,l,f,h,b,S){n.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?n.type=b:n.removeAttribute("type"),r!=null?b==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+fn(r)):n.value!==""+fn(r)&&(n.value=""+fn(r)):b!=="submit"&&b!=="reset"||n.removeAttribute("value"),r!=null?mc(n,b,fn(r)):s!=null?mc(n,b,fn(s)):l!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+fn(S):n.removeAttribute("name")}function wp(n,r,s,l,f,h,b,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),r!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||r!=null)){dc(n);return}s=s!=null?""+fn(s):"",r=r!=null?""+fn(r):s,S||r===n.value||(n.value=r),n.defaultValue=r}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=S?n.checked:!!l,n.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.name=b),dc(n)}function mc(n,r,s){r==="number"&&Xo(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function sa(n,r,s,l){if(n=n.options,r){r={};for(var f=0;f<s.length;f++)r["$"+s[f]]=!0;for(s=0;s<n.length;s++)f=r.hasOwnProperty("$"+n[s].value),n[s].selected!==f&&(n[s].selected=f),f&&l&&(n[s].defaultSelected=!0)}else{for(s=""+fn(s),r=null,f=0;f<n.length;f++){if(n[f].value===s){n[f].selected=!0,l&&(n[f].defaultSelected=!0);return}r!==null||n[f].disabled||(r=n[f])}r!==null&&(r.selected=!0)}}function Tp(n,r,s){if(r!=null&&(r=""+fn(r),r!==n.value&&(n.value=r),s==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=s!=null?""+fn(s):""}function Ep(n,r,s,l){if(r==null){if(l!=null){if(s!=null)throw Error(a(92));if($(l)){if(1<l.length)throw Error(a(93));l=l[0]}s=l}s==null&&(s=""),r=s}s=fn(r),n.defaultValue=s,l=n.textContent,l===s&&l!==""&&l!==null&&(n.value=l),dc(n)}function oa(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var WT=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 Ap(n,r,s){var l=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":l?n.setProperty(r,s):typeof s!="number"||s===0||WT.has(r)?r==="float"?n.cssFloat=s:n[r]=(""+s).trim():n[r]=s+"px"}function Cp(n,r,s){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var f in r)l=r[f],r.hasOwnProperty(f)&&s[f]!==l&&Ap(n,f,l)}else for(var h in r)r.hasOwnProperty(h)&&Ap(n,h,r[h])}function pc(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ZT=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-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"]]),$T=/^[\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 Ko(n){return $T.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Jn(){}var gc=null;function yc(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var la=null,ua=null;function _p(n){var r=ia(n);if(r&&(n=r.stateNode)){var s=n[Vt]||null;e:switch(n=r.stateNode,r.type){case"input":if(hc(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+dn(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var l=s[r];if(l!==n&&l.form===n.form){var f=l[Vt]||null;if(!f)throw Error(a(90));hc(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<s.length;r++)l=s[r],l.form===n.form&&Sp(l)}break e;case"textarea":Tp(n,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&sa(n,!!s.multiple,r,!1)}}}var bc=!1;function kp(n,r,s){if(bc)return n(r,s);bc=!0;try{var l=n(r);return l}finally{if(bc=!1,(la!==null||ua!==null)&&(Ll(),la&&(r=la,n=ua,ua=la=null,_p(r),n)))for(r=0;r<n.length;r++)_p(n[r])}}function hs(n,r){var s=n.stateNode;if(s===null)return null;var l=s[Vt]||null;if(l===null)return null;s=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,r,typeof s));return s}var ei=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vc=!1;if(ei)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){vc=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{vc=!1}var ki=null,xc=null,Qo=null;function Dp(){if(Qo)return Qo;var n,r=xc,s=r.length,l,f="value"in ki?ki.value:ki.textContent,h=f.length;for(n=0;n<s&&r[n]===f[n];n++);var b=s-n;for(l=1;l<=b&&r[s-l]===f[h-l];l++);return Qo=f.slice(n,1<l?1-l:void 0)}function Wo(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Zo(){return!0}function Mp(){return!1}function Ht(n){function r(s,l,f,h,b){this._reactName=s,this._targetInst=f,this.type=l,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(s=n[S],this[S]=s?s(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Zo:Mp,this.isPropagationStopped=Mp,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Zo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Zo)},persist:function(){},isPersistent:Zo}),r}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$o=Ht(Er),ps=y({},Er,{view:0,detail:0}),JT=Ht(ps),Sc,wc,gs,Jo=y({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ec,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==gs&&(gs&&n.type==="mousemove"?(Sc=n.screenX-gs.screenX,wc=n.screenY-gs.screenY):wc=Sc=0,gs=n),Sc)},movementY:function(n){return"movementY"in n?n.movementY:wc}}),Np=Ht(Jo),eE=y({},Jo,{dataTransfer:0}),tE=Ht(eE),nE=y({},ps,{relatedTarget:0}),Tc=Ht(nE),iE=y({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),rE=Ht(iE),aE=y({},Er,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),sE=Ht(aE),oE=y({},Er,{data:0}),Rp=Ht(oE),lE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uE={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"},cE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fE(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=cE[n])?!!r[n]:!1}function Ec(){return fE}var dE=y({},ps,{key:function(n){if(n.key){var r=lE[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Wo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?uE[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ec,charCode:function(n){return n.type==="keypress"?Wo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Wo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),hE=Ht(dE),mE=y({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Op=Ht(mE),pE=y({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ec}),gE=Ht(pE),yE=y({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),bE=Ht(yE),vE=y({},Jo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),xE=Ht(vE),SE=y({},Er,{newState:0,oldState:0}),wE=Ht(SE),TE=[9,13,27,32],Ac=ei&&"CompositionEvent"in window,ys=null;ei&&"documentMode"in document&&(ys=document.documentMode);var EE=ei&&"TextEvent"in window&&!ys,zp=ei&&(!Ac||ys&&8<ys&&11>=ys),Lp=" ",jp=!1;function Ip(n,r){switch(n){case"keyup":return TE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ca=!1;function AE(n,r){switch(n){case"compositionend":return Bp(r);case"keypress":return r.which!==32?null:(jp=!0,Lp);case"textInput":return n=r.data,n===Lp&&jp?null:n;default:return null}}function CE(n,r){if(ca)return n==="compositionend"||!Ac&&Ip(n,r)?(n=Dp(),Qo=xc=ki=null,ca=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return zp&&r.locale!=="ko"?null:r.data;default:return null}}var _E={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 Up(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!_E[n.type]:r==="textarea"}function Pp(n,r,s,l){la?ua?ua.push(l):ua=[l]:la=l,r=Hl(r,"onChange"),0<r.length&&(s=new $o("onChange","change",null,s,l),n.push({event:s,listeners:r}))}var bs=null,vs=null;function kE(n){wb(n,0)}function el(n){var r=ds(n);if(Sp(r))return n}function Vp(n,r){if(n==="change")return r}var Hp=!1;if(ei){var Cc;if(ei){var _c="oninput"in document;if(!_c){var Fp=document.createElement("div");Fp.setAttribute("oninput","return;"),_c=typeof Fp.oninput=="function"}Cc=_c}else Cc=!1;Hp=Cc&&(!document.documentMode||9<document.documentMode)}function qp(){bs&&(bs.detachEvent("onpropertychange",Gp),vs=bs=null)}function Gp(n){if(n.propertyName==="value"&&el(vs)){var r=[];Pp(r,vs,n,yc(n)),kp(kE,r)}}function DE(n,r,s){n==="focusin"?(qp(),bs=r,vs=s,bs.attachEvent("onpropertychange",Gp)):n==="focusout"&&qp()}function ME(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return el(vs)}function NE(n,r){if(n==="click")return el(r)}function RE(n,r){if(n==="input"||n==="change")return el(r)}function OE(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var $t=typeof Object.is=="function"?Object.is:OE;function xs(n,r){if($t(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),l=Object.keys(r);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var f=s[l];if(!Ei.call(r,f)||!$t(n[f],r[f]))return!1}return!0}function Yp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Xp(n,r){var s=Yp(n);n=0;for(var l;s;){if(s.nodeType===3){if(l=n+s.textContent.length,n<=r&&l>=r)return{node:s,offset:r-n};n=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Yp(s)}}function Kp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Kp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Qp(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Xo(n.document);r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=Xo(n.document)}return r}function kc(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var zE=ei&&"documentMode"in document&&11>=document.documentMode,fa=null,Dc=null,Ss=null,Mc=!1;function Wp(n,r,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Mc||fa==null||fa!==Xo(l)||(l=fa,"selectionStart"in l&&kc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ss&&xs(Ss,l)||(Ss=l,l=Hl(Dc,"onSelect"),0<l.length&&(r=new $o("onSelect","select",null,r,s),n.push({event:r,listeners:l}),r.target=fa)))}function Ar(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var da={animationend:Ar("Animation","AnimationEnd"),animationiteration:Ar("Animation","AnimationIteration"),animationstart:Ar("Animation","AnimationStart"),transitionrun:Ar("Transition","TransitionRun"),transitionstart:Ar("Transition","TransitionStart"),transitioncancel:Ar("Transition","TransitionCancel"),transitionend:Ar("Transition","TransitionEnd")},Nc={},Zp={};ei&&(Zp=document.createElement("div").style,"AnimationEvent"in window||(delete da.animationend.animation,delete da.animationiteration.animation,delete da.animationstart.animation),"TransitionEvent"in window||delete da.transitionend.transition);function Cr(n){if(Nc[n])return Nc[n];if(!da[n])return n;var r=da[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in Zp)return Nc[n]=r[s];return n}var $p=Cr("animationend"),Jp=Cr("animationiteration"),eg=Cr("animationstart"),LE=Cr("transitionrun"),jE=Cr("transitionstart"),IE=Cr("transitioncancel"),tg=Cr("transitionend"),ng=new Map,Rc="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(" ");Rc.push("scrollEnd");function An(n,r){ng.set(n,r),Tr(r,[n])}var tl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},hn=[],ha=0,Oc=0;function nl(){for(var n=ha,r=Oc=ha=0;r<n;){var s=hn[r];hn[r++]=null;var l=hn[r];hn[r++]=null;var f=hn[r];hn[r++]=null;var h=hn[r];if(hn[r++]=null,l!==null&&f!==null){var b=l.pending;b===null?f.next=f:(f.next=b.next,b.next=f),l.pending=f}h!==0&&ig(s,f,h)}}function il(n,r,s,l){hn[ha++]=n,hn[ha++]=r,hn[ha++]=s,hn[ha++]=l,Oc|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function zc(n,r,s,l){return il(n,r,s,l),rl(n)}function _r(n,r){return il(n,null,null,r),rl(n)}function ig(n,r,s){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s);for(var f=!1,h=n.return;h!==null;)h.childLanes|=s,l=h.alternate,l!==null&&(l.childLanes|=s),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(f=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,f&&r!==null&&(f=31-Ke(s),n=h.hiddenUpdates,l=n[f],l===null?n[f]=[r]:l.push(r),r.lane=s|536870912),h):null}function rl(n){if(50<Fs)throw Fs=0,qf=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var ma={};function BE(n,r,s,l){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(n,r,s,l){return new BE(n,r,s,l)}function Lc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ti(n,r){var s=n.alternate;return s===null?(s=Jt(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function rg(n,r){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,r=s.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function al(n,r,s,l,f,h){var b=0;if(l=n,typeof n=="function")Lc(n)&&(b=1);else if(typeof n=="string")b=FA(n,s,le.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case ne:return n=Jt(31,s,r,f),n.elementType=ne,n.lanes=h,n;case D:return kr(s.children,f,h,r);case R:b=8,f|=24;break;case C:return n=Jt(12,s,r,f|2),n.elementType=C,n.lanes=h,n;case Z:return n=Jt(13,s,r,f),n.elementType=Z,n.lanes=h,n;case L:return n=Jt(19,s,r,f),n.elementType=L,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case N:b=10;break e;case P:b=9;break e;case q:b=11;break e;case K:b=14;break e;case V:b=16,l=null;break e}b=29,s=Error(a(130,n===null?"null":typeof n,"")),l=null}return r=Jt(b,s,r,f),r.elementType=n,r.type=l,r.lanes=h,r}function kr(n,r,s,l){return n=Jt(7,n,l,r),n.lanes=s,n}function jc(n,r,s){return n=Jt(6,n,null,r),n.lanes=s,n}function ag(n){var r=Jt(18,null,null,0);return r.stateNode=n,r}function Ic(n,r,s){return r=Jt(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var sg=new WeakMap;function mn(n,r){if(typeof n=="object"&&n!==null){var s=sg.get(n);return s!==void 0?s:(r={value:n,source:r,stack:cn(r)},sg.set(n,r),r)}return{value:n,source:r,stack:cn(r)}}var pa=[],ga=0,sl=null,ws=0,pn=[],gn=0,Di=null,jn=1,In="";function ni(n,r){pa[ga++]=ws,pa[ga++]=sl,sl=n,ws=r}function og(n,r,s){pn[gn++]=jn,pn[gn++]=In,pn[gn++]=Di,Di=n;var l=jn;n=In;var f=32-Ke(l)-1;l&=~(1<<f),s+=1;var h=32-Ke(r)+f;if(30<h){var b=f-f%5;h=(l&(1<<b)-1).toString(32),l>>=b,f-=b,jn=1<<32-Ke(r)+f|s<<f|l,In=h+n}else jn=1<<h|s<<f|l,In=n}function Bc(n){n.return!==null&&(ni(n,1),og(n,1,0))}function Uc(n){for(;n===sl;)sl=pa[--ga],pa[ga]=null,ws=pa[--ga],pa[ga]=null;for(;n===Di;)Di=pn[--gn],pn[gn]=null,In=pn[--gn],pn[gn]=null,jn=pn[--gn],pn[gn]=null}function lg(n,r){pn[gn++]=jn,pn[gn++]=In,pn[gn++]=Di,jn=r.id,In=r.overflow,Di=n}var At=null,et=null,je=!1,Mi=null,yn=!1,Pc=Error(a(519));function Ni(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ts(mn(r,n)),Pc}function ug(n){var r=n.stateNode,s=n.type,l=n.memoizedProps;switch(r[Et]=n,r[Vt]=l,s){case"dialog":Oe("cancel",r),Oe("close",r);break;case"iframe":case"object":case"embed":Oe("load",r);break;case"video":case"audio":for(s=0;s<Gs.length;s++)Oe(Gs[s],r);break;case"source":Oe("error",r);break;case"img":case"image":case"link":Oe("error",r),Oe("load",r);break;case"details":Oe("toggle",r);break;case"input":Oe("invalid",r),wp(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",r);break;case"textarea":Oe("invalid",r),Ep(r,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||l.suppressHydrationWarning===!0||Cb(r.textContent,s)?(l.popover!=null&&(Oe("beforetoggle",r),Oe("toggle",r)),l.onScroll!=null&&Oe("scroll",r),l.onScrollEnd!=null&&Oe("scrollend",r),l.onClick!=null&&(r.onclick=Jn),r=!0):r=!1,r||Ni(n,!0)}function cg(n){for(At=n.return;At;)switch(At.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:At=At.return}}function ya(n){if(n!==At)return!1;if(!je)return cg(n),je=!0,!1;var r=n.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||ad(n.type,n.memoizedProps)),s=!s),s&&et&&Ni(n),cg(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));et=Lb(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));et=Lb(n)}else r===27?(r=et,Gi(n.type)?(n=cd,cd=null,et=n):et=r):et=At?vn(n.stateNode.nextSibling):null;return!0}function Dr(){et=At=null,je=!1}function Vc(){var n=Mi;return n!==null&&(Yt===null?Yt=n:Yt.push.apply(Yt,n),Mi=null),n}function Ts(n){Mi===null?Mi=[n]:Mi.push(n)}var Hc=k(null),Mr=null,ii=null;function Ri(n,r,s){T(Hc,r._currentValue),r._currentValue=s}function ri(n){n._currentValue=Hc.current,F(Hc)}function Fc(n,r,s){for(;n!==null;){var l=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),n===s)break;n=n.return}}function qc(n,r,s,l){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var h=f.dependencies;if(h!==null){var b=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var _=0;_<r.length;_++)if(S.context===r[_]){h.lanes|=s,S=h.alternate,S!==null&&(S.lanes|=s),Fc(h.return,s,n),l||(b=null);break e}h=S.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(a(341));b.lanes|=s,h=b.alternate,h!==null&&(h.lanes|=s),Fc(b,s,n),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===n){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function ba(n,r,s,l){n=null;for(var f=r,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(a(387));if(b=b.memoizedProps,b!==null){var S=f.type;$t(f.pendingProps.value,b.value)||(n!==null?n.push(S):n=[S])}}else if(f===Ee.current){if(b=f.alternate,b===null)throw Error(a(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(Ws):n=[Ws])}f=f.return}n!==null&&qc(r,n,s,l),r.flags|=262144}function ol(n){for(n=n.firstContext;n!==null;){if(!$t(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Nr(n){Mr=n,ii=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Ct(n){return fg(Mr,n)}function ll(n,r){return Mr===null&&Nr(n),fg(n,r)}function fg(n,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},ii===null){if(n===null)throw Error(a(308));ii=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else ii=ii.next=r;return s}var UE=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(s,l){n.push(l)}};this.abort=function(){r.aborted=!0,n.forEach(function(s){return s()})}},PE=e.unstable_scheduleCallback,VE=e.unstable_NormalPriority,ct={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gc(){return{controller:new UE,data:new Map,refCount:0}}function Es(n){n.refCount--,n.refCount===0&&PE(VE,function(){n.controller.abort()})}var As=null,Yc=0,va=0,xa=null;function HE(n,r){if(As===null){var s=As=[];Yc=0,va=Wf(),xa={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Yc++,r.then(dg,dg),r}function dg(){if(--Yc===0&&As!==null){xa!==null&&(xa.status="fulfilled");var n=As;As=null,va=0,xa=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function FE(n,r){var s=[],l={status:"pending",value:null,reason:null,then:function(f){s.push(f)}};return n.then(function(){l.status="fulfilled",l.value=r;for(var f=0;f<s.length;f++)(0,s[f])(r)},function(f){for(l.status="rejected",l.reason=f,f=0;f<s.length;f++)(0,s[f])(void 0)}),l}var hg=O.S;O.S=function(n,r){Wy=Tt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&HE(n,r),hg!==null&&hg(n,r)};var Rr=k(null);function Xc(){var n=Rr.current;return n!==null?n:Qe.pooledCache}function ul(n,r){r===null?T(Rr,Rr.current):T(Rr,r.pool)}function mg(){var n=Xc();return n===null?null:{parent:ct._currentValue,pool:n}}var Sa=Error(a(460)),Kc=Error(a(474)),cl=Error(a(542)),fl={then:function(){}};function pg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function gg(n,r,s){switch(s=n[s],s===void 0?n.push(r):s!==r&&(r.then(Jn,Jn),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,bg(n),n;default:if(typeof r.status=="string")r.then(Jn,Jn);else{if(n=Qe,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(l){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=l}},function(l){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,bg(n),n}throw zr=r,Sa}}function Or(n){try{var r=n._init;return r(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(zr=s,Sa):s}}var zr=null;function yg(){if(zr===null)throw Error(a(459));var n=zr;return zr=null,n}function bg(n){if(n===Sa||n===cl)throw Error(a(483))}var wa=null,Cs=0;function dl(n){var r=Cs;return Cs+=1,wa===null&&(wa=[]),gg(wa,n,r)}function _s(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function hl(n,r){throw r.$$typeof===v?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function vg(n){function r(z,M){if(n){var j=z.deletions;j===null?(z.deletions=[M],z.flags|=16):j.push(M)}}function s(z,M){if(!n)return null;for(;M!==null;)r(z,M),M=M.sibling;return null}function l(z){for(var M=new Map;z!==null;)z.key!==null?M.set(z.key,z):M.set(z.index,z),z=z.sibling;return M}function f(z,M){return z=ti(z,M),z.index=0,z.sibling=null,z}function h(z,M,j){return z.index=j,n?(j=z.alternate,j!==null?(j=j.index,j<M?(z.flags|=67108866,M):j):(z.flags|=67108866,M)):(z.flags|=1048576,M)}function b(z){return n&&z.alternate===null&&(z.flags|=67108866),z}function S(z,M,j,Y){return M===null||M.tag!==6?(M=jc(j,z.mode,Y),M.return=z,M):(M=f(M,j),M.return=z,M)}function _(z,M,j,Y){var ve=j.type;return ve===D?G(z,M,j.props.children,Y,j.key):M!==null&&(M.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===V&&Or(ve)===M.type)?(M=f(M,j.props),_s(M,j),M.return=z,M):(M=al(j.type,j.key,j.props,null,z.mode,Y),_s(M,j),M.return=z,M)}function I(z,M,j,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==j.containerInfo||M.stateNode.implementation!==j.implementation?(M=Ic(j,z.mode,Y),M.return=z,M):(M=f(M,j.children||[]),M.return=z,M)}function G(z,M,j,Y,ve){return M===null||M.tag!==7?(M=kr(j,z.mode,Y,ve),M.return=z,M):(M=f(M,j),M.return=z,M)}function X(z,M,j){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=jc(""+M,z.mode,j),M.return=z,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case x:return j=al(M.type,M.key,M.props,null,z.mode,j),_s(j,M),j.return=z,j;case A:return M=Ic(M,z.mode,j),M.return=z,M;case V:return M=Or(M),X(z,M,j)}if($(M)||ae(M))return M=kr(M,z.mode,j,null),M.return=z,M;if(typeof M.then=="function")return X(z,dl(M),j);if(M.$$typeof===N)return X(z,ll(z,M),j);hl(z,M)}return null}function U(z,M,j,Y){var ve=M!==null?M.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ve!==null?null:S(z,M,""+j,Y);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case x:return j.key===ve?_(z,M,j,Y):null;case A:return j.key===ve?I(z,M,j,Y):null;case V:return j=Or(j),U(z,M,j,Y)}if($(j)||ae(j))return ve!==null?null:G(z,M,j,Y,null);if(typeof j.then=="function")return U(z,M,dl(j),Y);if(j.$$typeof===N)return U(z,M,ll(z,j),Y);hl(z,j)}return null}function H(z,M,j,Y,ve){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return z=z.get(j)||null,S(M,z,""+Y,ve);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:return z=z.get(Y.key===null?j:Y.key)||null,_(M,z,Y,ve);case A:return z=z.get(Y.key===null?j:Y.key)||null,I(M,z,Y,ve);case V:return Y=Or(Y),H(z,M,j,Y,ve)}if($(Y)||ae(Y))return z=z.get(j)||null,G(M,z,Y,ve,null);if(typeof Y.then=="function")return H(z,M,j,dl(Y),ve);if(Y.$$typeof===N)return H(z,M,j,ll(M,Y),ve);hl(M,Y)}return null}function de(z,M,j,Y){for(var ve=null,Ie=null,ge=M,De=M=0,Le=null;ge!==null&&De<j.length;De++){ge.index>De?(Le=ge,ge=null):Le=ge.sibling;var Be=U(z,ge,j[De],Y);if(Be===null){ge===null&&(ge=Le);break}n&&ge&&Be.alternate===null&&r(z,ge),M=h(Be,M,De),Ie===null?ve=Be:Ie.sibling=Be,Ie=Be,ge=Le}if(De===j.length)return s(z,ge),je&&ni(z,De),ve;if(ge===null){for(;De<j.length;De++)ge=X(z,j[De],Y),ge!==null&&(M=h(ge,M,De),Ie===null?ve=ge:Ie.sibling=ge,Ie=ge);return je&&ni(z,De),ve}for(ge=l(ge);De<j.length;De++)Le=H(ge,z,De,j[De],Y),Le!==null&&(n&&Le.alternate!==null&&ge.delete(Le.key===null?De:Le.key),M=h(Le,M,De),Ie===null?ve=Le:Ie.sibling=Le,Ie=Le);return n&&ge.forEach(function(Wi){return r(z,Wi)}),je&&ni(z,De),ve}function xe(z,M,j,Y){if(j==null)throw Error(a(151));for(var ve=null,Ie=null,ge=M,De=M=0,Le=null,Be=j.next();ge!==null&&!Be.done;De++,Be=j.next()){ge.index>De?(Le=ge,ge=null):Le=ge.sibling;var Wi=U(z,ge,Be.value,Y);if(Wi===null){ge===null&&(ge=Le);break}n&&ge&&Wi.alternate===null&&r(z,ge),M=h(Wi,M,De),Ie===null?ve=Wi:Ie.sibling=Wi,Ie=Wi,ge=Le}if(Be.done)return s(z,ge),je&&ni(z,De),ve;if(ge===null){for(;!Be.done;De++,Be=j.next())Be=X(z,Be.value,Y),Be!==null&&(M=h(Be,M,De),Ie===null?ve=Be:Ie.sibling=Be,Ie=Be);return je&&ni(z,De),ve}for(ge=l(ge);!Be.done;De++,Be=j.next())Be=H(ge,z,De,Be.value,Y),Be!==null&&(n&&Be.alternate!==null&&ge.delete(Be.key===null?De:Be.key),M=h(Be,M,De),Ie===null?ve=Be:Ie.sibling=Be,Ie=Be);return n&&ge.forEach(function(eC){return r(z,eC)}),je&&ni(z,De),ve}function Xe(z,M,j,Y){if(typeof j=="object"&&j!==null&&j.type===D&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case x:e:{for(var ve=j.key;M!==null;){if(M.key===ve){if(ve=j.type,ve===D){if(M.tag===7){s(z,M.sibling),Y=f(M,j.props.children),Y.return=z,z=Y;break e}}else if(M.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===V&&Or(ve)===M.type){s(z,M.sibling),Y=f(M,j.props),_s(Y,j),Y.return=z,z=Y;break e}s(z,M);break}else r(z,M);M=M.sibling}j.type===D?(Y=kr(j.props.children,z.mode,Y,j.key),Y.return=z,z=Y):(Y=al(j.type,j.key,j.props,null,z.mode,Y),_s(Y,j),Y.return=z,z=Y)}return b(z);case A:e:{for(ve=j.key;M!==null;){if(M.key===ve)if(M.tag===4&&M.stateNode.containerInfo===j.containerInfo&&M.stateNode.implementation===j.implementation){s(z,M.sibling),Y=f(M,j.children||[]),Y.return=z,z=Y;break e}else{s(z,M);break}else r(z,M);M=M.sibling}Y=Ic(j,z.mode,Y),Y.return=z,z=Y}return b(z);case V:return j=Or(j),Xe(z,M,j,Y)}if($(j))return de(z,M,j,Y);if(ae(j)){if(ve=ae(j),typeof ve!="function")throw Error(a(150));return j=ve.call(j),xe(z,M,j,Y)}if(typeof j.then=="function")return Xe(z,M,dl(j),Y);if(j.$$typeof===N)return Xe(z,M,ll(z,j),Y);hl(z,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,M!==null&&M.tag===6?(s(z,M.sibling),Y=f(M,j),Y.return=z,z=Y):(s(z,M),Y=jc(j,z.mode,Y),Y.return=z,z=Y),b(z)):s(z,M)}return function(z,M,j,Y){try{Cs=0;var ve=Xe(z,M,j,Y);return wa=null,ve}catch(ge){if(ge===Sa||ge===cl)throw ge;var Ie=Jt(29,ge,null,z.mode);return Ie.lanes=Y,Ie.return=z,Ie}finally{}}}var Lr=vg(!0),xg=vg(!1),Oi=!1;function Qc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wc(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function zi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Li(n,r,s){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ue&2)!==0){var f=l.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),l.pending=r,r=rl(n),ig(n,null,s),r}return il(n,l,r,s),rl(n)}function ks(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,fp(n,s)}}function Zc(n,r){var s=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var f=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?f=h=b:h=h.next=b,s=s.next}while(s!==null);h===null?f=h=r:h=h.next=r}else f=h=r;s={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}var $c=!1;function Ds(){if($c){var n=xa;if(n!==null)throw n}}function Ms(n,r,s,l){$c=!1;var f=n.updateQueue;Oi=!1;var h=f.firstBaseUpdate,b=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var _=S,I=_.next;_.next=null,b===null?h=I:b.next=I,b=_;var G=n.alternate;G!==null&&(G=G.updateQueue,S=G.lastBaseUpdate,S!==b&&(S===null?G.firstBaseUpdate=I:S.next=I,G.lastBaseUpdate=_))}if(h!==null){var X=f.baseState;b=0,G=I=_=null,S=h;do{var U=S.lane&-536870913,H=U!==S.lane;if(H?(ze&U)===U:(l&U)===U){U!==0&&U===va&&($c=!0),G!==null&&(G=G.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var de=n,xe=S;U=r;var Xe=s;switch(xe.tag){case 1:if(de=xe.payload,typeof de=="function"){X=de.call(Xe,X,U);break e}X=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=xe.payload,U=typeof de=="function"?de.call(Xe,X,U):de,U==null)break e;X=y({},X,U);break e;case 2:Oi=!0}}U=S.callback,U!==null&&(n.flags|=64,H&&(n.flags|=8192),H=f.callbacks,H===null?f.callbacks=[U]:H.push(U))}else H={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},G===null?(I=G=H,_=X):G=G.next=H,b|=U;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;H=S,S=H.next,H.next=null,f.lastBaseUpdate=H,f.shared.pending=null}}while(!0);G===null&&(_=X),f.baseState=_,f.firstBaseUpdate=I,f.lastBaseUpdate=G,h===null&&(f.shared.lanes=0),Pi|=b,n.lanes=b,n.memoizedState=X}}function Sg(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function wg(n,r){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Sg(s[n],r)}var Ta=k(null),ml=k(0);function Tg(n,r){n=hi,T(ml,n),T(Ta,r),hi=n|r.baseLanes}function Jc(){T(ml,hi),T(Ta,Ta.current)}function ef(){hi=ml.current,F(Ta),F(ml)}var en=k(null),bn=null;function ji(n){var r=n.alternate;T(lt,lt.current&1),T(en,n),bn===null&&(r===null||Ta.current!==null||r.memoizedState!==null)&&(bn=n)}function tf(n){T(lt,lt.current),T(en,n),bn===null&&(bn=n)}function Eg(n){n.tag===22?(T(lt,lt.current),T(en,n),bn===null&&(bn=n)):Ii()}function Ii(){T(lt,lt.current),T(en,en.current)}function tn(n){F(en),bn===n&&(bn=null),F(lt)}var lt=k(0);function pl(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||ld(s)||ud(s)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ai=0,_e=null,Ge=null,ft=null,gl=!1,Ea=!1,jr=!1,yl=0,Ns=0,Aa=null,qE=0;function rt(){throw Error(a(321))}function nf(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!$t(n[s],r[s]))return!1;return!0}function rf(n,r,s,l,f,h){return ai=h,_e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,O.H=n===null||n.memoizedState===null?oy:vf,jr=!1,h=s(l,f),jr=!1,Ea&&(h=Cg(r,s,l,f)),Ag(n),h}function Ag(n){O.H=zs;var r=Ge!==null&&Ge.next!==null;if(ai=0,ft=Ge=_e=null,gl=!1,Ns=0,Aa=null,r)throw Error(a(300));n===null||dt||(n=n.dependencies,n!==null&&ol(n)&&(dt=!0))}function Cg(n,r,s,l){_e=n;var f=0;do{if(Ea&&(Aa=null),Ns=0,Ea=!1,25<=f)throw Error(a(301));if(f+=1,ft=Ge=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}O.H=ly,h=r(s,l)}while(Ea);return h}function GE(){var n=O.H,r=n.useState()[0];return r=typeof r.then=="function"?Rs(r):r,n=n.useState()[0],(Ge!==null?Ge.memoizedState:null)!==n&&(_e.flags|=1024),r}function af(){var n=yl!==0;return yl=0,n}function sf(n,r,s){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~s}function of(n){if(gl){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}gl=!1}ai=0,ft=Ge=_e=null,Ea=!1,Ns=yl=0,Aa=null}function jt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?_e.memoizedState=ft=n:ft=ft.next=n,ft}function ut(){if(Ge===null){var n=_e.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var r=ft===null?_e.memoizedState:ft.next;if(r!==null)ft=r,Ge=n;else{if(n===null)throw _e.alternate===null?Error(a(467)):Error(a(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ft===null?_e.memoizedState=ft=n:ft=ft.next=n}return ft}function bl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rs(n){var r=Ns;return Ns+=1,Aa===null&&(Aa=[]),n=gg(Aa,n,r),r=_e,(ft===null?r.memoizedState:ft.next)===null&&(r=r.alternate,O.H=r===null||r.memoizedState===null?oy:vf),n}function vl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Rs(n);if(n.$$typeof===N)return Ct(n)}throw Error(a(438,String(n)))}function lf(n){var r=null,s=_e.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var l=_e.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),s===null&&(s=bl(),_e.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(n),l=0;l<n;l++)s[l]=re;return r.index++,s}function si(n,r){return typeof r=="function"?r(n):r}function xl(n){var r=ut();return uf(r,Ge,n)}function uf(n,r,s){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=s;var f=n.baseQueue,h=l.pending;if(h!==null){if(f!==null){var b=f.next;f.next=h.next,h.next=b}r.baseQueue=f=h,l.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{r=f.next;var S=b=null,_=null,I=r,G=!1;do{var X=I.lane&-536870913;if(X!==I.lane?(ze&X)===X:(ai&X)===X){var U=I.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),X===va&&(G=!0);else if((ai&U)===U){I=I.next,U===va&&(G=!0);continue}else X={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},_===null?(S=_=X,b=h):_=_.next=X,_e.lanes|=U,Pi|=U;X=I.action,jr&&s(h,X),h=I.hasEagerState?I.eagerState:s(h,X)}else U={lane:X,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},_===null?(S=_=U,b=h):_=_.next=U,_e.lanes|=X,Pi|=X;I=I.next}while(I!==null&&I!==r);if(_===null?b=h:_.next=S,!$t(h,n.memoizedState)&&(dt=!0,G&&(s=xa,s!==null)))throw s;n.memoizedState=h,n.baseState=b,n.baseQueue=_,l.lastRenderedState=h}return f===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function cf(n){var r=ut(),s=r.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var l=s.dispatch,f=s.pending,h=r.memoizedState;if(f!==null){s.pending=null;var b=f=f.next;do h=n(h,b.action),b=b.next;while(b!==f);$t(h,r.memoizedState)||(dt=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),s.lastRenderedState=h}return[h,l]}function _g(n,r,s){var l=_e,f=ut(),h=je;if(h){if(s===void 0)throw Error(a(407));s=s()}else s=r();var b=!$t((Ge||f).memoizedState,s);if(b&&(f.memoizedState=s,dt=!0),f=f.queue,hf(Mg.bind(null,l,f,n),[n]),f.getSnapshot!==r||b||ft!==null&&ft.memoizedState.tag&1){if(l.flags|=2048,Ca(9,{destroy:void 0},Dg.bind(null,l,f,s,r),null),Qe===null)throw Error(a(349));h||(ai&127)!==0||kg(l,r,s)}return s}function kg(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=_e.updateQueue,r===null?(r=bl(),_e.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function Dg(n,r,s,l){r.value=s,r.getSnapshot=l,Ng(r)&&Rg(n)}function Mg(n,r,s){return s(function(){Ng(r)&&Rg(n)})}function Ng(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!$t(n,s)}catch{return!0}}function Rg(n){var r=_r(n,2);r!==null&&Xt(r,n,2)}function ff(n){var r=jt();if(typeof n=="function"){var s=n;if(n=s(),jr){Pt(!0);try{s()}finally{Pt(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:n},r}function Og(n,r,s,l){return n.baseState=s,uf(n,Ge,typeof l=="function"?l:si)}function YE(n,r,s,l,f){if(Tl(n))throw Error(a(485));if(n=r.action,n!==null){var h={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};O.T!==null?s(!0):h.isTransition=!1,l(h),s=r.pending,s===null?(h.next=r.pending=h,zg(r,h)):(h.next=s.next,r.pending=s.next=h)}}function zg(n,r){var s=r.action,l=r.payload,f=n.state;if(r.isTransition){var h=O.T,b={};O.T=b;try{var S=s(f,l),_=O.S;_!==null&&_(b,S),Lg(n,r,S)}catch(I){df(n,r,I)}finally{h!==null&&b.types!==null&&(h.types=b.types),O.T=h}}else try{h=s(f,l),Lg(n,r,h)}catch(I){df(n,r,I)}}function Lg(n,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){jg(n,r,l)},function(l){return df(n,r,l)}):jg(n,r,s)}function jg(n,r,s){r.status="fulfilled",r.value=s,Ig(r),n.state=s,r=n.pending,r!==null&&(s=r.next,s===r?n.pending=null:(s=s.next,r.next=s,zg(n,s)))}function df(n,r,s){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=s,Ig(r),r=r.next;while(r!==l)}n.action=null}function Ig(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Bg(n,r){return r}function Ug(n,r){if(je){var s=Qe.formState;if(s!==null){e:{var l=_e;if(je){if(et){t:{for(var f=et,h=yn;f.nodeType!==8;){if(!h){f=null;break t}if(f=vn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){et=vn(f.nextSibling),l=f.data==="F!";break e}}Ni(l)}l=!1}l&&(r=s[0])}}return s=jt(),s.memoizedState=s.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bg,lastRenderedState:r},s.queue=l,s=ry.bind(null,_e,l),l.dispatch=s,l=ff(!1),h=bf.bind(null,_e,!1,l.queue),l=jt(),f={state:r,dispatch:null,action:n,pending:null},l.queue=f,s=YE.bind(null,_e,f,h,s),f.dispatch=s,l.memoizedState=n,[r,s,!1]}function Pg(n){var r=ut();return Vg(r,Ge,n)}function Vg(n,r,s){if(r=uf(n,r,Bg)[0],n=xl(si)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=Rs(r)}catch(b){throw b===Sa?cl:b}else l=r;r=ut();var f=r.queue,h=f.dispatch;return s!==r.memoizedState&&(_e.flags|=2048,Ca(9,{destroy:void 0},XE.bind(null,f,s),null)),[l,h,n]}function XE(n,r){n.action=r}function Hg(n){var r=ut(),s=Ge;if(s!==null)return Vg(r,s,n);ut(),r=r.memoizedState,s=ut();var l=s.queue.dispatch;return s.memoizedState=n,[r,l,!1]}function Ca(n,r,s,l){return n={tag:n,create:s,deps:l,inst:r,next:null},r=_e.updateQueue,r===null&&(r=bl(),_e.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=n.next=n:(l=s.next,s.next=n,n.next=l,r.lastEffect=n),n}function Fg(){return ut().memoizedState}function Sl(n,r,s,l){var f=jt();_e.flags|=n,f.memoizedState=Ca(1|r,{destroy:void 0},s,l===void 0?null:l)}function wl(n,r,s,l){var f=ut();l=l===void 0?null:l;var h=f.memoizedState.inst;Ge!==null&&l!==null&&nf(l,Ge.memoizedState.deps)?f.memoizedState=Ca(r,h,s,l):(_e.flags|=n,f.memoizedState=Ca(1|r,h,s,l))}function qg(n,r){Sl(8390656,8,n,r)}function hf(n,r){wl(2048,8,n,r)}function KE(n){_e.flags|=4;var r=_e.updateQueue;if(r===null)r=bl(),_e.updateQueue=r,r.events=[n];else{var s=r.events;s===null?r.events=[n]:s.push(n)}}function Gg(n){var r=ut().memoizedState;return KE({ref:r,nextImpl:n}),function(){if((Ue&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Yg(n,r){return wl(4,2,n,r)}function Xg(n,r){return wl(4,4,n,r)}function Kg(n,r){if(typeof r=="function"){n=n();var s=r(n);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Qg(n,r,s){s=s!=null?s.concat([n]):null,wl(4,4,Kg.bind(null,r,n),s)}function mf(){}function Wg(n,r){var s=ut();r=r===void 0?null:r;var l=s.memoizedState;return r!==null&&nf(r,l[1])?l[0]:(s.memoizedState=[n,r],n)}function Zg(n,r){var s=ut();r=r===void 0?null:r;var l=s.memoizedState;if(r!==null&&nf(r,l[1]))return l[0];if(l=n(),jr){Pt(!0);try{n()}finally{Pt(!1)}}return s.memoizedState=[l,r],l}function pf(n,r,s){return s===void 0||(ai&1073741824)!==0&&(ze&261930)===0?n.memoizedState=r:(n.memoizedState=s,n=$y(),_e.lanes|=n,Pi|=n,s)}function $g(n,r,s,l){return $t(s,r)?s:Ta.current!==null?(n=pf(n,s,l),$t(n,r)||(dt=!0),n):(ai&42)===0||(ai&1073741824)!==0&&(ze&261930)===0?(dt=!0,n.memoizedState=s):(n=$y(),_e.lanes|=n,Pi|=n,r)}function Jg(n,r,s,l,f){var h=Q.p;Q.p=h!==0&&8>h?h:8;var b=O.T,S={};O.T=S,bf(n,!1,r,s);try{var _=f(),I=O.S;if(I!==null&&I(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var G=FE(_,l);Os(n,r,G,an(n))}else Os(n,r,l,an(n))}catch(X){Os(n,r,{then:function(){},status:"rejected",reason:X},an())}finally{Q.p=h,b!==null&&S.types!==null&&(b.types=S.types),O.T=b}}function QE(){}function gf(n,r,s,l){if(n.tag!==5)throw Error(a(476));var f=ey(n).queue;Jg(n,f,r,J,s===null?QE:function(){return ty(n),s(l)})}function ey(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:J},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:s},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function ty(n){var r=ey(n);r.next===null&&(r=n.alternate.memoizedState),Os(n,r.next.queue,{},an())}function yf(){return Ct(Ws)}function ny(){return ut().memoizedState}function iy(){return ut().memoizedState}function WE(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var s=an();n=zi(s);var l=Li(r,n,s);l!==null&&(Xt(l,r,s),ks(l,r,s)),r={cache:Gc()},n.payload=r;return}r=r.return}}function ZE(n,r,s){var l=an();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tl(n)?ay(r,s):(s=zc(n,r,s,l),s!==null&&(Xt(s,n,l),sy(s,r,l)))}function ry(n,r,s){var l=an();Os(n,r,s,l)}function Os(n,r,s,l){var f={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Tl(n))ay(r,f);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var b=r.lastRenderedState,S=h(b,s);if(f.hasEagerState=!0,f.eagerState=S,$t(S,b))return il(n,r,f,0),Qe===null&&nl(),!1}catch{}finally{}if(s=zc(n,r,f,l),s!==null)return Xt(s,n,l),sy(s,r,l),!0}return!1}function bf(n,r,s,l){if(l={lane:2,revertLane:Wf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Tl(n)){if(r)throw Error(a(479))}else r=zc(n,s,l,2),r!==null&&Xt(r,n,2)}function Tl(n){var r=n.alternate;return n===_e||r!==null&&r===_e}function ay(n,r){Ea=gl=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function sy(n,r,s){if((s&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,fp(n,s)}}var zs={readContext:Ct,use:vl,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt};zs.useEffectEvent=rt;var oy={readContext:Ct,use:vl,useCallback:function(n,r){return jt().memoizedState=[n,r===void 0?null:r],n},useContext:Ct,useEffect:qg,useImperativeHandle:function(n,r,s){s=s!=null?s.concat([n]):null,Sl(4194308,4,Kg.bind(null,r,n),s)},useLayoutEffect:function(n,r){return Sl(4194308,4,n,r)},useInsertionEffect:function(n,r){Sl(4,2,n,r)},useMemo:function(n,r){var s=jt();r=r===void 0?null:r;var l=n();if(jr){Pt(!0);try{n()}finally{Pt(!1)}}return s.memoizedState=[l,r],l},useReducer:function(n,r,s){var l=jt();if(s!==void 0){var f=s(r);if(jr){Pt(!0);try{s(r)}finally{Pt(!1)}}}else f=r;return l.memoizedState=l.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},l.queue=n,n=n.dispatch=ZE.bind(null,_e,n),[l.memoizedState,n]},useRef:function(n){var r=jt();return n={current:n},r.memoizedState=n},useState:function(n){n=ff(n);var r=n.queue,s=ry.bind(null,_e,r);return r.dispatch=s,[n.memoizedState,s]},useDebugValue:mf,useDeferredValue:function(n,r){var s=jt();return pf(s,n,r)},useTransition:function(){var n=ff(!1);return n=Jg.bind(null,_e,n.queue,!0,!1),jt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,s){var l=_e,f=jt();if(je){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),Qe===null)throw Error(a(349));(ze&127)!==0||kg(l,r,s)}f.memoizedState=s;var h={value:s,getSnapshot:r};return f.queue=h,qg(Mg.bind(null,l,h,n),[n]),l.flags|=2048,Ca(9,{destroy:void 0},Dg.bind(null,l,h,s,r),null),s},useId:function(){var n=jt(),r=Qe.identifierPrefix;if(je){var s=In,l=jn;s=(l&~(1<<32-Ke(l)-1)).toString(32)+s,r="_"+r+"R_"+s,s=yl++,0<s&&(r+="H"+s.toString(32)),r+="_"}else s=qE++,r="_"+r+"r_"+s.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:yf,useFormState:Ug,useActionState:Ug,useOptimistic:function(n){var r=jt();r.memoizedState=r.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=bf.bind(null,_e,!0,s),s.dispatch=r,[n,r]},useMemoCache:lf,useCacheRefresh:function(){return jt().memoizedState=WE.bind(null,_e)},useEffectEvent:function(n){var r=jt(),s={impl:n};return r.memoizedState=s,function(){if((Ue&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},vf={readContext:Ct,use:vl,useCallback:Wg,useContext:Ct,useEffect:hf,useImperativeHandle:Qg,useInsertionEffect:Yg,useLayoutEffect:Xg,useMemo:Zg,useReducer:xl,useRef:Fg,useState:function(){return xl(si)},useDebugValue:mf,useDeferredValue:function(n,r){var s=ut();return $g(s,Ge.memoizedState,n,r)},useTransition:function(){var n=xl(si)[0],r=ut().memoizedState;return[typeof n=="boolean"?n:Rs(n),r]},useSyncExternalStore:_g,useId:ny,useHostTransitionStatus:yf,useFormState:Pg,useActionState:Pg,useOptimistic:function(n,r){var s=ut();return Og(s,Ge,n,r)},useMemoCache:lf,useCacheRefresh:iy};vf.useEffectEvent=Gg;var ly={readContext:Ct,use:vl,useCallback:Wg,useContext:Ct,useEffect:hf,useImperativeHandle:Qg,useInsertionEffect:Yg,useLayoutEffect:Xg,useMemo:Zg,useReducer:cf,useRef:Fg,useState:function(){return cf(si)},useDebugValue:mf,useDeferredValue:function(n,r){var s=ut();return Ge===null?pf(s,n,r):$g(s,Ge.memoizedState,n,r)},useTransition:function(){var n=cf(si)[0],r=ut().memoizedState;return[typeof n=="boolean"?n:Rs(n),r]},useSyncExternalStore:_g,useId:ny,useHostTransitionStatus:yf,useFormState:Hg,useActionState:Hg,useOptimistic:function(n,r){var s=ut();return Ge!==null?Og(s,Ge,n,r):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:lf,useCacheRefresh:iy};ly.useEffectEvent=Gg;function xf(n,r,s,l){r=n.memoizedState,s=s(l,r),s=s==null?r:y({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var Sf={enqueueSetState:function(n,r,s){n=n._reactInternals;var l=an(),f=zi(l);f.payload=r,s!=null&&(f.callback=s),r=Li(n,f,l),r!==null&&(Xt(r,n,l),ks(r,n,l))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var l=an(),f=zi(l);f.tag=1,f.payload=r,s!=null&&(f.callback=s),r=Li(n,f,l),r!==null&&(Xt(r,n,l),ks(r,n,l))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=an(),l=zi(s);l.tag=2,r!=null&&(l.callback=r),r=Li(n,l,s),r!==null&&(Xt(r,n,s),ks(r,n,s))}};function uy(n,r,s,l,f,h,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,h,b):r.prototype&&r.prototype.isPureReactComponent?!xs(s,l)||!xs(f,h):!0}function cy(n,r,s,l){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,l),r.state!==n&&Sf.enqueueReplaceState(r,r.state,null)}function Ir(n,r){var s=r;if("ref"in r){s={};for(var l in r)l!=="ref"&&(s[l]=r[l])}if(n=n.defaultProps){s===r&&(s=y({},s));for(var f in n)s[f]===void 0&&(s[f]=n[f])}return s}function fy(n){tl(n)}function dy(n){console.error(n)}function hy(n){tl(n)}function El(n,r){try{var s=n.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function my(n,r,s){try{var l=n.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function wf(n,r,s){return s=zi(s),s.tag=3,s.payload={element:null},s.callback=function(){El(n,r)},s}function py(n){return n=zi(n),n.tag=3,n}function gy(n,r,s,l){var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=l.value;n.payload=function(){return f(h)},n.callback=function(){my(r,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(n.callback=function(){my(r,s,l),typeof f!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function $E(n,r,s,l,f){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=s.alternate,r!==null&&ba(r,s,f,!0),s=en.current,s!==null){switch(s.tag){case 31:case 13:return bn===null?jl():s.alternate===null&&at===0&&(at=3),s.flags&=-257,s.flags|=65536,s.lanes=f,l===fl?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([l]):r.add(l),Xf(n,l,f)),!1;case 22:return s.flags|=65536,l===fl?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([l]):s.add(l)),Xf(n,l,f)),!1}throw Error(a(435,s.tag))}return Xf(n,l,f),jl(),!1}if(je)return r=en.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,l!==Pc&&(n=Error(a(422),{cause:l}),Ts(mn(n,s)))):(l!==Pc&&(r=Error(a(423),{cause:l}),Ts(mn(r,s))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,l=mn(l,s),f=wf(n.stateNode,l,f),Zc(n,f),at!==4&&(at=2)),!1;var h=Error(a(520),{cause:l});if(h=mn(h,s),Hs===null?Hs=[h]:Hs.push(h),at!==4&&(at=2),r===null)return!0;l=mn(l,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,n=f&-f,s.lanes|=n,n=wf(s.stateNode,l,n),Zc(s,n),!1;case 1:if(r=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Vi===null||!Vi.has(h))))return s.flags|=65536,f&=-f,s.lanes|=f,f=py(f),gy(f,n,s,l),Zc(s,f),!1}s=s.return}while(s!==null);return!1}var Tf=Error(a(461)),dt=!1;function _t(n,r,s,l){r.child=n===null?xg(r,null,s,l):Lr(r,n.child,s,l)}function yy(n,r,s,l,f){s=s.render;var h=r.ref;if("ref"in l){var b={};for(var S in l)S!=="ref"&&(b[S]=l[S])}else b=l;return Nr(r),l=rf(n,r,s,b,h,f),S=af(),n!==null&&!dt?(sf(n,r,f),oi(n,r,f)):(je&&S&&Bc(r),r.flags|=1,_t(n,r,l,f),r.child)}function by(n,r,s,l,f){if(n===null){var h=s.type;return typeof h=="function"&&!Lc(h)&&h.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=h,vy(n,r,h,l,f)):(n=al(s.type,null,l,r,r.mode,f),n.ref=r.ref,n.return=r,r.child=n)}if(h=n.child,!Nf(n,f)){var b=h.memoizedProps;if(s=s.compare,s=s!==null?s:xs,s(b,l)&&n.ref===r.ref)return oi(n,r,f)}return r.flags|=1,n=ti(h,l),n.ref=r.ref,n.return=r,r.child=n}function vy(n,r,s,l,f){if(n!==null){var h=n.memoizedProps;if(xs(h,l)&&n.ref===r.ref)if(dt=!1,r.pendingProps=l=h,Nf(n,f))(n.flags&131072)!==0&&(dt=!0);else return r.lanes=n.lanes,oi(n,r,f)}return Ef(n,r,s,l,f)}function xy(n,r,s,l){var f=l.children,h=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(h=h!==null?h.baseLanes|s:s,n!==null){for(l=r.child=n.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~h}else l=0,r.child=null;return Sy(n,r,h,s,l)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&ul(r,h!==null?h.cachePool:null),h!==null?Tg(r,h):Jc(),Eg(r);else return l=r.lanes=536870912,Sy(n,r,h!==null?h.baseLanes|s:s,s,l)}else h!==null?(ul(r,h.cachePool),Tg(r,h),Ii(),r.memoizedState=null):(n!==null&&ul(r,null),Jc(),Ii());return _t(n,r,f,s),r.child}function Ls(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Sy(n,r,s,l,f){var h=Xc();return h=h===null?null:{parent:ct._currentValue,pool:h},r.memoizedState={baseLanes:s,cachePool:h},n!==null&&ul(r,null),Jc(),Eg(r),n!==null&&ba(n,r,l,!0),r.childLanes=f,null}function Al(n,r){return r=_l({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function wy(n,r,s){return Lr(r,n.child,null,s),n=Al(r,r.pendingProps),n.flags|=2,tn(r),r.memoizedState=null,n}function JE(n,r,s){var l=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(je){if(l.mode==="hidden")return n=Al(r,l),r.lanes=536870912,Ls(null,n);if(tf(r),(n=et)?(n=zb(n,yn),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Di!==null?{id:jn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},s=ag(n),s.return=r,r.child=s,At=r,et=null)):n=null,n===null)throw Ni(r);return r.lanes=536870912,null}return Al(r,l)}var h=n.memoizedState;if(h!==null){var b=h.dehydrated;if(tf(r),f)if(r.flags&256)r.flags&=-257,r=wy(n,r,s);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(dt||ba(n,r,s,!1),f=(s&n.childLanes)!==0,dt||f){if(l=Qe,l!==null&&(b=dp(l,s),b!==0&&b!==h.retryLane))throw h.retryLane=b,_r(n,b),Xt(l,n,b),Tf;jl(),r=wy(n,r,s)}else n=h.treeContext,et=vn(b.nextSibling),At=r,je=!0,Mi=null,yn=!1,n!==null&&lg(r,n),r=Al(r,l),r.flags|=4096;return r}return n=ti(n.child,{mode:l.mode,children:l.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Cl(n,r){var s=r.ref;if(s===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(r.flags|=4194816)}}function Ef(n,r,s,l,f){return Nr(r),s=rf(n,r,s,l,void 0,f),l=af(),n!==null&&!dt?(sf(n,r,f),oi(n,r,f)):(je&&l&&Bc(r),r.flags|=1,_t(n,r,s,f),r.child)}function Ty(n,r,s,l,f,h){return Nr(r),r.updateQueue=null,s=Cg(r,l,s,f),Ag(n),l=af(),n!==null&&!dt?(sf(n,r,h),oi(n,r,h)):(je&&l&&Bc(r),r.flags|=1,_t(n,r,s,h),r.child)}function Ey(n,r,s,l,f){if(Nr(r),r.stateNode===null){var h=ma,b=s.contextType;typeof b=="object"&&b!==null&&(h=Ct(b)),h=new s(l,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Sf,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=l,h.state=r.memoizedState,h.refs={},Qc(r),b=s.contextType,h.context=typeof b=="object"&&b!==null?Ct(b):ma,h.state=r.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(xf(r,s,b,l),h.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&Sf.enqueueReplaceState(h,h.state,null),Ms(r,l,h,f),Ds(),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(n===null){h=r.stateNode;var S=r.memoizedProps,_=Ir(s,S);h.props=_;var I=h.context,G=s.contextType;b=ma,typeof G=="object"&&G!==null&&(b=Ct(G));var X=s.getDerivedStateFromProps;G=typeof X=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,G||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||I!==b)&&cy(r,h,l,b),Oi=!1;var U=r.memoizedState;h.state=U,Ms(r,l,h,f),Ds(),I=r.memoizedState,S||U!==I||Oi?(typeof X=="function"&&(xf(r,s,X,l),I=r.memoizedState),(_=Oi||uy(r,s,_,l,U,I,b))?(G||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(r.flags|=4194308)):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=I),h.props=l,h.state=I,h.context=b,l=_):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{h=r.stateNode,Wc(n,r),b=r.memoizedProps,G=Ir(s,b),h.props=G,X=r.pendingProps,U=h.context,I=s.contextType,_=ma,typeof I=="object"&&I!==null&&(_=Ct(I)),S=s.getDerivedStateFromProps,(I=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==X||U!==_)&&cy(r,h,l,_),Oi=!1,U=r.memoizedState,h.state=U,Ms(r,l,h,f),Ds();var H=r.memoizedState;b!==X||U!==H||Oi||n!==null&&n.dependencies!==null&&ol(n.dependencies)?(typeof S=="function"&&(xf(r,s,S,l),H=r.memoizedState),(G=Oi||uy(r,s,G,l,U,H,_)||n!==null&&n.dependencies!==null&&ol(n.dependencies))?(I||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,H,_),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,H,_)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=H),h.props=l,h.state=H,h.context=_,l=G):(typeof h.componentDidUpdate!="function"||b===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),l=!1)}return h=l,Cl(n,r),l=(r.flags&128)!==0,h||l?(h=r.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:h.render(),r.flags|=1,n!==null&&l?(r.child=Lr(r,n.child,null,f),r.child=Lr(r,null,s,f)):_t(n,r,s,f),r.memoizedState=h.state,n=r.child):n=oi(n,r,f),n}function Ay(n,r,s,l){return Dr(),r.flags|=256,_t(n,r,s,l),r.child}var Af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cf(n){return{baseLanes:n,cachePool:mg()}}function _f(n,r,s){return n=n!==null?n.childLanes&~s:0,r&&(n|=rn),n}function Cy(n,r,s){var l=r.pendingProps,f=!1,h=(r.flags&128)!==0,b;if((b=h)||(b=n!==null&&n.memoizedState===null?!1:(lt.current&2)!==0),b&&(f=!0,r.flags&=-129),b=(r.flags&32)!==0,r.flags&=-33,n===null){if(je){if(f?ji(r):Ii(),(n=et)?(n=zb(n,yn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Di!==null?{id:jn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},s=ag(n),s.return=r,r.child=s,At=r,et=null)):n=null,n===null)throw Ni(r);return ud(n)?r.lanes=32:r.lanes=536870912,null}var S=l.children;return l=l.fallback,f?(Ii(),f=r.mode,S=_l({mode:"hidden",children:S},f),l=kr(l,f,s,null),S.return=r,l.return=r,S.sibling=l,r.child=S,l=r.child,l.memoizedState=Cf(s),l.childLanes=_f(n,b,s),r.memoizedState=Af,Ls(null,l)):(ji(r),kf(r,S))}var _=n.memoizedState;if(_!==null&&(S=_.dehydrated,S!==null)){if(h)r.flags&256?(ji(r),r.flags&=-257,r=Df(n,r,s)):r.memoizedState!==null?(Ii(),r.child=n.child,r.flags|=128,r=null):(Ii(),S=l.fallback,f=r.mode,l=_l({mode:"visible",children:l.children},f),S=kr(S,f,s,null),S.flags|=2,l.return=r,S.return=r,l.sibling=S,r.child=l,Lr(r,n.child,null,s),l=r.child,l.memoizedState=Cf(s),l.childLanes=_f(n,b,s),r.memoizedState=Af,r=Ls(null,l));else if(ji(r),ud(S)){if(b=S.nextSibling&&S.nextSibling.dataset,b)var I=b.dgst;b=I,l=Error(a(419)),l.stack="",l.digest=b,Ts({value:l,source:null,stack:null}),r=Df(n,r,s)}else if(dt||ba(n,r,s,!1),b=(s&n.childLanes)!==0,dt||b){if(b=Qe,b!==null&&(l=dp(b,s),l!==0&&l!==_.retryLane))throw _.retryLane=l,_r(n,l),Xt(b,n,l),Tf;ld(S)||jl(),r=Df(n,r,s)}else ld(S)?(r.flags|=192,r.child=n.child,r=null):(n=_.treeContext,et=vn(S.nextSibling),At=r,je=!0,Mi=null,yn=!1,n!==null&&lg(r,n),r=kf(r,l.children),r.flags|=4096);return r}return f?(Ii(),S=l.fallback,f=r.mode,_=n.child,I=_.sibling,l=ti(_,{mode:"hidden",children:l.children}),l.subtreeFlags=_.subtreeFlags&65011712,I!==null?S=ti(I,S):(S=kr(S,f,s,null),S.flags|=2),S.return=r,l.return=r,l.sibling=S,r.child=l,Ls(null,l),l=r.child,S=n.child.memoizedState,S===null?S=Cf(s):(f=S.cachePool,f!==null?(_=ct._currentValue,f=f.parent!==_?{parent:_,pool:_}:f):f=mg(),S={baseLanes:S.baseLanes|s,cachePool:f}),l.memoizedState=S,l.childLanes=_f(n,b,s),r.memoizedState=Af,Ls(n.child,l)):(ji(r),s=n.child,n=s.sibling,s=ti(s,{mode:"visible",children:l.children}),s.return=r,s.sibling=null,n!==null&&(b=r.deletions,b===null?(r.deletions=[n],r.flags|=16):b.push(n)),r.child=s,r.memoizedState=null,s)}function kf(n,r){return r=_l({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function _l(n,r){return n=Jt(22,n,null,r),n.lanes=0,n}function Df(n,r,s){return Lr(r,n.child,null,s),n=kf(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function _y(n,r,s){n.lanes|=r;var l=n.alternate;l!==null&&(l.lanes|=r),Fc(n.return,r,s)}function Mf(n,r,s,l,f,h){var b=n.memoizedState;b===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:f,treeForkCount:h}:(b.isBackwards=r,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=f,b.treeForkCount=h)}function ky(n,r,s){var l=r.pendingProps,f=l.revealOrder,h=l.tail;l=l.children;var b=lt.current,S=(b&2)!==0;if(S?(b=b&1|2,r.flags|=128):b&=1,T(lt,b),_t(n,r,l,s),l=je?ws:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&_y(n,s,r);else if(n.tag===19)_y(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(s=r.child,f=null;s!==null;)n=s.alternate,n!==null&&pl(n)===null&&(f=s),s=s.sibling;s=f,s===null?(f=r.child,r.child=null):(f=s.sibling,s.sibling=null),Mf(r,!1,f,s,h,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,f=r.child,r.child=null;f!==null;){if(n=f.alternate,n!==null&&pl(n)===null){r.child=f;break}n=f.sibling,f.sibling=s,s=f,f=n}Mf(r,!0,s,null,h,l);break;case"together":Mf(r,!1,null,null,void 0,l);break;default:r.memoizedState=null}return r.child}function oi(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),Pi|=r.lanes,(s&r.childLanes)===0)if(n!==null){if(ba(n,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,s=ti(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=ti(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function Nf(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&ol(n)))}function eA(n,r,s){switch(r.tag){case 3:Ve(r,r.stateNode.containerInfo),Ri(r,ct,n.memoizedState.cache),Dr();break;case 27:case 5:wt(r);break;case 4:Ve(r,r.stateNode.containerInfo);break;case 10:Ri(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,tf(r),null;break;case 13:var l=r.memoizedState;if(l!==null)return l.dehydrated!==null?(ji(r),r.flags|=128,null):(s&r.child.childLanes)!==0?Cy(n,r,s):(ji(r),n=oi(n,r,s),n!==null?n.sibling:null);ji(r);break;case 19:var f=(n.flags&128)!==0;if(l=(s&r.childLanes)!==0,l||(ba(n,r,s,!1),l=(s&r.childLanes)!==0),f){if(l)return ky(n,r,s);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(lt,lt.current),l)break;return null;case 22:return r.lanes=0,xy(n,r,s,r.pendingProps);case 24:Ri(r,ct,n.memoizedState.cache)}return oi(n,r,s)}function Dy(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps)dt=!0;else{if(!Nf(n,s)&&(r.flags&128)===0)return dt=!1,eA(n,r,s);dt=(n.flags&131072)!==0}else dt=!1,je&&(r.flags&1048576)!==0&&og(r,ws,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(n=Or(r.elementType),r.type=n,typeof n=="function")Lc(n)?(l=Ir(n,l),r.tag=1,r=Ey(null,r,n,l,s)):(r.tag=0,r=Ef(null,r,n,l,s));else{if(n!=null){var f=n.$$typeof;if(f===q){r.tag=11,r=yy(null,r,n,l,s);break e}else if(f===K){r.tag=14,r=by(null,r,n,l,s);break e}}throw r=ee(n)||n,Error(a(306,r,""))}}return r;case 0:return Ef(n,r,r.type,r.pendingProps,s);case 1:return l=r.type,f=Ir(l,r.pendingProps),Ey(n,r,l,f,s);case 3:e:{if(Ve(r,r.stateNode.containerInfo),n===null)throw Error(a(387));l=r.pendingProps;var h=r.memoizedState;f=h.element,Wc(n,r),Ms(r,l,null,s);var b=r.memoizedState;if(l=b.cache,Ri(r,ct,l),l!==h.cache&&qc(r,[ct],s,!0),Ds(),l=b.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:b.cache},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){r=Ay(n,r,l,s);break e}else if(l!==f){f=mn(Error(a(424)),r),Ts(f),r=Ay(n,r,l,s);break e}else{switch(n=r.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(et=vn(n.firstChild),At=r,je=!0,Mi=null,yn=!0,s=xg(r,null,l,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Dr(),l===f){r=oi(n,r,s);break e}_t(n,r,l,s)}r=r.child}return r;case 26:return Cl(n,r),n===null?(s=Pb(r.type,null,r.pendingProps,null))?r.memoizedState=s:je||(s=r.type,n=r.pendingProps,l=Fl(ue.current).createElement(s),l[Et]=r,l[Vt]=n,kt(l,s,n),xt(l),r.stateNode=l):r.memoizedState=Pb(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return wt(r),n===null&&je&&(l=r.stateNode=Ib(r.type,r.pendingProps,ue.current),At=r,yn=!0,f=et,Gi(r.type)?(cd=f,et=vn(l.firstChild)):et=f),_t(n,r,r.pendingProps.children,s),Cl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&je&&((f=l=et)&&(l=MA(l,r.type,r.pendingProps,yn),l!==null?(r.stateNode=l,At=r,et=vn(l.firstChild),yn=!1,f=!0):f=!1),f||Ni(r)),wt(r),f=r.type,h=r.pendingProps,b=n!==null?n.memoizedProps:null,l=h.children,ad(f,h)?l=null:b!==null&&ad(f,b)&&(r.flags|=32),r.memoizedState!==null&&(f=rf(n,r,GE,null,null,s),Ws._currentValue=f),Cl(n,r),_t(n,r,l,s),r.child;case 6:return n===null&&je&&((n=s=et)&&(s=NA(s,r.pendingProps,yn),s!==null?(r.stateNode=s,At=r,et=null,n=!0):n=!1),n||Ni(r)),null;case 13:return Cy(n,r,s);case 4:return Ve(r,r.stateNode.containerInfo),l=r.pendingProps,n===null?r.child=Lr(r,null,l,s):_t(n,r,l,s),r.child;case 11:return yy(n,r,r.type,r.pendingProps,s);case 7:return _t(n,r,r.pendingProps,s),r.child;case 8:return _t(n,r,r.pendingProps.children,s),r.child;case 12:return _t(n,r,r.pendingProps.children,s),r.child;case 10:return l=r.pendingProps,Ri(r,r.type,l.value),_t(n,r,l.children,s),r.child;case 9:return f=r.type._context,l=r.pendingProps.children,Nr(r),f=Ct(f),l=l(f),r.flags|=1,_t(n,r,l,s),r.child;case 14:return by(n,r,r.type,r.pendingProps,s);case 15:return vy(n,r,r.type,r.pendingProps,s);case 19:return ky(n,r,s);case 31:return JE(n,r,s);case 22:return xy(n,r,s,r.pendingProps);case 24:return Nr(r),l=Ct(ct),n===null?(f=Xc(),f===null&&(f=Qe,h=Gc(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=s),f=h),r.memoizedState={parent:l,cache:f},Qc(r),Ri(r,ct,f)):((n.lanes&s)!==0&&(Wc(n,r),Ms(r,null,null,s),Ds()),f=n.memoizedState,h=r.memoizedState,f.parent!==l?(f={parent:l,cache:l},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Ri(r,ct,l)):(l=h.cache,Ri(r,ct,l),l!==f.cache&&qc(r,[ct],s,!0))),_t(n,r,r.pendingProps.children,s),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function li(n){n.flags|=4}function Rf(n,r,s,l,f){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(nb())n.flags|=8192;else throw zr=fl,Kc}else n.flags&=-16777217}function My(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Gb(r))if(nb())n.flags|=8192;else throw zr=fl,Kc}function kl(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?up():536870912,n.lanes|=r,Ma|=r)}function js(n,r){if(!je)switch(n.tailMode){case"hidden":r=n.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function tt(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,l=0;if(r)for(var f=n.child;f!==null;)s|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)s|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=l,n.childLanes=s,r}function tA(n,r,s){var l=r.pendingProps;switch(Uc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(r),null;case 1:return tt(r),null;case 3:return s=r.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ri(ct),Se(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(ya(r)?li(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Vc())),tt(r),null;case 26:var f=r.type,h=r.memoizedState;return n===null?(li(r),h!==null?(tt(r),My(r,h)):(tt(r),Rf(r,f,null,l,s))):h?h!==n.memoizedState?(li(r),tt(r),My(r,h)):(tt(r),r.flags&=-16777217):(n=n.memoizedProps,n!==l&&li(r),tt(r),Rf(r,f,n,l,s)),null;case 27:if(Nt(r),s=ue.current,f=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&li(r);else{if(!l){if(r.stateNode===null)throw Error(a(166));return tt(r),null}n=le.current,ya(r)?ug(r):(n=Ib(f,l,s),r.stateNode=n,li(r))}return tt(r),null;case 5:if(Nt(r),f=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&li(r);else{if(!l){if(r.stateNode===null)throw Error(a(166));return tt(r),null}if(h=le.current,ya(r))ug(r);else{var b=Fl(ue.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?b.createElement(f,{is:l.is}):b.createElement(f)}}h[Et]=r,h[Vt]=l;e:for(b=r.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===r)break e;for(;b.sibling===null;){if(b.return===null||b.return===r)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}r.stateNode=h;e:switch(kt(h,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&li(r)}}return tt(r),Rf(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,s),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&li(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(a(166));if(n=ue.current,ya(r)){if(n=r.stateNode,s=r.memoizedProps,l=null,f=At,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}n[Et]=r,n=!!(n.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Cb(n.nodeValue,s)),n||Ni(r,!0)}else n=Fl(n).createTextNode(l),n[Et]=r,r.stateNode=n}return tt(r),null;case 31:if(s=r.memoizedState,n===null||n.memoizedState!==null){if(l=ya(r),s!==null){if(n===null){if(!l)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Et]=r}else Dr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;tt(r),n=!1}else s=Vc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return r.flags&256?(tn(r),r):(tn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return tt(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=ya(r),l!==null&&l.dehydrated!==null){if(n===null){if(!f)throw Error(a(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Et]=r}else Dr(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;tt(r),f=!1}else f=Vc(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(tn(r),r):(tn(r),null)}return tn(r),(r.flags&128)!==0?(r.lanes=s,r):(s=l!==null,n=n!==null&&n.memoizedState!==null,s&&(l=r.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==f&&(l.flags|=2048)),s!==n&&s&&(r.child.flags|=8192),kl(r,r.updateQueue),tt(r),null);case 4:return Se(),n===null&&ed(r.stateNode.containerInfo),tt(r),null;case 10:return ri(r.type),tt(r),null;case 19:if(F(lt),l=r.memoizedState,l===null)return tt(r),null;if(f=(r.flags&128)!==0,h=l.rendering,h===null)if(f)js(l,!1);else{if(at!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(h=pl(n),h!==null){for(r.flags|=128,js(l,!1),n=h.updateQueue,r.updateQueue=n,kl(r,n),r.subtreeFlags=0,n=s,s=r.child;s!==null;)rg(s,n),s=s.sibling;return T(lt,lt.current&1|2),je&&ni(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&Tt()>Ol&&(r.flags|=128,f=!0,js(l,!1),r.lanes=4194304)}else{if(!f)if(n=pl(h),n!==null){if(r.flags|=128,f=!0,n=n.updateQueue,r.updateQueue=n,kl(r,n),js(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!je)return tt(r),null}else 2*Tt()-l.renderingStartTime>Ol&&s!==536870912&&(r.flags|=128,f=!0,js(l,!1),r.lanes=4194304);l.isBackwards?(h.sibling=r.child,r.child=h):(n=l.last,n!==null?n.sibling=h:r.child=h,l.last=h)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Tt(),n.sibling=null,s=lt.current,T(lt,f?s&1|2:s&1),je&&ni(r,l.treeForkCount),n):(tt(r),null);case 22:case 23:return tn(r),ef(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(s&536870912)!==0&&(r.flags&128)===0&&(tt(r),r.subtreeFlags&6&&(r.flags|=8192)):tt(r),s=r.updateQueue,s!==null&&kl(r,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==s&&(r.flags|=2048),n!==null&&F(Rr),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),ri(ct),tt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function nA(n,r){switch(Uc(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return ri(ct),Se(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Nt(r),null;case 31:if(r.memoizedState!==null){if(tn(r),r.alternate===null)throw Error(a(340));Dr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(tn(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Dr()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return F(lt),null;case 4:return Se(),null;case 10:return ri(r.type),null;case 22:case 23:return tn(r),ef(),n!==null&&F(Rr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return ri(ct),null;case 25:return null;default:return null}}function Ny(n,r){switch(Uc(r),r.tag){case 3:ri(ct),Se();break;case 26:case 27:case 5:Nt(r);break;case 4:Se();break;case 31:r.memoizedState!==null&&tn(r);break;case 13:tn(r);break;case 19:F(lt);break;case 10:ri(r.type);break;case 22:case 23:tn(r),ef(),n!==null&&F(Rr);break;case 24:ri(ct)}}function Is(n,r){try{var s=r.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var f=l.next;s=f;do{if((s.tag&n)===n){l=void 0;var h=s.create,b=s.inst;l=h(),b.destroy=l}s=s.next}while(s!==f)}}catch(S){Fe(r,r.return,S)}}function Bi(n,r,s){try{var l=r.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var h=f.next;l=h;do{if((l.tag&n)===n){var b=l.inst,S=b.destroy;if(S!==void 0){b.destroy=void 0,f=r;var _=s,I=S;try{I()}catch(G){Fe(f,_,G)}}}l=l.next}while(l!==h)}}catch(G){Fe(r,r.return,G)}}function Ry(n){var r=n.updateQueue;if(r!==null){var s=n.stateNode;try{wg(r,s)}catch(l){Fe(n,n.return,l)}}}function Oy(n,r,s){s.props=Ir(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(l){Fe(n,r,l)}}function Bs(n,r){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof s=="function"?n.refCleanup=s(l):s.current=l}}catch(f){Fe(n,r,f)}}function Bn(n,r){var s=n.ref,l=n.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(f){Fe(n,r,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(f){Fe(n,r,f)}else s.current=null}function zy(n){var r=n.type,s=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(f){Fe(n,n.return,f)}}function Of(n,r,s){try{var l=n.stateNode;EA(l,n.type,s,r),l[Vt]=r}catch(f){Fe(n,n.return,f)}}function Ly(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Gi(n.type)||n.tag===4}function zf(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Ly(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Gi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Lf(n,r,s){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(n),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Jn));else if(l!==4&&(l===27&&Gi(n.type)&&(s=n.stateNode,r=null),n=n.child,n!==null))for(Lf(n,r,s),n=n.sibling;n!==null;)Lf(n,r,s),n=n.sibling}function Dl(n,r,s){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(l!==4&&(l===27&&Gi(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(Dl(n,r,s),n=n.sibling;n!==null;)Dl(n,r,s),n=n.sibling}function jy(n){var r=n.stateNode,s=n.memoizedProps;try{for(var l=n.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);kt(r,l,s),r[Et]=n,r[Vt]=s}catch(h){Fe(n,n.return,h)}}var ui=!1,ht=!1,jf=!1,Iy=typeof WeakSet=="function"?WeakSet:Set,St=null;function iA(n,r){if(n=n.containerInfo,id=Wl,n=Qp(n),kc(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var f=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var b=0,S=-1,_=-1,I=0,G=0,X=n,U=null;t:for(;;){for(var H;X!==s||f!==0&&X.nodeType!==3||(S=b+f),X!==h||l!==0&&X.nodeType!==3||(_=b+l),X.nodeType===3&&(b+=X.nodeValue.length),(H=X.firstChild)!==null;)U=X,X=H;for(;;){if(X===n)break t;if(U===s&&++I===f&&(S=b),U===h&&++G===l&&(_=b),(H=X.nextSibling)!==null)break;X=U,U=X.parentNode}X=H}s=S===-1||_===-1?null:{start:S,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(rd={focusedElem:n,selectionRange:s},Wl=!1,St=r;St!==null;)if(r=St,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,St=n;else for(;St!==null;){switch(r=St,h=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)f=n[s],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,s=r,f=h.memoizedProps,h=h.memoizedState,l=s.stateNode;try{var de=Ir(s.type,f);n=l.getSnapshotBeforeUpdate(de,h),l.__reactInternalSnapshotBeforeUpdate=n}catch(xe){Fe(s,s.return,xe)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,s=n.nodeType,s===9)od(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":od(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=r.sibling,n!==null){n.return=r.return,St=n;break}St=r.return}}function By(n,r,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:fi(n,s),l&4&&Is(5,s);break;case 1:if(fi(n,s),l&4)if(n=s.stateNode,r===null)try{n.componentDidMount()}catch(b){Fe(s,s.return,b)}else{var f=Ir(s.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(f,r,n.__reactInternalSnapshotBeforeUpdate)}catch(b){Fe(s,s.return,b)}}l&64&&Ry(s),l&512&&Bs(s,s.return);break;case 3:if(fi(n,s),l&64&&(n=s.updateQueue,n!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{wg(n,r)}catch(b){Fe(s,s.return,b)}}break;case 27:r===null&&l&4&&jy(s);case 26:case 5:fi(n,s),r===null&&l&4&&zy(s),l&512&&Bs(s,s.return);break;case 12:fi(n,s);break;case 31:fi(n,s),l&4&&Vy(n,s);break;case 13:fi(n,s),l&4&&Hy(n,s),l&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=dA.bind(null,s),RA(n,s))));break;case 22:if(l=s.memoizedState!==null||ui,!l){r=r!==null&&r.memoizedState!==null||ht,f=ui;var h=ht;ui=l,(ht=r)&&!h?di(n,s,(s.subtreeFlags&8772)!==0):fi(n,s),ui=f,ht=h}break;case 30:break;default:fi(n,s)}}function Uy(n){var r=n.alternate;r!==null&&(n.alternate=null,Uy(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&fc(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var it=null,Ft=!1;function ci(n,r,s){for(s=s.child;s!==null;)Py(n,r,s),s=s.sibling}function Py(n,r,s){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Lt,s)}catch{}switch(s.tag){case 26:ht||Bn(s,r),ci(n,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:ht||Bn(s,r);var l=it,f=Ft;Gi(s.type)&&(it=s.stateNode,Ft=!1),ci(n,r,s),Xs(s.stateNode),it=l,Ft=f;break;case 5:ht||Bn(s,r);case 6:if(l=it,f=Ft,it=null,ci(n,r,s),it=l,Ft=f,it!==null)if(Ft)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(s.stateNode)}catch(h){Fe(s,r,h)}else try{it.removeChild(s.stateNode)}catch(h){Fe(s,r,h)}break;case 18:it!==null&&(Ft?(n=it,Rb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Ba(n)):Rb(it,s.stateNode));break;case 4:l=it,f=Ft,it=s.stateNode.containerInfo,Ft=!0,ci(n,r,s),it=l,Ft=f;break;case 0:case 11:case 14:case 15:Bi(2,s,r),ht||Bi(4,s,r),ci(n,r,s);break;case 1:ht||(Bn(s,r),l=s.stateNode,typeof l.componentWillUnmount=="function"&&Oy(s,r,l)),ci(n,r,s);break;case 21:ci(n,r,s);break;case 22:ht=(l=ht)||s.memoizedState!==null,ci(n,r,s),ht=l;break;default:ci(n,r,s)}}function Vy(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ba(n)}catch(s){Fe(r,r.return,s)}}}function Hy(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ba(n)}catch(s){Fe(r,r.return,s)}}function rA(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Iy),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Iy),r;default:throw Error(a(435,n.tag))}}function Ml(n,r){var s=rA(n);r.forEach(function(l){if(!s.has(l)){s.add(l);var f=hA.bind(null,n,l);l.then(f,f)}})}function qt(n,r){var s=r.deletions;if(s!==null)for(var l=0;l<s.length;l++){var f=s[l],h=n,b=r,S=b;e:for(;S!==null;){switch(S.tag){case 27:if(Gi(S.type)){it=S.stateNode,Ft=!1;break e}break;case 5:it=S.stateNode,Ft=!1;break e;case 3:case 4:it=S.stateNode.containerInfo,Ft=!0;break e}S=S.return}if(it===null)throw Error(a(160));Py(h,b,f),it=null,Ft=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Fy(r,n),r=r.sibling}var Cn=null;function Fy(n,r){var s=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:qt(r,n),Gt(n),l&4&&(Bi(3,n,n.return),Is(3,n),Bi(5,n,n.return));break;case 1:qt(r,n),Gt(n),l&512&&(ht||s===null||Bn(s,s.return)),l&64&&ui&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var f=Cn;if(qt(r,n),Gt(n),l&512&&(ht||s===null||Bn(s,s.return)),l&4){var h=s!==null?s.memoizedState:null;if(l=n.memoizedState,s===null)if(l===null)if(n.stateNode===null){e:{l=n.type,s=n.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":h=f.getElementsByTagName("title")[0],(!h||h[fs]||h[Et]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(l),f.head.insertBefore(h,f.querySelector("head > title"))),kt(h,l,s),h[Et]=n,xt(h),l=h;break e;case"link":var b=Fb("link","href",f).get(l+(s.href||""));if(b){for(var S=0;S<b.length;S++)if(h=b[S],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(S,1);break t}}h=f.createElement(l),kt(h,l,s),f.head.appendChild(h);break;case"meta":if(b=Fb("meta","content",f).get(l+(s.content||""))){for(S=0;S<b.length;S++)if(h=b[S],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(S,1);break t}}h=f.createElement(l),kt(h,l,s),f.head.appendChild(h);break;default:throw Error(a(468,l))}h[Et]=n,xt(h),l=h}n.stateNode=l}else qb(f,n.type,n.stateNode);else n.stateNode=Hb(f,l,n.memoizedProps);else h!==l?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,l===null?qb(f,n.type,n.stateNode):Hb(f,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Of(n,n.memoizedProps,s.memoizedProps)}break;case 27:qt(r,n),Gt(n),l&512&&(ht||s===null||Bn(s,s.return)),s!==null&&l&4&&Of(n,n.memoizedProps,s.memoizedProps);break;case 5:if(qt(r,n),Gt(n),l&512&&(ht||s===null||Bn(s,s.return)),n.flags&32){f=n.stateNode;try{oa(f,"")}catch(de){Fe(n,n.return,de)}}l&4&&n.stateNode!=null&&(f=n.memoizedProps,Of(n,f,s!==null?s.memoizedProps:f)),l&1024&&(jf=!0);break;case 6:if(qt(r,n),Gt(n),l&4){if(n.stateNode===null)throw Error(a(162));l=n.memoizedProps,s=n.stateNode;try{s.nodeValue=l}catch(de){Fe(n,n.return,de)}}break;case 3:if(Yl=null,f=Cn,Cn=ql(r.containerInfo),qt(r,n),Cn=f,Gt(n),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Ba(r.containerInfo)}catch(de){Fe(n,n.return,de)}jf&&(jf=!1,qy(n));break;case 4:l=Cn,Cn=ql(n.stateNode.containerInfo),qt(r,n),Gt(n),Cn=l;break;case 12:qt(r,n),Gt(n);break;case 31:qt(r,n),Gt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Ml(n,l)));break;case 13:qt(r,n),Gt(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Rl=Tt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Ml(n,l)));break;case 22:f=n.memoizedState!==null;var _=s!==null&&s.memoizedState!==null,I=ui,G=ht;if(ui=I||f,ht=G||_,qt(r,n),ht=G,ui=I,Gt(n),l&8192)e:for(r=n.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(s===null||_||ui||ht||Br(n)),s=null,r=n;;){if(r.tag===5||r.tag===26){if(s===null){_=s=r;try{if(h=_.stateNode,f)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{S=_.stateNode;var X=_.memoizedProps.style,U=X!=null&&X.hasOwnProperty("display")?X.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(de){Fe(_,_.return,de)}}}else if(r.tag===6){if(s===null){_=r;try{_.stateNode.nodeValue=f?"":_.memoizedProps}catch(de){Fe(_,_.return,de)}}}else if(r.tag===18){if(s===null){_=r;try{var H=_.stateNode;f?Ob(H,!0):Ob(_.stateNode,!1)}catch(de){Fe(_,_.return,de)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;s===r&&(s=null),r=r.return}s===r&&(s=null),r.sibling.return=r.return,r=r.sibling}l&4&&(l=n.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Ml(n,s))));break;case 19:qt(r,n),Gt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Ml(n,l)));break;case 30:break;case 21:break;default:qt(r,n),Gt(n)}}function Gt(n){var r=n.flags;if(r&2){try{for(var s,l=n.return;l!==null;){if(Ly(l)){s=l;break}l=l.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var f=s.stateNode,h=zf(n);Dl(n,h,f);break;case 5:var b=s.stateNode;s.flags&32&&(oa(b,""),s.flags&=-33);var S=zf(n);Dl(n,S,b);break;case 3:case 4:var _=s.stateNode.containerInfo,I=zf(n);Lf(n,I,_);break;default:throw Error(a(161))}}catch(G){Fe(n,n.return,G)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function qy(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;qy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function fi(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)By(n,r.alternate,r),r=r.sibling}function Br(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Bi(4,r,r.return),Br(r);break;case 1:Bn(r,r.return);var s=r.stateNode;typeof s.componentWillUnmount=="function"&&Oy(r,r.return,s),Br(r);break;case 27:Xs(r.stateNode);case 26:case 5:Bn(r,r.return),Br(r);break;case 22:r.memoizedState===null&&Br(r);break;case 30:Br(r);break;default:Br(r)}n=n.sibling}}function di(n,r,s){for(s=s&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var l=r.alternate,f=n,h=r,b=h.flags;switch(h.tag){case 0:case 11:case 15:di(f,h,s),Is(4,h);break;case 1:if(di(f,h,s),l=h,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){Fe(l,l.return,I)}if(l=h,f=l.updateQueue,f!==null){var S=l.stateNode;try{var _=f.shared.hiddenCallbacks;if(_!==null)for(f.shared.hiddenCallbacks=null,f=0;f<_.length;f++)Sg(_[f],S)}catch(I){Fe(l,l.return,I)}}s&&b&64&&Ry(h),Bs(h,h.return);break;case 27:jy(h);case 26:case 5:di(f,h,s),s&&l===null&&b&4&&zy(h),Bs(h,h.return);break;case 12:di(f,h,s);break;case 31:di(f,h,s),s&&b&4&&Vy(f,h);break;case 13:di(f,h,s),s&&b&4&&Hy(f,h);break;case 22:h.memoizedState===null&&di(f,h,s),Bs(h,h.return);break;case 30:break;default:di(f,h,s)}r=r.sibling}}function If(n,r){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&Es(s))}function Bf(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Es(n))}function _n(n,r,s,l){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Gy(n,r,s,l),r=r.sibling}function Gy(n,r,s,l){var f=r.flags;switch(r.tag){case 0:case 11:case 15:_n(n,r,s,l),f&2048&&Is(9,r);break;case 1:_n(n,r,s,l);break;case 3:_n(n,r,s,l),f&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Es(n)));break;case 12:if(f&2048){_n(n,r,s,l),n=r.stateNode;try{var h=r.memoizedProps,b=h.id,S=h.onPostCommit;typeof S=="function"&&S(b,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(_){Fe(r,r.return,_)}}else _n(n,r,s,l);break;case 31:_n(n,r,s,l);break;case 13:_n(n,r,s,l);break;case 23:break;case 22:h=r.stateNode,b=r.alternate,r.memoizedState!==null?h._visibility&2?_n(n,r,s,l):Us(n,r):h._visibility&2?_n(n,r,s,l):(h._visibility|=2,_a(n,r,s,l,(r.subtreeFlags&10256)!==0||!1)),f&2048&&If(b,r);break;case 24:_n(n,r,s,l),f&2048&&Bf(r.alternate,r);break;default:_n(n,r,s,l)}}function _a(n,r,s,l,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var h=n,b=r,S=s,_=l,I=b.flags;switch(b.tag){case 0:case 11:case 15:_a(h,b,S,_,f),Is(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?_a(h,b,S,_,f):Us(h,b):(G._visibility|=2,_a(h,b,S,_,f)),f&&I&2048&&If(b.alternate,b);break;case 24:_a(h,b,S,_,f),f&&I&2048&&Bf(b.alternate,b);break;default:_a(h,b,S,_,f)}r=r.sibling}}function Us(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=n,l=r,f=l.flags;switch(l.tag){case 22:Us(s,l),f&2048&&If(l.alternate,l);break;case 24:Us(s,l),f&2048&&Bf(l.alternate,l);break;default:Us(s,l)}r=r.sibling}}var Ps=8192;function ka(n,r,s){if(n.subtreeFlags&Ps)for(n=n.child;n!==null;)Yy(n,r,s),n=n.sibling}function Yy(n,r,s){switch(n.tag){case 26:ka(n,r,s),n.flags&Ps&&n.memoizedState!==null&&qA(s,Cn,n.memoizedState,n.memoizedProps);break;case 5:ka(n,r,s);break;case 3:case 4:var l=Cn;Cn=ql(n.stateNode.containerInfo),ka(n,r,s),Cn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Ps,Ps=16777216,ka(n,r,s),Ps=l):ka(n,r,s));break;default:ka(n,r,s)}}function Xy(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Vs(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];St=l,Qy(l,n)}Xy(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ky(n),n=n.sibling}function Ky(n){switch(n.tag){case 0:case 11:case 15:Vs(n),n.flags&2048&&Bi(9,n,n.return);break;case 3:Vs(n);break;case 12:Vs(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Nl(n)):Vs(n);break;default:Vs(n)}}function Nl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];St=l,Qy(l,n)}Xy(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Bi(8,r,r.return),Nl(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,Nl(r));break;default:Nl(r)}n=n.sibling}}function Qy(n,r){for(;St!==null;){var s=St;switch(s.tag){case 0:case 11:case 15:Bi(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Es(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,St=l;else e:for(s=n;St!==null;){l=St;var f=l.sibling,h=l.return;if(Uy(l),l===s){St=null;break e}if(f!==null){f.return=h,St=f;break e}St=h}}}var aA={getCacheForType:function(n){var r=Ct(ct),s=r.data.get(n);return s===void 0&&(s=n(),r.data.set(n,s)),s},cacheSignal:function(){return Ct(ct).controller.signal}},sA=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Qe=null,Re=null,ze=0,He=0,nn=null,Ui=!1,Da=!1,Uf=!1,hi=0,at=0,Pi=0,Ur=0,Pf=0,rn=0,Ma=0,Hs=null,Yt=null,Vf=!1,Rl=0,Wy=0,Ol=1/0,zl=null,Vi=null,yt=0,Hi=null,Na=null,mi=0,Hf=0,Ff=null,Zy=null,Fs=0,qf=null;function an(){return(Ue&2)!==0&&ze!==0?ze&-ze:O.T!==null?Wf():hp()}function $y(){if(rn===0)if((ze&536870912)===0||je){var n=Ho;Ho<<=1,(Ho&3932160)===0&&(Ho=262144),rn=n}else rn=536870912;return n=en.current,n!==null&&(n.flags|=32),rn}function Xt(n,r,s){(n===Qe&&(He===2||He===9)||n.cancelPendingCommit!==null)&&(Ra(n,0),Fi(n,ze,rn,!1)),cs(n,s),((Ue&2)===0||n!==Qe)&&(n===Qe&&((Ue&2)===0&&(Ur|=s),at===4&&Fi(n,ze,rn,!1)),Un(n))}function Jy(n,r,s){if((Ue&6)!==0)throw Error(a(327));var l=!s&&(r&127)===0&&(r&n.expiredLanes)===0||us(n,r),f=l?uA(n,r):Yf(n,r,!0),h=l;do{if(f===0){Da&&!l&&Fi(n,r,0,!1);break}else{if(s=n.current.alternate,h&&!oA(s)){f=Yf(n,r,!1),h=!1;continue}if(f===2){if(h=r,n.errorRecoveryDisabledLanes&h)var b=0;else b=n.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){r=b;e:{var S=n;f=Hs;var _=S.current.memoizedState.isDehydrated;if(_&&(Ra(S,b).flags|=256),b=Yf(S,b,!1),b!==2){if(Uf&&!_){S.errorRecoveryDisabledLanes|=h,Ur|=h,f=4;break e}h=Yt,Yt=f,h!==null&&(Yt===null?Yt=h:Yt.push.apply(Yt,h))}f=b}if(h=!1,f!==2)continue}}if(f===1){Ra(n,0),Fi(n,r,0,!0);break}e:{switch(l=n,h=f,h){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Fi(l,r,rn,!Ui);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(f=Rl+300-Tt(),10<f)){if(Fi(l,r,rn,!Ui),qo(l,0,!0)!==0)break e;mi=r,l.timeoutHandle=Mb(eb.bind(null,l,s,Yt,zl,Vf,r,rn,Ur,Ma,Ui,h,"Throttled",-0,0),f);break e}eb(l,s,Yt,zl,Vf,r,rn,Ur,Ma,Ui,h,null,-0,0)}}break}while(!0);Un(n)}function eb(n,r,s,l,f,h,b,S,_,I,G,X,U,H){if(n.timeoutHandle=-1,X=r.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jn},Yy(r,h,X);var de=(h&62914560)===h?Rl-Tt():(h&4194048)===h?Wy-Tt():0;if(de=GA(X,de),de!==null){mi=h,n.cancelPendingCommit=de(lb.bind(null,n,r,h,s,l,f,b,S,_,G,X,null,U,H)),Fi(n,h,b,!I);return}}lb(n,r,h,s,l,f,b,S,_)}function oA(n){for(var r=n;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var f=s[l],h=f.getSnapshot;f=f.value;try{if(!$t(h(),f))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Fi(n,r,s,l){r&=~Pf,r&=~Ur,n.suspendedLanes|=r,n.pingedLanes&=~r,l&&(n.warmLanes|=r),l=n.expirationTimes;for(var f=r;0<f;){var h=31-Ke(f),b=1<<h;l[h]=-1,f&=~b}s!==0&&cp(n,s,r)}function Ll(){return(Ue&6)===0?(qs(0),!1):!0}function Gf(){if(Re!==null){if(He===0)var n=Re.return;else n=Re,ii=Mr=null,of(n),wa=null,Cs=0,n=Re;for(;n!==null;)Ny(n.alternate,n),n=n.return;Re=null}}function Ra(n,r){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,_A(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),mi=0,Gf(),Qe=n,Re=s=ti(n.current,null),ze=r,He=0,nn=null,Ui=!1,Da=us(n,r),Uf=!1,Ma=rn=Pf=Ur=Pi=at=0,Yt=Hs=null,Vf=!1,(r&8)!==0&&(r|=r&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=r;0<l;){var f=31-Ke(l),h=1<<f;r|=n[f],l&=~h}return hi=r,nl(),s}function tb(n,r){_e=null,O.H=zs,r===Sa||r===cl?(r=yg(),He=3):r===Kc?(r=yg(),He=4):He=r===Tf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,nn=r,Re===null&&(at=1,El(n,mn(r,n.current)))}function nb(){var n=en.current;return n===null?!0:(ze&4194048)===ze?bn===null:(ze&62914560)===ze||(ze&536870912)!==0?n===bn:!1}function ib(){var n=O.H;return O.H=zs,n===null?zs:n}function rb(){var n=O.A;return O.A=aA,n}function jl(){at=4,Ui||(ze&4194048)!==ze&&en.current!==null||(Da=!0),(Pi&134217727)===0&&(Ur&134217727)===0||Qe===null||Fi(Qe,ze,rn,!1)}function Yf(n,r,s){var l=Ue;Ue|=2;var f=ib(),h=rb();(Qe!==n||ze!==r)&&(zl=null,Ra(n,r)),r=!1;var b=at;e:do try{if(He!==0&&Re!==null){var S=Re,_=nn;switch(He){case 8:Gf(),b=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(r=!0);var I=He;if(He=0,nn=null,Oa(n,S,_,I),s&&Da){b=0;break e}break;default:I=He,He=0,nn=null,Oa(n,S,_,I)}}lA(),b=at;break}catch(G){tb(n,G)}while(!0);return r&&n.shellSuspendCounter++,ii=Mr=null,Ue=l,O.H=f,O.A=h,Re===null&&(Qe=null,ze=0,nl()),b}function lA(){for(;Re!==null;)ab(Re)}function uA(n,r){var s=Ue;Ue|=2;var l=ib(),f=rb();Qe!==n||ze!==r?(zl=null,Ol=Tt()+500,Ra(n,r)):Da=us(n,r);e:do try{if(He!==0&&Re!==null){r=Re;var h=nn;t:switch(He){case 1:He=0,nn=null,Oa(n,r,h,1);break;case 2:case 9:if(pg(h)){He=0,nn=null,sb(r);break}r=function(){He!==2&&He!==9||Qe!==n||(He=7),Un(n)},h.then(r,r);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:pg(h)?(He=0,nn=null,sb(r)):(He=0,nn=null,Oa(n,r,h,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var S=Re;if(b?Gb(b):S.stateNode.complete){He=0,nn=null;var _=S.sibling;if(_!==null)Re=_;else{var I=S.return;I!==null?(Re=I,Il(I)):Re=null}break t}}He=0,nn=null,Oa(n,r,h,5);break;case 6:He=0,nn=null,Oa(n,r,h,6);break;case 8:Gf(),at=6;break e;default:throw Error(a(462))}}cA();break}catch(G){tb(n,G)}while(!0);return ii=Mr=null,O.H=l,O.A=f,Ue=s,Re!==null?0:(Qe=null,ze=0,nl(),at)}function cA(){for(;Re!==null&&!xr();)ab(Re)}function ab(n){var r=Dy(n.alternate,n,hi);n.memoizedProps=n.pendingProps,r===null?Il(n):Re=r}function sb(n){var r=n,s=r.alternate;switch(r.tag){case 15:case 0:r=Ty(s,r,r.pendingProps,r.type,void 0,ze);break;case 11:r=Ty(s,r,r.pendingProps,r.type.render,r.ref,ze);break;case 5:of(r);default:Ny(s,r),r=Re=rg(r,hi),r=Dy(s,r,hi)}n.memoizedProps=n.pendingProps,r===null?Il(n):Re=r}function Oa(n,r,s,l){ii=Mr=null,of(r),wa=null,Cs=0;var f=r.return;try{if($E(n,f,r,s,ze)){at=1,El(n,mn(s,n.current)),Re=null;return}}catch(h){if(f!==null)throw Re=f,h;at=1,El(n,mn(s,n.current)),Re=null;return}r.flags&32768?(je||l===1?n=!0:Da||(ze&536870912)!==0?n=!1:(Ui=n=!0,(l===2||l===9||l===3||l===6)&&(l=en.current,l!==null&&l.tag===13&&(l.flags|=16384))),ob(r,n)):Il(r)}function Il(n){var r=n;do{if((r.flags&32768)!==0){ob(r,Ui);return}n=r.return;var s=tA(r.alternate,r,hi);if(s!==null){Re=s;return}if(r=r.sibling,r!==null){Re=r;return}Re=r=n}while(r!==null);at===0&&(at=5)}function ob(n,r){do{var s=nA(n.alternate,n);if(s!==null){s.flags&=32767,Re=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(n=n.sibling,n!==null)){Re=n;return}Re=n=s}while(n!==null);at=6,Re=null}function lb(n,r,s,l,f,h,b,S,_){n.cancelPendingCommit=null;do Bl();while(yt!==0);if((Ue&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));if(h=r.lanes|r.childLanes,h|=Oc,FT(n,s,h,b,S,_),n===Qe&&(Re=Qe=null,ze=0),Na=r,Hi=n,mi=s,Hf=h,Ff=f,Zy=l,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,mA(ye,function(){return hb(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,f=Q.p,Q.p=2,b=Ue,Ue|=4;try{iA(n,r,s)}finally{Ue=b,Q.p=f,O.T=l}}yt=1,ub(),cb(),fb()}}function ub(){if(yt===1){yt=0;var n=Hi,r=Na,s=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||s){s=O.T,O.T=null;var l=Q.p;Q.p=2;var f=Ue;Ue|=4;try{Fy(r,n);var h=rd,b=Qp(n.containerInfo),S=h.focusedElem,_=h.selectionRange;if(b!==S&&S&&S.ownerDocument&&Kp(S.ownerDocument.documentElement,S)){if(_!==null&&kc(S)){var I=_.start,G=_.end;if(G===void 0&&(G=I),"selectionStart"in S)S.selectionStart=I,S.selectionEnd=Math.min(G,S.value.length);else{var X=S.ownerDocument||document,U=X&&X.defaultView||window;if(U.getSelection){var H=U.getSelection(),de=S.textContent.length,xe=Math.min(_.start,de),Xe=_.end===void 0?xe:Math.min(_.end,de);!H.extend&&xe>Xe&&(b=Xe,Xe=xe,xe=b);var z=Xp(S,xe),M=Xp(S,Xe);if(z&&M&&(H.rangeCount!==1||H.anchorNode!==z.node||H.anchorOffset!==z.offset||H.focusNode!==M.node||H.focusOffset!==M.offset)){var j=X.createRange();j.setStart(z.node,z.offset),H.removeAllRanges(),xe>Xe?(H.addRange(j),H.extend(M.node,M.offset)):(j.setEnd(M.node,M.offset),H.addRange(j))}}}}for(X=[],H=S;H=H.parentNode;)H.nodeType===1&&X.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<X.length;S++){var Y=X[S];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Wl=!!id,rd=id=null}finally{Ue=f,Q.p=l,O.T=s}}n.current=r,yt=2}}function cb(){if(yt===2){yt=0;var n=Hi,r=Na,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=O.T,O.T=null;var l=Q.p;Q.p=2;var f=Ue;Ue|=4;try{By(n,r.alternate,r)}finally{Ue=f,Q.p=l,O.T=s}}yt=3}}function fb(){if(yt===4||yt===3){yt=0,Sr();var n=Hi,r=Na,s=mi,l=Zy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?yt=5:(yt=0,Na=Hi=null,db(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(Vi=null),uc(s),r=r.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Lt,r,void 0,(r.current.flags&128)===128)}catch{}if(l!==null){r=O.T,f=Q.p,Q.p=2,O.T=null;try{for(var h=n.onRecoverableError,b=0;b<l.length;b++){var S=l[b];h(S.value,{componentStack:S.stack})}}finally{O.T=r,Q.p=f}}(mi&3)!==0&&Bl(),Un(n),f=n.pendingLanes,(s&261930)!==0&&(f&42)!==0?n===qf?Fs++:(Fs=0,qf=n):Fs=0,qs(0)}}function db(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Es(r)))}function Bl(){return ub(),cb(),fb(),hb()}function hb(){if(yt!==5)return!1;var n=Hi,r=Hf;Hf=0;var s=uc(mi),l=O.T,f=Q.p;try{Q.p=32>s?32:s,O.T=null,s=Ff,Ff=null;var h=Hi,b=mi;if(yt=0,Na=Hi=null,mi=0,(Ue&6)!==0)throw Error(a(331));var S=Ue;if(Ue|=4,Ky(h.current),Gy(h,h.current,b,s),Ue=S,qs(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Lt,h)}catch{}return!0}finally{Q.p=f,O.T=l,db(n,r)}}function mb(n,r,s){r=mn(s,r),r=wf(n.stateNode,r,2),n=Li(n,r,2),n!==null&&(cs(n,2),Un(n))}function Fe(n,r,s){if(n.tag===3)mb(n,n,s);else for(;r!==null;){if(r.tag===3){mb(r,n,s);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Vi===null||!Vi.has(l))){n=mn(s,n),s=py(2),l=Li(r,s,2),l!==null&&(gy(s,l,r,n),cs(l,2),Un(l));break}}r=r.return}}function Xf(n,r,s){var l=n.pingCache;if(l===null){l=n.pingCache=new sA;var f=new Set;l.set(r,f)}else f=l.get(r),f===void 0&&(f=new Set,l.set(r,f));f.has(s)||(Uf=!0,f.add(s),n=fA.bind(null,n,r,s),r.then(n,n))}function fA(n,r,s){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Qe===n&&(ze&s)===s&&(at===4||at===3&&(ze&62914560)===ze&&300>Tt()-Rl?(Ue&2)===0&&Ra(n,0):Pf|=s,Ma===ze&&(Ma=0)),Un(n)}function pb(n,r){r===0&&(r=up()),n=_r(n,r),n!==null&&(cs(n,r),Un(n))}function dA(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),pb(n,s)}function hA(n,r){var s=0;switch(n.tag){case 31:case 13:var l=n.stateNode,f=n.memoizedState;f!==null&&(s=f.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(r),pb(n,s)}function mA(n,r){return Ai(n,r)}var Ul=null,za=null,Kf=!1,Pl=!1,Qf=!1,qi=0;function Un(n){n!==za&&n.next===null&&(za===null?Ul=za=n:za=za.next=n),Pl=!0,Kf||(Kf=!0,gA())}function qs(n,r){if(!Qf&&Pl){Qf=!0;do for(var s=!1,l=Ul;l!==null;){if(n!==0){var f=l.pendingLanes;if(f===0)var h=0;else{var b=l.suspendedLanes,S=l.pingedLanes;h=(1<<31-Ke(42|n)+1)-1,h&=f&~(b&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,vb(l,h))}else h=ze,h=qo(l,l===Qe?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||us(l,h)||(s=!0,vb(l,h));l=l.next}while(s);Qf=!1}}function pA(){gb()}function gb(){Pl=Kf=!1;var n=0;qi!==0&&CA()&&(n=qi);for(var r=Tt(),s=null,l=Ul;l!==null;){var f=l.next,h=yb(l,r);h===0?(l.next=null,s===null?Ul=f:s.next=f,f===null&&(za=s)):(s=l,(n!==0||(h&3)!==0)&&(Pl=!0)),l=f}yt!==0&&yt!==5||qs(n),qi!==0&&(qi=0)}function yb(n,r){for(var s=n.suspendedLanes,l=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var b=31-Ke(h),S=1<<b,_=f[b];_===-1?((S&s)===0||(S&l)!==0)&&(f[b]=HT(S,r)):_<=r&&(n.expiredLanes|=S),h&=~S}if(r=Qe,s=ze,s=qo(n,n===r?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,s===0||n===r&&(He===2||He===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&vr(l),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||us(n,s)){if(r=s&-s,r===n.callbackPriority)return r;switch(l!==null&&vr(l),uc(s)){case 2:case 8:s=te;break;case 32:s=ye;break;case 268435456:s=Ce;break;default:s=ye}return l=bb.bind(null,n),s=Ai(s,l),n.callbackPriority=r,n.callbackNode=s,r}return l!==null&&l!==null&&vr(l),n.callbackPriority=2,n.callbackNode=null,2}function bb(n,r){if(yt!==0&&yt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Bl()&&n.callbackNode!==s)return null;var l=ze;return l=qo(n,n===Qe?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(Jy(n,l,r),yb(n,Tt()),n.callbackNode!=null&&n.callbackNode===s?bb.bind(null,n):null)}function vb(n,r){if(Bl())return null;Jy(n,r,!0)}function gA(){kA(function(){(Ue&6)!==0?Ai(B,pA):gb()})}function Wf(){if(qi===0){var n=va;n===0&&(n=Vo,Vo<<=1,(Vo&261888)===0&&(Vo=256)),qi=n}return qi}function xb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ko(""+n)}function Sb(n,r){var s=r.ownerDocument.createElement("input");return s.name=r.name,s.value=r.value,n.id&&s.setAttribute("form",n.id),r.parentNode.insertBefore(s,r),n=new FormData(n),s.parentNode.removeChild(s),n}function yA(n,r,s,l,f){if(r==="submit"&&s&&s.stateNode===f){var h=xb((f[Vt]||null).action),b=l.submitter;b&&(r=(r=b[Vt]||null)?xb(r.formAction):b.getAttribute("formAction"),r!==null&&(h=r,b=null));var S=new $o("action","action",null,l,f);n.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(qi!==0){var _=b?Sb(f,b):new FormData(f);gf(s,{pending:!0,data:_,method:f.method,action:h},null,_)}}else typeof h=="function"&&(S.preventDefault(),_=b?Sb(f,b):new FormData(f),gf(s,{pending:!0,data:_,method:f.method,action:h},h,_))},currentTarget:f}]})}}for(var Zf=0;Zf<Rc.length;Zf++){var $f=Rc[Zf],bA=$f.toLowerCase(),vA=$f[0].toUpperCase()+$f.slice(1);An(bA,"on"+vA)}An($p,"onAnimationEnd"),An(Jp,"onAnimationIteration"),An(eg,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An(LE,"onTransitionRun"),An(jE,"onTransitionStart"),An(IE,"onTransitionCancel"),An(tg,"onTransitionEnd"),aa("onMouseEnter",["mouseout","mouseover"]),aa("onMouseLeave",["mouseout","mouseover"]),aa("onPointerEnter",["pointerout","pointerover"]),aa("onPointerLeave",["pointerout","pointerover"]),Tr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gs="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(" "),xA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gs));function wb(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var l=n[s],f=l.event;l=l.listeners;e:{var h=void 0;if(r)for(var b=l.length-1;0<=b;b--){var S=l[b],_=S.instance,I=S.currentTarget;if(S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=I;try{h(f)}catch(G){tl(G)}f.currentTarget=null,h=_}else for(b=0;b<l.length;b++){if(S=l[b],_=S.instance,I=S.currentTarget,S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=I;try{h(f)}catch(G){tl(G)}f.currentTarget=null,h=_}}}}function Oe(n,r){var s=r[cc];s===void 0&&(s=r[cc]=new Set);var l=n+"__bubble";s.has(l)||(Tb(r,n,2,!1),s.add(l))}function Jf(n,r,s){var l=0;r&&(l|=4),Tb(s,n,l,r)}var Vl="_reactListening"+Math.random().toString(36).slice(2);function ed(n){if(!n[Vl]){n[Vl]=!0,gp.forEach(function(s){s!=="selectionchange"&&(xA.has(s)||Jf(s,!1,n),Jf(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Vl]||(r[Vl]=!0,Jf("selectionchange",!1,r))}}function Tb(n,r,s,l){switch($b(r)){case 2:var f=KA;break;case 8:f=QA;break;default:f=pd}s=f.bind(null,r,s,n),f=void 0,!vc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),l?f!==void 0?n.addEventListener(r,s,{capture:!0,passive:f}):n.addEventListener(r,s,!0):f!==void 0?n.addEventListener(r,s,{passive:f}):n.addEventListener(r,s,!1)}function td(n,r,s,l,f){var h=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var S=l.stateNode.containerInfo;if(S===f)break;if(b===4)for(b=l.return;b!==null;){var _=b.tag;if((_===3||_===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;S!==null;){if(b=na(S),b===null)return;if(_=b.tag,_===5||_===6||_===26||_===27){l=h=b;continue e}S=S.parentNode}}l=l.return}kp(function(){var I=h,G=yc(s),X=[];e:{var U=ng.get(n);if(U!==void 0){var H=$o,de=n;switch(n){case"keypress":if(Wo(s)===0)break e;case"keydown":case"keyup":H=hE;break;case"focusin":de="focus",H=Tc;break;case"focusout":de="blur",H=Tc;break;case"beforeblur":case"afterblur":H=Tc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=tE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=gE;break;case $p:case Jp:case eg:H=rE;break;case tg:H=bE;break;case"scroll":case"scrollend":H=JT;break;case"wheel":H=xE;break;case"copy":case"cut":case"paste":H=sE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Op;break;case"toggle":case"beforetoggle":H=wE}var xe=(r&4)!==0,Xe=!xe&&(n==="scroll"||n==="scrollend"),z=xe?U!==null?U+"Capture":null:U;xe=[];for(var M=I,j;M!==null;){var Y=M;if(j=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||j===null||z===null||(Y=hs(M,z),Y!=null&&xe.push(Ys(M,Y,j))),Xe)break;M=M.return}0<xe.length&&(U=new H(U,de,null,s,G),X.push({event:U,listeners:xe}))}}if((r&7)===0){e:{if(U=n==="mouseover"||n==="pointerover",H=n==="mouseout"||n==="pointerout",U&&s!==gc&&(de=s.relatedTarget||s.fromElement)&&(na(de)||de[ta]))break e;if((H||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,H?(de=s.relatedTarget||s.toElement,H=I,de=de?na(de):null,de!==null&&(Xe=u(de),xe=de.tag,de!==Xe||xe!==5&&xe!==27&&xe!==6)&&(de=null)):(H=null,de=I),H!==de)){if(xe=Np,Y="onMouseLeave",z="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(xe=Op,Y="onPointerLeave",z="onPointerEnter",M="pointer"),Xe=H==null?U:ds(H),j=de==null?U:ds(de),U=new xe(Y,M+"leave",H,s,G),U.target=Xe,U.relatedTarget=j,Y=null,na(G)===I&&(xe=new xe(z,M+"enter",de,s,G),xe.target=j,xe.relatedTarget=Xe,Y=xe),Xe=Y,H&&de)t:{for(xe=SA,z=H,M=de,j=0,Y=z;Y;Y=xe(Y))j++;Y=0;for(var ve=M;ve;ve=xe(ve))Y++;for(;0<j-Y;)z=xe(z),j--;for(;0<Y-j;)M=xe(M),Y--;for(;j--;){if(z===M||M!==null&&z===M.alternate){xe=z;break t}z=xe(z),M=xe(M)}xe=null}else xe=null;H!==null&&Eb(X,U,H,xe,!1),de!==null&&Xe!==null&&Eb(X,Xe,de,xe,!0)}}e:{if(U=I?ds(I):window,H=U.nodeName&&U.nodeName.toLowerCase(),H==="select"||H==="input"&&U.type==="file")var Ie=Vp;else if(Up(U))if(Hp)Ie=RE;else{Ie=ME;var ge=DE}else H=U.nodeName,!H||H.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?I&&pc(I.elementType)&&(Ie=Vp):Ie=NE;if(Ie&&(Ie=Ie(n,I))){Pp(X,Ie,s,G);break e}ge&&ge(n,U,I),n==="focusout"&&I&&U.type==="number"&&I.memoizedProps.value!=null&&mc(U,"number",U.value)}switch(ge=I?ds(I):window,n){case"focusin":(Up(ge)||ge.contentEditable==="true")&&(fa=ge,Dc=I,Ss=null);break;case"focusout":Ss=Dc=fa=null;break;case"mousedown":Mc=!0;break;case"contextmenu":case"mouseup":case"dragend":Mc=!1,Wp(X,s,G);break;case"selectionchange":if(zE)break;case"keydown":case"keyup":Wp(X,s,G)}var De;if(Ac)e:{switch(n){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else ca?Ip(n,s)&&(Le="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(zp&&s.locale!=="ko"&&(ca||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&ca&&(De=Dp()):(ki=G,xc="value"in ki?ki.value:ki.textContent,ca=!0)),ge=Hl(I,Le),0<ge.length&&(Le=new Rp(Le,n,null,s,G),X.push({event:Le,listeners:ge}),De?Le.data=De:(De=Bp(s),De!==null&&(Le.data=De)))),(De=EE?AE(n,s):CE(n,s))&&(Le=Hl(I,"onBeforeInput"),0<Le.length&&(ge=new Rp("onBeforeInput","beforeinput",null,s,G),X.push({event:ge,listeners:Le}),ge.data=De)),yA(X,n,I,s,G)}wb(X,r)})}function Ys(n,r,s){return{instance:n,listener:r,currentTarget:s}}function Hl(n,r){for(var s=r+"Capture",l=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=hs(n,s),f!=null&&l.unshift(Ys(n,f,h)),f=hs(n,r),f!=null&&l.push(Ys(n,f,h))),n.tag===3)return l;n=n.return}return[]}function SA(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Eb(n,r,s,l,f){for(var h=r._reactName,b=[];s!==null&&s!==l;){var S=s,_=S.alternate,I=S.stateNode;if(S=S.tag,_!==null&&_===l)break;S!==5&&S!==26&&S!==27||I===null||(_=I,f?(I=hs(s,h),I!=null&&b.unshift(Ys(s,I,_))):f||(I=hs(s,h),I!=null&&b.push(Ys(s,I,_)))),s=s.return}b.length!==0&&n.push({event:r,listeners:b})}var wA=/\r\n?/g,TA=/\u0000|\uFFFD/g;function Ab(n){return(typeof n=="string"?n:""+n).replace(wA,`
`).replace(TA,"")}function Cb(n,r){return r=Ab(r),Ab(n)===r}function Ye(n,r,s,l,f,h){switch(s){case"children":typeof l=="string"?r==="body"||r==="textarea"&&l===""||oa(n,l):(typeof l=="number"||typeof l=="bigint")&&r!=="body"&&oa(n,""+l);break;case"className":Yo(n,"class",l);break;case"tabIndex":Yo(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Yo(n,s,l);break;case"style":Cp(n,l,h);break;case"data":if(r!=="object"){Yo(n,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||s!=="href")){n.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(s);break}l=Ko(""+l),n.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(s==="formAction"?(r!=="input"&&Ye(n,r,"name",f.name,f,null),Ye(n,r,"formEncType",f.formEncType,f,null),Ye(n,r,"formMethod",f.formMethod,f,null),Ye(n,r,"formTarget",f.formTarget,f,null)):(Ye(n,r,"encType",f.encType,f,null),Ye(n,r,"method",f.method,f,null),Ye(n,r,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(s);break}l=Ko(""+l),n.setAttribute(s,l);break;case"onClick":l!=null&&(n.onclick=Jn);break;case"onScroll":l!=null&&Oe("scroll",n);break;case"onScrollEnd":l!=null&&Oe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(s=l.__html,s!=null){if(f.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}s=Ko(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(s,""+l):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":l===!0?n.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(s,l):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(s,l):n.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(s):n.setAttribute(s,l);break;case"popover":Oe("beforetoggle",n),Oe("toggle",n),Go(n,"popover",l);break;case"xlinkActuate":$n(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":$n(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":$n(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":$n(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":$n(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":$n(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":$n(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":$n(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":$n(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Go(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ZT.get(s)||s,Go(n,s,l))}}function nd(n,r,s,l,f,h){switch(s){case"style":Cp(n,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(s=l.__html,s!=null){if(f.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof l=="string"?oa(n,l):(typeof l=="number"||typeof l=="bigint")&&oa(n,""+l);break;case"onScroll":l!=null&&Oe("scroll",n);break;case"onScrollEnd":l!=null&&Oe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yp.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(f=s.endsWith("Capture"),r=s.slice(2,f?s.length-7:void 0),h=n[Vt]||null,h=h!=null?h[s]:null,typeof h=="function"&&n.removeEventListener(r,h,f),typeof l=="function")){typeof h!="function"&&h!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(r,l,f);break e}s in n?n[s]=l:l===!0?n.setAttribute(s,""):Go(n,s,l)}}}function kt(n,r,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",n),Oe("load",n);var l=!1,f=!1,h;for(h in s)if(s.hasOwnProperty(h)){var b=s[h];if(b!=null)switch(h){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ye(n,r,h,b,s,null)}}f&&Ye(n,r,"srcSet",s.srcSet,s,null),l&&Ye(n,r,"src",s.src,s,null);return;case"input":Oe("invalid",n);var S=h=b=f=null,_=null,I=null;for(l in s)if(s.hasOwnProperty(l)){var G=s[l];if(G!=null)switch(l){case"name":f=G;break;case"type":b=G;break;case"checked":_=G;break;case"defaultChecked":I=G;break;case"value":h=G;break;case"defaultValue":S=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,r));break;default:Ye(n,r,l,G,s,null)}}wp(n,h,S,_,I,b,f,!1);return;case"select":Oe("invalid",n),l=b=h=null;for(f in s)if(s.hasOwnProperty(f)&&(S=s[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":b=S;break;case"multiple":l=S;default:Ye(n,r,f,S,s,null)}r=h,s=b,n.multiple=!!l,r!=null?sa(n,!!l,r,!1):s!=null&&sa(n,!!l,s,!0);return;case"textarea":Oe("invalid",n),h=f=l=null;for(b in s)if(s.hasOwnProperty(b)&&(S=s[b],S!=null))switch(b){case"value":l=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Ye(n,r,b,S,s,null)}Ep(n,l,f,h);return;case"option":for(_ in s)if(s.hasOwnProperty(_)&&(l=s[_],l!=null))switch(_){case"selected":n.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ye(n,r,_,l,s,null)}return;case"dialog":Oe("beforetoggle",n),Oe("toggle",n),Oe("cancel",n),Oe("close",n);break;case"iframe":case"object":Oe("load",n);break;case"video":case"audio":for(l=0;l<Gs.length;l++)Oe(Gs[l],n);break;case"image":Oe("error",n),Oe("load",n);break;case"details":Oe("toggle",n);break;case"embed":case"source":case"link":Oe("error",n),Oe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in s)if(s.hasOwnProperty(I)&&(l=s[I],l!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ye(n,r,I,l,s,null)}return;default:if(pc(r)){for(G in s)s.hasOwnProperty(G)&&(l=s[G],l!==void 0&&nd(n,r,G,l,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(l=s[S],l!=null&&Ye(n,r,S,l,s,null))}function EA(n,r,s,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,b=null,S=null,_=null,I=null,G=null;for(H in s){var X=s[H];if(s.hasOwnProperty(H)&&X!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":_=X;default:l.hasOwnProperty(H)||Ye(n,r,H,null,l,X)}}for(var U in l){var H=l[U];if(X=s[U],l.hasOwnProperty(U)&&(H!=null||X!=null))switch(U){case"type":h=H;break;case"name":f=H;break;case"checked":I=H;break;case"defaultChecked":G=H;break;case"value":b=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,r));break;default:H!==X&&Ye(n,r,U,H,l,X)}}hc(n,b,S,_,I,G,h,f);return;case"select":H=b=S=U=null;for(h in s)if(_=s[h],s.hasOwnProperty(h)&&_!=null)switch(h){case"value":break;case"multiple":H=_;default:l.hasOwnProperty(h)||Ye(n,r,h,null,l,_)}for(f in l)if(h=l[f],_=s[f],l.hasOwnProperty(f)&&(h!=null||_!=null))switch(f){case"value":U=h;break;case"defaultValue":S=h;break;case"multiple":b=h;default:h!==_&&Ye(n,r,f,h,l,_)}r=S,s=b,l=H,U!=null?sa(n,!!s,U,!1):!!l!=!!s&&(r!=null?sa(n,!!s,r,!0):sa(n,!!s,s?[]:"",!1));return;case"textarea":H=U=null;for(S in s)if(f=s[S],s.hasOwnProperty(S)&&f!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ye(n,r,S,null,l,f)}for(b in l)if(f=l[b],h=s[b],l.hasOwnProperty(b)&&(f!=null||h!=null))switch(b){case"value":U=f;break;case"defaultValue":H=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==h&&Ye(n,r,b,f,l,h)}Tp(n,U,H);return;case"option":for(var de in s)if(U=s[de],s.hasOwnProperty(de)&&U!=null&&!l.hasOwnProperty(de))switch(de){case"selected":n.selected=!1;break;default:Ye(n,r,de,null,l,U)}for(_ in l)if(U=l[_],H=s[_],l.hasOwnProperty(_)&&U!==H&&(U!=null||H!=null))switch(_){case"selected":n.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ye(n,r,_,U,l,H)}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 xe in s)U=s[xe],s.hasOwnProperty(xe)&&U!=null&&!l.hasOwnProperty(xe)&&Ye(n,r,xe,null,l,U);for(I in l)if(U=l[I],H=s[I],l.hasOwnProperty(I)&&U!==H&&(U!=null||H!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(a(137,r));break;default:Ye(n,r,I,U,l,H)}return;default:if(pc(r)){for(var Xe in s)U=s[Xe],s.hasOwnProperty(Xe)&&U!==void 0&&!l.hasOwnProperty(Xe)&&nd(n,r,Xe,void 0,l,U);for(G in l)U=l[G],H=s[G],!l.hasOwnProperty(G)||U===H||U===void 0&&H===void 0||nd(n,r,G,U,l,H);return}}for(var z in s)U=s[z],s.hasOwnProperty(z)&&U!=null&&!l.hasOwnProperty(z)&&Ye(n,r,z,null,l,U);for(X in l)U=l[X],H=s[X],!l.hasOwnProperty(X)||U===H||U==null&&H==null||Ye(n,r,X,U,l,H)}function _b(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AA(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var f=s[l],h=f.transferSize,b=f.initiatorType,S=f.duration;if(h&&S&&_b(b)){for(b=0,S=f.responseEnd,l+=1;l<s.length;l++){var _=s[l],I=_.startTime;if(I>S)break;var G=_.transferSize,X=_.initiatorType;G&&_b(X)&&(_=_.responseEnd,b+=G*(_<S?1:(S-I)/(_-I)))}if(--l,r+=8*(h+b)/(f.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var id=null,rd=null;function Fl(n){return n.nodeType===9?n:n.ownerDocument}function kb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Db(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function ad(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var sd=null;function CA(){var n=window.event;return n&&n.type==="popstate"?n===sd?!1:(sd=n,!0):(sd=null,!1)}var Mb=typeof setTimeout=="function"?setTimeout:void 0,_A=typeof clearTimeout=="function"?clearTimeout:void 0,Nb=typeof Promise=="function"?Promise:void 0,kA=typeof queueMicrotask=="function"?queueMicrotask:typeof Nb<"u"?function(n){return Nb.resolve(null).then(n).catch(DA)}:Mb;function DA(n){setTimeout(function(){throw n})}function Gi(n){return n==="head"}function Rb(n,r){var s=r,l=0;do{var f=s.nextSibling;if(n.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"||s==="/&"){if(l===0){n.removeChild(f),Ba(r);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Xs(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Xs(s);for(var h=s.firstChild;h;){var b=h.nextSibling,S=h.nodeName;h[fs]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||s.removeChild(h),h=b}}else s==="body"&&Xs(n.ownerDocument.body);s=f}while(s);Ba(r)}function Ob(n,r){var s=n;n=0;do{var l=s.nextSibling;if(s.nodeType===1?r?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(r?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=l}while(s)}function od(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":od(s),fc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function MA(n,r,s,l){for(;n.nodeType===1;){var f=s;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[fs])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=vn(n.nextSibling),n===null)break}return null}function NA(n,r,s){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=vn(n.nextSibling),n===null))return null;return n}function zb(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=vn(n.nextSibling),n===null))return null;return n}function ld(n){return n.data==="$?"||n.data==="$~"}function ud(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function RA(n,r){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||s.readyState!=="loading")r();else{var l=function(){r(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function vn(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var cd=null;function Lb(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(r===0)return vn(n.nextSibling);r--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||r++}n=n.nextSibling}return null}function jb(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(r===0)return n;r--}else s!=="/$"&&s!=="/&"||r++}n=n.previousSibling}return null}function Ib(n,r,s){switch(r=Fl(s),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Xs(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);fc(n)}var xn=new Map,Bb=new Set;function ql(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var pi=Q.d;Q.d={f:OA,r:zA,D:LA,C:jA,L:IA,m:BA,X:PA,S:UA,M:VA};function OA(){var n=pi.f(),r=Ll();return n||r}function zA(n){var r=ia(n);r!==null&&r.tag===5&&r.type==="form"?ty(r):pi.r(n)}var La=typeof document>"u"?null:document;function Ub(n,r,s){var l=La;if(l&&typeof r=="string"&&r){var f=dn(r);f='link[rel="'+n+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),Bb.has(f)||(Bb.add(f),n={rel:n,crossOrigin:s,href:r},l.querySelector(f)===null&&(r=l.createElement("link"),kt(r,"link",n),xt(r),l.head.appendChild(r)))}}function LA(n){pi.D(n),Ub("dns-prefetch",n,null)}function jA(n,r){pi.C(n,r),Ub("preconnect",n,r)}function IA(n,r,s){pi.L(n,r,s);var l=La;if(l&&n&&r){var f='link[rel="preload"][as="'+dn(r)+'"]';r==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+dn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+dn(s.imageSizes)+'"]')):f+='[href="'+dn(n)+'"]';var h=f;switch(r){case"style":h=ja(n);break;case"script":h=Ia(n)}xn.has(h)||(n=y({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:n,as:r},s),xn.set(h,n),l.querySelector(f)!==null||r==="style"&&l.querySelector(Ks(h))||r==="script"&&l.querySelector(Qs(h))||(r=l.createElement("link"),kt(r,"link",n),xt(r),l.head.appendChild(r)))}}function BA(n,r){pi.m(n,r);var s=La;if(s&&n){var l=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(n)+'"]',h=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ia(n)}if(!xn.has(h)&&(n=y({rel:"modulepreload",href:n},r),xn.set(h,n),s.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Qs(h)))return}l=s.createElement("link"),kt(l,"link",n),xt(l),s.head.appendChild(l)}}}function UA(n,r,s){pi.S(n,r,s);var l=La;if(l&&n){var f=ra(l).hoistableStyles,h=ja(n);r=r||"default";var b=f.get(h);if(!b){var S={loading:0,preload:null};if(b=l.querySelector(Ks(h)))S.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":r},s),(s=xn.get(h))&&fd(n,s);var _=b=l.createElement("link");xt(_),kt(_,"link",n),_._p=new Promise(function(I,G){_.onload=I,_.onerror=G}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Gl(b,r,l)}b={type:"stylesheet",instance:b,count:1,state:S},f.set(h,b)}}}function PA(n,r){pi.X(n,r);var s=La;if(s&&n){var l=ra(s).hoistableScripts,f=Ia(n),h=l.get(f);h||(h=s.querySelector(Qs(f)),h||(n=y({src:n,async:!0},r),(r=xn.get(f))&&dd(n,r),h=s.createElement("script"),xt(h),kt(h,"link",n),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(f,h))}}function VA(n,r){pi.M(n,r);var s=La;if(s&&n){var l=ra(s).hoistableScripts,f=Ia(n),h=l.get(f);h||(h=s.querySelector(Qs(f)),h||(n=y({src:n,async:!0,type:"module"},r),(r=xn.get(f))&&dd(n,r),h=s.createElement("script"),xt(h),kt(h,"link",n),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(f,h))}}function Pb(n,r,s,l){var f=(f=ue.current)?ql(f):null;if(!f)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=ja(s.href),s=ra(f).hoistableStyles,l=s.get(r),l||(l={type:"style",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=ja(s.href);var h=ra(f).hoistableStyles,b=h.get(n);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,b),(h=f.querySelector(Ks(n)))&&!h._p&&(b.instance=h,b.state.loading=5),xn.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},xn.set(n,s),h||HA(f,n,s,b.state))),r&&l===null)throw Error(a(528,""));return b}if(r&&l!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ia(s),s=ra(f).hoistableScripts,l=s.get(r),l||(l={type:"script",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function ja(n){return'href="'+dn(n)+'"'}function Ks(n){return'link[rel="stylesheet"]['+n+"]"}function Vb(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function HA(n,r,s,l){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=n.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),kt(r,"link",s),xt(r),n.head.appendChild(r))}function Ia(n){return'[src="'+dn(n)+'"]'}function Qs(n){return"script[async]"+n}function Hb(n,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+dn(s.href)+'"]');if(l)return r.instance=l,xt(l),l;var f=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),xt(l),kt(l,"style",f),Gl(l,s.precedence,n),r.instance=l;case"stylesheet":f=ja(s.href);var h=n.querySelector(Ks(f));if(h)return r.state.loading|=4,r.instance=h,xt(h),h;l=Vb(s),(f=xn.get(f))&&fd(l,f),h=(n.ownerDocument||n).createElement("link"),xt(h);var b=h;return b._p=new Promise(function(S,_){b.onload=S,b.onerror=_}),kt(h,"link",l),r.state.loading|=4,Gl(h,s.precedence,n),r.instance=h;case"script":return h=Ia(s.src),(f=n.querySelector(Qs(h)))?(r.instance=f,xt(f),f):(l=s,(f=xn.get(h))&&(l=y({},s),dd(l,f)),n=n.ownerDocument||n,f=n.createElement("script"),xt(f),kt(f,"link",l),n.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,Gl(l,s.precedence,n));return r.instance}function Gl(n,r,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,h=f,b=0;b<l.length;b++){var S=l[b];if(S.dataset.precedence===r)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(n,h.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(n,r.firstChild))}function fd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function dd(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Yl=null;function Fb(n,r,s){if(Yl===null){var l=new Map,f=Yl=new Map;f.set(s,l)}else f=Yl,l=f.get(s),l||(l=new Map,f.set(s,l));if(l.has(n))return l;for(l.set(n,null),s=s.getElementsByTagName(n),f=0;f<s.length;f++){var h=s[f];if(!(h[fs]||h[Et]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(r)||"";b=n+b;var S=l.get(b);S?S.push(h):l.set(b,[h])}}return l}function qb(n,r,s){n=n.ownerDocument||n,n.head.insertBefore(s,r==="title"?n.querySelector("head > title"):null)}function FA(n,r,s){if(s===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Gb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function qA(n,r,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var f=ja(l.href),h=r.querySelector(Ks(f));if(h){r=h._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=Xl.bind(n),r.then(n,n)),s.state.loading|=4,s.instance=h,xt(h);return}h=r.ownerDocument||r,l=Vb(l),(f=xn.get(f))&&fd(l,f),h=h.createElement("link"),xt(h);var b=h;b._p=new Promise(function(S,_){b.onload=S,b.onerror=_}),kt(h,"link",l),s.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,r),(r=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Xl.bind(n),r.addEventListener("load",s),r.addEventListener("error",s))}}var hd=0;function GA(n,r){return n.stylesheets&&n.count===0&&Ql(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var l=setTimeout(function(){if(n.stylesheets&&Ql(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+r);0<n.imgBytes&&hd===0&&(hd=62500*AA());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ql(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>hd?50:800)+r);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function Xl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ql(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Kl=null;function Ql(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Kl=new Map,r.forEach(YA,n),Kl=null,Xl.call(n))}function YA(n,r){if(!(r.state.loading&4)){var s=Kl.get(n);if(s)var l=s.get(null);else{s=new Map,Kl.set(n,s);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var b=f[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),l=b)}l&&s.set(null,l)}f=r.instance,b=f.getAttribute("data-precedence"),h=s.get(b)||l,h===l&&s.set(null,f),s.set(b,f),this.count++,l=Xl.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),r.state.loading|=4}}var Ws={$$typeof:N,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function XA(n,r,s,l,f,h,b,S,_){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oc(0),this.hiddenUpdates=oc(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Yb(n,r,s,l,f,h,b,S,_,I,G,X){return n=new XA(n,r,s,b,_,I,G,X,S),r=1,h===!0&&(r|=24),h=Jt(3,null,null,r),n.current=h,h.stateNode=n,r=Gc(),r.refCount++,n.pooledCache=r,r.refCount++,h.memoizedState={element:l,isDehydrated:s,cache:r},Qc(h),n}function Xb(n){return n?(n=ma,n):ma}function Kb(n,r,s,l,f,h){f=Xb(f),l.context===null?l.context=f:l.pendingContext=f,l=zi(r),l.payload={element:s},h=h===void 0?null:h,h!==null&&(l.callback=h),s=Li(n,l,r),s!==null&&(Xt(s,n,r),ks(s,n,r))}function Qb(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function md(n,r){Qb(n,r),(n=n.alternate)&&Qb(n,r)}function Wb(n){if(n.tag===13||n.tag===31){var r=_r(n,67108864);r!==null&&Xt(r,n,67108864),md(n,67108864)}}function Zb(n){if(n.tag===13||n.tag===31){var r=an();r=lc(r);var s=_r(n,r);s!==null&&Xt(s,n,r),md(n,r)}}var Wl=!0;function KA(n,r,s,l){var f=O.T;O.T=null;var h=Q.p;try{Q.p=2,pd(n,r,s,l)}finally{Q.p=h,O.T=f}}function QA(n,r,s,l){var f=O.T;O.T=null;var h=Q.p;try{Q.p=8,pd(n,r,s,l)}finally{Q.p=h,O.T=f}}function pd(n,r,s,l){if(Wl){var f=gd(l);if(f===null)td(n,r,l,Zl,s),Jb(n,l);else if(ZA(f,n,r,s,l))l.stopPropagation();else if(Jb(n,l),r&4&&-1<WA.indexOf(n)){for(;f!==null;){var h=ia(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=wr(h.pendingLanes);if(b!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;b;){var _=1<<31-Ke(b);S.entanglements[1]|=_,b&=~_}Un(h),(Ue&6)===0&&(Ol=Tt()+500,qs(0))}}break;case 31:case 13:S=_r(h,2),S!==null&&Xt(S,h,2),Ll(),md(h,2)}if(h=gd(l),h===null&&td(n,r,l,Zl,s),h===f)break;f=h}f!==null&&l.stopPropagation()}else td(n,r,l,null,s)}}function gd(n){return n=yc(n),yd(n)}var Zl=null;function yd(n){if(Zl=null,n=na(n),n!==null){var r=u(n);if(r===null)n=null;else{var s=r.tag;if(s===13){if(n=c(r),n!==null)return n;n=null}else if(s===31){if(n=d(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Zl=n,null}function $b(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(se()){case B:return 2;case te:return 8;case ye:case ke:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var bd=!1,Yi=null,Xi=null,Ki=null,Zs=new Map,$s=new Map,Qi=[],WA="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 Jb(n,r){switch(n){case"focusin":case"focusout":Yi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Zs.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":$s.delete(r.pointerId)}}function Js(n,r,s,l,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:r,domEventName:s,eventSystemFlags:l,nativeEvent:h,targetContainers:[f]},r!==null&&(r=ia(r),r!==null&&Wb(r)),n):(n.eventSystemFlags|=l,r=n.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),n)}function ZA(n,r,s,l,f){switch(r){case"focusin":return Yi=Js(Yi,n,r,s,l,f),!0;case"dragenter":return Xi=Js(Xi,n,r,s,l,f),!0;case"mouseover":return Ki=Js(Ki,n,r,s,l,f),!0;case"pointerover":var h=f.pointerId;return Zs.set(h,Js(Zs.get(h)||null,n,r,s,l,f)),!0;case"gotpointercapture":return h=f.pointerId,$s.set(h,Js($s.get(h)||null,n,r,s,l,f)),!0}return!1}function e0(n){var r=na(n.target);if(r!==null){var s=u(r);if(s!==null){if(r=s.tag,r===13){if(r=c(s),r!==null){n.blockedOn=r,mp(n.priority,function(){Zb(s)});return}}else if(r===31){if(r=d(s),r!==null){n.blockedOn=r,mp(n.priority,function(){Zb(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function $l(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=gd(n.nativeEvent);if(s===null){s=n.nativeEvent;var l=new s.constructor(s.type,s);gc=l,s.target.dispatchEvent(l),gc=null}else return r=ia(s),r!==null&&Wb(r),n.blockedOn=s,!1;r.shift()}return!0}function t0(n,r,s){$l(n)&&s.delete(r)}function $A(){bd=!1,Yi!==null&&$l(Yi)&&(Yi=null),Xi!==null&&$l(Xi)&&(Xi=null),Ki!==null&&$l(Ki)&&(Ki=null),Zs.forEach(t0),$s.forEach(t0)}function Jl(n,r){n.blockedOn===r&&(n.blockedOn=null,bd||(bd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$A)))}var eu=null;function n0(n){eu!==n&&(eu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){eu===n&&(eu=null);for(var r=0;r<n.length;r+=3){var s=n[r],l=n[r+1],f=n[r+2];if(typeof l!="function"){if(yd(l||s)===null)continue;break}var h=ia(s);h!==null&&(n.splice(r,3),r-=3,gf(h,{pending:!0,data:f,method:s.method,action:l},l,f))}}))}function Ba(n){function r(_){return Jl(_,n)}Yi!==null&&Jl(Yi,n),Xi!==null&&Jl(Xi,n),Ki!==null&&Jl(Ki,n),Zs.forEach(r),$s.forEach(r);for(var s=0;s<Qi.length;s++){var l=Qi[s];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Qi.length&&(s=Qi[0],s.blockedOn===null);)e0(s),s.blockedOn===null&&Qi.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var f=s[l],h=s[l+1],b=f[Vt]||null;if(typeof h=="function")b||n0(s);else if(b){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,b=h[Vt]||null)S=b.formAction;else if(yd(f)!==null)continue}else S=b.action;typeof S=="function"?s[l+1]=S:(s.splice(l,3),l-=3),n0(s)}}}function i0(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function vd(n){this._internalRoot=n}tu.prototype.render=vd.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var s=r.current,l=an();Kb(s,l,n,r,null,null)},tu.prototype.unmount=vd.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Kb(n.current,2,null,n,null,null),Ll(),r[ta]=null}};function tu(n){this._internalRoot=n}tu.prototype.unstable_scheduleHydration=function(n){if(n){var r=hp();n={blockedOn:null,target:n,priority:r};for(var s=0;s<Qi.length&&r!==0&&r<Qi[s].priority;s++);Qi.splice(s,0,n),s===0&&e0(n)}};var r0=t.version;if(r0!=="19.2.4")throw Error(a(527,r0,"19.2.4"));Q.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=m(r),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var JA={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nu.isDisabled&&nu.supportsFiber)try{Lt=nu.inject(JA),gt=nu}catch{}}return to.createRoot=function(n,r){if(!o(n))throw Error(a(299));var s=!1,l="",f=fy,h=dy,b=hy;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError)),r=Yb(n,1,!1,null,null,s,l,null,f,h,b,i0),n[ta]=r.current,ed(n),new vd(r)},to.hydrateRoot=function(n,r,s){if(!o(n))throw Error(a(299));var l=!1,f="",h=fy,b=dy,S=hy,_=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(_=s.formState)),r=Yb(n,1,!0,r,s??null,l,f,_,h,b,S,i0),r.context=Xb(null),s=r.current,l=an(),l=lc(l),f=zi(l),f.callback=null,Li(s,f,l),s=l,r.current.lanes=s,cs(r,s),Un(r),n[ta]=r.current,ed(n),new tu(r)},to.version="19.2.4",to}var m0;function uC(){if(m0)return wd.exports;m0=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(),wd.exports=lC(),wd.exports}var cC=uC();const rm=W.createContext({});function am(e){const t=W.useRef(null);return t.current===null&&(t.current=e()),t.current}const fC=typeof window<"u",o1=fC?W.useLayoutEffect:W.useEffect,Qu=W.createContext(null);function sm(e,t){e.indexOf(t)===-1&&e.push(t)}function Du(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}const Kn=(e,t,i)=>i>t?t:i<e?e:i;let om=()=>{};const fr={},l1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function u1(e){return typeof e=="object"&&e!==null}const c1=e=>/^0[^.\s]+$/u.test(e);function f1(e){let t;return()=>(t===void 0&&(t=e()),t)}const Tn=e=>e,dC=(e,t)=>i=>t(e(i)),Do=(...e)=>e.reduce(dC),xo=(e,t,i)=>{const a=t-e;return a===0?1:(i-e)/a};class lm{constructor(){this.subscriptions=[]}add(t){return sm(this.subscriptions,t),()=>Du(this.subscriptions,t)}notify(t,i,a){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,i,a);else for(let u=0;u<o;u++){const c=this.subscriptions[u];c&&c(t,i,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ln=e=>e*1e3,wn=e=>e/1e3;function d1(e,t){return t?e*(1e3/t):0}const h1=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e,hC=1e-7,mC=12;function pC(e,t,i,a,o){let u,c,d=0;do c=t+(i-t)/2,u=h1(c,a,o)-e,u>0?i=c:t=c;while(Math.abs(u)>hC&&++d<mC);return c}function Mo(e,t,i,a){if(e===t&&i===a)return Tn;const o=u=>pC(u,0,1,e,i);return u=>u===0||u===1?u:h1(o(u),t,a)}const m1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,p1=e=>t=>1-e(1-t),g1=Mo(.33,1.53,.69,.99),um=p1(g1),y1=m1(um),b1=e=>e>=1?1:(e*=2)<1?.5*um(e):.5*(2-Math.pow(2,-10*(e-1))),cm=e=>1-Math.sin(Math.acos(e)),v1=p1(cm),x1=m1(cm),gC=Mo(.42,0,1,1),yC=Mo(0,0,.58,1),S1=Mo(.42,0,.58,1),bC=e=>Array.isArray(e)&&typeof e[0]!="number",w1=e=>Array.isArray(e)&&typeof e[0]=="number",vC={linear:Tn,easeIn:gC,easeInOut:S1,easeOut:yC,circIn:cm,circInOut:x1,circOut:v1,backIn:um,backInOut:y1,backOut:g1,anticipate:b1},xC=e=>typeof e=="string",p0=e=>{if(w1(e)){om(e.length===4);const[t,i,a,o]=e;return Mo(t,i,a,o)}else if(xC(e))return vC[e];return e},iu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function SC(e,t){let i=new Set,a=new Set,o=!1,u=!1;const c=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(g){c.has(g)&&(m.schedule(g),e()),g(d)}const m={schedule:(g,y=!1,v=!1)=>{const A=v&&o?i:a;return y&&c.add(g),A.add(g),g},cancel:g=>{a.delete(g),c.delete(g)},process:g=>{if(d=g,o){u=!0;return}o=!0;const y=i;i=a,a=y,i.forEach(p),i.clear(),o=!1,u&&(u=!1,m.process(g))}};return m}const wC=40;function T1(e,t){let i=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>i=!0,c=iu.reduce((N,q)=>(N[q]=SC(u),N),{}),{setup:d,read:p,resolveKeyframes:m,preUpdate:g,update:y,preRender:v,render:x,postRender:A}=c,D=()=>{const N=fr.useManualTiming,q=N?o.timestamp:performance.now();i=!1,N||(o.delta=a?1e3/60:Math.max(Math.min(q-o.timestamp,wC),1)),o.timestamp=q,o.isProcessing=!0,d.process(o),p.process(o),m.process(o),g.process(o),y.process(o),v.process(o),x.process(o),A.process(o),o.isProcessing=!1,i&&t&&(a=!1,e(D))},R=()=>{i=!0,a=!0,o.isProcessing||e(D)};return{schedule:iu.reduce((N,q)=>{const Z=c[q];return N[q]=(L,K=!1,V=!1)=>(i||R(),Z.schedule(L,K,V)),N},{}),cancel:N=>{for(let q=0;q<iu.length;q++)c[iu[q]].cancel(N)},state:o,steps:c}}const{schedule:Ze,cancel:dr,state:Dt,steps:Cd}=T1(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tn,!0);let gu;function TC(){gu=void 0}const It={now:()=>(gu===void 0&&It.set(Dt.isProcessing||fr.useManualTiming?Dt.timestamp:performance.now()),gu),set:e=>{gu=e,queueMicrotask(TC)}},E1=e=>t=>typeof t=="string"&&t.startsWith(e),A1=E1("--"),EC=E1("var(--"),fm=e=>EC(e)?AC.test(e.split("/*")[0].trim()):!1,AC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function g0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const is={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},So={...is,transform:e=>Kn(0,1,e)},ru={...is,default:1},fo=e=>Math.round(e*1e5)/1e5,dm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function CC(e){return e==null}const _C=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hm=(e,t)=>i=>!!(typeof i=="string"&&_C.test(i)&&i.startsWith(e)||t&&!CC(i)&&Object.prototype.hasOwnProperty.call(i,t)),C1=(e,t,i)=>a=>{if(typeof a!="string")return a;const[o,u,c,d]=a.match(dm);return{[e]:parseFloat(o),[t]:parseFloat(u),[i]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},kC=e=>Kn(0,255,e),_d={...is,transform:e=>Math.round(kC(e))},Gr={test:hm("rgb","red"),parse:C1("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:a=1})=>"rgba("+_d.transform(e)+", "+_d.transform(t)+", "+_d.transform(i)+", "+fo(So.transform(a))+")"};function DC(e){let t="",i="",a="",o="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),a=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),a=e.substring(3,4),o=e.substring(4,5),t+=t,i+=i,a+=a,o+=o),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(a,16),alpha:o?parseInt(o,16)/255:1}}const fh={test:hm("#"),parse:DC,transform:Gr.transform},No=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=No("deg"),Yn=No("%"),me=No("px"),MC=No("vh"),NC=No("vw"),y0={...Yn,parse:e=>Yn.parse(e)/100,transform:e=>Yn.transform(e*100)},Fa={test:hm("hsl","hue"),parse:C1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:a=1})=>"hsla("+Math.round(e)+", "+Yn.transform(fo(t))+", "+Yn.transform(fo(i))+", "+fo(So.transform(a))+")"},pt={test:e=>Gr.test(e)||fh.test(e)||Fa.test(e),parse:e=>Gr.test(e)?Gr.parse(e):Fa.test(e)?Fa.parse(e):fh.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gr.transform(e):Fa.transform(e),getAnimatableNone:e=>{const t=pt.parse(e);return t.alpha=0,pt.transform(t)}},RC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function OC(e){var t,i;return isNaN(e)&&typeof e=="string"&&(((t=e.match(dm))==null?void 0:t.length)||0)+(((i=e.match(RC))==null?void 0:i.length)||0)>0}const _1="number",k1="color",zC="var",LC="var(",b0="${}",jC=/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 $a(e){const t=e.toString(),i=[],a={color:[],number:[],var:[]},o=[];let u=0;const d=t.replace(jC,p=>(pt.test(p)?(a.color.push(u),o.push(k1),i.push(pt.parse(p))):p.startsWith(LC)?(a.var.push(u),o.push(zC),i.push(p)):(a.number.push(u),o.push(_1),i.push(parseFloat(p))),++u,b0)).split(b0);return{values:i,split:d,indexes:a,types:o}}function IC(e){return $a(e).values}function D1({split:e,types:t}){const i=e.length;return a=>{let o="";for(let u=0;u<i;u++)if(o+=e[u],a[u]!==void 0){const c=t[u];c===_1?o+=fo(a[u]):c===k1?o+=pt.transform(a[u]):o+=a[u]}return o}}function BC(e){return D1($a(e))}const UC=e=>typeof e=="number"?0:pt.test(e)?pt.getAnimatableNone(e):e,PC=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:UC(e);function VC(e){const t=$a(e);return D1(t)(t.values.map((a,o)=>PC(a,t.split[o])))}const Rn={test:OC,parse:IC,createTransformer:BC,getAnimatableNone:VC};function kd(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function HC({hue:e,saturation:t,lightness:i,alpha:a}){e/=360,t/=100,i/=100;let o=0,u=0,c=0;if(!t)o=u=c=i;else{const d=i<.5?i*(1+t):i+t-i*t,p=2*i-d;o=kd(p,d,e+1/3),u=kd(p,d,e),c=kd(p,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(c*255),alpha:a}}function Mu(e,t){return i=>i>0?t:e}const nt=(e,t,i)=>e+(t-e)*i,Dd=(e,t,i)=>{const a=e*e,o=i*(t*t-a)+a;return o<0?0:Math.sqrt(o)},FC=[fh,Gr,Fa],qC=e=>FC.find(t=>t.test(e));function v0(e){const t=qC(e);if(!t)return!1;let i=t.parse(e);return t===Fa&&(i=HC(i)),i}const x0=(e,t)=>{const i=v0(e),a=v0(t);if(!i||!a)return Mu(e,t);const o={...i};return u=>(o.red=Dd(i.red,a.red,u),o.green=Dd(i.green,a.green,u),o.blue=Dd(i.blue,a.blue,u),o.alpha=nt(i.alpha,a.alpha,u),Gr.transform(o))},dh=new Set(["none","hidden"]);function GC(e,t){return dh.has(e)?i=>i<=0?e:t:i=>i>=1?t:e}function YC(e,t){return i=>nt(e,t,i)}function mm(e){return typeof e=="number"?YC:typeof e=="string"?fm(e)?Mu:pt.test(e)?x0:QC:Array.isArray(e)?M1:typeof e=="object"?pt.test(e)?x0:XC:Mu}function M1(e,t){const i=[...e],a=i.length,o=e.map((u,c)=>mm(u)(u,t[c]));return u=>{for(let c=0;c<a;c++)i[c]=o[c](u);return i}}function XC(e,t){const i={...e,...t},a={};for(const o in i)e[o]!==void 0&&t[o]!==void 0&&(a[o]=mm(e[o])(e[o],t[o]));return o=>{for(const u in a)i[u]=a[u](o);return i}}function KC(e,t){const i=[],a={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const u=t.types[o],c=e.indexes[u][a[u]],d=e.values[c]??0;i[o]=d,a[u]++}return i}const QC=(e,t)=>{const i=Rn.createTransformer(t),a=$a(e),o=$a(t);return a.indexes.var.length===o.indexes.var.length&&a.indexes.color.length===o.indexes.color.length&&a.indexes.number.length>=o.indexes.number.length?dh.has(e)&&!o.values.length||dh.has(t)&&!a.values.length?GC(e,t):Do(M1(KC(a,o),o.values),i):Mu(e,t)};function N1(e,t,i){return typeof e=="number"&&typeof t=="number"&&typeof i=="number"?nt(e,t,i):mm(e)(e,t)}const WC=e=>{const t=({timestamp:i})=>e(i);return{start:(i=!0)=>Ze.update(t,i),stop:()=>dr(t),now:()=>Dt.isProcessing?Dt.timestamp:It.now()}},R1=(e,t,i=10)=>{let a="";const o=Math.max(Math.round(t/i),2);for(let u=0;u<o;u++)a+=Math.round(e(u/(o-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},Nu=2e4;function pm(e){let t=0;const i=50;let a=e.next(t);for(;!a.done&&t<Nu;)t+=i,a=e.next(t);return t>=Nu?1/0:t}function ZC(e,t=100,i){const a=i({...e,keyframes:[0,t]}),o=Math.min(pm(a),Nu);return{type:"keyframes",ease:u=>a.next(o*u).value/t,duration:wn(o)}}const st={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 hh(e,t){return e*Math.sqrt(1-t*t)}const $C=12;function JC(e,t,i){let a=i;for(let o=1;o<$C;o++)a=a-e(a)/t(a);return a}const Md=.001;function e_({duration:e=st.duration,bounce:t=st.bounce,velocity:i=st.velocity,mass:a=st.mass}){let o,u,c=1-t;c=Kn(st.minDamping,st.maxDamping,c),e=Kn(st.minDuration,st.maxDuration,wn(e)),c<1?(o=m=>{const g=m*c,y=g*e,v=g-i,x=hh(m,c),A=Math.exp(-y);return Md-v/x*A},u=m=>{const y=m*c*e,v=y*i+i,x=Math.pow(c,2)*Math.pow(m,2)*e,A=Math.exp(-y),D=hh(Math.pow(m,2),c);return(-o(m)+Md>0?-1:1)*((v-x)*A)/D}):(o=m=>{const g=Math.exp(-m*e),y=(m-i)*e+1;return-Md+g*y},u=m=>{const g=Math.exp(-m*e),y=(i-m)*(e*e);return g*y});const d=5/e,p=JC(o,u,d);if(e=ln(e),isNaN(p))return{stiffness:st.stiffness,damping:st.damping,duration:e};{const m=Math.pow(p,2)*a;return{stiffness:m,damping:c*2*Math.sqrt(a*m),duration:e}}}const t_=["duration","bounce"],n_=["stiffness","damping","mass"];function S0(e,t){return t.some(i=>e[i]!==void 0)}function i_(e){let t={velocity:st.velocity,stiffness:st.stiffness,damping:st.damping,mass:st.mass,isResolvedFromDuration:!1,...e};if(!S0(e,n_)&&S0(e,t_))if(t.velocity=0,e.visualDuration){const i=e.visualDuration,a=2*Math.PI/(i*1.2),o=a*a,u=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:st.mass,stiffness:o,damping:u}}else{const i=e_({...e,velocity:0});t={...t,...i,mass:st.mass},t.isResolvedFromDuration=!0}return t}function Ru(e=st.visualDuration,t=st.bounce){const i=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:o}=i;const u=i.keyframes[0],c=i.keyframes[i.keyframes.length-1],d={done:!1,value:u},{stiffness:p,damping:m,mass:g,duration:y,velocity:v,isResolvedFromDuration:x}=i_({...i,velocity:-wn(i.velocity||0)}),A=v||0,D=m/(2*Math.sqrt(p*g)),R=c-u,C=wn(Math.sqrt(p/g)),P=Math.abs(R)<5;a||(a=P?st.restSpeed.granular:st.restSpeed.default),o||(o=P?st.restDelta.granular:st.restDelta.default);let N,q,Z,L,K,V;if(D<1)Z=hh(C,D),L=(A+D*C*R)/Z,N=re=>{const ie=Math.exp(-D*C*re);return c-ie*(L*Math.sin(Z*re)+R*Math.cos(Z*re))},K=D*C*L+R*Z,V=D*C*R-L*Z,q=re=>Math.exp(-D*C*re)*(K*Math.sin(Z*re)+V*Math.cos(Z*re));else if(D===1){N=ie=>c-Math.exp(-C*ie)*(R+(A+C*R)*ie);const re=A+C*R;q=ie=>Math.exp(-C*ie)*(C*re*ie-A)}else{const re=C*Math.sqrt(D*D-1);N=ee=>{const $=Math.exp(-D*C*ee),O=Math.min(re*ee,300);return c-$*((A+D*C*R)*Math.sinh(O)+re*R*Math.cosh(O))/re};const ie=(A+D*C*R)/re,ae=D*C*ie-R*re,be=D*C*R-ie*re;q=ee=>{const $=Math.exp(-D*C*ee),O=Math.min(re*ee,300);return $*(ae*Math.sinh(O)+be*Math.cosh(O))}}const ne={calculatedDuration:x&&y||null,velocity:re=>ln(q(re)),next:re=>{if(!x&&D<1){const ae=Math.exp(-D*C*re),be=Math.sin(Z*re),ee=Math.cos(Z*re),$=c-ae*(L*be+R*ee),O=ln(ae*(K*be+V*ee));return d.done=Math.abs(O)<=a&&Math.abs(c-$)<=o,d.value=d.done?c:$,d}const ie=N(re);if(x)d.done=re>=y;else{const ae=ln(q(re));d.done=Math.abs(ae)<=a&&Math.abs(c-ie)<=o}return d.value=d.done?c:ie,d},toString:()=>{const re=Math.min(pm(ne),Nu),ie=R1(ae=>ne.next(re*ae).value,re,30);return re+"ms "+ie},toTransition:()=>{}};return ne}Ru.applyToOptions=e=>{const t=ZC(e,100,Ru);return e.ease=t.ease,e.duration=ln(t.duration),e.type="keyframes",e};const r_=5;function O1(e,t,i){const a=Math.max(t-r_,0);return d1(i-e(a),t-a)}function mh({keyframes:e,velocity:t=0,power:i=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:c,min:d,max:p,restDelta:m=.5,restSpeed:g}){const y=e[0],v={done:!1,value:y},x=V=>d!==void 0&&V<d||p!==void 0&&V>p,A=V=>d===void 0?p:p===void 0||Math.abs(d-V)<Math.abs(p-V)?d:p;let D=i*t;const R=y+D,C=c===void 0?R:c(R);C!==R&&(D=C-y);const P=V=>-D*Math.exp(-V/a),N=V=>C+P(V),q=V=>{const ne=P(V),re=N(V);v.done=Math.abs(ne)<=m,v.value=v.done?C:re};let Z,L;const K=V=>{x(v.value)&&(Z=V,L=Ru({keyframes:[v.value,A(v.value)],velocity:O1(N,V,v.value),damping:o,stiffness:u,restDelta:m,restSpeed:g}))};return K(0),{calculatedDuration:null,next:V=>{let ne=!1;return!L&&Z===void 0&&(ne=!0,q(V),K(V)),Z!==void 0&&V>=Z?L.next(V-Z):(!ne&&q(V),v)}}}function a_(e,t,i){const a=[],o=i||fr.mix||N1,u=e.length-1;for(let c=0;c<u;c++){let d=o(e[c],e[c+1]);if(t){const p=Array.isArray(t)?t[c]||Tn:t;d=Do(p,d)}a.push(d)}return a}function s_(e,t,{clamp:i=!0,ease:a,mixer:o}={}){const u=e.length;if(om(u===t.length),u===1)return()=>t[0];if(u===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[u-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=a_(t,a,o),p=d.length,m=g=>{if(c&&g<e[0])return t[0];let y=0;if(p>1)for(;y<e.length-2&&!(g<e[y+1]);y++);const v=xo(e[y],e[y+1],g);return d[y](v)};return i?g=>m(Kn(e[0],e[u-1],g)):m}function o_(e,t){const i=e[e.length-1];for(let a=1;a<=t;a++){const o=xo(0,t,a);e.push(nt(i,1,o))}}function l_(e){const t=[0];return o_(t,e.length-1),t}function u_(e,t){return e.map(i=>i*t)}function c_(e,t){return e.map(()=>t||S1).splice(0,e.length-1)}function ho({duration:e=300,keyframes:t,times:i,ease:a="easeInOut"}){const o=bC(a)?a.map(p0):p0(a),u={done:!1,value:t[0]},c=u_(i&&i.length===t.length?i:l_(t),e),d=s_(c,t,{ease:Array.isArray(o)?o:c_(t,o)});return{calculatedDuration:e,next:p=>(u.value=d(p),u.done=p>=e,u)}}const f_=e=>e!==null;function Wu(e,{repeat:t,repeatType:i="loop"},a,o=1){const u=e.filter(f_),d=o<0||t&&i!=="loop"&&t%2===1?0:u.length-1;return!d||a===void 0?u[d]:a}const d_={decay:mh,inertia:mh,tween:ho,keyframes:ho,spring:Ru};function z1(e){typeof e.type=="string"&&(e.type=d_[e.type])}class gm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,i){return this.finished.then(t,i)}}const h_=e=>e/100;class Ou extends gm{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=()=>{var a,o;const{motionValue:i}=this.options;i&&i.updatedAt!==It.now()&&this.tick(It.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(a=this.options).onStop)==null||o.call(a))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;z1(t);const{type:i=ho,repeat:a=0,repeatDelay:o=0,repeatType:u,velocity:c=0}=t;let{keyframes:d}=t;const p=i||ho;p!==ho&&typeof d[0]!="number"&&(this.mixKeyframes=Do(h_,N1(d[0],d[1])),d=[0,100]);const m=p({...t,keyframes:d});u==="mirror"&&(this.mirroredGenerator=p({...t,keyframes:[...d].reverse(),velocity:-c})),m.calculatedDuration===null&&(m.calculatedDuration=pm(m));const{calculatedDuration:g}=m;this.calculatedDuration=g,this.resolvedDuration=g+o,this.totalDuration=this.resolvedDuration*(a+1)-o,this.generator=m}updateTime(t){const i=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(t,i=!1){const{generator:a,totalDuration:o,mixKeyframes:u,mirroredGenerator:c,resolvedDuration:d,calculatedDuration:p}=this;if(this.startTime===null)return a.next(0);const{delay:m=0,keyframes:g,repeat:y,repeatType:v,repeatDelay:x,type:A,onUpdate:D,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const C=this.currentTime-m*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?C<0:C>o;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let N=this.currentTime,q=a;if(y){const V=Math.min(this.currentTime,o)/d;let ne=Math.floor(V),re=V%1;!re&&V>=1&&(re=1),re===1&&ne--,ne=Math.min(ne,y+1),!!(ne%2)&&(v==="reverse"?(re=1-re,x&&(re-=x/d)):v==="mirror"&&(q=c)),N=Kn(0,1,re)*d}let Z;P?(this.delayState.value=g[0],Z=this.delayState):Z=q.next(N),u&&!P&&(Z.value=u(Z.value));let{done:L}=Z;!P&&p!==null&&(L=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const K=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return K&&A!==mh&&(Z.value=Wu(g,this.options,R,this.speed)),D&&D(Z.value),K&&this.finish(),Z}then(t,i){return this.finished.then(t,i)}get duration(){return wn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+wn(t)}get time(){return wn(this.currentTime)}set time(t){t=ln(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 i=this.generator.next(t).value;return O1(a=>this.generator.next(a).value,t,i)}get speed(){return this.playbackSpeed}set speed(t){const i=this.playbackSpeed!==t;i&&this.driver&&this.updateTime(It.now()),this.playbackSpeed=t,i&&this.driver&&(this.time=wn(this.currentTime))}play(){var o,u;if(this.isStopped)return;const{driver:t=WC,startTime:i}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(u=(o=this.options).onPlay)==null||u.call(o);const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=i??a),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(It.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,i;this.notifyFinished(),this.teardown(),this.state="finished",(i=(t=this.options).onComplete)==null||i.call(t)}cancel(){var t,i;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(i=(t=this.options).onCancel)==null||i.call(t)}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){var i;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(i=this.driver)==null||i.stop(),t.observe(this)}}function m_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yr=e=>e*180/Math.PI,ph=e=>{const t=Yr(Math.atan2(e[1],e[0]));return gh(t)},p_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ph,rotateZ:ph,skewX:e=>Yr(Math.atan(e[1])),skewY:e=>Yr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},gh=e=>(e=e%360,e<0&&(e+=360),e),w0=ph,T0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),E0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),g_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:T0,scaleY:E0,scale:e=>(T0(e)+E0(e))/2,rotateX:e=>gh(Yr(Math.atan2(e[6],e[5]))),rotateY:e=>gh(Yr(Math.atan2(-e[2],e[0]))),rotateZ:w0,rotate:w0,skewX:e=>Yr(Math.atan(e[4])),skewY:e=>Yr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yh(e){return e.includes("scale")?1:0}function bh(e,t){if(!e||e==="none")return yh(t);const i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,o;if(i)a=g_,o=i;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=p_,o=d}if(!o)return yh(t);const u=a[t],c=o[1].split(",").map(b_);return typeof u=="function"?u(c):c[u]}const y_=(e,t)=>{const{transform:i="none"}=getComputedStyle(e);return bh(i,t)};function b_(e){return parseFloat(e.trim())}const rs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],as=new Set(rs),A0=e=>e===is||e===me,v_=new Set(["x","y","z"]),x_=rs.filter(e=>!v_.has(e));function S_(e){const t=[];return x_.forEach(i=>{const a=e.getValue(i);a!==void 0&&(t.push([i,a.get()]),a.set(i.startsWith("scale")?1:0))}),t}const lr={width:({x:e},{paddingLeft:t="0",paddingRight:i="0",boxSizing:a})=>{const o=e.max-e.min;return a==="border-box"?o:o-parseFloat(t)-parseFloat(i)},height:({y:e},{paddingTop:t="0",paddingBottom:i="0",boxSizing:a})=>{const o=e.max-e.min;return a==="border-box"?o:o-parseFloat(t)-parseFloat(i)},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})=>bh(t,"x"),y:(e,{transform:t})=>bh(t,"y")};lr.translateX=lr.x;lr.translateY=lr.y;const Kr=new Set;let vh=!1,xh=!1,Sh=!1;function L1(){if(xh){const e=Array.from(Kr).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),i=new Map;t.forEach(a=>{const o=S_(a);o.length&&(i.set(a,o),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const o=i.get(a);o&&o.forEach(([u,c])=>{var d;(d=a.getValue(u))==null||d.set(c)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}xh=!1,vh=!1,Kr.forEach(e=>e.complete(Sh)),Kr.clear()}function j1(){Kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xh=!0)})}function w_(){Sh=!0,j1(),L1(),Sh=!1}class ym{constructor(t,i,a,o,u,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=a,this.motionValue=o,this.element=u,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Kr.add(this),vh||(vh=!0,Ze.read(j1),Ze.resolveKeyframes(L1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:a,motionValue:o}=this;if(t[0]===null){const u=o==null?void 0:o.get(),c=t[t.length-1];if(u!==void 0)t[0]=u;else if(a&&i){const d=a.readValue(i,c);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=c),o&&u===void 0&&o.set(t[0])}m_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Kr.delete(this)}cancel(){this.state==="scheduled"&&(Kr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const T_=e=>e.startsWith("--");function I1(e,t,i){T_(t)?e.style.setProperty(t,i):e.style[t]=i}const E_={};function B1(e,t){const i=f1(e);return()=>E_[t]??i()}const A_=B1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),U1=B1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),co=([e,t,i,a])=>`cubic-bezier(${e}, ${t}, ${i}, ${a})`,C0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:co([0,.65,.55,1]),circOut:co([.55,0,1,.45]),backIn:co([.31,.01,.66,-.59]),backOut:co([.33,1.53,.69,.99])};function P1(e,t){if(e)return typeof e=="function"?U1()?R1(e,t):"ease-out":w1(e)?co(e):Array.isArray(e)?e.map(i=>P1(i,t)||C0.easeOut):C0[e]}function C_(e,t,i,{delay:a=0,duration:o=300,repeat:u=0,repeatType:c="loop",ease:d="easeOut",times:p}={},m=void 0){const g={[t]:i};p&&(g.offset=p);const y=P1(d,o);Array.isArray(y)&&(g.easing=y);const v={delay:a,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:c==="reverse"?"alternate":"normal"};return m&&(v.pseudoElement=m),e.animate(g,v)}function V1(e){return typeof e=="function"&&"applyToOptions"in e}function __({type:e,...t}){return V1(e)&&U1()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class H1 extends gm{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:i,name:a,keyframes:o,pseudoElement:u,allowFlatten:c=!1,finalKeyframe:d,onComplete:p}=t;this.isPseudoElement=!!u,this.allowFlatten=c,this.options=t,om(typeof t.type!="string");const m=__(t);this.animation=C_(i,a,o,m,u),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const g=Wu(o,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(g),I1(i,a,g),this.animation.cancel()}p==null||p(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,i;(i=(t=this.animation).finish)==null||i.call(t)}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(){var i,a,o;const t=(i=this.options)==null?void 0:i.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(a=this.animation).commitStyles)==null||o.call(a))}get duration(){var i,a;const t=((a=(i=this.animation.effect)==null?void 0:i.getComputedTiming)==null?void 0:a.call(i).duration)||0;return wn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+wn(t)}get time(){return wn(Number(this.animation.currentTime)||0)}set time(t){const i=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ln(t),i&&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:i,rangeEnd:a,observe:o}){var u;return this.allowFlatten&&((u=this.animation.effect)==null||u.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&A_()?(this.animation.timeline=t,i&&(this.animation.rangeStart=i),a&&(this.animation.rangeEnd=a),Tn):o(this)}}const F1={anticipate:b1,backInOut:y1,circInOut:x1};function k_(e){return e in F1}function D_(e){typeof e.ease=="string"&&k_(e.ease)&&(e.ease=F1[e.ease])}const Nd=10;class M_ extends H1{constructor(t){D_(t),z1(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:i,onUpdate:a,onComplete:o,element:u,...c}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const d=new Ou({...c,autoplay:!1}),p=Math.max(Nd,It.now()-this.startTime),m=Kn(0,Nd,p-Nd),g=d.sample(p).value,{name:y}=this.options;u&&y&&I1(u,y,g),i.setWithVelocity(d.sample(Math.max(0,p-m)).value,g,m),d.stop()}}const _0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rn.test(e)||e==="0")&&!e.startsWith("url("));function N_(e){const t=e[0];if(e.length===1)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}function R_(e,t,i,a){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const u=e[e.length-1],c=_0(o,t),d=_0(u,t);return!c||!d?!1:N_(e)||(i==="spring"||V1(i))&&a}function wh(e){e.duration=0,e.type="keyframes"}const q1=new Set(["opacity","clipPath","filter","transform"]),O_=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function z_(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&O_.test(e[t]))return!0;return!1}const L_=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),j_=f1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function I_(e){var y;const{motionValue:t,name:i,repeatDelay:a,repeatType:o,damping:u,type:c,keyframes:d}=e;if(!(((y=t==null?void 0:t.owner)==null?void 0:y.current)instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=t.owner.getProps();return j_()&&i&&(q1.has(i)||L_.has(i)&&z_(d))&&(i!=="transform"||!g)&&!m&&!a&&o!=="mirror"&&u!==0&&c!=="inertia"}const B_=40;class U_ extends gm{constructor({autoplay:t=!0,delay:i=0,type:a="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:c="loop",keyframes:d,name:p,motionValue:m,element:g,...y}){var A;super(),this.stop=()=>{var D,R;this._animation&&(this._animation.stop(),(D=this.stopTimeline)==null||D.call(this)),(R=this.keyframeResolver)==null||R.cancel()},this.createdAt=It.now();const v={autoplay:t,delay:i,type:a,repeat:o,repeatDelay:u,repeatType:c,name:p,motionValue:m,element:g,...y},x=(g==null?void 0:g.KeyframeResolver)||ym;this.keyframeResolver=new x(d,(D,R,C)=>this.onKeyframesResolved(D,R,v,!C),p,m,g),(A=this.keyframeResolver)==null||A.scheduleResolve()}onKeyframesResolved(t,i,a,o){var C,P;this.keyframeResolver=void 0;const{name:u,type:c,velocity:d,delay:p,isHandoff:m,onUpdate:g}=a;this.resolvedAt=It.now();let y=!0;R_(t,u,c,d)||(y=!1,(fr.instantAnimations||!p)&&(g==null||g(Wu(t,a,i))),t[0]=t[t.length-1],wh(a),a.repeat=0);const x={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>B_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...a,keyframes:t},A=y&&!m&&I_(x),D=(P=(C=x.motionValue)==null?void 0:C.owner)==null?void 0:P.current;let R;if(A)try{R=new M_({...x,element:D})}catch{R=new Ou(x)}else R=new Ou(x);R.finished.then(()=>{this.notifyFinished()}).catch(Tn),this.pendingTimeline&&(this.stopTimeline=R.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=R}get finished(){return this._animation?this.animation.finished:this._finished}then(t,i){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),w_()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function G1(e,t,i,a=0,o=1){const u=Array.from(e).sort((m,g)=>m.sortNodePosition(g)).indexOf(t),c=e.size,d=(c-1)*a;return typeof i=="function"?i(u,c):o===1?u*a:d-u*a}const P_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V_(e){const t=P_.exec(e);if(!t)return[,];const[,i,a,o]=t;return[`--${i??a}`,o]}function Y1(e,t,i=1){const[a,o]=V_(e);if(!a)return;const u=window.getComputedStyle(t).getPropertyValue(a);if(u){const c=u.trim();return l1(c)?parseFloat(c):c}return fm(o)?Y1(o,t,i+1):o}const H_={type:"spring",stiffness:500,damping:25,restSpeed:10},F_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),q_={type:"keyframes",duration:.8},G_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Y_=(e,{keyframes:t})=>t.length>2?q_:as.has(e)?e.startsWith("scale")?F_(t[1]):H_:G_;function X1(e,t){if(e!=null&&e.inherit&&t){const{inherit:i,...a}=e;return{...t,...a}}return e}function bm(e,t){const i=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return i!==e?X1(i,e):i}const X_=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function K_(e){for(const t in e)if(!X_.has(t))return!0;return!1}const vm=(e,t,i,a={},o,u)=>c=>{const d=bm(a,e)||{},p=d.delay||a.delay||0;let{elapsed:m=0}=a;m=m-ln(p);const g={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-m,onUpdate:v=>{t.set(v),d.onUpdate&&d.onUpdate(v)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:u?void 0:o};K_(d)||Object.assign(g,Y_(e,g)),g.duration&&(g.duration=ln(g.duration)),g.repeatDelay&&(g.repeatDelay=ln(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(wh(g),g.delay===0&&(y=!0)),(fr.instantAnimations||fr.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(y=!0,wh(g),g.delay=0),g.allowFlatten=!d.type&&!d.ease,y&&!u&&t.get()!==void 0){const v=Wu(g.keyframes,d);if(v!==void 0){Ze.update(()=>{g.onUpdate(v),g.onComplete()});return}}return d.isSync?new Ou(g):new U_(g)};function k0(e){const t=[{},{}];return e==null||e.values.forEach((i,a)=>{t[0][a]=i.get(),t[1][a]=i.getVelocity()}),t}function xm(e,t,i,a){if(typeof t=="function"){const[o,u]=k0(a);t=t(i!==void 0?i:e.custom,o,u)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,u]=k0(a);t=t(i!==void 0?i:e.custom,o,u)}return t}function Qr(e,t,i){const a=e.getProps();return xm(a,t,i!==void 0?i:a.custom,e)}const K1=new Set(["width","height","top","left","right","bottom",...rs]),D0=30,Q_=e=>!isNaN(parseFloat(e));class W_{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{var u;const o=It.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&((u=this.events.change)==null||u.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=It.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Q_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new lm);const a=this.events[t].add(i);return t==="change"?()=>{a(),Ze.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,a){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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=It.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>D0)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,D0);return d1(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),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(){var t,i;(t=this.dependents)==null||t.clear(),(i=this.events.destroy)==null||i.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ja(e,t){return new W_(e,t)}const Th=e=>Array.isArray(e);function Z_(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,Ja(i))}function $_(e){return Th(e)?e[e.length-1]||0:e}function J_(e,t){const i=Qr(e,t);let{transitionEnd:a={},transition:o={},...u}=i||{};u={...u,...a};for(const c in u){const d=$_(u[c]);Z_(e,c,d)}}const Mt=e=>!!(e&&e.getVelocity);function e2(e){return!!(Mt(e)&&e.add)}function Eh(e,t){const i=e.getValue("willChange");if(e2(i))return i.add(t);if(!i&&fr.WillChange){const a=new fr.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function Sm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const t2="framerAppearId",Q1="data-"+Sm(t2);function W1(e){return e.props[Q1]}function n2({protectedKeys:e,needsAnimating:t},i){const a=e.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,a}function Z1(e,t,{delay:i=0,transitionOverride:a,type:o}={}){let{transition:u,transitionEnd:c,...d}=t;const p=e.getDefaultTransition();u=u?X1(u,p):p;const m=u==null?void 0:u.reduceMotion;a&&(u=a);const g=[],y=o&&e.animationState&&e.animationState.getState()[o];for(const v in d){const x=e.getValue(v,e.latestValues[v]??null),A=d[v];if(A===void 0||y&&n2(y,v))continue;const D={delay:i,...bm(u||{},v)},R=x.get();if(R!==void 0&&!x.isAnimating()&&!Array.isArray(A)&&A===R&&!D.velocity){Ze.update(()=>x.set(A));continue}let C=!1;if(window.MotionHandoffAnimation){const q=W1(e);if(q){const Z=window.MotionHandoffAnimation(q,v,Ze);Z!==null&&(D.startTime=Z,C=!0)}}Eh(e,v);const P=m??e.shouldReduceMotion;x.start(vm(v,x,A,P&&K1.has(v)?{type:!1}:D,e,C));const N=x.animation;N&&g.push(N)}if(c){const v=()=>Ze.update(()=>{c&&J_(e,c)});g.length?Promise.all(g).then(v):v()}return g}function Ah(e,t,i={}){var p;const a=Qr(e,t,i.type==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=a||{};i.transitionOverride&&(o=i.transitionOverride);const u=a?()=>Promise.all(Z1(e,a,i)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:v}=o;return i2(e,t,m,g,y,v,i)}:()=>Promise.resolve(),{when:d}=o;if(d){const[m,g]=d==="beforeChildren"?[u,c]:[c,u];return m().then(()=>g())}else return Promise.all([u(),c(i.delay)])}function i2(e,t,i=0,a=0,o=0,u=1,c){const d=[];for(const p of e.variantChildren)p.notify("AnimationStart",t),d.push(Ah(p,t,{...c,delay:i+(typeof a=="function"?0:a)+G1(e.variantChildren,p,a,o,u)}).then(()=>p.notify("AnimationComplete",t)));return Promise.all(d)}function r2(e,t,i={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const o=t.map(u=>Ah(e,u,i));a=Promise.all(o)}else if(typeof t=="string")a=Ah(e,t,i);else{const o=typeof t=="function"?Qr(e,t,i.custom):t;a=Promise.all(Z1(e,o,i))}return a.then(()=>{e.notify("AnimationComplete",t)})}const a2={test:e=>e==="auto",parse:e=>e},$1=e=>t=>t.test(e),J1=[is,me,Yn,ir,NC,MC,a2],M0=e=>J1.find($1(e));function s2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||c1(e):!0}const o2=new Set(["brightness","contrast","saturate","opacity"]);function l2(e){const[t,i]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=i.match(dm)||[];if(!a)return e;const o=i.replace(a,"");let u=o2.has(t)?1:0;return a!==i&&(u*=100),t+"("+u+o+")"}const u2=/\b([a-z-]*)\(.*?\)/gu,Ch={...Rn,getAnimatableNone:e=>{const t=e.match(u2);return t?t.map(l2).join(" "):e}},_h={...Rn,getAnimatableNone:e=>{const t=Rn.parse(e);return Rn.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},N0={...is,transform:Math.round},c2={rotate:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:ru,scaleX:ru,scaleY:ru,scaleZ:ru,skew:ir,skewX:ir,skewY:ir,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:So,originX:y0,originY:y0,originZ:me},wm={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,inset:me,insetBlock:me,insetBlockStart:me,insetBlockEnd:me,insetInline:me,insetInlineStart:me,insetInlineEnd:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,paddingBlock:me,paddingBlockStart:me,paddingBlockEnd:me,paddingInline:me,paddingInlineStart:me,paddingInlineEnd:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,marginBlock:me,marginBlockStart:me,marginBlockEnd:me,marginInline:me,marginInlineStart:me,marginInlineEnd:me,fontSize:me,backgroundPositionX:me,backgroundPositionY:me,...c2,zIndex:N0,fillOpacity:So,strokeOpacity:So,numOctaves:N0},f2={...wm,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Ch,WebkitFilter:Ch,mask:_h,WebkitMask:_h},eS=e=>f2[e],d2=new Set([Ch,_h]);function tS(e,t){let i=eS(e);return d2.has(i)||(i=Rn),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const h2=new Set(["auto","none","0"]);function m2(e,t,i){let a=0,o;for(;a<e.length&&!o;){const u=e[a];typeof u=="string"&&!h2.has(u)&&$a(u).values.length&&(o=e[a]),a++}if(o&&i)for(const u of t)e[u]=tS(i,o)}class p2 extends ym{constructor(t,i,a,o,u){super(t,i,a,o,u,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:a}=this;if(!i||!i.current)return;super.readKeyframes();for(let g=0;g<t.length;g++){let y=t[g];if(typeof y=="string"&&(y=y.trim(),fm(y))){const v=Y1(y,i.current);v!==void 0&&(t[g]=v),g===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!K1.has(a)||t.length!==2)return;const[o,u]=t,c=M0(o),d=M0(u),p=g0(o),m=g0(u);if(p!==m&&lr[a]){this.needsMeasurement=!0;return}if(c!==d)if(A0(c)&&A0(d))for(let g=0;g<t.length;g++){const y=t[g];typeof y=="string"&&(t[g]=parseFloat(y))}else lr[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,a=[];for(let o=0;o<t.length;o++)(t[o]===null||s2(t[o]))&&a.push(o);a.length&&m2(t,a,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lr[a](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const o=i[i.length-1];o!==void 0&&t.getValue(a,o).jump(o,!1)}measureEndState(){var d;const{element:t,name:i,unresolvedKeyframes:a}=this;if(!t||!t.current)return;const o=t.getValue(i);o&&o.jump(this.measuredOrigin,!1);const u=a.length-1,c=a[u];a[u]=lr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(d=this.removedTransforms)!=null&&d.length&&this.removedTransforms.forEach(([p,m])=>{t.getValue(p).set(m)}),this.resolveNoneKeyframes()}}function nS(e,t,i){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const o=(i==null?void 0:i[e])??a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(a=>a!=null)}const iS=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function yu(e){return u1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Tm}=T1(queueMicrotask,!1),Dn={x:!1,y:!1};function rS(){return Dn.x||Dn.y}function g2(e){return e==="x"||e==="y"?Dn[e]?null:(Dn[e]=!0,()=>{Dn[e]=!1}):Dn.x||Dn.y?null:(Dn.x=Dn.y=!0,()=>{Dn.x=Dn.y=!1})}function aS(e,t){const i=nS(e),a=new AbortController,o={passive:!0,...t,signal:a.signal};return[i,o,()=>a.abort()]}function y2(e){return!(e.pointerType==="touch"||rS())}function b2(e,t,i={}){const[a,o,u]=aS(e,i);return a.forEach(c=>{let d=!1,p=!1,m;const g=()=>{c.removeEventListener("pointerleave",A)},y=R=>{m&&(m(R),m=void 0),g()},v=R=>{d=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),p&&(p=!1,y(R))},x=()=>{d=!0,window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",v,o)},A=R=>{if(R.pointerType!=="touch"){if(d){p=!0;return}y(R)}},D=R=>{if(!y2(R))return;p=!1;const C=t(c,R);typeof C=="function"&&(m=C,c.addEventListener("pointerleave",A,o))};c.addEventListener("pointerenter",D,o),c.addEventListener("pointerdown",x,o)}),u}const sS=(e,t)=>t?e===t?!0:sS(e,t.parentElement):!1,Em=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,v2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function x2(e){return v2.has(e.tagName)||e.isContentEditable===!0}const S2=new Set(["INPUT","SELECT","TEXTAREA"]);function w2(e){return S2.has(e.tagName)||e.isContentEditable===!0}const bu=new WeakSet;function R0(e){return t=>{t.key==="Enter"&&e(t)}}function Rd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const T2=(e,t)=>{const i=e.currentTarget;if(!i)return;const a=R0(()=>{if(bu.has(i))return;Rd(i,"down");const o=R0(()=>{Rd(i,"up")}),u=()=>Rd(i,"cancel");i.addEventListener("keyup",o,t),i.addEventListener("blur",u,t)});i.addEventListener("keydown",a,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",a),t)};function O0(e){return Em(e)&&!rS()}const z0=new WeakSet;function E2(e,t,i={}){const[a,o,u]=aS(e,i),c=d=>{const p=d.currentTarget;if(!O0(d)||z0.has(d))return;bu.add(p),i.stopPropagation&&z0.add(d);const m=t(p,d),g=(x,A)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),bu.has(p)&&bu.delete(p),O0(x)&&typeof m=="function"&&m(x,{success:A})},y=x=>{g(x,p===window||p===document||i.useGlobalTarget||sS(p,x.target))},v=x=>{g(x,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return a.forEach(d=>{(i.useGlobalTarget?window:d).addEventListener("pointerdown",c,o),yu(d)&&(d.addEventListener("focus",m=>T2(m,o)),!x2(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),u}function Am(e){return u1(e)&&"ownerSVGElement"in e}const vu=new WeakMap;let rr;const oS=(e,t,i)=>(a,o)=>o&&o[0]?o[0][e+"Size"]:Am(a)&&"getBBox"in a?a.getBBox()[t]:a[i],A2=oS("inline","width","offsetWidth"),C2=oS("block","height","offsetHeight");function _2({target:e,borderBoxSize:t}){var i;(i=vu.get(e))==null||i.forEach(a=>{a(e,{get width(){return A2(e,t)},get height(){return C2(e,t)}})})}function k2(e){e.forEach(_2)}function D2(){typeof ResizeObserver>"u"||(rr=new ResizeObserver(k2))}function M2(e,t){rr||D2();const i=nS(e);return i.forEach(a=>{let o=vu.get(a);o||(o=new Set,vu.set(a,o)),o.add(t),rr==null||rr.observe(a)}),()=>{i.forEach(a=>{const o=vu.get(a);o==null||o.delete(t),o!=null&&o.size||rr==null||rr.unobserve(a)})}}const xu=new Set;let qa;function N2(){qa=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};xu.forEach(t=>t(e))},window.addEventListener("resize",qa)}function R2(e){return xu.add(e),qa||N2(),()=>{xu.delete(e),!xu.size&&typeof qa=="function"&&(window.removeEventListener("resize",qa),qa=void 0)}}function L0(e,t){return typeof e=="function"?R2(e):M2(e,t)}function O2(e){return Am(e)&&e.tagName==="svg"}const z2=[...J1,pt,Rn],L2=e=>z2.find($1(e)),j0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ga=()=>({x:j0(),y:j0()}),I0=()=>({min:0,max:0}),vt=()=>({x:I0(),y:I0()}),j2=new WeakMap;function Zu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wo(e){return typeof e=="string"||Array.isArray(e)}const Cm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_m=["initial",...Cm];function $u(e){return Zu(e.animate)||_m.some(t=>wo(e[t]))}function lS(e){return!!($u(e)||e.variants)}function I2(e,t,i){for(const a in t){const o=t[a],u=i[a];if(Mt(o))e.addValue(a,o);else if(Mt(u))e.addValue(a,Ja(o,{owner:e}));else if(u!==o)if(e.hasValue(a)){const c=e.getValue(a);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(a);e.addValue(a,Ja(c!==void 0?c:o,{owner:e}))}}for(const a in i)t[a]===void 0&&e.removeValue(a);return t}const kh={current:null},uS={current:!1},B2=typeof window<"u";function U2(){if(uS.current=!0,!!B2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kh.current=e.matches;e.addEventListener("change",t),t()}else kh.current=!1}const B0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zu={};function cS(e){zu=e}function P2(){return zu}class V2{scrapeMotionValuesFromProps(t,i,a){return{}}constructor({parent:t,props:i,presenceContext:a,reducedMotionConfig:o,skipAnimations:u,blockInitialAnimation:c,visualState:d},p={}){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=ym,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 x=It.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Ze.render(this.render,!1,!0))};const{latestValues:m,renderState:g}=d;this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=t,this.props=i,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=u,this.options=p,this.blockInitialAnimation=!!c,this.isControllingVariants=$u(i),this.isVariantNode=lS(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:y,...v}=this.scrapeMotionValuesFromProps(i,{},this);for(const x in v){const A=v[x];m[x]!==void 0&&Mt(A)&&A.set(m[x])}}mount(t){var i,a;if(this.hasBeenMounted)for(const o in this.initialValues)(i=this.values.get(o))==null||i.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=t,j2.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((o,u)=>this.bindToMotionValue(u,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(uS.current||U2(),this.shouldReduceMotion=kh.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(a=this.parent)==null||a.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),dr(this.notifyUpdate),dr(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const a=this.features[i];a&&(a.unmount(),a.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,i){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),i.accelerate&&q1.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:d,times:p,ease:m,duration:g}=i.accelerate,y=new H1({element:this.current,name:t,keyframes:d,times:p,ease:m,duration:ln(g)}),v=c(y);this.valueSubscriptions.set(t,()=>{v(),y.cancel()});return}const a=as.has(t);a&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ze.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{o(),u&&u(),i.owner&&i.stop()})}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 zu){const i=zu[t];if(!i)continue;const{isEnabled:a,Feature:o}=i;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){const u=this.features[t];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let a=0;a<B0.length;a++){const o=B0[a];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const u="on"+o,c=t[u];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=I2(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 i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const a=this.values.get(t);i!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&i!==void 0&&(a=Ja(i===null?void 0:i,{owner:this}),this.addValue(t,a)),a}readValue(t,i){let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(l1(a)||c1(a))?a=parseFloat(a):!L2(a)&&Rn.test(i)&&(a=tS(t,i)),this.setBaseTarget(t,Mt(a)?a.get():a)),Mt(a)?a.get():a}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){var u;const{initial:i}=this.props;let a;if(typeof i=="string"||typeof i=="object"){const c=xm(this.props,i,(u=this.presenceContext)==null?void 0:u.custom);c&&(a=c[t])}if(i&&a!==void 0)return a;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Mt(o)?o:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new lm),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){Tm.render(this.render)}}class fS extends V2{constructor(){super(...arguments),this.KeyframeResolver=p2}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){const a=t.style;return a?a[i]:void 0}removeValueFromRenderState(t,{vars:i,style:a}){delete i[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Mt(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}class mr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function dS({top:e,left:t,right:i,bottom:a}){return{x:{min:t,max:i},y:{min:e,max:a}}}function H2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function F2(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:a.y,right:a.x}}function Od(e){return e===void 0||e===1}function Dh({scale:e,scaleX:t,scaleY:i}){return!Od(e)||!Od(t)||!Od(i)}function Hr(e){return Dh(e)||hS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hS(e){return U0(e.x)||U0(e.y)}function U0(e){return e&&e!=="0%"}function Lu(e,t,i){const a=e-i,o=t*a;return i+o}function P0(e,t,i,a,o){return o!==void 0&&(e=Lu(e,o,a)),Lu(e,i,a)+t}function Mh(e,t=0,i=1,a,o){e.min=P0(e.min,t,i,a,o),e.max=P0(e.max,t,i,a,o)}function mS(e,{x:t,y:i}){Mh(e.x,t.translate,t.scale,t.originPoint),Mh(e.y,i.translate,i.scale,i.originPoint)}const V0=.999999999999,H0=1.0000000000001;function q2(e,t,i,a=!1){var d;const o=i.length;if(!o)return;t.x=t.y=1;let u,c;for(let p=0;p<o;p++){u=i[p],c=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(Hn(e.x,-u.scroll.offset.x),Hn(e.y,-u.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,mS(e,c)),a&&Hr(u.latestValues)&&Su(e,u.latestValues,(d=u.layout)==null?void 0:d.layoutBox))}t.x<H0&&t.x>V0&&(t.x=1),t.y<H0&&t.y>V0&&(t.y=1)}function Hn(e,t){e.min+=t,e.max+=t}function F0(e,t,i,a,o=.5){const u=nt(e.min,e.max,o);Mh(e,t,i,u,a)}function q0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Su(e,t,i){const a=i??e;F0(e.x,q0(t.x,a.x),t.scaleX,t.scale,t.originX),F0(e.y,q0(t.y,a.y),t.scaleY,t.scale,t.originY)}function pS(e,t){return dS(F2(e.getBoundingClientRect(),t))}function G2(e,t,i){const a=pS(e,i),{scroll:o}=t;return o&&(Hn(a.x,o.offset.x),Hn(a.y,o.offset.y)),a}const Y2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},X2=rs.length;function K2(e,t,i){let a="",o=!0;for(let u=0;u<X2;u++){const c=rs[u],d=e[c];if(d===void 0)continue;let p=!0;if(typeof d=="number")p=d===(c.startsWith("scale")?1:0);else{const m=parseFloat(d);p=c.startsWith("scale")?m===1:m===0}if(!p||i){const m=iS(d,wm[c]);if(!p){o=!1;const g=Y2[c]||c;a+=`${g}(${m}) `}i&&(t[c]=m)}}return a=a.trim(),i?a=i(t,o?"":a):o&&(a="none"),a}function km(e,t,i){const{style:a,vars:o,transformOrigin:u}=e;let c=!1,d=!1;for(const p in t){const m=t[p];if(as.has(p)){c=!0;continue}else if(A1(p)){o[p]=m;continue}else{const g=iS(m,wm[p]);p.startsWith("origin")?(d=!0,u[p]=g):a[p]=g}}if(t.transform||(c||i?a.transform=K2(t,e.transform,i):a.transform&&(a.transform="none")),d){const{originX:p="50%",originY:m="50%",originZ:g=0}=u;a.transformOrigin=`${p} ${m} ${g}`}}function gS(e,{style:t,vars:i},a,o){const u=e.style;let c;for(c in t)u[c]=t[c];o==null||o.applyProjectionStyles(u,a);for(c in i)u.setProperty(c,i[c])}function G0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const no={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const i=G0(e,t.target.x),a=G0(e,t.target.y);return`${i}% ${a}%`}},Q2={correct:(e,{treeScale:t,projectionDelta:i})=>{const a=e,o=Rn.parse(e);if(o.length>5)return a;const u=Rn.createTransformer(e),c=typeof o[0]!="number"?1:0,d=i.x.scale*t.x,p=i.y.scale*t.y;o[0+c]/=d,o[1+c]/=p;const m=nt(d,p,.5);return typeof o[2+c]=="number"&&(o[2+c]/=m),typeof o[3+c]=="number"&&(o[3+c]/=m),u(o)}},Nh={borderRadius:{...no,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:no,borderTopRightRadius:no,borderBottomLeftRadius:no,borderBottomRightRadius:no,boxShadow:Q2};function yS(e,{layout:t,layoutId:i}){return as.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!Nh[e]||e==="opacity")}function Dm(e,t,i){var c;const a=e.style,o=t==null?void 0:t.style,u={};if(!a)return u;for(const d in a)(Mt(a[d])||o&&Mt(o[d])||yS(d,e)||((c=i==null?void 0:i.getValue(d))==null?void 0:c.liveStyle)!==void 0)&&(u[d]=a[d]);return u}function W2(e){return window.getComputedStyle(e)}class Z2 extends fS{constructor(){super(...arguments),this.type="html",this.renderInstance=gS}readValueFromInstance(t,i){var a;if(as.has(i))return(a=this.projection)!=null&&a.isProjecting?yh(i):y_(t,i);{const o=W2(t),u=(A1(i)?o.getPropertyValue(i):o[i])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(t,{transformPagePoint:i}){return pS(t,i)}build(t,i,a){km(t,i,a.transformTemplate)}scrapeMotionValuesFromProps(t,i,a){return Dm(t,i,a)}}const $2={offset:"stroke-dashoffset",array:"stroke-dasharray"},J2={offset:"strokeDashoffset",array:"strokeDasharray"};function ek(e,t,i=1,a=0,o=!0){e.pathLength=1;const u=o?$2:J2;e[u.offset]=`${-a}`,e[u.array]=`${t} ${i}`}const tk=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function bS(e,{attrX:t,attrY:i,attrScale:a,pathLength:o,pathSpacing:u=1,pathOffset:c=0,...d},p,m,g){if(km(e,d,m),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete y.transformBox);for(const x of tk)y[x]!==void 0&&(v[x]=y[x],delete y[x]);t!==void 0&&(y.x=t),i!==void 0&&(y.y=i),a!==void 0&&(y.scale=a),o!==void 0&&ek(y,o,u,c,!1)}const vS=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"]),xS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function nk(e,t,i,a){gS(e,t,void 0,a);for(const o in t.attrs)e.setAttribute(vS.has(o)?o:Sm(o),t.attrs[o])}function SS(e,t,i){const a=Dm(e,t,i);for(const o in e)if(Mt(e[o])||Mt(t[o])){const u=rs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[u]=e[o]}return a}class ik extends fS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vt}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(as.has(i)){const a=eS(i);return a&&a.default||0}return i=vS.has(i)?i:Sm(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,a){return SS(t,i,a)}build(t,i,a){bS(t,i,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,i,a,o){nk(t,i,a,o)}mount(t){this.isSVGTag=xS(t.tagName),super.mount(t)}}const rk=_m.length;function wS(e){if(!e)return;if(!e.isControllingVariants){const i=e.parent?wS(e.parent)||{}:{};return e.props.initial!==void 0&&(i.initial=e.props.initial),i}const t={};for(let i=0;i<rk;i++){const a=_m[i],o=e.props[a];(wo(o)||o===!1)&&(t[a]=o)}return t}function TS(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let a=0;a<i;a++)if(t[a]!==e[a])return!1;return!0}const ak=[...Cm].reverse(),sk=Cm.length;function ok(e){return t=>Promise.all(t.map(({animation:i,options:a})=>r2(e,i,a)))}function lk(e){let t=ok(e),i=Y0(),a=!0,o=!1;const u=m=>(g,y)=>{var x;const v=Qr(e,y,m==="exit"?(x=e.presenceContext)==null?void 0:x.custom:void 0);if(v){const{transition:A,transitionEnd:D,...R}=v;g={...g,...R,...D}}return g};function c(m){t=m(e)}function d(m){const{props:g}=e,y=wS(e.parent)||{},v=[],x=new Set;let A={},D=1/0;for(let C=0;C<sk;C++){const P=ak[C],N=i[P],q=g[P]!==void 0?g[P]:y[P],Z=wo(q),L=P===m?N.isActive:null;L===!1&&(D=C);let K=q===y[P]&&q!==g[P]&&Z;if(K&&(a||o)&&e.manuallyAnimateOnMount&&(K=!1),N.protectedKeys={...A},!N.isActive&&L===null||!q&&!N.prevProp||Zu(q)||typeof q=="boolean")continue;if(P==="exit"&&N.isActive&&L!==!0){N.prevResolvedValues&&(A={...A,...N.prevResolvedValues});continue}const V=uk(N.prevProp,q);let ne=V||P===m&&N.isActive&&!K&&Z||C>D&&Z,re=!1;const ie=Array.isArray(q)?q:[q];let ae=ie.reduce(u(P),{});L===!1&&(ae={});const{prevResolvedValues:be={}}=N,ee={...be,...ae},$=J=>{ne=!0,x.has(J)&&(re=!0,x.delete(J)),N.needsAnimating[J]=!0;const fe=e.getValue(J);fe&&(fe.liveStyle=!1)};for(const J in ee){const fe=ae[J],w=be[J];if(A.hasOwnProperty(J))continue;let k=!1;Th(fe)&&Th(w)?k=!TS(fe,w):k=fe!==w,k?fe!=null?$(J):x.add(J):fe!==void 0&&x.has(J)?$(J):N.protectedKeys[J]=!0}N.prevProp=q,N.prevResolvedValues=ae,N.isActive&&(A={...A,...ae}),(a||o)&&e.blockInitialAnimation&&(ne=!1);const O=K&&V;ne&&(!O||re)&&v.push(...ie.map(J=>{const fe={type:P};if(typeof J=="string"&&(a||o)&&!O&&e.manuallyAnimateOnMount&&e.parent){const{parent:w}=e,k=Qr(w,J);if(w.enteringChildren&&k){const{delayChildren:F}=k.transition||{};fe.delay=G1(w.enteringChildren,e,F)}}return{animation:J,options:fe}}))}if(x.size){const C={};if(typeof g.initial!="boolean"){const P=Qr(e,Array.isArray(g.initial)?g.initial[0]:g.initial);P&&P.transition&&(C.transition=P.transition)}x.forEach(P=>{const N=e.getBaseTarget(P),q=e.getValue(P);q&&(q.liveStyle=!0),C[P]=N??null}),v.push({animation:C})}let R=!!v.length;return a&&(g.initial===!1||g.initial===g.animate)&&!e.manuallyAnimateOnMount&&(R=!1),a=!1,o=!1,R?t(v):Promise.resolve()}function p(m,g){var v;if(i[m].isActive===g)return Promise.resolve();(v=e.variantChildren)==null||v.forEach(x=>{var A;return(A=x.animationState)==null?void 0:A.setActive(m,g)}),i[m].isActive=g;const y=d(m);for(const x in i)i[x].protectedKeys={};return y}return{animateChanges:d,setActive:p,setAnimateFunction:c,getState:()=>i,reset:()=>{i=Y0(),o=!0}}}function uk(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!TS(t,e):!1}function Pr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Pr(!0),whileInView:Pr(),whileHover:Pr(),whileTap:Pr(),whileDrag:Pr(),whileFocus:Pr(),exit:Pr()}}function Rh(e,t){e.min=t.min,e.max=t.max}function kn(e,t){Rh(e.x,t.x),Rh(e.y,t.y)}function X0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ES=1e-4,ck=1-ES,fk=1+ES,AS=.01,dk=0-AS,hk=0+AS;function Bt(e){return e.max-e.min}function mk(e,t,i){return Math.abs(e-t)<=i}function K0(e,t,i,a=.5){e.origin=a,e.originPoint=nt(t.min,t.max,e.origin),e.scale=Bt(i)/Bt(t),e.translate=nt(i.min,i.max,e.origin)-e.originPoint,(e.scale>=ck&&e.scale<=fk||isNaN(e.scale))&&(e.scale=1),(e.translate>=dk&&e.translate<=hk||isNaN(e.translate))&&(e.translate=0)}function mo(e,t,i,a){K0(e.x,t.x,i.x,a?a.originX:void 0),K0(e.y,t.y,i.y,a?a.originY:void 0)}function Q0(e,t,i,a=0){const o=a?nt(i.min,i.max,a):i.min;e.min=o+t.min,e.max=e.min+Bt(t)}function pk(e,t,i,a){Q0(e.x,t.x,i.x,a==null?void 0:a.x),Q0(e.y,t.y,i.y,a==null?void 0:a.y)}function W0(e,t,i,a=0){const o=a?nt(i.min,i.max,a):i.min;e.min=t.min-o,e.max=e.min+Bt(t)}function ju(e,t,i,a){W0(e.x,t.x,i.x,a==null?void 0:a.x),W0(e.y,t.y,i.y,a==null?void 0:a.y)}function Z0(e,t,i,a,o){return e-=t,e=Lu(e,1/i,a),o!==void 0&&(e=Lu(e,1/o,a)),e}function gk(e,t=0,i=1,a=.5,o,u=e,c=e){if(Yn.test(t)&&(t=parseFloat(t),t=nt(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=nt(u.min,u.max,a);e===u&&(d-=t),e.min=Z0(e.min,t,i,d,o),e.max=Z0(e.max,t,i,d,o)}function $0(e,t,[i,a,o],u,c){gk(e,t[i],t[a],t[o],t.scale,u,c)}const yk=["x","scaleX","originX"],bk=["y","scaleY","originY"];function J0(e,t,i,a){$0(e.x,t,yk,i?i.x:void 0,a?a.x:void 0),$0(e.y,t,bk,i?i.y:void 0,a?a.y:void 0)}function ev(e){return e.translate===0&&e.scale===1}function CS(e){return ev(e.x)&&ev(e.y)}function tv(e,t){return e.min===t.min&&e.max===t.max}function vk(e,t){return tv(e.x,t.x)&&tv(e.y,t.y)}function nv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _S(e,t){return nv(e.x,t.x)&&nv(e.y,t.y)}function iv(e){return Bt(e.x)/Bt(e.y)}function rv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Pn(e){return[e("x"),e("y")]}function xk(e,t,i){let a="";const o=e.x.translate/t.x,u=e.y.translate/t.y,c=(i==null?void 0:i.z)||0;if((o||u||c)&&(a=`translate3d(${o}px, ${u}px, ${c}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:m,rotate:g,rotateX:y,rotateY:v,skewX:x,skewY:A}=i;m&&(a=`perspective(${m}px) ${a}`),g&&(a+=`rotate(${g}deg) `),y&&(a+=`rotateX(${y}deg) `),v&&(a+=`rotateY(${v}deg) `),x&&(a+=`skewX(${x}deg) `),A&&(a+=`skewY(${A}deg) `)}const d=e.x.scale*t.x,p=e.y.scale*t.y;return(d!==1||p!==1)&&(a+=`scale(${d}, ${p})`),a||"none"}const kS=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Sk=kS.length,av=e=>typeof e=="string"?parseFloat(e):e,sv=e=>typeof e=="number"||me.test(e);function wk(e,t,i,a,o,u){o?(e.opacity=nt(0,i.opacity??1,Tk(a)),e.opacityExit=nt(t.opacity??1,0,Ek(a))):u&&(e.opacity=nt(t.opacity??1,i.opacity??1,a));for(let c=0;c<Sk;c++){const d=kS[c];let p=ov(t,d),m=ov(i,d);if(p===void 0&&m===void 0)continue;p||(p=0),m||(m=0),p===0||m===0||sv(p)===sv(m)?(e[d]=Math.max(nt(av(p),av(m),a),0),(Yn.test(m)||Yn.test(p))&&(e[d]+="%")):e[d]=m}(t.rotate||i.rotate)&&(e.rotate=nt(t.rotate||0,i.rotate||0,a))}function ov(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Tk=DS(0,.5,v1),Ek=DS(.5,.95,Tn);function DS(e,t,i){return a=>a<e?0:a>t?1:i(xo(e,t,a))}function Ak(e,t,i){const a=Mt(e)?e:Ja(e);return a.start(vm("",a,t,i)),a.animation}function To(e,t,i,a={passive:!0}){return e.addEventListener(t,i,a),()=>e.removeEventListener(t,i)}const Ck=(e,t)=>e.depth-t.depth;class _k{constructor(){this.children=[],this.isDirty=!1}add(t){sm(this.children,t),this.isDirty=!0}remove(t){Du(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ck),this.isDirty=!1,this.children.forEach(t)}}function kk(e,t){const i=It.now(),a=({timestamp:o})=>{const u=o-i;u>=t&&(dr(a),e(u-t))};return Ze.setup(a,!0),()=>dr(a)}function wu(e){return Mt(e)?e.get():e}class Dk{constructor(){this.members=[]}add(t){sm(this.members,t);for(let i=this.members.length-1;i>=0;i--){const a=this.members[i];if(a===t||a===this.lead||a===this.prevLead)continue;const o=a.instance;(!o||o.isConnected===!1)&&!a.snapshot&&(Du(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(Du(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){var i;for(let a=this.members.indexOf(t)-1;a>=0;a--){const o=this.members[a];if(o.isPresent!==!1&&((i=o.instance)==null?void 0:i.isConnected)!==!1)return this.promote(o),!0}return!1}promote(t,i){var o;const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.updateSnapshot(),t.scheduleRender();const{layoutDependency:u}=a.options,{layoutDependency:c}=t.options;(u===void 0||u!==c)&&(t.resumeFrom=a,i&&(a.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),(o=t.root)!=null&&o.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var i,a,o,u,c;(a=(i=t.options).onExitComplete)==null||a.call(i),(c=(o=t.resumingFrom)==null?void 0:(u=o.options).onExitComplete)==null||c.call(u)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Tu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},zd=["","X","Y","Z"],Mk=1e3;let Nk=0;function Ld(e,t,i,a){const{latestValues:o}=t;o[e]&&(i[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}function MS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=W1(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",Ze,!(o||u))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&MS(a)}function NS({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:a,resetTransform:o}){return class{constructor(c={},d=t==null?void 0:t()){this.id=Nk++,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(zk),this.nodes.forEach(Pk),this.nodes.forEach(Vk),this.nodes.forEach(Lk)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new _k)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new lm),this.eventHandlers.get(c).add(d)}notifyListeners(c,...d){const p=this.eventHandlers.get(c);p&&p.notify(...d)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=Am(c)&&!O2(c),this.instance=c;const{layoutId:d,layout:p,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&&(p||d)&&(this.isLayoutDirty=!0),e){let g,y=0;const v=()=>this.root.updateBlockedByResize=!1;Ze.read(()=>{y=window.innerWidth}),e(c,()=>{const x=window.innerWidth;x!==y&&(y=x,this.root.updateBlockedByResize=!0,g&&g(),g=kk(v,250),Tu.hasAnimatedSinceResize&&(Tu.hasAnimatedSinceResize=!1,this.nodes.forEach(cv)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||p)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||m.getDefaultTransition()||Yk,{onLayoutAnimationStart:D,onLayoutAnimationComplete:R}=m.getProps(),C=!this.targetLayout||!_S(this.targetLayout,x),P=!y&&v;if(this.options.layoutRoot||this.resumeFrom||P||y&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const N={...bm(A,"layout"),onPlay:D,onComplete:R};(m.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N),this.setAnimationOrigin(g,P)}else y||cv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}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(),dr(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(Hk),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&&MS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const y=this.path[g];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:d,layout:p}=this.options;if(d===void 0&&!p)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 p=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),p&&this.nodes.forEach(Ik),this.nodes.forEach(lv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Bk),this.nodes.forEach(Uk),this.nodes.forEach(Rk),this.nodes.forEach(Ok)):this.nodes.forEach(uv),this.clearAllSnapshots();const d=It.now();Dt.delta=Kn(0,1e3/60,d-Dt.timestamp),Dt.timestamp=d,Dt.isProcessing=!0,Cd.update.process(Dt),Cd.preRender.process(Dt),Cd.render.process(Dt),Dt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Tm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jk),this.sharedNodes.forEach(Fk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ze.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ze.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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 p=0;p<this.path.length;p++)this.path[p].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=vt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(d=!1),d&&this.instance){const p=a(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:p,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!CS(this.projectionDelta),p=this.getTransformTemplate(),m=p?p(this.latestValues,""):void 0,g=m!==this.prevTransformTemplateValue;c&&this.instance&&(d||Hr(this.latestValues)||g)&&(o(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const d=this.measurePageBox();let p=this.removeElementScroll(d);return c&&(p=this.removeTransform(p)),Xk(p),{animationId:this.root.animationId,measuredBox:d,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:c}=this.options;if(!c)return vt();const d=c.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(Kk))){const{scroll:g}=this.root;g&&(Hn(d.x,g.offset.x),Hn(d.y,g.offset.y))}return d}removeElementScroll(c){var p;const d=vt();if(kn(d,c),(p=this.scroll)!=null&&p.wasRoot)return d;for(let m=0;m<this.path.length;m++){const g=this.path[m],{scroll:y,options:v}=g;g!==this.root&&y&&v.layoutScroll&&(y.wasRoot&&kn(d,c),Hn(d.x,y.offset.x),Hn(d.y,y.offset.y))}return d}applyTransform(c,d=!1,p){var g,y;const m=p||vt();kn(m,c);for(let v=0;v<this.path.length;v++){const x=this.path[v];!d&&x.options.layoutScroll&&x.scroll&&x!==x.root&&(Hn(m.x,-x.scroll.offset.x),Hn(m.y,-x.scroll.offset.y)),Hr(x.latestValues)&&Su(m,x.latestValues,(g=x.layout)==null?void 0:g.layoutBox)}return Hr(this.latestValues)&&Su(m,this.latestValues,(y=this.layout)==null?void 0:y.layoutBox),m}removeTransform(c){var p;const d=vt();kn(d,c);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!Hr(g.latestValues))continue;let y;g.instance&&(Dh(g.latestValues)&&g.updateSnapshot(),y=vt(),kn(y,g.measurePageBox())),J0(d,g.latestValues,(p=g.snapshot)==null?void 0:p.layoutBox,y)}return Hr(this.latestValues)&&J0(d,this.latestValues),d}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!==Dt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var x;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==d;if(!(c||p&&this.isSharedProjectionDirty||this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:y}=this.options;if(!this.layout||!(g||y))return;this.resolvedRelativeTargetAt=Dt.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pk(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):kn(this.target,this.layout.layoutBox),mS(this.target,this.targetDelta)):kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Dh(this.parent.latestValues)||hS(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,d,p){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),ju(this.relativeTargetOrigin,d,p,this.options.layoutAnchor||void 0),kn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var A;const c=this.getLead(),d=!!this.resumingFrom||this!==c;let p=!0;if((this.isProjectionDirty||(A=this.parent)!=null&&A.isProjectionDirty)&&(p=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===Dt.timestamp&&(p=!1),p)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;kn(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;q2(this.layoutCorrected,this.treeScale,this.path,d),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=vt());const{target:x}=c;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(X0(this.prevProjectionDelta.x,this.projectionDelta.x),X0(this.prevProjectionDelta.y,this.projectionDelta.y)),mo(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!rv(this.projectionDelta.x,this.prevProjectionDelta.x)||!rv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var d;if((d=this.options.visualElement)==null||d.scheduleRender(),c){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ga(),this.projectionDelta=Ga(),this.projectionDeltaWithTransform=Ga()}setAnimationOrigin(c,d=!1){const p=this.snapshot,m=p?p.latestValues:{},g={...this.latestValues},y=Ga();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const v=vt(),x=p?p.source:void 0,A=this.layout?this.layout.source:void 0,D=x!==A,R=this.getStack(),C=!R||R.members.length<=1,P=!!(D&&!C&&this.options.crossfade===!0&&!this.path.some(Gk));this.animationProgress=0;let N;this.mixTargetDelta=q=>{const Z=q/1e3;fv(y.x,c.x,Z),fv(y.y,c.y,Z),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ju(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),qk(this.relativeTarget,this.relativeTargetOrigin,v,Z),N&&vk(this.relativeTarget,N)&&(this.isProjectionDirty=!1),N||(N=vt()),kn(N,this.relativeTarget)),D&&(this.animationValues=g,wk(g,m,this.latestValues,Z,P,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Z},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var d,p,m;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(m=(p=this.resumingFrom)==null?void 0:p.currentAnimation)==null||m.stop(),this.pendingAnimation&&(dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ze.update(()=>{Tu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ja(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ak(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),c.onUpdate&&c.onUpdate(g)},onStop:()=>{},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(Mk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:p,layout:m,latestValues:g}=c;if(!(!d||!p||!m)){if(this!==c&&this.layout&&m&&RS(this.options.animationType,this.layout.layoutBox,m.layoutBox)){p=this.target||vt();const y=Bt(this.layout.layoutBox.x);p.x.min=c.target.x.min,p.x.max=p.x.min+y;const v=Bt(this.layout.layoutBox.y);p.y.min=c.target.y.min,p.y.max=p.y.min+v}kn(d,p),Su(d,g),mo(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new Dk),this.sharedNodes.get(c).add(d);const m=d.options.initialPromotionConfig;d.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var d;const{layoutId:c}=this.options;return c?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:c}=this.options;return c?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:p}={}){const m=this.getStack();m&&m.promote(this,p),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:p}=c;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(d=!0),!d)return;const m={};p.z&&Ld("z",c,m,this.animationValues);for(let g=0;g<zd.length;g++)Ld(`rotate${zd[g]}`,c,m,this.animationValues),Ld(`skew${zd[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,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const p=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=wu(d==null?void 0:d.pointerEvents)||"",c.transform=p?p(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=wu(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Hr(this.latestValues)&&(c.transform=p?p({},""):"none",this.hasProjected=!1);return}c.visibility="";const g=m.animationValues||m.latestValues;this.applyTransformsToTarget();let y=xk(this.projectionDeltaWithTransform,this.treeScale,g);p&&(y=p(g,y)),c.transform=y;const{x:v,y:x}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${x.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 A in Nh){if(g[A]===void 0)continue;const{correct:D,applyTo:R,isCSSVariable:C}=Nh[A],P=y==="none"?g[A]:D(g[A],m);if(R){const N=R.length;for(let q=0;q<N;q++)c[R[q]]=P}else C?this.options.visualElement.renderState.vars[A]=P:c[A]=P}this.options.layoutId&&(c.pointerEvents=m===this?wu(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var d;return(d=c.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach(lv),this.root.sharedNodes.clear()}}}function Rk(e){e.updateLayout()}function Ok(e){var i;const t=((i=e.resumeFrom)==null?void 0:i.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:o}=e.layout,{animationType:u}=e.options,c=t.source!==e.layout.source;if(u==="size")Pn(y=>{const v=c?t.measuredBox[y]:t.layoutBox[y],x=Bt(v);v.min=a[y].min,v.max=v.min+x});else if(u==="x"||u==="y"){const y=u==="x"?"y":"x";Rh(c?t.measuredBox[y]:t.layoutBox[y],a[y])}else RS(u,t.layoutBox,a)&&Pn(y=>{const v=c?t.measuredBox[y]:t.layoutBox[y],x=Bt(a[y]);v.max=v.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+x)});const d=Ga();mo(d,a,t.layoutBox);const p=Ga();c?mo(p,e.applyTransform(o,!0),t.measuredBox):mo(p,a,t.layoutBox);const m=!CS(d);let g=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:v,layout:x}=y;if(v&&x){const A=e.options.layoutAnchor||void 0,D=vt();ju(D,t.layoutBox,v.layoutBox,A);const R=vt();ju(R,a,x.layoutBox,A),_S(D,R)||(g=!0),y.options.layoutRoot&&(e.relativeTarget=R,e.relativeTargetOrigin=D,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:t,delta:p,layoutDelta:d,hasLayoutChanged:m,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:a}=e.options;a&&a()}e.options.transition=void 0}function zk(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 Lk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function jk(e){e.clearSnapshot()}function lv(e){e.clearMeasurements()}function Ik(e){e.isLayoutDirty=!0,e.updateLayout()}function uv(e){e.isLayoutDirty=!1}function Bk(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Uk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Pk(e){e.resolveTargetDelta()}function Vk(e){e.calcProjection()}function Hk(e){e.resetSkewAndRotation()}function Fk(e){e.removeLeadSnapshot()}function fv(e,t,i){e.translate=nt(t.translate,0,i),e.scale=nt(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function dv(e,t,i,a){e.min=nt(t.min,i.min,a),e.max=nt(t.max,i.max,a)}function qk(e,t,i,a){dv(e.x,t.x,i.x,a),dv(e.y,t.y,i.y,a)}function Gk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Yk={duration:.45,ease:[.4,0,.1,1]},hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mv=hv("applewebkit/")&&!hv("chrome/")?Math.round:Tn;function pv(e){e.min=mv(e.min),e.max=mv(e.max)}function Xk(e){pv(e.x),pv(e.y)}function RS(e,t,i){return e==="position"||e==="preserve-aspect"&&!mk(iv(t),iv(i),.2)}function Kk(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Qk=NS({attachResizeListener:(e,t)=>To(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),jd={current:void 0},OS=NS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!jd.current){const e=new Qk({});e.mount(window),e.setOptions({layoutScroll:!0}),jd.current=e}return jd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Mm=W.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function gv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wk(...e){return t=>{let i=!1;const a=e.map(o=>{const u=gv(o,t);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let o=0;o<a.length;o++){const u=a[o];typeof u=="function"?u():gv(e[o],null)}}}}function Zk(...e){return W.useCallback(Wk(...e),e)}class $k extends W.Component{getSnapshotBeforeUpdate(t){const i=this.props.childRef.current;if(yu(i)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=i.offsetParent,o=yu(a)&&a.offsetWidth||0,u=yu(a)&&a.offsetHeight||0,c=getComputedStyle(i),d=this.props.sizeRef.current;d.height=parseFloat(c.height),d.width=parseFloat(c.width),d.top=i.offsetTop,d.left=i.offsetLeft,d.right=o-d.width-d.left,d.bottom=u-d.height-d.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Jk({children:e,isPresent:t,anchorX:i,anchorY:a,root:o,pop:u}){var v;const c=W.useId(),d=W.useRef(null),p=W.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=W.useContext(Mm),g=((v=e.props)==null?void 0:v.ref)??(e==null?void 0:e.ref),y=Zk(d,g);return W.useInsertionEffect(()=>{const{width:x,height:A,top:D,left:R,right:C,bottom:P}=p.current;if(t||u===!1||!d.current||!x||!A)return;const N=i==="left"?`left: ${R}`:`right: ${C}`,q=a==="bottom"?`bottom: ${P}`:`top: ${D}`;d.current.dataset.motionPopId=c;const Z=document.createElement("style");m&&(Z.nonce=m);const L=o??document.head;return L.appendChild(Z),Z.sheet&&Z.sheet.insertRule(`
[data-motion-pop-id="${c}"] {
position: absolute !important;
width: ${x}px !important;
height: ${A}px !important;
${N}px !important;
${q}px !important;
}
`),()=>{var K;(K=d.current)==null||K.removeAttribute("data-motion-pop-id"),L.contains(Z)&&L.removeChild(Z)}},[t]),E.jsx($k,{isPresent:t,childRef:d,sizeRef:p,pop:u,children:u===!1?e:W.cloneElement(e,{ref:y})})}const eD=({children:e,initial:t,isPresent:i,onExitComplete:a,custom:o,presenceAffectsLayout:u,mode:c,anchorX:d,anchorY:p,root:m})=>{const g=am(tD),y=W.useId();let v=!0,x=W.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:i,custom:o,onExitComplete:A=>{g.set(A,!0);for(const D of g.values())if(!D)return;a&&a()},register:A=>(g.set(A,!1),()=>g.delete(A))}),[i,g,a]);return u&&v&&(x={...x}),W.useMemo(()=>{g.forEach((A,D)=>g.set(D,!1))},[i]),W.useEffect(()=>{!i&&!g.size&&a&&a()},[i]),e=E.jsx(Jk,{pop:c==="popLayout",isPresent:i,anchorX:d,anchorY:p,root:m,children:e}),E.jsx(Qu.Provider,{value:x,children:e})};function tD(){return new Map}function zS(e=!0){const t=W.useContext(Qu);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:a,register:o}=t,u=W.useId();W.useEffect(()=>{if(e)return o(u)},[e]);const c=W.useCallback(()=>e&&a&&a(u),[u,a,e]);return!i&&a?[!1,c]:[!0]}const au=e=>e.key||"";function yv(e){const t=[];return W.Children.forEach(e,i=>{W.isValidElement(i)&&t.push(i)}),t}const LS=({children:e,custom:t,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:u="sync",propagate:c=!1,anchorX:d="left",anchorY:p="top",root:m})=>{const[g,y]=zS(c),v=W.useMemo(()=>yv(e),[e]),x=c&&!g?[]:v.map(au),A=W.useRef(!0),D=W.useRef(v),R=am(()=>new Map),C=W.useRef(new Set),[P,N]=W.useState(v),[q,Z]=W.useState(v);o1(()=>{A.current=!1,D.current=v;for(let V=0;V<q.length;V++){const ne=au(q[V]);x.includes(ne)?(R.delete(ne),C.current.delete(ne)):R.get(ne)!==!0&&R.set(ne,!1)}},[q,x.length,x.join("-")]);const L=[];if(v!==P){let V=[...v];for(let ne=0;ne<q.length;ne++){const re=q[ne],ie=au(re);x.includes(ie)||(V.splice(ne,0,re),L.push(re))}return u==="wait"&&L.length&&(V=L),Z(yv(V)),N(v),null}const{forceRender:K}=W.useContext(rm);return E.jsx(E.Fragment,{children:q.map(V=>{const ne=au(V),re=c&&!g?!1:v===q||x.includes(ne),ie=()=>{if(C.current.has(ne))return;if(R.has(ne))C.current.add(ne),R.set(ne,!0);else return;let ae=!0;R.forEach(be=>{be||(ae=!1)}),ae&&(K==null||K(),Z(D.current),c&&(y==null||y()),a&&a())};return E.jsx(eD,{isPresent:re,initial:!A.current||i?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:m,onExitComplete:re?void 0:ie,anchorX:d,anchorY:p,children:V},ne)})})},jS=W.createContext({strict:!1}),bv={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 vv=!1;function nD(){if(vv)return;const e={};for(const t in bv)e[t]={isEnabled:i=>bv[t].some(a=>!!i[a])};cS(e),vv=!0}function IS(){return nD(),P2()}function iD(e){const t=IS();for(const i in e)t[i]={...t[i],...e[i]};cS(t)}const rD=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 Iu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rD.has(e)}let BS=e=>!Iu(e);function aD(e){typeof e=="function"&&(BS=t=>t.startsWith("on")?!Iu(t):e(t))}try{aD(require("@emotion/is-prop-valid").default)}catch{}function sD(e,t,i){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||Mt(e[o])||(BS(o)||i===!0&&Iu(o)||!t&&!Iu(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const Ju=W.createContext({});function oD(e,t){if($u(e)){const{initial:i,animate:a}=e;return{initial:i===!1||wo(i)?i:void 0,animate:wo(a)?a:void 0}}return e.inherit!==!1?t:{}}function lD(e){const{initial:t,animate:i}=oD(e,W.useContext(Ju));return W.useMemo(()=>({initial:t,animate:i}),[xv(t),xv(i)])}function xv(e){return Array.isArray(e)?e.join(" "):e}const Nm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function US(e,t,i){for(const a in t)!Mt(t[a])&&!yS(a,i)&&(e[a]=t[a])}function uD({transformTemplate:e},t){return W.useMemo(()=>{const i=Nm();return km(i,t,e),Object.assign({},i.vars,i.style)},[t])}function cD(e,t){const i=e.style||{},a={};return US(a,i,e),Object.assign(a,uD(e,t)),a}function fD(e,t){const i={},a=cD(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=a,i}const PS=()=>({...Nm(),attrs:{}});function dD(e,t,i,a){const o=W.useMemo(()=>{const u=PS();return bS(u,t,xS(a),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};US(u,e.style,e),o.style={...u,...o.style}}return o}const hD=["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 Rm(e){return typeof e!="string"||e.includes("-")?!1:!!(hD.indexOf(e)>-1||/[A-Z]/u.test(e))}function mD(e,t,i,{latestValues:a},o,u=!1,c){const p=(c??Rm(e)?dD:fD)(t,a,o,e),m=sD(t,typeof e=="string",u),g=e!==W.Fragment?{...m,...p,ref:i}:{},{children:y}=t,v=W.useMemo(()=>Mt(y)?y.get():y,[y]);return W.createElement(e,{...g,children:v})}function pD({scrapeMotionValuesFromProps:e,createRenderState:t},i,a,o){return{latestValues:gD(i,a,o,e),renderState:t()}}function gD(e,t,i,a){const o={},u=a(e,{});for(const v in u)o[v]=wu(u[v]);let{initial:c,animate:d}=e;const p=$u(e),m=lS(e);t&&m&&!p&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let g=i?i.initial===!1:!1;g=g||c===!1;const y=g?d:c;if(y&&typeof y!="boolean"&&!Zu(y)){const v=Array.isArray(y)?y:[y];for(let x=0;x<v.length;x++){const A=xm(e,v[x]);if(A){const{transitionEnd:D,transition:R,...C}=A;for(const P in C){let N=C[P];if(Array.isArray(N)){const q=g?N.length-1:0;N=N[q]}N!==null&&(o[P]=N)}for(const P in D)o[P]=D[P]}}}return o}const VS=e=>(t,i)=>{const a=W.useContext(Ju),o=W.useContext(Qu),u=()=>pD(e,t,a,o);return i?u():am(u)},yD=VS({scrapeMotionValuesFromProps:Dm,createRenderState:Nm}),bD=VS({scrapeMotionValuesFromProps:SS,createRenderState:PS}),vD=Symbol.for("motionComponentSymbol");function xD(e,t,i){const a=W.useRef(i);W.useInsertionEffect(()=>{a.current=i});const o=W.useRef(null);return W.useCallback(u=>{var d;u&&((d=e.onMount)==null||d.call(e,u));const c=a.current;if(typeof c=="function")if(u){const p=c(u);typeof p=="function"&&(o.current=p)}else o.current?(o.current(),o.current=null):c(u);else c&&(c.current=u);t&&(u?t.mount(u):t.unmount())},[t])}const HS=W.createContext({});function Ha(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function SD(e,t,i,a,o,u){var N,q;const{visualElement:c}=W.useContext(Ju),d=W.useContext(jS),p=W.useContext(Qu),m=W.useContext(Mm),g=m.reducedMotion,y=m.skipAnimations,v=W.useRef(null),x=W.useRef(!1);a=a||d.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:c,props:i,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g,skipAnimations:y,isSVG:u}),x.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const A=v.current,D=W.useContext(HS);A&&!A.projection&&o&&(A.type==="html"||A.type==="svg")&&wD(v.current,i,o,D);const R=W.useRef(!1);W.useInsertionEffect(()=>{A&&R.current&&A.update(i,p)});const C=i[Q1],P=W.useRef(!!C&&typeof window<"u"&&!((N=window.MotionHandoffIsComplete)!=null&&N.call(window,C))&&((q=window.MotionHasOptimisedAnimation)==null?void 0:q.call(window,C)));return o1(()=>{x.current=!0,A&&(R.current=!0,window.MotionIsMounted=!0,A.updateFeatures(),A.scheduleRenderMicrotask(),P.current&&A.animationState&&A.animationState.animateChanges())}),W.useEffect(()=>{A&&(!P.current&&A.animationState&&A.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var Z;(Z=window.MotionHandoffMarkAsComplete)==null||Z.call(window,C)}),P.current=!1),A.enteringChildren=void 0)}),A}function wD(e,t,i,a){const{layoutId:o,layout:u,drag:c,dragConstraints:d,layoutScroll:p,layoutRoot:m,layoutAnchor:g,layoutCrossfade:y}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:FS(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!c||d&&Ha(d),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:p,layoutRoot:m,layoutAnchor:g})}function FS(e){if(e)return e.options.allowProjection!==!1?e.projection:FS(e.parent)}function Id(e,{forwardMotionProps:t=!1,type:i}={},a,o){a&&iD(a);const u=i?i==="svg":Rm(e),c=u?bD:yD;function d(m,g){let y;const v={...W.useContext(Mm),...m,layoutId:TD(m)},{isStatic:x}=v,A=lD(m),D=c(m,x);if(!x&&typeof window<"u"){ED();const R=AD(v);y=R.MeasureLayout,A.visualElement=SD(e,D,v,o,R.ProjectionNode,u)}return E.jsxs(Ju.Provider,{value:A,children:[y&&A.visualElement?E.jsx(y,{visualElement:A.visualElement,...v}):null,mD(e,m,xD(D,A.visualElement,g),D,x,t,u)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const p=W.forwardRef(d);return p[vD]=e,p}function TD({layoutId:e}){const t=W.useContext(rm).id;return t&&e!==void 0?t+"-"+e:e}function ED(e,t){W.useContext(jS).strict}function AD(e){const t=IS(),{drag:i,layout:a}=t;if(!i&&!a)return{};const o={...i,...a};return{MeasureLayout:i!=null&&i.isEnabled(e)||a!=null&&a.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function CD(e,t){if(typeof Proxy>"u")return Id;const i=new Map,a=(u,c)=>Id(u,c,e,t),o=(u,c)=>a(u,c);return new Proxy(o,{get:(u,c)=>c==="create"?a:(i.has(c)||i.set(c,Id(c,void 0,e,t)),i.get(c))})}const _D=(e,t)=>t.isSVG??Rm(e)?new ik(t):new Z2(t,{allowProjection:e!==W.Fragment});class kD extends mr{constructor(t){super(t),t.animationState||(t.animationState=lk(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let DD=0;class MD extends mr{constructor(){super(...arguments),this.id=DD++,this.isExitComplete=!1}update(){var u;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:c,custom:d}=this.node.getProps();if(typeof c=="string"){const p=Qr(this.node,c,d);if(p){const{transition:m,transitionEnd:g,...y}=p;for(const v in y)(u=this.node.getValue(v))==null||u.jump(y[v])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);i&&!t&&o.then(()=>{this.isExitComplete=!0,i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const ND={animation:{Feature:kD},exit:{Feature:MD}};function Ro(e){return{point:{x:e.pageX,y:e.pageY}}}const RD=e=>t=>Em(t)&&e(t,Ro(t));function po(e,t,i,a){return To(e,t,RD(i),a)}const qS=({current:e})=>e?e.ownerDocument.defaultView:null,Sv=(e,t)=>Math.abs(e-t);function OD(e,t){const i=Sv(e.x,t.x),a=Sv(e.y,t.y);return Math.sqrt(i**2+a**2)}const wv=new Set(["auto","scroll"]);class GS{constructor(t,i,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:u=!1,distanceThreshold:c=3,element:d}={}){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=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=su(this.lastRawMoveEventInfo,this.transformPagePoint));const x=Bd(this.lastMoveEventInfo,this.history),A=this.startEvent!==null,D=OD(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!A&&!D)return;const{point:R}=x,{timestamp:C}=Dt;this.history.push({...R,timestamp:C});const{onStart:P,onMove:N}=this.handlers;A||(P&&P(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),N&&N(this.lastMoveEvent,x)},this.handlePointerMove=(x,A)=>{this.lastMoveEvent=x,this.lastRawMoveEventInfo=A,this.lastMoveEventInfo=su(A,this.transformPagePoint),Ze.update(this.updatePoint,!0)},this.handlePointerUp=(x,A)=>{this.end();const{onEnd:D,onSessionEnd:R,resumeAnimation:C}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=Bd(x.type==="pointercancel"?this.lastMoveEventInfo:su(A,this.transformPagePoint),this.history);this.startEvent&&D&&D(x,P),R&&R(x,P)},!Em(t))return;this.dragSnapToOrigin=u,this.handlers=i,this.transformPagePoint=a,this.distanceThreshold=c,this.contextWindow=o||window;const p=Ro(t),m=su(p,this.transformPagePoint),{point:g}=m,{timestamp:y}=Dt;this.history=[{...g,timestamp:y}];const{onSessionStart:v}=i;v&&v(t,Bd(m,this.history)),this.removeListeners=Do(po(this.contextWindow,"pointermove",this.handlePointerMove),po(this.contextWindow,"pointerup",this.handlePointerUp),po(this.contextWindow,"pointercancel",this.handlePointerUp)),d&&this.startScrollTracking(d)}startScrollTracking(t){let i=t.parentElement;for(;i;){const a=getComputedStyle(i);(wv.has(a.overflowX)||wv.has(a.overflowY))&&this.scrollPositions.set(i,{x:i.scrollLeft,y:i.scrollTop}),i=i.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 i=this.scrollPositions.get(t);if(!i)return;const a=t===window,o=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},u={x:o.x-i.x,y:o.y-i.y};u.x===0&&u.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(t,o),Ze.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),dr(this.updatePoint)}}function su(e,t){return t?{point:t(e.point)}:e}function Tv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bd({point:e},t){return{point:e,delta:Tv(e,YS(t)),offset:Tv(e,zD(t)),velocity:LD(t,.1)}}function zD(e){return e[0]}function YS(e){return e[e.length-1]}function LD(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,a=null;const o=YS(e);for(;i>=0&&(a=e[i],!(o.timestamp-a.timestamp>ln(t)));)i--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>ln(t)*2&&(a=e[1]);const u=wn(o.timestamp-a.timestamp);if(u===0)return{x:0,y:0};const c={x:(o.x-a.x)/u,y:(o.y-a.y)/u};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function jD(e,{min:t,max:i},a){return t!==void 0&&e<t?e=a?nt(t,e,a.min):Math.max(e,t):i!==void 0&&e>i&&(e=a?nt(i,e,a.max):Math.min(e,i)),e}function Ev(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function ID(e,{top:t,left:i,bottom:a,right:o}){return{x:Ev(e.x,i,o),y:Ev(e.y,t,a)}}function Av(e,t){let i=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,a]=[a,i]),{min:i,max:a}}function BD(e,t){return{x:Av(e.x,t.x),y:Av(e.y,t.y)}}function UD(e,t){let i=.5;const a=Bt(e),o=Bt(t);return o>a?i=xo(t.min,t.max-a,e.min):a>o&&(i=xo(e.min,e.max-o,t.min)),Kn(0,1,i)}function PD(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const Oh=.35;function VD(e=Oh){return e===!1?e=0:e===!0&&(e=Oh),{x:Cv(e,"left","right"),y:Cv(e,"top","bottom")}}function Cv(e,t,i){return{min:_v(e,t),max:_v(e,i)}}function _v(e,t){return typeof e=="number"?e:e[t]||0}const HD=new WeakMap;class FD{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=vt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=y=>{i&&this.snapToCursor(Ro(y).point),this.stopAnimation()},c=(y,v)=>{const{drag:x,dragPropagation:A,onDragStart:D}=this.getProps();if(x&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=g2(x),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pn(C=>{let P=this.getAxisMotionValue(C).get()||0;if(Yn.test(P)){const{projection:N}=this.visualElement;if(N&&N.layout){const q=N.layout.layoutBox[C];q&&(P=Bt(q)*(parseFloat(P)/100))}}this.originPoint[C]=P}),D&&Ze.update(()=>D(y,v),!1,!0),Eh(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:A,onDirectionLock:D,onDrag:R}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:C}=v;if(A&&this.currentDirection===null){this.currentDirection=GD(C),this.currentDirection!==null&&D&&D(this.currentDirection);return}this.updateAxis("x",v.point,C),this.updateAxis("y",v.point,C),this.visualElement.render(),R&&Ze.update(()=>R(y,v),!1,!0)},p=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:g}=this.getProps();this.panSession=new GS(t,{onSessionStart:u,onStart:c,onMove:d,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:a,contextWindow:qS(this.visualElement),element:this.visualElement.current})}stop(t,i){const a=t||this.latestPointerEvent,o=i||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!o||!a)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&Ze.postRender(()=>d(a,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,i,a){const{drag:o}=this.getProps();if(!a||!ou(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let c=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(c=jD(c,this.constraints[t],this.elastic[t])),u.set(c)}resolveConstraints(){var u;const{dragConstraints:t,dragElastic:i}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(u=this.visualElement.projection)==null?void 0:u.layout,o=this.constraints;t&&Ha(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=ID(a.layoutBox,t):this.constraints=!1,this.elastic=VD(i),o!==this.constraints&&!Ha(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Pn(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=PD(a.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!Ha(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=G2(a,o.root,this.visualElement.getTransformPagePoint());let c=BD(o.layout.layoutBox,u);if(i){const d=i(H2(c));this.hasMutatedConstraints=!!d,d&&(c=dS(d))}return c}startAnimation(t){const{drag:i,dragMomentum:a,dragElastic:o,dragTransition:u,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),p=this.constraints||{},m=Pn(g=>{if(!ou(g,i,this.currentDirection))return;let y=p&&p[g]||{};(c===!0||c===g)&&(y={min:0,max:0});const v=o?200:1e6,x=o?40:1e7,A={type:"inertia",velocity:a?t[g]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(g,A)});return Promise.all(m).then(d)}startAxisValueAnimation(t,i){const a=this.getAxisMotionValue(t);return Eh(this.visualElement,t),a.start(vm(t,a,0,i,this.visualElement,!1))}stopAnimation(){Pn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[i];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Pn(i=>{const{drag:a}=this.getProps();if(!ou(i,a,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(i);if(o&&o.layout){const{min:c,max:d}=o.layout.layoutBox[i],p=u.get()||0;u.set(t[i]-nt(c,d,.5)+p)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:a}=this.visualElement;if(!Ha(i)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Pn(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const p=d.get();o[c]=UD({min:p,max:p},this.constraints[c])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Pn(c=>{if(!ou(c,t,null))return;const d=this.getAxisMotionValue(c),{min:p,max:m}=this.constraints[c];d.set(nt(p,m,o[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;HD.set(this.visualElement,this);const t=this.visualElement.current,i=po(t,"pointerdown",m=>{const{drag:g,dragListener:y=!0}=this.getProps(),v=m.target,x=v!==t&&w2(v);g&&y&&!x&&this.start(m)});let a;const o=()=>{const{dragConstraints:m}=this.getProps();Ha(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),a||(a=qD(t,m.current,()=>this.scalePositionWithinConstraints())))},{projection:u}=this.visualElement,c=u.addEventListener("measure",o);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),Ze.read(o);const d=To(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Pn(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=m[y].translate,v.set(v.get()+m[y].translate))}),this.visualElement.render())}));return()=>{d(),i(),c(),p&&p(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:c=Oh,dragMomentum:d=!0}=t;return{...t,drag:i,dragDirectionLock:a,dragPropagation:o,dragConstraints:u,dragElastic:c,dragMomentum:d}}}function kv(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function qD(e,t,i){const a=L0(e,kv(i)),o=L0(t,kv(i));return()=>{a(),o()}}function ou(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function GD(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}class YD extends mr{constructor(t){super(t),this.removeGroupControls=Tn,this.removeListeners=Tn,this.controls=new FD(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ud=e=>(t,i)=>{e&&Ze.update(()=>e(t,i),!1,!0)};class XD extends mr{constructor(){super(...arguments),this.removePointerDownListener=Tn}onPointerDown(t){this.session=new GS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ud(t),onStart:Ud(i),onMove:Ud(a),onEnd:(u,c)=>{delete this.session,o&&Ze.postRender(()=>o(u,c))}}}mount(){this.removePointerDownListener=po(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 Pd=!1;class KD extends W.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:a,layoutId:o}=this.props,{projection:u}=t;u&&(i.group&&i.group.add(u),a&&a.register&&o&&a.register(u),Pd&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Tu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:a,drag:o,isPresent:u}=this.props,{projection:c}=a;return c&&(c.isPresent=u,t.layoutDependency!==i&&c.setOptions({...c.options,layoutDependency:i}),Pd=!0,o||t.layoutDependency!==i||i===void 0||t.isPresent!==u?c.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?c.promote():c.relegate()||Ze.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:i}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=i,a.root.didUpdate(),Tm.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:a}=this.props,{projection:o}=t;Pd=!0,o&&(o.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function XS(e){const[t,i]=zS(),a=W.useContext(rm);return E.jsx(KD,{...e,layoutGroup:a,switchLayoutGroup:W.useContext(HS),isPresent:t,safeToRemove:i})}const QD={pan:{Feature:XD},drag:{Feature:YD,ProjectionNode:OS,MeasureLayout:XS}};function Dv(e,t,i){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",i==="Start");const o="onHover"+i,u=a[o];u&&Ze.postRender(()=>u(t,Ro(t)))}class WD extends mr{mount(){const{current:t}=this.node;t&&(this.unmount=b2(t,(i,a)=>(Dv(this.node,a,"Start"),o=>Dv(this.node,o,"End"))))}unmount(){}}class ZD extends mr{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=Do(To(this.node.current,"focus",()=>this.onFocus()),To(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Mv(e,t,i){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",i==="Start");const o="onTap"+(i==="End"?"":i),u=a[o];u&&Ze.postRender(()=>u(t,Ro(t)))}class $D extends mr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:i,propagate:a}=this.node.props;this.unmount=E2(t,(o,u)=>(Mv(this.node,u,"Start"),(c,{success:d})=>Mv(this.node,c,d?"End":"Cancel")),{useGlobalTarget:i,stopPropagation:(a==null?void 0:a.tap)===!1})}unmount(){}}const zh=new WeakMap,Vd=new WeakMap,JD=e=>{const t=zh.get(e.target);t&&t(e)},eM=e=>{e.forEach(JD)};function tM({root:e,...t}){const i=e||document;Vd.has(i)||Vd.set(i,{});const a=Vd.get(i),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(eM,{root:e,...t})),a[o]}function nM(e,t,i){const a=tM(t);return zh.set(e,i),a.observe(e),()=>{zh.delete(e),a.unobserve(e)}}const iM={some:0,all:1};class rM extends mr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var p;(p=this.stopObserver)==null||p.call(this);const{viewport:t={}}=this.node.getProps(),{root:i,margin:a,amount:o="some",once:u}=t,c={root:i?i.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:iM[o]},d=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),x=g?y:v;x&&x(m)};this.stopObserver=nM(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(aM(t,i))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function aM({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const sM={inView:{Feature:rM},tap:{Feature:$D},focus:{Feature:ZD},hover:{Feature:WD}},oM={layout:{ProjectionNode:OS,MeasureLayout:XS}},lM={...ND,...sM,...QD,...oM},Fn=CD(lM,_D);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cM=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,a)=>a?a.toUpperCase():i.toLowerCase()),Nv=e=>{const t=cM(e);return t.charAt(0).toUpperCase()+t.slice(1)},KS=(...e)=>e.filter((t,i,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===i).join(" ").trim(),fM=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var dM={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"};/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hM=W.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:u,iconNode:c,...d},p)=>W.createElement("svg",{ref:p,...dM,width:t,height:t,stroke:e,strokeWidth:a?Number(i)*24/Number(t):i,className:KS("lucide",o),...!u&&!fM(d)&&{"aria-hidden":"true"},...d},[...c.map(([m,g])=>W.createElement(m,g)),...Array.isArray(u)?u:[u]]));/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ot=(e,t)=>{const i=W.forwardRef(({className:a,...o},u)=>W.createElement(hM,{ref:u,iconNode:t,className:KS(`lucide-${uM(Nv(e))}`,`lucide-${e}`,a),...o}));return i.displayName=Nv(e),i};/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mM=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],pM=ot("check-check",mM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gM=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yM=ot("check",gM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bM=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],vM=ot("chevron-right",bM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Lh=ot("circle-alert",xM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wM=ot("circle-check",SM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TM=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],EM=ot("copy",TM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AM=[["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"}]],CM=ot("external-link",AM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _M=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],kM=ot("file-text",_M);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DM=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],MM=ot("file",DM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NM=[["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"}]],RM=ot("image",NM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OM=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],zM=ot("link-2",OM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LM=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Om=ot("loader-circle",LM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jM=[["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"}]],IM=ot("log-out",jM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BM=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Rv=ot("mic",BM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UM=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],PM=ot("music",UM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VM=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Ov=ot("paperclip",VM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HM=[["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"}]],QS=ot("pause",HM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FM=[["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"}]],WS=ot("play",FM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qM=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],GM=ot("send",qM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YM=[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],XM=ot("shield-check",YM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KM=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],QM=ot("square",KM);/**
* @license lucide-react v0.546.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WM=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jh=ot("x",WM),ZM=()=>{};var zv={};/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const ZS=function(e){const t=[];let i=0;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);o<128?t[i++]=o:o<2048?(t[i++]=o>>6|192,t[i++]=o&63|128):(o&64512)===55296&&a+1<e.length&&(e.charCodeAt(a+1)&64512)===56320?(o=65536+((o&1023)<<10)+(e.charCodeAt(++a)&1023),t[i++]=o>>18|240,t[i++]=o>>12&63|128,t[i++]=o>>6&63|128,t[i++]=o&63|128):(t[i++]=o>>12|224,t[i++]=o>>6&63|128,t[i++]=o&63|128)}return t},$M=function(e){const t=[];let i=0,a=0;for(;i<e.length;){const o=e[i++];if(o<128)t[a++]=String.fromCharCode(o);else if(o>191&&o<224){const u=e[i++];t[a++]=String.fromCharCode((o&31)<<6|u&63)}else if(o>239&&o<365){const u=e[i++],c=e[i++],d=e[i++],p=((o&7)<<18|(u&63)<<12|(c&63)<<6|d&63)-65536;t[a++]=String.fromCharCode(55296+(p>>10)),t[a++]=String.fromCharCode(56320+(p&1023))}else{const u=e[i++],c=e[i++];t[a++]=String.fromCharCode((o&15)<<12|(u&63)<<6|c&63)}}return t.join("")},$S={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const i=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,a=[];for(let o=0;o<e.length;o+=3){const u=e[o],c=o+1<e.length,d=c?e[o+1]:0,p=o+2<e.length,m=p?e[o+2]:0,g=u>>2,y=(u&3)<<4|d>>4;let v=(d&15)<<2|m>>6,x=m&63;p||(x=64,c||(v=64)),a.push(i[g],i[y],i[v],i[x])}return a.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(ZS(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):$M(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const i=t?this.charToByteMapWebSafe_:this.charToByteMap_,a=[];for(let o=0;o<e.length;){const u=i[e.charAt(o++)],d=o<e.length?i[e.charAt(o)]:0;++o;const m=o<e.length?i[e.charAt(o)]:64;++o;const y=o<e.length?i[e.charAt(o)]:64;if(++o,u==null||d==null||m==null||y==null)throw new JM;const v=u<<2|d>>4;if(a.push(v),m!==64){const x=d<<4&240|m>>2;if(a.push(x),y!==64){const A=m<<6&192|y;a.push(A)}}}return a},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class JM extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const eN=function(e){const t=ZS(e);return $S.encodeByteArray(t,!0)},JS=function(e){return eN(e).replace(/\./g,"")},ew=function(e){try{return $S.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
* @license
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function tN(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
* @license
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const nN=()=>tN().__FIREBASE_DEFAULTS__,iN=()=>{if(typeof process>"u"||typeof zv>"u")return;const e=zv.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},rN=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&ew(e[1]);return t&&JSON.parse(t)},zm=()=>{try{return ZM()||nN()||iN()||rN()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},aN=e=>{var t,i;return(i=(t=zm())==null?void 0:t.emulatorHosts)==null?void 0:i[e]},tw=()=>{var e;return(e=zm())==null?void 0:e.config},nw=e=>{var t;return(t=zm())==null?void 0:t[`_${e}`]};/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class sN{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,i)=>{this.resolve=t,this.reject=i})}wrapCallback(t){return(i,a)=>{i?this.reject(i):this.resolve(a),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(i):t(i,a))}}}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Ut(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function oN(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ut())}function lN(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function uN(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function cN(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function fN(){const e=Ut();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function dN(){try{return typeof indexedDB=="object"}catch{return!1}}function hN(){return new Promise((e,t)=>{try{let i=!0;const a="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(a);o.onsuccess=()=>{o.result.close(),i||self.indexedDB.deleteDatabase(a),e(!0)},o.onupgradeneeded=()=>{i=!1},o.onerror=()=>{var u;t(((u=o.error)==null?void 0:u.message)||"")}}catch(i){t(i)}})}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const mN="FirebaseError";class pr extends Error{constructor(t,i,a){super(i),this.code=t,this.customData=a,this.name=mN,Object.setPrototypeOf(this,pr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Oo.prototype.create)}}class Oo{constructor(t,i,a){this.service=t,this.serviceName=i,this.errors=a}create(t,...i){const a=i[0]||{},o=`${this.service}/${t}`,u=this.errors[t],c=u?pN(u,a):"Error",d=`${this.serviceName}: ${c} (${o}).`;return new pr(o,d,a)}}function pN(e,t){return e.replace(gN,(i,a)=>{const o=t[a];return o!=null?String(o):`<${a}?>`})}const gN=/\{\$([^}]+)}/g;function yN(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function es(e,t){if(e===t)return!0;const i=Object.keys(e),a=Object.keys(t);for(const o of i){if(!a.includes(o))return!1;const u=e[o],c=t[o];if(Lv(u)&&Lv(c)){if(!es(u,c))return!1}else if(u!==c)return!1}for(const o of a)if(!i.includes(o))return!1;return!0}function Lv(e){return e!==null&&typeof e=="object"}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function zo(e){const t=[];for(const[i,a]of Object.entries(e))Array.isArray(a)?a.forEach(o=>{t.push(encodeURIComponent(i)+"="+encodeURIComponent(o))}):t.push(encodeURIComponent(i)+"="+encodeURIComponent(a));return t.length?"&"+t.join("&"):""}function bN(e,t){const i=new vN(e,t);return i.subscribe.bind(i)}class vN{constructor(t,i){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=i,this.task.then(()=>{t(this)}).catch(a=>{this.error(a)})}next(t){this.forEachObserver(i=>{i.next(t)})}error(t){this.forEachObserver(i=>{i.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,i,a){let o;if(t===void 0&&i===void 0&&a===void 0)throw new Error("Missing Observer.");xN(t,["next","error","complete"])?o=t:o={next:t,error:i,complete:a},o.next===void 0&&(o.next=Hd),o.error===void 0&&(o.error=Hd),o.complete===void 0&&(o.complete=Hd);const u=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?o.error(this.finalError):o.complete()}catch{}}),this.observers.push(o),u}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let i=0;i<this.observers.length;i++)this.sendOne(i,t)}sendOne(t,i){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{i(this.observers[t])}catch(a){typeof console<"u"&&console.error&&console.error(a)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function xN(e,t){if(typeof e!="object"||e===null)return!1;for(const i of t)if(i in e&&typeof e[i]=="function")return!0;return!1}function Hd(){}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function gr(e){return e&&e._delegate?e._delegate:e}/**
* @license
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Lm(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function SN(e){return(await fetch(e,{credentials:"include"})).ok}class ts{constructor(t,i,a){this.name=t,this.instanceFactory=i,this.type=a,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Fr="[DEFAULT]";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class wN{constructor(t,i){this.name=t,this.container=i,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const i=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(i)){const a=new sN;if(this.instancesDeferred.set(i,a),this.isInitialized(i)||this.shouldAutoInitialize())try{const o=this.getOrInitializeService({instanceIdentifier:i});o&&a.resolve(o)}catch{}}return this.instancesDeferred.get(i).promise}getImmediate(t){const i=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),a=(t==null?void 0:t.optional)??!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(o){if(a)return null;throw o}else{if(a)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(EN(t))try{this.getOrInitializeService({instanceIdentifier:Fr})}catch{}for(const[i,a]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(i);try{const u=this.getOrInitializeService({instanceIdentifier:o});a.resolve(u)}catch{}}}}clearInstance(t=Fr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(i=>"INTERNAL"in i).map(i=>i.INTERNAL.delete()),...t.filter(i=>"_delete"in i).map(i=>i._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=Fr){return this.instances.has(t)}getOptions(t=Fr){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:i={}}=t,a=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(a))throw Error(`${this.name}(${a}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const o=this.getOrInitializeService({instanceIdentifier:a,options:i});for(const[u,c]of this.instancesDeferred.entries()){const d=this.normalizeInstanceIdentifier(u);a===d&&c.resolve(o)}return o}onInit(t,i){const a=this.normalizeInstanceIdentifier(i),o=this.onInitCallbacks.get(a)??new Set;o.add(t),this.onInitCallbacks.set(a,o);const u=this.instances.get(a);return u&&t(u,a),()=>{o.delete(t)}}invokeOnInitCallbacks(t,i){const a=this.onInitCallbacks.get(i);if(a)for(const o of a)try{o(t,i)}catch{}}getOrInitializeService({instanceIdentifier:t,options:i={}}){let a=this.instances.get(t);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:TN(t),options:i}),this.instances.set(t,a),this.instancesOptions.set(t,i),this.invokeOnInitCallbacks(a,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,a)}catch{}return a||null}normalizeInstanceIdentifier(t=Fr){return this.component?this.component.multipleInstances?t:Fr:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function TN(e){return e===Fr?void 0:e}function EN(e){return e.instantiationMode==="EAGER"}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class AN{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const i=this.getProvider(t.name);if(i.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);i.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const i=new wN(t,this);return this.providers.set(t,i),i}getProviders(){return Array.from(this.providers.values())}}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var We;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(We||(We={}));const CN={debug:We.DEBUG,verbose:We.VERBOSE,info:We.INFO,warn:We.WARN,error:We.ERROR,silent:We.SILENT},_N=We.INFO,kN={[We.DEBUG]:"log",[We.VERBOSE]:"log",[We.INFO]:"info",[We.WARN]:"warn",[We.ERROR]:"error"},DN=(e,t,...i)=>{if(t<e.logLevel)return;const a=new Date().toISOString(),o=kN[t];if(o)console[o](`[${a}] ${e.name}:`,...i);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class iw{constructor(t){this.name=t,this._logLevel=_N,this._logHandler=DN,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in We))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?CN[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,We.DEBUG,...t),this._logHandler(this,We.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,We.VERBOSE,...t),this._logHandler(this,We.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,We.INFO,...t),this._logHandler(this,We.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,We.WARN,...t),this._logHandler(this,We.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,We.ERROR,...t),this._logHandler(this,We.ERROR,...t)}}const MN=(e,t)=>t.some(i=>e instanceof i);let jv,Iv;function NN(){return jv||(jv=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function RN(){return Iv||(Iv=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const rw=new WeakMap,Ih=new WeakMap,aw=new WeakMap,Fd=new WeakMap,jm=new WeakMap;function ON(e){const t=new Promise((i,a)=>{const o=()=>{e.removeEventListener("success",u),e.removeEventListener("error",c)},u=()=>{i(ur(e.result)),o()},c=()=>{a(e.error),o()};e.addEventListener("success",u),e.addEventListener("error",c)});return t.then(i=>{i instanceof IDBCursor&&rw.set(i,e)}).catch(()=>{}),jm.set(t,e),t}function zN(e){if(Ih.has(e))return;const t=new Promise((i,a)=>{const o=()=>{e.removeEventListener("complete",u),e.removeEventListener("error",c),e.removeEventListener("abort",c)},u=()=>{i(),o()},c=()=>{a(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",u),e.addEventListener("error",c),e.addEventListener("abort",c)});Ih.set(e,t)}let Bh={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return Ih.get(e);if(t==="objectStoreNames")return e.objectStoreNames||aw.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return ur(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function LN(e){Bh=e(Bh)}function jN(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...i){const a=e.call(qd(this),t,...i);return aw.set(a,t.sort?t.sort():[t]),ur(a)}:RN().includes(e)?function(...t){return e.apply(qd(this),t),ur(rw.get(this))}:function(...t){return ur(e.apply(qd(this),t))}}function IN(e){return typeof e=="function"?jN(e):(e instanceof IDBTransaction&&zN(e),MN(e,NN())?new Proxy(e,Bh):e)}function ur(e){if(e instanceof IDBRequest)return ON(e);if(Fd.has(e))return Fd.get(e);const t=IN(e);return t!==e&&(Fd.set(e,t),jm.set(t,e)),t}const qd=e=>jm.get(e);function BN(e,t,{blocked:i,upgrade:a,blocking:o,terminated:u}={}){const c=indexedDB.open(e,t),d=ur(c);return a&&c.addEventListener("upgradeneeded",p=>{a(ur(c.result),p.oldVersion,p.newVersion,ur(c.transaction),p)}),i&&c.addEventListener("blocked",p=>i(p.oldVersion,p.newVersion,p)),d.then(p=>{u&&p.addEventListener("close",()=>u()),o&&p.addEventListener("versionchange",m=>o(m.oldVersion,m.newVersion,m))}).catch(()=>{}),d}const UN=["get","getKey","getAll","getAllKeys","count"],PN=["put","add","delete","clear"],Gd=new Map;function Bv(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Gd.get(t))return Gd.get(t);const i=t.replace(/FromIndex$/,""),a=t!==i,o=PN.includes(i);if(!(i in(a?IDBIndex:IDBObjectStore).prototype)||!(o||UN.includes(i)))return;const u=async function(c,...d){const p=this.transaction(c,o?"readwrite":"readonly");let m=p.store;return a&&(m=m.index(d.shift())),(await Promise.all([m[i](...d),o&&p.done]))[0]};return Gd.set(t,u),u}LN(e=>({...e,get:(t,i,a)=>Bv(t,i)||e.get(t,i,a),has:(t,i)=>!!Bv(t,i)||e.has(t,i)}));/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class VN{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(i=>{if(HN(i)){const a=i.getImmediate();return`${a.library}/${a.version}`}else return null}).filter(i=>i).join(" ")}}function HN(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const Uh="@firebase/app",Uv="0.14.11";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const xi=new iw("@firebase/app"),FN="@firebase/app-compat",qN="@firebase/analytics-compat",GN="@firebase/analytics",YN="@firebase/app-check-compat",XN="@firebase/app-check",KN="@firebase/auth",QN="@firebase/auth-compat",WN="@firebase/database",ZN="@firebase/data-connect",$N="@firebase/database-compat",JN="@firebase/functions",eR="@firebase/functions-compat",tR="@firebase/installations",nR="@firebase/installations-compat",iR="@firebase/messaging",rR="@firebase/messaging-compat",aR="@firebase/performance",sR="@firebase/performance-compat",oR="@firebase/remote-config",lR="@firebase/remote-config-compat",uR="@firebase/storage",cR="@firebase/storage-compat",fR="@firebase/firestore",dR="@firebase/ai",hR="@firebase/firestore-compat",mR="firebase",pR="12.12.0";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Ph="[DEFAULT]",gR={[Uh]:"fire-core",[FN]:"fire-core-compat",[GN]:"fire-analytics",[qN]:"fire-analytics-compat",[XN]:"fire-app-check",[YN]:"fire-app-check-compat",[KN]:"fire-auth",[QN]:"fire-auth-compat",[WN]:"fire-rtdb",[ZN]:"fire-data-connect",[$N]:"fire-rtdb-compat",[JN]:"fire-fn",[eR]:"fire-fn-compat",[tR]:"fire-iid",[nR]:"fire-iid-compat",[iR]:"fire-fcm",[rR]:"fire-fcm-compat",[aR]:"fire-perf",[sR]:"fire-perf-compat",[oR]:"fire-rc",[lR]:"fire-rc-compat",[uR]:"fire-gcs",[cR]:"fire-gcs-compat",[fR]:"fire-fst",[hR]:"fire-fst-compat",[dR]:"fire-vertex","fire-js":"fire-js",[mR]:"fire-js-all"};/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Bu=new Map,yR=new Map,Vh=new Map;function Pv(e,t){try{e.container.addComponent(t)}catch(i){xi.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,i)}}function Eo(e){const t=e.name;if(Vh.has(t))return xi.debug(`There were multiple attempts to register component ${t}.`),!1;Vh.set(t,e);for(const i of Bu.values())Pv(i,e);for(const i of yR.values())Pv(i,e);return!0}function sw(e,t){const i=e.container.getProvider("heartbeat").getImmediate({optional:!0});return i&&i.triggerHeartbeat(),e.container.getProvider(t)}function qn(e){return e==null?!1:e.settings!==void 0}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const bR={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},cr=new Oo("app","Firebase",bR);/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class vR{constructor(t,i,a){this._isDeleted=!1,this._options={...t},this._config={...i},this._name=i.name,this._automaticDataCollectionEnabled=i.automaticDataCollectionEnabled,this._container=a,this.container.addComponent(new ts("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw cr.create("app-deleted",{appName:this._name})}}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Lo=pR;function ow(e,t={}){let i=e;typeof t!="object"&&(t={name:t});const a={name:Ph,automaticDataCollectionEnabled:!0,...t},o=a.name;if(typeof o!="string"||!o)throw cr.create("bad-app-name",{appName:String(o)});if(i||(i=tw()),!i)throw cr.create("no-options");const u=Bu.get(o);if(u){if(es(i,u.options)&&es(a,u.config))return u;throw cr.create("duplicate-app",{appName:o})}const c=new AN(o);for(const p of Vh.values())c.addComponent(p);const d=new vR(i,a,c);return Bu.set(o,d),d}function xR(e=Ph){const t=Bu.get(e);if(!t&&e===Ph&&tw())return ow();if(!t)throw cr.create("no-app",{appName:e});return t}function Ya(e,t,i){let a=gR[e]??e;i&&(a+=`-${i}`);const o=a.match(/\s|\//),u=t.match(/\s|\//);if(o||u){const c=[`Unable to register library "${a}" with version "${t}":`];o&&c.push(`library name "${a}" contains illegal characters (whitespace or "/")`),o&&u&&c.push("and"),u&&c.push(`version name "${t}" contains illegal characters (whitespace or "/")`),xi.warn(c.join(" "));return}Eo(new ts(`${a}-version`,()=>({library:a,version:t}),"VERSION"))}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const SR="firebase-heartbeat-database",wR=1,Ao="firebase-heartbeat-store";let Yd=null;function lw(){return Yd||(Yd=BN(SR,wR,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(Ao)}catch(i){console.warn(i)}}}}).catch(e=>{throw cr.create("idb-open",{originalErrorMessage:e.message})})),Yd}async function TR(e){try{const i=(await lw()).transaction(Ao),a=await i.objectStore(Ao).get(uw(e));return await i.done,a}catch(t){if(t instanceof pr)xi.warn(t.message);else{const i=cr.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});xi.warn(i.message)}}}async function Vv(e,t){try{const a=(await lw()).transaction(Ao,"readwrite");await a.objectStore(Ao).put(t,uw(e)),await a.done}catch(i){if(i instanceof pr)xi.warn(i.message);else{const a=cr.create("idb-set",{originalErrorMessage:i==null?void 0:i.message});xi.warn(a.message)}}}function uw(e){return`${e.name}!${e.options.appId}`}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const ER=1024,AR=30;class CR{constructor(t){this.container=t,this._heartbeatsCache=null;const i=this.container.getProvider("app").getImmediate();this._storage=new kR(i),this._heartbeatsCachePromise=this._storage.read().then(a=>(this._heartbeatsCache=a,a))}async triggerHeartbeat(){var t,i;try{const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),u=Hv();if(((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((i=this._heartbeatsCache)==null?void 0:i.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===u||this._heartbeatsCache.heartbeats.some(c=>c.date===u))return;if(this._heartbeatsCache.heartbeats.push({date:u,agent:o}),this._heartbeatsCache.heartbeats.length>AR){const c=DR(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(c,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(a){xi.warn(a)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const i=Hv(),{heartbeatsToSend:a,unsentEntries:o}=_R(this._heartbeatsCache.heartbeats),u=JS(JSON.stringify({version:2,heartbeats:a}));return this._heartbeatsCache.lastSentHeartbeatDate=i,o.length>0?(this._heartbeatsCache.heartbeats=o,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),u}catch(i){return xi.warn(i),""}}}function Hv(){return new Date().toISOString().substring(0,10)}function _R(e,t=ER){const i=[];let a=e.slice();for(const o of e){const u=i.find(c=>c.agent===o.agent);if(u){if(u.dates.push(o.date),Fv(i)>t){u.dates.pop();break}}else if(i.push({agent:o.agent,dates:[o.date]}),Fv(i)>t){i.pop();break}a=a.slice(1)}return{heartbeatsToSend:i,unsentEntries:a}}class kR{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return dN()?hN().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const i=await TR(this.app);return i!=null&&i.heartbeats?i:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const a=await this.read();return Vv(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??a.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const a=await this.read();return Vv(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??a.lastSentHeartbeatDate,heartbeats:[...a.heartbeats,...t.heartbeats]})}else return}}function Fv(e){return JS(JSON.stringify({version:2,heartbeats:e})).length}function DR(e){if(e.length===0)return-1;let t=0,i=e[0].date;for(let a=1;a<e.length;a++)e[a].date<i&&(i=e[a].date,t=a);return t}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function MR(e){Eo(new ts("platform-logger",t=>new VN(t),"PRIVATE")),Eo(new ts("heartbeat",t=>new CR(t),"PRIVATE")),Ya(Uh,Uv,e),Ya(Uh,Uv,"esm2020"),Ya("fire-js","")}MR("");function cw(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const NR=cw,fw=new Oo("auth","Firebase",cw());/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Uu=new iw("@firebase/auth");function RR(e,...t){Uu.logLevel<=We.WARN&&Uu.warn(`Auth (${Lo}): ${e}`,...t)}function Eu(e,...t){Uu.logLevel<=We.ERROR&&Uu.error(`Auth (${Lo}): ${e}`,...t)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Qn(e,...t){throw Bm(e,...t)}function On(e,...t){return Bm(e,...t)}function Im(e,t,i){const a={...NR(),[t]:i};return new Oo("auth","Firebase",a).create(t,{appName:e.name})}function Wr(e){return Im(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function OR(e,t,i){const a=i;if(!(t instanceof a))throw a.name!==t.constructor.name&&Qn(e,"argument-error"),Im(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Bm(e,...t){if(typeof e!="string"){const i=t[0],a=[...t.slice(1)];return a[0]&&(a[0].appName=e.name),e._errorFactory.create(i,...a)}return fw.create(e,...t)}function Te(e,t,...i){if(!e)throw Bm(t,...i)}function bi(e){const t="INTERNAL ASSERTION FAILED: "+e;throw Eu(t),new Error(t)}function Si(e,t){e||bi(t)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Hh(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.href)||""}function zR(){return qv()==="http:"||qv()==="https:"}function qv(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.protocol)||null}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function LR(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(zR()||uN()||"connection"in navigator)?navigator.onLine:!0}function jR(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class jo{constructor(t,i){this.shortDelay=t,this.longDelay=i,Si(i>t,"Short delay should be less than long delay!"),this.isMobile=oN()||cN()}get(){return LR()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Um(e,t){Si(e.emulator,"Emulator should always be set here");const{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class dw{static initialize(t,i,a){this.fetchImpl=t,i&&(this.headersImpl=i),a&&(this.responseImpl=a)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;bi("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;bi("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;bi("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const IR={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const BR=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],UR=new jo(3e4,6e4);function Pm(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function ss(e,t,i,a,o={}){return hw(e,o,async()=>{let u={},c={};a&&(t==="GET"?c=a:u={body:JSON.stringify(a)});const d=zo({key:e.config.apiKey,...c}).slice(1),p=await e._getAdditionalHeaders();p["Content-Type"]="application/json",e.languageCode&&(p["X-Firebase-Locale"]=e.languageCode);const m={method:t,headers:p,...u};return lN()||(m.referrerPolicy="no-referrer"),e.emulatorConfig&&Lm(e.emulatorConfig.host)&&(m.credentials="include"),dw.fetch()(await mw(e,e.config.apiHost,i,d),m)})}async function hw(e,t,i){e._canInitEmulator=!1;const a={...IR,...t};try{const o=new VR(e),u=await Promise.race([i(),o.promise]);o.clearNetworkTimeout();const c=await u.json();if("needConfirmation"in c)throw lu(e,"account-exists-with-different-credential",c);if(u.ok&&!("errorMessage"in c))return c;{const d=u.ok?c.errorMessage:c.error.message,[p,m]=d.split(" : ");if(p==="FEDERATED_USER_ID_ALREADY_LINKED")throw lu(e,"credential-already-in-use",c);if(p==="EMAIL_EXISTS")throw lu(e,"email-already-in-use",c);if(p==="USER_DISABLED")throw lu(e,"user-disabled",c);const g=a[p]||p.toLowerCase().replace(/[_\s]+/g,"-");if(m)throw Im(e,g,m);Qn(e,g)}}catch(o){if(o instanceof pr)throw o;Qn(e,"network-request-failed",{message:String(o)})}}async function PR(e,t,i,a,o={}){const u=await ss(e,t,i,a,o);return"mfaPendingCredential"in u&&Qn(e,"multi-factor-auth-required",{_serverResponse:u}),u}async function mw(e,t,i,a){const o=`${t}${i}?${a}`,u=e,c=u.config.emulator?Um(e.config,o):`${e.config.apiScheme}://${o}`;return BR.includes(i)&&(await u._persistenceManagerAvailable,u._getPersistenceType()==="COOKIE")?u._getPersistence()._getFinalTarget(c).toString():c}class VR{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((i,a)=>{this.timer=setTimeout(()=>a(On(this.auth,"network-request-failed")),UR.get())})}}function lu(e,t,i){const a={appName:e.name};i.email&&(a.email=i.email),i.phoneNumber&&(a.phoneNumber=i.phoneNumber);const o=On(e,t,a);return o.customData._tokenResponse=i,o}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function HR(e,t){return ss(e,"POST","/v1/accounts:delete",t)}async function Pu(e,t){return ss(e,"POST","/v1/accounts:lookup",t)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function go(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function FR(e,t=!1){const i=gr(e),a=await i.getIdToken(t),o=Vm(a);Te(o&&o.exp&&o.auth_time&&o.iat,i.auth,"internal-error");const u=typeof o.firebase=="object"?o.firebase:void 0,c=u==null?void 0:u.sign_in_provider;return{claims:o,token:a,authTime:go(Xd(o.auth_time)),issuedAtTime:go(Xd(o.iat)),expirationTime:go(Xd(o.exp)),signInProvider:c||null,signInSecondFactor:(u==null?void 0:u.sign_in_second_factor)||null}}function Xd(e){return Number(e)*1e3}function Vm(e){const[t,i,a]=e.split(".");if(t===void 0||i===void 0||a===void 0)return Eu("JWT malformed, contained fewer than 3 sections"),null;try{const o=ew(i);return o?JSON.parse(o):(Eu("Failed to decode base64 JWT payload"),null)}catch(o){return Eu("Caught error parsing JWT payload as JSON",o==null?void 0:o.toString()),null}}function Gv(e){const t=Vm(e);return Te(t,"internal-error"),Te(typeof t.exp<"u","internal-error"),Te(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function Co(e,t,i=!1){if(i)return t;try{return await t}catch(a){throw a instanceof pr&&qR(a)&&e.auth.currentUser===e&&await e.auth.signOut(),a}}function qR({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class GR{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){if(t){const i=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),i}else{this.errorBackoff=3e4;const a=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,a)}}schedule(t=!1){if(!this.isRunning)return;const i=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},i)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Fh{constructor(t,i){this.createdAt=t,this.lastLoginAt=i,this._initializeTime()}_initializeTime(){this.lastSignInTime=go(this.lastLoginAt),this.creationTime=go(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function Vu(e){var y;const t=e.auth,i=await e.getIdToken(),a=await Co(e,Pu(t,{idToken:i}));Te(a==null?void 0:a.users.length,t,"internal-error");const o=a.users[0];e._notifyReloadListener(o);const u=(y=o.providerUserInfo)!=null&&y.length?pw(o.providerUserInfo):[],c=XR(e.providerData,u),d=e.isAnonymous,p=!(e.email&&o.passwordHash)&&!(c!=null&&c.length),m=d?p:!1,g={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:c,metadata:new Fh(o.createdAt,o.lastLoginAt),isAnonymous:m};Object.assign(e,g)}async function YR(e){const t=gr(e);await Vu(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function XR(e,t){return[...e.filter(a=>!t.some(o=>o.providerId===a.providerId)),...t]}function pw(e){return e.map(({providerId:t,...i})=>({providerId:t,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}))}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function KR(e,t){const i=await hw(e,{},async()=>{const a=zo({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:o,apiKey:u}=e.config,c=await mw(e,o,"/v1/token",`key=${u}`),d=await e._getAdditionalHeaders();d["Content-Type"]="application/x-www-form-urlencoded";const p={method:"POST",headers:d,body:a};return e.emulatorConfig&&Lm(e.emulatorConfig.host)&&(p.credentials="include"),dw.fetch()(c,p)});return{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token}}async function QR(e,t){return ss(e,"POST","/v2/accounts:revokeToken",Pm(e,t))}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Xa{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){Te(t.idToken,"internal-error"),Te(typeof t.idToken<"u","internal-error"),Te(typeof t.refreshToken<"u","internal-error");const i="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):Gv(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,i)}updateFromIdToken(t){Te(t.length!==0,"internal-error");const i=Gv(t);this.updateTokensAndExpiration(t,null,i)}async getToken(t,i=!1){return!i&&this.accessToken&&!this.isExpired?this.accessToken:(Te(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,i){const{accessToken:a,refreshToken:o,expiresIn:u}=await KR(t,i);this.updateTokensAndExpiration(a,o,Number(u))}updateTokensAndExpiration(t,i,a){this.refreshToken=i||null,this.accessToken=t||null,this.expirationTime=Date.now()+a*1e3}static fromJSON(t,i){const{refreshToken:a,accessToken:o,expirationTime:u}=i,c=new Xa;return a&&(Te(typeof a=="string","internal-error",{appName:t}),c.refreshToken=a),o&&(Te(typeof o=="string","internal-error",{appName:t}),c.accessToken=o),u&&(Te(typeof u=="number","internal-error",{appName:t}),c.expirationTime=u),c}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Xa,this.toJSON())}_performRefresh(){return bi("not implemented")}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Zi(e,t){Te(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class Nn{constructor({uid:t,auth:i,stsTokenManager:a,...o}){this.providerId="firebase",this.proactiveRefresh=new GR(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=i,this.stsTokenManager=a,this.accessToken=a.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Fh(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(t){const i=await Co(this,this.stsTokenManager.getToken(this.auth,t));return Te(i,this.auth,"internal-error"),this.accessToken!==i&&(this.accessToken=i,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),i}getIdTokenResult(t){return FR(this,t)}reload(){return YR(this)}_assign(t){this!==t&&(Te(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(i=>({...i})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const i=new Nn({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return i.metadata._copy(this.metadata),i}_onReload(t){Te(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,i=!1){let a=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),a=!0),i&&await Vu(this),await this.auth._persistUserIfCurrent(this),a&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(qn(this.auth.app))return Promise.reject(Wr(this.auth));const t=await this.getIdToken();return await Co(this,HR(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>({...t})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,i){const a=i.displayName??void 0,o=i.email??void 0,u=i.phoneNumber??void 0,c=i.photoURL??void 0,d=i.tenantId??void 0,p=i._redirectEventId??void 0,m=i.createdAt??void 0,g=i.lastLoginAt??void 0,{uid:y,emailVerified:v,isAnonymous:x,providerData:A,stsTokenManager:D}=i;Te(y&&D,t,"internal-error");const R=Xa.fromJSON(this.name,D);Te(typeof y=="string",t,"internal-error"),Zi(a,t.name),Zi(o,t.name),Te(typeof v=="boolean",t,"internal-error"),Te(typeof x=="boolean",t,"internal-error"),Zi(u,t.name),Zi(c,t.name),Zi(d,t.name),Zi(p,t.name),Zi(m,t.name),Zi(g,t.name);const C=new Nn({uid:y,auth:t,email:o,emailVerified:v,displayName:a,isAnonymous:x,photoURL:c,phoneNumber:u,tenantId:d,stsTokenManager:R,createdAt:m,lastLoginAt:g});return A&&Array.isArray(A)&&(C.providerData=A.map(P=>({...P}))),p&&(C._redirectEventId=p),C}static async _fromIdTokenResponse(t,i,a=!1){const o=new Xa;o.updateFromServerResponse(i);const u=new Nn({uid:i.localId,auth:t,stsTokenManager:o,isAnonymous:a});return await Vu(u),u}static async _fromGetAccountInfoResponse(t,i,a){const o=i.users[0];Te(o.localId!==void 0,"internal-error");const u=o.providerUserInfo!==void 0?pw(o.providerUserInfo):[],c=!(o.email&&o.passwordHash)&&!(u!=null&&u.length),d=new Xa;d.updateFromIdToken(a);const p=new Nn({uid:o.localId,auth:t,stsTokenManager:d,isAnonymous:c}),m={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:u,metadata:new Fh(o.createdAt,o.lastLoginAt),isAnonymous:!(o.email&&o.passwordHash)&&!(u!=null&&u.length)};return Object.assign(p,m),p}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Yv=new Map;function vi(e){Si(e instanceof Function,"Expected a class definition");let t=Yv.get(e);return t?(Si(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Yv.set(e,t),t)}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class gw{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,i){this.storage[t]=i}async _get(t){const i=this.storage[t];return i===void 0?null:i}async _remove(t){delete this.storage[t]}_addListener(t,i){}_removeListener(t,i){}}gw.type="NONE";const Xv=gw;/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Au(e,t,i){return`firebase:${e}:${t}:${i}`}class Ka{constructor(t,i,a){this.persistence=t,this.auth=i,this.userKey=a;const{config:o,name:u}=this.auth;this.fullUserKey=Au(this.userKey,o.apiKey,u),this.fullPersistenceKey=Au("persistence",o.apiKey,u),this.boundEventHandler=i._onStorageEvent.bind(i),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const i=await Pu(this.auth,{idToken:t}).catch(()=>{});return i?Nn._fromGetAccountInfoResponse(this.auth,i,t):null}return Nn._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const i=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,i)return this.setCurrentUser(i)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,i,a="authUser"){if(!i.length)return new Ka(vi(Xv),t,a);const o=(await Promise.all(i.map(async m=>{if(await m._isAvailable())return m}))).filter(m=>m);let u=o[0]||vi(Xv);const c=Au(a,t.config.apiKey,t.name);let d=null;for(const m of i)try{const g=await m._get(c);if(g){let y;if(typeof g=="string"){const v=await Pu(t,{idToken:g}).catch(()=>{});if(!v)break;y=await Nn._fromGetAccountInfoResponse(t,v,g)}else y=Nn._fromJSON(t,g);m!==u&&(d=y),u=m;break}}catch{}const p=o.filter(m=>m._shouldAllowMigration);return!u._shouldAllowMigration||!p.length?new Ka(u,t,a):(u=p[0],d&&await u._set(c,d.toJSON()),await Promise.all(i.map(async m=>{if(m!==u)try{await m._remove(c)}catch{}})),new Ka(u,t,a))}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Kv(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(xw(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(yw(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ww(t))return"Blackberry";if(Tw(t))return"Webos";if(bw(t))return"Safari";if((t.includes("chrome/")||vw(t))&&!t.includes("edge/"))return"Chrome";if(Sw(t))return"Android";{const i=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,a=e.match(i);if((a==null?void 0:a.length)===2)return a[1]}return"Other"}function yw(e=Ut()){return/firefox\//i.test(e)}function bw(e=Ut()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function vw(e=Ut()){return/crios\//i.test(e)}function xw(e=Ut()){return/iemobile/i.test(e)}function Sw(e=Ut()){return/android/i.test(e)}function ww(e=Ut()){return/blackberry/i.test(e)}function Tw(e=Ut()){return/webos/i.test(e)}function Hm(e=Ut()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function WR(e=Ut()){var t;return Hm(e)&&!!((t=window.navigator)!=null&&t.standalone)}function ZR(){return fN()&&document.documentMode===10}function Ew(e=Ut()){return Hm(e)||Sw(e)||Tw(e)||ww(e)||/windows phone/i.test(e)||xw(e)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Aw(e,t=[]){let i;switch(e){case"Browser":i=Kv(Ut());break;case"Worker":i=`${Kv(Ut())}-${e}`;break;default:i=e}const a=t.length?t.join(","):"FirebaseCore-web";return`${i}/JsCore/${Lo}/${a}`}/**
* @license
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class $R{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,i){const a=u=>new Promise((c,d)=>{try{const p=t(u);c(p)}catch(p){d(p)}});a.onAbort=i,this.queue.push(a);const o=this.queue.length-1;return()=>{this.queue[o]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const i=[];try{for(const a of this.queue)await a(t),a.onAbort&&i.push(a.onAbort)}catch(a){i.reverse();for(const o of i)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:a==null?void 0:a.message})}}}/**
* @license
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function JR(e,t={}){return ss(e,"GET","/v2/passwordPolicy",Pm(e,t))}/**
* @license
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const eO=6;class tO{constructor(t){var a;const i=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=i.minPasswordLength??eO,i.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=i.maxPasswordLength),i.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=i.containsLowercaseCharacter),i.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=i.containsUppercaseCharacter),i.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=i.containsNumericCharacter),i.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=i.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((a=t.allowedNonAlphanumericCharacters)==null?void 0:a.join(""))??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const i={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,i),this.validatePasswordCharacterOptions(t,i),i.isValid&&(i.isValid=i.meetsMinPasswordLength??!0),i.isValid&&(i.isValid=i.meetsMaxPasswordLength??!0),i.isValid&&(i.isValid=i.containsLowercaseLetter??!0),i.isValid&&(i.isValid=i.containsUppercaseLetter??!0),i.isValid&&(i.isValid=i.containsNumericCharacter??!0),i.isValid&&(i.isValid=i.containsNonAlphanumericCharacter??!0),i}validatePasswordLengthOptions(t,i){const a=this.customStrengthOptions.minPasswordLength,o=this.customStrengthOptions.maxPasswordLength;a&&(i.meetsMinPasswordLength=t.length>=a),o&&(i.meetsMaxPasswordLength=t.length<=o)}validatePasswordCharacterOptions(t,i){this.updatePasswordCharacterOptionsStatuses(i,!1,!1,!1,!1);let a;for(let o=0;o<t.length;o++)a=t.charAt(o),this.updatePasswordCharacterOptionsStatuses(i,a>="a"&&a<="z",a>="A"&&a<="Z",a>="0"&&a<="9",this.allowedNonAlphanumericCharacters.includes(a))}updatePasswordCharacterOptionsStatuses(t,i,a,o,u){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=i)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=a)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=o)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=u))}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class nO{constructor(t,i,a,o){this.app=t,this.heartbeatServiceProvider=i,this.appCheckServiceProvider=a,this.config=o,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Qv(this),this.idTokenSubscription=new Qv(this),this.beforeStateQueue=new $R(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=fw,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=o.sdkClientVersion,this._persistenceManagerAvailable=new Promise(u=>this._resolvePersistenceManagerAvailable=u)}_initializeWithPersistence(t,i){return i&&(this._popupRedirectResolver=vi(i)),this._initializationPromise=this.queue(async()=>{var a,o,u;if(!this._deleted&&(this.persistenceManager=await Ka.create(this,t),(a=this._resolvePersistenceManagerAvailable)==null||a.call(this),!this._deleted)){if((o=this._popupRedirectResolver)!=null&&o._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(i),this.lastNotifiedUid=((u=this.currentUser)==null?void 0:u.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const i=await Pu(this,{idToken:t}),a=await Nn._fromGetAccountInfoResponse(this,i,t);await this.directlySetCurrentUser(a)}catch(i){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",i),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){var u;if(qn(this.app)){const c=this.app.settings.authIdToken;return c?new Promise(d=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(c).then(d,d))}):this.directlySetCurrentUser(null)}const i=await this.assertedPersistence.getCurrentUser();let a=i,o=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const c=(u=this.redirectUser)==null?void 0:u._redirectEventId,d=a==null?void 0:a._redirectEventId,p=await this.tryRedirectSignIn(t);(!c||c===d)&&(p!=null&&p.user)&&(a=p.user,o=!0)}if(!a)return this.directlySetCurrentUser(null);if(!a._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(a)}catch(c){a=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(c))}return a?this.reloadAndSetCurrentUserOrClear(a):this.directlySetCurrentUser(null)}return Te(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===a._redirectEventId?this.directlySetCurrentUser(a):this.reloadAndSetCurrentUserOrClear(a)}async tryRedirectSignIn(t){let i=null;try{i=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return i}async reloadAndSetCurrentUserOrClear(t){try{await Vu(t)}catch(i){if((i==null?void 0:i.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=jR()}async _delete(){this._deleted=!0}async updateCurrentUser(t){if(qn(this.app))return Promise.reject(Wr(this));const i=t?gr(t):null;return i&&Te(i.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(i&&i._clone(this))}async _updateCurrentUser(t,i=!1){if(!this._deleted)return t&&Te(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),i||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return qn(this.app)?Promise.reject(Wr(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return qn(this.app)?Promise.reject(Wr(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(vi(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const i=this._getPasswordPolicyInternal();return i.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):i.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await JR(this),i=new tO(t);this.tenantId===null?this._projectPasswordPolicy=i:this._tenantPasswordPolicies[this.tenantId]=i}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new Oo("auth","Firebase",t())}onAuthStateChanged(t,i,a){return this.registerStateListener(this.authStateSubscription,t,i,a)}beforeAuthStateChanged(t,i){return this.beforeStateQueue.pushCallback(t,i)}onIdTokenChanged(t,i,a){return this.registerStateListener(this.idTokenSubscription,t,i,a)}authStateReady(){return new Promise((t,i)=>{if(this.currentUser)t();else{const a=this.onAuthStateChanged(()=>{a(),t()},i)}})}async revokeAccessToken(t){if(this.currentUser){const i=await this.currentUser.getIdToken(),a={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:i};this.tenantId!=null&&(a.tenantId=this.tenantId),await QR(this,a)}}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)==null?void 0:t.toJSON()}}async _setRedirectUser(t,i){const a=await this.getOrInitRedirectPersistenceManager(i);return t===null?a.removeCurrentUser():a.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const i=t&&vi(t)||this._popupRedirectResolver;Te(i,this,"argument-error"),this.redirectPersistenceManager=await Ka.create(this,[vi(i._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var i,a;return this._isInitialized&&await this.queue(async()=>{}),((i=this._currentUser)==null?void 0:i._redirectEventId)===t?this._currentUser:((a=this.redirectUser)==null?void 0:a._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var i;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const t=((i=this.currentUser)==null?void 0:i.uid)??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,i,a,o){if(this._deleted)return()=>{};const u=typeof i=="function"?i:i.next.bind(i);let c=!1;const d=this._isInitialized?Promise.resolve():this._initializationPromise;if(Te(d,this,"internal-error"),d.then(()=>{c||u(this.currentUser)}),typeof i=="function"){const p=t.addObserver(i,a,o);return()=>{c=!0,p()}}else{const p=t.addObserver(i);return()=>{c=!0,p()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return Te(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Aw(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var o;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const i=await((o=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:o.getHeartbeatsHeader());i&&(t["X-Firebase-Client"]=i);const a=await this._getAppCheckToken();return a&&(t["X-Firebase-AppCheck"]=a),t}async _getAppCheckToken(){var i;if(qn(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await((i=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:i.getToken());return t!=null&&t.error&&RR(`Error while retrieving App Check token: ${t.error}`),t==null?void 0:t.token}}function ec(e){return gr(e)}class Qv{constructor(t){this.auth=t,this.observer=null,this.addObserver=bN(i=>this.observer=i)}get next(){return Te(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/let Fm={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function iO(e){Fm=e}function rO(e){return Fm.loadJS(e)}function aO(){return Fm.gapiScript}function sO(e){return`__${e}${Math.floor(Math.random()*1e6)}`}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function oO(e,t){const i=sw(e,"auth");if(i.isInitialized()){const o=i.getImmediate(),u=i.getOptions();if(es(u,t??{}))return o;Qn(o,"already-initialized")}return i.initialize({options:t})}function lO(e,t){const i=(t==null?void 0:t.persistence)||[],a=(Array.isArray(i)?i:[i]).map(vi);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(a,t==null?void 0:t.popupRedirectResolver)}function uO(e,t,i){const a=ec(e);Te(/^https?:\/\//.test(t),a,"invalid-emulator-scheme");const o=!1,u=Cw(t),{host:c,port:d}=cO(t),p=d===null?"":`:${d}`,m={url:`${u}//${c}${p}/`},g=Object.freeze({host:c,port:d,protocol:u.replace(":",""),options:Object.freeze({disableWarnings:o})});if(!a._canInitEmulator){Te(a.config.emulator&&a.emulatorConfig,a,"emulator-config-failed"),Te(es(m,a.config.emulator)&&es(g,a.emulatorConfig),a,"emulator-config-failed");return}a.config.emulator=m,a.emulatorConfig=g,a.settings.appVerificationDisabledForTesting=!0,Lm(c)?SN(`${u}//${c}${p}`):fO()}function Cw(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function cO(e){const t=Cw(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};const a=i[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(a);if(o){const u=o[1];return{host:u,port:Wv(a.substr(u.length+1))}}else{const[u,c]=a.split(":");return{host:u,port:Wv(c)}}}function Wv(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function fO(){function e(){const t=document.createElement("p"),i=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",i.position="fixed",i.width="100%",i.backgroundColor="#ffffff",i.border=".1em solid #000000",i.color="#b50000",i.bottom="0px",i.left="0px",i.margin="0px",i.zIndex="10000",i.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class _w{constructor(t,i){this.providerId=t,this.signInMethod=i}toJSON(){return bi("not implemented")}_getIdTokenResponse(t){return bi("not implemented")}_linkToIdToken(t,i){return bi("not implemented")}_getReauthenticationResolver(t){return bi("not implemented")}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function Qa(e,t){return PR(e,"POST","/v1/accounts:signInWithIdp",Pm(e,t))}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const dO="http://localhost";class Zr extends _w{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const i=new Zr(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(i.idToken=t.idToken),t.accessToken&&(i.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(i.nonce=t.nonce),t.pendingToken&&(i.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(i.accessToken=t.oauthToken,i.secret=t.oauthTokenSecret):Qn("argument-error"),i}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const i=typeof t=="string"?JSON.parse(t):t,{providerId:a,signInMethod:o,...u}=i;if(!a||!o)return null;const c=new Zr(a,o);return c.idToken=u.idToken||void 0,c.accessToken=u.accessToken||void 0,c.secret=u.secret,c.nonce=u.nonce,c.pendingToken=u.pendingToken||null,c}_getIdTokenResponse(t){const i=this.buildRequest();return Qa(t,i)}_linkToIdToken(t,i){const a=this.buildRequest();return a.idToken=i,Qa(t,a)}_getReauthenticationResolver(t){const i=this.buildRequest();return i.autoCreate=!1,Qa(t,i)}buildRequest(){const t={requestUri:dO,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const i={};this.idToken&&(i.id_token=this.idToken),this.accessToken&&(i.access_token=this.accessToken),this.secret&&(i.oauth_token_secret=this.secret),i.providerId=this.providerId,this.nonce&&!this.pendingToken&&(i.nonce=this.nonce),t.postBody=zo(i)}return t}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class qm{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Io extends qm{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class ar extends Io{constructor(){super("facebook.com")}static credential(t){return Zr._fromParams({providerId:ar.PROVIDER_ID,signInMethod:ar.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return ar.credentialFromTaggedObject(t)}static credentialFromError(t){return ar.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return ar.credential(t.oauthAccessToken)}catch{return null}}}ar.FACEBOOK_SIGN_IN_METHOD="facebook.com";ar.PROVIDER_ID="facebook.com";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class yi extends Io{constructor(){super("google.com"),this.addScope("profile")}static credential(t,i){return Zr._fromParams({providerId:yi.PROVIDER_ID,signInMethod:yi.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:i})}static credentialFromResult(t){return yi.credentialFromTaggedObject(t)}static credentialFromError(t){return yi.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:i,oauthAccessToken:a}=t;if(!i&&!a)return null;try{return yi.credential(i,a)}catch{return null}}}yi.GOOGLE_SIGN_IN_METHOD="google.com";yi.PROVIDER_ID="google.com";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class sr extends Io{constructor(){super("github.com")}static credential(t){return Zr._fromParams({providerId:sr.PROVIDER_ID,signInMethod:sr.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return sr.credentialFromTaggedObject(t)}static credentialFromError(t){return sr.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return sr.credential(t.oauthAccessToken)}catch{return null}}}sr.GITHUB_SIGN_IN_METHOD="github.com";sr.PROVIDER_ID="github.com";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class or extends Io{constructor(){super("twitter.com")}static credential(t,i){return Zr._fromParams({providerId:or.PROVIDER_ID,signInMethod:or.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:i})}static credentialFromResult(t){return or.credentialFromTaggedObject(t)}static credentialFromError(t){return or.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:i,oauthTokenSecret:a}=t;if(!i||!a)return null;try{return or.credential(i,a)}catch{return null}}}or.TWITTER_SIGN_IN_METHOD="twitter.com";or.PROVIDER_ID="twitter.com";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class ns{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,i,a,o=!1){const u=await Nn._fromIdTokenResponse(t,a,o),c=Zv(a);return new ns({user:u,providerId:c,_tokenResponse:a,operationType:i})}static async _forOperation(t,i,a){await t._updateTokensIfNecessary(a,!0);const o=Zv(a);return new ns({user:t,providerId:o,_tokenResponse:a,operationType:i})}}function Zv(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Hu extends pr{constructor(t,i,a,o){super(i.code,i.message),this.operationType=a,this.user=o,Object.setPrototypeOf(this,Hu.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:i.customData._serverResponse,operationType:a}}static _fromErrorAndOperation(t,i,a,o){return new Hu(t,i,a,o)}}function kw(e,t,i,a){return(t==="reauthenticate"?i._getReauthenticationResolver(e):i._getIdTokenResponse(e)).catch(u=>{throw u.code==="auth/multi-factor-auth-required"?Hu._fromErrorAndOperation(e,u,t,a):u})}async function hO(e,t,i=!1){const a=await Co(e,t._linkToIdToken(e.auth,await e.getIdToken()),i);return ns._forOperation(e,"link",a)}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function mO(e,t,i=!1){const{auth:a}=e;if(qn(a.app))return Promise.reject(Wr(a));const o="reauthenticate";try{const u=await Co(e,kw(a,o,t,e),i);Te(u.idToken,a,"internal-error");const c=Vm(u.idToken);Te(c,a,"internal-error");const{sub:d}=c;return Te(e.uid===d,a,"user-mismatch"),ns._forOperation(e,o,u)}catch(u){throw(u==null?void 0:u.code)==="auth/user-not-found"&&Qn(a,"user-mismatch"),u}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function pO(e,t,i=!1){if(qn(e.app))return Promise.reject(Wr(e));const a="signIn",o=await kw(e,a,t),u=await ns._fromIdTokenResponse(e,a,o);return i||await e._updateCurrentUser(u.user),u}function gO(e,t,i,a){return gr(e).onIdTokenChanged(t,i,a)}function yO(e,t,i){return gr(e).beforeAuthStateChanged(t,i)}function bO(e,t,i,a){return gr(e).onAuthStateChanged(t,i,a)}function $v(e){return gr(e).signOut()}const Fu="__sak";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Dw{constructor(t,i){this.storageRetriever=t,this.type=i}_isAvailable(){try{return this.storage?(this.storage.setItem(Fu,"1"),this.storage.removeItem(Fu),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,i){return this.storage.setItem(t,JSON.stringify(i)),Promise.resolve()}_get(t){const i=this.storage.getItem(t);return Promise.resolve(i?JSON.parse(i):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const vO=1e3,xO=10;class Mw extends Dw{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,i)=>this.onStorageEvent(t,i),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Ew(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const i of Object.keys(this.listeners)){const a=this.storage.getItem(i),o=this.localCache[i];a!==o&&t(i,o,a)}}onStorageEvent(t,i=!1){if(!t.key){this.forAllChangedKeys((c,d,p)=>{this.notifyListeners(c,p)});return}const a=t.key;i?this.detachListener():this.stopPolling();const o=()=>{const c=this.storage.getItem(a);!i&&this.localCache[a]===c||this.notifyListeners(a,c)},u=this.storage.getItem(a);ZR()&&u!==t.newValue&&t.newValue!==t.oldValue?setTimeout(o,xO):o()}notifyListeners(t,i){this.localCache[t]=i;const a=this.listeners[t];if(a)for(const o of Array.from(a))o(i&&JSON.parse(i))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,i,a)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:i,newValue:a}),!0)})},vO)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,i){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(i)}_removeListener(t,i){this.listeners[t]&&(this.listeners[t].delete(i),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,i){await super._set(t,i),this.localCache[t]=JSON.stringify(i)}async _get(t){const i=await super._get(t);return this.localCache[t]=JSON.stringify(i),i}async _remove(t){await super._remove(t),delete this.localCache[t]}}Mw.type="LOCAL";const SO=Mw;/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Nw extends Dw{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,i){}_removeListener(t,i){}}Nw.type="SESSION";const Rw=Nw;/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function wO(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(i){return{fulfilled:!1,reason:i}}}))}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class tc{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const i=this.receivers.find(o=>o.isListeningto(t));if(i)return i;const a=new tc(t);return this.receivers.push(a),a}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const i=t,{eventId:a,eventType:o,data:u}=i.data,c=this.handlersMap[o];if(!(c!=null&&c.size))return;i.ports[0].postMessage({status:"ack",eventId:a,eventType:o});const d=Array.from(c).map(async m=>m(i.origin,u)),p=await wO(d);i.ports[0].postMessage({status:"done",eventId:a,eventType:o,response:p})}_subscribe(t,i){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(i)}_unsubscribe(t,i){this.handlersMap[t]&&i&&this.handlersMap[t].delete(i),(!i||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}tc.receivers=[];/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Gm(e="",t=10){let i="";for(let a=0;a<t;a++)i+=Math.floor(Math.random()*10);return e+i}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class TO{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,i,a=50){const o=typeof MessageChannel<"u"?new MessageChannel:null;if(!o)throw new Error("connection_unavailable");let u,c;return new Promise((d,p)=>{const m=Gm("",20);o.port1.start();const g=setTimeout(()=>{p(new Error("unsupported_event"))},a);c={messageChannel:o,onMessage(y){const v=y;if(v.data.eventId===m)switch(v.data.status){case"ack":clearTimeout(g),u=setTimeout(()=>{p(new Error("timeout"))},3e3);break;case"done":clearTimeout(u),d(v.data.response);break;default:clearTimeout(g),clearTimeout(u),p(new Error("invalid_response"));break}}},this.handlers.add(c),o.port1.addEventListener("message",c.onMessage),this.target.postMessage({eventType:t,eventId:m,data:i},[o.port2])}).finally(()=>{c&&this.removeMessageHandler(c)})}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Xn(){return window}function EO(e){Xn().location.href=e}/**
* @license
* Copyright 2020 Google LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Ow(){return typeof Xn().WorkerGlobalScope<"u"&&typeof Xn().importScripts=="function"}async function AO(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function CO(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)==null?void 0:e.controller)||null}function _O(){return Ow()?self:null}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const zw="firebaseLocalStorageDb",kO=1,qu="firebaseLocalStorage",Lw="fbase_key";class Bo{constructor(t){this.request=t}toPromise(){return new Promise((t,i)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{i(this.request.error)})})}}function nc(e,t){return e.transaction([qu],t?"readwrite":"readonly").objectStore(qu)}function DO(){const e=indexedDB.deleteDatabase(zw);return new Bo(e).toPromise()}function qh(){const e=indexedDB.open(zw,kO);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{const a=e.result;try{a.createObjectStore(qu,{keyPath:Lw})}catch(o){i(o)}}),e.addEventListener("success",async()=>{const a=e.result;a.objectStoreNames.contains(qu)?t(a):(a.close(),await DO(),t(await qh()))})})}async function Jv(e,t,i){const a=nc(e,!0).put({[Lw]:t,value:i});return new Bo(a).toPromise()}async function MO(e,t){const i=nc(e,!1).get(t),a=await new Bo(i).toPromise();return a===void 0?null:a.value}function ex(e,t){const i=nc(e,!0).delete(t);return new Bo(i).toPromise()}const NO=800,RO=3;class jw{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await qh(),this.db)}async _withRetries(t){let i=0;for(;;)try{const a=await this._openDb();return await t(a)}catch(a){if(i++>RO)throw a;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Ow()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=tc._getInstance(_O()),this.receiver._subscribe("keyChanged",async(t,i)=>({keyProcessed:(await this._poll()).includes(i.key)})),this.receiver._subscribe("ping",async(t,i)=>["keyChanged"])}async initializeSender(){var i,a;if(this.activeServiceWorker=await AO(),!this.activeServiceWorker)return;this.sender=new TO(this.activeServiceWorker);const t=await this.sender._send("ping",{},800);t&&(i=t[0])!=null&&i.fulfilled&&(a=t[0])!=null&&a.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||CO()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const t=await qh();return await Jv(t,Fu,"1"),await ex(t,Fu),!0}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,i){return this._withPendingWrite(async()=>(await this._withRetries(a=>Jv(a,t,i)),this.localCache[t]=i,this.notifyServiceWorker(t)))}async _get(t){const i=await this._withRetries(a=>MO(a,t));return this.localCache[t]=i,i}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(i=>ex(i,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){const t=await this._withRetries(o=>{const u=nc(o,!1).getAll();return new Bo(u).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const i=[],a=new Set;if(t.length!==0)for(const{fbase_key:o,value:u}of t)a.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(u)&&(this.notifyListeners(o,u),i.push(o));for(const o of Object.keys(this.localCache))this.localCache[o]&&!a.has(o)&&(this.notifyListeners(o,null),i.push(o));return i}notifyListeners(t,i){this.localCache[t]=i;const a=this.listeners[t];if(a)for(const o of Array.from(a))o(i)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),NO)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,i){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(i)}_removeListener(t,i){this.listeners[t]&&(this.listeners[t].delete(i),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}jw.type="LOCAL";const OO=jw;new jo(3e4,6e4);/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function Iw(e,t){return t?vi(t):(Te(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Ym extends _w{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Qa(t,this._buildIdpRequest())}_linkToIdToken(t,i){return Qa(t,this._buildIdpRequest(i))}_getReauthenticationResolver(t){return Qa(t,this._buildIdpRequest())}_buildIdpRequest(t){const i={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(i.idToken=t),i}}function zO(e){return pO(e.auth,new Ym(e),e.bypassAuthState)}function LO(e){const{auth:t,user:i}=e;return Te(i,t,"internal-error"),mO(i,new Ym(e),e.bypassAuthState)}async function jO(e){const{auth:t,user:i}=e;return Te(i,t,"internal-error"),hO(i,new Ym(e),e.bypassAuthState)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Bw{constructor(t,i,a,o,u=!1){this.auth=t,this.resolver=a,this.user=o,this.bypassAuthState=u,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(i)?i:[i]}execute(){return new Promise(async(t,i)=>{this.pendingPromise={resolve:t,reject:i};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(a){this.reject(a)}})}async onAuthEvent(t){const{urlResponse:i,sessionId:a,postBody:o,tenantId:u,error:c,type:d}=t;if(c){this.reject(c);return}const p={auth:this.auth,requestUri:i,sessionId:a,tenantId:u||void 0,postBody:o||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(d)(p))}catch(m){this.reject(m)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return zO;case"linkViaPopup":case"linkViaRedirect":return jO;case"reauthViaPopup":case"reauthViaRedirect":return LO;default:Qn(this.auth,"internal-error")}}resolve(t){Si(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Si(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const IO=new jo(2e3,1e4);async function BO(e,t,i){if(qn(e.app))return Promise.reject(On(e,"operation-not-supported-in-this-environment"));const a=ec(e);OR(e,t,qm);const o=Iw(a,i);return new Xr(a,"signInViaPopup",t,o).executeNotNull()}class Xr extends Bw{constructor(t,i,a,o,u){super(t,i,o,u),this.provider=a,this.authWindow=null,this.pollId=null,Xr.currentPopupAction&&Xr.currentPopupAction.cancel(),Xr.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return Te(t,this.auth,"internal-error"),t}async onExecution(){Si(this.filter.length===1,"Popup operations only handle one event");const t=Gm();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(i=>{this.reject(i)}),this.resolver._isIframeWebStorageSupported(this.auth,i=>{i||this.reject(On(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)==null?void 0:t.associatedEvent)||null}cancel(){this.reject(On(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Xr.currentPopupAction=null}pollUserCancellation(){const t=()=>{var i,a;if((a=(i=this.authWindow)==null?void 0:i.window)!=null&&a.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(On(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,IO.get())};t()}}Xr.currentPopupAction=null;/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const UO="pendingRedirect",Cu=new Map;class PO extends Bw{constructor(t,i,a=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],i,void 0,a),this.eventId=null}async execute(){let t=Cu.get(this.auth._key());if(!t){try{const a=await VO(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(a)}catch(i){t=()=>Promise.reject(i)}Cu.set(this.auth._key(),t)}return this.bypassAuthState||Cu.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const i=await this.auth._redirectUserForId(t.eventId);if(i)return this.user=i,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function VO(e,t){const i=qO(t),a=FO(e);if(!await a._isAvailable())return!1;const o=await a._get(i)==="true";return await a._remove(i),o}function HO(e,t){Cu.set(e._key(),t)}function FO(e){return vi(e._redirectPersistence)}function qO(e){return Au(UO,e.config.apiKey,e.name)}async function GO(e,t,i=!1){if(qn(e.app))return Promise.reject(Wr(e));const a=ec(e),o=Iw(a,t),c=await new PO(a,o,i).execute();return c&&!i&&(delete c.user._redirectEventId,await a._persistUserIfCurrent(c.user),await a._setRedirectUser(null,t)),c}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const YO=600*1e3;class XO{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let i=!1;return this.consumers.forEach(a=>{this.isEventForConsumer(t,a)&&(i=!0,this.sendToConsumer(t,a),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!KO(t)||(this.hasHandledPotentialRedirect=!0,i||(this.queuedRedirectEvent=t,i=!0)),i}sendToConsumer(t,i){var a;if(t.error&&!Uw(t)){const o=((a=t.error.code)==null?void 0:a.split("auth/")[1])||"internal-error";i.onError(On(this.auth,o))}else i.onAuthEvent(t)}isEventForConsumer(t,i){const a=i.eventId===null||!!t.eventId&&t.eventId===i.eventId;return i.filter.includes(t.type)&&a}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=YO&&this.cachedEventUids.clear(),this.cachedEventUids.has(tx(t))}saveEventToCache(t){this.cachedEventUids.add(tx(t)),this.lastProcessedEventTime=Date.now()}}function tx(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function Uw({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function KO(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Uw(e);default:return!1}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/async function QO(e,t={}){return ss(e,"GET","/v1/projects",t)}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const WO=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ZO=/^https?/;async function $O(e){if(e.config.emulator)return;const{authorizedDomains:t}=await QO(e);for(const i of t)try{if(JO(i))return}catch{}Qn(e,"unauthorized-domain")}function JO(e){const t=Hh(),{protocol:i,hostname:a}=new URL(t);if(e.startsWith("chrome-extension://")){const c=new URL(e);return c.hostname===""&&a===""?i==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):i==="chrome-extension:"&&c.hostname===a}if(!ZO.test(i))return!1;if(WO.test(e))return a===e;const o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)}/**
* @license
* Copyright 2020 Google LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const e3=new jo(3e4,6e4);function nx(){const e=Xn().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let i=0;i<e.CP.length;i++)e.CP[i]=null}}function t3(e){return new Promise((t,i)=>{var o,u,c;function a(){nx(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{nx(),i(On(e,"network-request-failed"))},timeout:e3.get()})}if((u=(o=Xn().gapi)==null?void 0:o.iframes)!=null&&u.Iframe)t(gapi.iframes.getContext());else if((c=Xn().gapi)!=null&&c.load)a();else{const d=sO("iframefcb");return Xn()[d]=()=>{gapi.load?a():i(On(e,"network-request-failed"))},rO(`${aO()}?onload=${d}`).catch(p=>i(p))}}).catch(t=>{throw _u=null,t})}let _u=null;function n3(e){return _u=_u||t3(e),_u}/**
* @license
* Copyright 2020 Google LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const i3=new jo(5e3,15e3),r3="__/auth/iframe",a3="emulator/auth/iframe",s3={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},o3=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function l3(e){const t=e.config;Te(t.authDomain,e,"auth-domain-config-required");const i=t.emulator?Um(t,a3):`https://${e.config.authDomain}/${r3}`,a={apiKey:t.apiKey,appName:e.name,v:Lo},o=o3.get(e.config.apiHost);o&&(a.eid=o);const u=e._getFrameworks();return u.length&&(a.fw=u.join(",")),`${i}?${zo(a).slice(1)}`}async function u3(e){const t=await n3(e),i=Xn().gapi;return Te(i,e,"internal-error"),t.open({where:document.body,url:l3(e),messageHandlersFilter:i.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:s3,dontclear:!0},a=>new Promise(async(o,u)=>{await a.restyle({setHideOnLeave:!1});const c=On(e,"network-request-failed"),d=Xn().setTimeout(()=>{u(c)},i3.get());function p(){Xn().clearTimeout(d),o(a)}a.ping(p).then(p,()=>{u(c)})}))}/**
* @license
* Copyright 2020 Google LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const c3={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},f3=500,d3=600,h3="_blank",m3="http://localhost";class ix{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function p3(e,t,i,a=f3,o=d3){const u=Math.max((window.screen.availHeight-o)/2,0).toString(),c=Math.max((window.screen.availWidth-a)/2,0).toString();let d="";const p={...c3,width:a.toString(),height:o.toString(),top:u,left:c},m=Ut().toLowerCase();i&&(d=vw(m)?h3:i),yw(m)&&(t=t||m3,p.scrollbars="yes");const g=Object.entries(p).reduce((v,[x,A])=>`${v}${x}=${A},`,"");if(WR(m)&&d!=="_self")return g3(t||"",d),new ix(null);const y=window.open(t||"",d,g);Te(y,e,"popup-blocked");try{y.focus()}catch{}return new ix(y)}function g3(e,t){const i=document.createElement("a");i.href=e,i.target=t;const a=document.createEvent("MouseEvent");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),i.dispatchEvent(a)}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const y3="__/auth/handler",b3="emulator/auth/handler",v3=encodeURIComponent("fac");async function rx(e,t,i,a,o,u){Te(e.config.authDomain,e,"auth-domain-config-required"),Te(e.config.apiKey,e,"invalid-api-key");const c={apiKey:e.config.apiKey,appName:e.name,authType:i,redirectUrl:a,v:Lo,eventId:o};if(t instanceof qm){t.setDefaultLanguage(e.languageCode),c.providerId=t.providerId||"",yN(t.getCustomParameters())||(c.customParameters=JSON.stringify(t.getCustomParameters()));for(const[g,y]of Object.entries({}))c[g]=y}if(t instanceof Io){const g=t.getScopes().filter(y=>y!=="");g.length>0&&(c.scopes=g.join(","))}e.tenantId&&(c.tid=e.tenantId);const d=c;for(const g of Object.keys(d))d[g]===void 0&&delete d[g];const p=await e._getAppCheckToken(),m=p?`#${v3}=${encodeURIComponent(p)}`:"";return`${x3(e)}?${zo(d).slice(1)}${m}`}function x3({config:e}){return e.emulator?Um(e,b3):`https://${e.authDomain}/${y3}`}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Kd="webStorageSupport";class S3{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Rw,this._completeRedirectFn=GO,this._overrideRedirectResult=HO}async _openPopup(t,i,a,o){var c;Si((c=this.eventManagers[t._key()])==null?void 0:c.manager,"_initialize() not called before _openPopup()");const u=await rx(t,i,a,Hh(),o);return p3(t,u,Gm())}async _openRedirect(t,i,a,o){await this._originValidation(t);const u=await rx(t,i,a,Hh(),o);return EO(u),new Promise(()=>{})}_initialize(t){const i=t._key();if(this.eventManagers[i]){const{manager:o,promise:u}=this.eventManagers[i];return o?Promise.resolve(o):(Si(u,"If manager is not set, promise should be"),u)}const a=this.initAndGetManager(t);return this.eventManagers[i]={promise:a},a.catch(()=>{delete this.eventManagers[i]}),a}async initAndGetManager(t){const i=await u3(t),a=new XO(t);return i.register("authEvent",o=>(Te(o==null?void 0:o.authEvent,t,"invalid-auth-event"),{status:a.onEvent(o.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:a},this.iframes[t._key()]=i,a}_isIframeWebStorageSupported(t,i){this.iframes[t._key()].send(Kd,{type:Kd},o=>{var c;const u=(c=o==null?void 0:o[0])==null?void 0:c[Kd];u!==void 0&&i(!!u),Qn(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const i=t._key();return this.originValidationPromises[i]||(this.originValidationPromises[i]=$O(t)),this.originValidationPromises[i]}get _shouldInitProactively(){return Ew()||bw()||Hm()}}const w3=S3;var ax="@firebase/auth",sx="1.13.0";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class T3{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)==null?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const i=this.auth.onIdTokenChanged(a=>{t((a==null?void 0:a.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,i),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const i=this.internalListeners.get(t);i&&(this.internalListeners.delete(t),i(),this.updateProactiveRefresh())}assertAuthConfigured(){Te(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function E3(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function A3(e){Eo(new ts("auth",(t,{options:i})=>{const a=t.getProvider("app").getImmediate(),o=t.getProvider("heartbeat"),u=t.getProvider("app-check-internal"),{apiKey:c,authDomain:d}=a.options;Te(c&&!c.includes(":"),"invalid-api-key",{appName:a.name});const p={apiKey:c,authDomain:d,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Aw(e)},m=new nO(a,o,u,p);return lO(m,i),m},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,i,a)=>{t.getProvider("auth-internal").initialize()})),Eo(new ts("auth-internal",t=>{const i=ec(t.getProvider("auth").getImmediate());return(a=>new T3(a))(i)},"PRIVATE").setInstantiationMode("EXPLICIT")),Ya(ax,sx,E3(e)),Ya(ax,sx,"esm2020")}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const C3=300,_3=nw("authIdTokenMaxAge")||C3;let ox=null;const k3=e=>async t=>{const i=t&&await t.getIdTokenResult(),a=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(a&&a>_3)return;const o=i==null?void 0:i.token;ox!==o&&(ox=o,await fetch(e,{method:o?"POST":"DELETE",headers:o?{Authorization:`Bearer ${o}`}:{}}))};function D3(e=xR()){const t=sw(e,"auth");if(t.isInitialized())return t.getImmediate();const i=oO(e,{popupRedirectResolver:w3,persistence:[OO,SO,Rw]}),a=nw("authTokenSyncURL");if(a&&typeof isSecureContext=="boolean"&&isSecureContext){const u=new URL(a,location.origin);if(location.origin===u.origin){const c=k3(u.toString());yO(i,c,()=>c(i.currentUser)),gO(i,d=>c(d))}}const o=aN("auth");return o&&uO(i,`http://${o}`),i}function M3(){var e;return((e=document.getElementsByTagName("head"))==null?void 0:e[0])??document}iO({loadJS(e){return new Promise((t,i)=>{const a=document.createElement("script");a.setAttribute("src",e),a.onload=t,a.onerror=o=>{const u=On("internal-error");u.customData=o,i(u)},a.type="text/javascript",a.charset="UTF-8",M3().appendChild(a)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});A3("Browser");function Pw(e){var t,i,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=Pw(e[t]))&&(a&&(a+=" "),a+=i)}else for(i in e)e[i]&&(a&&(a+=" "),a+=i);return a}function N3(){for(var e,t,i=0,a="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=Pw(e))&&(a&&(a+=" "),a+=t);return a}const R3=(e,t)=>{const i=new Array(e.length+t.length);for(let a=0;a<e.length;a++)i[a]=e[a];for(let a=0;a<t.length;a++)i[e.length+a]=t[a];return i},O3=(e,t)=>({classGroupId:e,validator:t}),Vw=(e=new Map,t=null,i)=>({nextPart:e,validators:t,classGroupId:i}),Gu="-",lx=[],z3="arbitrary..",L3=e=>{const t=I3(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return j3(c);const d=c.split(Gu),p=d[0]===""&&d.length>1?1:0;return Hw(d,p,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const p=a[c],m=i[c];return p?m?R3(m,p):p:m||lx}return i[c]||lx}}},Hw=(e,t,i)=>{if(e.length-t===0)return i.classGroupId;const o=e[t],u=i.nextPart.get(o);if(u){const m=Hw(e,t+1,u);if(m)return m}const c=i.validators;if(c===null)return;const d=t===0?e.join(Gu):e.slice(t).join(Gu),p=c.length;for(let m=0;m<p;m++){const g=c[m];if(g.validator(d))return g.classGroupId}},j3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),i=t.indexOf(":"),a=t.slice(0,i);return a?z3+a:void 0})(),I3=e=>{const{theme:t,classGroups:i}=e;return B3(i,t)},B3=(e,t)=>{const i=Vw();for(const a in e){const o=e[a];Xm(o,i,a,t)}return i},Xm=(e,t,i,a)=>{const o=e.length;for(let u=0;u<o;u++){const c=e[u];U3(c,t,i,a)}},U3=(e,t,i,a)=>{if(typeof e=="string"){P3(e,t,i);return}if(typeof e=="function"){V3(e,t,i,a);return}H3(e,t,i,a)},P3=(e,t,i)=>{const a=e===""?t:Fw(t,e);a.classGroupId=i},V3=(e,t,i,a)=>{if(F3(e)){Xm(e(a),t,i,a);return}t.validators===null&&(t.validators=[]),t.validators.push(O3(i,e))},H3=(e,t,i,a)=>{const o=Object.entries(e),u=o.length;for(let c=0;c<u;c++){const[d,p]=o[c];Xm(p,Fw(t,d),i,a)}},Fw=(e,t)=>{let i=e;const a=t.split(Gu),o=a.length;for(let u=0;u<o;u++){const c=a[u];let d=i.nextPart.get(c);d||(d=Vw(),i.nextPart.set(c,d)),i=d}return i},F3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,q3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=Object.create(null),a=Object.create(null);const o=(u,c)=>{i[u]=c,t++,t>e&&(t=0,a=i,i=Object.create(null))};return{get(u){let c=i[u];if(c!==void 0)return c;if((c=a[u])!==void 0)return o(u,c),c},set(u,c){u in i?i[u]=c:o(u,c)}}},Gh="!",ux=":",G3=[],cx=(e,t,i,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:i,maybePostfixModifierPosition:a,isExternal:o}),Y3=e=>{const{prefix:t,experimentalParseClassName:i}=e;let a=o=>{const u=[];let c=0,d=0,p=0,m;const g=o.length;for(let D=0;D<g;D++){const R=o[D];if(c===0&&d===0){if(R===ux){u.push(o.slice(p,D)),p=D+1;continue}if(R==="/"){m=D;continue}}R==="["?c++:R==="]"?c--:R==="("?d++:R===")"&&d--}const y=u.length===0?o:o.slice(p);let v=y,x=!1;y.endsWith(Gh)?(v=y.slice(0,-1),x=!0):y.startsWith(Gh)&&(v=y.slice(1),x=!0);const A=m&&m>p?m-p:void 0;return cx(u,x,v,A)};if(t){const o=t+ux,u=a;a=c=>c.startsWith(o)?u(c.slice(o.length)):cx(G3,!1,c,void 0,!0)}if(i){const o=a;a=u=>i({className:u,parseClassName:o})}return a},X3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((i,a)=>{t.set(i,1e6+a)}),i=>{const a=[];let o=[];for(let u=0;u<i.length;u++){const c=i[u],d=c[0]==="[",p=t.has(c);d||p?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(c)):o.push(c)}return o.length>0&&(o.sort(),a.push(...o)),a}},K3=e=>({cache:q3(e.cacheSize),parseClassName:Y3(e),sortModifiers:X3(e),...L3(e)}),Q3=/\s+/,W3=(e,t)=>{const{parseClassName:i,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:u}=t,c=[],d=e.trim().split(Q3);let p="";for(let m=d.length-1;m>=0;m-=1){const g=d[m],{isExternal:y,modifiers:v,hasImportantModifier:x,baseClassName:A,maybePostfixModifierPosition:D}=i(g);if(y){p=g+(p.length>0?" "+p:p);continue}let R=!!D,C=a(R?A.substring(0,D):A);if(!C){if(!R){p=g+(p.length>0?" "+p:p);continue}if(C=a(A),!C){p=g+(p.length>0?" "+p:p);continue}R=!1}const P=v.length===0?"":v.length===1?v[0]:u(v).join(":"),N=x?P+Gh:P,q=N+C;if(c.indexOf(q)>-1)continue;c.push(q);const Z=o(C,R);for(let L=0;L<Z.length;++L){const K=Z[L];c.push(N+K)}p=g+(p.length>0?" "+p:p)}return p},Z3=(...e)=>{let t=0,i,a,o="";for(;t<e.length;)(i=e[t++])&&(a=qw(i))&&(o&&(o+=" "),o+=a);return o},qw=e=>{if(typeof e=="string")return e;let t,i="";for(let a=0;a<e.length;a++)e[a]&&(t=qw(e[a]))&&(i&&(i+=" "),i+=t);return i},$3=(e,...t)=>{let i,a,o,u;const c=p=>{const m=t.reduce((g,y)=>y(g),e());return i=K3(m),a=i.cache.get,o=i.cache.set,u=d,d(p)},d=p=>{const m=a(p);if(m)return m;const g=W3(p,i);return o(p,g),g};return u=c,(...p)=>u(Z3(...p))},J3=[],bt=e=>{const t=i=>i[e]||J3;return t.isThemeGetter=!0,t},Gw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ez=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nz=/\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$/,iz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,az=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$i=e=>ez.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),Ji=e=>!!e&&Number.isInteger(Number(e)),Qd=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),gi=e=>tz.test(e),Xw=()=>!0,sz=e=>nz.test(e)&&!iz.test(e),Km=()=>!1,oz=e=>rz.test(e),lz=e=>az.test(e),uz=e=>!he(e)&&!pe(e),cz=e=>yr(e,Ww,Km),he=e=>Gw.test(e),Vr=e=>yr(e,Zw,sz),fx=e=>yr(e,bz,Ne),fz=e=>yr(e,Jw,Xw),dz=e=>yr(e,$w,Km),dx=e=>yr(e,Kw,Km),hz=e=>yr(e,Qw,lz),uu=e=>yr(e,eT,oz),pe=e=>Yw.test(e),io=e=>$r(e,Zw),mz=e=>$r(e,$w),hx=e=>$r(e,Kw),pz=e=>$r(e,Ww),gz=e=>$r(e,Qw),cu=e=>$r(e,eT,!0),yz=e=>$r(e,Jw,!0),yr=(e,t,i)=>{const a=Gw.exec(e);return a?a[1]?t(a[1]):i(a[2]):!1},$r=(e,t,i=!1)=>{const a=Yw.exec(e);return a?a[1]?t(a[1]):i:!1},Kw=e=>e==="position"||e==="percentage",Qw=e=>e==="image"||e==="url",Ww=e=>e==="length"||e==="size"||e==="bg-size",Zw=e=>e==="length",bz=e=>e==="number",$w=e=>e==="family-name",Jw=e=>e==="number"||e==="weight",eT=e=>e==="shadow",vz=()=>{const e=bt("color"),t=bt("font"),i=bt("text"),a=bt("font-weight"),o=bt("tracking"),u=bt("leading"),c=bt("breakpoint"),d=bt("container"),p=bt("spacing"),m=bt("radius"),g=bt("shadow"),y=bt("inset-shadow"),v=bt("text-shadow"),x=bt("drop-shadow"),A=bt("blur"),D=bt("perspective"),R=bt("aspect"),C=bt("ease"),P=bt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...q(),pe,he],L=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],V=()=>[pe,he,p],ne=()=>[$i,"full","auto",...V()],re=()=>[Ji,"none","subgrid",pe,he],ie=()=>["auto",{span:["full",Ji,pe,he]},Ji,pe,he],ae=()=>[Ji,"auto",pe,he],be=()=>["auto","min","max","fr",pe,he],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...V()],Q=()=>[$i,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],J=()=>[$i,"screen","full","dvw","lvw","svw","min","max","fit",...V()],fe=()=>[$i,"screen","full","lh","dvh","lvh","svh","min","max","fit",...V()],w=()=>[e,pe,he],k=()=>[...q(),hx,dx,{position:[pe,he]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",pz,cz,{size:[pe,he]}],le=()=>[Qd,io,Vr],ce=()=>["","none","full",m,pe,he],ue=()=>["",Ne,io,Vr],Ee=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[Ne,Qd,hx,dx],wt=()=>["","none",A,pe,he],Nt=()=>["none",Ne,pe,he],un=()=>["none",Ne,pe,he],Ln=()=>[Ne,pe,he],Rt=()=>[$i,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gi],breakpoint:[gi],color:[Xw],container:[gi],"drop-shadow":[gi],ease:["in","out","in-out"],font:[uz],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gi],shadow:[gi],spacing:["px",Ne],text:[gi],"text-shadow":[gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$i,he,pe,R]}],container:["container"],columns:[{columns:[Ne,he,pe,d]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:Z()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{"inset-s":ne(),start:ne()}],end:[{"inset-e":ne(),end:ne()}],"inset-bs":[{"inset-bs":ne()}],"inset-be":[{"inset-be":ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[Ji,"auto",pe,he]}],basis:[{basis:[$i,"full","auto",d,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,$i,"auto","initial","none",he]}],grow:[{grow:["",Ne,pe,he]}],shrink:[{shrink:["",Ne,pe,he]}],order:[{order:[Ji,"first","last","none",pe,he]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pbs:[{pbs:V()}],pbe:[{pbe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[d,"screen",...Q()]}],"min-w":[{"min-w":[d,"screen","none",...Q()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",i,io,Vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,yz,fz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qd,he]}],"font-family":[{font:[mz,dz,t]}],"font-features":[{"font-features":[he]}],"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:[o,pe,he]}],"line-clamp":[{"line-clamp":[Ne,"none",pe,fx]}],leading:[{leading:[u,...V()]}],"list-image":[{"list-image":["none",pe,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",pe,Vr]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[Ne,"auto",pe,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,he]}],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",pe,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ji,pe,he],radial:["",pe,he],conic:[Ji,pe,he]},gz,hz]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"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:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-bs":[{"border-bs":w()}],"border-color-be":[{"border-be":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,pe,he]}],"outline-w":[{outline:["",Ne,io,Vr]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",g,cu,uu]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",y,cu,uu]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[Ne,Vr]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",v,cu,uu]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[Ne,pe,he]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[pe,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"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":q()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,he]}],filter:[{filter:["","none",pe,he]}],blur:[{blur:wt()}],brightness:[{brightness:[Ne,pe,he]}],contrast:[{contrast:[Ne,pe,he]}],"drop-shadow":[{"drop-shadow":["","none",x,cu,uu]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",Ne,pe,he]}],"hue-rotate":[{"hue-rotate":[Ne,pe,he]}],invert:[{invert:["",Ne,pe,he]}],saturate:[{saturate:[Ne,pe,he]}],sepia:[{sepia:["",Ne,pe,he]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,he]}],"backdrop-blur":[{"backdrop-blur":wt()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,pe,he]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,pe,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,pe,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,pe,he]}],"backdrop-invert":[{"backdrop-invert":["",Ne,pe,he]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,pe,he]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,pe,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,pe,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",pe,he]}],ease:[{ease:["linear","initial",C,pe,he]}],delay:[{delay:[Ne,pe,he]}],animate:[{animate:["none",P,pe,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[D,pe,he]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:Nt()}],"rotate-x":[{"rotate-x":Nt()}],"rotate-y":[{"rotate-y":Nt()}],"rotate-z":[{"rotate-z":Nt()}],scale:[{scale:un()}],"scale-x":[{"scale-x":un()}],"scale-y":[{"scale-y":un()}],"scale-z":[{"scale-z":un()}],"scale-3d":["scale-3d"],skew:[{skew:Ln()}],"skew-x":[{"skew-x":Ln()}],"skew-y":[{"skew-y":Ln()}],transform:[{transform:[pe,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Rt()}],"translate-x":[{"translate-x":Rt()}],"translate-y":[{"translate-y":Rt()}],"translate-z":[{"translate-z":Rt()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"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",pe,he]}],"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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mbs":[{"scroll-mbs":V()}],"scroll-mbe":[{"scroll-mbe":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pbs":[{"scroll-pbs":V()}],"scroll-pbe":[{"scroll-pbe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",pe,he]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[Ne,io,Vr,fx]}],stroke:[{stroke:["none",...w()]}],"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"]}},xz=$3(vz);function Mn(...e){return xz(N3(e))}const Sz="/brief/glm-logo.png",wz=({isConnected:e,onLogout:t})=>E.jsx("header",{className:"sticky top-0 z-50 border-b border-[#D0D0D0]/60 bg-white/90 backdrop-blur-2xl shadow-[0_4px_24px_rgba(79,117,139,0.07)]",children:E.jsxs("div",{className:"mx-auto flex w-full max-w-7xl items-center justify-between gap-4 px-5 py-3 sm:px-8",children:[E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsx("div",{className:"flex h-14 w-14 items-center justify-center overflow-hidden rounded-[18px] border border-slate-200/80 bg-white p-1.5 shadow-[0_4px_14px_rgba(79,117,139,0.10)]",children:E.jsx("img",{src:Sz,alt:"GLM",className:"h-full w-full object-contain"})}),E.jsxs("div",{children:[E.jsx("h1",{className:"text-base font-bold tracking-tight text-[#4F758B] sm:text-lg",children:"Portal Brief CDC"}),E.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[E.jsxs("span",{className:Mn("relative flex h-2 w-2 shrink-0"),children:[e&&E.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-[#6CC24A] opacity-60"}),E.jsx("span",{className:Mn("relative inline-flex h-2 w-2 rounded-full",e?"bg-[#6CC24A]":"bg-red-400")})]}),E.jsxs("span",{className:"text-[11px] font-medium text-slate-400",children:[e?"Conectado":"Sin conexión"," · GomezLee Marketing"]})]})]})]}),E.jsxs("button",{onClick:t,className:"group inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-sm font-medium text-[#4F758B] shadow-sm transition-all hover:border-rose-200 hover:bg-rose-50 hover:text-rose-600 focus:outline-none focus:ring-2 focus:ring-[#6CC24A]/30","aria-label":"Cerrar sesión",children:[E.jsx(IM,{className:"h-4 w-4 transition-transform group-hover:translate-x-0.5"}),E.jsx("span",{className:"hidden sm:inline",children:"Cerrar sesión"})]})]})}),fu=[{id:"audio",number:1,title:"Nota de voz",hint:"Obligatorio. Graba una nota de voz explicando el brief.",required:!0},{id:"images",number:2,title:"Imágenes de referencia",hint:"Obligatorio. Adjunta una o varias imágenes de referencia.",required:!0},{id:"documents",number:3,title:"Documentos",hint:"Opcional. PDF, Excel, PowerPoint, Word y otros archivos.",required:!1},{id:"campaign",number:4,title:"Campaña / gráficos",hint:"Opcional. Piezas, artes, logos o lineamientos existentes.",required:!1},{id:"links",number:5,title:"Referencias online",hint:"Opcional. Pega enlaces, uno por línea.",required:!1},{id:"review",number:6,title:"Revisión y envío",hint:"Revisa todo y finaliza la solicitud desde aquí.",required:!0}],Wd=e=>{const t=Number.isFinite(e)?Math.max(0,e):0,i=Math.floor(t/60),a=t%60;return`${i}:${a.toString().padStart(2,"0")}`},Tz=e=>{if(!e)return"Pendiente";const[t,i,a]=e.split("-").map(Number);return!t||!i||!a?e:new Date(t,i-1,a).toLocaleDateString("es-DO",{day:"numeric",month:"long",year:"numeric"})},Ez=({onSendMessage:e,isProcessing:t})=>{const[i,a]=W.useState(""),[o,u]=W.useState([]),[c,d]=W.useState(!1),[p,m]=W.useState(0),[g,y]=W.useState(null),[v,x]=W.useState("audio"),[A,D]=W.useState(null),[R,C]=W.useState(null),[P,N]=W.useState(""),[q,Z]=W.useState(!1),[L,K]=W.useState(!1),[V,ne]=W.useState(0),re=W.useRef(null),ie=W.useRef(null),ae=W.useRef(null),be=W.useRef([]),ee=W.useRef(null),$=W.useRef(0),O=W.useRef([]),Q=W.useRef(null),J=W.useRef(null),fe=W.useMemo(()=>o.filter(se=>se.type==="image"&&se.category!=="campaign"),[o]),w=W.useMemo(()=>o.filter(se=>se.category!=="campaign"&&se.type!=="image"),[o]),k=W.useMemo(()=>o.filter(se=>se.category==="campaign"),[o]),F=W.useMemo(()=>i.split(`
`).map(se=>se.trim()).filter(Boolean).length,[i]),T=!!g&&fe.length>0,le=A!=="yes"||k.length>0,ce=!!P||q,ue=q?"Por confirmar":Tz(P),Ee=T&&le&&ce,Ve=(fu.findIndex(se=>se.id===v)+1)/fu.length*100;W.useEffect(()=>{O.current=o},[o]),W.useEffect(()=>{Q.current=g},[g]),W.useEffect(()=>{K(!1),ne(0),J.current&&(J.current.pause(),J.current.currentTime=0)},[g==null?void 0:g.url]),W.useEffect(()=>()=>{var se;O.current.forEach(B=>URL.revokeObjectURL(B.url)),(se=Q.current)!=null&&se.url&&URL.revokeObjectURL(Q.current.url),ee.current&&clearInterval(ee.current)},[]);const Se=async()=>{if(!(!J.current||!g)){if(L){J.current.pause(),K(!1),ne(Math.floor(J.current.currentTime||0));return}try{await J.current.play(),K(!0)}catch{K(!1),C("No se pudo reproducir la nota de voz. Intenta grabarla nuevamente.")}}},wt=se=>{switch(se){case"audio":return g?"done":v==="audio"?"active":"pending";case"images":return fe.length>0?"done":v==="images"?"active":"pending";case"documents":return w.length>0?"done":v==="documents"?"active":"pending";case"campaign":return A==="no"||A==="yes"&&k.length>0?"done":v==="campaign"?"active":"pending";case"links":return F>0?"done":v==="links"?"active":"pending";case"review":return v==="review"?"active":Ee?"done":"pending";default:return"pending"}},Nt=se=>se.type.startsWith("image/")?"image":se.type.startsWith("video/")?"video":se.type.startsWith("audio/")?"audio":se.type.includes("pdf")||se.type.includes("document")||se.type.includes("sheet")||se.type.includes("excel")||se.type.includes("powerpoint")||se.type.startsWith("text/")?"document":"other",un=()=>v==="campaign"?"campaign":"general",Ln=se=>{const B=Array.from(se.target.files||[]);if(!B.length)return;let te=B;v==="images"&&(te=B.filter(Ce=>Ce.type.startsWith("image/")),te.length!==B.length&&C("En este paso solo se permiten imágenes.")),v==="documents"&&(te=B.filter(Ce=>!Ce.type.startsWith("image/")&&!Ce.type.startsWith("audio/")),te.length!==B.length&&C("En este paso agrega documentos. Las imágenes y audios se omiten aquí.")),v==="campaign"&&(te=B.filter(Ce=>!Ce.type.startsWith("audio/")),te.length!==B.length&&C("En este paso adjunta piezas gráficas. Los audios se omiten aquí."));const ye=un(),ke=te.map(Ce=>({id:Math.random().toString(36).substring(7),file:Ce,type:Nt(Ce),url:URL.createObjectURL(Ce),category:ye}));u(Ce=>[...Ce,...ke]),te.length>0&&C(null),re.current&&(re.current.value="")},Rt=se=>{u(B=>{const te=B.find(ye=>ye.id===se);return te&&URL.revokeObjectURL(te.url),B.filter(ye=>ye.id!==se)})},wi=async()=>{try{const se=await navigator.mediaDevices.getUserMedia({audio:!0}),B=new MediaRecorder(se);ae.current=B,be.current=[],B.ondataavailable=te=>{te.data.size>0&&be.current.push(te.data)},B.onstop=()=>{const te=new Blob(be.current,{type:"audio/webm"}),ye=URL.createObjectURL(te);y({blob:te,url:ye,duration:$.current}),se.getTracks().forEach(ke=>ke.stop())},B.start(),C(null),d(!0),$.current=0,m(0),ee.current=window.setInterval(()=>{m(te=>{const ye=te+1;return $.current=ye,ye})},1e3)}catch{C("No se pudo acceder al micrófono. Revisa los permisos del navegador.")}},Ti=()=>{ae.current&&c&&(ae.current.stop(),d(!1),ee.current&&clearInterval(ee.current))},ea=()=>{J.current&&(J.current.pause(),J.current.currentTime=0),K(!1),ne(0),g!=null&&g.url&&URL.revokeObjectURL(g.url),y(null),$.current=0,m(0)},cn=se=>{x(se),C(null)},Ei=()=>{if(v==="audio"){if(!g){C("Debes grabar una nota de voz para continuar.");return}cn("images");return}if(v==="images"){if(fe.length===0){C("Debes adjuntar al menos una imagen de referencia para continuar.");return}cn("documents");return}if(v==="documents"){cn("campaign");return}if(v==="campaign"){if(A==="yes"&&k.length===0){C("Seleccionaste que sí existen elementos gráficos. Adjunta al menos un archivo para continuar.");return}cn("links");return}v==="links"&&cn("review")},Ai=()=>{const se=i.split(`
`).map(te=>te.trim()).filter(Boolean).join(`
`),B=["Solicitud enviada desde el portal guiado del Brief CDC.",`Nota de voz: ${g?"sí":"no"}`,`Imágenes de referencia: ${fe.length}`,`Documentos relacionados: ${w.length}`,`Fecha límite de entrega: ${ue}`,`Campaña o elementos gráficos existentes: ${A==="yes"?"sí":A==="no"?"no":"No indicado"}`,`Archivos de campaña / elementos gráficos: ${k.length}`];return se&&B.push("","Enlaces de referencia:",se),B.join(`
`)},vr=()=>{if(!T){C("Completa primero la nota de voz y al menos una imagen de referencia.");return}if(!le){C("Seleccionaste que sí existen elementos gráficos. Adjunta al menos un archivo antes de enviar.");return}if(v!=="review"){C("El envío solo está disponible en el paso final de revisión."),cn("review");return}if(!ce){C("Selecciona la fecha límite de entrega o marca la opción Por confirmar antes de enviar.");return}t||(e(Ai(),o,g||void 0,q?"":P,q?"pending":"defined"),a(""),u([]),J.current&&(J.current.pause(),J.current.currentTime=0),K(!1),ne(0),y(null),$.current=0,m(0),D(null),N(""),Z(!1),x("audio"),C(null))},xr=fu.find(se=>se.id===v),Sr=(g==null?void 0:g.duration)||0,Tt=se=>Mn("group relative flex flex-col justify-between overflow-hidden rounded-2xl border p-3.5 text-left transition-all cursor-pointer select-none",se==="done"&&"border-[#6CC24A]/30 bg-[#EEF6E8]",se==="active"&&"border-[#4F758B]/30 bg-[#EEF6E8]/60 shadow-[0_4px_20px_rgba(79,117,139,0.12)]",se==="pending"&&"border-slate-200/80 bg-white hover:border-[#4F758B]/20 hover:bg-slate-50/70");return E.jsxs("div",{className:"p-5 sm:p-6 lg:p-8 font-['Plus_Jakarta_Sans',sans-serif]",children:[E.jsxs("div",{className:"mb-6",children:[E.jsxs("div",{className:"mb-4 flex items-center justify-between gap-4",children:[E.jsx("div",{className:"flex-1 h-1.5 overflow-hidden rounded-full bg-slate-100",children:E.jsx(Fn.div,{className:"h-full rounded-full bg-gradient-to-r from-[#6CC24A] to-[#4F758B]",animate:{width:`${Ve}%`},transition:{type:"spring",stiffness:80,damping:18}})}),E.jsx("span",{className:"shrink-0 text-xs font-semibold text-[#4F758B]",children:Ee?"✓ Listo para enviar":`${Math.round(Ve)}%`})]}),E.jsx("div",{className:"grid gap-2 sm:grid-cols-3 xl:grid-cols-6",children:fu.map(se=>{const B=wt(se.id);return E.jsxs("button",{type:"button",onClick:()=>cn(se.id),className:Tt(B),children:[E.jsxs("div",{className:"flex items-center justify-between mb-2",children:[E.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-400",children:["Paso ",se.number]}),B==="done"?E.jsx(wM,{className:"h-3.5 w-3.5 text-[#6CC24A]"}):B==="active"?E.jsx("div",{className:"h-2.5 w-2.5 rounded-full bg-[#4F758B] shadow-[0_0_10px_rgba(79,117,139,0.5)]"}):E.jsx("div",{className:"h-2.5 w-2.5 rounded-full bg-slate-200"})]}),E.jsx("p",{className:Mn("text-xs font-semibold leading-tight",B==="done"||B==="active"?"text-[#4F758B]":"text-slate-500"),children:se.title})]},se.id)})})]}),E.jsxs("div",{className:"grid gap-5 lg:grid-cols-[1fr_280px]",children:[E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(LS,{children:(o.length>0||g)&&E.jsxs(Fn.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"grid gap-2.5 sm:grid-cols-2 xl:grid-cols-3",children:[g&&E.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-[#4F758B]/20 bg-[#EEF6E8]/50 p-4 sm:col-span-2 xl:col-span-3",children:[E.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-[#4F758B]/20 bg-white shadow-sm",children:E.jsx(Rv,{className:"h-5 w-5 text-[#4F758B]"})}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-semibold text-[#4F758B]",children:"Nota de voz"}),E.jsxs("p",{className:"text-xs text-slate-400",children:["Duración: ",Wd(g.duration)]})]})]}),E.jsx("div",{className:"w-full rounded-xl border border-slate-200 bg-white p-3 sm:max-w-[480px]",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("button",{type:"button",onClick:Se,className:"glm-audio-preview-toggle flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#4F758B] text-white shadow-[0_6px_16px_rgba(79,117,139,0.25)] transition hover:scale-105","aria-label":L?"Pausar":"Reproducir",children:L?E.jsx(QS,{className:"h-4 w-4 fill-current"}):E.jsx(WS,{className:"ml-0.5 h-4 w-4 fill-current"})}),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsxs("div",{className:"flex justify-between text-xs text-slate-400 mb-1.5",children:[E.jsx("span",{children:L?"Reproduciendo…":"Reproducir"}),E.jsxs("span",{className:"font-mono",children:[Wd(V)," / ",Wd(Sr)]})]}),E.jsx("input",{type:"range",min:"0",max:Math.max(1,Sr),step:"1",value:Math.min(V,Sr||0),onChange:se=>{const B=Number(se.target.value);ne(B),J.current&&(J.current.currentTime=B)},className:"audio-preview-range w-full cursor-pointer","aria-label":"Posición de la nota de voz"})]}),E.jsx("audio",{ref:J,src:g.url,preload:"metadata",onTimeUpdate:se=>ne(Math.floor(se.currentTarget.currentTime||0)),onEnded:()=>{K(!1),ne(0),J.current&&(J.current.currentTime=0)},onPause:se=>{K(!1),ne(Math.floor(se.currentTarget.currentTime||0))},onPlay:()=>K(!0),className:"hidden"})]})})]}),E.jsx("button",{onClick:ea,className:"absolute right-3 top-3 flex h-7 w-7 items-center justify-center rounded-full bg-slate-100 text-slate-500 transition hover:bg-rose-100 hover:text-rose-500","aria-label":"Eliminar nota de voz",children:E.jsx(jh,{className:"h-3.5 w-3.5"})})]}),o.map(se=>E.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-slate-200 bg-white p-3.5",children:[E.jsxs("div",{className:"flex items-center gap-3",children:[se.type==="image"?E.jsx("div",{className:"h-14 w-14 overflow-hidden rounded-xl border border-slate-100",children:E.jsx("img",{src:se.url,alt:"preview",className:"h-full w-full object-cover"})}):E.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-xl border border-slate-100 bg-slate-50",children:E.jsx(MM,{className:"h-5 w-5 text-slate-400"})}),E.jsxs("div",{className:"min-w-0 flex-1 pr-6",children:[E.jsx("p",{className:"truncate text-sm font-medium text-slate-700",children:se.file.name}),E.jsx("p",{className:"mt-0.5 text-xs text-slate-400",children:se.category==="campaign"?"Campaña / gráfico":se.type==="image"?"Imagen de referencia":"Documento"})]})]}),E.jsx("button",{onClick:()=>Rt(se.id),className:"absolute right-3 top-3 flex h-7 w-7 items-center justify-center rounded-full bg-slate-100 text-slate-400 transition hover:bg-rose-100 hover:text-rose-500","aria-label":"Eliminar archivo",children:E.jsx(jh,{className:"h-3.5 w-3.5"})})]},se.id))]})}),E.jsxs("div",{className:"rounded-2xl border border-slate-200/80 bg-white p-5 shadow-[0_2px_12px_rgba(79,117,139,0.06)]",children:[E.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2.5",children:[E.jsxs("span",{className:"rounded-full border border-[#4F758B]/25 bg-[#EEF6E8] px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-[#4F758B]",children:["Paso ",xr.number]}),E.jsx("h3",{className:"text-base font-bold text-slate-700",children:xr.title}),E.jsx("span",{className:"text-xs text-slate-400",children:xr.hint})]}),v==="audio"&&E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-sm leading-relaxed text-slate-500",children:"Graba una nota de voz explicando el brief. Incluye país, cliente, marca, tipo de requerimiento, objetivos, entregables, presupuesto y fechas clave."}),E.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[E.jsxs("button",{onClick:c?Ti:wi,disabled:t,className:Mn("inline-flex items-center gap-2 rounded-xl px-5 py-3 text-sm font-semibold transition-all",c?"bg-rose-50 border border-rose-200 text-rose-600 hover:bg-rose-100":"border border-slate-200 bg-white text-slate-700 hover:border-[#4F758B]/30 hover:bg-slate-50 disabled:opacity-50"),children:[c?E.jsx(QM,{className:"h-4 w-4 fill-current"}):E.jsx(Rv,{className:"h-4 w-4"}),c?`Detener (${p}s)`:"Grabar nota de voz"]}),g&&E.jsx("span",{className:"text-sm font-medium text-[#6CC24A]",children:"✓ Nota de voz lista"})]})]}),v==="images"&&E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-sm leading-relaxed text-slate-500",children:"Adjunta una o varias imágenes de referencia. Este paso es obligatorio para continuar."}),E.jsxs("button",{onClick:()=>{var se;return(se=re.current)==null?void 0:se.click()},disabled:t||c,className:"inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-5 py-3 text-sm font-semibold text-slate-700 transition hover:border-[#4F758B]/30 hover:bg-slate-50 disabled:opacity-50",children:[E.jsx(RM,{className:"h-4 w-4"})," Agregar imágenes"]})]}),v==="documents"&&E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-sm leading-relaxed text-slate-500",children:"Adjunta documentos de apoyo: PDF, Excel, PowerPoint, Word y otros materiales. Este paso es opcional."}),E.jsxs("button",{onClick:()=>{var se;return(se=re.current)==null?void 0:se.click()},disabled:t||c,className:"inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-5 py-3 text-sm font-semibold text-slate-700 transition hover:border-[#4F758B]/30 hover:bg-slate-50 disabled:opacity-50",children:[E.jsx(Ov,{className:"h-4 w-4"})," Agregar documentos"]})]}),v==="campaign"&&E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-sm leading-relaxed text-slate-500",children:"¿Ya existe campaña o elementos gráficos? Adjúntalos aquí para evitar retrabajo."}),E.jsx("div",{className:"mb-4 flex flex-wrap gap-2.5",children:[{value:"yes",label:"Sí, adjuntar elementos"},{value:"no",label:"No, continuar sin piezas"}].map(se=>E.jsx("button",{type:"button",onClick:()=>{D(se.value),C(null)},disabled:t||c,className:Mn("rounded-xl border px-4 py-2.5 text-sm font-semibold transition",A===se.value?"border-[#4F758B]/30 bg-[#EEF6E8] text-[#4F758B]":"border-slate-200 bg-white text-slate-600 hover:border-[#4F758B]/20 hover:bg-slate-50"),children:se.label},se.value))}),A==="yes"&&E.jsxs("button",{onClick:()=>{var se;return(se=re.current)==null?void 0:se.click()},disabled:t||c,className:"inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-5 py-3 text-sm font-semibold text-slate-700 transition hover:border-[#4F758B]/30 hover:bg-slate-50 disabled:opacity-50",children:[E.jsx(Ov,{className:"h-4 w-4"})," Adjuntar campaña o gráficos"]})]}),v==="links"&&E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-sm leading-relaxed text-slate-500",children:"Pega enlaces de referencia online, uno por línea. Este paso es opcional."}),E.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50/50 px-4 py-3 transition-colors focus-within:border-[#4F758B]/40 focus-within:bg-white",children:[E.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-slate-400",children:[E.jsx(zM,{className:"h-3.5 w-3.5"})," Referencias online"]}),E.jsx("textarea",{ref:ie,value:i,onChange:se=>a(se.target.value),placeholder:`https://www.figma.com/...
https://drive.google.com/...`,className:"h-36 w-full resize-none bg-transparent text-sm leading-relaxed text-slate-700 placeholder:text-slate-300 outline-none scrollbar-thin",disabled:t})]})]}),v==="review"&&E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-sm leading-relaxed text-slate-500",children:"Revisa el resumen antes de enviar. Solo puedes finalizar desde este paso."}),E.jsx("div",{className:"mb-4 rounded-xl border border-[#4F758B]/20 bg-[#EEF6E8]/50 p-4",children:E.jsxs("label",{htmlFor:"delivery-date",className:"flex flex-col gap-1.5",children:[E.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-[#4F758B]",children:"Fecha límite de entrega"}),E.jsx("span",{className:"text-xs text-slate-500",children:"Indica para cuándo debe entregarse esta solicitud."}),E.jsx("input",{id:"delivery-date",type:"date",value:P,onChange:se=>{N(se.target.value),se.target.value&&(Z(!1),C(null))},disabled:t||q,className:"mt-1.5 w-full rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-sm font-semibold text-slate-700 outline-none transition focus:border-[#4F758B]/50 disabled:opacity-60 sm:max-w-xs"}),E.jsxs("label",{className:"mt-2 flex w-fit cursor-pointer items-center gap-2.5 rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-sm text-slate-600 transition hover:border-[#4F758B]/20 hover:bg-slate-50",children:[E.jsx("input",{type:"checkbox",checked:q,onChange:se=>{const B=se.target.checked;Z(B),B&&(N(""),C(null))},disabled:t,className:"h-4 w-4 rounded border-slate-300 text-[#4F758B] focus:ring-[#4F758B]/30"}),E.jsx("span",{children:"Por confirmar"})]})]})}),E.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-2",children:[E.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-4",children:[E.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3",children:"Obligatorios"}),E.jsxs("div",{className:"space-y-2 text-sm",children:[E.jsxs("div",{className:"flex justify-between",children:[E.jsx("span",{className:"text-slate-500",children:"Nota de voz"}),E.jsx("span",{className:g?"font-semibold text-[#6CC24A]":"text-amber-500",children:g?"Lista":"Pendiente"})]}),E.jsxs("div",{className:"flex justify-between",children:[E.jsx("span",{className:"text-slate-500",children:"Imágenes"}),E.jsx("span",{className:fe.length?"font-semibold text-[#6CC24A]":"text-amber-500",children:fe.length||"Pendiente"})]}),E.jsxs("div",{className:"flex justify-between",children:[E.jsx("span",{className:"text-slate-500",children:"Fecha de entrega"}),E.jsx("span",{className:ce?"font-semibold text-[#6CC24A]":"text-amber-500",children:ce?ue:"Pendiente"})]})]})]}),E.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-4",children:[E.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3",children:"Opcionales"}),E.jsxs("div",{className:"space-y-2 text-sm",children:[E.jsxs("div",{className:"flex justify-between",children:[E.jsx("span",{className:"text-slate-500",children:"Documentos"}),E.jsx("span",{className:"font-semibold text-slate-700",children:w.length})]}),E.jsxs("div",{className:"flex justify-between",children:[E.jsx("span",{className:"text-slate-500",children:"Campaña / gráficos"}),E.jsx("span",{className:"font-semibold text-slate-700",children:A==="yes"?`${k.length} archivo(s)`:A==="no"?"No aplica":"—"})]}),E.jsxs("div",{className:"flex justify-between",children:[E.jsx("span",{className:"text-slate-500",children:"Enlaces"}),E.jsx("span",{className:"font-semibold text-slate-700",children:F})]})]})]})]})]}),E.jsx("input",{type:"file",multiple:!0,className:"hidden",ref:re,onChange:Ln,accept:v==="images"?"image/*":void 0}),R&&E.jsxs("div",{className:"mt-4 flex items-start gap-2.5 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700",children:[E.jsx(Lh,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-500"}),E.jsx("span",{children:R})]}),E.jsxs("div",{className:"mt-5 flex flex-wrap items-center justify-end gap-2.5 border-t border-slate-100 pt-4",children:[v!=="review"&&E.jsxs("button",{onClick:Ei,disabled:t,className:"inline-flex items-center gap-2 rounded-xl border border-[#4F758B]/25 bg-[#EEF6E8] px-5 py-2.5 text-sm font-semibold text-[#4F758B] transition hover:bg-[#4F758B] hover:text-white disabled:opacity-50",children:["Continuar ",E.jsx(vM,{className:"h-4 w-4"})]}),v==="review"&&E.jsxs("button",{onClick:vr,disabled:t||!Ee,className:"glm-submit-final shimmer-btn inline-flex items-center gap-2 rounded-xl bg-gradient-to-r from-[#4F758B] to-[#5B7F95] px-6 py-2.5 text-sm font-semibold text-white shadow-[0_8px_20px_rgba(79,117,139,0.2)] transition hover:shadow-[0_10px_28px_rgba(79,117,139,0.3)] disabled:cursor-not-allowed disabled:opacity-60",children:[t?E.jsx(Om,{className:"h-4 w-4 animate-spin"}):E.jsx(GM,{className:"h-4 w-4"}),"Finalizar y enviar"]})]})]})]}),E.jsxs("aside",{className:"flex flex-col gap-3",children:[E.jsxs("div",{className:"rounded-2xl border border-slate-200/80 bg-white p-4 shadow-[0_2px_12px_rgba(79,117,139,0.06)]",children:[E.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-400 mb-3",children:"Estado del brief"}),E.jsxs("div",{className:"space-y-2.5",children:[[{label:"Nota de voz",done:!!g,value:g?"Lista":"Pendiente"},{label:"Imágenes",done:fe.length>0,value:fe.length>0?`${fe.length} cargada(s)`:"Pendiente"},{label:"Fecha de entrega",done:ce,value:ce?ue:"Pendiente"}].map(se=>E.jsxs("div",{className:"flex items-center justify-between gap-2 text-sm",children:[E.jsx("span",{className:"text-slate-500",children:se.label}),E.jsx("span",{className:Mn("text-right font-semibold text-xs",se.done?"text-[#6CC24A]":"text-slate-300"),children:se.value})]},se.label)),E.jsx("div",{className:"border-t border-slate-100 pt-2.5 space-y-2.5",children:[{label:"Documentos",value:String(w.length)},{label:"Campaña / gráficos",value:A==="yes"?String(k.length):A==="no"?"No aplica":"—"},{label:"Enlaces",value:String(F)}].map(se=>E.jsxs("div",{className:"flex items-center justify-between gap-2 text-sm",children:[E.jsx("span",{className:"text-slate-400",children:se.label}),E.jsx("span",{className:"font-semibold text-slate-500 text-xs",children:se.value})]},se.label))})]})]}),E.jsxs("div",{className:"rounded-2xl border border-[#6CC24A]/20 bg-[#EEF6E8]/60 p-4",children:[E.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-[#4F758B] mb-2.5",children:"Cómo se procesa"}),E.jsxs("ul",{className:"space-y-2 text-xs leading-relaxed text-slate-500",children:[E.jsxs("li",{className:"flex gap-2",children:[E.jsx("span",{className:"mt-0.5 h-1.5 w-1.5 shrink-0 rounded-full bg-[#6CC24A]"}),"La voz, las imágenes y los PDFs alimentan el brief."]}),E.jsxs("li",{className:"flex gap-2",children:[E.jsx("span",{className:"mt-0.5 h-1.5 w-1.5 shrink-0 rounded-full bg-[#6CC24A]"}),"Los documentos se guardan en la carpeta del proyecto."]}),E.jsxs("li",{className:"flex gap-2",children:[E.jsx("span",{className:"mt-0.5 h-1.5 w-1.5 shrink-0 rounded-full bg-[#6CC24A]"}),"Los enlaces se agregan como referencias en el brief final."]})]})]})]})]})]})},tT=6048e5,Az=864e5,mx=Symbol.for("constructDateFrom");function hr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&mx in e?e[mx](t):e instanceof Date?new e.constructor(t):new Date(t)}function zn(e,t){return hr(t||e,e)}let Cz={};function ic(){return Cz}function _o(e,t){var d,p,m,g;const i=ic(),a=(t==null?void 0:t.weekStartsOn)??((p=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??i.weekStartsOn??((g=(m=i.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,o=zn(e,t==null?void 0:t.in),u=o.getDay(),c=(u<a?7:0)+u-a;return o.setDate(o.getDate()-c),o.setHours(0,0,0,0),o}function Yu(e,t){return _o(e,{...t,weekStartsOn:1})}function nT(e,t){const i=zn(e,t==null?void 0:t.in),a=i.getFullYear(),o=hr(i,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const u=Yu(o),c=hr(i,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const d=Yu(c);return i.getTime()>=u.getTime()?a+1:i.getTime()>=d.getTime()?a:a-1}function px(e){const t=zn(e),i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return i.setUTCFullYear(t.getFullYear()),+e-+i}function _z(e,...t){const i=hr.bind(null,t.find(a=>typeof a=="object"));return t.map(i)}function gx(e,t){const i=zn(e,t==null?void 0:t.in);return i.setHours(0,0,0,0),i}function kz(e,t,i){const[a,o]=_z(i==null?void 0:i.in,e,t),u=gx(a),c=gx(o),d=+u-px(u),p=+c-px(c);return Math.round((d-p)/Az)}function Dz(e,t){const i=nT(e,t),a=hr(e,0);return a.setFullYear(i,0,4),a.setHours(0,0,0,0),Yu(a)}function Mz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Nz(e){return!(!Mz(e)&&typeof e!="number"||isNaN(+zn(e)))}function Rz(e,t){const i=zn(e,t==null?void 0:t.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}const Oz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zz=(e,t,i)=>{let a;const o=Oz[e];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+a:a+" ago":a};function Zd(e){return(t={})=>{const i=t.width?String(t.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}const Lz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Iz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bz={date:Zd({formats:Lz,defaultWidth:"full"}),time:Zd({formats:jz,defaultWidth:"full"}),dateTime:Zd({formats:Iz,defaultWidth:"full"})},Uz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pz=(e,t,i,a)=>Uz[e];function ro(e){return(t,i)=>{const a=i!=null&&i.context?String(i.context):"standalone";let o;if(a==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,d=i!=null&&i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{const c=e.defaultWidth,d=i!=null&&i.width?String(i.width):e.defaultWidth;o=e.values[d]||e.values[c]}const u=e.argumentCallback?e.argumentCallback(t):t;return o[u]}}const Vz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Hz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Gz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Yz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xz=(e,t)=>{const i=Number(e),a=i%100;if(a>20||a<10)switch(a%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},Kz={ordinalNumber:Xz,era:ro({values:Vz,defaultWidth:"wide"}),quarter:ro({values:Hz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ro({values:Fz,defaultWidth:"wide"}),day:ro({values:qz,defaultWidth:"wide"}),dayPeriod:ro({values:Gz,defaultWidth:"wide",formattingValues:Yz,defaultFormattingWidth:"wide"})};function ao(e){return(t,i={})=>{const a=i.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],u=t.match(o);if(!u)return null;const c=u[0],d=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],p=Array.isArray(d)?Wz(d,y=>y.test(c)):Qz(d,y=>y.test(c));let m;m=e.valueCallback?e.valueCallback(p):p,m=i.valueCallback?i.valueCallback(m):m;const g=t.slice(c.length);return{value:m,rest:g}}}function Qz(e,t){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t(e[i]))return i}function Wz(e,t){for(let i=0;i<e.length;i++)if(t(e[i]))return i}function Zz(e){return(t,i={})=>{const a=t.match(e.matchPattern);if(!a)return null;const o=a[0],u=t.match(e.parsePattern);if(!u)return null;let c=e.valueCallback?e.valueCallback(u[0]):u[0];c=i.valueCallback?i.valueCallback(c):c;const d=t.slice(o.length);return{value:c,rest:d}}}const $z=/^(\d+)(th|st|nd|rd)?/i,Jz=/\d+/i,e4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},t4={any:[/^b/i,/^(a|c)/i]},n4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},i4={any:[/1/i,/2/i,/3/i,/4/i]},r4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},a4={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},s4={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},o4={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},l4={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},u4={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},c4={ordinalNumber:Zz({matchPattern:$z,parsePattern:Jz,valueCallback:e=>parseInt(e,10)}),era:ao({matchPatterns:e4,defaultMatchWidth:"wide",parsePatterns:t4,defaultParseWidth:"any"}),quarter:ao({matchPatterns:n4,defaultMatchWidth:"wide",parsePatterns:i4,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ao({matchPatterns:r4,defaultMatchWidth:"wide",parsePatterns:a4,defaultParseWidth:"any"}),day:ao({matchPatterns:s4,defaultMatchWidth:"wide",parsePatterns:o4,defaultParseWidth:"any"}),dayPeriod:ao({matchPatterns:l4,defaultMatchWidth:"any",parsePatterns:u4,defaultParseWidth:"any"})},f4={code:"en-US",formatDistance:zz,formatLong:Bz,formatRelative:Pz,localize:Kz,match:c4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function d4(e,t){const i=zn(e,t==null?void 0:t.in);return kz(i,Rz(i))+1}function h4(e,t){const i=zn(e,t==null?void 0:t.in),a=+Yu(i)-+Dz(i);return Math.round(a/tT)+1}function iT(e,t){var g,y,v,x;const i=zn(e,t==null?void 0:t.in),a=i.getFullYear(),o=ic(),u=(t==null?void 0:t.firstWeekContainsDate)??((y=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)??o.firstWeekContainsDate??((x=(v=o.locale)==null?void 0:v.options)==null?void 0:x.firstWeekContainsDate)??1,c=hr((t==null?void 0:t.in)||e,0);c.setFullYear(a+1,0,u),c.setHours(0,0,0,0);const d=_o(c,t),p=hr((t==null?void 0:t.in)||e,0);p.setFullYear(a,0,u),p.setHours(0,0,0,0);const m=_o(p,t);return+i>=+d?a+1:+i>=+m?a:a-1}function m4(e,t){var d,p,m,g;const i=ic(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((g=(m=i.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,o=iT(e,t),u=hr((t==null?void 0:t.in)||e,0);return u.setFullYear(o,0,a),u.setHours(0,0,0,0),_o(u,t)}function p4(e,t){const i=zn(e,t==null?void 0:t.in),a=+_o(i,t)-+m4(i,t);return Math.round(a/tT)+1}function qe(e,t){const i=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return i+a}const er={y(e,t){const i=e.getFullYear(),a=i>0?i:1-i;return qe(t==="yy"?a%100:a,t.length)},M(e,t){const i=e.getMonth();return t==="M"?String(i+1):qe(i+1,2)},d(e,t){return qe(e.getDate(),t.length)},a(e,t){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h(e,t){return qe(e.getHours()%12||12,t.length)},H(e,t){return qe(e.getHours(),t.length)},m(e,t){return qe(e.getMinutes(),t.length)},s(e,t){return qe(e.getSeconds(),t.length)},S(e,t){const i=t.length,a=e.getMilliseconds(),o=Math.trunc(a*Math.pow(10,i-3));return qe(o,t.length)}},Ua={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yx={G:function(e,t,i){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(a,{width:"abbreviated"});case"GGGGG":return i.era(a,{width:"narrow"});case"GGGG":default:return i.era(a,{width:"wide"})}},y:function(e,t,i){if(t==="yo"){const a=e.getFullYear(),o=a>0?a:1-a;return i.ordinalNumber(o,{unit:"year"})}return er.y(e,t)},Y:function(e,t,i,a){const o=iT(e,a),u=o>0?o:1-o;if(t==="YY"){const c=u%100;return qe(c,2)}return t==="Yo"?i.ordinalNumber(u,{unit:"year"}):qe(u,t.length)},R:function(e,t){const i=nT(e);return qe(i,t.length)},u:function(e,t){const i=e.getFullYear();return qe(i,t.length)},Q:function(e,t,i){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return qe(a,2);case"Qo":return i.ordinalNumber(a,{unit:"quarter"});case"QQQ":return i.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,i){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return qe(a,2);case"qo":return i.ordinalNumber(a,{unit:"quarter"});case"qqq":return i.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,i){const a=e.getMonth();switch(t){case"M":case"MM":return er.M(e,t);case"Mo":return i.ordinalNumber(a+1,{unit:"month"});case"MMM":return i.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,i){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return qe(a+1,2);case"Lo":return i.ordinalNumber(a+1,{unit:"month"});case"LLL":return i.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,i,a){const o=p4(e,a);return t==="wo"?i.ordinalNumber(o,{unit:"week"}):qe(o,t.length)},I:function(e,t,i){const a=h4(e);return t==="Io"?i.ordinalNumber(a,{unit:"week"}):qe(a,t.length)},d:function(e,t,i){return t==="do"?i.ordinalNumber(e.getDate(),{unit:"date"}):er.d(e,t)},D:function(e,t,i){const a=d4(e);return t==="Do"?i.ordinalNumber(a,{unit:"dayOfYear"}):qe(a,t.length)},E:function(e,t,i){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return i.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(a,{width:"short",context:"formatting"});case"EEEE":default:return i.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,i,a){const o=e.getDay(),u=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(u);case"ee":return qe(u,2);case"eo":return i.ordinalNumber(u,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,i,a){const o=e.getDay(),u=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(u);case"cc":return qe(u,t.length);case"co":return i.ordinalNumber(u,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,i){const a=e.getDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return qe(o,t.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(a,{width:"short",context:"formatting"});case"iiii":default:return i.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,i){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,i){const a=e.getHours();let o;switch(a===12?o=Ua.noon:a===0?o=Ua.midnight:o=a/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,i){const a=e.getHours();let o;switch(a>=17?o=Ua.evening:a>=12?o=Ua.afternoon:a>=4?o=Ua.morning:o=Ua.night,t){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,i){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),i.ordinalNumber(a,{unit:"hour"})}return er.h(e,t)},H:function(e,t,i){return t==="Ho"?i.ordinalNumber(e.getHours(),{unit:"hour"}):er.H(e,t)},K:function(e,t,i){const a=e.getHours()%12;return t==="Ko"?i.ordinalNumber(a,{unit:"hour"}):qe(a,t.length)},k:function(e,t,i){let a=e.getHours();return a===0&&(a=24),t==="ko"?i.ordinalNumber(a,{unit:"hour"}):qe(a,t.length)},m:function(e,t,i){return t==="mo"?i.ordinalNumber(e.getMinutes(),{unit:"minute"}):er.m(e,t)},s:function(e,t,i){return t==="so"?i.ordinalNumber(e.getSeconds(),{unit:"second"}):er.s(e,t)},S:function(e,t){return er.S(e,t)},X:function(e,t,i){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return vx(a);case"XXXX":case"XX":return qr(a);case"XXXXX":case"XXX":default:return qr(a,":")}},x:function(e,t,i){const a=e.getTimezoneOffset();switch(t){case"x":return vx(a);case"xxxx":case"xx":return qr(a);case"xxxxx":case"xxx":default:return qr(a,":")}},O:function(e,t,i){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bx(a,":");case"OOOO":default:return"GMT"+qr(a,":")}},z:function(e,t,i){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bx(a,":");case"zzzz":default:return"GMT"+qr(a,":")}},t:function(e,t,i){const a=Math.trunc(+e/1e3);return qe(a,t.length)},T:function(e,t,i){return qe(+e,t.length)}};function bx(e,t=""){const i=e>0?"-":"+",a=Math.abs(e),o=Math.trunc(a/60),u=a%60;return u===0?i+String(o):i+String(o)+t+qe(u,2)}function vx(e,t){return e%60===0?(e>0?"-":"+")+qe(Math.abs(e)/60,2):qr(e,t)}function qr(e,t=""){const i=e>0?"-":"+",a=Math.abs(e),o=qe(Math.trunc(a/60),2),u=qe(a%60,2);return i+o+t+u}const xx=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},rT=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},g4=(e,t)=>{const i=e.match(/(P+)(p+)?/)||[],a=i[1],o=i[2];if(!o)return xx(e,t);let u;switch(a){case"P":u=t.dateTime({width:"short"});break;case"PP":u=t.dateTime({width:"medium"});break;case"PPP":u=t.dateTime({width:"long"});break;case"PPPP":default:u=t.dateTime({width:"full"});break}return u.replace("{{date}}",xx(a,t)).replace("{{time}}",rT(o,t))},y4={p:rT,P:g4},b4=/^D+$/,v4=/^Y+$/,x4=["D","DD","YY","YYYY"];function S4(e){return b4.test(e)}function w4(e){return v4.test(e)}function T4(e,t,i){const a=E4(e,t,i);if(console.warn(a),x4.includes(e))throw new RangeError(a)}function E4(e,t,i){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const A4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,C4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_4=/^'([^]*?)'?$/,k4=/''/g,D4=/[a-zA-Z]/;function M4(e,t,i){var g,y,v,x;const a=ic(),o=a.locale??f4,u=a.firstWeekContainsDate??((y=(g=a.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)??1,c=a.weekStartsOn??((x=(v=a.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,d=zn(e,i==null?void 0:i.in);if(!Nz(d))throw new RangeError("Invalid time value");let p=t.match(C4).map(A=>{const D=A[0];if(D==="p"||D==="P"){const R=y4[D];return R(A,o.formatLong)}return A}).join("").match(A4).map(A=>{if(A==="''")return{isToken:!1,value:"'"};const D=A[0];if(D==="'")return{isToken:!1,value:N4(A)};if(yx[D])return{isToken:!0,value:A};if(D.match(D4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");return{isToken:!1,value:A}});o.localize.preprocessor&&(p=o.localize.preprocessor(d,p));const m={firstWeekContainsDate:u,weekStartsOn:c,locale:o};return p.map(A=>{if(!A.isToken)return A.value;const D=A.value;(w4(D)||S4(D))&&T4(D,t,String(e));const R=yx[D[0]];return R(d,D,o.localize,m)}).join("")}function N4(e){const t=e.match(_4);return t?t[1].replace(k4,"'"):e}function R4(e,t){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const O4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L4={};function Sx(e,t){return(L4.jsx?z4:O4).test(e)}const j4=/[ \t\n\f\r]/g;function I4(e){return typeof e=="object"?e.type==="text"?wx(e.value):!1:wx(e)}function wx(e){return e.replace(j4,"")===""}class Uo{constructor(t,i,a){this.normal=i,this.property=t,a&&(this.space=a)}}Uo.prototype.normal={};Uo.prototype.property={};Uo.prototype.space=void 0;function aT(e,t){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new Uo(i,a,t)}function Yh(e){return e.toLowerCase()}class Wt{constructor(t,i){this.attribute=i,this.property=t}}Wt.prototype.attribute="";Wt.prototype.booleanish=!1;Wt.prototype.boolean=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.defined=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.number=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.property="";Wt.prototype.spaceSeparated=!1;Wt.prototype.space=void 0;let B4=0;const Me=Jr(),mt=Jr(),Xh=Jr(),oe=Jr(),$e=Jr(),Wa=Jr(),sn=Jr();function Jr(){return 2**++B4}const Kh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:mt,commaOrSpaceSeparated:sn,commaSeparated:Wa,number:oe,overloadedBoolean:Xh,spaceSeparated:$e},Symbol.toStringTag,{value:"Module"})),$d=Object.keys(Kh);class Qm extends Wt{constructor(t,i,a,o){let u=-1;if(super(t,i),Tx(this,"space",o),typeof a=="number")for(;++u<$d.length;){const c=$d[u];Tx(this,$d[u],(a&Kh[c])===Kh[c])}}}Qm.prototype.defined=!0;function Tx(e,t,i){i&&(e[t]=i)}function os(e){const t={},i={};for(const[a,o]of Object.entries(e.properties)){const u=new Qm(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),t[a]=u,i[Yh(a)]=a,i[Yh(u.attribute)]=a}return new Uo(t,i,e.space)}const sT=os({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:$e,ariaCurrent:null,ariaDescribedBy:$e,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:$e,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:$e,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$e,ariaLevel:oe,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:$e,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:$e,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:mt,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function oT(e,t){return t in e?e[t]:t}function lT(e,t){return oT(e,t.toLowerCase())}const U4=os({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wa,acceptCharset:$e,accessKey:$e,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:$e,autoFocus:Me,autoPlay:Me,blocking:$e,capture:null,charSet:null,checked:Me,cite:null,className:$e,cols:oe,colSpan:null,content:null,contentEditable:mt,controls:Me,controlsList:$e,coords:oe|Wa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Xh,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:$e,height:oe,hidden:Xh,high:oe,href:null,hrefLang:null,htmlFor:$e,httpEquiv:$e,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:$e,itemRef:$e,itemScope:Me,itemType:$e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Me,optimum:oe,pattern:null,ping:$e,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:$e,required:Me,reversed:Me,rows:oe,rowSpan:oe,sandbox:$e,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:mt,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$e,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:lT}),P4=os({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sn,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,className:$e,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wa,g2:Wa,glyphName:Wa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:oe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sn,rev:sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sn,requiredFeatures:sn,requiredFonts:sn,requiredFormats:sn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sn,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:oT}),uT=os({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cT=os({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lT}),fT=os({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),V4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},H4=/[A-Z]/g,Ex=/-[a-z]/g,F4=/^data[-\w.:]+$/i;function q4(e,t){const i=Yh(t);let a=t,o=Wt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&F4.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Ex,Y4);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Ex.test(u)){let c=u.replace(H4,G4);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=Qm}return new o(a,t)}function G4(e){return"-"+e.toLowerCase()}function Y4(e){return e.charAt(1).toUpperCase()}const X4=aT([sT,U4,uT,cT,fT],"html"),Wm=aT([sT,P4,uT,cT,fT],"svg");function K4(e){return e.join(" ").trim()}var Pa={},Jd,Ax;function Q4(){if(Ax)return Jd;Ax=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
`,m="/",g="*",y="",v="comment",x="declaration";function A(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var P=1,N=1;function q(ee){var $=ee.match(t);$&&(P+=$.length);var O=ee.lastIndexOf(p);N=~O?ee.length-O:N+ee.length}function Z(){var ee={line:P,column:N};return function($){return $.position=new L(ee),ne(),$}}function L(ee){this.start=ee,this.end={line:P,column:N},this.source=C.source}L.prototype.content=R;function K(ee){var $=new Error(C.source+":"+P+":"+N+": "+ee);if($.reason=ee,$.filename=C.source,$.line=P,$.column=N,$.source=R,!C.silent)throw $}function V(ee){var $=ee.exec(R);if($){var O=$[0];return q(O),R=R.slice(O.length),$}}function ne(){V(i)}function re(ee){var $;for(ee=ee||[];$=ie();)$!==!1&&ee.push($);return ee}function ie(){var ee=Z();if(!(m!=R.charAt(0)||g!=R.charAt(1))){for(var $=2;y!=R.charAt($)&&(g!=R.charAt($)||m!=R.charAt($+1));)++$;if($+=2,y===R.charAt($-1))return K("End of comment missing");var O=R.slice(2,$-2);return N+=2,q(O),R=R.slice($),N+=2,ee({type:v,comment:O})}}function ae(){var ee=Z(),$=V(a);if($){if(ie(),!V(o))return K("property missing ':'");var O=V(u),Q=ee({type:x,property:D($[0].replace(e,y)),value:O?D(O[0].replace(e,y)):y});return V(c),Q}}function be(){var ee=[];re(ee);for(var $;$=ae();)$!==!1&&(ee.push($),re(ee));return ee}return ne(),be()}function D(R){return R?R.replace(d,y):y}return Jd=A,Jd}var Cx;function W4(){if(Cx)return Pa;Cx=1;var e=Pa&&Pa.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.default=i;const t=e(Q4());function i(a,o){let u=null;if(!a||typeof a!="string")return u;const c=(0,t.default)(a),d=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:g}=p;d?o(m,g,p):g&&(u=u||{},u[m]=g)}),u}return Pa}var so={},_x;function Z4(){if(_x)return so;_x=1,Object.defineProperty(so,"__esModule",{value:!0}),so.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(m){return!m||i.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},d=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),u(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(o,d):m=m.replace(a,d),m.replace(t,c))};return so.camelCase=p,so}var oo,kx;function $4(){if(kx)return oo;kx=1;var e=oo&&oo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(W4()),i=Z4();function a(o,u){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(d,p){d&&p&&(c[(0,i.camelCase)(d,u)]=p)}),c}return a.default=a,oo=a,oo}var J4=$4();const e5=nm(J4),dT=hT("end"),Zm=hT("start");function hT(e){return t;function t(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function t5(e){const t=Zm(e),i=dT(e);if(t&&i)return{start:t,end:i}}function yo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Dx(e.position):"start"in e||"end"in e?Dx(e):"line"in e||"column"in e?Qh(e):""}function Qh(e){return Mx(e&&e.line)+":"+Mx(e&&e.column)}function Dx(e){return Qh(e&&e.start)+"-"+Qh(e&&e.end)}function Mx(e){return e&&typeof e=="number"?e:1}class zt extends Error{constructor(t,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof t=="string"?o=t:!u.cause&&t&&(c=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof a=="string"){const p=a.indexOf(":");p===-1?u.ruleId=a:(u.source=a.slice(0,p),u.ruleId=a.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const d=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=yo(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}zt.prototype.file="";zt.prototype.name="";zt.prototype.reason="";zt.prototype.message="";zt.prototype.stack="";zt.prototype.column=void 0;zt.prototype.line=void 0;zt.prototype.ancestors=void 0;zt.prototype.cause=void 0;zt.prototype.fatal=void 0;zt.prototype.place=void 0;zt.prototype.ruleId=void 0;zt.prototype.source=void 0;const $m={}.hasOwnProperty,n5=new Map,i5=/[A-Z]/g,r5=new Set(["table","tbody","thead","tfoot","tr"]),a5=new Set(["td","th"]),mT="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function s5(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=m5(i,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=h5(i,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Wm:X4,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=pT(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function pT(e,t,i){if(t.type==="element")return o5(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return l5(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return c5(e,t,i);if(t.type==="mdxjsEsm")return u5(e,t);if(t.type==="root")return f5(e,t,i);if(t.type==="text")return d5(e,t)}function o5(e,t,i){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Wm,e.schema=o),e.ancestors.push(t);const u=yT(e,t.tagName,!1),c=p5(e,t);let d=ep(e,t);return r5.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!I4(p):!0})),gT(e,c,u,t),Jm(c,d),e.ancestors.pop(),e.schema=a,e.create(t,u,c,i)}function l5(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}ko(e,t.position)}function u5(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ko(e,t.position)}function c5(e,t,i){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=Wm,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:yT(e,t.name,!0),c=g5(e,t),d=ep(e,t);return gT(e,c,u,t),Jm(c,d),e.ancestors.pop(),e.schema=a,e.create(t,u,c,i)}function f5(e,t,i){const a={};return Jm(a,ep(e,t)),e.create(t,e.Fragment,a,i)}function d5(e,t){return t.value}function gT(e,t,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=a)}function Jm(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function h5(e,t,i){return a;function a(o,u,c,d){const m=Array.isArray(c.children)?i:t;return d?m(u,c,d):m(u,c)}}function m5(e,t){return i;function i(a,o,u,c){const d=Array.isArray(u.children),p=Zm(a);return t(o,u,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function p5(e,t){const i={};let a,o;for(o in t.properties)if(o!=="children"&&$m.call(t.properties,o)){const u=y5(e,o,t.properties[o]);if(u){const[c,d]=u;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&a5.has(t.tagName)?a=d:i[c]=d}}if(a){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function g5(e,t){const i={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const c=u.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,e.evaluater.evaluateExpression(d.argument))}else ko(e,t.position);else{const o=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,u=e.evaluater.evaluateExpression(d.expression)}else ko(e,t.position);else u=a.value===null?!0:a.value;i[o]=u}return i}function ep(e,t){const i=[];let a=-1;const o=e.passKeys?new Map:n5;for(;++a<t.children.length;){const u=t.children[a];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const d=pT(e,u,c);d!==void 0&&i.push(d)}return i}function y5(e,t,i){const a=q4(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?R4(i):K4(i)),a.property==="style"){let o=typeof i=="object"?i:b5(e,String(i));return e.stylePropertyNameCase==="css"&&(o=v5(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?V4[a.property]||a.property:a.attribute,i]}}function b5(e,t){try{return e5(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=mT+"#cannot-parse-style-attribute",o}}function yT(e,t,i){let a;if(!i)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,c;for(;++u<o.length;){const d=Sx(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}a=c}else a=Sx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return $m.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);ko(e)}function ko(e,t){const i=new zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=mT+"#cannot-handle-mdx-estrees-without-createevaluater",i}function v5(e){const t={};let i;for(i in e)$m.call(e,i)&&(t[x5(i)]=e[i]);return t}function x5(e){let t=e.replace(i5,S5);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function S5(e){return"-"+e.toLowerCase()}const eh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},w5={};function T5(e,t){const i=w5,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return bT(e,a,o)}function bT(e,t,i){if(E5(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nx(e.children,t,i)}return Array.isArray(e)?Nx(e,t,i):""}function Nx(e,t,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=bT(e[o],t,i);return a.join("")}function E5(e){return!!(e&&typeof e=="object")}const Rx=document.createElement("i");function tp(e){const t="&"+e+";";Rx.innerHTML=t;const i=Rx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function Wn(e,t,i,a){const o=e.length;let u=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);u<a.length;)c=a.slice(u,u+1e4),c.unshift(t,0),e.splice(...c),u+=1e4,t+=1e4}function Sn(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const Ox={}.hasOwnProperty;function A5(e){const t={};let i=-1;for(;++i<e.length;)C5(t,e[i]);return t}function C5(e,t){let i;for(i in t){const o=(Ox.call(e,i)?e[i]:void 0)||(e[i]={}),u=t[i];let c;if(u)for(c in u){Ox.call(o,c)||(o[c]=[]);const d=u[c];_5(o[c],Array.isArray(d)?d:d?[d]:[])}}}function _5(e,t){let i=-1;const a=[];for(;++i<t.length;)(t[i].add==="after"?e:a).push(t[i]);Wn(e,0,0,a)}function vT(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"":String.fromCodePoint(i)}function Za(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Gn=br(/[A-Za-z]/),on=br(/[\dA-Za-z]/),k5=br(/[#-'*+\--9=?A-Z^-~]/);function Wh(e){return e!==null&&(e<32||e===127)}const Zh=br(/\d/),D5=br(/[\dA-Fa-f]/),M5=br(/[!-/:-@[-`{-~]/);function we(e){return e!==null&&e<-2}function Qt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const N5=br(new RegExp("\\p{P}|\\p{S}","u")),R5=br(/\s/);function br(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function ls(e){const t=[];let i=-1,a=0,o=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&on(e.charCodeAt(i+1))&&on(e.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const d=e.charCodeAt(i+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),o=1):c=""}else c=String.fromCharCode(u);c&&(t.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return t.join("")+e.slice(a)}function Je(e,t,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return Pe(p)?(e.enter(i),d(p)):t(p)}function d(p){return Pe(p)&&u++<o?(e.consume(p),d):(e.exit(i),t(p))}}const O5={tokenize:z5};function z5(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(d){return e.enter("paragraph"),u(d)}function u(d){const p=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return we(d)?(e.consume(d),e.exit("chunkText"),u):(e.consume(d),c)}}const L5={tokenize:j5},zx={tokenize:I5};function j5(e){const t=this,i=[];let a=0,o,u,c;return d;function d(N){if(a<i.length){const q=i[a];return t.containerState=q[1],e.attempt(q[0].continuation,p,m)(N)}return m(N)}function p(N){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&P();const q=t.events.length;let Z=q,L;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){L=t.events[Z][1].end;break}C(a);let K=q;for(;K<t.events.length;)t.events[K][1].end={...L},K++;return Wn(t.events,Z+1,0,t.events.slice(q)),t.events.length=K,m(N)}return d(N)}function m(N){if(a===i.length){if(!o)return v(N);if(o.currentConstruct&&o.currentConstruct.concrete)return A(N);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zx,g,y)(N)}function g(N){return o&&P(),C(a),v(N)}function y(N){return t.parser.lazy[t.now().line]=a!==i.length,c=t.now().offset,A(N)}function v(N){return t.containerState={},e.attempt(zx,x,A)(N)}function x(N){return a++,i.push([t.currentConstruct,t.containerState]),v(N)}function A(N){if(N===null){o&&P(),C(0),e.consume(N);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),D(N)}function D(N){if(N===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(N);return}return we(N)?(e.consume(N),R(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(N),D)}function R(N,q){const Z=t.sliceStream(N);if(q&&Z.push(null),N.previous=u,u&&(u.next=N),u=N,o.defineSkip(N.start),o.write(Z),t.parser.lazy[N.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<c&&(!o.events[L][1].end||o.events[L][1].end.offset>c))return;const K=t.events.length;let V=K,ne,re;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(ne){re=t.events[V][1].end;break}ne=!0}for(C(a),L=K;L<t.events.length;)t.events[L][1].end={...re},L++;Wn(t.events,V+1,0,t.events.slice(K)),t.events.length=L}}function C(N){let q=i.length;for(;q-- >N;){const Z=i[q];t.containerState=Z[1],Z[0].exit.call(t,e)}i.length=N}function P(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function I5(e,t,i){return Je(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lx(e){if(e===null||Qt(e)||R5(e))return 1;if(N5(e))return 2}function np(e,t,i){const a=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!a.includes(u)&&(t=u(t,i),a.push(u))}return t}const $h={name:"attention",resolveAll:B5,tokenize:U5};function B5(e,t){let i=-1,a,o,u,c,d,p,m,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;p=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const y={...e[a][1].end},v={...e[i][1].start};jx(y,-p),jx(v,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},u={type:p>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[i][1].start={...d.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=Sn(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=Sn(m,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",u,t]]),m=Sn(m,np(t.parser.constructs.insideSpan.null,e.slice(a+1,i),t)),m=Sn(m,[["exit",u,t],["enter",d,t],["exit",d,t],["exit",o,t]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,m=Sn(m,[["enter",e[i][1],t],["exit",e[i][1],t]])):g=0,Wn(e,a-1,i-a+3,m),i=a+m.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function U5(e,t){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Lx(a);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===u)return e.consume(p),d;const m=e.exit("attentionSequence"),g=Lx(p),y=!g||g===2&&o||i.includes(p),v=!o||o===2&&g||i.includes(a);return m._open=!!(u===42?y:y&&(o||!v)),m._close=!!(u===42?v:v&&(g||!y)),t(p)}}function jx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const P5={name:"autolink",tokenize:V5};function V5(e,t,i){let a=0;return o;function o(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Gn(x)?(e.consume(x),c):x===64?i(x):m(x)}function c(x){return x===43||x===45||x===46||on(x)?(a=1,d(x)):m(x)}function d(x){return x===58?(e.consume(x),a=0,p):(x===43||x===45||x===46||on(x))&&a++<32?(e.consume(x),d):(a=0,m(x))}function p(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||Wh(x)?i(x):(e.consume(x),p)}function m(x){return x===64?(e.consume(x),g):k5(x)?(e.consume(x),m):i(x)}function g(x){return on(x)?y(x):i(x)}function y(x){return x===46?(e.consume(x),a=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):v(x)}function v(x){if((x===45||on(x))&&a++<63){const A=x===45?v:y;return e.consume(x),A}return i(x)}}const rc={partial:!0,tokenize:H5};function H5(e,t,i){return a;function a(u){return Pe(u)?Je(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||we(u)?t(u):i(u)}}const xT={continuation:{tokenize:q5},exit:G5,name:"blockQuote",tokenize:F5};function F5(e,t,i){const a=this;return o;function o(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return Pe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function q5(e,t,i){const a=this;return o;function o(c){return Pe(c)?Je(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(xT,t,i)(c)}}function G5(e){e.exit("blockQuote")}const ST={name:"characterEscape",tokenize:Y5};function Y5(e,t,i){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return M5(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(u)}}const wT={name:"characterReference",tokenize:X5};function X5(e,t,i){const a=this;let o=0,u,c;return d;function d(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),p}function p(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),u=31,c=on,g(y))}function m(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=D5,g):(e.enter("characterReferenceValue"),u=7,c=Zh,g(y))}function g(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return c===on&&!tp(a.sliceSerialize(v))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&o++<u?(e.consume(y),g):i(y)}}const Ix={partial:!0,tokenize:Q5},Bx={concrete:!0,name:"codeFenced",tokenize:K5};function K5(e,t,i){const a=this,o={partial:!0,tokenize:Z};let u=0,c=0,d;return p;function p(L){return m(L)}function m(L){const K=a.events[a.events.length-1];return u=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,d=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(L)}function g(L){return L===d?(c++,e.consume(L),g):c<3?i(L):(e.exit("codeFencedFenceSequence"),Pe(L)?Je(e,y,"whitespace")(L):y(L))}function y(L){return L===null||we(L)?(e.exit("codeFencedFence"),a.interrupt?t(L):e.check(Ix,D,q)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(L))}function v(L){return L===null||we(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(L)):Pe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,x,"whitespace")(L)):L===96&&L===d?i(L):(e.consume(L),v)}function x(L){return L===null||we(L)?y(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),A(L))}function A(L){return L===null||we(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(L)):L===96&&L===d?i(L):(e.consume(L),A)}function D(L){return e.attempt(o,q,R)(L)}function R(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),C}function C(L){return u>0&&Pe(L)?Je(e,P,"linePrefix",u+1)(L):P(L)}function P(L){return L===null||we(L)?e.check(Ix,D,q)(L):(e.enter("codeFlowValue"),N(L))}function N(L){return L===null||we(L)?(e.exit("codeFlowValue"),P(L)):(e.consume(L),N)}function q(L){return e.exit("codeFenced"),t(L)}function Z(L,K,V){let ne=0;return re;function re($){return L.enter("lineEnding"),L.consume($),L.exit("lineEnding"),ie}function ie($){return L.enter("codeFencedFence"),Pe($)?Je(L,ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):ae($)}function ae($){return $===d?(L.enter("codeFencedFenceSequence"),be($)):V($)}function be($){return $===d?(ne++,L.consume($),be):ne>=c?(L.exit("codeFencedFenceSequence"),Pe($)?Je(L,ee,"whitespace")($):ee($)):V($)}function ee($){return $===null||we($)?(L.exit("codeFencedFence"),K($)):V($)}}}function Q5(e,t,i){const a=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}const th={name:"codeIndented",tokenize:Z5},W5={partial:!0,tokenize:$5};function Z5(e,t,i){const a=this;return o;function o(m){return e.enter("codeIndented"),Je(e,u,"linePrefix",5)(m)}function u(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):i(m)}function c(m){return m===null?p(m):we(m)?e.attempt(W5,c,p)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||we(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function p(m){return e.exit("codeIndented"),t(m)}}function $5(e,t,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):we(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Je(e,u,"linePrefix",5)(c)}function u(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):we(c)?o(c):i(c)}}const J5={name:"codeText",previous:tL,resolve:eL,tokenize:nL};function eL(e){let t=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=i;++a<t;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(a=i-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),t-=a-o-2,a=o+2),o=void 0);return e}function tL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nL(e,t,i){let a=0,o,u;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),d(y)}function d(y){return y===96?(e.consume(y),a++,d):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(u=e.enter("codeTextSequence"),o=0,g(y)):we(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||we(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),m)}function g(y){return y===96?(e.consume(y),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",m(y))}}class iL{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,i,a){const o=i||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&lo(this.left,a),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),lo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),lo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const i=this.left.splice(t,Number.POSITIVE_INFINITY);lo(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);lo(this.left,i.reverse())}}}function lo(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function TT(e){const t={};let i=-1,a,o,u,c,d,p,m;const g=new iL(e);for(;++i<g.length;){for(;i in t;)i=t[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(p=a[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,rL(g,i)),i=t[i],m=!0);else if(a[1]._container){for(u=i,o=void 0;u--;)if(c=g.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(a[1].end={...g.get(o)[1].start},d=g.slice(o,i),d.unshift(a),g.splice(o,i-o+1,d))}}return Wn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function rL(e,t){const i=e.get(t)[1],a=e.get(t)[2];let o=t-1;const u=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let g,y,v=-1,x=i,A=0,D=0;const R=[D];for(;x;){for(;e.get(++o)[1]!==x;);u.push(o),x._tokenizer||(g=a.sliceStream(x),x.next||g.push(null),y&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=i;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(D=v+1,R.push(D),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):R.pop(),v=R.length;v--;){const C=d.slice(R[v],R[v+1]),P=u.pop();p.push([P,P+C.length-1]),e.splice(P,2,C)}for(p.reverse(),v=-1;++v<p.length;)m[A+p[v][0]]=A+p[v][1],A+=p[v][1]-p[v][0]-1;return m}const aL={resolve:oL,tokenize:lL},sL={partial:!0,tokenize:uL};function oL(e){return TT(e),e}function lL(e,t){let i;return a;function a(d){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?u(d):we(d)?e.check(sL,c,u)(d):(e.consume(d),o)}function u(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function uL(e,t,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Je(e,u,"linePrefix")}function u(c){if(c===null||we(c))return i(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,i,t)(c)}}function ET(e,t,i,a,o,u,c,d,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(C){return C===60?(e.enter(a),e.enter(o),e.enter(u),e.consume(C),e.exit(u),v):C===null||C===32||C===41||Wh(C)?i(C):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),D(C))}function v(C){return C===62?(e.enter(u),e.consume(C),e.exit(u),e.exit(o),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(e.exit("chunkString"),e.exit(d),v(C)):C===null||C===60||we(C)?i(C):(e.consume(C),C===92?A:x)}function A(C){return C===60||C===62||C===92?(e.consume(C),x):x(C)}function D(C){return!g&&(C===null||C===41||Qt(C))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(C)):g<m&&C===40?(e.consume(C),g++,D):C===41?(e.consume(C),g--,D):C===null||C===32||C===40||Wh(C)?i(C):(e.consume(C),C===92?R:D)}function R(C){return C===40||C===41||C===92?(e.consume(C),D):D(C)}}function AT(e,t,i,a,o,u){const c=this;let d=0,p;return m;function m(x){return e.enter(a),e.enter(o),e.consume(x),e.exit(o),e.enter(u),g}function g(x){return d>999||x===null||x===91||x===93&&!p||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(u),e.enter(o),e.consume(x),e.exit(o),e.exit(a),t):we(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||we(x)||d++>999?(e.exit("chunkString"),g(x)):(e.consume(x),p||(p=!Pe(x)),x===92?v:y)}function v(x){return x===91||x===92||x===93?(e.consume(x),d++,y):y(x)}}function CT(e,t,i,a,o,u){let c;return d;function d(v){return v===34||v===39||v===40?(e.enter(a),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,p):i(v)}function p(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):(e.enter(u),m(v))}function m(v){return v===c?(e.exit(u),p(c)):v===null?i(v):we(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||we(v)?(e.exit("chunkString"),m(v)):(e.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(e.consume(v),g):g(v)}}function bo(e,t){let i;return a;function a(o){return we(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Pe(o)?Je(e,a,i?"linePrefix":"lineSuffix")(o):t(o)}}const cL={name:"definition",tokenize:dL},fL={partial:!0,tokenize:hL};function dL(e,t,i){const a=this;let o;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return AT.call(a,e,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return o=Za(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),p):i(x)}function p(x){return Qt(x)?bo(e,m)(x):m(x)}function m(x){return ET(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(fL,y,y)(x)}function y(x){return Pe(x)?Je(e,v,"whitespace")(x):v(x)}function v(x){return x===null||we(x)?(e.exit("definition"),a.parser.defined.push(o),t(x)):i(x)}}function hL(e,t,i){return a;function a(d){return Qt(d)?bo(e,o)(d):i(d)}function o(d){return CT(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return Pe(d)?Je(e,c,"whitespace")(d):c(d)}function c(d){return d===null||we(d)?t(d):i(d)}}const mL={name:"hardBreakEscape",tokenize:pL};function pL(e,t,i){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return we(u)?(e.exit("hardBreakEscape"),t(u)):i(u)}}const gL={name:"headingAtx",resolve:yL,tokenize:bL};function yL(e,t){let i=e.length-2,a=3,o,u;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},u={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Wn(e,a,i-a+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function bL(e,t,i){let a=0;return o;function o(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Qt(g)?(e.exit("atxHeadingSequence"),d(g)):i(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),p(g)):g===null||we(g)?(e.exit("atxHeading"),t(g)):Pe(g)?Je(e,d,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function p(g){return g===35?(e.consume(g),p):(e.exit("atxHeadingSequence"),d(g))}function m(g){return g===null||g===35||Qt(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),m)}}const vL=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ux=["pre","script","style","textarea"],xL={concrete:!0,name:"htmlFlow",resolveTo:TL,tokenize:EL},SL={partial:!0,tokenize:CL},wL={partial:!0,tokenize:AL};function TL(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function EL(e,t,i){const a=this;let o,u,c,d,p;return m;function m(T){return g(T)}function g(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),y}function y(T){return T===33?(e.consume(T),v):T===47?(e.consume(T),u=!0,D):T===63?(e.consume(T),o=3,a.interrupt?t:w):Gn(T)?(e.consume(T),c=String.fromCharCode(T),R):i(T)}function v(T){return T===45?(e.consume(T),o=2,x):T===91?(e.consume(T),o=5,d=0,A):Gn(T)?(e.consume(T),o=4,a.interrupt?t:w):i(T)}function x(T){return T===45?(e.consume(T),a.interrupt?t:w):i(T)}function A(T){const le="CDATA[";return T===le.charCodeAt(d++)?(e.consume(T),d===le.length?a.interrupt?t:ae:A):i(T)}function D(T){return Gn(T)?(e.consume(T),c=String.fromCharCode(T),R):i(T)}function R(T){if(T===null||T===47||T===62||Qt(T)){const le=T===47,ce=c.toLowerCase();return!le&&!u&&Ux.includes(ce)?(o=1,a.interrupt?t(T):ae(T)):vL.includes(c.toLowerCase())?(o=6,le?(e.consume(T),C):a.interrupt?t(T):ae(T)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(T):u?P(T):N(T))}return T===45||on(T)?(e.consume(T),c+=String.fromCharCode(T),R):i(T)}function C(T){return T===62?(e.consume(T),a.interrupt?t:ae):i(T)}function P(T){return Pe(T)?(e.consume(T),P):re(T)}function N(T){return T===47?(e.consume(T),re):T===58||T===95||Gn(T)?(e.consume(T),q):Pe(T)?(e.consume(T),N):re(T)}function q(T){return T===45||T===46||T===58||T===95||on(T)?(e.consume(T),q):Z(T)}function Z(T){return T===61?(e.consume(T),L):Pe(T)?(e.consume(T),Z):N(T)}function L(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(e.consume(T),p=T,K):Pe(T)?(e.consume(T),L):V(T)}function K(T){return T===p?(e.consume(T),p=null,ne):T===null||we(T)?i(T):(e.consume(T),K)}function V(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Qt(T)?Z(T):(e.consume(T),V)}function ne(T){return T===47||T===62||Pe(T)?N(T):i(T)}function re(T){return T===62?(e.consume(T),ie):i(T)}function ie(T){return T===null||we(T)?ae(T):Pe(T)?(e.consume(T),ie):i(T)}function ae(T){return T===45&&o===2?(e.consume(T),O):T===60&&o===1?(e.consume(T),Q):T===62&&o===4?(e.consume(T),k):T===63&&o===3?(e.consume(T),w):T===93&&o===5?(e.consume(T),fe):we(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(SL,F,be)(T)):T===null||we(T)?(e.exit("htmlFlowData"),be(T)):(e.consume(T),ae)}function be(T){return e.check(wL,ee,F)(T)}function ee(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),$}function $(T){return T===null||we(T)?be(T):(e.enter("htmlFlowData"),ae(T))}function O(T){return T===45?(e.consume(T),w):ae(T)}function Q(T){return T===47?(e.consume(T),c="",J):ae(T)}function J(T){if(T===62){const le=c.toLowerCase();return Ux.includes(le)?(e.consume(T),k):ae(T)}return Gn(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),J):ae(T)}function fe(T){return T===93?(e.consume(T),w):ae(T)}function w(T){return T===62?(e.consume(T),k):T===45&&o===2?(e.consume(T),w):ae(T)}function k(T){return T===null||we(T)?(e.exit("htmlFlowData"),F(T)):(e.consume(T),k)}function F(T){return e.exit("htmlFlow"),t(T)}}function AL(e,t,i){const a=this;return o;function o(c){return we(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return a.parser.lazy[a.now().line]?i(c):t(c)}}function CL(e,t,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(rc,t,i)}}const _L={name:"htmlText",tokenize:kL};function kL(e,t,i){const a=this;let o,u,c;return d;function d(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),p}function p(w){return w===33?(e.consume(w),m):w===47?(e.consume(w),Z):w===63?(e.consume(w),N):Gn(w)?(e.consume(w),V):i(w)}function m(w){return w===45?(e.consume(w),g):w===91?(e.consume(w),u=0,A):Gn(w)?(e.consume(w),P):i(w)}function g(w){return w===45?(e.consume(w),x):i(w)}function y(w){return w===null?i(w):w===45?(e.consume(w),v):we(w)?(c=y,Q(w)):(e.consume(w),y)}function v(w){return w===45?(e.consume(w),x):y(w)}function x(w){return w===62?O(w):w===45?v(w):y(w)}function A(w){const k="CDATA[";return w===k.charCodeAt(u++)?(e.consume(w),u===k.length?D:A):i(w)}function D(w){return w===null?i(w):w===93?(e.consume(w),R):we(w)?(c=D,Q(w)):(e.consume(w),D)}function R(w){return w===93?(e.consume(w),C):D(w)}function C(w){return w===62?O(w):w===93?(e.consume(w),C):D(w)}function P(w){return w===null||w===62?O(w):we(w)?(c=P,Q(w)):(e.consume(w),P)}function N(w){return w===null?i(w):w===63?(e.consume(w),q):we(w)?(c=N,Q(w)):(e.consume(w),N)}function q(w){return w===62?O(w):N(w)}function Z(w){return Gn(w)?(e.consume(w),L):i(w)}function L(w){return w===45||on(w)?(e.consume(w),L):K(w)}function K(w){return we(w)?(c=K,Q(w)):Pe(w)?(e.consume(w),K):O(w)}function V(w){return w===45||on(w)?(e.consume(w),V):w===47||w===62||Qt(w)?ne(w):i(w)}function ne(w){return w===47?(e.consume(w),O):w===58||w===95||Gn(w)?(e.consume(w),re):we(w)?(c=ne,Q(w)):Pe(w)?(e.consume(w),ne):O(w)}function re(w){return w===45||w===46||w===58||w===95||on(w)?(e.consume(w),re):ie(w)}function ie(w){return w===61?(e.consume(w),ae):we(w)?(c=ie,Q(w)):Pe(w)?(e.consume(w),ie):ne(w)}function ae(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(e.consume(w),o=w,be):we(w)?(c=ae,Q(w)):Pe(w)?(e.consume(w),ae):(e.consume(w),ee)}function be(w){return w===o?(e.consume(w),o=void 0,$):w===null?i(w):we(w)?(c=be,Q(w)):(e.consume(w),be)}function ee(w){return w===null||w===34||w===39||w===60||w===61||w===96?i(w):w===47||w===62||Qt(w)?ne(w):(e.consume(w),ee)}function $(w){return w===47||w===62||Qt(w)?ne(w):i(w)}function O(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):i(w)}function Q(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),J}function J(w){return Pe(w)?Je(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):fe(w)}function fe(w){return e.enter("htmlTextData"),c(w)}}const ip={name:"labelEnd",resolveAll:RL,resolveTo:OL,tokenize:zL},DL={tokenize:LL},ML={tokenize:jL},NL={tokenize:IL};function RL(e){let t=-1;const i=[];for(;++t<e.length;){const a=e[t][1];if(i.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==i.length&&Wn(e,0,e.length,i),e}function OL(e,t){let i=e.length,a=0,o,u,c,d;for(;i--;)if(o=e[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",m,t]],d=Sn(d,e.slice(u+1,u+a+3)),d=Sn(d,[["enter",g,t]]),d=Sn(d,np(t.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),t)),d=Sn(d,[["exit",g,t],e[c-2],e[c-1],["exit",m,t]]),d=Sn(d,e.slice(c+1)),d=Sn(d,[["exit",p,t]]),Wn(e,u,e.length,d),e}function zL(e,t,i){const a=this;let o=a.events.length,u,c;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){u=a.events[o][1];break}return d;function d(v){return u?u._inactive?y(v):(c=a.parser.defined.includes(Za(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),p):i(v)}function p(v){return v===40?e.attempt(DL,g,c?g:y)(v):v===91?e.attempt(ML,g,c?m:y)(v):c?g(v):y(v)}function m(v){return e.attempt(NL,g,y)(v)}function g(v){return t(v)}function y(v){return u._balanced=!0,i(v)}}function LL(e,t,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return Qt(y)?bo(e,u)(y):u(y)}function u(y){return y===41?g(y):ET(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Qt(y)?bo(e,p)(y):g(y)}function d(y){return i(y)}function p(y){return y===34||y===39||y===40?CT(e,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Qt(y)?bo(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):i(y)}}function jL(e,t,i){const a=this;return o;function o(d){return AT.call(a,e,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return a.parser.defined.includes(Za(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):i(d)}function c(d){return i(d)}}function IL(e,t,i){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):i(u)}}const BL={name:"labelStartImage",resolveAll:ip.resolveAll,tokenize:UL};function UL(e,t,i){const a=this;return o;function o(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),u}function u(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(d):t(d)}}const PL={name:"labelStartLink",resolveAll:ip.resolveAll,tokenize:VL};function VL(e,t,i){const a=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):t(c)}}const nh={name:"lineEnding",tokenize:HL};function HL(e,t){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const ku={name:"thematicBreak",tokenize:FL};function FL(e,t,i){let a=0,o;return u;function u(m){return e.enter("thematicBreak"),c(m)}function c(m){return o=m,d(m)}function d(m){return m===o?(e.enter("thematicBreakSequence"),p(m)):a>=3&&(m===null||we(m))?(e.exit("thematicBreak"),t(m)):i(m)}function p(m){return m===o?(e.consume(m),a++,p):(e.exit("thematicBreakSequence"),Pe(m)?Je(e,d,"whitespace")(m):d(m))}}const Kt={continuation:{tokenize:XL},exit:QL,name:"list",tokenize:YL},qL={partial:!0,tokenize:WL},GL={partial:!0,tokenize:KL};function YL(e,t,i){const a=this,o=a.events[a.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return d;function d(x){const A=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Zh(x)){if(a.containerState.type||(a.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(ku,i,m)(x):m(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(x)}return i(x)}function p(x){return Zh(x)&&++c<10?(e.consume(x),p):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),m(x)):i(x)}function m(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(rc,a.interrupt?i:g,e.attempt(qL,v,y))}function g(x){return a.containerState.initialBlankLine=!0,u++,v(x)}function y(x){return Pe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):i(x)}function v(x){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function XL(e,t,i){const a=this;return a.containerState._closeFlow=void 0,e.check(rc,o,u);function o(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Je(e,t,"listItemIndent",a.containerState.size+1)(d)}function u(d){return a.containerState.furtherBlankLines||!Pe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(GL,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Je(e,e.attempt(Kt,t,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function KL(e,t,i){const a=this;return Je(e,o,"listItemIndent",a.containerState.size+1);function o(u){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(u):i(u)}}function QL(e){e.exit(this.containerState.type)}function WL(e,t,i){const a=this;return Je(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=a.events[a.events.length-1];return!Pe(u)&&c&&c[1].type==="listItemPrefixWhitespace"?t(u):i(u)}}const Px={name:"setextUnderline",resolveTo:ZL,tokenize:$L};function ZL(e,t){let i=e.length,a,o,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,t]),e.splice(u+1,0,["exit",e[a][1],t]),e[a][1].end={...e[u][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function $L(e,t,i){const a=this;let o;return u;function u(m){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),o=m,c(m)):i(m)}function c(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===o?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),Pe(m)?Je(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||we(m)?(e.exit("setextHeadingLine"),t(m)):i(m)}}const JL={tokenize:ej};function ej(e){const t=this,i=e.attempt(rc,a,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(aL,o)),"linePrefix")));return i;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const tj={resolveAll:kT()},nj=_T("string"),ij=_T("text");function _T(e){return{resolveAll:kT(e==="text"?rj:void 0),tokenize:t};function t(i){const a=this,o=this.parser.constructs[e],u=i.attempt(o,c,d);return c;function c(g){return m(g)?u(g):d(g)}function d(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),p}function p(g){return m(g)?(i.exit("data"),u(g)):(i.consume(g),p)}function m(g){if(g===null)return!0;const y=o[g];let v=-1;if(y)for(;++v<y.length;){const x=y[v];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function kT(e){return t;function t(i,a){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(i,a):i}}function rj(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],o=t.sliceStream(a);let u=o.length,c=-1,d=0,p;for(;u--;){const m=o[u];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){u++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(d=0),d){const m={type:i===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(i,0,["enter",m,t],["exit",m,t]),i+=2)}i++}return e}const aj={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:xT},sj={91:cL},oj={[-2]:th,[-1]:th,32:th},lj={35:gL,42:ku,45:[Px,ku],60:xL,61:Px,95:ku,96:Bx,126:Bx},uj={38:wT,92:ST},cj={[-5]:nh,[-4]:nh,[-3]:nh,33:BL,38:wT,42:$h,60:[P5,_L],91:PL,92:[mL,ST],93:ip,95:$h,96:J5},fj={null:[$h,tj]},dj={null:[42,95]},hj={null:[]},mj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dj,contentInitial:sj,disable:hj,document:aj,flow:lj,flowInitial:oj,insideSpan:fj,string:uj,text:cj},Symbol.toStringTag,{value:"Module"}));function pj(e,t,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],d=[];const p={attempt:K(Z),check:K(L),consume:P,enter:N,exit:q,interrupt:K(L,{interrupt:!0})},m={code:null,containerState:{},defineSkip:D,events:[],now:A,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:y};let g=t.tokenize.call(m,p);return t.resolveAll&&u.push(t),m;function y(ie){return c=Sn(c,ie),R(),c[c.length-1]!==null?[]:(V(t,0),m.events=np(u,m.events,m),m.events)}function v(ie,ae){return yj(x(ie),ae)}function x(ie){return gj(c,ie)}function A(){const{_bufferIndex:ie,_index:ae,line:be,column:ee,offset:$}=a;return{_bufferIndex:ie,_index:ae,line:be,column:ee,offset:$}}function D(ie){o[ie.line]=ie.column,re()}function R(){let ie;for(;a._index<c.length;){const ae=c[a._index];if(typeof ae=="string")for(ie=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ie&&a._bufferIndex<ae.length;)C(ae.charCodeAt(a._bufferIndex));else C(ae)}}function C(ie){g=g(ie)}function P(ie){we(ie)?(a.line++,a.column=1,a.offset+=ie===-3?2:1,re()):ie!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=ie}function N(ie,ae){const be=ae||{};return be.type=ie,be.start=A(),m.events.push(["enter",be,m]),d.push(be),be}function q(ie){const ae=d.pop();return ae.end=A(),m.events.push(["exit",ae,m]),ae}function Z(ie,ae){V(ie,ae.from)}function L(ie,ae){ae.restore()}function K(ie,ae){return be;function be(ee,$,O){let Q,J,fe,w;return Array.isArray(ee)?F(ee):"tokenize"in ee?F([ee]):k(ee);function k(ue){return Ee;function Ee(Ve){const Se=Ve!==null&&ue[Ve],wt=Ve!==null&&ue.null,Nt=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return F(Nt)(Ve)}}function F(ue){return Q=ue,J=0,ue.length===0?O:T(ue[J])}function T(ue){return Ee;function Ee(Ve){return w=ne(),fe=ue,ue.partial||(m.currentConstruct=ue),ue.name&&m.parser.constructs.disable.null.includes(ue.name)?ce():ue.tokenize.call(ae?Object.assign(Object.create(m),ae):m,p,le,ce)(Ve)}}function le(ue){return ie(fe,w),$}function ce(ue){return w.restore(),++J<Q.length?T(Q[J]):O}}}function V(ie,ae){ie.resolveAll&&!u.includes(ie)&&u.push(ie),ie.resolve&&Wn(m.events,ae,m.events.length-ae,ie.resolve(m.events.slice(ae),m)),ie.resolveTo&&(m.events=ie.resolveTo(m.events,m))}function ne(){const ie=A(),ae=m.previous,be=m.currentConstruct,ee=m.events.length,$=Array.from(d);return{from:ee,restore:O};function O(){a=ie,m.previous=ae,m.currentConstruct=be,m.events.length=ee,d=$,re()}}function re(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function gj(e,t){const i=t.start._index,a=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let c;if(i===o)c=[e[i].slice(a,u)];else{if(c=e.slice(i,o),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function yj(e,t){let i=-1;const a=[];let o;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
`;break}case-3:{c=`\r
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,a.push(c)}return a.join("")}function bj(e){const a={constructs:A5([mj,...(e||{}).extensions||[]]),content:o(O5),defined:[],document:o(L5),flow:o(JL),lazy:{},string:o(nj),text:o(ij)};return a;function o(u){return c;function c(d){return pj(a,u,d)}}}function vj(e){for(;!TT(e););return e}const Vx=/[\0\t\n\r]/g;function xj(){let e=1,t="",i=!0,a;return o;function o(u,c,d){const p=[];let m,g,y,v,x;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,t="",i&&(u.charCodeAt(0)===65279&&y++,i=void 0);y<u.length;){if(Vx.lastIndex=y,m=Vx.exec(u),v=m&&m.index!==void 0?m.index:u.length,x=u.charCodeAt(v),!m){t=u.slice(y);break}if(x===10&&y===v&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),y<v&&(p.push(u.slice(y,v)),e+=v-y),x){case 0:{p.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,p.push(-2);e++<g;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:a=!0,e=1}y=v+1}return d&&(a&&p.push(-5),t&&p.push(t),p.push(null)),p}}const Sj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wj(e){return e.replace(Sj,Tj)}function Tj(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return vT(i.slice(u?2:1),u?16:10)}return tp(i)||e}const DT={}.hasOwnProperty;function Ej(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),Aj(i)(vj(bj(i).document().write(xj()(e,t,!0))))}function Aj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ei),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:u(wi),blockQuote:u(wt),characterEscape:ne,characterReference:ne,codeFenced:u(Nt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Nt,c),codeText:u(un,c),codeTextData:ne,data:ne,codeFlowValue:ne,definition:u(Ln),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Rt),hardBreakEscape:u(Ti),hardBreakTrailing:u(Ti),htmlFlow:u(ea,c),htmlFlowData:ne,htmlText:u(ea,c),htmlTextData:ne,image:u(cn),label:c,link:u(Ei),listItem:u(vr),listItemValue:v,listOrdered:u(Ai,y),listUnordered:u(Ai),paragraph:u(xr),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(wi),strong:u(Sr),thematicBreak:u(se)},exit:{atxHeading:p(),atxHeadingSequence:Z,autolink:p(),autolinkEmail:Se,autolinkProtocol:Ve,blockQuote:p(),characterEscapeValue:re,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ue,characterReference:Ee,codeFenced:p(R),codeFencedFence:D,codeFencedFenceInfo:x,codeFencedFenceMeta:A,codeFlowValue:re,codeIndented:p(C),codeText:p($),codeTextData:re,data:re,definition:p(),definitionDestinationString:q,definitionLabelString:P,definitionTitleString:N,emphasis:p(),hardBreakEscape:p(ae),hardBreakTrailing:p(ae),htmlFlow:p(be),htmlFlowData:re,htmlText:p(ee),htmlTextData:re,image:p(Q),label:fe,labelText:J,lineEnding:ie,link:p(O),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:le,resourceDestinationString:w,resourceTitleString:k,resource:F,setextHeading:p(V),setextHeadingLineSequence:K,setextHeadingText:L,strong:p(),thematicBreak:p()}};MT(t,(e||{}).mdastExtensions||[]);const i={};return a;function a(B){let te={type:"root",children:[]};const ye={stack:[te],tokenStack:[],config:t,enter:d,exit:m,buffer:c,resume:g,data:i},ke=[];let Ce=-1;for(;++Ce<B.length;)if(B[Ce][1].type==="listOrdered"||B[Ce][1].type==="listUnordered")if(B[Ce][0]==="enter")ke.push(Ce);else{const Zt=ke.pop();Ce=o(B,Zt,Ce)}for(Ce=-1;++Ce<B.length;){const Zt=t[B[Ce][0]];DT.call(Zt,B[Ce][1].type)&&Zt[B[Ce][1].type].call(Object.assign({sliceSerialize:B[Ce][2].sliceSerialize},ye),B[Ce][1])}if(ye.tokenStack.length>0){const Zt=ye.tokenStack[ye.tokenStack.length-1];(Zt[1]||Hx).call(ye,void 0,Zt[0])}for(te.position={start:tr(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:tr(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce<t.transforms.length;)te=t.transforms[Ce](te)||te;return te}function o(B,te,ye){let ke=te-1,Ce=-1,Zt=!1,Zn,Lt,gt,Pt;for(;++ke<=ye;){const Ke=B[ke];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?Ce++:Ce--,Pt=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(Zn&&!Pt&&!Ce&&!gt&&(gt=ke),Pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pt=void 0}if(!Ce&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||Ce===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(Zn){let Ci=ke;for(Lt=void 0;Ci--;){const En=B[Ci];if(En[1].type==="lineEnding"||En[1].type==="lineEndingBlank"){if(En[0]==="exit")continue;Lt&&(B[Lt][1].type="lineEndingBlank",Zt=!0),En[1].type="lineEnding",Lt=Ci}else if(!(En[1].type==="linePrefix"||En[1].type==="blockQuotePrefix"||En[1].type==="blockQuotePrefixWhitespace"||En[1].type==="blockQuoteMarker"||En[1].type==="listItemIndent"))break}gt&&(!Lt||gt<Lt)&&(Zn._spread=!0),Zn.end=Object.assign({},Lt?B[Lt][1].start:Ke[1].end),B.splice(Lt||ke,0,["exit",Zn,Ke[2]]),ke++,ye++}if(Ke[1].type==="listItemPrefix"){const Ci={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};Zn=Ci,B.splice(ke,0,["enter",Ci,Ke[2]]),ke++,ye++,gt=void 0,Pt=!0}}}return B[te][1]._spread=Zt,ye}function u(B,te){return ye;function ye(ke){d.call(this,B(ke),ke),te&&te.call(this,ke)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(B,te,ye){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([te,ye||void 0]),B.position={start:tr(te.start),end:void 0}}function p(B){return te;function te(ye){B&&B.call(this,ye),m.call(this,ye)}}function m(B,te){const ye=this.stack.pop(),ke=this.tokenStack.pop();if(ke)ke[0].type!==B.type&&(te?te.call(this,B,ke[0]):(ke[1]||Hx).call(this,B,ke[0]));else throw new Error("Cannot close `"+B.type+"` ("+yo({start:B.start,end:B.end})+"): its not open");ye.position.end=tr(B.end)}function g(){return T5(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(B){if(this.data.expectingFirstListItemValue){const te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function x(){const B=this.resume(),te=this.stack[this.stack.length-1];te.lang=B}function A(){const B=this.resume(),te=this.stack[this.stack.length-1];te.meta=B}function D(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const B=this.resume(),te=this.stack[this.stack.length-1];te.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const B=this.resume(),te=this.stack[this.stack.length-1];te.value=B.replace(/(\r?\n|\r)$/g,"")}function P(B){const te=this.resume(),ye=this.stack[this.stack.length-1];ye.label=te,ye.identifier=Za(this.sliceSerialize(B)).toLowerCase()}function N(){const B=this.resume(),te=this.stack[this.stack.length-1];te.title=B}function q(){const B=this.resume(),te=this.stack[this.stack.length-1];te.url=B}function Z(B){const te=this.stack[this.stack.length-1];if(!te.depth){const ye=this.sliceSerialize(B).length;te.depth=ye}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function K(B){const te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(B){const ye=this.stack[this.stack.length-1].children;let ke=ye[ye.length-1];(!ke||ke.type!=="text")&&(ke=Tt(),ke.position={start:tr(B.start),end:void 0},ye.push(ke)),this.stack.push(ke)}function re(B){const te=this.stack.pop();te.value+=this.sliceSerialize(B),te.position.end=tr(B.end)}function ie(B){const te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=te.children[te.children.length-1];ye.position.end=tr(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(te.type)&&(ne.call(this,B),re.call(this,B))}function ae(){this.data.atHardBreak=!0}function be(){const B=this.resume(),te=this.stack[this.stack.length-1];te.value=B}function ee(){const B=this.resume(),te=this.stack[this.stack.length-1];te.value=B}function $(){const B=this.resume(),te=this.stack[this.stack.length-1];te.value=B}function O(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=te,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function Q(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=te,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function J(B){const te=this.sliceSerialize(B),ye=this.stack[this.stack.length-2];ye.label=wj(te),ye.identifier=Za(te).toLowerCase()}function fe(){const B=this.stack[this.stack.length-1],te=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ke=B.children;ye.children=ke}else ye.alt=te}function w(){const B=this.resume(),te=this.stack[this.stack.length-1];te.url=B}function k(){const B=this.resume(),te=this.stack[this.stack.length-1];te.title=B}function F(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function le(B){const te=this.resume(),ye=this.stack[this.stack.length-1];ye.label=te,ye.identifier=Za(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ce(B){this.data.characterReferenceType=B.type}function ue(B){const te=this.sliceSerialize(B),ye=this.data.characterReferenceType;let ke;ye?(ke=vT(te,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ke=tp(te);const Ce=this.stack[this.stack.length-1];Ce.value+=ke}function Ee(B){const te=this.stack.pop();te.position.end=tr(B.end)}function Ve(B){re.call(this,B);const te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(B)}function Se(B){re.call(this,B);const te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(B)}function wt(){return{type:"blockquote",children:[]}}function Nt(){return{type:"code",lang:null,meta:null,value:""}}function un(){return{type:"inlineCode",value:""}}function Ln(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rt(){return{type:"emphasis",children:[]}}function wi(){return{type:"heading",depth:0,children:[]}}function Ti(){return{type:"break"}}function ea(){return{type:"html",value:""}}function cn(){return{type:"image",title:null,url:"",alt:null}}function Ei(){return{type:"link",title:null,url:"",children:[]}}function Ai(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function vr(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function xr(){return{type:"paragraph",children:[]}}function Sr(){return{type:"strong",children:[]}}function Tt(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function tr(e){return{line:e.line,column:e.column,offset:e.offset}}function MT(e,t){let i=-1;for(;++i<t.length;){const a=t[i];Array.isArray(a)?MT(e,a):Cj(e,a)}}function Cj(e,t){let i;for(i in t)if(DT.call(t,i))switch(i){case"canContainEols":{const a=t[i];a&&e[i].push(...a);break}case"transforms":{const a=t[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=t[i];a&&Object.assign(e[i],a);break}}}function Hx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yo({start:t.start,end:t.end})+") is still open")}function _j(e){const t=this;t.parser=i;function i(a){return Ej(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function kj(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function Dj(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
`}]}function Mj(e,t){const i=t.value?t.value+`
`:"",a={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function Nj(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Rj(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Oj(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=ls(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=u+1,d+=1,e.footnoteCounts.set(a,d);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function zj(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Lj(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function NT(e,t){const i=t.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=a:o.push({type:"text",value:a}),o}function jj(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return NT(e,t);const o={src:ls(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function Ij(e,t){const i={src:ls(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Bj(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,a),e.applyData(t,a)}function Uj(e,t){const i=String(t.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return NT(e,t);const o={href:ls(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function Pj(e,t){const i={href:ls(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Vj(e,t,i){const a=e.all(t),o=i?Hj(i):RT(t),u={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(o||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
`}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const p=a[a.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
`});const m={type:"element",tagName:"li",properties:u,children:c};return e.patch(t,m),e.applyData(t,m)}function Hj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let a=-1;for(;!t&&++a<i.length;)t=RT(i[a])}return t}function RT(e){const t=e.spread;return t??e.children.length>1}function Fj(e,t){const i={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++o<a.length;){const c=a[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function qj(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Gj(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function Yj(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Xj(e,t){const i=e.all(t),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},d=Zm(t.children[1]),p=dT(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function Kj(e,t,i){const a=i?i.children:void 0,u=(a?a.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,d=c?c.length:t.children.length;let p=-1;const m=[];for(;++p<d;){const y=t.children[p],v={},x=c?c[p]:void 0;x&&(v.align=x);let A={type:"element",tagName:u,properties:v,children:[]};y&&(A.children=e.all(y),e.patch(y,A),A=e.applyData(y,A)),m.push(A)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function Qj(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const Fx=9,qx=32;function Wj(e){const t=String(e),i=/\r?\n|\r/g;let a=i.exec(t),o=0;const u=[];for(;a;)u.push(Gx(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(t);return u.push(Gx(t.slice(o),o>0,!1)),u.join("")}function Gx(e,t,i){let a=0,o=e.length;if(t){let u=e.codePointAt(a);for(;u===Fx||u===qx;)a++,u=e.codePointAt(a)}if(i){let u=e.codePointAt(o-1);for(;u===Fx||u===qx;)o--,u=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function Zj(e,t){const i={type:"text",value:Wj(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function $j(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const Jj={blockquote:kj,break:Dj,code:Mj,delete:Nj,emphasis:Rj,footnoteReference:Oj,heading:zj,html:Lj,imageReference:jj,image:Ij,inlineCode:Bj,linkReference:Uj,link:Pj,listItem:Vj,list:Fj,paragraph:qj,root:Gj,strong:Yj,table:Xj,tableCell:Qj,tableRow:Kj,text:Zj,thematicBreak:$j,toml:du,yaml:du,definition:du,footnoteDefinition:du};function du(){}const OT=-1,ac=0,vo=1,Xu=2,rp=3,ap=4,sp=5,op=6,zT=7,LT=8,Yx=typeof self=="object"?self:globalThis,eI=(e,t)=>{const i=(o,u)=>(e.set(u,o),o),a=o=>{if(e.has(o))return e.get(o);const[u,c]=t[o];switch(u){case ac:case OT:return i(c,o);case vo:{const d=i([],o);for(const p of c)d.push(a(p));return d}case Xu:{const d=i({},o);for(const[p,m]of c)d[a(p)]=a(m);return d}case rp:return i(new Date(c),o);case ap:{const{source:d,flags:p}=c;return i(new RegExp(d,p),o)}case sp:{const d=i(new Map,o);for(const[p,m]of c)d.set(a(p),a(m));return d}case op:{const d=i(new Set,o);for(const p of c)d.add(a(p));return d}case zT:{const{name:d,message:p}=c;return i(new Yx[d](p),o)}case LT:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(new Yx[u](c),o)};return a},Xx=e=>eI(new Map,e)(0),Va="",{toString:tI}={},{keys:nI}=Object,uo=e=>{const t=typeof e;if(t!=="object"||!e)return[ac,t];const i=tI.call(e).slice(8,-1);switch(i){case"Array":return[vo,Va];case"Object":return[Xu,Va];case"Date":return[rp,Va];case"RegExp":return[ap,Va];case"Map":return[sp,Va];case"Set":return[op,Va];case"DataView":return[vo,i]}return i.includes("Array")?[vo,i]:i.includes("Error")?[zT,i]:[Xu,i]},hu=([e,t])=>e===ac&&(t==="function"||t==="symbol"),iI=(e,t,i,a)=>{const o=(c,d)=>{const p=a.push(c)-1;return i.set(d,p),p},u=c=>{if(i.has(c))return i.get(c);let[d,p]=uo(c);switch(d){case ac:{let g=c;switch(p){case"bigint":d=LT,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return o([OT],c)}return o([d,g],c)}case vo:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),o([p,[...v]],c)}const g=[],y=o([d,g],c);for(const v of c)g.push(u(v));return y}case Xu:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(t&&"toJSON"in c)return u(c.toJSON());const g=[],y=o([d,g],c);for(const v of nI(c))(e||!hu(uo(c[v])))&&g.push([u(v),u(c[v])]);return y}case rp:return o([d,c.toISOString()],c);case ap:{const{source:g,flags:y}=c;return o([d,{source:g,flags:y}],c)}case sp:{const g=[],y=o([d,g],c);for(const[v,x]of c)(e||!(hu(uo(v))||hu(uo(x))))&&g.push([u(v),u(x)]);return y}case op:{const g=[],y=o([d,g],c);for(const v of c)(e||!hu(uo(v)))&&g.push(u(v));return y}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return u},Kx=(e,{json:t,lossy:i}={})=>{const a=[];return iI(!(t||i),!!t,new Map,a)(e),a},Ku=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xx(Kx(e,t)):structuredClone(e):(e,t)=>Xx(Kx(e,t));function rI(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function aI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||rI,a=e.options.footnoteBackLabel||aI,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const g=e.all(m),y=String(m.identifier).toUpperCase(),v=ls(y.toLowerCase());let x=0;const A=[],D=e.footnoteCounts.get(y);for(;D!==void 0&&++x<=D;){A.length>0&&A.push({type:"text",value:" "});let P=typeof i=="string"?i:i(p,x);typeof P=="string"&&(P={type:"text",value:P}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,x),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const R=g[g.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const P=R.children[R.children.length-1];P&&P.type==="text"?P.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...A)}else g.push(...A);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(m,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ku(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
`}]}}const jT=(function(e){if(e==null)return cI;if(typeof e=="function")return sc(e);if(typeof e=="object")return Array.isArray(e)?oI(e):lI(e);if(typeof e=="string")return uI(e);throw new Error("Expected function, string, or object as test")});function oI(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=jT(e[i]);return sc(a);function a(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function lI(e){const t=e;return sc(i);function i(a){const o=a;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function uI(e){return sc(t);function t(i){return i&&i.type===e}}function sc(e){return t;function t(i,a,o){return!!(fI(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function cI(){return!0}function fI(e){return e!==null&&typeof e=="object"&&"type"in e}const IT=[],dI=!0,Qx=!1,hI="skip";function mI(e,t,i,a){let o;typeof t=="function"&&typeof i!="function"?(a=i,i=t):o=t;const u=jT(o),c=a?-1:1;d(e,void 0,[])();function d(p,m,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=IT,A,D,R;if((!t||u(p,m,g[g.length-1]||void 0))&&(x=pI(i(p,g)),x[0]===Qx))return x;if("children"in p&&p.children){const C=p;if(C.children&&x[0]!==hI)for(D=(a?C.children.length:-1)+c,R=g.concat(C);D>-1&&D<C.children.length;){const P=C.children[D];if(A=d(P,D,R)(),A[0]===Qx)return A;D=typeof A[1]=="number"?A[1]:D+c}}return x}}}function pI(e){return Array.isArray(e)?e:typeof e=="number"?[dI,e]:e==null?IT:[e]}function BT(e,t,i,a){let o,u,c;typeof t=="function"&&typeof i!="function"?(u=void 0,c=t,o=i):(u=t,c=i,o=a),mI(e,u,d,o);function d(p,m){const g=m[m.length-1],y=g?g.children.indexOf(p):void 0;return c(p,y,g)}}const Jh={}.hasOwnProperty,gI={};function yI(e,t){const i=t||gI,a=new Map,o=new Map,u=new Map,c={...Jj,...i.handlers},d={all:m,applyData:vI,definitionById:a,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:bI,wrap:SI};return BT(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:o,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),d;function p(g,y){const v=g.type,x=d.handlers[v];if(Jh.call(d.handlers,v)&&x)return x(d,g,y);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in g){const{children:D,...R}=g,C=Ku(R);return C.children=d.all(g),C}return Ku(g)}return(d.options.unknownHandler||xI)(d,g,y)}function m(g){const y=[];if("children"in g){const v=g.children;let x=-1;for(;++x<v.length;){const A=d.one(v[x],g);if(A){if(x&&v[x-1].type==="break"&&(!Array.isArray(A)&&A.type==="text"&&(A.value=Wx(A.value)),!Array.isArray(A)&&A.type==="element")){const D=A.children[0];D&&D.type==="text"&&(D.value=Wx(D.value))}Array.isArray(A)?y.push(...A):y.push(A)}}}return y}}function bI(e,t){e.position&&(t.position=t5(e))}function vI(e,t){let i=t;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,Ku(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function xI(e,t){const i=t.data||{},a="value"in t&&!(Jh.call(i,"hProperties")||Jh.call(i,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function SI(e,t){const i=[];let a=-1;for(t&&i.push({type:"text",value:`
`});++a<e.length;)a&&i.push({type:"text",value:`
`}),i.push(e[a]);return t&&e.length>0&&i.push({type:"text",value:`
`}),i}function Wx(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function Zx(e,t){const i=yI(e,t),a=i.one(e,void 0),o=sI(i),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
`},o),u}function wI(e,t){return e&&"run"in e?async function(i,a){const o=Zx(i,{file:a,...t});await e.run(o,a)}:function(i,a){return Zx(i,{file:a,...e||t})}}function $x(e){if(e)throw e}var ih,Jx;function TI(){if(Jx)return ih;Jx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},u=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var v;for(v in m);return typeof v>"u"||e.call(m,v)},c=function(m,g){i&&g.name==="__proto__"?i(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},d=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return ih=function p(){var m,g,y,v,x,A,D=arguments[0],R=1,C=arguments.length,P=!1;for(typeof D=="boolean"&&(P=D,D=arguments[1]||{},R=2),(D==null||typeof D!="object"&&typeof D!="function")&&(D={});R<C;++R)if(m=arguments[R],m!=null)for(g in m)y=d(D,g),v=d(m,g),D!==v&&(P&&v&&(u(v)||(x=o(v)))?(x?(x=!1,A=y&&o(y)?y:[]):A=y&&u(y)?y:{},c(D,{name:g,newValue:p(P,A,v)})):typeof v<"u"&&c(D,{name:g,newValue:v}));return D},ih}var EI=TI();const rh=nm(EI);function em(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)}function AI(){const e=[],t={run:i,use:a};return t;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(p,...m){const g=e[++u];let y=-1;if(p){c(p);return}for(;++y<o.length;)(m[y]===null||m[y]===void 0)&&(m[y]=o[y]);o=m,g?CI(g,d)(...m):c(null,...m)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function CI(e,t){let i;return a;function a(...c){const d=e.length>c.length;let p;d&&c.push(o);try{p=e.apply(this,c)}catch(m){const g=m;if(d&&i)throw g;return o(g)}d||(p&&p.then&&typeof p.then=="function"?p.then(u,o):p instanceof Error?o(p):u(p))}function o(c,...d){i||(i=!0,t(c,...d))}function u(c){o(null,c)}}const Vn={basename:_I,dirname:kI,extname:DI,join:MI,sep:"/"};function _I(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Po(e);let i=0,a=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else a<0&&(u=!0,a=o+1);return a<0?"":e.slice(i,a)}if(t===e)return"";let c=-1,d=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),d>-1&&(e.codePointAt(o)===t.codePointAt(d--)?d<0&&(a=o):(d=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function kI(e){if(Po(e),e.length===0)return".";let t=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){t=i;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function DI(e){Po(e);let t=e.length,i=-1,a=0,o=-1,u=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}i<0&&(c=!0,i=t+1),d===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===a+1?"":e.slice(o,i)}function MI(...e){let t=-1,i;for(;++t<e.length;)Po(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":NI(i)}function NI(e){Po(e);const t=e.codePointAt(0)===47;let i=RI(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function RI(e,t){let i="",a=0,o=-1,u=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",a=0):(i=i.slice(0,p),a=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",a=0,o=c,u=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),a=c-o-1;o=c,u=0}else d===46&&u>-1?u++:u=-1}return i}function Po(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const OI={cwd:zI};function zI(){return"/"}function tm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function LI(e){if(typeof e=="string")e=new URL(e);else if(!tm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return jI(e)}function jI(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const a=t.codePointAt(i+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ah=["history","path","basename","stem","extname","dirname"];class UT{constructor(t){let i;t?tm(t)?i={path:t}:typeof t=="string"||II(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":OI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<ah.length;){const u=ah[a];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)ah.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Vn.basename(this.path):void 0}set basename(t){oh(t,"basename"),sh(t,"basename"),this.path=Vn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vn.dirname(this.path):void 0}set dirname(t){e1(this.basename,"dirname"),this.path=Vn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vn.extname(this.path):void 0}set extname(t){if(sh(t,"extname"),e1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tm(t)&&(t=LI(t)),oh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vn.basename(this.path,this.extname):void 0}set stem(t){oh(t,"stem"),sh(t,"stem"),this.path=Vn.join(this.dirname||"",t+(this.extname||""))}fail(t,i,a){const o=this.message(t,i,a);throw o.fatal=!0,o}info(t,i,a){const o=this.message(t,i,a);return o.fatal=void 0,o}message(t,i,a){const o=new zt(t,i,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sh(e,t){if(e&&e.includes(Vn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vn.sep+"`")}function oh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function e1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function II(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BI=(function(e){const a=this.constructor.prototype,o=a[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),UI={}.hasOwnProperty;class lp extends BI{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=AI()}copy(){const t=new lp;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];t.use(...a)}return t.data(rh(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(ch("data",this.frozen),this.namespace[t]=i,this):UI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ch("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=mu(t),a=this.parser||this.Parser;return lh("parse",a),a(String(i),i)}process(t,i){const a=this;return this.freeze(),lh("process",this.parser||this.Parser),uh("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const d=mu(t),p=a.parse(d);a.run(p,d,function(g,y,v){if(g||!y||!v)return m(g);const x=y,A=a.stringify(x,v);HI(A)?v.value=A:v.result=A,m(g,v)});function m(g,y){g||!y?c(g):u?u(y):i(void 0,y)}}}processSync(t){let i=!1,a;return this.freeze(),lh("processSync",this.parser||this.Parser),uh("processSync",this.compiler||this.Compiler),this.process(t,o),n1("processSync","process",i),a;function o(u,c){i=!0,$x(u),a=c}}run(t,i,a){t1(t),this.freeze();const o=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?u(void 0,a):new Promise(u);function u(c,d){const p=mu(i);o.run(t,p,m);function m(g,y,v){const x=y||t;g?d(g):c?c(x):a(void 0,x,v)}}}runSync(t,i){let a=!1,o;return this.run(t,i,u),n1("runSync","run",a),o;function u(c,d){$x(c),o=d,a=!0}}stringify(t,i){this.freeze();const a=mu(i),o=this.compiler||this.Compiler;return uh("stringify",o),t1(t),o(t,a)}use(t,...i){const a=this.attachers,o=this.namespace;if(ch("use",this.frozen),t!=null)if(typeof t=="function")p(t,i);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(m.plugins),m.settings&&(o.settings=rh(!0,o.settings,m.settings))}function d(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];u(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,v=-1;for(;++y<a.length;)if(a[y][0]===m){v=y;break}if(v===-1)a.push([m,...g]);else if(g.length>0){let[x,...A]=g;const D=a[v][1];em(D)&&em(x)&&(x=rh(!0,D,x)),a[v]=[m,x,...A]}}}}const PI=new lp().freeze();function lh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function uh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ch(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function t1(e){if(!em(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function n1(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mu(e){return VI(e)?e:new UT(e)}function VI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HI(e){return typeof e=="string"||FI(e)}function FI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",i1=[],r1={allowDangerousHtml:!0},GI=/^(https?|ircs?|mailto|xmpp)$/i,YI=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function XI(e){const t=KI(e),i=QI(e);return WI(t.runSync(t.parse(i),i),e)}function KI(e){const t=e.rehypePlugins||i1,i=e.remarkPlugins||i1,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...r1}:r1;return PI().use(_j).use(i).use(wI,a).use(t)}function QI(e){const t=e.children||"",i=new UT;return typeof t=="string"&&(i.value=t),i}function WI(e,t){const i=t.allowedElements,a=t.allowElement,o=t.components,u=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||ZI;for(const g of YI)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+qI+g.id,void 0);return BT(e,m),s5(e,{Fragment:E.Fragment,components:o,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function m(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let x;for(x in eh)if(Object.hasOwn(eh,x)&&Object.hasOwn(g.properties,x)){const A=g.properties[x],D=eh[x];(D===null||D.includes(g.tagName))&&(g.properties[x]=p(String(A||""),x,g))}}if(g.type==="element"){let x=i?!i.includes(g.tagName):u?u.includes(g.tagName):!1;if(!x&&a&&typeof y=="number"&&(x=!a(g,y,v)),x&&v&&typeof y=="number")return d&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function ZI(e){const t=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||i!==-1&&t>i||a!==-1&&t>a||GI.test(e.slice(0,t))?e:""}const $I=/https:\/\/drive\.google\.com\/(?:drive\/u\/\d+\/folders|drive\/folders)\/[^\s)\]}"']+/i,JI=e=>{const t=e.match($I);return(t==null?void 0:t[0])||null},a1=e=>{const t=Number.isFinite(e)?Math.max(0,Math.floor(e)):0,i=Math.floor(t/60),a=t%60;return`${i}:${a.toString().padStart(2,"0")}`},eB=e=>e.type==="image"?"Imagen de referencia":e.type==="audio"?"Nota de voz":e.category==="campaign"?"Campaña / gráfico":e.type==="document"?"Documento":"Archivo adjunto",tB=({attachment:e})=>{const t=`${(e.file.size/1024).toFixed(1)} KB`,i=eB(e);if(e.type==="image")return E.jsxs("div",{className:"glm-message-attachment flex w-full max-w-[320px] items-center gap-3 rounded-2xl border border-[#D0D0D0]/70 bg-white/95 px-3 py-3 text-[#4A4A4A] shadow-[0_8px_22px_rgba(79,117,139,0.10)]",children:[E.jsx("div",{className:"h-14 w-14 shrink-0 overflow-hidden rounded-xl border border-[#D0D0D0]/65 bg-[#F9FBFC]",children:E.jsx("img",{src:e.url,alt:e.file.name,className:"h-full w-full object-cover"})}),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsx("p",{className:"truncate text-sm font-semibold text-[#2E4052]",children:e.file.name}),E.jsx("p",{className:"truncate text-xs font-medium text-[#6B8FA3]",children:i}),E.jsx("p",{className:"mt-0.5 text-[11px] text-[#8EA1B3]",children:t})]})]});const a=e.type==="audio"?PM:kM;return E.jsxs("div",{className:"glm-message-attachment flex w-full max-w-[320px] items-center gap-3 rounded-2xl border border-[#D0D0D0]/70 bg-white/95 px-3 py-3 text-[#4A4A4A] shadow-[0_8px_22px_rgba(79,117,139,0.10)]",children:[E.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-xl border border-[#D0D0D0]/60 bg-[#F7FAF8]",children:E.jsx(a,{className:"h-5 w-5 text-[#4F758B]"})}),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsx("p",{className:"truncate text-sm font-semibold text-[#2E4052]",children:e.file.name}),E.jsx("p",{className:"truncate text-xs font-medium text-[#6B8FA3]",children:i}),E.jsx("p",{className:"mt-0.5 text-[11px] text-[#8EA1B3]",children:t})]})]})},nB=({url:e,onClose:t})=>{const[i,a]=nr.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(e),a(!0),window.setTimeout(()=>a(!1),1800)}catch(u){console.error("No se pudo copiar el enlace de Drive:",u)}};return E.jsxs(Fn.div,{initial:{opacity:0,y:10,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.98},className:"mb-5 overflow-hidden rounded-[28px] border border-indigo-300/25 bg-[linear-gradient(135deg,rgba(99,102,241,0.22),rgba(34,211,238,0.12))] p-4 shadow-[0_22px_60px_rgba(79,70,229,0.22)] sm:p-5",children:[E.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.24em] text-indigo-100/80",children:"Carpeta generada"}),E.jsx("h4",{className:"mt-2 text-lg font-semibold text-white",children:"Enlace de Drive listo"}),E.jsx("p",{className:"mt-1 text-sm leading-6 text-zinc-300",children:"Copia o abre la carpeta con el contenido del brief."})]}),E.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-white/10 text-zinc-200 transition hover:bg-white/20 hover:text-white","aria-label":"Cerrar tarjeta del enlace",children:E.jsx(jh,{className:"h-4 w-4"})})]}),E.jsxs("div",{className:"mt-4 flex flex-col gap-3 rounded-2xl border border-white/10 bg-black/25 p-3 sm:flex-row sm:items-center",children:[E.jsx("div",{className:"min-w-0 flex-1 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-sm text-zinc-200",children:E.jsx("p",{className:"truncate font-mono",children:e})}),E.jsxs("div",{className:"flex gap-2",children:[E.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white px-4 py-2.5 text-sm font-semibold text-[#4F758B] transition hover:bg-[#F8FBF6]",children:[i?E.jsx(yM,{className:"h-4 w-4"}):E.jsx(EM,{className:"h-4 w-4"}),i?"Copiado":"Copiar"]}),E.jsxs("a",{href:e,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white/10 px-4 py-2.5 text-sm font-semibold text-white transition hover:bg-white/15",children:[E.jsx(CM,{className:"h-4 w-4"}),"Abrir"]})]})]})]})},iB=({message:e})=>{var R,C;const t=e.sender==="user",[i,a]=nr.useState(!1),[o,u]=nr.useState(0),[c,d]=nr.useState(((R=e.audio)==null?void 0:R.duration)||0),[p,m]=nr.useState(!0),g=nr.useRef(null),y=t?null:JI(e.text),v=Math.max(0,c||((C=e.audio)==null?void 0:C.duration)||0),x=v?Math.min(100,Math.max(0,o/v*100)):0,A=async()=>{if(g.current)try{i?g.current.pause():await g.current.play()}catch(P){console.error("No se pudo reproducir la nota de voz:",P),a(!1)}},D=P=>{const N=Number(P.target.value);u(N),g.current&&(g.current.currentTime=N)};return nr.useEffect(()=>{m(!0)},[e.id,e.text]),nr.useEffect(()=>{var P;if(a(!1),u(0),d(((P=e.audio)==null?void 0:P.duration)||0),e.audio){const N=new Audio(e.audio.url);N.preload="metadata";const q=()=>{u(N.currentTime||0)};N.onloadedmetadata=()=>{var L;const Z=Number.isFinite(N.duration)?N.duration:0;d(Z||((L=e.audio)==null?void 0:L.duration)||0)},N.ontimeupdate=q,N.onseeking=q,N.onseeked=q,N.onplay=()=>a(!0),N.onpause=()=>{a(!1),q()},N.onended=()=>{a(!1),N.currentTime=0,u(0)},g.current=N}return()=>{g.current&&(g.current.pause(),g.current.src="",g.current=null)}},[e.audio]),E.jsx(Fn.div,{initial:{opacity:0,y:14,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{duration:.32,ease:[.23,1,.32,1]},className:Mn("mb-5 flex w-full",t?"justify-end":"justify-start"),children:E.jsxs("div",{className:Mn("flex flex-col gap-1",t?"max-w-3xl items-end":"w-full max-w-none items-start"),children:[!t&&E.jsxs("div",{className:"mb-1 inline-flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.2em] text-zinc-400",children:[E.jsx(XM,{className:"h-3.5 w-3.5 text-indigo-300"}),"Respuesta del portal"]}),E.jsxs("div",{className:Mn("relative overflow-hidden border shadow-[0_16px_40px_rgba(0,0,0,0.25)]",t?"max-w-[85%] rounded-[26px] rounded-br-md border-indigo-400/20 bg-[linear-gradient(135deg,rgba(79,70,229,0.96),rgba(37,99,235,0.92))] px-4 py-4 text-white sm:px-5":"w-full max-w-none rounded-[28px] rounded-bl-md border-white/10 bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03))] px-5 py-5 text-zinc-100 backdrop-blur-xl sm:px-6 sm:py-6"),children:[!t&&E.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_right,rgba(129,140,248,0.14),transparent_26%)]"}),E.jsxs("div",{className:"relative",children:[y&&p&&E.jsx(nB,{url:y,onClose:()=>m(!1)}),e.attachments&&e.attachments.length>0&&E.jsx("div",{className:"mb-4 flex flex-wrap gap-3",children:e.attachments.map(P=>E.jsx(tB,{attachment:P},P.id))}),e.audio&&E.jsx("div",{className:"glm-message-audio mb-4 rounded-2xl border border-[#D0D0D0]/70 bg-white/95 p-3 pr-4 shadow-[0_8px_22px_rgba(79,117,139,0.10)]",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("button",{type:"button",onClick:A,className:"glm-message-audio-toggle flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-[#4F758B] text-white shadow-[0_8px_18px_rgba(79,117,139,0.24)] transition hover:bg-[#5B7F95]","aria-label":i?"Pausar audio":"Reproducir audio",children:i?E.jsx(QS,{className:"h-5 w-5",fill:"currentColor"}):E.jsx(WS,{className:"ml-0.5 h-5 w-5",fill:"currentColor"})}),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-3",children:[E.jsx("span",{className:"text-xs font-semibold text-[#4F758B]",children:i?"Reproduciendo":"Nota de voz"}),E.jsxs("span",{className:"shrink-0 text-xs font-mono text-[#6B8FA3]",children:[a1(o)," / ",a1(v)]})]}),E.jsxs("div",{className:"relative h-5",children:[E.jsx("div",{className:"absolute left-0 right-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-[#6CC24A]/20"}),E.jsx("div",{className:"absolute left-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-[#6CC24A]/70",style:{width:`${x}%`}}),E.jsx("input",{type:"range",min:"0",max:Math.max(1,v),step:"0.01",value:Math.min(o,v||0),onChange:D,className:"message-audio-range absolute inset-0 w-full cursor-pointer","aria-label":"Adelantar o atrasar la nota de voz"})]})]})]})}),e.text&&E.jsx("div",{className:Mn("break-words text-[15px] leading-7 sm:text-base",t?"whitespace-pre-wrap":""),children:t?e.text:E.jsx("div",{className:"prose prose-invert max-w-none prose-p:my-3 prose-p:leading-8 prose-headings:mb-3 prose-headings:mt-1 prose-headings:text-white prose-strong:text-white prose-li:my-1 prose-ul:my-3 prose-ol:my-3 prose-pre:overflow-x-auto prose-pre:rounded-2xl prose-pre:border prose-pre:border-white/10 prose-pre:bg-black/35 prose-pre:p-4 prose-pre:text-[13px] prose-code:text-indigo-200",children:E.jsx(XI,{children:e.text})})})]})]}),E.jsxs("div",{className:"mt-1 flex items-center gap-1.5 px-1",children:[E.jsx("span",{className:"text-[11px] font-medium text-zinc-500",children:M4(e.timestamp,"HH:mm")}),t&&E.jsxs("span",{className:"text-zinc-500",children:[e.status==="sending"&&E.jsx(Lh,{className:"h-3.5 w-3.5 animate-pulse text-zinc-400"}),e.status==="sent"&&E.jsx(pM,{className:"h-3.5 w-3.5 text-indigo-400"}),e.status==="error"&&E.jsx(Lh,{className:"h-3.5 w-3.5 text-red-500"})]})]})]})})},rB="/brief/glm-logo.png",aB=({onLogin:e,isLoading:t,error:i})=>E.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-[#F4F7F5] px-4 py-12 select-none",children:[E.jsx("div",{className:"absolute inset-0 premium-grid-bg opacity-75 pointer-events-none"}),E.jsxs("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:[E.jsx(Fn.div,{animate:{x:[0,45,-25,0],y:[0,-60,40,0],scale:[1,1.15,.95,1]},transition:{duration:22,repeat:1/0,ease:"easeInOut"},className:"absolute left-[-8%] top-[-12%] h-[36rem] w-[36rem] rounded-full bg-[#EEF6E8]/70 blur-[90px]"}),E.jsx(Fn.div,{animate:{x:[0,-35,45,0],y:[0,50,-40,0],scale:[1,.95,1.1,1]},transition:{duration:26,repeat:1/0,ease:"easeInOut"},className:"absolute right-[-6%] top-[8%] h-[32rem] w-[32rem] rounded-full bg-[#D6E8F4]/70 blur-[100px]"}),E.jsx(Fn.div,{animate:{x:[0,30,-30,0],y:[0,40,-40,0],scale:[1,1.05,.95,1]},transition:{duration:18,repeat:1/0,ease:"easeInOut"},className:"absolute bottom-[-15%] left-[20%] h-[30rem] w-[30rem] rounded-full bg-white/70 blur-[90px]"})]}),E.jsxs(Fn.div,{initial:{opacity:0,y:32,scale:.97},animate:{opacity:1,y:0,scale:1},transition:{duration:.8,ease:[.16,1,.3,1]},className:"relative w-full max-w-[400px] overflow-hidden rounded-[32px] border border-white/50 bg-white/75 px-10 py-12 shadow-[0_32px_96px_rgba(79,117,139,0.14)] backdrop-blur-2xl font-['Plus_Jakarta_Sans',sans-serif]",children:[E.jsx("div",{className:"absolute top-0 inset-x-0 h-[4px] bg-gradient-to-r from-[#6CC24A] via-[#5B7F95] to-[#4F758B]"}),E.jsxs("div",{className:"flex flex-col items-center text-center",children:[E.jsx("div",{className:"flex h-24 w-24 items-center justify-center overflow-hidden rounded-[24px] border border-slate-200/60 bg-white p-3 shadow-[0_8px_28px_rgba(79,117,139,0.12)]",children:E.jsx("img",{src:rB,alt:"GLM Logo",className:"h-full w-full object-contain"})}),E.jsx("h1",{className:"mt-8 text-[2rem] font-bold tracking-tight leading-tight",children:E.jsx("span",{className:"bg-gradient-to-r from-[#4F758B] via-[#5B7F95] to-[#6B8FA3] bg-clip-text text-transparent",children:"Portal Brief CDC"})}),E.jsx("p",{className:"mt-2.5 text-[11px] font-semibold uppercase tracking-[0.22em] text-slate-400",children:"GomezLee Marketing"}),i&&E.jsxs(Fn.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mt-6 w-full rounded-xl border border-rose-100 bg-rose-50/50 px-4 py-3 text-xs leading-relaxed text-rose-600 flex items-start gap-2.5",children:[E.jsx("div",{className:"mt-1 h-1.5 w-1.5 shrink-0 rounded-full bg-rose-500 animate-pulse"}),E.jsx("span",{children:i})]}),E.jsxs("button",{onClick:e,disabled:t,className:"shimmer-btn group mt-10 relative flex w-full items-center justify-center gap-3 rounded-2xl bg-gradient-to-r from-[#4F758B] to-[#5B7F95] px-6 py-4 text-sm font-semibold text-white shadow-[0_12px_28px_rgba(79,117,139,0.2)] transition-all duration-300 hover:from-[#456A7F] hover:to-[#4F758B] hover:shadow-[0_16px_36px_rgba(79,117,139,0.3)] active:scale-[0.99] disabled:pointer-events-none disabled:opacity-50",children:[t?E.jsx(Om,{className:"h-5 w-5 animate-spin"}):E.jsxs("svg",{className:"h-5 w-5 shrink-0 transition-transform duration-300 group-hover:scale-110",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),E.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),E.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z",fill:"#FBBC05"}),E.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z",fill:"#EA4335"})]}),E.jsx("span",{className:"tracking-wide",children:t?"Abriendo Google...":"Continuar con Google"})]})]})]})]});var sB="firebase",oB="12.12.1";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/Ya(sB,oB,"app");const lB={apiKey:void 0,authDomain:void 0,projectId:void 0,storageBucket:void 0,messagingSenderId:void 0,appId:void 0},uB=ow(lB),pu=D3(uB),PT=new yi;PT.setCustomParameters({prompt:"select_account"});const s1="";function cB(){const[e,t]=W.useState([]),[i,a]=W.useState(!1),[o,u]=W.useState(!0),[c,d]=W.useState(null),[p,m]=W.useState(!0),[g,y]=W.useState(!1),[v,x]=W.useState(""),A=W.useRef(null),D=()=>{var N;(N=A.current)==null||N.scrollIntoView({behavior:"smooth",block:"end"})};W.useEffect(()=>{D()},[e,i]),W.useEffect(()=>{const N=bO(pu,q=>{d(q),m(!1)});return()=>N()},[]);const R=async()=>{try{y(!0),x("");const N=await BO(pu,PT);if(!(N.user.email||"").toLowerCase().endsWith("@gomezleemarketing.com".toLowerCase())){await $v(pu),x("Solo se permite acceso con cuentas corporativas de la empresa.");return}d(N.user)}catch(N){console.error("Google login error:",N),x("No se pudo iniciar sesión con Google.")}finally{y(!1)}},C=async()=>{await $v(pu),d(null)},P=async(N,q,Z,L,K="defined")=>{var re;const V=Math.random().toString(36).substring(7),ne={id:V,sender:"user",text:N,attachments:q,audio:Z,timestamp:new Date,status:"sending"};t(ie=>[...ie,ne]),a(!0);try{if(!s1)throw new Error("No hay webhook configurado en VITE_WEBHOOK_URL.");const ie=new Date().toISOString(),ae=(c==null?void 0:c.displayName)||((re=c==null?void 0:c.email)==null?void 0:re.split("@")[0])||"No especificado",be=(c==null?void 0:c.email)||"No especificado",ee=new FormData;ee.append("text",N),ee.append("timestamp",ie),ee.append("submittedAt",ie),ee.append("submittedByName",ae),ee.append("submittedByEmail",be),ee.append("submittedByUid",(c==null?void 0:c.uid)||""),ee.append("submittedByPhotoUrl",(c==null?void 0:c.photoURL)||"");const $=K==="pending"?"":L||"",O=K==="pending"?"Por confirmar":$;ee.append("deliveryDate",$),ee.append("fechaEntrega",$),ee.append("deliveryDateStatus",K),ee.append("fechaEntregaEstado",K==="pending"?"por_confirmar":"definida"),ee.append("deliveryDateLabel",O),ee.append("fechaEntregaTexto",O);let Q=0,J=0;q.forEach(T=>{if(T.category==="campaign"){ee.append(`campaign_file_${J}`,T.file),ee.append(`campaign_file_${J}_name`,T.file.name),J+=1;return}ee.append(`file_${Q}`,T.file),ee.append(`file_${Q}_name`,T.file.name),Q+=1}),ee.append("generalFilesCount",String(Q)),ee.append("campaignFilesCount",String(J)),Z&&ee.append("audio",Z.blob,"voice_note.webm");const fe=await fetch(s1,{method:"POST",body:ee});if(!fe.ok)throw new Error(`HTTP error! status: ${fe.status}`);let w;const k=fe.headers.get("content-type");k&&k.includes("application/json")?w=await fe.json():w=await fe.text(),t(T=>T.map(le=>le.id===V?{...le,status:"sent"}:le));const F={id:Math.random().toString(36).substring(7),sender:"system",text:typeof w=="object"?JSON.stringify(w,null,2):w||"Solicitud recibida correctamente.",timestamp:new Date,status:"sent"};t(T=>[...T,F]),u(!0)}catch(ie){console.error("Webhook error:",ie),u(!1),t(be=>be.map(ee=>ee.id===V?{...ee,status:"error"}:ee));const ae={id:Math.random().toString(36).substring(7),sender:"system",text:`**Error de conexión:** No se pudo conectar con el webhook configurado.
Verifica que la URL esté correcta en el entorno y que el endpoint esté activo y acepte solicitudes POST con FormData.`,timestamp:new Date,status:"error"};t(be=>[...be,ae])}finally{a(!1)}};return p?E.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[#F7FAF8] text-[#4F758B]",children:"Cargando acceso..."}):c?E.jsxs("div",{className:"glm-app relative flex min-h-screen flex-col overflow-x-hidden bg-[#F4F7F5] font-['Plus_Jakarta_Sans',sans-serif] text-[#4A4A4A] selection:bg-[#6CC24A]/20",children:[E.jsxs("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:[E.jsx("div",{className:"absolute left-[-10%] top-[-10%] h-[32rem] w-[32rem] rounded-full bg-[#EEF6E8]/60 blur-[90px]"}),E.jsx("div",{className:"absolute right-[-8%] top-[15%] h-[28rem] w-[28rem] rounded-full bg-[#D6E8F4]/60 blur-[90px]"})]}),E.jsx(wz,{isConnected:o,onLogout:C}),E.jsx("main",{className:"relative flex-1",children:E.jsxs("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 pb-10 sm:px-6 lg:px-8 flex flex-col gap-5",children:[E.jsx("section",{className:"overflow-hidden rounded-[28px] border border-white/60 bg-white/80 shadow-[0_8px_40px_rgba(79,117,139,0.10)] backdrop-blur-xl",children:E.jsx(Ez,{onSendMessage:P,isProcessing:i})}),(e.length>0||i)&&E.jsxs("section",{className:"overflow-hidden rounded-[28px] border border-white/60 bg-white/80 p-5 shadow-[0_8px_40px_rgba(79,117,139,0.10)] backdrop-blur-xl sm:p-6",children:[E.jsx("p",{className:"mb-4 text-xs font-bold uppercase tracking-[0.22em] text-[#6B8FA3]",children:"Respuesta del portal"}),E.jsx(LS,{initial:!1,children:e.map(N=>E.jsx(iB,{message:N},N.id))}),i&&E.jsxs(Fn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,scale:.9},className:"flex w-fit items-center gap-3 rounded-2xl border border-[#D0D0D0]/60 bg-white px-4 py-3 shadow-sm",children:[E.jsx(Om,{className:"h-4 w-4 animate-spin text-[#6CC24A]"}),E.jsx("span",{className:"text-sm font-medium text-[#4A4A4A]",children:"Procesando la solicitud..."})]}),E.jsx("div",{ref:A,className:"h-1"})]})]})})]}):E.jsx(aB,{onLogin:R,isLoading:g,error:v})}cC.createRoot(document.getElementById("root")).render(E.jsx(W.StrictMode,{children:E.jsx(cB,{})}));