import{r as Mg,a as Eg,b as N,u as Ds,L as K0,R as Tg,c as nl,N as Os,O as ws,d as ks,B as Ag}from"./vendor-BI0H_s0W.js";import{s as Us,e as Hs,a as Ba,b as Un,c as J0,i as W0,d as ui,f as Oe,p as tt,g as _l,h as $0,j as F0,k as ai,l as I0,m as P0,n as Cg,o as _g,q as Dg}from"./date-huy51PAD.js";(function(){const j=document.createElement("link").relList;if(j&&j.supports&&j.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))r(M);new MutationObserver(M=>{for(const _ of M)if(_.type==="childList")for(const H of _.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&r(H)}).observe(document,{childList:!0,subtree:!0});function O(M){const _={};return M.integrity&&(_.integrity=M.integrity),M.referrerPolicy&&(_.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?_.credentials="include":M.crossOrigin==="anonymous"?_.credentials="omit":_.credentials="same-origin",_}function r(M){if(M.ep)return;M.ep=!0;const _=O(M);fetch(M.href,_)}})();var zs={exports:{}},On={};/**
 * @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 q0;function Og(){if(q0)return On;q0=1;var f=Symbol.for("react.transitional.element"),j=Symbol.for("react.fragment");function O(r,M,_){var H=null;if(_!==void 0&&(H=""+_),M.key!==void 0&&(H=""+M.key),"key"in M){_={};for(var Y in M)Y!=="key"&&(_[Y]=M[Y])}else _=M;return M=_.ref,{$$typeof:f,type:r,key:H,ref:M!==void 0?M:null,props:_}}return On.Fragment=j,On.jsx=O,On.jsxs=O,On}var Y0;function wg(){return Y0||(Y0=1,zs.exports=Og()),zs.exports}var i=wg(),Ms={exports:{}},wn={},Es={exports:{}},Ts={};/**
 * @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 L0;function Ug(){return L0||(L0=1,(function(f){function j(b,C){var Q=b.length;b.push(C);e:for(;0<Q;){var se=Q-1>>>1,ie=b[se];if(0<M(ie,C))b[se]=C,b[Q]=ie,Q=se;else break e}}function O(b){return b.length===0?null:b[0]}function r(b){if(b.length===0)return null;var C=b[0],Q=b.pop();if(Q!==C){b[0]=Q;e:for(var se=0,ie=b.length,G=ie>>>1;se<G;){var te=2*(se+1)-1,z=b[te],E=te+1,me=b[E];if(0>M(z,Q))E<ie&&0>M(me,z)?(b[se]=me,b[E]=Q,se=E):(b[se]=z,b[te]=Q,se=te);else if(E<ie&&0>M(me,Q))b[se]=me,b[E]=Q,se=E;else break e}}return C}function M(b,C){var Q=b.sortIndex-C.sortIndex;return Q!==0?Q:b.id-C.id}if(f.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var _=performance;f.unstable_now=function(){return _.now()}}else{var H=Date,Y=H.now();f.unstable_now=function(){return H.now()-Y}}var R=[],B=[],Z=1,A=null,k=3,D=!1,w=!1,T=!1,U=!1,J=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,ee=typeof setImmediate<"u"?setImmediate:null;function $(b){for(var C=O(B);C!==null;){if(C.callback===null)r(B);else if(C.startTime<=b)r(B),C.sortIndex=C.expirationTime,j(R,C);else break;C=O(B)}}function xe(b){if(T=!1,$(b),!w)if(O(R)!==null)w=!0,ge||(ge=!0,ke());else{var C=O(B);C!==null&&Re(xe,C.startTime-b)}}var ge=!1,Ne=-1,Te=5,W=-1;function Ae(){return U?!0:!(f.unstable_now()-W<Te)}function He(){if(U=!1,ge){var b=f.unstable_now();W=b;var C=!0;try{e:{w=!1,T&&(T=!1,P(Ne),Ne=-1),D=!0;var Q=k;try{t:{for($(b),A=O(R);A!==null&&!(A.expirationTime>b&&Ae());){var se=A.callback;if(typeof se=="function"){A.callback=null,k=A.priorityLevel;var ie=se(A.expirationTime<=b);if(b=f.unstable_now(),typeof ie=="function"){A.callback=ie,$(b),C=!0;break t}A===O(R)&&r(R),$(b)}else r(R);A=O(R)}if(A!==null)C=!0;else{var G=O(B);G!==null&&Re(xe,G.startTime-b),C=!1}}break e}finally{A=null,k=Q,D=!1}C=void 0}}finally{C?ke():ge=!1}}}var ke;if(typeof ee=="function")ke=function(){ee(He)};else if(typeof MessageChannel<"u"){var Qe=new MessageChannel,Ve=Qe.port2;Qe.port1.onmessage=He,ke=function(){Ve.postMessage(null)}}else ke=function(){J(He,0)};function Re(b,C){Ne=J(function(){b(f.unstable_now())},C)}f.unstable_IdlePriority=5,f.unstable_ImmediatePriority=1,f.unstable_LowPriority=4,f.unstable_NormalPriority=3,f.unstable_Profiling=null,f.unstable_UserBlockingPriority=2,f.unstable_cancelCallback=function(b){b.callback=null},f.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<b?Math.floor(1e3/b):5},f.unstable_getCurrentPriorityLevel=function(){return k},f.unstable_next=function(b){switch(k){case 1:case 2:case 3:var C=3;break;default:C=k}var Q=k;k=C;try{return b()}finally{k=Q}},f.unstable_requestPaint=function(){U=!0},f.unstable_runWithPriority=function(b,C){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var Q=k;k=b;try{return C()}finally{k=Q}},f.unstable_scheduleCallback=function(b,C,Q){var se=f.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?se+Q:se):Q=se,b){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=Q+ie,b={id:Z++,callback:C,priorityLevel:b,startTime:Q,expirationTime:ie,sortIndex:-1},Q>se?(b.sortIndex=Q,j(B,b),O(R)===null&&b===O(B)&&(T?(P(Ne),Ne=-1):T=!0,Re(xe,Q-se))):(b.sortIndex=ie,j(R,b),w||D||(w=!0,ge||(ge=!0,ke()))),b},f.unstable_shouldYield=Ae,f.unstable_wrapCallback=function(b){var C=k;return function(){var Q=k;k=C;try{return b.apply(this,arguments)}finally{k=Q}}}})(Ts)),Ts}var R0;function Hg(){return R0||(R0=1,Es.exports=Ug()),Es.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 G0;function Bg(){if(G0)return wn;G0=1;var f=Hg(),j=Mg(),O=Eg();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function M(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function H(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function R(e){if(_(e)!==e)throw Error(r(188))}function B(e){var t=e.alternate;if(!t){if(t=_(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===l)return R(n),e;if(u===a)return R(n),t;u=u.sibling}throw Error(r(188))}if(l.return!==a.return)l=n,a=u;else{for(var c=!1,s=n.child;s;){if(s===l){c=!0,l=n,a=u;break}if(s===a){c=!0,a=n,l=u;break}s=s.sibling}if(!c){for(s=u.child;s;){if(s===l){c=!0,l=u,a=n;break}if(s===a){c=!0,a=u,l=n;break}s=s.sibling}if(!c)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function Z(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Z(e),t!==null)return t;e=e.sibling}return null}var A=Object.assign,k=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),ge=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),He=Symbol.iterator;function ke(e){return e===null||typeof e!="object"?null:(e=He&&e[He]||e["@@iterator"],typeof e=="function"?e:null)}var Qe=Symbol.for("react.client.reference");function Ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case J:return"Profiler";case U:return"StrictMode";case xe:return"Suspense";case ge:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case ee:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ne:return t=e.displayName||null,t!==null?t:Ve(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return Ve(e(t))}catch{}}return null}var Re=Array.isArray,b=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=O.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},se=[],ie=-1;function G(e){return{current:e}}function te(e){0>ie||(e.current=se[ie],se[ie]=null,ie--)}function z(e,t){ie++,se[ie]=e.current,e.current=t}var E=G(null),me=G(null),Ke=G(null),ul=G(null);function qt(e,t){switch(z(Ke,t),z(me,e),z(E,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?c0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=c0(t),e=s0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}te(E),z(E,e)}function Ct(){te(E),te(me),te(Ke)}function V(e){e.memoizedState!==null&&z(ul,e);var t=E.current,l=s0(t,e.type);t!==l&&(z(me,e),z(E,l))}function ze(e){me.current===e&&(te(E),te(me)),ul.current===e&&(te(ul),An._currentValue=Q)}var Pe,Yt;function lt(e){if(Pe===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||"",Yt=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Pe+e+Yt}var ci=!1;function si(e,t){if(!e||ci)return"";ci=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(x){var y=x}Reflect.construct(e,[],S)}else{try{S.call()}catch(x){y=x}e.call(S.prototype)}}else{try{throw Error()}catch(x){y=x}(S=e())&&typeof S.catch=="function"&&S.catch(function(){})}}catch(x){if(x&&y&&typeof x.stack=="string")return[x.stack,y.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),c=u[0],s=u[1];if(c&&s){var d=c.split(`
`),h=s.split(`
`);for(n=a=0;a<d.length&&!d[a].includes("DetermineComponentFrameRoot");)a++;for(;n<h.length&&!h[n].includes("DetermineComponentFrameRoot");)n++;if(a===d.length||n===h.length)for(a=d.length-1,n=h.length-1;1<=a&&0<=n&&d[a]!==h[n];)n--;for(;1<=a&&0<=n;a--,n--)if(d[a]!==h[n]){if(a!==1||n!==1)do if(a--,n--,0>n||d[a]!==h[n]){var v=`
`+d[a].replace(" at new "," at ");return e.displayName&&v.includes("<anonymous>")&&(v=v.replace("<anonymous>",e.displayName)),v}while(1<=a&&0<=n);break}}}finally{ci=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?lt(l):""}function lo(e,t){switch(e.tag){case 26:case 27:case 5:return lt(e.type);case 16:return lt("Lazy");case 13:return e.child!==t&&t!==null?lt("Suspense Fallback"):lt("Suspense");case 19:return lt("SuspenseList");case 0:case 15:return si(e.type,!1);case 11:return si(e.type.render,!1);case 1:return si(e.type,!0);case 31:return lt("Activity");default:return""}}function Bs(e){try{var t="",l=null;do t+=lo(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
Error generating stack: `+a.message+`
`+a.stack}}var ri=Object.prototype.hasOwnProperty,fi=f.unstable_scheduleCallback,di=f.unstable_cancelCallback,ao=f.unstable_shouldYield,no=f.unstable_requestPaint,ft=f.unstable_now,uo=f.unstable_getCurrentPriorityLevel,qs=f.unstable_ImmediatePriority,Ys=f.unstable_UserBlockingPriority,Bn=f.unstable_NormalPriority,io=f.unstable_LowPriority,Ls=f.unstable_IdlePriority,co=f.log,so=f.unstable_setDisableYieldValue,La=null,dt=null;function il(e){if(typeof co=="function"&&so(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(La,e)}catch{}}var ot=Math.clz32?Math.clz32:oo,ro=Math.log,fo=Math.LN2;function oo(e){return e>>>=0,e===0?32:31-(ro(e)/fo|0)|0}var qn=256,Yn=262144,Ln=4194304;function Ol(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~u,a!==0?n=Ol(a):(c&=s,c!==0?n=Ol(c):l||(l=s&~e,l!==0&&(n=Ol(l))))):(s=a&~u,s!==0?n=Ol(s):c!==0?n=Ol(c):l||(l=a&~e,l!==0&&(n=Ol(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function Ra(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mo(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Rs(){var e=Ln;return Ln<<=1,(Ln&62914560)===0&&(Ln=4194304),e}function oi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ga(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function go(e,t,l,a,n,u){var c=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var s=e.entanglements,d=e.expirationTimes,h=e.hiddenUpdates;for(l=c&~l;0<l;){var v=31-ot(l),S=1<<v;s[v]=0,d[v]=-1;var y=h[v];if(y!==null)for(h[v]=null,v=0;v<y.length;v++){var x=y[v];x!==null&&(x.lane&=-536870913)}l&=~S}a!==0&&Gs(e,a,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(c&~t))}function Gs(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ot(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Qs(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-ot(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Xs(e,t){var l=t&-t;return l=(l&42)!==0?1:mi(l),(l&(e.suspendedLanes|t))!==0?0:l}function mi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function gi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zs(){var e=C.p;return e!==0?e:(e=window.event,e===void 0?32:_0(e.type))}function Vs(e,t){var l=C.p;try{return C.p=e,t()}finally{C.p=l}}var cl=Math.random().toString(36).slice(2),Je="__reactFiber$"+cl,at="__reactProps$"+cl,Il="__reactContainer$"+cl,hi="__reactEvents$"+cl,ho="__reactListeners$"+cl,yo="__reactHandles$"+cl,Ks="__reactResources$"+cl,Qa="__reactMarker$"+cl;function yi(e){delete e[Je],delete e[at],delete e[hi],delete e[ho],delete e[yo]}function Pl(e){var t=e[Je];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Il]||l[Je]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=h0(e);e!==null;){if(l=e[Je])return l;e=h0(e)}return t}e=l,l=e.parentNode}return null}function ea(e){if(e=e[Je]||e[Il]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ta(e){var t=e[Ks];return t||(t=e[Ks]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[Qa]=!0}var Js=new Set,Ws={};function wl(e,t){la(e,t),la(e+"Capture",t)}function la(e,t){for(Ws[e]=t,e=0;e<t.length;e++)Js.add(t[e])}var xo=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]*$"),$s={},Fs={};function bo(e){return ri.call(Fs,e)?!0:ri.call($s,e)?!1:xo.test(e)?Fs[e]=!0:($s[e]=!0,!1)}function Gn(e,t,l){if(bo(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Qn(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Lt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Is(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vo(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,u.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xi(e){if(!e._valueTracker){var t=Is(e)?"checked":"value";e._valueTracker=vo(e,t,""+e[t])}}function Ps(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Is(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Xn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var po=/[\n"\\]/g;function St(e){return e.replace(po,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bi(e,t,l,a,n,u,c,s){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+pt(t)):e.value!==""+pt(t)&&(e.value=""+pt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?vi(e,c,pt(t)):l!=null?vi(e,c,pt(l)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+pt(s):e.removeAttribute("name")}function er(e,t,l,a,n,u,c,s){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){xi(e);return}l=l!=null?""+pt(l):"",t=t!=null?""+pt(t):l,s||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=s?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),xi(e)}function vi(e,t,l){t==="number"&&Xn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function aa(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+pt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function tr(e,t,l){if(t!=null&&(t=""+pt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+pt(l):""}function lr(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(Re(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=pt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),xi(e)}function na(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var So=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 ar(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||So.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function nr(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&ar(e,n,a)}else for(var u in t)t.hasOwnProperty(u)&&ar(e,u,t[u])}function pi(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jo=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"]]),No=/^[\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 Zn(e){return No.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Rt(){}var Si=null;function ji(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ua=null,ia=null;function ur(e){var t=ea(e);if(t&&(e=t.stateNode)){var l=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(bi(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[at]||null;if(!n)throw Error(r(90));bi(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Ps(a)}break e;case"textarea":tr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&aa(e,!!l.multiple,t,!1)}}}var Ni=!1;function ir(e,t,l){if(Ni)return e(t,l);Ni=!0;try{var a=e(t);return a}finally{if(Ni=!1,(ua!==null||ia!==null)&&(Du(),ua&&(t=ua,e=ia,ia=ua=null,ur(t),e)))for(t=0;t<e.length;t++)ur(e[t])}}function Za(e,t){var l=e.stateNode;if(l===null)return null;var a=l[at]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Gt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ki=!1;if(Gt)try{var Va={};Object.defineProperty(Va,"passive",{get:function(){ki=!0}}),window.addEventListener("test",Va,Va),window.removeEventListener("test",Va,Va)}catch{ki=!1}var sl=null,zi=null,Vn=null;function cr(){if(Vn)return Vn;var e,t=zi,l=t.length,a,n="value"in sl?sl.value:sl.textContent,u=n.length;for(e=0;e<l&&t[e]===n[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===n[u-a];a++);return Vn=n.slice(e,1<a?1-a:void 0)}function Kn(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Jn(){return!0}function sr(){return!1}function nt(e){function t(l,a,n,u,c){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=c,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(l=e[s],this[s]=l?l(u):u[s]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Jn:sr,this.isPropagationStopped=sr,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Jn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Jn)},persist:function(){},isPersistent:Jn}),t}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wn=nt(Ul),Ka=A({},Ul,{view:0,detail:0}),ko=nt(Ka),Mi,Ei,Ja,$n=A({},Ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ai,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ja&&(Ja&&e.type==="mousemove"?(Mi=e.screenX-Ja.screenX,Ei=e.screenY-Ja.screenY):Ei=Mi=0,Ja=e),Mi)},movementY:function(e){return"movementY"in e?e.movementY:Ei}}),rr=nt($n),zo=A({},$n,{dataTransfer:0}),Mo=nt(zo),Eo=A({},Ka,{relatedTarget:0}),Ti=nt(Eo),To=A({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),Ao=nt(To),Co=A({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_o=nt(Co),Do=A({},Ul,{data:0}),fr=nt(Do),Oo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wo={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"},Uo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ho(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uo[e])?!!t[e]:!1}function Ai(){return Ho}var Bo=A({},Ka,{key:function(e){if(e.key){var t=Oo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Kn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ai,charCode:function(e){return e.type==="keypress"?Kn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Kn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qo=nt(Bo),Yo=A({},$n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dr=nt(Yo),Lo=A({},Ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ai}),Ro=nt(Lo),Go=A({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qo=nt(Go),Xo=A({},$n,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Zo=nt(Xo),Vo=A({},Ul,{newState:0,oldState:0}),Ko=nt(Vo),Jo=[9,13,27,32],Ci=Gt&&"CompositionEvent"in window,Wa=null;Gt&&"documentMode"in document&&(Wa=document.documentMode);var Wo=Gt&&"TextEvent"in window&&!Wa,or=Gt&&(!Ci||Wa&&8<Wa&&11>=Wa),mr=" ",gr=!1;function hr(e,t){switch(e){case"keyup":return Jo.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ca=!1;function $o(e,t){switch(e){case"compositionend":return yr(t);case"keypress":return t.which!==32?null:(gr=!0,mr);case"textInput":return e=t.data,e===mr&&gr?null:e;default:return null}}function Fo(e,t){if(ca)return e==="compositionend"||!Ci&&hr(e,t)?(e=cr(),Vn=zi=sl=null,ca=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return or&&t.locale!=="ko"?null:t.data;default:return null}}var Io={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 xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Io[e.type]:t==="textarea"}function br(e,t,l,a){ua?ia?ia.push(a):ia=[a]:ua=a,t=Yu(t,"onChange"),0<t.length&&(l=new Wn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var $a=null,Fa=null;function Po(e){t0(e,0)}function Fn(e){var t=Xa(e);if(Ps(t))return e}function vr(e,t){if(e==="change")return t}var pr=!1;if(Gt){var _i;if(Gt){var Di="oninput"in document;if(!Di){var Sr=document.createElement("div");Sr.setAttribute("oninput","return;"),Di=typeof Sr.oninput=="function"}_i=Di}else _i=!1;pr=_i&&(!document.documentMode||9<document.documentMode)}function jr(){$a&&($a.detachEvent("onpropertychange",Nr),Fa=$a=null)}function Nr(e){if(e.propertyName==="value"&&Fn(Fa)){var t=[];br(t,Fa,e,ji(e)),ir(Po,t)}}function em(e,t,l){e==="focusin"?(jr(),$a=t,Fa=l,$a.attachEvent("onpropertychange",Nr)):e==="focusout"&&jr()}function tm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fn(Fa)}function lm(e,t){if(e==="click")return Fn(t)}function am(e,t){if(e==="input"||e==="change")return Fn(t)}function nm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:nm;function Ia(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!ri.call(t,n)||!mt(e[n],t[n]))return!1}return!0}function kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var l=kr(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=kr(l)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xn(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Xn(e.document)}return t}function Oi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var um=Gt&&"documentMode"in document&&11>=document.documentMode,sa=null,wi=null,Pa=null,Ui=!1;function Tr(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ui||sa==null||sa!==Xn(a)||(a=sa,"selectionStart"in a&&Oi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Pa&&Ia(Pa,a)||(Pa=a,a=Yu(wi,"onSelect"),0<a.length&&(t=new Wn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=sa)))}function Hl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ra={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionrun:Hl("Transition","TransitionRun"),transitionstart:Hl("Transition","TransitionStart"),transitioncancel:Hl("Transition","TransitionCancel"),transitionend:Hl("Transition","TransitionEnd")},Hi={},Ar={};Gt&&(Ar=document.createElement("div").style,"AnimationEvent"in window||(delete ra.animationend.animation,delete ra.animationiteration.animation,delete ra.animationstart.animation),"TransitionEvent"in window||delete ra.transitionend.transition);function Bl(e){if(Hi[e])return Hi[e];if(!ra[e])return e;var t=ra[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Ar)return Hi[e]=t[l];return e}var Cr=Bl("animationend"),_r=Bl("animationiteration"),Dr=Bl("animationstart"),im=Bl("transitionrun"),cm=Bl("transitionstart"),sm=Bl("transitioncancel"),Or=Bl("transitionend"),wr=new Map,Bi="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(" ");Bi.push("scrollEnd");function _t(e,t){wr.set(e,t),wl(t,[e])}var In=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},jt=[],fa=0,qi=0;function Pn(){for(var e=fa,t=qi=fa=0;t<e;){var l=jt[t];jt[t++]=null;var a=jt[t];jt[t++]=null;var n=jt[t];jt[t++]=null;var u=jt[t];if(jt[t++]=null,a!==null&&n!==null){var c=a.pending;c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n}u!==0&&Ur(l,n,u)}}function eu(e,t,l,a){jt[fa++]=e,jt[fa++]=t,jt[fa++]=l,jt[fa++]=a,qi|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Yi(e,t,l,a){return eu(e,t,l,a),tu(e)}function ql(e,t){return eu(e,null,null,t),tu(e)}function Ur(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,u=e.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&t!==null&&(n=31-ot(l),e=u.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),u):null}function tu(e){if(50<jn)throw jn=0,Jc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var da={};function rm(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gt(e,t,l,a){return new rm(e,t,l,a)}function Li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qt(e,t){var l=e.alternate;return l===null?(l=gt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Hr(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function lu(e,t,l,a,n,u){var c=0;if(a=e,typeof e=="function")Li(e)&&(c=1);else if(typeof e=="string")c=gg(e,l,E.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=gt(31,l,t,n),e.elementType=W,e.lanes=u,e;case T:return Yl(l.children,n,u,t);case U:c=8,n|=24;break;case J:return e=gt(12,l,t,n|2),e.elementType=J,e.lanes=u,e;case xe:return e=gt(13,l,t,n),e.elementType=xe,e.lanes=u,e;case ge:return e=gt(19,l,t,n),e.elementType=ge,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:c=10;break e;case P:c=9;break e;case $:c=11;break e;case Ne:c=14;break e;case Te:c=16,a=null;break e}c=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=gt(c,l,t,n),t.elementType=e,t.type=a,t.lanes=u,t}function Yl(e,t,l,a){return e=gt(7,e,a,t),e.lanes=l,e}function Ri(e,t,l){return e=gt(6,e,null,t),e.lanes=l,e}function Br(e){var t=gt(18,null,null,0);return t.stateNode=e,t}function Gi(e,t,l){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qr=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var l=qr.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Bs(t)},qr.set(e,t),t)}return{value:e,source:t,stack:Bs(t)}}var oa=[],ma=0,au=null,en=0,kt=[],zt=0,rl=null,wt=1,Ut="";function Xt(e,t){oa[ma++]=en,oa[ma++]=au,au=e,en=t}function Yr(e,t,l){kt[zt++]=wt,kt[zt++]=Ut,kt[zt++]=rl,rl=e;var a=wt;e=Ut;var n=32-ot(a)-1;a&=~(1<<n),l+=1;var u=32-ot(t)+n;if(30<u){var c=n-n%5;u=(a&(1<<c)-1).toString(32),a>>=c,n-=c,wt=1<<32-ot(t)+n|l<<n|a,Ut=u+e}else wt=1<<u|l<<n|a,Ut=e}function Qi(e){e.return!==null&&(Xt(e,1),Yr(e,1,0))}function Xi(e){for(;e===au;)au=oa[--ma],oa[ma]=null,en=oa[--ma],oa[ma]=null;for(;e===rl;)rl=kt[--zt],kt[zt]=null,Ut=kt[--zt],kt[zt]=null,wt=kt[--zt],kt[zt]=null}function Lr(e,t){kt[zt++]=wt,kt[zt++]=Ut,kt[zt++]=rl,wt=t.id,Ut=t.overflow,rl=e}var We=null,Me=null,ce=!1,fl=null,Mt=!1,Zi=Error(r(519));function dl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tn(Nt(t,e)),Zi}function Rr(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Je]=e,t[at]=a,l){case"dialog":ae("cancel",t),ae("close",t);break;case"iframe":case"object":case"embed":ae("load",t);break;case"video":case"audio":for(l=0;l<kn.length;l++)ae(kn[l],t);break;case"source":ae("error",t);break;case"img":case"image":case"link":ae("error",t),ae("load",t);break;case"details":ae("toggle",t);break;case"input":ae("invalid",t),er(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ae("invalid",t);break;case"textarea":ae("invalid",t),lr(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||u0(t.textContent,l)?(a.popover!=null&&(ae("beforetoggle",t),ae("toggle",t)),a.onScroll!=null&&ae("scroll",t),a.onScrollEnd!=null&&ae("scrollend",t),a.onClick!=null&&(t.onclick=Rt),t=!0):t=!1,t||dl(e,!0)}function Gr(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Mt=!1;return;case 27:case 3:Mt=!0;return;default:We=We.return}}function ga(e){if(e!==We)return!1;if(!ce)return Gr(e),ce=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||rs(e.type,e.memoizedProps)),l=!l),l&&Me&&dl(e),Gr(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Me=g0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Me=g0(e)}else t===27?(t=Me,zl(e.type)?(e=gs,gs=null,Me=e):Me=t):Me=We?Tt(e.stateNode.nextSibling):null;return!0}function Ll(){Me=We=null,ce=!1}function Vi(){var e=fl;return e!==null&&(st===null?st=e:st.push.apply(st,e),fl=null),e}function tn(e){fl===null?fl=[e]:fl.push(e)}var Ki=G(null),Rl=null,Zt=null;function ol(e,t,l){z(Ki,t._currentValue),t._currentValue=l}function Vt(e){e._currentValue=Ki.current,te(Ki)}function Ji(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Wi(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var c=n.child;u=u.firstContext;e:for(;u!==null;){var s=u;u=n;for(var d=0;d<t.length;d++)if(s.context===t[d]){u.lanes|=l,s=u.alternate,s!==null&&(s.lanes|=l),Ji(u.return,l,e),a||(c=null);break e}u=s.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error(r(341));c.lanes|=l,u=c.alternate,u!==null&&(u.lanes|=l),Ji(c,l,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function ha(e,t,l,a){e=null;for(var n=t,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var c=n.alternate;if(c===null)throw Error(r(387));if(c=c.memoizedProps,c!==null){var s=n.type;mt(n.pendingProps.value,c.value)||(e!==null?e.push(s):e=[s])}}else if(n===ul.current){if(c=n.alternate,c===null)throw Error(r(387));c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(An):e=[An])}n=n.return}e!==null&&Wi(t,e,l,a),t.flags|=262144}function nu(e){for(e=e.firstContext;e!==null;){if(!mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Gl(e){Rl=e,Zt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $e(e){return Qr(Rl,e)}function uu(e,t){return Rl===null&&Gl(e),Qr(e,t)}function Qr(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Zt===null){if(e===null)throw Error(r(308));Zt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zt=Zt.next=t;return l}var fm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},dm=f.unstable_scheduleCallback,om=f.unstable_NormalPriority,Be={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $i(){return{controller:new fm,data:new Map,refCount:0}}function ln(e){e.refCount--,e.refCount===0&&dm(om,function(){e.controller.abort()})}var an=null,Fi=0,ya=0,xa=null;function mm(e,t){if(an===null){var l=an=[];Fi=0,ya=es(),xa={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Fi++,t.then(Xr,Xr),t}function Xr(){if(--Fi===0&&an!==null){xa!==null&&(xa.status="fulfilled");var e=an;an=null,ya=0,xa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gm(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Zr=b.S;b.S=function(e,t){Ad=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mm(e,t),Zr!==null&&Zr(e,t)};var Ql=G(null);function Ii(){var e=Ql.current;return e!==null?e:je.pooledCache}function iu(e,t){t===null?z(Ql,Ql.current):z(Ql,t.pool)}function Vr(){var e=Ii();return e===null?null:{parent:Be._currentValue,pool:e}}var ba=Error(r(460)),Pi=Error(r(474)),cu=Error(r(542)),su={then:function(){}};function Kr(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jr(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Rt,Rt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$r(e),e;default:if(typeof t.status=="string")t.then(Rt,Rt);else{if(e=je,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$r(e),e}throw Zl=t,ba}}function Xl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Zl=l,ba):l}}var Zl=null;function Wr(){if(Zl===null)throw Error(r(459));var e=Zl;return Zl=null,e}function $r(e){if(e===ba||e===cu)throw Error(r(483))}var va=null,nn=0;function ru(e){var t=nn;return nn+=1,va===null&&(va=[]),Jr(va,e,t)}function un(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function fu(e,t){throw t.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Fr(e){function t(m,o){if(e){var g=m.deletions;g===null?(m.deletions=[o],m.flags|=16):g.push(o)}}function l(m,o){if(!e)return null;for(;o!==null;)t(m,o),o=o.sibling;return null}function a(m){for(var o=new Map;m!==null;)m.key!==null?o.set(m.key,m):o.set(m.index,m),m=m.sibling;return o}function n(m,o){return m=Qt(m,o),m.index=0,m.sibling=null,m}function u(m,o,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<o?(m.flags|=67108866,o):g):(m.flags|=67108866,o)):(m.flags|=1048576,o)}function c(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function s(m,o,g,p){return o===null||o.tag!==6?(o=Ri(g,m.mode,p),o.return=m,o):(o=n(o,g),o.return=m,o)}function d(m,o,g,p){var X=g.type;return X===T?v(m,o,g.props.children,p,g.key):o!==null&&(o.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Te&&Xl(X)===o.type)?(o=n(o,g.props),un(o,g),o.return=m,o):(o=lu(g.type,g.key,g.props,null,m.mode,p),un(o,g),o.return=m,o)}function h(m,o,g,p){return o===null||o.tag!==4||o.stateNode.containerInfo!==g.containerInfo||o.stateNode.implementation!==g.implementation?(o=Gi(g,m.mode,p),o.return=m,o):(o=n(o,g.children||[]),o.return=m,o)}function v(m,o,g,p,X){return o===null||o.tag!==7?(o=Yl(g,m.mode,p,X),o.return=m,o):(o=n(o,g),o.return=m,o)}function S(m,o,g){if(typeof o=="string"&&o!==""||typeof o=="number"||typeof o=="bigint")return o=Ri(""+o,m.mode,g),o.return=m,o;if(typeof o=="object"&&o!==null){switch(o.$$typeof){case D:return g=lu(o.type,o.key,o.props,null,m.mode,g),un(g,o),g.return=m,g;case w:return o=Gi(o,m.mode,g),o.return=m,o;case Te:return o=Xl(o),S(m,o,g)}if(Re(o)||ke(o))return o=Yl(o,m.mode,g,null),o.return=m,o;if(typeof o.then=="function")return S(m,ru(o),g);if(o.$$typeof===ee)return S(m,uu(m,o),g);fu(m,o)}return null}function y(m,o,g,p){var X=o!==null?o.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return X!==null?null:s(m,o,""+g,p);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case D:return g.key===X?d(m,o,g,p):null;case w:return g.key===X?h(m,o,g,p):null;case Te:return g=Xl(g),y(m,o,g,p)}if(Re(g)||ke(g))return X!==null?null:v(m,o,g,p,null);if(typeof g.then=="function")return y(m,o,ru(g),p);if(g.$$typeof===ee)return y(m,o,uu(m,g),p);fu(m,g)}return null}function x(m,o,g,p,X){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return m=m.get(g)||null,s(o,m,""+p,X);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case D:return m=m.get(p.key===null?g:p.key)||null,d(o,m,p,X);case w:return m=m.get(p.key===null?g:p.key)||null,h(o,m,p,X);case Te:return p=Xl(p),x(m,o,g,p,X)}if(Re(p)||ke(p))return m=m.get(g)||null,v(o,m,p,X,null);if(typeof p.then=="function")return x(m,o,g,ru(p),X);if(p.$$typeof===ee)return x(m,o,g,uu(o,p),X);fu(o,p)}return null}function q(m,o,g,p){for(var X=null,fe=null,L=o,I=o=0,ue=null;L!==null&&I<g.length;I++){L.index>I?(ue=L,L=null):ue=L.sibling;var de=y(m,L,g[I],p);if(de===null){L===null&&(L=ue);break}e&&L&&de.alternate===null&&t(m,L),o=u(de,o,I),fe===null?X=de:fe.sibling=de,fe=de,L=ue}if(I===g.length)return l(m,L),ce&&Xt(m,I),X;if(L===null){for(;I<g.length;I++)L=S(m,g[I],p),L!==null&&(o=u(L,o,I),fe===null?X=L:fe.sibling=L,fe=L);return ce&&Xt(m,I),X}for(L=a(L);I<g.length;I++)ue=x(L,m,I,g[I],p),ue!==null&&(e&&ue.alternate!==null&&L.delete(ue.key===null?I:ue.key),o=u(ue,o,I),fe===null?X=ue:fe.sibling=ue,fe=ue);return e&&L.forEach(function(Cl){return t(m,Cl)}),ce&&Xt(m,I),X}function K(m,o,g,p){if(g==null)throw Error(r(151));for(var X=null,fe=null,L=o,I=o=0,ue=null,de=g.next();L!==null&&!de.done;I++,de=g.next()){L.index>I?(ue=L,L=null):ue=L.sibling;var Cl=y(m,L,de.value,p);if(Cl===null){L===null&&(L=ue);break}e&&L&&Cl.alternate===null&&t(m,L),o=u(Cl,o,I),fe===null?X=Cl:fe.sibling=Cl,fe=Cl,L=ue}if(de.done)return l(m,L),ce&&Xt(m,I),X;if(L===null){for(;!de.done;I++,de=g.next())de=S(m,de.value,p),de!==null&&(o=u(de,o,I),fe===null?X=de:fe.sibling=de,fe=de);return ce&&Xt(m,I),X}for(L=a(L);!de.done;I++,de=g.next())de=x(L,m,I,de.value,p),de!==null&&(e&&de.alternate!==null&&L.delete(de.key===null?I:de.key),o=u(de,o,I),fe===null?X=de:fe.sibling=de,fe=de);return e&&L.forEach(function(zg){return t(m,zg)}),ce&&Xt(m,I),X}function pe(m,o,g,p){if(typeof g=="object"&&g!==null&&g.type===T&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case D:e:{for(var X=g.key;o!==null;){if(o.key===X){if(X=g.type,X===T){if(o.tag===7){l(m,o.sibling),p=n(o,g.props.children),p.return=m,m=p;break e}}else if(o.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Te&&Xl(X)===o.type){l(m,o.sibling),p=n(o,g.props),un(p,g),p.return=m,m=p;break e}l(m,o);break}else t(m,o);o=o.sibling}g.type===T?(p=Yl(g.props.children,m.mode,p,g.key),p.return=m,m=p):(p=lu(g.type,g.key,g.props,null,m.mode,p),un(p,g),p.return=m,m=p)}return c(m);case w:e:{for(X=g.key;o!==null;){if(o.key===X)if(o.tag===4&&o.stateNode.containerInfo===g.containerInfo&&o.stateNode.implementation===g.implementation){l(m,o.sibling),p=n(o,g.children||[]),p.return=m,m=p;break e}else{l(m,o);break}else t(m,o);o=o.sibling}p=Gi(g,m.mode,p),p.return=m,m=p}return c(m);case Te:return g=Xl(g),pe(m,o,g,p)}if(Re(g))return q(m,o,g,p);if(ke(g)){if(X=ke(g),typeof X!="function")throw Error(r(150));return g=X.call(g),K(m,o,g,p)}if(typeof g.then=="function")return pe(m,o,ru(g),p);if(g.$$typeof===ee)return pe(m,o,uu(m,g),p);fu(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,o!==null&&o.tag===6?(l(m,o.sibling),p=n(o,g),p.return=m,m=p):(l(m,o),p=Ri(g,m.mode,p),p.return=m,m=p),c(m)):l(m,o)}return function(m,o,g,p){try{nn=0;var X=pe(m,o,g,p);return va=null,X}catch(L){if(L===ba||L===cu)throw L;var fe=gt(29,L,null,m.mode);return fe.lanes=p,fe.return=m,fe}finally{}}}var Vl=Fr(!0),Ir=Fr(!1),ml=!1;function ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function gl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function hl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(oe&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=tu(e),Ur(e,null,l),t}return eu(e,a,t,l),tu(e)}function cn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Qs(e,l)}}function lc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=c:u=u.next=c,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var ac=!1;function sn(){if(ac){var e=xa;if(e!==null)throw e}}function rn(e,t,l,a){ac=!1;var n=e.updateQueue;ml=!1;var u=n.firstBaseUpdate,c=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var d=s,h=d.next;d.next=null,c===null?u=h:c.next=h,c=d;var v=e.alternate;v!==null&&(v=v.updateQueue,s=v.lastBaseUpdate,s!==c&&(s===null?v.firstBaseUpdate=h:s.next=h,v.lastBaseUpdate=d))}if(u!==null){var S=n.baseState;c=0,v=h=d=null,s=u;do{var y=s.lane&-536870913,x=y!==s.lane;if(x?(ne&y)===y:(a&y)===y){y!==0&&y===ya&&(ac=!0),v!==null&&(v=v.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var q=e,K=s;y=t;var pe=l;switch(K.tag){case 1:if(q=K.payload,typeof q=="function"){S=q.call(pe,S,y);break e}S=q;break e;case 3:q.flags=q.flags&-65537|128;case 0:if(q=K.payload,y=typeof q=="function"?q.call(pe,S,y):q,y==null)break e;S=A({},S,y);break e;case 2:ml=!0}}y=s.callback,y!==null&&(e.flags|=64,x&&(e.flags|=8192),x=n.callbacks,x===null?n.callbacks=[y]:x.push(y))}else x={lane:y,tag:s.tag,payload:s.payload,callback:s.callback,next:null},v===null?(h=v=x,d=S):v=v.next=x,c|=y;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;x=s,s=x.next,x.next=null,n.lastBaseUpdate=x,n.shared.pending=null}}while(!0);v===null&&(d=S),n.baseState=d,n.firstBaseUpdate=h,n.lastBaseUpdate=v,u===null&&(n.shared.lanes=0),pl|=c,e.lanes=c,e.memoizedState=S}}function Pr(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ef(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Pr(l[e],t)}var pa=G(null),du=G(0);function tf(e,t){e=tl,z(du,e),z(pa,t),tl=e|t.baseLanes}function nc(){z(du,tl),z(pa,pa.current)}function uc(){tl=du.current,te(pa),te(du)}var ht=G(null),Et=null;function yl(e){var t=e.alternate;z(we,we.current&1),z(ht,e),Et===null&&(t===null||pa.current!==null||t.memoizedState!==null)&&(Et=e)}function ic(e){z(we,we.current),z(ht,e),Et===null&&(Et=e)}function lf(e){e.tag===22?(z(we,we.current),z(ht,e),Et===null&&(Et=e)):xl()}function xl(){z(we,we.current),z(ht,ht.current)}function yt(e){te(ht),Et===e&&(Et=null),te(we)}var we=G(0);function ou(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||os(l)||ms(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Kt=0,F=null,be=null,qe=null,mu=!1,Sa=!1,Kl=!1,gu=0,fn=0,ja=null,hm=0;function _e(){throw Error(r(321))}function cc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!mt(e[l],t[l]))return!1;return!0}function sc(e,t,l,a,n,u){return Kt=u,F=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?Lf:Nc,Kl=!1,u=l(a,n),Kl=!1,Sa&&(u=nf(t,l,a,n)),af(e),u}function af(e){b.H=mn;var t=be!==null&&be.next!==null;if(Kt=0,qe=be=F=null,mu=!1,fn=0,ja=null,t)throw Error(r(300));e===null||Ye||(e=e.dependencies,e!==null&&nu(e)&&(Ye=!0))}function nf(e,t,l,a){F=e;var n=0;do{if(Sa&&(ja=null),fn=0,Sa=!1,25<=n)throw Error(r(301));if(n+=1,qe=be=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}b.H=Rf,u=t(l,a)}while(Sa);return u}function ym(){var e=b.H,t=e.useState()[0];return t=typeof t.then=="function"?dn(t):t,e=e.useState()[0],(be!==null?be.memoizedState:null)!==e&&(F.flags|=1024),t}function rc(){var e=gu!==0;return gu=0,e}function fc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function dc(e){if(mu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mu=!1}Kt=0,qe=be=F=null,Sa=!1,fn=gu=0,ja=null}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?F.memoizedState=qe=e:qe=qe.next=e,qe}function Ue(){if(be===null){var e=F.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=qe===null?F.memoizedState:qe.next;if(t!==null)qe=t,be=e;else{if(e===null)throw F.alternate===null?Error(r(467)):Error(r(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},qe===null?F.memoizedState=qe=e:qe=qe.next=e}return qe}function hu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dn(e){var t=fn;return fn+=1,ja===null&&(ja=[]),e=Jr(ja,e,t),t=F,(qe===null?t.memoizedState:qe.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?Lf:Nc),e}function yu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return dn(e);if(e.$$typeof===ee)return $e(e)}throw Error(r(438,String(e)))}function oc(e){var t=null,l=F.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=F.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=hu(),F.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=Ae;return t.index++,l}function Jt(e,t){return typeof t=="function"?t(e):t}function xu(e){var t=Ue();return mc(t,be,e)}function mc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var n=e.baseQueue,u=a.pending;if(u!==null){if(n!==null){var c=n.next;n.next=u.next,u.next=c}t.baseQueue=n=u,a.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{t=n.next;var s=c=null,d=null,h=t,v=!1;do{var S=h.lane&-536870913;if(S!==h.lane?(ne&S)===S:(Kt&S)===S){var y=h.revertLane;if(y===0)d!==null&&(d=d.next={lane:0,revertLane:0,gesture:null,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),S===ya&&(v=!0);else if((Kt&y)===y){h=h.next,y===ya&&(v=!0);continue}else S={lane:0,revertLane:h.revertLane,gesture:null,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null},d===null?(s=d=S,c=u):d=d.next=S,F.lanes|=y,pl|=y;S=h.action,Kl&&l(u,S),u=h.hasEagerState?h.eagerState:l(u,S)}else y={lane:S,revertLane:h.revertLane,gesture:h.gesture,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null},d===null?(s=d=y,c=u):d=d.next=y,F.lanes|=S,pl|=S;h=h.next}while(h!==null&&h!==t);if(d===null?c=u:d.next=s,!mt(u,e.memoizedState)&&(Ye=!0,v&&(l=xa,l!==null)))throw l;e.memoizedState=u,e.baseState=c,e.baseQueue=d,a.lastRenderedState=u}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function gc(e){var t=Ue(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,u=t.memoizedState;if(n!==null){l.pending=null;var c=n=n.next;do u=e(u,c.action),c=c.next;while(c!==n);mt(u,t.memoizedState)||(Ye=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,a]}function uf(e,t,l){var a=F,n=Ue(),u=ce;if(u){if(l===void 0)throw Error(r(407));l=l()}else l=t();var c=!mt((be||n).memoizedState,l);if(c&&(n.memoizedState=l,Ye=!0),n=n.queue,xc(rf.bind(null,a,n,e),[e]),n.getSnapshot!==t||c||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,Na(9,{destroy:void 0},sf.bind(null,a,n,l,t),null),je===null)throw Error(r(349));u||(Kt&127)!==0||cf(a,t,l)}return l}function cf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=F.updateQueue,t===null?(t=hu(),F.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function sf(e,t,l,a){t.value=l,t.getSnapshot=a,ff(t)&&df(e)}function rf(e,t,l){return l(function(){ff(t)&&df(e)})}function ff(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!mt(e,l)}catch{return!0}}function df(e){var t=ql(e,2);t!==null&&rt(t,e,2)}function hc(e){var t=et();if(typeof e=="function"){var l=e;if(e=l(),Kl){il(!0);try{l()}finally{il(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jt,lastRenderedState:e},t}function of(e,t,l,a){return e.baseState=l,mc(e,be,typeof a=="function"?a:Jt)}function xm(e,t,l,a,n){if(pu(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){u.listeners.push(c)}};b.T!==null?l(!0):u.isTransition=!1,a(u),l=t.pending,l===null?(u.next=t.pending=u,mf(t,u)):(u.next=l.next,t.pending=l.next=u)}}function mf(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var u=b.T,c={};b.T=c;try{var s=l(n,a),d=b.S;d!==null&&d(c,s),gf(e,t,s)}catch(h){yc(e,t,h)}finally{u!==null&&c.types!==null&&(u.types=c.types),b.T=u}}else try{u=l(n,a),gf(e,t,u)}catch(h){yc(e,t,h)}}function gf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){hf(e,t,a)},function(a){return yc(e,t,a)}):hf(e,t,l)}function hf(e,t,l){t.status="fulfilled",t.value=l,yf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,mf(e,l)))}function yc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,yf(t),t=t.next;while(t!==a)}e.action=null}function yf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xf(e,t){return t}function bf(e,t){if(ce){var l=je.formState;if(l!==null){e:{var a=F;if(ce){if(Me){t:{for(var n=Me,u=Mt;n.nodeType!==8;){if(!u){n=null;break t}if(n=Tt(n.nextSibling),n===null){n=null;break t}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Me=Tt(n.nextSibling),a=n.data==="F!";break e}}dl(a)}a=!1}a&&(t=l[0])}}return l=et(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xf,lastRenderedState:t},l.queue=a,l=Bf.bind(null,F,a),a.dispatch=l,a=hc(!1),u=jc.bind(null,F,!1,a.queue),a=et(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=xm.bind(null,F,n,u,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function vf(e){var t=Ue();return pf(t,be,e)}function pf(e,t,l){if(t=mc(e,t,xf)[0],e=xu(Jt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=dn(t)}catch(c){throw c===ba?cu:c}else a=t;t=Ue();var n=t.queue,u=n.dispatch;return l!==t.memoizedState&&(F.flags|=2048,Na(9,{destroy:void 0},bm.bind(null,n,l),null)),[a,u,e]}function bm(e,t){e.action=t}function Sf(e){var t=Ue(),l=be;if(l!==null)return pf(t,l,e);Ue(),t=t.memoizedState,l=Ue();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Na(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=F.updateQueue,t===null&&(t=hu(),F.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function jf(){return Ue().memoizedState}function bu(e,t,l,a){var n=et();F.flags|=e,n.memoizedState=Na(1|t,{destroy:void 0},l,a===void 0?null:a)}function vu(e,t,l,a){var n=Ue();a=a===void 0?null:a;var u=n.memoizedState.inst;be!==null&&a!==null&&cc(a,be.memoizedState.deps)?n.memoizedState=Na(t,u,l,a):(F.flags|=e,n.memoizedState=Na(1|t,u,l,a))}function Nf(e,t){bu(8390656,8,e,t)}function xc(e,t){vu(2048,8,e,t)}function vm(e){F.flags|=4;var t=F.updateQueue;if(t===null)t=hu(),F.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function kf(e){var t=Ue().memoizedState;return vm({ref:t,nextImpl:e}),function(){if((oe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function zf(e,t){return vu(4,2,e,t)}function Mf(e,t){return vu(4,4,e,t)}function Ef(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tf(e,t,l){l=l!=null?l.concat([e]):null,vu(4,4,Ef.bind(null,t,e),l)}function bc(){}function Af(e,t){var l=Ue();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&cc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Cf(e,t){var l=Ue();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&cc(t,a[1]))return a[0];if(a=e(),Kl){il(!0);try{e()}finally{il(!1)}}return l.memoizedState=[a,t],a}function vc(e,t,l){return l===void 0||(Kt&1073741824)!==0&&(ne&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=_d(),F.lanes|=e,pl|=e,l)}function _f(e,t,l,a){return mt(l,t)?l:pa.current!==null?(e=vc(e,l,a),mt(e,t)||(Ye=!0),e):(Kt&42)===0||(Kt&1073741824)!==0&&(ne&261930)===0?(Ye=!0,e.memoizedState=l):(e=_d(),F.lanes|=e,pl|=e,t)}function Df(e,t,l,a,n){var u=C.p;C.p=u!==0&&8>u?u:8;var c=b.T,s={};b.T=s,jc(e,!1,t,l);try{var d=n(),h=b.S;if(h!==null&&h(s,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var v=gm(d,a);on(e,t,v,vt(e))}else on(e,t,a,vt(e))}catch(S){on(e,t,{then:function(){},status:"rejected",reason:S},vt())}finally{C.p=u,c!==null&&s.types!==null&&(c.types=s.types),b.T=c}}function pm(){}function pc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=Of(e).queue;Df(e,n,t,Q,l===null?pm:function(){return wf(e),l(a)})}function Of(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jt,lastRenderedState:Q},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wf(e){var t=Of(e);t.next===null&&(t=e.alternate.memoizedState),on(e,t.next.queue,{},vt())}function Sc(){return $e(An)}function Uf(){return Ue().memoizedState}function Hf(){return Ue().memoizedState}function Sm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=vt();e=gl(l);var a=hl(t,e,l);a!==null&&(rt(a,t,l),cn(a,t,l)),t={cache:$i()},e.payload=t;return}t=t.return}}function jm(e,t,l){var a=vt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},pu(e)?qf(t,l):(l=Yi(e,t,l,a),l!==null&&(rt(l,e,a),Yf(l,t,a)))}function Bf(e,t,l){var a=vt();on(e,t,l,a)}function on(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(pu(e))qf(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var c=t.lastRenderedState,s=u(c,l);if(n.hasEagerState=!0,n.eagerState=s,mt(s,c))return eu(e,t,n,0),je===null&&Pn(),!1}catch{}finally{}if(l=Yi(e,t,n,a),l!==null)return rt(l,e,a),Yf(l,t,a),!0}return!1}function jc(e,t,l,a){if(a={lane:2,revertLane:es(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},pu(e)){if(t)throw Error(r(479))}else t=Yi(e,l,a,2),t!==null&&rt(t,e,2)}function pu(e){var t=e.alternate;return e===F||t!==null&&t===F}function qf(e,t){Sa=mu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Yf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Qs(e,l)}}var mn={readContext:$e,use:yu,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useLayoutEffect:_e,useInsertionEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useSyncExternalStore:_e,useId:_e,useHostTransitionStatus:_e,useFormState:_e,useActionState:_e,useOptimistic:_e,useMemoCache:_e,useCacheRefresh:_e};mn.useEffectEvent=_e;var Lf={readContext:$e,use:yu,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:Nf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,bu(4194308,4,Ef.bind(null,t,e),l)},useLayoutEffect:function(e,t){return bu(4194308,4,e,t)},useInsertionEffect:function(e,t){bu(4,2,e,t)},useMemo:function(e,t){var l=et();t=t===void 0?null:t;var a=e();if(Kl){il(!0);try{e()}finally{il(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=et();if(l!==void 0){var n=l(t);if(Kl){il(!0);try{l(t)}finally{il(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=jm.bind(null,F,e),[a.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:function(e){e=hc(e);var t=e.queue,l=Bf.bind(null,F,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:bc,useDeferredValue:function(e,t){var l=et();return vc(l,e,t)},useTransition:function(){var e=hc(!1);return e=Df.bind(null,F,e.queue,!0,!1),et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=F,n=et();if(ce){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),je===null)throw Error(r(349));(ne&127)!==0||cf(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,Nf(rf.bind(null,a,u,e),[e]),a.flags|=2048,Na(9,{destroy:void 0},sf.bind(null,a,u,l,t),null),l},useId:function(){var e=et(),t=je.identifierPrefix;if(ce){var l=Ut,a=wt;l=(a&~(1<<32-ot(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=gu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=hm++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sc,useFormState:bf,useActionState:bf,useOptimistic:function(e){var t=et();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=jc.bind(null,F,!0,l),l.dispatch=t,[e,t]},useMemoCache:oc,useCacheRefresh:function(){return et().memoizedState=Sm.bind(null,F)},useEffectEvent:function(e){var t=et(),l={impl:e};return t.memoizedState=l,function(){if((oe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Nc={readContext:$e,use:yu,useCallback:Af,useContext:$e,useEffect:xc,useImperativeHandle:Tf,useInsertionEffect:zf,useLayoutEffect:Mf,useMemo:Cf,useReducer:xu,useRef:jf,useState:function(){return xu(Jt)},useDebugValue:bc,useDeferredValue:function(e,t){var l=Ue();return _f(l,be.memoizedState,e,t)},useTransition:function(){var e=xu(Jt)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:dn(e),t]},useSyncExternalStore:uf,useId:Uf,useHostTransitionStatus:Sc,useFormState:vf,useActionState:vf,useOptimistic:function(e,t){var l=Ue();return of(l,be,e,t)},useMemoCache:oc,useCacheRefresh:Hf};Nc.useEffectEvent=kf;var Rf={readContext:$e,use:yu,useCallback:Af,useContext:$e,useEffect:xc,useImperativeHandle:Tf,useInsertionEffect:zf,useLayoutEffect:Mf,useMemo:Cf,useReducer:gc,useRef:jf,useState:function(){return gc(Jt)},useDebugValue:bc,useDeferredValue:function(e,t){var l=Ue();return be===null?vc(l,e,t):_f(l,be.memoizedState,e,t)},useTransition:function(){var e=gc(Jt)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:dn(e),t]},useSyncExternalStore:uf,useId:Uf,useHostTransitionStatus:Sc,useFormState:Sf,useActionState:Sf,useOptimistic:function(e,t){var l=Ue();return be!==null?of(l,be,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:oc,useCacheRefresh:Hf};Rf.useEffectEvent=kf;function kc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:A({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var zc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=vt(),n=gl(a);n.payload=t,l!=null&&(n.callback=l),t=hl(e,n,a),t!==null&&(rt(t,e,a),cn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=vt(),n=gl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=hl(e,n,a),t!==null&&(rt(t,e,a),cn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=vt(),a=gl(l);a.tag=2,t!=null&&(a.callback=t),t=hl(e,a,l),t!==null&&(rt(t,e,l),cn(t,e,l))}};function Gf(e,t,l,a,n,u,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,c):t.prototype&&t.prototype.isPureReactComponent?!Ia(l,a)||!Ia(n,u):!0}function Qf(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&zc.enqueueReplaceState(t,t.state,null)}function Jl(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=A({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Xf(e){In(e)}function Zf(e){console.error(e)}function Vf(e){In(e)}function Su(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Kf(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Mc(e,t,l){return l=gl(l),l.tag=3,l.payload={element:null},l.callback=function(){Su(e,t)},l}function Jf(e){return e=gl(e),e.tag=3,e}function Wf(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;e.payload=function(){return n(u)},e.callback=function(){Kf(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){Kf(t,l,a),typeof n!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var s=a.stack;this.componentDidCatch(a.value,{componentStack:s!==null?s:""})})}function Nm(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ha(t,l,n,!0),l=ht.current,l!==null){switch(l.tag){case 31:case 13:return Et===null?Ou():l.alternate===null&&De===0&&(De=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===su?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Fc(e,a,n)),!1;case 22:return l.flags|=65536,a===su?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Fc(e,a,n)),!1}throw Error(r(435,l.tag))}return Fc(e,a,n),Ou(),!1}if(ce)return t=ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Zi&&(e=Error(r(422),{cause:a}),tn(Nt(e,l)))):(a!==Zi&&(t=Error(r(423),{cause:a}),tn(Nt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Nt(a,l),n=Mc(e.stateNode,a,n),lc(e,n),De!==4&&(De=2)),!1;var u=Error(r(520),{cause:a});if(u=Nt(u,l),Sn===null?Sn=[u]:Sn.push(u),De!==4&&(De=2),t===null)return!0;a=Nt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Mc(l.stateNode,a,e),lc(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Sl===null||!Sl.has(u))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Jf(n),Wf(n,e,l,a),lc(l,n),!1}l=l.return}while(l!==null);return!1}var Ec=Error(r(461)),Ye=!1;function Fe(e,t,l,a){t.child=e===null?Ir(t,null,l,a):Vl(t,e.child,l,a)}function $f(e,t,l,a,n){l=l.render;var u=t.ref;if("ref"in a){var c={};for(var s in a)s!=="ref"&&(c[s]=a[s])}else c=a;return Gl(t),a=sc(e,t,l,c,u,n),s=rc(),e!==null&&!Ye?(fc(e,t,n),Wt(e,t,n)):(ce&&s&&Qi(t),t.flags|=1,Fe(e,t,a,n),t.child)}function Ff(e,t,l,a,n){if(e===null){var u=l.type;return typeof u=="function"&&!Li(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,If(e,t,u,a,n)):(e=lu(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Uc(e,n)){var c=u.memoizedProps;if(l=l.compare,l=l!==null?l:Ia,l(c,a)&&e.ref===t.ref)return Wt(e,t,n)}return t.flags|=1,e=Qt(u,a),e.ref=t.ref,e.return=t,t.child=e}function If(e,t,l,a,n){if(e!==null){var u=e.memoizedProps;if(Ia(u,a)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=a=u,Uc(e,n))(e.flags&131072)!==0&&(Ye=!0);else return t.lanes=e.lanes,Wt(e,t,n)}return Tc(e,t,l,a,n)}function Pf(e,t,l,a){var n=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,t.child=null;return ed(e,t,u,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&iu(t,u!==null?u.cachePool:null),u!==null?tf(t,u):nc(),lf(t);else return a=t.lanes=536870912,ed(e,t,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(iu(t,u.cachePool),tf(t,u),xl(),t.memoizedState=null):(e!==null&&iu(t,null),nc(),xl());return Fe(e,t,n,l),t.child}function gn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ed(e,t,l,a,n){var u=Ii();return u=u===null?null:{parent:Be._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&iu(t,null),nc(),lf(t),e!==null&&ha(e,t,a,!0),t.childLanes=n,null}function ju(e,t){return t=ku({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function td(e,t,l){return Vl(t,e.child,null,l),e=ju(t,t.pendingProps),e.flags|=2,yt(t),t.memoizedState=null,e}function km(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ce){if(a.mode==="hidden")return e=ju(t,a),t.lanes=536870912,gn(null,e);if(ic(t),(e=Me)?(e=m0(e,Mt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:wt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},l=Br(e),l.return=t,t.child=l,We=t,Me=null)):e=null,e===null)throw dl(t);return t.lanes=536870912,null}return ju(t,a)}var u=e.memoizedState;if(u!==null){var c=u.dehydrated;if(ic(t),n)if(t.flags&256)t.flags&=-257,t=td(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Ye||ha(e,t,l,!1),n=(l&e.childLanes)!==0,Ye||n){if(a=je,a!==null&&(c=Xs(a,l),c!==0&&c!==u.retryLane))throw u.retryLane=c,ql(e,c),rt(a,e,c),Ec;Ou(),t=td(e,t,l)}else e=u.treeContext,Me=Tt(c.nextSibling),We=t,ce=!0,fl=null,Mt=!1,e!==null&&Lr(t,e),t=ju(t,a),t.flags|=4096;return t}return e=Qt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Nu(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Tc(e,t,l,a,n){return Gl(t),l=sc(e,t,l,a,void 0,n),a=rc(),e!==null&&!Ye?(fc(e,t,n),Wt(e,t,n)):(ce&&a&&Qi(t),t.flags|=1,Fe(e,t,l,n),t.child)}function ld(e,t,l,a,n,u){return Gl(t),t.updateQueue=null,l=nf(t,a,l,n),af(e),a=rc(),e!==null&&!Ye?(fc(e,t,u),Wt(e,t,u)):(ce&&a&&Qi(t),t.flags|=1,Fe(e,t,l,u),t.child)}function ad(e,t,l,a,n){if(Gl(t),t.stateNode===null){var u=da,c=l.contextType;typeof c=="object"&&c!==null&&(u=$e(c)),u=new l(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=zc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},ec(t),c=l.contextType,u.context=typeof c=="object"&&c!==null?$e(c):da,u.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(kc(t,l,c,a),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(c=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),c!==u.state&&zc.enqueueReplaceState(u,u.state,null),rn(t,a,u,n),sn(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var s=t.memoizedProps,d=Jl(l,s);u.props=d;var h=u.context,v=l.contextType;c=da,typeof v=="object"&&v!==null&&(c=$e(v));var S=l.getDerivedStateFromProps;v=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,v||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(s||h!==c)&&Qf(t,u,a,c),ml=!1;var y=t.memoizedState;u.state=y,rn(t,a,u,n),sn(),h=t.memoizedState,s||y!==h||ml?(typeof S=="function"&&(kc(t,l,S,a),h=t.memoizedState),(d=ml||Gf(t,l,d,a,y,h,c))?(v||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=h),u.props=a,u.state=h,u.context=c,a=d):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,tc(e,t),c=t.memoizedProps,v=Jl(l,c),u.props=v,S=t.pendingProps,y=u.context,h=l.contextType,d=da,typeof h=="object"&&h!==null&&(d=$e(h)),s=l.getDerivedStateFromProps,(h=typeof s=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c!==S||y!==d)&&Qf(t,u,a,d),ml=!1,y=t.memoizedState,u.state=y,rn(t,a,u,n),sn();var x=t.memoizedState;c!==S||y!==x||ml||e!==null&&e.dependencies!==null&&nu(e.dependencies)?(typeof s=="function"&&(kc(t,l,s,a),x=t.memoizedState),(v=ml||Gf(t,l,v,a,y,x,d)||e!==null&&e.dependencies!==null&&nu(e.dependencies))?(h||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,x,d),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,x,d)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=x),u.props=a,u.state=x,u.context=d,a=v):(typeof u.componentDidUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Nu(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Vl(t,e.child,null,n),t.child=Vl(t,null,l,n)):Fe(e,t,l,n),t.memoizedState=u.state,e=t.child):e=Wt(e,t,n),e}function nd(e,t,l,a){return Ll(),t.flags|=256,Fe(e,t,l,a),t.child}var Ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cc(e){return{baseLanes:e,cachePool:Vr()}}function _c(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=bt),e}function ud(e,t,l){var a=t.pendingProps,n=!1,u=(t.flags&128)!==0,c;if((c=u)||(c=e!==null&&e.memoizedState===null?!1:(we.current&2)!==0),c&&(n=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(ce){if(n?yl(t):xl(),(e=Me)?(e=m0(e,Mt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:wt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},l=Br(e),l.return=t,t.child=l,We=t,Me=null)):e=null,e===null)throw dl(t);return ms(e)?t.lanes=32:t.lanes=536870912,null}var s=a.children;return a=a.fallback,n?(xl(),n=t.mode,s=ku({mode:"hidden",children:s},n),a=Yl(a,n,l,null),s.return=t,a.return=t,s.sibling=a,t.child=s,a=t.child,a.memoizedState=Cc(l),a.childLanes=_c(e,c,l),t.memoizedState=Ac,gn(null,a)):(yl(t),Dc(t,s))}var d=e.memoizedState;if(d!==null&&(s=d.dehydrated,s!==null)){if(u)t.flags&256?(yl(t),t.flags&=-257,t=Oc(e,t,l)):t.memoizedState!==null?(xl(),t.child=e.child,t.flags|=128,t=null):(xl(),s=a.fallback,n=t.mode,a=ku({mode:"visible",children:a.children},n),s=Yl(s,n,l,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,Vl(t,e.child,null,l),a=t.child,a.memoizedState=Cc(l),a.childLanes=_c(e,c,l),t.memoizedState=Ac,t=gn(null,a));else if(yl(t),ms(s)){if(c=s.nextSibling&&s.nextSibling.dataset,c)var h=c.dgst;c=h,a=Error(r(419)),a.stack="",a.digest=c,tn({value:a,source:null,stack:null}),t=Oc(e,t,l)}else if(Ye||ha(e,t,l,!1),c=(l&e.childLanes)!==0,Ye||c){if(c=je,c!==null&&(a=Xs(c,l),a!==0&&a!==d.retryLane))throw d.retryLane=a,ql(e,a),rt(c,e,a),Ec;os(s)||Ou(),t=Oc(e,t,l)}else os(s)?(t.flags|=192,t.child=e.child,t=null):(e=d.treeContext,Me=Tt(s.nextSibling),We=t,ce=!0,fl=null,Mt=!1,e!==null&&Lr(t,e),t=Dc(t,a.children),t.flags|=4096);return t}return n?(xl(),s=a.fallback,n=t.mode,d=e.child,h=d.sibling,a=Qt(d,{mode:"hidden",children:a.children}),a.subtreeFlags=d.subtreeFlags&65011712,h!==null?s=Qt(h,s):(s=Yl(s,n,l,null),s.flags|=2),s.return=t,a.return=t,a.sibling=s,t.child=a,gn(null,a),a=t.child,s=e.child.memoizedState,s===null?s=Cc(l):(n=s.cachePool,n!==null?(d=Be._currentValue,n=n.parent!==d?{parent:d,pool:d}:n):n=Vr(),s={baseLanes:s.baseLanes|l,cachePool:n}),a.memoizedState=s,a.childLanes=_c(e,c,l),t.memoizedState=Ac,gn(e.child,a)):(yl(t),l=e.child,e=l.sibling,l=Qt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function Dc(e,t){return t=ku({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ku(e,t){return e=gt(22,e,null,t),e.lanes=0,e}function Oc(e,t,l){return Vl(t,e.child,null,l),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function id(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ji(e.return,t,l)}function wc(e,t,l,a,n,u){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:u}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=n,c.treeForkCount=u)}function cd(e,t,l){var a=t.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var c=we.current,s=(c&2)!==0;if(s?(c=c&1|2,t.flags|=128):c&=1,z(we,c),Fe(e,t,a,l),a=ce?en:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&id(e,l,t);else if(e.tag===19)id(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&ou(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),wc(t,!1,n,l,u,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&ou(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}wc(t,!0,l,null,u,a);break;case"together":wc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Wt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),pl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ha(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Qt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Qt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Uc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&nu(e)))}function zm(e,t,l){switch(t.tag){case 3:qt(t,t.stateNode.containerInfo),ol(t,Be,e.memoizedState.cache),Ll();break;case 27:case 5:V(t);break;case 4:qt(t,t.stateNode.containerInfo);break;case 10:ol(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ic(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(yl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ud(e,t,l):(yl(t),e=Wt(e,t,l),e!==null?e.sibling:null);yl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ha(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return cd(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),z(we,we.current),a)break;return null;case 22:return t.lanes=0,Pf(e,t,l,t.pendingProps);case 24:ol(t,Be,e.memoizedState.cache)}return Wt(e,t,l)}function sd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ye=!0;else{if(!Uc(e,l)&&(t.flags&128)===0)return Ye=!1,zm(e,t,l);Ye=(e.flags&131072)!==0}else Ye=!1,ce&&(t.flags&1048576)!==0&&Yr(t,en,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Xl(t.elementType),t.type=e,typeof e=="function")Li(e)?(a=Jl(e,a),t.tag=1,t=ad(null,t,e,a,l)):(t.tag=0,t=Tc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===$){t.tag=11,t=$f(null,t,e,a,l);break e}else if(n===Ne){t.tag=14,t=Ff(null,t,e,a,l);break e}}throw t=Ve(e)||e,Error(r(306,t,""))}}return t;case 0:return Tc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Jl(a,t.pendingProps),ad(e,t,a,n,l);case 3:e:{if(qt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var u=t.memoizedState;n=u.element,tc(e,t),rn(t,a,null,l);var c=t.memoizedState;if(a=c.cache,ol(t,Be,a),a!==u.cache&&Wi(t,[Be],l,!0),sn(),a=c.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=nd(e,t,a,l);break e}else if(a!==n){n=Nt(Error(r(424)),t),tn(n),t=nd(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Me=Tt(e.firstChild),We=t,ce=!0,fl=null,Mt=!0,l=Ir(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ll(),a===n){t=Wt(e,t,l);break e}Fe(e,t,a,l)}t=t.child}return t;case 26:return Nu(e,t),e===null?(l=v0(t.type,null,t.pendingProps,null))?t.memoizedState=l:ce||(l=t.type,e=t.pendingProps,a=Lu(Ke.current).createElement(l),a[Je]=t,a[at]=e,Ie(a,l,e),Xe(a),t.stateNode=a):t.memoizedState=v0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return V(t),e===null&&ce&&(a=t.stateNode=y0(t.type,t.pendingProps,Ke.current),We=t,Mt=!0,n=Me,zl(t.type)?(gs=n,Me=Tt(a.firstChild)):Me=n),Fe(e,t,t.pendingProps.children,l),Nu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ce&&((n=a=Me)&&(a=tg(a,t.type,t.pendingProps,Mt),a!==null?(t.stateNode=a,We=t,Me=Tt(a.firstChild),Mt=!1,n=!0):n=!1),n||dl(t)),V(t),n=t.type,u=t.pendingProps,c=e!==null?e.memoizedProps:null,a=u.children,rs(n,u)?a=null:c!==null&&rs(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=sc(e,t,ym,null,null,l),An._currentValue=n),Nu(e,t),Fe(e,t,a,l),t.child;case 6:return e===null&&ce&&((e=l=Me)&&(l=lg(l,t.pendingProps,Mt),l!==null?(t.stateNode=l,We=t,Me=null,e=!0):e=!1),e||dl(t)),null;case 13:return ud(e,t,l);case 4:return qt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Vl(t,null,a,l):Fe(e,t,a,l),t.child;case 11:return $f(e,t,t.type,t.pendingProps,l);case 7:return Fe(e,t,t.pendingProps,l),t.child;case 8:return Fe(e,t,t.pendingProps.children,l),t.child;case 12:return Fe(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ol(t,t.type,a.value),Fe(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Gl(t),n=$e(n),a=a(n),t.flags|=1,Fe(e,t,a,l),t.child;case 14:return Ff(e,t,t.type,t.pendingProps,l);case 15:return If(e,t,t.type,t.pendingProps,l);case 19:return cd(e,t,l);case 31:return km(e,t,l);case 22:return Pf(e,t,l,t.pendingProps);case 24:return Gl(t),a=$e(Be),e===null?(n=Ii(),n===null&&(n=je,u=$i(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=l),n=u),t.memoizedState={parent:a,cache:n},ec(t),ol(t,Be,n)):((e.lanes&l)!==0&&(tc(e,t),rn(t,null,null,l),sn()),n=e.memoizedState,u=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),ol(t,Be,a)):(a=u.cache,ol(t,Be,a),a!==n.cache&&Wi(t,[Be],l,!0))),Fe(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function $t(e){e.flags|=4}function Hc(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Ud())e.flags|=8192;else throw Zl=su,Pi}else e.flags&=-16777217}function rd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!k0(t))if(Ud())e.flags|=8192;else throw Zl=su,Pi}function zu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Rs():536870912,e.lanes|=t,Ea|=t)}function hn(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ee(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Mm(e,t,l){var a=t.pendingProps;switch(Xi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ee(t),null;case 1:return Ee(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Vt(Be),Ct(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ga(t)?$t(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vi())),Ee(t),null;case 26:var n=t.type,u=t.memoizedState;return e===null?($t(t),u!==null?(Ee(t),rd(t,u)):(Ee(t),Hc(t,n,null,a,l))):u?u!==e.memoizedState?($t(t),Ee(t),rd(t,u)):(Ee(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&$t(t),Ee(t),Hc(t,n,e,a,l)),null;case 27:if(ze(t),l=Ke.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&$t(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ee(t),null}e=E.current,ga(t)?Rr(t):(e=y0(n,a,l),t.stateNode=e,$t(t))}return Ee(t),null;case 5:if(ze(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&$t(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ee(t),null}if(u=E.current,ga(t))Rr(t);else{var c=Lu(Ke.current);switch(u){case 1:u=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=c.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}u[Je]=t,u[at]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)u.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=u;e:switch(Ie(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&$t(t)}}return Ee(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&$t(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=Ke.current,ga(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=We,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Je]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||u0(e.nodeValue,l)),e||dl(t,!0)}else e=Lu(e).createTextNode(a),e[Je]=t,t.stateNode=e}return Ee(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ga(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Je]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ee(t),e=!1}else l=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(yt(t),t):(yt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ee(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ga(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[Je]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ee(t),n=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(yt(t),t):(yt(t),null)}return yt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),zu(t,t.updateQueue),Ee(t),null);case 4:return Ct(),e===null&&ns(t.stateNode.containerInfo),Ee(t),null;case 10:return Vt(t.type),Ee(t),null;case 19:if(te(we),a=t.memoizedState,a===null)return Ee(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)hn(a,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ou(e),u!==null){for(t.flags|=128,hn(a,!1),e=u.updateQueue,t.updateQueue=e,zu(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Hr(l,e),l=l.sibling;return z(we,we.current&1|2),ce&&Xt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ft()>Cu&&(t.flags|=128,n=!0,hn(a,!1),t.lanes=4194304)}else{if(!n)if(e=ou(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,zu(t,e),hn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ce)return Ee(t),null}else 2*ft()-a.renderingStartTime>Cu&&l!==536870912&&(t.flags|=128,n=!0,hn(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ft(),e.sibling=null,l=we.current,z(we,n?l&1|2:l&1),ce&&Xt(t,a.treeForkCount),e):(Ee(t),null);case 22:case 23:return yt(t),uc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),l=t.updateQueue,l!==null&&zu(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&te(Ql),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Vt(Be),Ee(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Em(e,t){switch(Xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vt(Be),Ct(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ze(t),null;case 31:if(t.memoizedState!==null){if(yt(t),t.alternate===null)throw Error(r(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(we),null;case 4:return Ct(),null;case 10:return Vt(t.type),null;case 22:case 23:return yt(t),uc(),e!==null&&te(Ql),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vt(Be),null;case 25:return null;default:return null}}function fd(e,t){switch(Xi(t),t.tag){case 3:Vt(Be),Ct();break;case 26:case 27:case 5:ze(t);break;case 4:Ct();break;case 31:t.memoizedState!==null&&yt(t);break;case 13:yt(t);break;case 19:te(we);break;case 10:Vt(t.type);break;case 22:case 23:yt(t),uc(),e!==null&&te(Ql);break;case 24:Vt(Be)}}function yn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,c=l.inst;a=u(),c.destroy=a}l=l.next}while(l!==n)}}catch(s){ye(t,t.return,s)}}function bl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var c=a.inst,s=c.destroy;if(s!==void 0){c.destroy=void 0,n=t;var d=l,h=s;try{h()}catch(v){ye(n,d,v)}}}a=a.next}while(a!==u)}}catch(v){ye(t,t.return,v)}}function dd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ef(t,l)}catch(a){ye(e,e.return,a)}}}function od(e,t,l){l.props=Jl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ye(e,t,a)}}function xn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){ye(e,t,n)}}function Ht(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){ye(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){ye(e,t,n)}else l.current=null}function md(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){ye(e,e.return,n)}}function Bc(e,t,l){try{var a=e.stateNode;Wm(a,e.type,l,t),a[at]=t}catch(n){ye(e,e.return,n)}}function gd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zl(e.type)||e.tag===4}function qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&zl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Rt));else if(a!==4&&(a===27&&zl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,l),e=e.sibling;e!==null;)Yc(e,t,l),e=e.sibling}function Mu(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&zl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Mu(e,t,l),e=e.sibling;e!==null;)Mu(e,t,l),e=e.sibling}function hd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ie(t,a,l),t[Je]=e,t[at]=l}catch(u){ye(e,e.return,u)}}var Ft=!1,Le=!1,Lc=!1,yd=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function Tm(e,t){if(e=e.containerInfo,cs=Ku,e=Er(e),Oi(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var c=0,s=-1,d=-1,h=0,v=0,S=e,y=null;t:for(;;){for(var x;S!==l||n!==0&&S.nodeType!==3||(s=c+n),S!==u||a!==0&&S.nodeType!==3||(d=c+a),S.nodeType===3&&(c+=S.nodeValue.length),(x=S.firstChild)!==null;)y=S,S=x;for(;;){if(S===e)break t;if(y===l&&++h===n&&(s=c),y===u&&++v===a&&(d=c),(x=S.nextSibling)!==null)break;S=y,y=S.parentNode}S=x}l=s===-1||d===-1?null:{start:s,end:d}}else l=null}l=l||{start:0,end:0}}else l=null;for(ss={focusedElem:e,selectionRange:l},Ku=!1,Ze=t;Ze!==null;)if(t=Ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ze=e;else for(;Ze!==null;){switch(t=Ze,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,n=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var q=Jl(l.type,n);e=a.getSnapshotBeforeUpdate(q,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(K){ye(l,l.return,K)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)ds(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ds(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ze=e;break}Ze=t.return}}function xd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Pt(e,l),a&4&&yn(5,l);break;case 1:if(Pt(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){ye(l,l.return,c)}else{var n=Jl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){ye(l,l.return,c)}}a&64&&dd(l),a&512&&xn(l,l.return);break;case 3:if(Pt(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{ef(e,t)}catch(c){ye(l,l.return,c)}}break;case 27:t===null&&a&4&&hd(l);case 26:case 5:Pt(e,l),t===null&&a&4&&md(l),a&512&&xn(l,l.return);break;case 12:Pt(e,l);break;case 31:Pt(e,l),a&4&&pd(e,l);break;case 13:Pt(e,l),a&4&&Sd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Bm.bind(null,l),ag(e,l))));break;case 22:if(a=l.memoizedState!==null||Ft,!a){t=t!==null&&t.memoizedState!==null||Le,n=Ft;var u=Le;Ft=a,(Le=t)&&!u?el(e,l,(l.subtreeFlags&8772)!==0):Pt(e,l),Ft=n,Le=u}break;case 30:break;default:Pt(e,l)}}function bd(e){var t=e.alternate;t!==null&&(e.alternate=null,bd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ce=null,ut=!1;function It(e,t,l){for(l=l.child;l!==null;)vd(e,t,l),l=l.sibling}function vd(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(La,l)}catch{}switch(l.tag){case 26:Le||Ht(l,t),It(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Le||Ht(l,t);var a=Ce,n=ut;zl(l.type)&&(Ce=l.stateNode,ut=!1),It(e,t,l),Mn(l.stateNode),Ce=a,ut=n;break;case 5:Le||Ht(l,t);case 6:if(a=Ce,n=ut,Ce=null,It(e,t,l),Ce=a,ut=n,Ce!==null)if(ut)try{(Ce.nodeType===9?Ce.body:Ce.nodeName==="HTML"?Ce.ownerDocument.body:Ce).removeChild(l.stateNode)}catch(u){ye(l,t,u)}else try{Ce.removeChild(l.stateNode)}catch(u){ye(l,t,u)}break;case 18:Ce!==null&&(ut?(e=Ce,d0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ua(e)):d0(Ce,l.stateNode));break;case 4:a=Ce,n=ut,Ce=l.stateNode.containerInfo,ut=!0,It(e,t,l),Ce=a,ut=n;break;case 0:case 11:case 14:case 15:bl(2,l,t),Le||bl(4,l,t),It(e,t,l);break;case 1:Le||(Ht(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&od(l,t,a)),It(e,t,l);break;case 21:It(e,t,l);break;case 22:Le=(a=Le)||l.memoizedState!==null,It(e,t,l),Le=a;break;default:It(e,t,l)}}function pd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ua(e)}catch(l){ye(t,t.return,l)}}}function Sd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ua(e)}catch(l){ye(t,t.return,l)}}function Am(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yd),t;default:throw Error(r(435,e.tag))}}function Eu(e,t){var l=Am(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=qm.bind(null,e,a);a.then(n,n)}})}function it(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],u=e,c=t,s=c;e:for(;s!==null;){switch(s.tag){case 27:if(zl(s.type)){Ce=s.stateNode,ut=!1;break e}break;case 5:Ce=s.stateNode,ut=!1;break e;case 3:case 4:Ce=s.stateNode.containerInfo,ut=!0;break e}s=s.return}if(Ce===null)throw Error(r(160));vd(u,c,n),Ce=null,ut=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jd(t,e),t=t.sibling}var Dt=null;function jd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:it(t,e),ct(e),a&4&&(bl(3,e,e.return),yn(3,e),bl(5,e,e.return));break;case 1:it(t,e),ct(e),a&512&&(Le||l===null||Ht(l,l.return)),a&64&&Ft&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Dt;if(it(t,e),ct(e),a&512&&(Le||l===null||Ht(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[Qa]||u[Je]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),Ie(u,a,l),u[Je]=e,Xe(u),a=u;break e;case"link":var c=j0("link","href",n).get(a+(l.href||""));if(c){for(var s=0;s<c.length;s++)if(u=c[s],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(s,1);break t}}u=n.createElement(a),Ie(u,a,l),n.head.appendChild(u);break;case"meta":if(c=j0("meta","content",n).get(a+(l.content||""))){for(s=0;s<c.length;s++)if(u=c[s],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(s,1);break t}}u=n.createElement(a),Ie(u,a,l),n.head.appendChild(u);break;default:throw Error(r(468,a))}u[Je]=e,Xe(u),a=u}e.stateNode=a}else N0(n,e.type,e.stateNode);else e.stateNode=S0(n,a,e.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?N0(n,e.type,e.stateNode):S0(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,l.memoizedProps)}break;case 27:it(t,e),ct(e),a&512&&(Le||l===null||Ht(l,l.return)),l!==null&&a&4&&Bc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(it(t,e),ct(e),a&512&&(Le||l===null||Ht(l,l.return)),e.flags&32){n=e.stateNode;try{na(n,"")}catch(q){ye(e,e.return,q)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Bc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Lc=!0);break;case 6:if(it(t,e),ct(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(q){ye(e,e.return,q)}}break;case 3:if(Qu=null,n=Dt,Dt=Ru(t.containerInfo),it(t,e),Dt=n,ct(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ua(t.containerInfo)}catch(q){ye(e,e.return,q)}Lc&&(Lc=!1,Nd(e));break;case 4:a=Dt,Dt=Ru(e.stateNode.containerInfo),it(t,e),ct(e),Dt=a;break;case 12:it(t,e),ct(e);break;case 31:it(t,e),ct(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Eu(e,a)));break;case 13:it(t,e),ct(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Au=ft()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Eu(e,a)));break;case 22:n=e.memoizedState!==null;var d=l!==null&&l.memoizedState!==null,h=Ft,v=Le;if(Ft=h||n,Le=v||d,it(t,e),Le=v,Ft=h,ct(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||d||Ft||Le||Wl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){d=l=t;try{if(u=d.stateNode,n)c=u.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{s=d.stateNode;var S=d.memoizedProps.style,y=S!=null&&S.hasOwnProperty("display")?S.display:null;s.style.display=y==null||typeof y=="boolean"?"":(""+y).trim()}}catch(q){ye(d,d.return,q)}}}else if(t.tag===6){if(l===null){d=t;try{d.stateNode.nodeValue=n?"":d.memoizedProps}catch(q){ye(d,d.return,q)}}}else if(t.tag===18){if(l===null){d=t;try{var x=d.stateNode;n?o0(x,!0):o0(d.stateNode,!1)}catch(q){ye(d,d.return,q)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Eu(e,l))));break;case 19:it(t,e),ct(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Eu(e,a)));break;case 30:break;case 21:break;default:it(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(gd(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var n=l.stateNode,u=qc(e);Mu(e,u,n);break;case 5:var c=l.stateNode;l.flags&32&&(na(c,""),l.flags&=-33);var s=qc(e);Mu(e,s,c);break;case 3:case 4:var d=l.stateNode.containerInfo,h=qc(e);Yc(e,h,d);break;default:throw Error(r(161))}}catch(v){ye(e,e.return,v)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xd(e,t.alternate,t),t=t.sibling}function Wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Wl(t);break;case 1:Ht(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&od(t,t.return,l),Wl(t);break;case 27:Mn(t.stateNode);case 26:case 5:Ht(t,t.return),Wl(t);break;case 22:t.memoizedState===null&&Wl(t);break;case 30:Wl(t);break;default:Wl(t)}e=e.sibling}}function el(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,u=t,c=u.flags;switch(u.tag){case 0:case 11:case 15:el(n,u,l),yn(4,u);break;case 1:if(el(n,u,l),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(h){ye(a,a.return,h)}if(a=u,n=a.updateQueue,n!==null){var s=a.stateNode;try{var d=n.shared.hiddenCallbacks;if(d!==null)for(n.shared.hiddenCallbacks=null,n=0;n<d.length;n++)Pr(d[n],s)}catch(h){ye(a,a.return,h)}}l&&c&64&&dd(u),xn(u,u.return);break;case 27:hd(u);case 26:case 5:el(n,u,l),l&&a===null&&c&4&&md(u),xn(u,u.return);break;case 12:el(n,u,l);break;case 31:el(n,u,l),l&&c&4&&pd(n,u);break;case 13:el(n,u,l),l&&c&4&&Sd(n,u);break;case 22:u.memoizedState===null&&el(n,u,l),xn(u,u.return);break;case 30:break;default:el(n,u,l)}t=t.sibling}}function Rc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ln(l))}function Gc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ln(e))}function Ot(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kd(e,t,l,a),t=t.sibling}function kd(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Ot(e,t,l,a),n&2048&&yn(9,t);break;case 1:Ot(e,t,l,a);break;case 3:Ot(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ln(e)));break;case 12:if(n&2048){Ot(e,t,l,a),e=t.stateNode;try{var u=t.memoizedProps,c=u.id,s=u.onPostCommit;typeof s=="function"&&s(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(d){ye(t,t.return,d)}}else Ot(e,t,l,a);break;case 31:Ot(e,t,l,a);break;case 13:Ot(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,c=t.alternate,t.memoizedState!==null?u._visibility&2?Ot(e,t,l,a):bn(e,t):u._visibility&2?Ot(e,t,l,a):(u._visibility|=2,ka(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Rc(c,t);break;case 24:Ot(e,t,l,a),n&2048&&Gc(t.alternate,t);break;default:Ot(e,t,l,a)}}function ka(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,c=t,s=l,d=a,h=c.flags;switch(c.tag){case 0:case 11:case 15:ka(u,c,s,d,n),yn(8,c);break;case 23:break;case 22:var v=c.stateNode;c.memoizedState!==null?v._visibility&2?ka(u,c,s,d,n):bn(u,c):(v._visibility|=2,ka(u,c,s,d,n)),n&&h&2048&&Rc(c.alternate,c);break;case 24:ka(u,c,s,d,n),n&&h&2048&&Gc(c.alternate,c);break;default:ka(u,c,s,d,n)}t=t.sibling}}function bn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:bn(l,a),n&2048&&Rc(a.alternate,a);break;case 24:bn(l,a),n&2048&&Gc(a.alternate,a);break;default:bn(l,a)}t=t.sibling}}var vn=8192;function za(e,t,l){if(e.subtreeFlags&vn)for(e=e.child;e!==null;)zd(e,t,l),e=e.sibling}function zd(e,t,l){switch(e.tag){case 26:za(e,t,l),e.flags&vn&&e.memoizedState!==null&&hg(l,Dt,e.memoizedState,e.memoizedProps);break;case 5:za(e,t,l);break;case 3:case 4:var a=Dt;Dt=Ru(e.stateNode.containerInfo),za(e,t,l),Dt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=vn,vn=16777216,za(e,t,l),vn=a):za(e,t,l));break;default:za(e,t,l)}}function Md(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function pn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ze=a,Td(a,e)}Md(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ed(e),e=e.sibling}function Ed(e){switch(e.tag){case 0:case 11:case 15:pn(e),e.flags&2048&&bl(9,e,e.return);break;case 3:pn(e);break;case 12:pn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Tu(e)):pn(e);break;default:pn(e)}}function Tu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ze=a,Td(a,e)}Md(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),Tu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Tu(t));break;default:Tu(t)}e=e.sibling}}function Td(e,t){for(;Ze!==null;){var l=Ze;switch(l.tag){case 0:case 11:case 15:bl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ln(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ze=a;else e:for(l=e;Ze!==null;){a=Ze;var n=a.sibling,u=a.return;if(bd(a),a===l){Ze=null;break e}if(n!==null){n.return=u,Ze=n;break e}Ze=u}}}var Cm={getCacheForType:function(e){var t=$e(Be),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return $e(Be).controller.signal}},_m=typeof WeakMap=="function"?WeakMap:Map,oe=0,je=null,le=null,ne=0,he=0,xt=null,vl=!1,Ma=!1,Qc=!1,tl=0,De=0,pl=0,$l=0,Xc=0,bt=0,Ea=0,Sn=null,st=null,Zc=!1,Au=0,Ad=0,Cu=1/0,_u=null,Sl=null,Ge=0,jl=null,Ta=null,ll=0,Vc=0,Kc=null,Cd=null,jn=0,Jc=null;function vt(){return(oe&2)!==0&&ne!==0?ne&-ne:b.T!==null?es():Zs()}function _d(){if(bt===0)if((ne&536870912)===0||ce){var e=Yn;Yn<<=1,(Yn&3932160)===0&&(Yn=262144),bt=e}else bt=536870912;return e=ht.current,e!==null&&(e.flags|=32),bt}function rt(e,t,l){(e===je&&(he===2||he===9)||e.cancelPendingCommit!==null)&&(Aa(e,0),Nl(e,ne,bt,!1)),Ga(e,l),((oe&2)===0||e!==je)&&(e===je&&((oe&2)===0&&($l|=l),De===4&&Nl(e,ne,bt,!1)),Bt(e))}function Dd(e,t,l){if((oe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ra(e,t),n=a?wm(e,t):$c(e,t,!0),u=a;do{if(n===0){Ma&&!a&&Nl(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!Dm(l)){n=$c(e,t,!1),u=!1;continue}if(n===2){if(u=t,e.errorRecoveryDisabledLanes&u)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var s=e;n=Sn;var d=s.current.memoizedState.isDehydrated;if(d&&(Aa(s,c).flags|=256),c=$c(s,c,!1),c!==2){if(Qc&&!d){s.errorRecoveryDisabledLanes|=u,$l|=u,n=4;break e}u=st,st=n,u!==null&&(st===null?st=u:st.push.apply(st,u))}n=c}if(u=!1,n!==2)continue}}if(n===1){Aa(e,0),Nl(e,t,0,!0);break}e:{switch(a=e,u=n,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Nl(a,t,bt,!vl);break e;case 2:st=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(n=Au+300-ft(),10<n)){if(Nl(a,t,bt,!vl),Rn(a,0,!0)!==0)break e;ll=t,a.timeoutHandle=r0(Od.bind(null,a,l,st,_u,Zc,t,bt,$l,Ea,vl,u,"Throttled",-0,0),n);break e}Od(a,l,st,_u,Zc,t,bt,$l,Ea,vl,u,null,-0,0)}}break}while(!0);Bt(e)}function Od(e,t,l,a,n,u,c,s,d,h,v,S,y,x){if(e.timeoutHandle=-1,S=t.subtreeFlags,S&8192||(S&16785408)===16785408){S={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Rt},zd(t,u,S);var q=(u&62914560)===u?Au-ft():(u&4194048)===u?Ad-ft():0;if(q=yg(S,q),q!==null){ll=u,e.cancelPendingCommit=q(Rd.bind(null,e,t,u,l,a,n,c,s,d,v,S,null,y,x)),Nl(e,u,c,!h);return}}Rd(e,t,u,l,a,n,c,s,d)}function Dm(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],u=n.getSnapshot;n=n.value;try{if(!mt(u(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nl(e,t,l,a){t&=~Xc,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var u=31-ot(n),c=1<<u;a[u]=-1,n&=~c}l!==0&&Gs(e,l,t)}function Du(){return(oe&6)===0?(Nn(0),!1):!0}function Wc(){if(le!==null){if(he===0)var e=le.return;else e=le,Zt=Rl=null,dc(e),va=null,nn=0,e=le;for(;e!==null;)fd(e.alternate,e),e=e.return;le=null}}function Aa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Im(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ll=0,Wc(),je=e,le=l=Qt(e.current,null),ne=t,he=0,xt=null,vl=!1,Ma=Ra(e,t),Qc=!1,Ea=bt=Xc=$l=pl=De=0,st=Sn=null,Zc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-ot(a),u=1<<n;t|=e[n],a&=~u}return tl=t,Pn(),l}function wd(e,t){F=null,b.H=mn,t===ba||t===cu?(t=Wr(),he=3):t===Pi?(t=Wr(),he=4):he=t===Ec?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,xt=t,le===null&&(De=1,Su(e,Nt(t,e.current)))}function Ud(){var e=ht.current;return e===null?!0:(ne&4194048)===ne?Et===null:(ne&62914560)===ne||(ne&536870912)!==0?e===Et:!1}function Hd(){var e=b.H;return b.H=mn,e===null?mn:e}function Bd(){var e=b.A;return b.A=Cm,e}function Ou(){De=4,vl||(ne&4194048)!==ne&&ht.current!==null||(Ma=!0),(pl&134217727)===0&&($l&134217727)===0||je===null||Nl(je,ne,bt,!1)}function $c(e,t,l){var a=oe;oe|=2;var n=Hd(),u=Bd();(je!==e||ne!==t)&&(_u=null,Aa(e,t)),t=!1;var c=De;e:do try{if(he!==0&&le!==null){var s=le,d=xt;switch(he){case 8:Wc(),c=6;break e;case 3:case 2:case 9:case 6:ht.current===null&&(t=!0);var h=he;if(he=0,xt=null,Ca(e,s,d,h),l&&Ma){c=0;break e}break;default:h=he,he=0,xt=null,Ca(e,s,d,h)}}Om(),c=De;break}catch(v){wd(e,v)}while(!0);return t&&e.shellSuspendCounter++,Zt=Rl=null,oe=a,b.H=n,b.A=u,le===null&&(je=null,ne=0,Pn()),c}function Om(){for(;le!==null;)qd(le)}function wm(e,t){var l=oe;oe|=2;var a=Hd(),n=Bd();je!==e||ne!==t?(_u=null,Cu=ft()+500,Aa(e,t)):Ma=Ra(e,t);e:do try{if(he!==0&&le!==null){t=le;var u=xt;t:switch(he){case 1:he=0,xt=null,Ca(e,t,u,1);break;case 2:case 9:if(Kr(u)){he=0,xt=null,Yd(t);break}t=function(){he!==2&&he!==9||je!==e||(he=7),Bt(e)},u.then(t,t);break e;case 3:he=7;break e;case 4:he=5;break e;case 7:Kr(u)?(he=0,xt=null,Yd(t)):(he=0,xt=null,Ca(e,t,u,7));break;case 5:var c=null;switch(le.tag){case 26:c=le.memoizedState;case 5:case 27:var s=le;if(c?k0(c):s.stateNode.complete){he=0,xt=null;var d=s.sibling;if(d!==null)le=d;else{var h=s.return;h!==null?(le=h,wu(h)):le=null}break t}}he=0,xt=null,Ca(e,t,u,5);break;case 6:he=0,xt=null,Ca(e,t,u,6);break;case 8:Wc(),De=6;break e;default:throw Error(r(462))}}Um();break}catch(v){wd(e,v)}while(!0);return Zt=Rl=null,b.H=a,b.A=n,oe=l,le!==null?0:(je=null,ne=0,Pn(),De)}function Um(){for(;le!==null&&!ao();)qd(le)}function qd(e){var t=sd(e.alternate,e,tl);e.memoizedProps=e.pendingProps,t===null?wu(e):le=t}function Yd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=ld(l,t,t.pendingProps,t.type,void 0,ne);break;case 11:t=ld(l,t,t.pendingProps,t.type.render,t.ref,ne);break;case 5:dc(t);default:fd(l,t),t=le=Hr(t,tl),t=sd(l,t,tl)}e.memoizedProps=e.pendingProps,t===null?wu(e):le=t}function Ca(e,t,l,a){Zt=Rl=null,dc(t),va=null,nn=0;var n=t.return;try{if(Nm(e,n,t,l,ne)){De=1,Su(e,Nt(l,e.current)),le=null;return}}catch(u){if(n!==null)throw le=n,u;De=1,Su(e,Nt(l,e.current)),le=null;return}t.flags&32768?(ce||a===1?e=!0:Ma||(ne&536870912)!==0?e=!1:(vl=e=!0,(a===2||a===9||a===3||a===6)&&(a=ht.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ld(t,e)):wu(t)}function wu(e){var t=e;do{if((t.flags&32768)!==0){Ld(t,vl);return}e=t.return;var l=Mm(t.alternate,t,tl);if(l!==null){le=l;return}if(t=t.sibling,t!==null){le=t;return}le=t=e}while(t!==null);De===0&&(De=5)}function Ld(e,t){do{var l=Em(e.alternate,e);if(l!==null){l.flags&=32767,le=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){le=e;return}le=e=l}while(e!==null);De=6,le=null}function Rd(e,t,l,a,n,u,c,s,d){e.cancelPendingCommit=null;do Uu();while(Ge!==0);if((oe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=qi,go(e,l,u,c,s,d),e===je&&(le=je=null,ne=0),Ta=t,jl=e,ll=l,Vc=u,Kc=n,Cd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ym(Bn,function(){return Vd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=b.T,b.T=null,n=C.p,C.p=2,c=oe,oe|=4;try{Tm(e,t,l)}finally{oe=c,C.p=n,b.T=a}}Ge=1,Gd(),Qd(),Xd()}}function Gd(){if(Ge===1){Ge=0;var e=jl,t=Ta,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=b.T,b.T=null;var a=C.p;C.p=2;var n=oe;oe|=4;try{jd(t,e);var u=ss,c=Er(e.containerInfo),s=u.focusedElem,d=u.selectionRange;if(c!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(d!==null&&Oi(s)){var h=d.start,v=d.end;if(v===void 0&&(v=h),"selectionStart"in s)s.selectionStart=h,s.selectionEnd=Math.min(v,s.value.length);else{var S=s.ownerDocument||document,y=S&&S.defaultView||window;if(y.getSelection){var x=y.getSelection(),q=s.textContent.length,K=Math.min(d.start,q),pe=d.end===void 0?K:Math.min(d.end,q);!x.extend&&K>pe&&(c=pe,pe=K,K=c);var m=zr(s,K),o=zr(s,pe);if(m&&o&&(x.rangeCount!==1||x.anchorNode!==m.node||x.anchorOffset!==m.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)){var g=S.createRange();g.setStart(m.node,m.offset),x.removeAllRanges(),K>pe?(x.addRange(g),x.extend(o.node,o.offset)):(g.setEnd(o.node,o.offset),x.addRange(g))}}}}for(S=[],x=s;x=x.parentNode;)x.nodeType===1&&S.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<S.length;s++){var p=S[s];p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}Ku=!!cs,ss=cs=null}finally{oe=n,C.p=a,b.T=l}}e.current=t,Ge=2}}function Qd(){if(Ge===2){Ge=0;var e=jl,t=Ta,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=b.T,b.T=null;var a=C.p;C.p=2;var n=oe;oe|=4;try{xd(e,t.alternate,t)}finally{oe=n,C.p=a,b.T=l}}Ge=3}}function Xd(){if(Ge===4||Ge===3){Ge=0,no();var e=jl,t=Ta,l=ll,a=Cd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ge=5:(Ge=0,Ta=jl=null,Zd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Sl=null),gi(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(La,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=b.T,n=C.p,C.p=2,b.T=null;try{for(var u=e.onRecoverableError,c=0;c<a.length;c++){var s=a[c];u(s.value,{componentStack:s.stack})}}finally{b.T=t,C.p=n}}(ll&3)!==0&&Uu(),Bt(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Jc?jn++:(jn=0,Jc=e):jn=0,Nn(0)}}function Zd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ln(t)))}function Uu(){return Gd(),Qd(),Xd(),Vd()}function Vd(){if(Ge!==5)return!1;var e=jl,t=Vc;Vc=0;var l=gi(ll),a=b.T,n=C.p;try{C.p=32>l?32:l,b.T=null,l=Kc,Kc=null;var u=jl,c=ll;if(Ge=0,Ta=jl=null,ll=0,(oe&6)!==0)throw Error(r(331));var s=oe;if(oe|=4,Ed(u.current),kd(u,u.current,c,l),oe=s,Nn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(La,u)}catch{}return!0}finally{C.p=n,b.T=a,Zd(e,t)}}function Kd(e,t,l){t=Nt(l,t),t=Mc(e.stateNode,t,2),e=hl(e,t,2),e!==null&&(Ga(e,2),Bt(e))}function ye(e,t,l){if(e.tag===3)Kd(e,e,l);else for(;t!==null;){if(t.tag===3){Kd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Sl===null||!Sl.has(a))){e=Nt(l,e),l=Jf(2),a=hl(t,l,2),a!==null&&(Wf(l,a,t,e),Ga(a,2),Bt(a));break}}t=t.return}}function Fc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new _m;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Qc=!0,n.add(l),e=Hm.bind(null,e,t,l),t.then(e,e))}function Hm(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,je===e&&(ne&l)===l&&(De===4||De===3&&(ne&62914560)===ne&&300>ft()-Au?(oe&2)===0&&Aa(e,0):Xc|=l,Ea===ne&&(Ea=0)),Bt(e)}function Jd(e,t){t===0&&(t=Rs()),e=ql(e,t),e!==null&&(Ga(e,t),Bt(e))}function Bm(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Jd(e,l)}function qm(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Jd(e,l)}function Ym(e,t){return fi(e,t)}var Hu=null,_a=null,Ic=!1,Bu=!1,Pc=!1,kl=0;function Bt(e){e!==_a&&e.next===null&&(_a===null?Hu=_a=e:_a=_a.next=e),Bu=!0,Ic||(Ic=!0,Rm())}function Nn(e,t){if(!Pc&&Bu){Pc=!0;do for(var l=!1,a=Hu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var c=a.suspendedLanes,s=a.pingedLanes;u=(1<<31-ot(42|e)+1)-1,u&=n&~(c&~s),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Id(a,u))}else u=ne,u=Rn(a,a===je?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ra(a,u)||(l=!0,Id(a,u));a=a.next}while(l);Pc=!1}}function Lm(){Wd()}function Wd(){Bu=Ic=!1;var e=0;kl!==0&&Fm()&&(e=kl);for(var t=ft(),l=null,a=Hu;a!==null;){var n=a.next,u=$d(a,t);u===0?(a.next=null,l===null?Hu=n:l.next=n,n===null&&(_a=l)):(l=a,(e!==0||(u&3)!==0)&&(Bu=!0)),a=n}Ge!==0&&Ge!==5||Nn(e),kl!==0&&(kl=0)}function $d(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var c=31-ot(u),s=1<<c,d=n[c];d===-1?((s&l)===0||(s&a)!==0)&&(n[c]=mo(s,t)):d<=t&&(e.expiredLanes|=s),u&=~s}if(t=je,l=ne,l=Rn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(he===2||he===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&di(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ra(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&di(a),gi(l)){case 2:case 8:l=Ys;break;case 32:l=Bn;break;case 268435456:l=Ls;break;default:l=Bn}return a=Fd.bind(null,e),l=fi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&di(a),e.callbackPriority=2,e.callbackNode=null,2}function Fd(e,t){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Uu()&&e.callbackNode!==l)return null;var a=ne;return a=Rn(e,e===je?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Dd(e,a,t),$d(e,ft()),e.callbackNode!=null&&e.callbackNode===l?Fd.bind(null,e):null)}function Id(e,t){if(Uu())return null;Dd(e,t,!0)}function Rm(){Pm(function(){(oe&6)!==0?fi(qs,Lm):Wd()})}function es(){if(kl===0){var e=ya;e===0&&(e=qn,qn<<=1,(qn&261888)===0&&(qn=256)),kl=e}return kl}function Pd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Zn(""+e)}function e0(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Gm(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var u=Pd((n[at]||null).action),c=a.submitter;c&&(t=(t=c[at]||null)?Pd(t.formAction):c.getAttribute("formAction"),t!==null&&(u=t,c=null));var s=new Wn("action","action",null,a,n);e.push({event:s,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(kl!==0){var d=c?e0(n,c):new FormData(n);pc(l,{pending:!0,data:d,method:n.method,action:u},null,d)}}else typeof u=="function"&&(s.preventDefault(),d=c?e0(n,c):new FormData(n),pc(l,{pending:!0,data:d,method:n.method,action:u},u,d))},currentTarget:n}]})}}for(var ts=0;ts<Bi.length;ts++){var ls=Bi[ts],Qm=ls.toLowerCase(),Xm=ls[0].toUpperCase()+ls.slice(1);_t(Qm,"on"+Xm)}_t(Cr,"onAnimationEnd"),_t(_r,"onAnimationIteration"),_t(Dr,"onAnimationStart"),_t("dblclick","onDoubleClick"),_t("focusin","onFocus"),_t("focusout","onBlur"),_t(im,"onTransitionRun"),_t(cm,"onTransitionStart"),_t(sm,"onTransitionCancel"),_t(Or,"onTransitionEnd"),la("onMouseEnter",["mouseout","mouseover"]),la("onMouseLeave",["mouseout","mouseover"]),la("onPointerEnter",["pointerout","pointerover"]),la("onPointerLeave",["pointerout","pointerover"]),wl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wl("onBeforeInput",["compositionend","keypress","textInput","paste"]),wl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kn="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(" "),Zm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kn));function t0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var c=a.length-1;0<=c;c--){var s=a[c],d=s.instance,h=s.currentTarget;if(s=s.listener,d!==u&&n.isPropagationStopped())break e;u=s,n.currentTarget=h;try{u(n)}catch(v){In(v)}n.currentTarget=null,u=d}else for(c=0;c<a.length;c++){if(s=a[c],d=s.instance,h=s.currentTarget,s=s.listener,d!==u&&n.isPropagationStopped())break e;u=s,n.currentTarget=h;try{u(n)}catch(v){In(v)}n.currentTarget=null,u=d}}}}function ae(e,t){var l=t[hi];l===void 0&&(l=t[hi]=new Set);var a=e+"__bubble";l.has(a)||(l0(t,e,2,!1),l.add(a))}function as(e,t,l){var a=0;t&&(a|=4),l0(l,e,a,t)}var qu="_reactListening"+Math.random().toString(36).slice(2);function ns(e){if(!e[qu]){e[qu]=!0,Js.forEach(function(l){l!=="selectionchange"&&(Zm.has(l)||as(l,!1,e),as(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qu]||(t[qu]=!0,as("selectionchange",!1,t))}}function l0(e,t,l,a){switch(_0(t)){case 2:var n=vg;break;case 8:n=pg;break;default:n=vs}l=n.bind(null,t,l,e),n=void 0,!ki||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function us(e,t,l,a,n){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var s=a.stateNode.containerInfo;if(s===n)break;if(c===4)for(c=a.return;c!==null;){var d=c.tag;if((d===3||d===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;s!==null;){if(c=Pl(s),c===null)return;if(d=c.tag,d===5||d===6||d===26||d===27){a=u=c;continue e}s=s.parentNode}}a=a.return}ir(function(){var h=u,v=ji(l),S=[];e:{var y=wr.get(e);if(y!==void 0){var x=Wn,q=e;switch(e){case"keypress":if(Kn(l)===0)break e;case"keydown":case"keyup":x=qo;break;case"focusin":q="focus",x=Ti;break;case"focusout":q="blur",x=Ti;break;case"beforeblur":case"afterblur":x=Ti;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=rr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=Mo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Ro;break;case Cr:case _r:case Dr:x=Ao;break;case Or:x=Qo;break;case"scroll":case"scrollend":x=ko;break;case"wheel":x=Zo;break;case"copy":case"cut":case"paste":x=_o;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=dr;break;case"toggle":case"beforetoggle":x=Ko}var K=(t&4)!==0,pe=!K&&(e==="scroll"||e==="scrollend"),m=K?y!==null?y+"Capture":null:y;K=[];for(var o=h,g;o!==null;){var p=o;if(g=p.stateNode,p=p.tag,p!==5&&p!==26&&p!==27||g===null||m===null||(p=Za(o,m),p!=null&&K.push(zn(o,p,g))),pe)break;o=o.return}0<K.length&&(y=new x(y,q,null,l,v),S.push({event:y,listeners:K}))}}if((t&7)===0){e:{if(y=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",y&&l!==Si&&(q=l.relatedTarget||l.fromElement)&&(Pl(q)||q[Il]))break e;if((x||y)&&(y=v.window===v?v:(y=v.ownerDocument)?y.defaultView||y.parentWindow:window,x?(q=l.relatedTarget||l.toElement,x=h,q=q?Pl(q):null,q!==null&&(pe=_(q),K=q.tag,q!==pe||K!==5&&K!==27&&K!==6)&&(q=null)):(x=null,q=h),x!==q)){if(K=rr,p="onMouseLeave",m="onMouseEnter",o="mouse",(e==="pointerout"||e==="pointerover")&&(K=dr,p="onPointerLeave",m="onPointerEnter",o="pointer"),pe=x==null?y:Xa(x),g=q==null?y:Xa(q),y=new K(p,o+"leave",x,l,v),y.target=pe,y.relatedTarget=g,p=null,Pl(v)===h&&(K=new K(m,o+"enter",q,l,v),K.target=g,K.relatedTarget=pe,p=K),pe=p,x&&q)t:{for(K=Vm,m=x,o=q,g=0,p=m;p;p=K(p))g++;p=0;for(var X=o;X;X=K(X))p++;for(;0<g-p;)m=K(m),g--;for(;0<p-g;)o=K(o),p--;for(;g--;){if(m===o||o!==null&&m===o.alternate){K=m;break t}m=K(m),o=K(o)}K=null}else K=null;x!==null&&a0(S,y,x,K,!1),q!==null&&pe!==null&&a0(S,pe,q,K,!0)}}e:{if(y=h?Xa(h):window,x=y.nodeName&&y.nodeName.toLowerCase(),x==="select"||x==="input"&&y.type==="file")var fe=vr;else if(xr(y))if(pr)fe=am;else{fe=tm;var L=em}else x=y.nodeName,!x||x.toLowerCase()!=="input"||y.type!=="checkbox"&&y.type!=="radio"?h&&pi(h.elementType)&&(fe=vr):fe=lm;if(fe&&(fe=fe(e,h))){br(S,fe,l,v);break e}L&&L(e,y,h),e==="focusout"&&h&&y.type==="number"&&h.memoizedProps.value!=null&&vi(y,"number",y.value)}switch(L=h?Xa(h):window,e){case"focusin":(xr(L)||L.contentEditable==="true")&&(sa=L,wi=h,Pa=null);break;case"focusout":Pa=wi=sa=null;break;case"mousedown":Ui=!0;break;case"contextmenu":case"mouseup":case"dragend":Ui=!1,Tr(S,l,v);break;case"selectionchange":if(um)break;case"keydown":case"keyup":Tr(S,l,v)}var I;if(Ci)e:{switch(e){case"compositionstart":var ue="onCompositionStart";break e;case"compositionend":ue="onCompositionEnd";break e;case"compositionupdate":ue="onCompositionUpdate";break e}ue=void 0}else ca?hr(e,l)&&(ue="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ue="onCompositionStart");ue&&(or&&l.locale!=="ko"&&(ca||ue!=="onCompositionStart"?ue==="onCompositionEnd"&&ca&&(I=cr()):(sl=v,zi="value"in sl?sl.value:sl.textContent,ca=!0)),L=Yu(h,ue),0<L.length&&(ue=new fr(ue,e,null,l,v),S.push({event:ue,listeners:L}),I?ue.data=I:(I=yr(l),I!==null&&(ue.data=I)))),(I=Wo?$o(e,l):Fo(e,l))&&(ue=Yu(h,"onBeforeInput"),0<ue.length&&(L=new fr("onBeforeInput","beforeinput",null,l,v),S.push({event:L,listeners:ue}),L.data=I)),Gm(S,e,h,l,v)}t0(S,t)})}function zn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Yu(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=Za(e,l),n!=null&&a.unshift(zn(e,n,u)),n=Za(e,t),n!=null&&a.push(zn(e,n,u))),e.tag===3)return a;e=e.return}return[]}function Vm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function a0(e,t,l,a,n){for(var u=t._reactName,c=[];l!==null&&l!==a;){var s=l,d=s.alternate,h=s.stateNode;if(s=s.tag,d!==null&&d===a)break;s!==5&&s!==26&&s!==27||h===null||(d=h,n?(h=Za(l,u),h!=null&&c.unshift(zn(l,h,d))):n||(h=Za(l,u),h!=null&&c.push(zn(l,h,d)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var Km=/\r\n?/g,Jm=/\u0000|\uFFFD/g;function n0(e){return(typeof e=="string"?e:""+e).replace(Km,`
`).replace(Jm,"")}function u0(e,t){return t=n0(t),n0(e)===t}function ve(e,t,l,a,n,u){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||na(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&na(e,""+a);break;case"className":Qn(e,"class",a);break;case"tabIndex":Qn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Qn(e,l,a);break;case"style":nr(e,a,u);break;case"data":if(t!=="object"){Qn(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Zn(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 u=="function"&&(l==="formAction"?(t!=="input"&&ve(e,t,"name",n.name,n,null),ve(e,t,"formEncType",n.formEncType,n,null),ve(e,t,"formMethod",n.formMethod,n,null),ve(e,t,"formTarget",n.formTarget,n,null)):(ve(e,t,"encType",n.encType,n,null),ve(e,t,"method",n.method,n,null),ve(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Zn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Rt);break;case"onScroll":a!=null&&ae("scroll",e);break;case"onScrollEnd":a!=null&&ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Zn(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ae("beforetoggle",e),ae("toggle",e),Gn(e,"popover",a);break;case"xlinkActuate":Lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Lt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Lt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Lt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Lt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Gn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=jo.get(l)||l,Gn(e,l,a))}}function is(e,t,l,a,n,u){switch(l){case"style":nr(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?na(e,a):(typeof a=="number"||typeof a=="bigint")&&na(e,""+a);break;case"onScroll":a!=null&&ae("scroll",e);break;case"onScrollEnd":a!=null&&ae("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Rt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ws.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),u=e[at]||null,u=u!=null?u[l]:null,typeof u=="function"&&e.removeEventListener(t,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Gn(e,l,a)}}}function Ie(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ae("error",e),ae("load",e);var a=!1,n=!1,u;for(u in l)if(l.hasOwnProperty(u)){var c=l[u];if(c!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ve(e,t,u,c,l,null)}}n&&ve(e,t,"srcSet",l.srcSet,l,null),a&&ve(e,t,"src",l.src,l,null);return;case"input":ae("invalid",e);var s=u=c=n=null,d=null,h=null;for(a in l)if(l.hasOwnProperty(a)){var v=l[a];if(v!=null)switch(a){case"name":n=v;break;case"type":c=v;break;case"checked":d=v;break;case"defaultChecked":h=v;break;case"value":u=v;break;case"defaultValue":s=v;break;case"children":case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(137,t));break;default:ve(e,t,a,v,l,null)}}er(e,u,s,d,h,c,n,!1);return;case"select":ae("invalid",e),a=c=u=null;for(n in l)if(l.hasOwnProperty(n)&&(s=l[n],s!=null))switch(n){case"value":u=s;break;case"defaultValue":c=s;break;case"multiple":a=s;default:ve(e,t,n,s,l,null)}t=u,l=c,e.multiple=!!a,t!=null?aa(e,!!a,t,!1):l!=null&&aa(e,!!a,l,!0);return;case"textarea":ae("invalid",e),u=n=a=null;for(c in l)if(l.hasOwnProperty(c)&&(s=l[c],s!=null))switch(c){case"value":a=s;break;case"defaultValue":n=s;break;case"children":u=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:ve(e,t,c,s,l,null)}lr(e,a,n,u);return;case"option":for(d in l)if(l.hasOwnProperty(d)&&(a=l[d],a!=null))switch(d){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ve(e,t,d,a,l,null)}return;case"dialog":ae("beforetoggle",e),ae("toggle",e),ae("cancel",e),ae("close",e);break;case"iframe":case"object":ae("load",e);break;case"video":case"audio":for(a=0;a<kn.length;a++)ae(kn[a],e);break;case"image":ae("error",e),ae("load",e);break;case"details":ae("toggle",e);break;case"embed":case"source":case"link":ae("error",e),ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(h in l)if(l.hasOwnProperty(h)&&(a=l[h],a!=null))switch(h){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ve(e,t,h,a,l,null)}return;default:if(pi(t)){for(v in l)l.hasOwnProperty(v)&&(a=l[v],a!==void 0&&is(e,t,v,a,l,void 0));return}}for(s in l)l.hasOwnProperty(s)&&(a=l[s],a!=null&&ve(e,t,s,a,l,null))}function Wm(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,c=null,s=null,d=null,h=null,v=null;for(x in l){var S=l[x];if(l.hasOwnProperty(x)&&S!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":d=S;default:a.hasOwnProperty(x)||ve(e,t,x,null,a,S)}}for(var y in a){var x=a[y];if(S=l[y],a.hasOwnProperty(y)&&(x!=null||S!=null))switch(y){case"type":u=x;break;case"name":n=x;break;case"checked":h=x;break;case"defaultChecked":v=x;break;case"value":c=x;break;case"defaultValue":s=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(137,t));break;default:x!==S&&ve(e,t,y,x,a,S)}}bi(e,c,s,d,h,v,u,n);return;case"select":x=c=s=y=null;for(u in l)if(d=l[u],l.hasOwnProperty(u)&&d!=null)switch(u){case"value":break;case"multiple":x=d;default:a.hasOwnProperty(u)||ve(e,t,u,null,a,d)}for(n in a)if(u=a[n],d=l[n],a.hasOwnProperty(n)&&(u!=null||d!=null))switch(n){case"value":y=u;break;case"defaultValue":s=u;break;case"multiple":c=u;default:u!==d&&ve(e,t,n,u,a,d)}t=s,l=c,a=x,y!=null?aa(e,!!l,y,!1):!!a!=!!l&&(t!=null?aa(e,!!l,t,!0):aa(e,!!l,l?[]:"",!1));return;case"textarea":x=y=null;for(s in l)if(n=l[s],l.hasOwnProperty(s)&&n!=null&&!a.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:ve(e,t,s,null,a,n)}for(c in a)if(n=a[c],u=l[c],a.hasOwnProperty(c)&&(n!=null||u!=null))switch(c){case"value":y=n;break;case"defaultValue":x=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==u&&ve(e,t,c,n,a,u)}tr(e,y,x);return;case"option":for(var q in l)if(y=l[q],l.hasOwnProperty(q)&&y!=null&&!a.hasOwnProperty(q))switch(q){case"selected":e.selected=!1;break;default:ve(e,t,q,null,a,y)}for(d in a)if(y=a[d],x=l[d],a.hasOwnProperty(d)&&y!==x&&(y!=null||x!=null))switch(d){case"selected":e.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:ve(e,t,d,y,a,x)}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 K in l)y=l[K],l.hasOwnProperty(K)&&y!=null&&!a.hasOwnProperty(K)&&ve(e,t,K,null,a,y);for(h in a)if(y=a[h],x=l[h],a.hasOwnProperty(h)&&y!==x&&(y!=null||x!=null))switch(h){case"children":case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(137,t));break;default:ve(e,t,h,y,a,x)}return;default:if(pi(t)){for(var pe in l)y=l[pe],l.hasOwnProperty(pe)&&y!==void 0&&!a.hasOwnProperty(pe)&&is(e,t,pe,void 0,a,y);for(v in a)y=a[v],x=l[v],!a.hasOwnProperty(v)||y===x||y===void 0&&x===void 0||is(e,t,v,y,a,x);return}}for(var m in l)y=l[m],l.hasOwnProperty(m)&&y!=null&&!a.hasOwnProperty(m)&&ve(e,t,m,null,a,y);for(S in a)y=a[S],x=l[S],!a.hasOwnProperty(S)||y===x||y==null&&x==null||ve(e,t,S,y,a,x)}function i0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $m(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],u=n.transferSize,c=n.initiatorType,s=n.duration;if(u&&s&&i0(c)){for(c=0,s=n.responseEnd,a+=1;a<l.length;a++){var d=l[a],h=d.startTime;if(h>s)break;var v=d.transferSize,S=d.initiatorType;v&&i0(S)&&(d=d.responseEnd,c+=v*(d<s?1:(s-h)/(d-h)))}if(--a,t+=8*(u+c)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var cs=null,ss=null;function Lu(e){return e.nodeType===9?e:e.ownerDocument}function c0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function s0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function rs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fs=null;function Fm(){var e=window.event;return e&&e.type==="popstate"?e===fs?!1:(fs=e,!0):(fs=null,!1)}var r0=typeof setTimeout=="function"?setTimeout:void 0,Im=typeof clearTimeout=="function"?clearTimeout:void 0,f0=typeof Promise=="function"?Promise:void 0,Pm=typeof queueMicrotask=="function"?queueMicrotask:typeof f0<"u"?function(e){return f0.resolve(null).then(e).catch(eg)}:r0;function eg(e){setTimeout(function(){throw e})}function zl(e){return e==="head"}function d0(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),Ua(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Mn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Mn(l);for(var u=l.firstChild;u;){var c=u.nextSibling,s=u.nodeName;u[Qa]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=c}}else l==="body"&&Mn(e.ownerDocument.body);l=n}while(l);Ua(t)}function o0(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function ds(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ds(l),yi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function tg(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Tt(e.nextSibling),e===null)break}return null}function lg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Tt(e.nextSibling),e===null))return null;return e}function m0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Tt(e.nextSibling),e===null))return null;return e}function os(e){return e.data==="$?"||e.data==="$~"}function ms(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ag(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Tt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var gs=null;function g0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Tt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function h0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function y0(e,t,l){switch(t=Lu(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Mn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yi(e)}var At=new Map,x0=new Set;function Ru(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var al=C.d;C.d={f:ng,r:ug,D:ig,C:cg,L:sg,m:rg,X:dg,S:fg,M:og};function ng(){var e=al.f(),t=Du();return e||t}function ug(e){var t=ea(e);t!==null&&t.tag===5&&t.type==="form"?wf(t):al.r(e)}var Da=typeof document>"u"?null:document;function b0(e,t,l){var a=Da;if(a&&typeof t=="string"&&t){var n=St(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),x0.has(n)||(x0.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Ie(t,"link",e),Xe(t),a.head.appendChild(t)))}}function ig(e){al.D(e),b0("dns-prefetch",e,null)}function cg(e,t){al.C(e,t),b0("preconnect",e,t)}function sg(e,t,l){al.L(e,t,l);var a=Da;if(a&&e&&t){var n='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+St(l.imageSizes)+'"]')):n+='[href="'+St(e)+'"]';var u=n;switch(t){case"style":u=Oa(e);break;case"script":u=wa(e)}At.has(u)||(e=A({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),At.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(En(u))||t==="script"&&a.querySelector(Tn(u))||(t=a.createElement("link"),Ie(t,"link",e),Xe(t),a.head.appendChild(t)))}}function rg(e,t){al.m(e,t);var l=Da;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+St(a)+'"][href="'+St(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=wa(e)}if(!At.has(u)&&(e=A({rel:"modulepreload",href:e},t),At.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Tn(u)))return}a=l.createElement("link"),Ie(a,"link",e),Xe(a),l.head.appendChild(a)}}}function fg(e,t,l){al.S(e,t,l);var a=Da;if(a&&e){var n=ta(a).hoistableStyles,u=Oa(e);t=t||"default";var c=n.get(u);if(!c){var s={loading:0,preload:null};if(c=a.querySelector(En(u)))s.loading=5;else{e=A({rel:"stylesheet",href:e,"data-precedence":t},l),(l=At.get(u))&&hs(e,l);var d=c=a.createElement("link");Xe(d),Ie(d,"link",e),d._p=new Promise(function(h,v){d.onload=h,d.onerror=v}),d.addEventListener("load",function(){s.loading|=1}),d.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Gu(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:s},n.set(u,c)}}}function dg(e,t){al.X(e,t);var l=Da;if(l&&e){var a=ta(l).hoistableScripts,n=wa(e),u=a.get(n);u||(u=l.querySelector(Tn(n)),u||(e=A({src:e,async:!0},t),(t=At.get(n))&&ys(e,t),u=l.createElement("script"),Xe(u),Ie(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function og(e,t){al.M(e,t);var l=Da;if(l&&e){var a=ta(l).hoistableScripts,n=wa(e),u=a.get(n);u||(u=l.querySelector(Tn(n)),u||(e=A({src:e,async:!0,type:"module"},t),(t=At.get(n))&&ys(e,t),u=l.createElement("script"),Xe(u),Ie(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function v0(e,t,l,a){var n=(n=Ke.current)?Ru(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Oa(l.href),l=ta(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Oa(l.href);var u=ta(n).hoistableStyles,c=u.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,c),(u=n.querySelector(En(e)))&&!u._p&&(c.instance=u,c.state.loading=5),At.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},At.set(e,l),u||mg(n,e,l,c.state))),t&&a===null)throw Error(r(528,""));return c}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wa(l),l=ta(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Oa(e){return'href="'+St(e)+'"'}function En(e){return'link[rel="stylesheet"]['+e+"]"}function p0(e){return A({},e,{"data-precedence":e.precedence,precedence:null})}function mg(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ie(t,"link",l),Xe(t),e.head.appendChild(t))}function wa(e){return'[src="'+St(e)+'"]'}function Tn(e){return"script[async]"+e}function S0(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(a)return t.instance=a,Xe(a),a;var n=A({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Xe(a),Ie(a,"style",n),Gu(a,l.precedence,e),t.instance=a;case"stylesheet":n=Oa(l.href);var u=e.querySelector(En(n));if(u)return t.state.loading|=4,t.instance=u,Xe(u),u;a=p0(l),(n=At.get(n))&&hs(a,n),u=(e.ownerDocument||e).createElement("link"),Xe(u);var c=u;return c._p=new Promise(function(s,d){c.onload=s,c.onerror=d}),Ie(u,"link",a),t.state.loading|=4,Gu(u,l.precedence,e),t.instance=u;case"script":return u=wa(l.src),(n=e.querySelector(Tn(u)))?(t.instance=n,Xe(n),n):(a=l,(n=At.get(u))&&(a=A({},l),ys(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Xe(n),Ie(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Gu(a,l.precedence,e));return t.instance}function Gu(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,c=0;c<a.length;c++){var s=a[c];if(s.dataset.precedence===t)u=s;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function hs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ys(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Qu=null;function j0(e,t,l){if(Qu===null){var a=new Map,n=Qu=new Map;n.set(l,a)}else n=Qu,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var u=l[n];if(!(u[Qa]||u[Je]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var c=u.getAttribute(t)||"";c=e+c;var s=a.get(c);s?s.push(u):a.set(c,[u])}}return a}function N0(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function gg(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function k0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hg(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Oa(a.href),u=t.querySelector(En(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Xu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Xe(u);return}u=t.ownerDocument||t,a=p0(a),(n=At.get(n))&&hs(a,n),u=u.createElement("link"),Xe(u);var c=u;c._p=new Promise(function(s,d){c.onload=s,c.onerror=d}),Ie(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Xu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var xs=0;function yg(e,t){return e.stylesheets&&e.count===0&&Vu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Vu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&xs===0&&(xs=62500*$m());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Vu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>xs?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Xu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zu=null;function Vu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zu=new Map,t.forEach(xg,e),Zu=null,Xu.call(e))}function xg(e,t){if(!(t.state.loading&4)){var l=Zu.get(e);if(l)var a=l.get(null);else{l=new Map,Zu.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var c=n[u];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}n=t.instance,c=n.getAttribute("data-precedence"),u=l.get(c)||a,u===a&&l.set(null,n),l.set(c,n),this.count++,a=Xu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var An={$$typeof:ee,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function bg(e,t,l,a,n,u,c,s,d){this.tag=1,this.containerInfo=e,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=oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.hiddenUpdates=oi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=d,this.incompleteTransitions=new Map}function z0(e,t,l,a,n,u,c,s,d,h,v,S){return e=new bg(e,t,l,c,d,h,v,S,s),t=1,u===!0&&(t|=24),u=gt(3,null,null,t),e.current=u,u.stateNode=e,t=$i(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:t},ec(u),e}function M0(e){return e?(e=da,e):da}function E0(e,t,l,a,n,u){n=M0(n),a.context===null?a.context=n:a.pendingContext=n,a=gl(t),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=hl(e,a,t),l!==null&&(rt(l,e,t),cn(l,e,t))}function T0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function bs(e,t){T0(e,t),(e=e.alternate)&&T0(e,t)}function A0(e){if(e.tag===13||e.tag===31){var t=ql(e,67108864);t!==null&&rt(t,e,67108864),bs(e,67108864)}}function C0(e){if(e.tag===13||e.tag===31){var t=vt();t=mi(t);var l=ql(e,t);l!==null&&rt(l,e,t),bs(e,t)}}var Ku=!0;function vg(e,t,l,a){var n=b.T;b.T=null;var u=C.p;try{C.p=2,vs(e,t,l,a)}finally{C.p=u,b.T=n}}function pg(e,t,l,a){var n=b.T;b.T=null;var u=C.p;try{C.p=8,vs(e,t,l,a)}finally{C.p=u,b.T=n}}function vs(e,t,l,a){if(Ku){var n=ps(a);if(n===null)us(e,t,a,Ju,l),D0(e,a);else if(jg(n,e,t,l,a))a.stopPropagation();else if(D0(e,a),t&4&&-1<Sg.indexOf(e)){for(;n!==null;){var u=ea(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var c=Ol(u.pendingLanes);if(c!==0){var s=u;for(s.pendingLanes|=2,s.entangledLanes|=2;c;){var d=1<<31-ot(c);s.entanglements[1]|=d,c&=~d}Bt(u),(oe&6)===0&&(Cu=ft()+500,Nn(0))}}break;case 31:case 13:s=ql(u,2),s!==null&&rt(s,u,2),Du(),bs(u,2)}if(u=ps(a),u===null&&us(e,t,a,Ju,l),u===n)break;n=u}n!==null&&a.stopPropagation()}else us(e,t,a,null,l)}}function ps(e){return e=ji(e),Ss(e)}var Ju=null;function Ss(e){if(Ju=null,e=Pl(e),e!==null){var t=_(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=H(t),e!==null)return e;e=null}else if(l===31){if(e=Y(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ju=e,null}function _0(e){switch(e){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(uo()){case qs:return 2;case Ys:return 8;case Bn:case io:return 32;case Ls:return 268435456;default:return 32}default:return 32}}var js=!1,Ml=null,El=null,Tl=null,Cn=new Map,_n=new Map,Al=[],Sg="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 D0(e,t){switch(e){case"focusin":case"focusout":Ml=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":Tl=null;break;case"pointerover":case"pointerout":Cn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_n.delete(t.pointerId)}}function Dn(e,t,l,a,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},t!==null&&(t=ea(t),t!==null&&A0(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function jg(e,t,l,a,n){switch(t){case"focusin":return Ml=Dn(Ml,e,t,l,a,n),!0;case"dragenter":return El=Dn(El,e,t,l,a,n),!0;case"mouseover":return Tl=Dn(Tl,e,t,l,a,n),!0;case"pointerover":var u=n.pointerId;return Cn.set(u,Dn(Cn.get(u)||null,e,t,l,a,n)),!0;case"gotpointercapture":return u=n.pointerId,_n.set(u,Dn(_n.get(u)||null,e,t,l,a,n)),!0}return!1}function O0(e){var t=Pl(e.target);if(t!==null){var l=_(t);if(l!==null){if(t=l.tag,t===13){if(t=H(l),t!==null){e.blockedOn=t,Vs(e.priority,function(){C0(l)});return}}else if(t===31){if(t=Y(l),t!==null){e.blockedOn=t,Vs(e.priority,function(){C0(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=ps(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Si=a,l.target.dispatchEvent(a),Si=null}else return t=ea(l),t!==null&&A0(t),e.blockedOn=l,!1;t.shift()}return!0}function w0(e,t,l){Wu(e)&&l.delete(t)}function Ng(){js=!1,Ml!==null&&Wu(Ml)&&(Ml=null),El!==null&&Wu(El)&&(El=null),Tl!==null&&Wu(Tl)&&(Tl=null),Cn.forEach(w0),_n.forEach(w0)}function $u(e,t){e.blockedOn===t&&(e.blockedOn=null,js||(js=!0,f.unstable_scheduleCallback(f.unstable_NormalPriority,Ng)))}var Fu=null;function U0(e){Fu!==e&&(Fu=e,f.unstable_scheduleCallback(f.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(Ss(a||l)===null)continue;break}var u=ea(l);u!==null&&(e.splice(t,3),t-=3,pc(u,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Ua(e){function t(d){return $u(d,e)}Ml!==null&&$u(Ml,e),El!==null&&$u(El,e),Tl!==null&&$u(Tl,e),Cn.forEach(t),_n.forEach(t);for(var l=0;l<Al.length;l++){var a=Al[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Al.length&&(l=Al[0],l.blockedOn===null);)O0(l),l.blockedOn===null&&Al.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],u=l[a+1],c=n[at]||null;if(typeof u=="function")c||U0(l);else if(c){var s=null;if(u&&u.hasAttribute("formAction")){if(n=u,c=u[at]||null)s=c.formAction;else if(Ss(n)!==null)continue}else s=c.action;typeof s=="function"?l[a+1]=s:(l.splice(a,3),a-=3),U0(l)}}}function H0(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function Ns(e){this._internalRoot=e}Iu.prototype.render=Ns.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=vt();E0(l,a,e,t,null,null)},Iu.prototype.unmount=Ns.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;E0(e.current,2,null,e,null,null),Du(),t[Il]=null}};function Iu(e){this._internalRoot=e}Iu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zs();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Al.length&&t!==0&&t<Al[l].priority;l++);Al.splice(l,0,e),l===0&&O0(e)}};var B0=j.version;if(B0!=="19.2.4")throw Error(r(527,B0,"19.2.4"));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=B(t),e=e!==null?Z(e):null,e=e===null?null:e.stateNode,e};var kg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:b,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{La=Pu.inject(kg),dt=Pu}catch{}}return wn.createRoot=function(e,t){if(!M(e))throw Error(r(299));var l=!1,a="",n=Xf,u=Zf,c=Vf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=z0(e,1,!1,null,null,l,a,null,n,u,c,H0),e[Il]=t.current,ns(e),new Ns(t)},wn.hydrateRoot=function(e,t,l){if(!M(e))throw Error(r(299));var a=!1,n="",u=Xf,c=Zf,s=Vf,d=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(s=l.onRecoverableError),l.formState!==void 0&&(d=l.formState)),t=z0(e,1,!0,t,l??null,a,n,d,u,c,s,H0),t.context=M0(null),l=t.current,a=vt(),a=mi(a),n=gl(a),n.callback=null,hl(l,n,a),l=a,t.current.lanes=l,Ga(t,l),Bt(t),e[Il]=t.current,ns(e),new Iu(t)},wn.version="19.2.4",wn}var Q0;function qg(){if(Q0)return Ms.exports;Q0=1;function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(j){console.error(j)}}return f(),Ms.exports=Bg(),Ms.exports}var Yg=qg();const X0="".replace(/\/$/,"");let Hn=localStorage.getItem("access_token"),Fl=localStorage.getItem("refresh_token"),ei=null;function As(f){return X0?`${X0}${f.startsWith("/")?f:`/${f}`}`:f}function Cs(f,j){Hn=f,Fl=j,localStorage.setItem("access_token",f),localStorage.setItem("refresh_token",j)}function _s(){Hn=null,Fl=null,localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function Lg(){return Fl}async function Rg(){if(!Fl)throw new Error("No refresh token");const f=await fetch(As("/auth/refresh"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:Fl})});if(!f.ok)throw _s(),window.dispatchEvent(new CustomEvent("auth:logout")),new Error("Refresh failed");const j=await f.json();Cs(j.access_token,j.refresh_token)}async function re(f,j={}){var M;const O={...j.headers};Hn&&(O.Authorization=`Bearer ${Hn}`),j.body instanceof FormData||(O["Content-Type"]="application/json");let r=await fetch(As(f),{...j,headers:O});if(r.status===401&&Fl&&(ei||(ei=Rg().finally(()=>{ei=null})),await ei,O.Authorization=`Bearer ${Hn}`,r=await fetch(As(f),{...j,headers:O})),!r.ok){const _=await r.json().catch(()=>({}));throw{status:r.status,..._}}return(M=r.headers.get("content-type"))!=null&&M.includes("text/calendar")?await r.text():r.json()}const Se={register:(f,j,O)=>re("/auth/register",{method:"POST",body:JSON.stringify({email:f,password:j,timezone:O})}),login:(f,j)=>re("/auth/login",{method:"POST",body:JSON.stringify({email:f,password:j})}),logout:()=>re("/auth/logout",{method:"POST",body:JSON.stringify({refresh_token:Fl})}),me:()=>re("/auth/me"),updateMe:f=>re("/users/me",{method:"PUT",body:JSON.stringify(f)}),deleteMe:()=>re("/users/me",{method:"DELETE"}),listApiKeys:()=>re("/api-keys"),createApiKey:f=>re("/api-keys",{method:"POST",body:JSON.stringify(f)}),revokeApiKey:f=>re(`/api-keys/${f}`,{method:"DELETE"}),listCalendars:()=>re("/calendars?limit=100"),createCalendar:f=>re("/calendars",{method:"POST",body:JSON.stringify(f)}),getCalendar:f=>re(`/calendars/${f}`),updateCalendar:(f,j)=>re(`/calendars/${f}`,{method:"PUT",body:JSON.stringify(j)}),deleteCalendar:f=>re(`/calendars/${f}`,{method:"DELETE"}),shareCalendar:(f,j)=>re(`/calendars/${f}/share`,{method:"POST",body:JSON.stringify(j)}),listMembers:f=>re(`/calendars/${f}/members`),removeMember:(f,j)=>re(`/calendars/${f}/members/${j}`,{method:"DELETE"}),addCalendarFromUrl:f=>re("/calendars/add-from-url",{method:"POST",body:JSON.stringify(f)}),importCalendarUrl:f=>re("/calendars/import-url",{method:"POST",body:JSON.stringify(f)}),listSubscriptions:f=>re(`/calendars/${f}/subscriptions`),addSubscription:(f,j)=>re(`/calendars/${f}/subscriptions`,{method:"POST",body:JSON.stringify(j)}),deleteSubscription:(f,j)=>re(`/calendars/${f}/subscriptions/${j}`,{method:"DELETE"}),syncSubscription:(f,j)=>re(`/calendars/${f}/subscriptions/${j}/sync`,{method:"POST"}),listEvents:f=>{const j=new URLSearchParams({start:f.start,end:f.end});return f.calendar_id&&j.set("calendar_id",f.calendar_id),f.search&&j.set("search",f.search),j.set("limit","500"),re(`/events?${j}`)},createEvent:f=>re("/events",{method:"POST",body:JSON.stringify(f)}),getEvent:f=>re(`/events/${f}`),updateEvent:(f,j)=>re(`/events/${f}`,{method:"PUT",body:JSON.stringify(j)}),deleteEvent:f=>re(`/events/${f}`,{method:"DELETE"}),listContacts:f=>{const j=new URLSearchParams({limit:"200"});return f&&j.set("search",f),re(`/contacts?${j}`)},createContact:f=>re("/contacts",{method:"POST",body:JSON.stringify(f)}),getContact:f=>re(`/contacts/${f}`),updateContact:(f,j)=>re(`/contacts/${f}`,{method:"PUT",body:JSON.stringify(j)}),deleteContact:f=>re(`/contacts/${f}`,{method:"DELETE"})},eo=N.createContext(null);function Gg({children:f}){const[j,O]=N.useState(null),[r,M]=N.useState(!0);N.useEffect(()=>{localStorage.getItem("access_token")?Se.me().then(A=>O(A.user)).catch(()=>{_s(),O(null)}).finally(()=>M(!1)):M(!1);const Z=()=>{O(null)};return window.addEventListener("auth:logout",Z),()=>window.removeEventListener("auth:logout",Z)},[]);const _=N.useCallback(async(B,Z)=>{const A=await Se.login(B,Z);Cs(A.access_token,A.refresh_token),O(A.user)},[]),H=N.useCallback(async(B,Z,A)=>{const k=await Se.register(B,Z,A);Cs(k.access_token,k.refresh_token),O(k.user)},[]),Y=N.useCallback(async()=>{try{Lg()&&await Se.logout()}finally{_s(),O(null)}},[]),R=N.useCallback(async()=>{const B=await Se.me();O(B.user)},[]);return i.jsx(eo.Provider,{value:{user:j,loading:r,login:_,register:H,logout:Y,refreshUser:R},children:f})}function Ya(){const f=N.useContext(eo);if(!f)throw new Error("useAuth must be used within AuthProvider");return f}const to=N.createContext(null);function Qg(){const f=localStorage.getItem("theme");return f||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}function Xg({children:f}){const[j,O]=N.useState(Qg);N.useEffect(()=>{document.documentElement.classList.toggle("dark",j==="dark"),localStorage.setItem("theme",j)},[j]);const r=N.useCallback(()=>{O(M=>M==="light"?"dark":"light")},[]);return i.jsx(to.Provider,{value:{theme:j,toggle:r},children:f})}function ii(){const f=N.useContext(to);if(!f)throw new Error("useTheme must be used within ThemeProvider");return f}class Zg extends N.Component{constructor(j){super(j),this.state={hasError:!1}}static getDerivedStateFromError(j){return{hasError:!0,error:j}}render(){return this.state.hasError?this.props.fallback?this.props.fallback:i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 p-4",children:i.jsxs("div",{className:"max-w-md w-full text-center",children:[i.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:i.jsx("svg",{className:"w-8 h-8 text-red-600 dark:text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),i.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Something went wrong"}),i.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:"An unexpected error occurred. Please refresh the page to try again."}),i.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-lg transition-colors",children:"Refresh page"})]})}):this.props.children}}function Vg(){const{login:f}=Ya(),{theme:j,toggle:O}=ii(),r=Ds(),[M,_]=N.useState(""),[H,Y]=N.useState(""),[R,B]=N.useState(""),[Z,A]=N.useState(!1),k=async D=>{D.preventDefault(),B(""),A(!0);try{await f(M,H),r("/")}catch(w){B(w.error||"Invalid credentials")}finally{A(!1)}};return i.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 px-4 transition-colors",children:[i.jsx("div",{className:"absolute top-4 right-4",children:i.jsx("button",{onClick:O,className:"p-2 rounded-xl bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:j==="dark"?i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})})}),i.jsxs("div",{className:"w-full max-w-sm",children:[i.jsxs("div",{className:"text-center mb-8",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 bg-blue-600 rounded-2xl mb-4 shadow-lg shadow-blue-600/20",children:i.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),i.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Welcome back"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mt-1 text-sm",children:"Sign in to your calendar"})]}),i.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-xl shadow-gray-200/50 dark:shadow-black/20 border border-gray-100 dark:border-gray-700 p-6",children:i.jsxs("form",{onSubmit:k,className:"space-y-4",children:[R&&i.jsx("div",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 px-3 py-2.5 rounded-xl",children:R}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5",children:"Email"}),i.jsx("input",{type:"email",value:M,onChange:D=>_(D.target.value),className:"w-full px-3.5 py-2.5 rounded-xl border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all text-sm",placeholder:"you@example.com",required:!0,autoFocus:!0})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5",children:"Password"}),i.jsx("input",{type:"password",value:H,onChange:D=>Y(D.target.value),className:"w-full px-3.5 py-2.5 rounded-xl border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all text-sm",placeholder:"Min. 10 characters",required:!0,minLength:10})]}),i.jsx("button",{type:"submit",disabled:Z,className:"w-full py-2.5 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-xl font-medium transition-colors text-sm",children:Z?"Signing in...":"Sign in"})]})}),i.jsxs("p",{className:"text-center mt-6 text-sm text-gray-500 dark:text-gray-400",children:["Don't have an account?"," ",i.jsx(K0,{to:"/register",className:"text-blue-600 dark:text-blue-400 hover:underline font-medium",children:"Create one"})]})]})]})}function Kg(){const{register:f}=Ya(),{theme:j,toggle:O}=ii(),r=Ds(),[M,_]=N.useState(""),[H,Y]=N.useState(""),[R,B]=N.useState(""),[Z,A]=N.useState(""),[k,D]=N.useState(!1),w=async T=>{if(T.preventDefault(),A(""),H!==R){A("Passwords don't match");return}D(!0);try{const U=Intl.DateTimeFormat().resolvedOptions().timeZone;await f(M,H,U),r("/")}catch(U){A(U.error||"Registration failed")}finally{D(!1)}};return i.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 px-4 transition-colors",children:[i.jsx("div",{className:"absolute top-4 right-4",children:i.jsx("button",{onClick:O,className:"p-2 rounded-xl bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:j==="dark"?i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})})}),i.jsxs("div",{className:"w-full max-w-sm",children:[i.jsxs("div",{className:"text-center mb-8",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 bg-blue-600 rounded-2xl mb-4 shadow-lg shadow-blue-600/20",children:i.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),i.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Create account"}),i.jsx("p",{className:"text-gray-500 dark:text-gray-400 mt-1 text-sm",children:"Get started with your calendar"})]}),i.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-xl shadow-gray-200/50 dark:shadow-black/20 border border-gray-100 dark:border-gray-700 p-6",children:i.jsxs("form",{onSubmit:w,className:"space-y-4",children:[Z&&i.jsx("div",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 px-3 py-2.5 rounded-xl",children:Z}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5",children:"Email"}),i.jsx("input",{type:"email",value:M,onChange:T=>_(T.target.value),className:"w-full px-3.5 py-2.5 rounded-xl border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all text-sm",placeholder:"you@example.com",required:!0,autoFocus:!0})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5",children:"Password"}),i.jsx("input",{type:"password",value:H,onChange:T=>Y(T.target.value),className:"w-full px-3.5 py-2.5 rounded-xl border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all text-sm",placeholder:"Min. 10 characters",required:!0,minLength:10})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5",children:"Confirm password"}),i.jsx("input",{type:"password",value:R,onChange:T=>B(T.target.value),className:"w-full px-3.5 py-2.5 rounded-xl border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all text-sm",placeholder:"Repeat your password",required:!0,minLength:10})]}),i.jsx("button",{type:"submit",disabled:k,className:"w-full py-2.5 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-xl font-medium transition-colors text-sm",children:k?"Creating account...":"Create account"})]})}),i.jsxs("p",{className:"text-center mt-6 text-sm text-gray-500 dark:text-gray-400",children:["Already have an account?"," ",i.jsx(K0,{to:"/login",className:"text-blue-600 dark:text-blue-400 hover:underline font-medium",children:"Sign in"})]})]})]})}function Dl(f){return f.is_occurrence&&f.occurrence_start_time?f.occurrence_start_time:f.start_time}function ni(f){return f.is_occurrence&&f.occurrence_end_time?f.occurrence_end_time:f.end_time}function Jg({currentDate:f,events:j,calendars:O,visibleCalendarIds:r,onDateClick:M,onEventClick:_}){const H=Us(f),Y=Hs(f),R=Ba(H),B=Un(Y),Z=J0({start:R,end:B}),A=new Map(O.map(w=>[w.id,w.color])),k=j.filter(w=>r.has(w.calendar_id)),D=w=>k.filter(T=>{const U=tt(Dl(T)),J=tt(ni(T));return _l(U,w)||_l(J,w)||U<w&&J>w});return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsx("div",{className:"grid grid-cols-7 border-b border-gray-200 dark:border-gray-700",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(w=>i.jsx("div",{className:"py-2 text-center text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide",children:w},w))}),i.jsx("div",{className:"grid grid-cols-7 flex-1 auto-rows-fr",children:Z.map((w,T)=>{const U=W0(w,f),J=ui(w),P=D(w);return i.jsxs("div",{className:`min-h-[80px] border-b border-r border-gray-100 dark:border-gray-700/50 p-1 cursor-pointer transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50
                ${T%7===0?"border-l":""}
                ${U?"":"bg-gray-50/50 dark:bg-gray-900/30"}`,onClick:()=>M(w),children:[i.jsx("div",{className:"flex justify-center mb-1",children:i.jsx("span",{className:`text-xs w-6 h-6 flex items-center justify-center rounded-full font-medium
                    ${J?"bg-blue-600 text-white":""}
                    ${!J&&U?"text-gray-700 dark:text-gray-300":""}
                    ${!J&&!U?"text-gray-400 dark:text-gray-600":""}`,children:Oe(w,"d")})}),i.jsxs("div",{className:"space-y-0.5 overflow-hidden",children:[P.slice(0,3).map(ee=>i.jsxs("button",{onClick:$=>{$.stopPropagation(),_(ee)},className:"w-full text-left text-[10px] leading-tight px-1.5 py-0.5 rounded truncate text-white font-medium transition-opacity hover:opacity-80",style:{backgroundColor:A.get(ee.calendar_id)||"#3B82F6"},children:[!ee.all_day&&i.jsxs("span",{className:"opacity-80",children:[Oe(tt(Dl(ee)),"h:mm")," "]}),ee.title]},ee.id+w.toISOString())),P.length>3&&i.jsxs("div",{className:"text-[10px] text-gray-500 dark:text-gray-400 text-center font-medium",children:["+",P.length-3," more"]})]})]},w.toISOString())})})]})}const Z0=Array.from({length:24},(f,j)=>j),ti=60;function Wg({currentDate:f,events:j,calendars:O,visibleCalendarIds:r,onTimeClick:M,onEventClick:_}){const H=Ba(f),Y=Array.from({length:7},(T,U)=>$0(H,U)),R=new Map(O.map(T=>[T.id,T.color])),B=j.filter(T=>r.has(T.calendar_id)),Z=B.filter(T=>T.all_day),A=B.filter(T=>!T.all_day),k=T=>A.filter(U=>_l(tt(Dl(U)),T)),D=T=>Z.filter(U=>{const J=tt(Dl(U)),P=tt(ni(U));return _l(J,T)||_l(P,T)||J<T&&P>T}),w=T=>{const U=tt(Dl(T)),J=F0(U),P=ai(U,J),ee=tt(ni(T)),$=Math.max(ai(ee,U),15);return{top:`${P}px`,height:`${$}px`,minHeight:"20px"}};return i.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[i.jsxs("div",{className:"flex border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[i.jsx("div",{className:"w-16 flex-shrink-0"}),Y.map(T=>{const U=ui(T);return i.jsxs("div",{className:"flex-1 text-center py-2 border-l border-gray-100 dark:border-gray-700/50",children:[i.jsx("div",{className:"text-[10px] font-semibold text-gray-500 dark:text-gray-400 uppercase",children:Oe(T,"EEE")}),i.jsx("div",{className:`text-lg font-semibold mt-0.5 ${U?"bg-blue-600 text-white w-8 h-8 rounded-full flex items-center justify-center mx-auto":"text-gray-700 dark:text-gray-300"}`,children:Oe(T,"d")})]},T.toISOString())})]}),Z.length>0&&i.jsxs("div",{className:"flex border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[i.jsx("div",{className:"w-16 flex-shrink-0 text-[10px] text-gray-400 dark:text-gray-500 text-right pr-2 py-1",children:"all-day"}),Y.map(T=>i.jsx("div",{className:"flex-1 border-l border-gray-100 dark:border-gray-700/50 p-0.5 space-y-0.5",children:D(T).map(U=>i.jsx("button",{onClick:()=>_(U),className:"w-full text-left text-[10px] px-1.5 py-0.5 rounded text-white font-medium truncate hover:opacity-80",style:{backgroundColor:R.get(U.calendar_id)||"#3B82F6"},children:U.title},U.id))},T.toISOString()))]}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsxs("div",{className:"flex relative",style:{height:`${24*ti}px`},children:[i.jsx("div",{className:"w-16 flex-shrink-0 relative",children:Z0.map(T=>i.jsx("div",{className:"absolute w-full text-right pr-2 text-[10px] text-gray-400 dark:text-gray-500 -mt-2",style:{top:`${T*ti}px`},children:T===0?"":Oe(new Date(2e3,0,1,T),"h a")},T))}),Y.map(T=>i.jsxs("div",{className:"flex-1 relative border-l border-gray-100 dark:border-gray-700/50",children:[Z0.map(U=>i.jsx("div",{className:"absolute w-full border-t border-gray-100 dark:border-gray-700/30 cursor-pointer hover:bg-blue-50/50 dark:hover:bg-blue-900/10",style:{top:`${U*ti}px`,height:`${ti}px`},onClick:()=>{const J=new Date(T);J.setHours(U,0,0,0),M(J)}},U)),k(T).map(U=>{const J=w(U);return i.jsxs("button",{onClick:P=>{P.stopPropagation(),_(U)},className:"absolute left-0.5 right-1 rounded-md px-1.5 py-0.5 text-[11px] text-white font-medium overflow-hidden hover:opacity-90 z-10 shadow-sm",style:{...J,backgroundColor:R.get(U.calendar_id)||"#3B82F6"},children:[i.jsx("div",{className:"truncate",children:U.title}),i.jsx("div",{className:"opacity-75 truncate text-[10px]",children:Oe(tt(U.start_time),"h:mm a")})]},U.id)})]},T.toISOString()))]})})]})}const V0=Array.from({length:24},(f,j)=>j),Ha=64;function $g({currentDate:f,events:j,calendars:O,visibleCalendarIds:r,onTimeClick:M,onEventClick:_}){const H=new Map(O.map(k=>[k.id,k.color])),Y=j.filter(k=>r.has(k.calendar_id)),R=Y.filter(k=>k.all_day&&_l(tt(Dl(k)),f)),B=Y.filter(k=>!k.all_day&&_l(tt(Dl(k)),f)),Z=ui(f),A=k=>{const D=tt(Dl(k)),w=F0(D),T=ai(D,w),U=tt(ni(k)),J=Math.max(ai(U,D),15);return{top:`${T*(Ha/60)}px`,height:`${J*(Ha/60)}px`,minHeight:"24px"}};return i.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[i.jsxs("div",{className:"text-center py-3 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[i.jsx("div",{className:"text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase",children:Oe(f,"EEEE")}),i.jsx("div",{className:`text-2xl font-bold mt-1 ${Z?"bg-blue-600 text-white w-10 h-10 rounded-full flex items-center justify-center mx-auto":"text-gray-800 dark:text-gray-200"}`,children:Oe(f,"d")})]}),R.length>0&&i.jsx("div",{className:"px-4 py-2 border-b border-gray-200 dark:border-gray-700 space-y-1 flex-shrink-0",children:R.map(k=>i.jsx("button",{onClick:()=>_(k),className:"block w-full text-left text-sm px-3 py-1.5 rounded-lg text-white font-medium hover:opacity-80",style:{backgroundColor:H.get(k.calendar_id)||"#3B82F6"},children:k.title},k.id))}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsxs("div",{className:"flex relative",style:{height:`${24*Ha}px`},children:[i.jsx("div",{className:"w-20 flex-shrink-0 relative",children:V0.map(k=>i.jsx("div",{className:"absolute w-full text-right pr-3 text-xs text-gray-400 dark:text-gray-500 -mt-2",style:{top:`${k*Ha}px`},children:k===0?"":Oe(new Date(2e3,0,1,k),"h a")},k))}),i.jsxs("div",{className:"flex-1 relative border-l border-gray-200 dark:border-gray-700",children:[V0.map(k=>i.jsx("div",{className:"absolute w-full border-t border-gray-100 dark:border-gray-700/30 cursor-pointer hover:bg-blue-50/50 dark:hover:bg-blue-900/10",style:{top:`${k*Ha}px`,height:`${Ha}px`},onClick:()=>{const D=new Date(f);D.setHours(k,0,0,0),M(D)}},k)),B.map(k=>{const D=A(k);return i.jsxs("button",{onClick:w=>{w.stopPropagation(),_(k)},className:"absolute left-1 right-4 rounded-lg px-3 py-1.5 text-white font-medium overflow-hidden hover:opacity-90 z-10 shadow-sm",style:{...D,backgroundColor:H.get(k.calendar_id)||"#3B82F6"},children:[i.jsx("div",{className:"text-sm truncate",children:k.title}),i.jsxs("div",{className:"text-xs opacity-80",children:[Oe(tt(k.start_time),"h:mm a")," -"," ",Oe(tt(k.end_time),"h:mm a")]}),k.location&&i.jsx("div",{className:"text-xs opacity-70 truncate",children:k.location})]},k.id)})]})]})})]})}function qa({open:f,onClose:j,title:O,children:r,wide:M}){return N.useEffect(()=>{if(!f)return;const _=H=>{H.key==="Escape"&&j()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[f,j]),f?i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-fade-in",onClick:j,children:[i.jsx("div",{className:"absolute inset-0 bg-black/40 dark:bg-black/60"}),i.jsxs("div",{className:`relative bg-white dark:bg-gray-800 rounded-2xl shadow-2xl animate-slide-up
          ${M?"w-full max-w-2xl":"w-full max-w-md"} max-h-[90vh] overflow-y-auto mx-4`,onClick:_=>_.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-700",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:O}),i.jsx("button",{onClick:j,className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),i.jsx("div",{className:"p-6",children:r})]})]}):null}function Fg({open:f,onClose:j,onSaved:O,event:r,calendars:M,defaultDate:_,defaultCalendarId:H}){var ie;const Y=!!r,R=M.filter(G=>G.role!=="viewer"),[B,Z]=N.useState(""),[A,k]=N.useState(""),[D,w]=N.useState(""),[T,U]=N.useState(""),[J,P]=N.useState(""),[ee,$]=N.useState("09:00"),[xe,ge]=N.useState(""),[Ne,Te]=N.useState("10:00"),[W,Ae]=N.useState(!1),[He,ke]=N.useState(!1),[Qe,Ve]=N.useState(""),[Re,b]=N.useState(!1);N.useEffect(()=>{var G;if(f)if(Ve(""),b(!1),r){Z(r.title),k(r.description||""),w(r.location||""),U(r.calendar_id),Ae(r.all_day);const te=new Date(r.start_time),z=new Date(r.end_time);P(Oe(te,"yyyy-MM-dd")),$(Oe(te,"HH:mm")),ge(Oe(z,"yyyy-MM-dd")),Te(Oe(z,"HH:mm"))}else{Z(""),k(""),w(""),U(H||((G=R[0])==null?void 0:G.id)||""),Ae(!1);const z=Oe(_||new Date,"yyyy-MM-dd");P(z),ge(z),$("09:00"),Te("10:00")}},[f,r,_,H]);const C=async G=>{if(G.preventDefault(),!(!B.trim()||!T)){ke(!0),Ve("");try{const te=Intl.DateTimeFormat().resolvedOptions().timeZone,z=W?`${J}T00:00:00`:`${J}T${ee}:00`,E=W?`${xe}T23:59:59`:`${xe}T${Ne}:00`,me={title:B.trim(),description:A.trim()||void 0,location:D.trim()||void 0,start_time:new Date(z).toISOString(),end_time:new Date(E).toISOString(),timezone:te,all_day:W};Y?await Se.updateEvent(r.id,me):await Se.createEvent({...me,calendar_id:T}),O(),j()}catch(te){Ve(te.error||"Failed to save event")}finally{ke(!1)}}},Q=async()=>{if(r){ke(!0);try{await Se.deleteEvent(r.id),O(),j()}catch(G){Ve(G.error||"Failed to delete event")}finally{ke(!1)}}},se=((ie=M.find(G=>G.id===T))==null?void 0:ie.color)||"#3B82F6";return i.jsx(qa,{open:f,onClose:j,title:Y?"Edit Event":"New Event",children:i.jsxs("form",{onSubmit:C,className:"space-y-4",children:[Qe&&i.jsx("div",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 px-3 py-2 rounded-lg",children:Qe}),i.jsx("div",{children:i.jsx("input",{type:"text",placeholder:"Event title",value:B,onChange:G=>Z(G.target.value),className:"w-full text-lg font-medium bg-transparent border-0 border-b-2 border-gray-200 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ring-0 px-0 py-2 text-gray-900 dark:text-white placeholder-gray-400 outline-none transition-colors",autoFocus:!0,required:!0})}),!Y&&i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Calendar"}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3 h-3 rounded-full",style:{backgroundColor:se}}),i.jsx("select",{value:T,onChange:G=>U(G.target.value),className:"w-full pl-8 pr-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",children:R.map(G=>i.jsx("option",{value:G.id,children:G.name},G.id))})]})]}),i.jsx("div",{className:"flex items-center gap-3",children:i.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-700 dark:text-gray-300 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:W,onChange:G=>Ae(G.target.checked),className:"rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),"All day"]})}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Start"}),i.jsx("input",{type:"date",value:J,onChange:G=>{P(G.target.value),G.target.value>xe&&ge(G.target.value)},className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",required:!0}),!W&&i.jsx("input",{type:"time",value:ee,onChange:G=>$(G.target.value),className:"w-full mt-2 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",required:!0})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"End"}),i.jsx("input",{type:"date",value:xe,onChange:G=>ge(G.target.value),min:J,className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",required:!0}),!W&&i.jsx("input",{type:"time",value:Ne,onChange:G=>Te(G.target.value),className:"w-full mt-2 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",required:!0})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),i.jsx("input",{type:"text",placeholder:"Add location",value:D,onChange:G=>w(G.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none placeholder-gray-400"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Description"}),i.jsx("textarea",{placeholder:"Add description",value:A,onChange:G=>k(G.target.value),rows:3,className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none resize-none placeholder-gray-400"})]}),i.jsxs("div",{className:"flex items-center justify-between pt-2",children:[i.jsxs("div",{children:[Y&&!Re&&i.jsx("button",{type:"button",onClick:()=>b(!0),className:"text-sm text-red-500 hover:text-red-700 dark:hover:text-red-400 transition-colors",children:"Delete event"}),Y&&Re&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-red-500",children:"Delete?"}),i.jsx("button",{type:"button",onClick:Q,className:"text-sm text-white bg-red-500 hover:bg-red-600 px-3 py-1 rounded-lg transition-colors",disabled:He,children:"Yes"}),i.jsx("button",{type:"button",onClick:()=>b(!1),className:"text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 transition-colors",children:"No"})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:j,className:"px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:"Cancel"}),i.jsx("button",{type:"submit",disabled:He||!B.trim(),className:"px-4 py-2 text-sm text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50 rounded-lg transition-colors font-medium",children:He?"Saving...":Y?"Update":"Create"})]})]})]})})}const li=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#F97316","#6366F1","#14B8A6","#84CC16","#A855F7"];function Ig(f){navigator.clipboard.writeText(f)}function Pg({open:f,onClose:j,onSaved:O,calendar:r}){const M=!!r,[_,H]=N.useState(""),[Y,R]=N.useState(li[0]),[B,Z]=N.useState(!0),[A,k]=N.useState(10),[D,w]=N.useState(0),[T,U]=N.useState(!1),[J,P]=N.useState(""),[ee,$]=N.useState(!1),[xe,ge]=N.useState([]),[Ne,Te]=N.useState(!1),[W,Ae]=N.useState(""),[He,ke]=N.useState(!1),[Qe,Ve]=N.useState(null),[Re,b]=N.useState(!1),C=N.useCallback(async()=>{if(r!=null&&r.id){Te(!0);try{const E=await Se.listSubscriptions(r.id);ge(E.items||[])}catch{ge([])}finally{Te(!1)}}},[r==null?void 0:r.id]);N.useEffect(()=>{f&&(P(""),$(!1),Ae(""),r?(H(r.name),R(r.color),Z(r.count_for_availability??!0),k(r.default_reminder_minutes??10),w(r.sort_order??0),C()):(H(""),R(li[Math.floor(Math.random()*li.length)]),Z(!0),k(10),w(0),ge([])))},[f,r,C]);const Q=async E=>{if(E.preventDefault(),!!_.trim()){U(!0),P("");try{M?await Se.updateCalendar(r.id,{name:_.trim(),color:Y,count_for_availability:B,default_reminder_minutes:A===""?void 0:A,sort_order:D===""?void 0:D}):await Se.createCalendar({name:_.trim(),color:Y}),O(),j()}catch(me){P(me.error||"Failed to save calendar")}finally{U(!1)}}},se=async()=>{if(r){U(!0);try{await Se.deleteCalendar(r.id),O(),j()}catch(E){P(E.error||"Failed to delete calendar")}finally{U(!1)}}},ie=async E=>{if(E.preventDefault(),!(!(r!=null&&r.id)||!W.trim())){ke(!0);try{await Se.addSubscription(r.id,{url:W.trim()}),Ae(""),C(),O()}catch(me){P(me.error||"Failed to add subscription")}finally{ke(!1)}}},G=async E=>{if(r!=null&&r.id)try{await Se.deleteSubscription(r.id,E),C(),O()}catch(me){P(me.error||"Failed to remove subscription")}},te=async E=>{if(r!=null&&r.id){Ve(E);try{await Se.syncSubscription(r.id,E),C(),O()}catch(me){P(me.error||"Failed to sync")}finally{Ve(null)}}},z=E=>{Ig(E),b(!0),setTimeout(()=>b(!1),1500)};return i.jsx(qa,{open:f,onClose:j,title:M?"Edit Calendar":"New Calendar",children:i.jsxs("form",{onSubmit:Q,className:"space-y-5",children:[J&&i.jsx("div",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 px-3 py-2 rounded-lg",children:J}),i.jsx("div",{children:i.jsx("input",{type:"text",placeholder:"Calendar name",value:_,onChange:E=>H(E.target.value),className:"w-full text-lg font-medium bg-transparent border-0 border-b-2 border-gray-200 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ring-0 px-0 py-2 text-gray-900 dark:text-white placeholder-gray-400 outline-none transition-colors",autoFocus:!0,required:!0,maxLength:80})}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-2",children:"Color"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:li.map(E=>i.jsx("button",{type:"button",onClick:()=>R(E),className:`w-8 h-8 rounded-full transition-all ${Y===E?"ring-2 ring-offset-2 ring-offset-white dark:ring-offset-gray-800 scale-110":"hover:scale-110"}`,style:{backgroundColor:E,outlineColor:Y===E?E:void 0}},E))})]}),M&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",id:"count_for_availability",checked:B,onChange:E=>Z(E.target.checked),className:"rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),i.jsx("label",{htmlFor:"count_for_availability",className:"text-sm text-gray-700 dark:text-gray-300",children:"Include in availability / Count as busy"})]}),(r==null?void 0:r.availability_url)&&i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Availability URL"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",readOnly:!0,value:r.availability_url,className:"flex-1 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-sm text-gray-600 dark:text-gray-400 truncate"}),i.jsx("button",{type:"button",onClick:()=>z(r.availability_url),className:"px-3 py-2 text-sm text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors",children:Re?"Copied!":"Copy"})]}),i.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Share with Calendly, Cal.com, etc. to block busy times"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Default reminder (min)"}),i.jsx("input",{type:"number",min:0,max:10080,value:A,onChange:E=>k(E.target.value===""?"":parseInt(E.target.value,10)||0),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Sort order"}),i.jsx("input",{type:"number",value:D,onChange:E=>w(E.target.value===""?"":parseInt(E.target.value,10)||0),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]})]}),(r==null?void 0:r.role)==="owner"||(r==null?void 0:r.role)==="editor"?i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-2",children:"Subscribed URLs"}),Ne?i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading..."}):xe.length===0?i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"No subscriptions. Add a URL to import events from an external calendar."}):i.jsx("ul",{className:"space-y-2 mb-2",children:xe.map(E=>i.jsxs("li",{className:"flex items-center justify-between gap-2 p-2 rounded-lg bg-gray-50 dark:bg-gray-800 text-sm",children:[i.jsx("span",{className:"truncate text-gray-700 dark:text-gray-300",title:E.source_url,children:E.source_url}),i.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[i.jsx("button",{type:"button",onClick:()=>te(E.id),disabled:Qe===E.id,className:"px-2 py-1 text-xs text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded transition-colors disabled:opacity-50",children:Qe===E.id?"Syncing...":"Sync"}),i.jsx("button",{type:"button",onClick:()=>G(E.id),className:"px-2 py-1 text-xs text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded transition-colors",children:"Remove"})]})]},E.id))}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"url",placeholder:"https://... or webcal://...",value:W,onChange:E=>Ae(E.target.value),onKeyDown:E=>{E.key==="Enter"&&(E.preventDefault(),ie(E))},className:"flex-1 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none placeholder-gray-400"}),i.jsx("button",{type:"button",onClick:ie,disabled:He||!W.trim(),className:"px-3 py-2 text-sm text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors font-medium disabled:opacity-50",children:He?"Adding...":"Add"})]})]}):null]}),i.jsxs("div",{className:"flex items-center justify-between pt-2",children:[i.jsxs("div",{children:[M&&(r==null?void 0:r.role)==="owner"&&!ee&&i.jsx("button",{type:"button",onClick:()=>$(!0),className:"text-sm text-red-500 hover:text-red-700 dark:hover:text-red-400 transition-colors",children:"Delete calendar"}),M&&ee&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-red-500",children:"Delete?"}),i.jsx("button",{type:"button",onClick:se,className:"text-sm text-white bg-red-500 hover:bg-red-600 px-3 py-1 rounded-lg transition-colors",disabled:T,children:"Yes"}),i.jsx("button",{type:"button",onClick:()=>$(!1),className:"text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 transition-colors",children:"No"})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:j,className:"px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:"Cancel"}),i.jsx("button",{type:"submit",disabled:T||!_.trim(),className:"px-4 py-2 text-sm text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50 rounded-lg transition-colors font-medium",children:T?"Saving...":M?"Update":"Create"})]})]})]})})}function eh({open:f,onClose:j,onSaved:O,targetCalendarId:r,calendars:M}){var ee;const _=!r,[H,Y]=N.useState(""),[R,B]=N.useState(""),[Z,A]=N.useState("#3B82F6"),[k,D]=N.useState(r||((ee=M[0])==null?void 0:ee.id)||""),[w,T]=N.useState(!1),[U,J]=N.useState(""),P=async $=>{if($.preventDefault(),!!H.trim()){T(!0),J("");try{_?await Se.addCalendarFromUrl({url:H.trim(),name:R.trim()||void 0,color:Z||void 0}):await Se.importCalendarUrl({calendar_id:k,url:H.trim()}),O(),j(),Y(""),B("")}catch(xe){J(xe.error||"Failed to add calendar")}finally{T(!1)}}};return i.jsx(qa,{open:f,onClose:j,title:_?"Add calendar from URL":"Import from URL",children:i.jsxs("form",{onSubmit:P,className:"space-y-4",children:[U&&i.jsx("div",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 px-3 py-2 rounded-lg break-words",children:U}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Calendar URL"}),i.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1.5",children:'Google Calendar: Settings → your calendar → Integrate calendar → copy "Secret address in iCal format"'}),i.jsx("input",{type:"text",placeholder:"https://... or webcal://...",value:H,onChange:$=>Y($.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none placeholder-gray-400",required:!0})]}),_&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Calendar name"}),i.jsx("input",{type:"text",placeholder:"Imported Calendar",value:R,onChange:$=>B($.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none placeholder-gray-400"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Color"}),i.jsx("input",{type:"color",value:Z,onChange:$=>A($.target.value),className:"w-full h-10 rounded-lg border border-gray-200 dark:border-gray-600 cursor-pointer"})]})]}),!_&&M.length>1&&i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Import into"}),i.jsx("select",{value:k,onChange:$=>D($.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",children:M.map($=>i.jsx("option",{value:$.id,children:$.name},$.id))})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[i.jsx("button",{type:"button",onClick:j,className:"px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:"Cancel"}),i.jsx("button",{type:"submit",disabled:w||!H.trim(),className:"px-4 py-2 text-sm text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50 rounded-lg transition-colors font-medium",children:w?"Adding...":_?"Create calendar":"Import"})]})]})})}function th({selectedDate:f,onDateSelect:j}){const[O,r]=N.useState(f),M=Us(O),_=Hs(O),H=Ba(M),Y=Un(_),R=J0({start:H,end:Y});return i.jsxs("div",{className:"select-none",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("button",{onClick:()=>r(B=>I0(B)),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400 transition-colors",children:i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),i.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Oe(O,"MMMM yyyy")}),i.jsx("button",{onClick:()=>r(B=>P0(B,1)),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400 transition-colors",children:i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),i.jsxs("div",{className:"grid grid-cols-7 gap-0",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(B=>i.jsx("div",{className:"text-center text-[10px] font-medium text-gray-400 dark:text-gray-500 py-1",children:B},B)),R.map(B=>{const Z=W0(B,O),A=_l(B,f),k=ui(B);return i.jsx("button",{onClick:()=>j(B),className:`text-[11px] w-7 h-7 rounded-full flex items-center justify-center mx-auto transition-colors
                ${Z?"text-gray-700 dark:text-gray-300":"text-gray-300 dark:text-gray-600"}
                ${A?"bg-blue-600 text-white! font-semibold":""}
                ${k&&!A?"bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-400 font-semibold":""}
                ${A?"":"hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:Oe(B,"d")},B.toISOString())})]})]})}function lh(){var ul,qt,Ct;const{user:f,logout:j}=Ya(),{theme:O,toggle:r}=ii(),[M,_]=N.useState(new Date),[H,Y]=N.useState("month"),[R,B]=N.useState([]),[Z,A]=N.useState([]),[k,D]=N.useState(new Set),[w,T]=N.useState(!0),[U,J]=N.useState(!1),[P,ee]=N.useState(!1),[$,xe]=N.useState(!1),[ge,Ne]=N.useState(null),[Te,W]=N.useState(null),[Ae,He]=N.useState(),[ke,Qe]=N.useState(!1),[Ve,Re]=N.useState(!0),b=N.useCallback(async()=>{try{const ze=(await Se.listCalendars()).items||[];B(ze),D(Pe=>{if(Pe.size===0)return new Set(ze.map(lt=>lt.id));const Yt=new Set(Pe);for(const lt of ze)Pe.has(lt.id)||Yt.add(lt.id);return Yt})}catch{}},[]),C=N.useCallback(async()=>{const V=H==="month"?Ba(Us(M)):H==="week"?Ba(M):M,ze=H==="month"?Un(Hs(M)):H==="week"?Un(M):M,Pe=new Date(V);Pe.setDate(Pe.getDate()-1);const Yt=new Date(ze);Yt.setDate(Yt.getDate()+1);try{const lt=await Se.listEvents({start:Pe.toISOString(),end:Yt.toISOString()});A(lt.items||[])}catch{}Re(!1)},[M,H]);N.useEffect(()=>{b()},[b]),N.useEffect(()=>{R.length>0&&C()},[C,R]);const Q=V=>{_(H==="month"?ze=>V===1?P0(ze,1):I0(ze):H==="week"?ze=>V===1?Cg(ze,1):_g(ze):ze=>V===1?$0(ze,1):Dg(ze))},se=()=>_(new Date),ie=V=>{D(ze=>{const Pe=new Set(ze);return Pe.has(V)?Pe.delete(V):Pe.add(V),Pe})},G=V=>{H==="month"?(_(V),Y("day")):(He(V),Ne(null),J(!0))},te=V=>{He(V),Ne(null),J(!0)},z=V=>{Ne(V),J(!0)},E=()=>{C()},me=()=>{b().then(C)},Ke=H==="month"?Oe(M,"MMMM yyyy"):H==="week"?`${Oe(Ba(M),"MMM d")} - ${Oe(Un(M),"MMM d, yyyy")}`:Oe(M,"EEEE, MMMM d, yyyy");return i.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-gray-900 transition-colors",children:[i.jsxs("header",{className:"flex items-center justify-between px-4 py-2.5 border-b border-gray-200 dark:border-gray-700 flex-shrink-0 bg-white dark:bg-gray-900",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("button",{onClick:()=>T(V=>!V),className:"p-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors lg:hidden",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),i.jsx("button",{onClick:()=>T(V=>!V),className:"p-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors hidden lg:block",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:i.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),i.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white hidden sm:block",children:"Calendar"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:se,className:"px-3 py-1.5 text-sm font-medium border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:"Today"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("button",{onClick:()=>Q(-1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors",children:i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),i.jsx("button",{onClick:()=>Q(1),className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors",children:i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),i.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-white min-w-[180px] text-center hidden sm:block",children:Ke})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"hidden sm:flex items-center bg-gray-100 dark:bg-gray-800 rounded-lg p-0.5",children:["month","week","day"].map(V=>i.jsx("button",{onClick:()=>Y(V),className:`px-3 py-1 text-xs font-medium rounded-md transition-colors capitalize ${H===V?"bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"}`,children:V},V))}),i.jsx("button",{onClick:r,className:"p-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-400 transition-colors",children:O==="dark"?i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})}),i.jsxs("div",{className:"relative",children:[i.jsx("button",{onClick:()=>Qe(V=>!V),className:"w-8 h-8 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white text-sm font-semibold",children:((qt=(ul=f==null?void 0:f.email)==null?void 0:ul[0])==null?void 0:qt.toUpperCase())||"U"}),ke&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>Qe(!1)}),i.jsxs("div",{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 rounded-xl shadow-lg border border-gray-200 dark:border-gray-700 py-1 z-50 animate-scale-in",children:[i.jsxs("div",{className:"px-4 py-2.5 border-b border-gray-100 dark:border-gray-700",children:[i.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:f==null?void 0:f.email}),i.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:f==null?void 0:f.timezone})]}),i.jsx("button",{onClick:()=>{Qe(!1),j()},className:"w-full text-left px-4 py-2 text-sm text-red-600 dark:text-red-400 hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors",children:"Sign out"})]})]})]})]})]}),i.jsxs("div",{className:"sm:hidden text-center py-2 border-b border-gray-100 dark:border-gray-800 flex-shrink-0",children:[i.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:Ke}),i.jsx("div",{className:"flex items-center justify-center gap-1 mt-1",children:["month","week","day"].map(V=>i.jsx("button",{onClick:()=>Y(V),className:`px-2.5 py-0.5 text-xs font-medium rounded-md transition-colors capitalize ${H===V?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400":"text-gray-500 dark:text-gray-400"}`,children:V},V))})]}),i.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[w&&i.jsxs("aside",{className:"w-64 border-r border-gray-200 dark:border-gray-700 flex-shrink-0 overflow-y-auto bg-white dark:bg-gray-900 flex flex-col",children:[i.jsx("div",{className:"p-4",children:i.jsxs("button",{onClick:()=>{Ne(null),He(new Date),J(!0)},className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-xl font-medium text-sm shadow-lg shadow-blue-600/20 transition-all hover:shadow-blue-600/30",children:[i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"New Event"]})}),i.jsx("div",{className:"px-4 pb-4",children:i.jsx(th,{selectedDate:M,onDateSelect:V=>_(V)})}),i.jsxs("div",{className:"px-4 pb-4 flex-1",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"My Calendars"}),i.jsxs("div",{className:"flex gap-0.5",children:[i.jsx("button",{onClick:()=>xe(!0),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",title:"Add from URL",children:i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}),i.jsx("button",{onClick:()=>{W(null),ee(!0)},className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",title:"New calendar",children:i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]}),i.jsx("div",{className:"space-y-0.5",children:R.map(V=>i.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-1 rounded-lg group hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[i.jsx("button",{onClick:()=>ie(V.id),className:"flex-shrink-0",children:i.jsx("div",{className:"w-4 h-4 rounded border-2 transition-colors flex items-center justify-center",style:{borderColor:V.color,backgroundColor:k.has(V.id)?V.color:"transparent"},children:k.has(V.id)&&i.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})}),i.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 flex-1 truncate",children:V.name}),V.role==="owner"&&i.jsx("button",{onClick:()=>{W(V),ee(!0)},className:"p-0.5 rounded opacity-0 group-hover:opacity-100 hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-400 transition-all",children:i.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})})]},V.id))})]})]}),i.jsx("main",{className:"flex-1 overflow-hidden",children:Ve?i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("div",{className:"w-8 h-8 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"})}):H==="month"?i.jsx(Jg,{currentDate:M,events:Z,calendars:R,visibleCalendarIds:k,onDateClick:G,onEventClick:z}):H==="week"?i.jsx(Wg,{currentDate:M,events:Z,calendars:R,visibleCalendarIds:k,onTimeClick:te,onEventClick:z}):i.jsx($g,{currentDate:M,events:Z,calendars:R,visibleCalendarIds:k,onTimeClick:te,onEventClick:z})})]}),i.jsx(Fg,{open:U,onClose:()=>J(!1),onSaved:E,event:ge,calendars:R,defaultDate:Ae,defaultCalendarId:(Ct=R.find(V=>V.role==="owner"))==null?void 0:Ct.id}),i.jsx(Pg,{open:P,onClose:()=>ee(!1),onSaved:me,calendar:Te}),i.jsx(eh,{open:$,onClose:()=>xe(!1),onSaved:me,targetCalendarId:null,calendars:R})]})}function ah(){const[f,j]=N.useState([]),[O,r]=N.useState(""),[M,_]=N.useState(!0),[H,Y]=N.useState(!1),[R,B]=N.useState(null),Z=N.useCallback(async()=>{try{const D=await Se.listContacts(O||void 0);j(D.items||[])}finally{_(!1)}},[O]);N.useEffect(()=>{Z()},[Z]);const A=()=>{B(null),Y(!0)},k=D=>{B(D),Y(!0)};return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[i.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Contacts"}),i.jsxs("button",{onClick:A,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-xl transition-colors",children:[i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add contact"]})]}),i.jsx("div",{className:"px-6 py-3 border-b border-gray-100 dark:border-gray-700/50 flex-shrink-0",children:i.jsxs("div",{className:"relative",children:[i.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),i.jsx("input",{type:"text",placeholder:"Search contacts...",value:O,onChange:D=>r(D.target.value),className:"w-full pl-10 pr-4 py-2 rounded-xl border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:M?i.jsx("div",{className:"flex items-center justify-center h-40",children:i.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"})}):f.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center h-40 text-gray-400 dark:text-gray-500",children:[i.jsx("svg",{className:"w-12 h-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})}),i.jsx("span",{className:"text-sm",children:"No contacts yet"})]}):i.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700/50",children:f.map(D=>{var w,T;return i.jsxs("button",{onClick:()=>k(D),className:"w-full flex items-center gap-4 px-6 py-3.5 hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors text-left",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-semibold text-sm flex-shrink-0",children:(((w=D.first_name)==null?void 0:w[0])||((T=D.email)==null?void 0:T[0])||"?").toUpperCase()}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:[D.first_name,D.last_name].filter(Boolean).join(" ")||D.email||"Unnamed"}),i.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:[D.email,D.company].filter(Boolean).join(" - ")})]}),D.phone&&i.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500 flex-shrink-0",children:D.phone})]},D.id)})})}),i.jsx(nh,{open:H,onClose:()=>Y(!1),onSaved:Z,contact:R})]})}function nh({open:f,onClose:j,onSaved:O,contact:r}){const M=!!r,[_,H]=N.useState(""),[Y,R]=N.useState(""),[B,Z]=N.useState(""),[A,k]=N.useState(""),[D,w]=N.useState(""),[T,U]=N.useState(""),[J,P]=N.useState(!1),[ee,$]=N.useState(""),[xe,ge]=N.useState(!1);N.useEffect(()=>{f&&($(""),ge(!1),r?(H(r.first_name||""),R(r.last_name||""),Z(r.email||""),k(r.phone||""),w(r.company||""),U(r.notes||"")):(H(""),R(""),Z(""),k(""),w(""),U("")))},[f,r]);const Ne=async W=>{W.preventDefault(),P(!0),$("");try{const Ae={first_name:_.trim()||void 0,last_name:Y.trim()||void 0,email:B.trim()||void 0,phone:A.trim()||void 0,company:D.trim()||void 0,notes:T.trim()||void 0};M?await Se.updateContact(r.id,Ae):await Se.createContact(Ae),O(),j()}catch(Ae){$(Ae.error||"Failed to save contact")}finally{P(!1)}},Te=async()=>{if(r){P(!0);try{await Se.deleteContact(r.id),O(),j()}catch(W){$(W.error||"Failed to delete")}finally{P(!1)}}};return i.jsx(qa,{open:f,onClose:j,title:M?"Edit Contact":"New Contact",children:i.jsxs("form",{onSubmit:Ne,className:"space-y-4",children:[ee&&i.jsx("div",{className:"text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 px-3 py-2 rounded-lg",children:ee}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"First name"}),i.jsx("input",{type:"text",value:_,onChange:W=>H(W.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",autoFocus:!0})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Last name"}),i.jsx("input",{type:"text",value:Y,onChange:W=>R(W.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Email"}),i.jsx("input",{type:"email",value:B,onChange:W=>Z(W.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Phone"}),i.jsx("input",{type:"tel",value:A,onChange:W=>k(W.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Company"}),i.jsx("input",{type:"text",value:D,onChange:W=>w(W.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Notes"}),i.jsx("textarea",{value:T,onChange:W=>U(W.target.value),rows:2,className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none resize-none"})]}),i.jsxs("div",{className:"flex items-center justify-between pt-2",children:[i.jsxs("div",{children:[M&&!xe&&i.jsx("button",{type:"button",onClick:()=>ge(!0),className:"text-sm text-red-500 hover:text-red-700 dark:hover:text-red-400 transition-colors",children:"Delete"}),M&&xe&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-red-500",children:"Delete?"}),i.jsx("button",{type:"button",onClick:Te,className:"text-sm text-white bg-red-500 hover:bg-red-600 px-3 py-1 rounded-lg transition-colors",disabled:J,children:"Yes"}),i.jsx("button",{type:"button",onClick:()=>ge(!1),className:"text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 transition-colors",children:"No"})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:j,className:"px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:"Cancel"}),i.jsx("button",{type:"submit",disabled:J,className:"px-4 py-2 text-sm text-white bg-blue-600 hover:bg-blue-700 disabled:opacity-50 rounded-lg transition-colors font-medium",children:J?"Saving...":M?"Update":"Create"})]})]})]})})}const uh=[{key:"calendars",label:"Calendars",permissions:["read","write"]},{key:"events",label:"Events",permissions:["read","write"]},{key:"contacts",label:"Contacts",permissions:["read","write"]},{key:"availability",label:"Availability",permissions:["read"]},{key:"booking",label:"Booking",permissions:["write"]}];function ih(){const{user:f,loading:j,refreshUser:O,logout:r}=Ya(),{theme:M,toggle:_}=ii(),H=Ds(),[Y,R]=N.useState("general"),[B,Z]=N.useState(!1),[A,k]=N.useState(""),[D,w]=N.useState({}),[T,U]=N.useState([]),[J,P]=N.useState(!1),[ee,$]=N.useState(!1),[xe,ge]=N.useState(""),[Ne,Te]=N.useState({calendars:["read","write"],events:["read","write"],contacts:["read","write"],availability:["read"],booking:["write"]}),[W,Ae]=N.useState(null),[He,ke]=N.useState(null),[Qe,Ve]=N.useState(""),[Re,b]=N.useState(!1);N.useEffect(()=>{f&&w({timezone:f.timezone,week_start_day:f.week_start_day,date_format:f.date_format,time_format:f.time_format,default_event_duration_minutes:f.default_event_duration_minutes,default_reminder_minutes:f.default_reminder_minutes,show_weekends:f.show_weekends,working_hours_start:f.working_hours_start,working_hours_end:f.working_hours_end,notifications_email:f.notifications_email})},[f]),N.useEffect(()=>{Y==="api-keys"&&(P(!0),Se.listApiKeys().then(z=>U(z.items)).catch(()=>k("Failed to load API keys")).finally(()=>P(!1)))},[Y]);const C=async()=>{Z(!0),k("");try{const z=await Se.updateMe(D);await O(),k("Settings saved"),setTimeout(()=>k(""),2e3)}catch(z){k(z.error||"Failed to save")}finally{Z(!1)}},Q=async()=>{if(!xe.trim()){k("Name is required");return}Z(!0),k("");try{const z=await Se.createApiKey({name:xe.trim(),scopes:Ne});Ae(z),U(E=>[z,...E]),$(!1),ge("")}catch(z){k(z.error||"Failed to create API key")}finally{Z(!1)}},se=async z=>{ke(z);try{await Se.revokeApiKey(z),U(E=>E.map(me=>me.id===z?{...me,revoked_at:new Date().toISOString()}:me))}catch(E){k(E.error||"Failed to revoke")}finally{ke(null)}},ie=async()=>{if(Qe==="delete"){b(!0),k("");try{await Se.deleteMe(),await r(),H("/login")}catch(z){k(z.error||"Failed to delete account")}finally{b(!1)}}},G=()=>{W!=null&&W.token&&(navigator.clipboard.writeText(W.token),k("Token copied to clipboard"),setTimeout(()=>k(""),2e3))};if(j||!f)return null;const te=[{id:"general",label:"General"},{id:"calendars",label:"Calendars"},{id:"notifications",label:"Notifications"},{id:"api-keys",label:"API Keys"},{id:"account",label:"Account"}];return i.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[i.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Settings"}),i.jsx("button",{onClick:_,className:"p-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 transition-colors",children:M==="dark"?i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}):i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})})]}),i.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i.jsx("nav",{className:"w-48 border-r border-gray-200 dark:border-gray-700 p-4 flex-shrink-0",children:te.map(z=>i.jsx("button",{onClick:()=>R(z.id),className:`block w-full text-left px-3 py-2 rounded-lg text-sm font-medium transition-colors ${Y===z.id?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:z.label},z.id))}),i.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[A&&i.jsx("div",{className:`mb-4 px-4 py-2 rounded-lg text-sm ${A==="Settings saved"||A==="Token copied to clipboard"?"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400"}`,children:A}),Y==="general"&&i.jsxs("div",{className:"space-y-6 max-w-xl",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"General"}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Timezone"}),i.jsx("input",{type:"text",value:D.timezone||"",onChange:z=>w(E=>({...E,timezone:z.target.value})),placeholder:"America/New_York",className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Week starts on"}),i.jsxs("select",{value:D.week_start_day??0,onChange:z=>w(E=>({...E,week_start_day:parseInt(z.target.value,10)})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",children:[i.jsx("option",{value:0,children:"Sunday"}),i.jsx("option",{value:1,children:"Monday"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Date format"}),i.jsxs("select",{value:D.date_format||"MM/dd/yyyy",onChange:z=>w(E=>({...E,date_format:z.target.value})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",children:[i.jsx("option",{value:"MM/dd/yyyy",children:"MM/DD/YYYY"}),i.jsx("option",{value:"dd/MM/yyyy",children:"DD/MM/YYYY"}),i.jsx("option",{value:"yyyy-MM-dd",children:"YYYY-MM-DD"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Time format"}),i.jsxs("select",{value:D.time_format||"12h",onChange:z=>w(E=>({...E,time_format:z.target.value})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none",children:[i.jsx("option",{value:"12h",children:"12-hour"}),i.jsx("option",{value:"24h",children:"24-hour"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Default event duration (minutes)"}),i.jsx("input",{type:"number",min:15,max:480,value:D.default_event_duration_minutes??60,onChange:z=>w(E=>({...E,default_event_duration_minutes:parseInt(z.target.value,10)||60})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Default reminder (minutes before)"}),i.jsx("input",{type:"number",min:0,max:10080,value:D.default_reminder_minutes??10,onChange:z=>w(E=>({...E,default_reminder_minutes:parseInt(z.target.value,10)||10})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",id:"show_weekends",checked:D.show_weekends??!0,onChange:z=>w(E=>({...E,show_weekends:z.target.checked})),className:"rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),i.jsx("label",{htmlFor:"show_weekends",className:"text-sm text-gray-700 dark:text-gray-300",children:"Show weekends"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Working hours start"}),i.jsx("input",{type:"time",value:D.working_hours_start||"09:00",onChange:z=>w(E=>({...E,working_hours_start:z.target.value})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Working hours end"}),i.jsx("input",{type:"time",value:D.working_hours_end||"17:00",onChange:z=>w(E=>({...E,working_hours_end:z.target.value})),className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]})]})]}),Y==="calendars"&&i.jsxs("div",{className:"space-y-4",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Calendars"}),i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Manage your calendars from the main calendar view. Use the sidebar to add new calendars or add from URL."})]}),Y==="notifications"&&i.jsxs("div",{className:"space-y-6 max-w-xl",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Notifications"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",id:"notifications_email",checked:D.notifications_email??!0,onChange:z=>w(E=>({...E,notifications_email:z.target.checked})),className:"rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),i.jsx("label",{htmlFor:"notifications_email",className:"text-sm text-gray-700 dark:text-gray-300",children:"Email reminders for events"})]})]}),Y==="api-keys"&&i.jsxs("div",{className:"space-y-6 max-w-2xl",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"API Keys"}),i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"API keys allow programmatic access to your calendar. Use them for integrations, scripts, or AI agents. Keep keys secure and never share them."}),i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[T.length," key",T.length!==1?"s":""]}),i.jsx("button",{onClick:()=>{$(!0),Ae(null),k("")},className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-lg transition-colors",children:"Create API key"})]}),J?i.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[i.jsx("span",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}),"Loading..."]}):i.jsx("div",{className:"space-y-6 max-w-2xl",children:T.length===0?i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 py-4",children:"No API keys yet. Create one to get started."}):i.jsx("ul",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:T.map(z=>i.jsxs("li",{className:"py-4 flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-medium text-gray-900 dark:text-white truncate",children:z.name}),i.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:["Created ",new Date(z.created_at).toLocaleDateString(),z.revoked_at&&i.jsx("span",{className:"ml-2 text-amber-600 dark:text-amber-400",children:"• Revoked"})]})]}),!z.revoked_at&&i.jsx("button",{onClick:()=>se(z.id),disabled:He===z.id,className:"px-3 py-1.5 text-sm text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors disabled:opacity-50",children:He===z.id?"Revoking...":"Revoke"})]},z.id))})})]}),Y==="account"&&i.jsxs("div",{className:"space-y-6 max-w-xl",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Account"}),i.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-600 p-4 dark:bg-gray-800/50",children:[i.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:["Signed in as ",i.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:f.email})]}),i.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Account created ",new Date(f.created_at).toLocaleDateString()]})]}),i.jsxs("div",{className:"pt-6 border-t border-gray-200 dark:border-gray-700",children:[i.jsx("h3",{className:"text-sm font-medium text-red-600 dark:text-red-400 mb-2",children:"Danger zone"}),i.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:"Deleting your account will permanently remove all your calendars, events, contacts, and revoke all API keys. This action cannot be undone."}),i.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[i.jsxs("div",{className:"flex-1 min-w-[200px]",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:["Type ",i.jsx("span",{className:"font-mono text-red-600 dark:text-red-400",children:"delete"})," to confirm"]}),i.jsx("input",{type:"text",value:Qe,onChange:z=>Ve(z.target.value),placeholder:"delete",className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-red-500 outline-none placeholder:text-gray-400"})]}),i.jsx("button",{onClick:ie,disabled:Qe!=="delete"||Re,className:"px-4 py-2 bg-red-600 hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium rounded-lg transition-colors",children:Re?"Deleting...":"Delete account"})]})]})]}),(Y==="general"||Y==="notifications")&&i.jsx("div",{className:"mt-8",children:i.jsx("button",{onClick:C,disabled:B,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white text-sm font-medium rounded-lg transition-colors",children:B?"Saving...":"Save changes"})})]})]}),i.jsx(qa,{open:ee,onClose:()=>{$(!1),ge("")},title:"Create API key",wide:!0,children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Name"}),i.jsx("input",{type:"text",value:xe,onChange:z=>ge(z.target.value),placeholder:"e.g. My integration",className:"w-full px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-sm text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Scopes"}),i.jsx("div",{className:"space-y-3",children:uh.map(({key:z,label:E,permissions:me})=>i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("span",{className:"w-28 text-sm text-gray-600 dark:text-gray-400",children:E}),i.jsx("div",{className:"flex gap-4",children:me.map(Ke=>{const qt=(Ne[z]||[]).includes(Ke);return i.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:qt,onChange:Ct=>{const V=Ct.target.checked?[...Ne[z]||[],Ke]:(Ne[z]||[]).filter(ze=>ze!==Ke);Te(ze=>({...ze,[z]:V}))},className:"rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),i.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 capitalize",children:Ke})]},Ke)})})]},z))})]}),i.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[i.jsx("button",{onClick:()=>$(!1),className:"px-4 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:"Cancel"}),i.jsx("button",{onClick:Q,disabled:B||!xe.trim(),className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white text-sm font-medium rounded-lg transition-colors",children:B?"Creating...":"Create"})]})]})}),i.jsx(qa,{open:!!(W!=null&&W.token),onClose:()=>Ae(null),title:"API key created",children:i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:"Copy this token now. It will not be shown again."}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",readOnly:!0,value:(W==null?void 0:W.token)||"",className:"flex-1 px-3 py-2 rounded-lg border border-gray-200 dark:border-gray-600 bg-gray-100 dark:bg-gray-700 text-sm font-mono text-gray-900 dark:text-white"}),i.jsx("button",{onClick:G,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-lg transition-colors",children:"Copy"})]}),i.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Use in requests: ",i.jsx("code",{className:"bg-gray-100 dark:bg-gray-700 px-1 rounded",children:"X-API-Key: <token>"})]}),i.jsx("div",{className:"flex justify-end",children:i.jsx("button",{onClick:()=>Ae(null),className:"px-4 py-2 bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 text-gray-900 dark:text-white text-sm font-medium rounded-lg transition-colors",children:"Done"})})]})})]})}function ch(){const{user:f,loading:j}=Ya();return j?i.jsx("div",{className:"h-screen flex items-center justify-center bg-white dark:bg-gray-900",children:i.jsx("div",{className:"w-8 h-8 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"})}):f?i.jsx(ws,{}):i.jsx(Os,{to:"/login",replace:!0})}function sh(){const{user:f,loading:j}=Ya();return j?i.jsx("div",{className:"h-screen flex items-center justify-center bg-white dark:bg-gray-900",children:i.jsx("div",{className:"w-8 h-8 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"})}):f?i.jsx(Os,{to:"/",replace:!0}):i.jsx(ws,{})}function rh(){return i.jsxs("div",{className:"h-screen flex bg-white dark:bg-gray-900 transition-colors",children:[i.jsxs("nav",{className:"w-14 flex-shrink-0 flex flex-col items-center py-4 gap-1 border-r border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900",children:[i.jsx(ks,{to:"/",end:!0,className:({isActive:f})=>`p-2.5 rounded-xl transition-colors ${f?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300"}`,title:"Calendar",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),i.jsx(ks,{to:"/contacts",className:({isActive:f})=>`p-2.5 rounded-xl transition-colors ${f?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300"}`,title:"Contacts",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})})}),i.jsx(ks,{to:"/settings",className:({isActive:f})=>`p-2.5 rounded-xl transition-colors ${f?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300"}`,title:"Settings",children:i.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]}),i.jsx("div",{className:"flex-1 overflow-hidden",children:i.jsx(ws,{})})]})}function fh(){return i.jsxs(Tg,{children:[i.jsxs(nl,{element:i.jsx(sh,{}),children:[i.jsx(nl,{path:"/login",element:i.jsx(Vg,{})}),i.jsx(nl,{path:"/register",element:i.jsx(Kg,{})})]}),i.jsx(nl,{element:i.jsx(ch,{}),children:i.jsxs(nl,{element:i.jsx(rh,{}),children:[i.jsx(nl,{path:"/",element:i.jsx(lh,{})}),i.jsx(nl,{path:"/contacts",element:i.jsx(ah,{})}),i.jsx(nl,{path:"/settings",element:i.jsx(ih,{})})]})}),i.jsx(nl,{path:"*",element:i.jsx(Os,{to:"/",replace:!0})})]})}Yg.createRoot(document.getElementById("root")).render(i.jsx(N.StrictMode,{children:i.jsx(Zg,{children:i.jsx(Ag,{children:i.jsx(Xg,{children:i.jsx(Gg,{children:i.jsx(fh,{})})})})})}));
