(function(){const h=document.createElement("link").relList;if(h&&h.supports&&h.supports("modulepreload"))return;for(const z of document.querySelectorAll('link[rel="modulepreload"]'))d(z);new MutationObserver(z=>{for(const M of z)if(M.type==="childList")for(const V of M.addedNodes)V.tagName==="LINK"&&V.rel==="modulepreload"&&d(V)}).observe(document,{childList:!0,subtree:!0});function S(z){const M={};return z.integrity&&(M.integrity=z.integrity),z.referrerPolicy&&(M.referrerPolicy=z.referrerPolicy),z.crossOrigin==="use-credentials"?M.credentials="include":z.crossOrigin==="anonymous"?M.credentials="omit":M.credentials="same-origin",M}function d(z){if(z.ep)return;z.ep=!0;const M=S(z);fetch(z.href,M)}})();function Dh(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var ro={exports:{}},wn={};/**
 * @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 vx;function Hh(){if(vx)return wn;vx=1;var c=Symbol.for("react.transitional.element"),h=Symbol.for("react.fragment");function S(d,z,M){var V=null;if(M!==void 0&&(V=""+M),z.key!==void 0&&(V=""+z.key),"key"in z){M={};for(var q in z)q!=="key"&&(M[q]=z[q])}else M=z;return z=M.ref,{$$typeof:c,type:d,key:V,ref:z!==void 0?z:null,props:M}}return wn.Fragment=h,wn.jsx=S,wn.jsxs=S,wn}var jx;function Uh(){return jx||(jx=1,ro.exports=Hh()),ro.exports}var a=Uh(),io={exports:{}},Te={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Nx;function Rh(){if(Nx)return Te;Nx=1;var c=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),V=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),W=Symbol.iterator;function I(u){return u===null||typeof u!="object"?null:(u=W&&u[W]||u["@@iterator"],typeof u=="function"?u:null)}var K={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,P={};function be(u,p,Y){this.props=u,this.context=p,this.refs=P,this.updater=Y||K}be.prototype.isReactComponent={},be.prototype.setState=function(u,p){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,p,"setState")},be.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function ae(){}ae.prototype=be.prototype;function L(u,p,Y){this.props=u,this.context=p,this.refs=P,this.updater=Y||K}var J=L.prototype=new ae;J.constructor=L,X(J,be.prototype),J.isPureReactComponent=!0;var ce=Array.isArray;function fe(){}var le={H:null,A:null,T:null,S:null},ye=Object.prototype.hasOwnProperty;function ke(u,p,Y){var ee=Y.ref;return{$$typeof:c,type:u,key:p,ref:ee!==void 0?ee:null,props:Y}}function ie(u,p){return ke(u.type,p,u.props)}function re(u){return typeof u=="object"&&u!==null&&u.$$typeof===c}function $(u){var p={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function(Y){return p[Y]})}var de=/\/+/g;function ue(u,p){return typeof u=="object"&&u!==null&&u.key!=null?$(""+u.key):p.toString(36)}function oe(u){switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:switch(typeof u.status=="string"?u.then(fe,fe):(u.status="pending",u.then(function(p){u.status==="pending"&&(u.status="fulfilled",u.value=p)},function(p){u.status==="pending"&&(u.status="rejected",u.reason=p)})),u.status){case"fulfilled":return u.value;case"rejected":throw u.reason}}throw u}function A(u,p,Y,ee,xe){var ge=typeof u;(ge==="undefined"||ge==="boolean")&&(u=null);var Ne=!1;if(u===null)Ne=!0;else switch(ge){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(u.$$typeof){case c:case h:Ne=!0;break;case R:return Ne=u._init,A(Ne(u._payload),p,Y,ee,xe)}}if(Ne)return xe=xe(u),Ne=ee===""?"."+ue(u,0):ee,ce(xe)?(Y="",Ne!=null&&(Y=Ne.replace(de,"$&/")+"/"),A(xe,p,Y,"",function(te){return te})):xe!=null&&(re(xe)&&(xe=ie(xe,Y+(xe.key==null||u&&u.key===xe.key?"":(""+xe.key).replace(de,"$&/")+"/")+Ne)),p.push(xe)),1;Ne=0;var Se=ee===""?".":ee+":";if(ce(u))for(var He=0;He<u.length;He++)ee=u[He],ge=Se+ue(ee,He),Ne+=A(ee,p,Y,ge,xe);else if(He=I(u),typeof He=="function")for(u=He.call(u),He=0;!(ee=u.next()).done;)ee=ee.value,ge=Se+ue(ee,He++),Ne+=A(ee,p,Y,ge,xe);else if(ge==="object"){if(typeof u.then=="function")return A(oe(u),p,Y,ee,xe);throw p=String(u),Error("Objects are not valid as a React child (found: "+(p==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":p)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function b(u,p,Y){if(u==null)return u;var ee=[],xe=0;return A(u,ee,"","",function(ge){return p.call(Y,ge,xe++)}),ee}function U(u){if(u._status===-1){var p=u._result;p=p(),p.then(function(Y){(u._status===0||u._status===-1)&&(u._status=1,u._result=Y)},function(Y){(u._status===0||u._status===-1)&&(u._status=2,u._result=Y)}),u._status===-1&&(u._status=0,u._result=p)}if(u._status===1)return u._result.default;throw u._result}var G=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var p=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(p))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},se={map:b,forEach:function(u,p,Y){b(u,function(){p.apply(this,arguments)},Y)},count:function(u){var p=0;return b(u,function(){p++}),p},toArray:function(u){return b(u,function(p){return p})||[]},only:function(u){if(!re(u))throw Error("React.Children.only expected to receive a single React element child.");return u}};return Te.Activity=Q,Te.Children=se,Te.Component=be,Te.Fragment=S,Te.Profiler=z,Te.PureComponent=L,Te.StrictMode=d,Te.Suspense=k,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le,Te.__COMPILER_RUNTIME={__proto__:null,c:function(u){return le.H.useMemoCache(u)}},Te.cache=function(u){return function(){return u.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(u,p,Y){if(u==null)throw Error("The argument must be a React element, but you passed "+u+".");var ee=X({},u.props),xe=u.key;if(p!=null)for(ge in p.key!==void 0&&(xe=""+p.key),p)!ye.call(p,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&p.ref===void 0||(ee[ge]=p[ge]);var ge=arguments.length-2;if(ge===1)ee.children=Y;else if(1<ge){for(var Ne=Array(ge),Se=0;Se<ge;Se++)Ne[Se]=arguments[Se+2];ee.children=Ne}return ke(u.type,xe,ee)},Te.createContext=function(u){return u={$$typeof:V,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null},u.Provider=u,u.Consumer={$$typeof:M,_context:u},u},Te.createElement=function(u,p,Y){var ee,xe={},ge=null;if(p!=null)for(ee in p.key!==void 0&&(ge=""+p.key),p)ye.call(p,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(xe[ee]=p[ee]);var Ne=arguments.length-2;if(Ne===1)xe.children=Y;else if(1<Ne){for(var Se=Array(Ne),He=0;He<Ne;He++)Se[He]=arguments[He+2];xe.children=Se}if(u&&u.defaultProps)for(ee in Ne=u.defaultProps,Ne)xe[ee]===void 0&&(xe[ee]=Ne[ee]);return ke(u,ge,xe)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(u){return{$$typeof:q,render:u}},Te.isValidElement=re,Te.lazy=function(u){return{$$typeof:R,_payload:{_status:-1,_result:u},_init:U}},Te.memo=function(u,p){return{$$typeof:g,type:u,compare:p===void 0?null:p}},Te.startTransition=function(u){var p=le.T,Y={};le.T=Y;try{var ee=u(),xe=le.S;xe!==null&&xe(Y,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(fe,G)}catch(ge){G(ge)}finally{p!==null&&Y.types!==null&&(p.types=Y.types),le.T=p}},Te.unstable_useCacheRefresh=function(){return le.H.useCacheRefresh()},Te.use=function(u){return le.H.use(u)},Te.useActionState=function(u,p,Y){return le.H.useActionState(u,p,Y)},Te.useCallback=function(u,p){return le.H.useCallback(u,p)},Te.useContext=function(u){return le.H.useContext(u)},Te.useDebugValue=function(){},Te.useDeferredValue=function(u,p){return le.H.useDeferredValue(u,p)},Te.useEffect=function(u,p){return le.H.useEffect(u,p)},Te.useEffectEvent=function(u){return le.H.useEffectEvent(u)},Te.useId=function(){return le.H.useId()},Te.useImperativeHandle=function(u,p,Y){return le.H.useImperativeHandle(u,p,Y)},Te.useInsertionEffect=function(u,p){return le.H.useInsertionEffect(u,p)},Te.useLayoutEffect=function(u,p){return le.H.useLayoutEffect(u,p)},Te.useMemo=function(u,p){return le.H.useMemo(u,p)},Te.useOptimistic=function(u,p){return le.H.useOptimistic(u,p)},Te.useReducer=function(u,p,Y){return le.H.useReducer(u,p,Y)},Te.useRef=function(u){return le.H.useRef(u)},Te.useState=function(u){return le.H.useState(u)},Te.useSyncExternalStore=function(u,p,Y){return le.H.useSyncExternalStore(u,p,Y)},Te.useTransition=function(){return le.H.useTransition()},Te.version="19.2.8",Te}var wx;function wo(){return wx||(wx=1,io.exports=Rh()),io.exports}var m=wo();const bl=Dh(m);var co={exports:{}},kn={},oo={exports:{}},uo={};/**
 * @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 kx;function Bh(){return kx||(kx=1,(function(c){function h(A,b){var U=A.length;A.push(b);e:for(;0<U;){var G=U-1>>>1,se=A[G];if(0<z(se,b))A[G]=b,A[U]=se,U=G;else break e}}function S(A){return A.length===0?null:A[0]}function d(A){if(A.length===0)return null;var b=A[0],U=A.pop();if(U!==b){A[0]=U;e:for(var G=0,se=A.length,u=se>>>1;G<u;){var p=2*(G+1)-1,Y=A[p],ee=p+1,xe=A[ee];if(0>z(Y,U))ee<se&&0>z(xe,Y)?(A[G]=xe,A[ee]=U,G=ee):(A[G]=Y,A[p]=U,G=p);else if(ee<se&&0>z(xe,U))A[G]=xe,A[ee]=U,G=ee;else break e}}return b}function z(A,b){var U=A.sortIndex-b.sortIndex;return U!==0?U:A.id-b.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var M=performance;c.unstable_now=function(){return M.now()}}else{var V=Date,q=V.now();c.unstable_now=function(){return V.now()-q}}var k=[],g=[],R=1,Q=null,W=3,I=!1,K=!1,X=!1,P=!1,be=typeof setTimeout=="function"?setTimeout:null,ae=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function J(A){for(var b=S(g);b!==null;){if(b.callback===null)d(g);else if(b.startTime<=A)d(g),b.sortIndex=b.expirationTime,h(k,b);else break;b=S(g)}}function ce(A){if(X=!1,J(A),!K)if(S(k)!==null)K=!0,fe||(fe=!0,$());else{var b=S(g);b!==null&&oe(ce,b.startTime-A)}}var fe=!1,le=-1,ye=5,ke=-1;function ie(){return P?!0:!(c.unstable_now()-ke<ye)}function re(){if(P=!1,fe){var A=c.unstable_now();ke=A;var b=!0;try{e:{K=!1,X&&(X=!1,ae(le),le=-1),I=!0;var U=W;try{t:{for(J(A),Q=S(k);Q!==null&&!(Q.expirationTime>A&&ie());){var G=Q.callback;if(typeof G=="function"){Q.callback=null,W=Q.priorityLevel;var se=G(Q.expirationTime<=A);if(A=c.unstable_now(),typeof se=="function"){Q.callback=se,J(A),b=!0;break t}Q===S(k)&&d(k),J(A)}else d(k);Q=S(k)}if(Q!==null)b=!0;else{var u=S(g);u!==null&&oe(ce,u.startTime-A),b=!1}}break e}finally{Q=null,W=U,I=!1}b=void 0}}finally{b?$():fe=!1}}}var $;if(typeof L=="function")$=function(){L(re)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ue=de.port2;de.port1.onmessage=re,$=function(){ue.postMessage(null)}}else $=function(){be(re,0)};function oe(A,b){le=be(function(){A(c.unstable_now())},b)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(A){A.callback=null},c.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<A?Math.floor(1e3/A):5},c.unstable_getCurrentPriorityLevel=function(){return W},c.unstable_next=function(A){switch(W){case 1:case 2:case 3:var b=3;break;default:b=W}var U=W;W=b;try{return A()}finally{W=U}},c.unstable_requestPaint=function(){P=!0},c.unstable_runWithPriority=function(A,b){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var U=W;W=A;try{return b()}finally{W=U}},c.unstable_scheduleCallback=function(A,b,U){var G=c.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?G+U:G):U=G,A){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=U+se,A={id:R++,callback:b,priorityLevel:A,startTime:U,expirationTime:se,sortIndex:-1},U>G?(A.sortIndex=U,h(g,A),S(k)===null&&A===S(g)&&(X?(ae(le),le=-1):X=!0,oe(ce,U-G))):(A.sortIndex=se,h(k,A),K||I||(K=!0,fe||(fe=!0,$()))),A},c.unstable_shouldYield=ie,c.unstable_wrapCallback=function(A){var b=W;return function(){var U=W;W=b;try{return A.apply(this,arguments)}finally{W=U}}}})(uo)),uo}var Sx;function Lh(){return Sx||(Sx=1,oo.exports=Bh()),oo.exports}var xo={exports:{}},zt={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Cx;function qh(){if(Cx)return zt;Cx=1;var c=wo();function h(k){var g="https://react.dev/errors/"+k;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var R=2;R<arguments.length;R++)g+="&args[]="+encodeURIComponent(arguments[R])}return"Minified React error #"+k+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function S(){}var d={d:{f:S,r:function(){throw Error(h(522))},D:S,C:S,L:S,m:S,X:S,S,M:S},p:0,findDOMNode:null},z=Symbol.for("react.portal");function M(k,g,R){var Q=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:z,key:Q==null?null:""+Q,children:k,containerInfo:g,implementation:R}}var V=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function q(k,g){if(k==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,zt.createPortal=function(k,g){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(h(299));return M(k,g,null,R)},zt.flushSync=function(k){var g=V.T,R=d.p;try{if(V.T=null,d.p=2,k)return k()}finally{V.T=g,d.p=R,d.d.f()}},zt.preconnect=function(k,g){typeof k=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(k,g))},zt.prefetchDNS=function(k){typeof k=="string"&&d.d.D(k)},zt.preinit=function(k,g){if(typeof k=="string"&&g&&typeof g.as=="string"){var R=g.as,Q=q(R,g.crossOrigin),W=typeof g.integrity=="string"?g.integrity:void 0,I=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;R==="style"?d.d.S(k,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:Q,integrity:W,fetchPriority:I}):R==="script"&&d.d.X(k,{crossOrigin:Q,integrity:W,fetchPriority:I,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},zt.preinitModule=function(k,g){if(typeof k=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var R=q(g.as,g.crossOrigin);d.d.M(k,{crossOrigin:R,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(k)},zt.preload=function(k,g){if(typeof k=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var R=g.as,Q=q(R,g.crossOrigin);d.d.L(k,R,{crossOrigin:Q,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},zt.preloadModule=function(k,g){if(typeof k=="string")if(g){var R=q(g.as,g.crossOrigin);d.d.m(k,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:R,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(k)},zt.requestFormReset=function(k){d.d.r(k)},zt.unstable_batchedUpdates=function(k,g){return k(g)},zt.useFormState=function(k,g,R){return V.H.useFormState(k,g,R)},zt.useFormStatus=function(){return V.H.useHostTransitionStatus()},zt.version="19.2.8",zt}var Ax;function $h(){if(Ax)return xo.exports;Ax=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(h){console.error(h)}}return c(),xo.exports=qh(),xo.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 Mx;function Gh(){if(Mx)return kn;Mx=1;var c=Lh(),h=wo(),S=$h();function d(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 z(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function M(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 V(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 q(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 k(e){if(M(e)!==e)throw Error(d(188))}function g(e){var t=e.alternate;if(!t){if(t=M(e),t===null)throw Error(d(188));return t!==e?null:e}for(var l=e,s=t;;){var n=l.return;if(n===null)break;var r=n.alternate;if(r===null){if(s=n.return,s!==null){l=s;continue}break}if(n.child===r.child){for(r=n.child;r;){if(r===l)return k(n),e;if(r===s)return k(n),t;r=r.sibling}throw Error(d(188))}if(l.return!==s.return)l=n,s=r;else{for(var i=!1,o=n.child;o;){if(o===l){i=!0,l=n,s=r;break}if(o===s){i=!0,s=n,l=r;break}o=o.sibling}if(!i){for(o=r.child;o;){if(o===l){i=!0,l=r,s=n;break}if(o===s){i=!0,s=r,l=n;break}o=o.sibling}if(!i)throw Error(d(189))}}if(l.alternate!==s)throw Error(d(190))}if(l.tag!==3)throw Error(d(188));return l.stateNode.current===l?e:t}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R(e),t!==null)return t;e=e.sibling}return null}var Q=Object.assign,W=Symbol.for("react.element"),I=Symbol.for("react.transitional.element"),K=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),L=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),ke=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case be:return"Profiler";case P:return"StrictMode";case ce:return"Suspense";case fe:return"SuspenseList";case ke:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case K:return"Portal";case L:return e.displayName||"Context";case ae:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case ye:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var oe=Array.isArray,A=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=S.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},G=[],se=-1;function u(e){return{current:e}}function p(e){0>se||(e.current=G[se],G[se]=null,se--)}function Y(e,t){se++,G[se]=e.current,e.current=t}var ee=u(null),xe=u(null),ge=u(null),Ne=u(null);function Se(e,t){switch(Y(ge,t),Y(xe,e),Y(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Y0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Y0(t),e=Q0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}p(ee),Y(ee,e)}function He(){p(ee),p(xe),p(ge)}function te(e){e.memoizedState!==null&&Y(Ne,e);var t=ee.current,l=Q0(t,e.type);t!==l&&(Y(xe,e),Y(ee,l))}function y(e){xe.current===e&&(p(ee),p(xe)),Ne.current===e&&(p(Ne),yn._currentValue=U)}var me,ve;function Ee(e){if(me===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||"",ve=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+me+e+ve}var _e=!1;function T(e,t){if(!e||_e)return"";_e=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(E){var C=E}Reflect.construct(e,[],B)}else{try{B.call()}catch(E){C=E}e.call(B.prototype)}}else{try{throw Error()}catch(E){C=E}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(E){if(E&&C&&typeof E.stack=="string")return[E.stack,C.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=s.DetermineComponentFrameRoot(),i=r[0],o=r[1];if(i&&o){var x=i.split(`
`),w=o.split(`
`);for(n=s=0;s<x.length&&!x[s].includes("DetermineComponentFrameRoot");)s++;for(;n<w.length&&!w[n].includes("DetermineComponentFrameRoot");)n++;if(s===x.length||n===w.length)for(s=x.length-1,n=w.length-1;1<=s&&0<=n&&x[s]!==w[n];)n--;for(;1<=s&&0<=n;s--,n--)if(x[s]!==w[n]){if(s!==1||n!==1)do if(s--,n--,0>n||x[s]!==w[n]){var O=`
`+x[s].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=s&&0<=n);break}}}finally{_e=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ee(l):""}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee("Lazy");case 13:return e.child!==t&&t!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return T(e.type,!1);case 11:return T(e.type.render,!1);case 1:return T(e.type,!0);case 31:return Ee("Activity");default:return""}}function Ie(e){try{var t="",l=null;do t+=Re(e,l),l=e,e=e.return;while(e);return t}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}var ct=Object.prototype.hasOwnProperty,D=c.unstable_scheduleCallback,he=c.unstable_cancelCallback,ze=c.unstable_shouldYield,kt=c.unstable_requestPaint,Xe=c.unstable_now,Ot=c.unstable_getCurrentPriorityLevel,Qe=c.unstable_ImmediatePriority,Qa=c.unstable_UserBlockingPriority,ga=c.unstable_NormalPriority,Ts=c.unstable_LowPriority,ka=c.unstable_IdlePriority,$l=c.log,yl=c.unstable_setDisableYieldValue,Pt=null,vt=null;function We(e){if(typeof $l=="function"&&yl(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Pt,e)}catch{}}var St=Math.clz32?Math.clz32:Sa,vl=Math.log,zs=Math.LN2;function Sa(e){return e>>>=0,e===0?32:31-(vl(e)/zs|0)|0}var da=256,v=262144,F=4194304;function ne(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 we(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var n=0,r=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=s&134217727;return o!==0?(s=o&~r,s!==0?n=ne(s):(i&=o,i!==0?n=ne(i):l||(l=o&~e,l!==0&&(n=ne(l))))):(o=s&~r,o!==0?n=ne(o):i!==0?n=ne(i):l||(l=s&~e,l!==0&&(n=ne(l)))),n===0?0:t!==0&&t!==n&&(t&r)===0&&(r=n&-n,l=t&-t,r>=l||r===32&&(l&4194048)!==0)?t:n}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pe(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 dt(){var e=F;return F<<=1,(F&62914560)===0&&(F=4194304),e}function _(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Me(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,l,s,n,r){var i=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 o=e.entanglements,x=e.expirationTimes,w=e.hiddenUpdates;for(l=i&~l;0<l;){var O=31-St(l),B=1<<O;o[O]=0,x[O]=-1;var C=w[O];if(C!==null)for(w[O]=null,O=0;O<C.length;O++){var E=C[O];E!==null&&(E.lane&=-536870913)}l&=~B}s!==0&&Je(e,s,0),r!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=r&~(i&~t))}function Je(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-St(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function Yt(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var s=31-St(l),n=1<<s;n&t|e[s]&t&&(e[s]|=t),l&=~n}}function Qt(e,t){var l=t&-t;return l=(l&42)!==0?1:ua(l),(l&(e.suspendedLanes|t))!==0?0:l}function ua(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 Ir(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mo(){var e=b.p;return e!==0?e:(e=window.event,e===void 0?32:mx(e.type))}function Eo(e,t){var l=b.p;try{return b.p=e,t()}finally{b.p=l}}var Va=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Va,Ht="__reactProps$"+Va,Gl="__reactContainer$"+Va,Wr="__reactEvents$"+Va,Nm="__reactListeners$"+Va,wm="__reactHandles$"+Va,_o="__reactResources$"+Va,Os="__reactMarker$"+Va;function Pr(e){delete e[Ct],delete e[Ht],delete e[Wr],delete e[Nm],delete e[wm]}function Yl(e){var t=e[Ct];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Gl]||l[Ct]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=W0(e);e!==null;){if(l=e[Ct])return l;e=W0(e)}return t}e=l,l=e.parentNode}return null}function Ql(e){if(e=e[Ct]||e[Gl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ds(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function Vl(e){var t=e[_o];return t||(t=e[_o]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[Os]=!0}var To=new Set,zo={};function jl(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(zo[e]=t,e=0;e<t.length;e++)To.add(t[e])}var km=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]*$"),Oo={},Do={};function Sm(e){return ct.call(Do,e)?!0:ct.call(Oo,e)?!1:km.test(e)?Do[e]=!0:(Oo[e]=!0,!1)}function En(e,t,l){if(Sm(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function _n(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 Ca(e,t,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+s)}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ho(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Cm(e,t,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var n=s.get,r=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){l=""+i,r.call(this,i)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(i){l=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fr(e){if(!e._valueTracker){var t=Ho(e)?"checked":"value";e._valueTracker=Cm(e,t,""+e[t])}}function Uo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),s="";return e&&(s=Ho(e)?e.checked?"true":"false":e.value),e=s,e!==l?(t.setValue(e),!0):!1}function Tn(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 Am=/[\n"\\]/g;function ea(e){return e.replace(Am,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ei(e,t,l,s,n,r,i,o){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?ti(e,i,Ft(t)):l!=null?ti(e,i,Ft(l)):s!=null&&e.removeAttribute("value"),n==null&&r!=null&&(e.defaultChecked=!!r),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Ft(o):e.removeAttribute("name")}function Ro(e,t,l,s,n,r,i,o){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||l!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Fr(e);return}l=l!=null?""+Ft(l):"",t=t!=null?""+Ft(t):l,o||t===e.value||(e.value=t),e.defaultValue=t}s=s??n,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=o?e.checked:!!s,e.defaultChecked=!!s,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),Fr(e)}function ti(e,t,l){t==="number"&&Tn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Xl(e,t,l,s){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&&s&&(e[l].defaultSelected=!0)}else{for(l=""+Ft(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,s&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Bo(e,t,l){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Ft(l):""}function Lo(e,t,l,s){if(t==null){if(s!=null){if(l!=null)throw Error(d(92));if(oe(s)){if(1<s.length)throw Error(d(93));s=s[0]}l=s}l==null&&(l=""),t=l}l=Ft(t),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),Fr(e)}function Kl(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Mm=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 qo(e,t,l){var s=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,l):typeof l!="number"||l===0||Mm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function $o(e,t,l){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var n in t)s=t[n],t.hasOwnProperty(n)&&l[n]!==s&&qo(e,n,s)}else for(var r in t)t.hasOwnProperty(r)&&qo(e,r,t[r])}function ai(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 Em=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"]]),_m=/^[\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 _m.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Aa(){}var li=null;function si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Il=null;function Go(e){var t=Ql(e);if(t&&(e=t.stateNode)){var l=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(ei(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="'+ea(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var s=l[t];if(s!==e&&s.form===e.form){var n=s[Ht]||null;if(!n)throw Error(d(90));ei(s,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)s=l[t],s.form===e.form&&Uo(s)}break e;case"textarea":Bo(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Xl(e,!!l.multiple,t,!1)}}}var ni=!1;function Yo(e,t,l){if(ni)return e(t,l);ni=!0;try{var s=e(t);return s}finally{if(ni=!1,(Jl!==null||Il!==null)&&(yr(),Jl&&(t=Jl,e=Il,Il=Jl=null,Go(t),e)))for(t=0;t<e.length;t++)Go(e[t])}}function Hs(e,t){var l=e.stateNode;if(l===null)return null;var s=l[Ht]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(d(231,t,typeof l));return l}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ri=!1;if(Ma)try{var Us={};Object.defineProperty(Us,"passive",{get:function(){ri=!0}}),window.addEventListener("test",Us,Us),window.removeEventListener("test",Us,Us)}catch{ri=!1}var Za=null,ii=null,On=null;function Qo(){if(On)return On;var e,t=ii,l=t.length,s,n="value"in Za?Za.value:Za.textContent,r=n.length;for(e=0;e<l&&t[e]===n[e];e++);var i=l-e;for(s=1;s<=i&&t[l-s]===n[r-s];s++);return On=n.slice(e,1<s?1-s:void 0)}function Dn(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 Hn(){return!0}function Vo(){return!1}function Ut(e){function t(l,s,n,r,i){this._reactName=l,this._targetInst=n,this.type=s,this.nativeEvent=r,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(l=e[o],this[o]=l?l(r):r[o]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Hn:Vo,this.isPropagationStopped=Vo,this}return Q(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=Hn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){},isPersistent:Hn}),t}var Nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Un=Ut(Nl),Rs=Q({},Nl,{view:0,detail:0}),Tm=Ut(Rs),ci,oi,Bs,Rn=Q({},Rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ui,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!==Bs&&(Bs&&e.type==="mousemove"?(ci=e.screenX-Bs.screenX,oi=e.screenY-Bs.screenY):oi=ci=0,Bs=e),ci)},movementY:function(e){return"movementY"in e?e.movementY:oi}}),Zo=Ut(Rn),zm=Q({},Rn,{dataTransfer:0}),Om=Ut(zm),Dm=Q({},Rs,{relatedTarget:0}),di=Ut(Dm),Hm=Q({},Nl,{animationName:0,elapsedTime:0,pseudoElement:0}),Um=Ut(Hm),Rm=Q({},Nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bm=Ut(Rm),Lm=Q({},Nl,{data:0}),Xo=Ut(Lm),qm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$m={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"},Gm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ym(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gm[e])?!!t[e]:!1}function ui(){return Ym}var Qm=Q({},Rs,{key:function(e){if(e.key){var t=qm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$m[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ui,charCode:function(e){return e.type==="keypress"?Dn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vm=Ut(Qm),Zm=Q({},Rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ko=Ut(Zm),Xm=Q({},Rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ui}),Km=Ut(Xm),Jm=Q({},Nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Im=Ut(Jm),Wm=Q({},Rn,{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}),Pm=Ut(Wm),Fm=Q({},Nl,{newState:0,oldState:0}),ef=Ut(Fm),tf=[9,13,27,32],xi=Ma&&"CompositionEvent"in window,Ls=null;Ma&&"documentMode"in document&&(Ls=document.documentMode);var af=Ma&&"TextEvent"in window&&!Ls,Jo=Ma&&(!xi||Ls&&8<Ls&&11>=Ls),Io=" ",Wo=!1;function Po(e,t){switch(e){case"keyup":return tf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wl=!1;function lf(e,t){switch(e){case"compositionend":return Fo(t);case"keypress":return t.which!==32?null:(Wo=!0,Io);case"textInput":return e=t.data,e===Io&&Wo?null:e;default:return null}}function sf(e,t){if(Wl)return e==="compositionend"||!xi&&Po(e,t)?(e=Qo(),On=ii=Za=null,Wl=!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 Jo&&t.locale!=="ko"?null:t.data;default:return null}}var nf={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 ed(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!nf[e.type]:t==="textarea"}function td(e,t,l,s){Jl?Il?Il.push(s):Il=[s]:Jl=s,t=Cr(t,"onChange"),0<t.length&&(l=new Un("onChange","change",null,l,s),e.push({event:l,listeners:t}))}var qs=null,$s=null;function rf(e){R0(e,0)}function Bn(e){var t=Ds(e);if(Uo(t))return e}function ad(e,t){if(e==="change")return t}var ld=!1;if(Ma){var mi;if(Ma){var fi="oninput"in document;if(!fi){var sd=document.createElement("div");sd.setAttribute("oninput","return;"),fi=typeof sd.oninput=="function"}mi=fi}else mi=!1;ld=mi&&(!document.documentMode||9<document.documentMode)}function nd(){qs&&(qs.detachEvent("onpropertychange",rd),$s=qs=null)}function rd(e){if(e.propertyName==="value"&&Bn($s)){var t=[];td(t,$s,e,si(e)),Yo(rf,t)}}function cf(e,t,l){e==="focusin"?(nd(),qs=t,$s=l,qs.attachEvent("onpropertychange",rd)):e==="focusout"&&nd()}function of(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bn($s)}function df(e,t){if(e==="click")return Bn(t)}function uf(e,t){if(e==="input"||e==="change")return Bn(t)}function xf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:xf;function Gs(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var n=l[s];if(!ct.call(t,n)||!Vt(e[n],t[n]))return!1}return!0}function id(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cd(e,t){var l=id(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=t&&s>=t)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=id(l)}}function od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Tn(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=Tn(e.document)}return t}function hi(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 mf=Ma&&"documentMode"in document&&11>=document.documentMode,Pl=null,bi=null,Ys=null,gi=!1;function ud(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;gi||Pl==null||Pl!==Tn(s)||(s=Pl,"selectionStart"in s&&hi(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ys&&Gs(Ys,s)||(Ys=s,s=Cr(bi,"onSelect"),0<s.length&&(t=new Un("onSelect","select",null,t,l),e.push({event:t,listeners:s}),t.target=Pl)))}function wl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Fl={animationend:wl("Animation","AnimationEnd"),animationiteration:wl("Animation","AnimationIteration"),animationstart:wl("Animation","AnimationStart"),transitionrun:wl("Transition","TransitionRun"),transitionstart:wl("Transition","TransitionStart"),transitioncancel:wl("Transition","TransitionCancel"),transitionend:wl("Transition","TransitionEnd")},pi={},xd={};Ma&&(xd=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function kl(e){if(pi[e])return pi[e];if(!Fl[e])return e;var t=Fl[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in xd)return pi[e]=t[l];return e}var md=kl("animationend"),fd=kl("animationiteration"),hd=kl("animationstart"),ff=kl("transitionrun"),hf=kl("transitionstart"),bf=kl("transitioncancel"),bd=kl("transitionend"),gd=new Map,yi="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(" ");yi.push("scrollEnd");function xa(e,t){gd.set(e,t),jl(t,[e])}var Ln=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)},ta=[],es=0,vi=0;function qn(){for(var e=es,t=vi=es=0;t<e;){var l=ta[t];ta[t++]=null;var s=ta[t];ta[t++]=null;var n=ta[t];ta[t++]=null;var r=ta[t];if(ta[t++]=null,s!==null&&n!==null){var i=s.pending;i===null?n.next=n:(n.next=i.next,i.next=n),s.pending=n}r!==0&&pd(l,n,r)}}function $n(e,t,l,s){ta[es++]=e,ta[es++]=t,ta[es++]=l,ta[es++]=s,vi|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ji(e,t,l,s){return $n(e,t,l,s),Gn(e)}function Sl(e,t){return $n(e,null,null,t),Gn(e)}function pd(e,t,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var n=!1,r=e.return;r!==null;)r.childLanes|=l,s=r.alternate,s!==null&&(s.childLanes|=l),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(n=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,n&&t!==null&&(n=31-St(l),e=r.hiddenUpdates,s=e[n],s===null?e[n]=[t]:s.push(t),t.lane=l|536870912),r):null}function Gn(e){if(50<xn)throw xn=0,_c=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ts={};function gf(e,t,l,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,l,s){return new gf(e,t,l,s)}function Ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ea(e,t){var l=e.alternate;return l===null?(l=Zt(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 yd(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 Yn(e,t,l,s,n,r){var i=0;if(s=e,typeof e=="function")Ni(e)&&(i=1);else if(typeof e=="string")i=Nh(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ke:return e=Zt(31,l,t,n),e.elementType=ke,e.lanes=r,e;case X:return Cl(l.children,n,r,t);case P:i=8,n|=24;break;case be:return e=Zt(12,l,t,n|2),e.elementType=be,e.lanes=r,e;case ce:return e=Zt(13,l,t,n),e.elementType=ce,e.lanes=r,e;case fe:return e=Zt(19,l,t,n),e.elementType=fe,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:i=10;break e;case ae:i=9;break e;case J:i=11;break e;case le:i=14;break e;case ye:i=16,s=null;break e}i=29,l=Error(d(130,e===null?"null":typeof e,"")),s=null}return t=Zt(i,l,t,n),t.elementType=e,t.type=s,t.lanes=r,t}function Cl(e,t,l,s){return e=Zt(7,e,s,t),e.lanes=l,e}function wi(e,t,l){return e=Zt(6,e,null,t),e.lanes=l,e}function vd(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function ki(e,t,l){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jd=new WeakMap;function aa(e,t){if(typeof e=="object"&&e!==null){var l=jd.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ie(t)},jd.set(e,t),t)}return{value:e,source:t,stack:Ie(t)}}var as=[],ls=0,Qn=null,Qs=0,la=[],sa=0,Xa=null,pa=1,ya="";function _a(e,t){as[ls++]=Qs,as[ls++]=Qn,Qn=e,Qs=t}function Nd(e,t,l){la[sa++]=pa,la[sa++]=ya,la[sa++]=Xa,Xa=e;var s=pa;e=ya;var n=32-St(s)-1;s&=~(1<<n),l+=1;var r=32-St(t)+n;if(30<r){var i=n-n%5;r=(s&(1<<i)-1).toString(32),s>>=i,n-=i,pa=1<<32-St(t)+n|l<<n|s,ya=r+e}else pa=1<<r|l<<n|s,ya=e}function Si(e){e.return!==null&&(_a(e,1),Nd(e,1,0))}function Ci(e){for(;e===Qn;)Qn=as[--ls],as[ls]=null,Qs=as[--ls],as[ls]=null;for(;e===Xa;)Xa=la[--sa],la[sa]=null,ya=la[--sa],la[sa]=null,pa=la[--sa],la[sa]=null}function wd(e,t){la[sa++]=pa,la[sa++]=ya,la[sa++]=Xa,pa=t.id,ya=t.overflow,Xa=e}var At=null,rt=null,Ge=!1,Ka=null,na=!1,Ai=Error(d(519));function Ja(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vs(aa(t,e)),Ai}function kd(e){var t=e.stateNode,l=e.type,s=e.memoizedProps;switch(t[Ct]=e,t[Ht]=s,l){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(l=0;l<fn.length;l++)Le(fn[l],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),Ro(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),Lo(t,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||s.suppressHydrationWarning===!0||$0(t.textContent,l)?(s.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),s.onScroll!=null&&Le("scroll",t),s.onScrollEnd!=null&&Le("scrollend",t),s.onClick!=null&&(t.onclick=Aa),t=!0):t=!1,t||Ja(e,!0)}function Sd(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:At=At.return}}function ss(e){if(e!==At)return!1;if(!Ge)return Sd(e),Ge=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Vc(e.type,e.memoizedProps)),l=!l),l&&rt&&Ja(e),Sd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));rt=I0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));rt=I0(e)}else t===27?(t=rt,ol(e.type)?(e=Ic,Ic=null,rt=e):rt=t):rt=At?ia(e.stateNode.nextSibling):null;return!0}function Al(){rt=At=null,Ge=!1}function Mi(){var e=Ka;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),Ka=null),e}function Vs(e){Ka===null?Ka=[e]:Ka.push(e)}var Ei=u(null),Ml=null,Ta=null;function Ia(e,t,l){Y(Ei,t._currentValue),t._currentValue=l}function za(e){e._currentValue=Ei.current,p(Ei)}function _i(e,t,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===l)break;e=e.return}}function Ti(e,t,l,s){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var r=n.dependencies;if(r!==null){var i=n.child;r=r.firstContext;e:for(;r!==null;){var o=r;r=n;for(var x=0;x<t.length;x++)if(o.context===t[x]){r.lanes|=l,o=r.alternate,o!==null&&(o.lanes|=l),_i(r.return,l,e),s||(i=null);break e}r=o.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(d(341));i.lanes|=l,r=i.alternate,r!==null&&(r.lanes|=l),_i(i,l,e),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===e){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function ns(e,t,l,s){e=null;for(var n=t,r=!1;n!==null;){if(!r){if((n.flags&524288)!==0)r=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(d(387));if(i=i.memoizedProps,i!==null){var o=n.type;Vt(n.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(n===Ne.current){if(i=n.alternate,i===null)throw Error(d(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(yn):e=[yn])}n=n.return}e!==null&&Ti(t,e,l,s),t.flags|=262144}function Vn(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function El(e){Ml=e,Ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return Cd(Ml,e)}function Zn(e,t){return Ml===null&&El(e),Cd(e,t)}function Cd(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Ta===null){if(e===null)throw Error(d(308));Ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ta=Ta.next=t;return l}var pf=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},yf=c.unstable_scheduleCallback,vf=c.unstable_NormalPriority,ht={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zi(){return{controller:new pf,data:new Map,refCount:0}}function Zs(e){e.refCount--,e.refCount===0&&yf(vf,function(){e.controller.abort()})}var Xs=null,Oi=0,rs=0,is=null;function jf(e,t){if(Xs===null){var l=Xs=[];Oi=0,rs=Uc(),is={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Oi++,t.then(Ad,Ad),t}function Ad(){if(--Oi===0&&Xs!==null){is!==null&&(is.status="fulfilled");var e=Xs;Xs=null,rs=0,is=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Nf(e,t){var l=[],s={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(s.status="rejected",s.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),s}var Md=A.S;A.S=function(e,t){u0=Xe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&jf(e,t),Md!==null&&Md(e,t)};var _l=u(null);function Di(){var e=_l.current;return e!==null?e:nt.pooledCache}function Xn(e,t){t===null?Y(_l,_l.current):Y(_l,t.pool)}function Ed(){var e=Di();return e===null?null:{parent:ht._currentValue,pool:e}}var cs=Error(d(460)),Hi=Error(d(474)),Kn=Error(d(542)),Jn={then:function(){}};function _d(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Td(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Aa,Aa),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Od(e),e;default:if(typeof t.status=="string")t.then(Aa,Aa);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=s}},function(s){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Od(e),e}throw zl=t,cs}}function Tl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(zl=l,cs):l}}var zl=null;function zd(){if(zl===null)throw Error(d(459));var e=zl;return zl=null,e}function Od(e){if(e===cs||e===Kn)throw Error(d(483))}var os=null,Ks=0;function In(e){var t=Ks;return Ks+=1,os===null&&(os=[]),Td(os,e,t)}function Js(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Wn(e,t){throw t.$$typeof===W?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Dd(e){function t(j,f){if(e){var N=j.deletions;N===null?(j.deletions=[f],j.flags|=16):N.push(f)}}function l(j,f){if(!e)return null;for(;f!==null;)t(j,f),f=f.sibling;return null}function s(j){for(var f=new Map;j!==null;)j.key!==null?f.set(j.key,j):f.set(j.index,j),j=j.sibling;return f}function n(j,f){return j=Ea(j,f),j.index=0,j.sibling=null,j}function r(j,f,N){return j.index=N,e?(N=j.alternate,N!==null?(N=N.index,N<f?(j.flags|=67108866,f):N):(j.flags|=67108866,f)):(j.flags|=1048576,f)}function i(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function o(j,f,N,H){return f===null||f.tag!==6?(f=wi(N,j.mode,H),f.return=j,f):(f=n(f,N),f.return=j,f)}function x(j,f,N,H){var Ce=N.type;return Ce===X?O(j,f,N.props.children,H,N.key):f!==null&&(f.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ye&&Tl(Ce)===f.type)?(f=n(f,N.props),Js(f,N),f.return=j,f):(f=Yn(N.type,N.key,N.props,null,j.mode,H),Js(f,N),f.return=j,f)}function w(j,f,N,H){return f===null||f.tag!==4||f.stateNode.containerInfo!==N.containerInfo||f.stateNode.implementation!==N.implementation?(f=ki(N,j.mode,H),f.return=j,f):(f=n(f,N.children||[]),f.return=j,f)}function O(j,f,N,H,Ce){return f===null||f.tag!==7?(f=Cl(N,j.mode,H,Ce),f.return=j,f):(f=n(f,N),f.return=j,f)}function B(j,f,N){if(typeof f=="string"&&f!==""||typeof f=="number"||typeof f=="bigint")return f=wi(""+f,j.mode,N),f.return=j,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case I:return N=Yn(f.type,f.key,f.props,null,j.mode,N),Js(N,f),N.return=j,N;case K:return f=ki(f,j.mode,N),f.return=j,f;case ye:return f=Tl(f),B(j,f,N)}if(oe(f)||$(f))return f=Cl(f,j.mode,N,null),f.return=j,f;if(typeof f.then=="function")return B(j,In(f),N);if(f.$$typeof===L)return B(j,Zn(j,f),N);Wn(j,f)}return null}function C(j,f,N,H){var Ce=f!==null?f.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return Ce!==null?null:o(j,f,""+N,H);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case I:return N.key===Ce?x(j,f,N,H):null;case K:return N.key===Ce?w(j,f,N,H):null;case ye:return N=Tl(N),C(j,f,N,H)}if(oe(N)||$(N))return Ce!==null?null:O(j,f,N,H,null);if(typeof N.then=="function")return C(j,f,In(N),H);if(N.$$typeof===L)return C(j,f,Zn(j,N),H);Wn(j,N)}return null}function E(j,f,N,H,Ce){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return j=j.get(N)||null,o(f,j,""+H,Ce);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case I:return j=j.get(H.key===null?N:H.key)||null,x(f,j,H,Ce);case K:return j=j.get(H.key===null?N:H.key)||null,w(f,j,H,Ce);case ye:return H=Tl(H),E(j,f,N,H,Ce)}if(oe(H)||$(H))return j=j.get(N)||null,O(f,j,H,Ce,null);if(typeof H.then=="function")return E(j,f,N,In(H),Ce);if(H.$$typeof===L)return E(j,f,N,Zn(f,H),Ce);Wn(f,H)}return null}function pe(j,f,N,H){for(var Ce=null,Ve=null,je=f,De=f=0,$e=null;je!==null&&De<N.length;De++){je.index>De?($e=je,je=null):$e=je.sibling;var Ze=C(j,je,N[De],H);if(Ze===null){je===null&&(je=$e);break}e&&je&&Ze.alternate===null&&t(j,je),f=r(Ze,f,De),Ve===null?Ce=Ze:Ve.sibling=Ze,Ve=Ze,je=$e}if(De===N.length)return l(j,je),Ge&&_a(j,De),Ce;if(je===null){for(;De<N.length;De++)je=B(j,N[De],H),je!==null&&(f=r(je,f,De),Ve===null?Ce=je:Ve.sibling=je,Ve=je);return Ge&&_a(j,De),Ce}for(je=s(je);De<N.length;De++)$e=E(je,j,De,N[De],H),$e!==null&&(e&&$e.alternate!==null&&je.delete($e.key===null?De:$e.key),f=r($e,f,De),Ve===null?Ce=$e:Ve.sibling=$e,Ve=$e);return e&&je.forEach(function(fl){return t(j,fl)}),Ge&&_a(j,De),Ce}function Ae(j,f,N,H){if(N==null)throw Error(d(151));for(var Ce=null,Ve=null,je=f,De=f=0,$e=null,Ze=N.next();je!==null&&!Ze.done;De++,Ze=N.next()){je.index>De?($e=je,je=null):$e=je.sibling;var fl=C(j,je,Ze.value,H);if(fl===null){je===null&&(je=$e);break}e&&je&&fl.alternate===null&&t(j,je),f=r(fl,f,De),Ve===null?Ce=fl:Ve.sibling=fl,Ve=fl,je=$e}if(Ze.done)return l(j,je),Ge&&_a(j,De),Ce;if(je===null){for(;!Ze.done;De++,Ze=N.next())Ze=B(j,Ze.value,H),Ze!==null&&(f=r(Ze,f,De),Ve===null?Ce=Ze:Ve.sibling=Ze,Ve=Ze);return Ge&&_a(j,De),Ce}for(je=s(je);!Ze.done;De++,Ze=N.next())Ze=E(je,j,De,Ze.value,H),Ze!==null&&(e&&Ze.alternate!==null&&je.delete(Ze.key===null?De:Ze.key),f=r(Ze,f,De),Ve===null?Ce=Ze:Ve.sibling=Ze,Ve=Ze);return e&&je.forEach(function(Oh){return t(j,Oh)}),Ge&&_a(j,De),Ce}function st(j,f,N,H){if(typeof N=="object"&&N!==null&&N.type===X&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case I:e:{for(var Ce=N.key;f!==null;){if(f.key===Ce){if(Ce=N.type,Ce===X){if(f.tag===7){l(j,f.sibling),H=n(f,N.props.children),H.return=j,j=H;break e}}else if(f.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ye&&Tl(Ce)===f.type){l(j,f.sibling),H=n(f,N.props),Js(H,N),H.return=j,j=H;break e}l(j,f);break}else t(j,f);f=f.sibling}N.type===X?(H=Cl(N.props.children,j.mode,H,N.key),H.return=j,j=H):(H=Yn(N.type,N.key,N.props,null,j.mode,H),Js(H,N),H.return=j,j=H)}return i(j);case K:e:{for(Ce=N.key;f!==null;){if(f.key===Ce)if(f.tag===4&&f.stateNode.containerInfo===N.containerInfo&&f.stateNode.implementation===N.implementation){l(j,f.sibling),H=n(f,N.children||[]),H.return=j,j=H;break e}else{l(j,f);break}else t(j,f);f=f.sibling}H=ki(N,j.mode,H),H.return=j,j=H}return i(j);case ye:return N=Tl(N),st(j,f,N,H)}if(oe(N))return pe(j,f,N,H);if($(N)){if(Ce=$(N),typeof Ce!="function")throw Error(d(150));return N=Ce.call(N),Ae(j,f,N,H)}if(typeof N.then=="function")return st(j,f,In(N),H);if(N.$$typeof===L)return st(j,f,Zn(j,N),H);Wn(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,f!==null&&f.tag===6?(l(j,f.sibling),H=n(f,N),H.return=j,j=H):(l(j,f),H=wi(N,j.mode,H),H.return=j,j=H),i(j)):l(j,f)}return function(j,f,N,H){try{Ks=0;var Ce=st(j,f,N,H);return os=null,Ce}catch(je){if(je===cs||je===Kn)throw je;var Ve=Zt(29,je,null,j.mode);return Ve.lanes=H,Ve.return=j,Ve}finally{}}}var Ol=Dd(!0),Hd=Dd(!1),Wa=!1;function Ui(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ri(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 Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ke&2)!==0){var n=s.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,t=Gn(e),pd(e,null,l),t}return $n(e,s,t,l),Gn(e)}function Is(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Yt(e,l)}}function Bi(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var n=null,r=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};r===null?n=r=i:r=r.next=i,l=l.next}while(l!==null);r===null?n=r=t:r=r.next=t}else n=r=t;l={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:r,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Li=!1;function Ws(){if(Li){var e=is;if(e!==null)throw e}}function Ps(e,t,l,s){Li=!1;var n=e.updateQueue;Wa=!1;var r=n.firstBaseUpdate,i=n.lastBaseUpdate,o=n.shared.pending;if(o!==null){n.shared.pending=null;var x=o,w=x.next;x.next=null,i===null?r=w:i.next=w,i=x;var O=e.alternate;O!==null&&(O=O.updateQueue,o=O.lastBaseUpdate,o!==i&&(o===null?O.firstBaseUpdate=w:o.next=w,O.lastBaseUpdate=x))}if(r!==null){var B=n.baseState;i=0,O=w=x=null,o=r;do{var C=o.lane&-536870913,E=C!==o.lane;if(E?(qe&C)===C:(s&C)===C){C!==0&&C===rs&&(Li=!0),O!==null&&(O=O.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var pe=e,Ae=o;C=t;var st=l;switch(Ae.tag){case 1:if(pe=Ae.payload,typeof pe=="function"){B=pe.call(st,B,C);break e}B=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Ae.payload,C=typeof pe=="function"?pe.call(st,B,C):pe,C==null)break e;B=Q({},B,C);break e;case 2:Wa=!0}}C=o.callback,C!==null&&(e.flags|=64,E&&(e.flags|=8192),E=n.callbacks,E===null?n.callbacks=[C]:E.push(C))}else E={lane:C,tag:o.tag,payload:o.payload,callback:o.callback,next:null},O===null?(w=O=E,x=B):O=O.next=E,i|=C;if(o=o.next,o===null){if(o=n.shared.pending,o===null)break;E=o,o=E.next,E.next=null,n.lastBaseUpdate=E,n.shared.pending=null}}while(!0);O===null&&(x=B),n.baseState=x,n.firstBaseUpdate=w,n.lastBaseUpdate=O,r===null&&(n.shared.lanes=0),sl|=i,e.lanes=i,e.memoizedState=B}}function Ud(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function Rd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ud(l[e],t)}var ds=u(null),Pn=u(0);function Bd(e,t){e=$a,Y(Pn,e),Y(ds,t),$a=e|t.baseLanes}function qi(){Y(Pn,$a),Y(ds,ds.current)}function $i(){$a=Pn.current,p(ds),p(Pn)}var Xt=u(null),ra=null;function el(e){var t=e.alternate;Y(mt,mt.current&1),Y(Xt,e),ra===null&&(t===null||ds.current!==null||t.memoizedState!==null)&&(ra=e)}function Gi(e){Y(mt,mt.current),Y(Xt,e),ra===null&&(ra=e)}function Ld(e){e.tag===22?(Y(mt,mt.current),Y(Xt,e),ra===null&&(ra=e)):tl()}function tl(){Y(mt,mt.current),Y(Xt,Xt.current)}function Kt(e){p(Xt),ra===e&&(ra=null),p(mt)}var mt=u(0);function Fn(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Kc(l)||Jc(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 Oa=0,Oe=null,at=null,bt=null,er=!1,us=!1,Dl=!1,tr=0,Fs=0,xs=null,wf=0;function ut(){throw Error(d(321))}function Yi(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Vt(e[l],t[l]))return!1;return!0}function Qi(e,t,l,s,n,r){return Oa=r,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Nu:nc,Dl=!1,r=l(s,n),Dl=!1,us&&(r=$d(t,l,s,n)),qd(e),r}function qd(e){A.H=an;var t=at!==null&&at.next!==null;if(Oa=0,bt=at=Oe=null,er=!1,Fs=0,xs=null,t)throw Error(d(300));e===null||gt||(e=e.dependencies,e!==null&&Vn(e)&&(gt=!0))}function $d(e,t,l,s){Oe=e;var n=0;do{if(us&&(xs=null),Fs=0,us=!1,25<=n)throw Error(d(301));if(n+=1,bt=at=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}A.H=wu,r=t(l,s)}while(us);return r}function kf(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?en(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Oe.flags|=1024),t}function Vi(){var e=tr!==0;return tr=0,e}function Zi(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Xi(e){if(er){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}er=!1}Oa=0,bt=at=Oe=null,us=!1,Fs=tr=0,xs=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Oe.memoizedState=bt=e:bt=bt.next=e,bt}function ft(){if(at===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=bt===null?Oe.memoizedState:bt.next;if(t!==null)bt=t,at=e;else{if(e===null)throw Oe.alternate===null?Error(d(467)):Error(d(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},bt===null?Oe.memoizedState=bt=e:bt=bt.next=e}return bt}function ar(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function en(e){var t=Fs;return Fs+=1,xs===null&&(xs=[]),e=Td(xs,e,t),t=Oe,(bt===null?t.memoizedState:bt.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Nu:nc),e}function lr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return en(e);if(e.$$typeof===L)return Mt(e)}throw Error(d(438,String(e)))}function Ki(e){var t=null,l=Oe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var s=Oe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ar(),Oe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),s=0;s<e;s++)l[s]=ie;return t.index++,l}function Da(e,t){return typeof t=="function"?t(e):t}function sr(e){var t=ft();return Ji(t,at,e)}function Ji(e,t,l){var s=e.queue;if(s===null)throw Error(d(311));s.lastRenderedReducer=l;var n=e.baseQueue,r=s.pending;if(r!==null){if(n!==null){var i=n.next;n.next=r.next,r.next=i}t.baseQueue=n=r,s.pending=null}if(r=e.baseState,n===null)e.memoizedState=r;else{t=n.next;var o=i=null,x=null,w=t,O=!1;do{var B=w.lane&-536870913;if(B!==w.lane?(qe&B)===B:(Oa&B)===B){var C=w.revertLane;if(C===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null}),B===rs&&(O=!0);else if((Oa&C)===C){w=w.next,C===rs&&(O=!0);continue}else B={lane:0,revertLane:w.revertLane,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},x===null?(o=x=B,i=r):x=x.next=B,Oe.lanes|=C,sl|=C;B=w.action,Dl&&l(r,B),r=w.hasEagerState?w.eagerState:l(r,B)}else C={lane:B,revertLane:w.revertLane,gesture:w.gesture,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},x===null?(o=x=C,i=r):x=x.next=C,Oe.lanes|=B,sl|=B;w=w.next}while(w!==null&&w!==t);if(x===null?i=r:x.next=o,!Vt(r,e.memoizedState)&&(gt=!0,O&&(l=is,l!==null)))throw l;e.memoizedState=r,e.baseState=i,e.baseQueue=x,s.lastRenderedState=r}return n===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Ii(e){var t=ft(),l=t.queue;if(l===null)throw Error(d(311));l.lastRenderedReducer=e;var s=l.dispatch,n=l.pending,r=t.memoizedState;if(n!==null){l.pending=null;var i=n=n.next;do r=e(r,i.action),i=i.next;while(i!==n);Vt(r,t.memoizedState)||(gt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),l.lastRenderedState=r}return[r,s]}function Gd(e,t,l){var s=Oe,n=ft(),r=Ge;if(r){if(l===void 0)throw Error(d(407));l=l()}else l=t();var i=!Vt((at||n).memoizedState,l);if(i&&(n.memoizedState=l,gt=!0),n=n.queue,Fi(Vd.bind(null,s,n,e),[e]),n.getSnapshot!==t||i||bt!==null&&bt.memoizedState.tag&1){if(s.flags|=2048,ms(9,{destroy:void 0},Qd.bind(null,s,n,l,t),null),nt===null)throw Error(d(349));r||(Oa&127)!==0||Yd(s,t,l)}return l}function Yd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Oe.updateQueue,t===null?(t=ar(),Oe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Qd(e,t,l,s){t.value=l,t.getSnapshot=s,Zd(t)&&Xd(e)}function Vd(e,t,l){return l(function(){Zd(t)&&Xd(e)})}function Zd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Vt(e,l)}catch{return!0}}function Xd(e){var t=Sl(e,2);t!==null&&$t(t,e,2)}function Wi(e){var t=Dt();if(typeof e=="function"){var l=e;if(e=l(),Dl){We(!0);try{l()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:e},t}function Kd(e,t,l,s){return e.baseState=l,Ji(e,at,typeof s=="function"?s:Da)}function Sf(e,t,l,s,n){if(ir(e))throw Error(d(485));if(e=t.action,e!==null){var r={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){r.listeners.push(i)}};A.T!==null?l(!0):r.isTransition=!1,s(r),l=t.pending,l===null?(r.next=t.pending=r,Jd(t,r)):(r.next=l.next,t.pending=l.next=r)}}function Jd(e,t){var l=t.action,s=t.payload,n=e.state;if(t.isTransition){var r=A.T,i={};A.T=i;try{var o=l(n,s),x=A.S;x!==null&&x(i,o),Id(e,t,o)}catch(w){Pi(e,t,w)}finally{r!==null&&i.types!==null&&(r.types=i.types),A.T=r}}else try{r=l(n,s),Id(e,t,r)}catch(w){Pi(e,t,w)}}function Id(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){Wd(e,t,s)},function(s){return Pi(e,t,s)}):Wd(e,t,l)}function Wd(e,t,l){t.status="fulfilled",t.value=l,Pd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Jd(e,l)))}function Pi(e,t,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=l,Pd(t),t=t.next;while(t!==s)}e.action=null}function Pd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fd(e,t){return t}function eu(e,t){if(Ge){var l=nt.formState;if(l!==null){e:{var s=Oe;if(Ge){if(rt){t:{for(var n=rt,r=na;n.nodeType!==8;){if(!r){n=null;break t}if(n=ia(n.nextSibling),n===null){n=null;break t}}r=n.data,n=r==="F!"||r==="F"?n:null}if(n){rt=ia(n.nextSibling),s=n.data==="F!";break e}}Ja(s)}s=!1}s&&(t=l[0])}}return l=Dt(),l.memoizedState=l.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fd,lastRenderedState:t},l.queue=s,l=yu.bind(null,Oe,s),s.dispatch=l,s=Wi(!1),r=sc.bind(null,Oe,!1,s.queue),s=Dt(),n={state:t,dispatch:null,action:e,pending:null},s.queue=n,l=Sf.bind(null,Oe,n,r,l),n.dispatch=l,s.memoizedState=e,[t,l,!1]}function tu(e){var t=ft();return au(t,at,e)}function au(e,t,l){if(t=Ji(e,t,Fd)[0],e=sr(Da)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=en(t)}catch(i){throw i===cs?Kn:i}else s=t;t=ft();var n=t.queue,r=n.dispatch;return l!==t.memoizedState&&(Oe.flags|=2048,ms(9,{destroy:void 0},Cf.bind(null,n,l),null)),[s,r,e]}function Cf(e,t){e.action=t}function lu(e){var t=ft(),l=at;if(l!==null)return au(t,l,e);ft(),t=t.memoizedState,l=ft();var s=l.queue.dispatch;return l.memoizedState=e,[t,s,!1]}function ms(e,t,l,s){return e={tag:e,create:l,deps:s,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=ar(),Oe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,t.lastEffect=e),e}function su(){return ft().memoizedState}function nr(e,t,l,s){var n=Dt();Oe.flags|=e,n.memoizedState=ms(1|t,{destroy:void 0},l,s===void 0?null:s)}function rr(e,t,l,s){var n=ft();s=s===void 0?null:s;var r=n.memoizedState.inst;at!==null&&s!==null&&Yi(s,at.memoizedState.deps)?n.memoizedState=ms(t,r,l,s):(Oe.flags|=e,n.memoizedState=ms(1|t,r,l,s))}function nu(e,t){nr(8390656,8,e,t)}function Fi(e,t){rr(2048,8,e,t)}function Af(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=ar(),Oe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function ru(e){var t=ft().memoizedState;return Af({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function iu(e,t){return rr(4,2,e,t)}function cu(e,t){return rr(4,4,e,t)}function ou(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 du(e,t,l){l=l!=null?l.concat([e]):null,rr(4,4,ou.bind(null,t,e),l)}function ec(){}function uu(e,t){var l=ft();t=t===void 0?null:t;var s=l.memoizedState;return t!==null&&Yi(t,s[1])?s[0]:(l.memoizedState=[e,t],e)}function xu(e,t){var l=ft();t=t===void 0?null:t;var s=l.memoizedState;if(t!==null&&Yi(t,s[1]))return s[0];if(s=e(),Dl){We(!0);try{e()}finally{We(!1)}}return l.memoizedState=[s,t],s}function tc(e,t,l){return l===void 0||(Oa&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=m0(),Oe.lanes|=e,sl|=e,l)}function mu(e,t,l,s){return Vt(l,t)?l:ds.current!==null?(e=tc(e,l,s),Vt(e,t)||(gt=!0),e):(Oa&42)===0||(Oa&1073741824)!==0&&(qe&261930)===0?(gt=!0,e.memoizedState=l):(e=m0(),Oe.lanes|=e,sl|=e,t)}function fu(e,t,l,s,n){var r=b.p;b.p=r!==0&&8>r?r:8;var i=A.T,o={};A.T=o,sc(e,!1,t,l);try{var x=n(),w=A.S;if(w!==null&&w(o,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var O=Nf(x,s);tn(e,t,O,Wt(e))}else tn(e,t,s,Wt(e))}catch(B){tn(e,t,{then:function(){},status:"rejected",reason:B},Wt())}finally{b.p=r,i!==null&&o.types!==null&&(i.types=o.types),A.T=i}}function Mf(){}function ac(e,t,l,s){if(e.tag!==5)throw Error(d(476));var n=hu(e).queue;fu(e,n,t,U,l===null?Mf:function(){return bu(e),l(s)})}function hu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:U},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bu(e){var t=hu(e);t.next===null&&(t=e.alternate.memoizedState),tn(e,t.next.queue,{},Wt())}function lc(){return Mt(yn)}function gu(){return ft().memoizedState}function pu(){return ft().memoizedState}function Ef(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=Pa(l);var s=Fa(t,e,l);s!==null&&($t(s,t,l),Is(s,t,l)),t={cache:zi()},e.payload=t;return}t=t.return}}function _f(e,t,l){var s=Wt();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ir(e)?vu(t,l):(l=ji(e,t,l,s),l!==null&&($t(l,e,s),ju(l,t,s)))}function yu(e,t,l){var s=Wt();tn(e,t,l,s)}function tn(e,t,l,s){var n={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ir(e))vu(t,n);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var i=t.lastRenderedState,o=r(i,l);if(n.hasEagerState=!0,n.eagerState=o,Vt(o,i))return $n(e,t,n,0),nt===null&&qn(),!1}catch{}finally{}if(l=ji(e,t,n,s),l!==null)return $t(l,e,s),ju(l,t,s),!0}return!1}function sc(e,t,l,s){if(s={lane:2,revertLane:Uc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ir(e)){if(t)throw Error(d(479))}else t=ji(e,l,s,2),t!==null&&$t(t,e,2)}function ir(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function vu(e,t){us=er=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function ju(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Yt(e,l)}}var an={readContext:Mt,use:lr,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};an.useEffectEvent=ut;var Nu={readContext:Mt,use:lr,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:nu,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,nr(4194308,4,ou.bind(null,t,e),l)},useLayoutEffect:function(e,t){return nr(4194308,4,e,t)},useInsertionEffect:function(e,t){nr(4,2,e,t)},useMemo:function(e,t){var l=Dt();t=t===void 0?null:t;var s=e();if(Dl){We(!0);try{e()}finally{We(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=Dt();if(l!==void 0){var n=l(t);if(Dl){We(!0);try{l(t)}finally{We(!1)}}}else n=t;return s.memoizedState=s.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=_f.bind(null,Oe,e),[s.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wi(e);var t=e.queue,l=yu.bind(null,Oe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ec,useDeferredValue:function(e,t){var l=Dt();return tc(l,e,t)},useTransition:function(){var e=Wi(!1);return e=fu.bind(null,Oe,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=Oe,n=Dt();if(Ge){if(l===void 0)throw Error(d(407));l=l()}else{if(l=t(),nt===null)throw Error(d(349));(qe&127)!==0||Yd(s,t,l)}n.memoizedState=l;var r={value:l,getSnapshot:t};return n.queue=r,nu(Vd.bind(null,s,r,e),[e]),s.flags|=2048,ms(9,{destroy:void 0},Qd.bind(null,s,r,l,t),null),l},useId:function(){var e=Dt(),t=nt.identifierPrefix;if(Ge){var l=ya,s=pa;l=(s&~(1<<32-St(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=tr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=wf++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:lc,useFormState:eu,useActionState:eu,useOptimistic:function(e){var t=Dt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=sc.bind(null,Oe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ki,useCacheRefresh:function(){return Dt().memoizedState=Ef.bind(null,Oe)},useEffectEvent:function(e){var t=Dt(),l={impl:e};return t.memoizedState=l,function(){if((Ke&2)!==0)throw Error(d(440));return l.impl.apply(void 0,arguments)}}},nc={readContext:Mt,use:lr,useCallback:uu,useContext:Mt,useEffect:Fi,useImperativeHandle:du,useInsertionEffect:iu,useLayoutEffect:cu,useMemo:xu,useReducer:sr,useRef:su,useState:function(){return sr(Da)},useDebugValue:ec,useDeferredValue:function(e,t){var l=ft();return mu(l,at.memoizedState,e,t)},useTransition:function(){var e=sr(Da)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:en(e),t]},useSyncExternalStore:Gd,useId:gu,useHostTransitionStatus:lc,useFormState:tu,useActionState:tu,useOptimistic:function(e,t){var l=ft();return Kd(l,at,e,t)},useMemoCache:Ki,useCacheRefresh:pu};nc.useEffectEvent=ru;var wu={readContext:Mt,use:lr,useCallback:uu,useContext:Mt,useEffect:Fi,useImperativeHandle:du,useInsertionEffect:iu,useLayoutEffect:cu,useMemo:xu,useReducer:Ii,useRef:su,useState:function(){return Ii(Da)},useDebugValue:ec,useDeferredValue:function(e,t){var l=ft();return at===null?tc(l,e,t):mu(l,at.memoizedState,e,t)},useTransition:function(){var e=Ii(Da)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:en(e),t]},useSyncExternalStore:Gd,useId:gu,useHostTransitionStatus:lc,useFormState:lu,useActionState:lu,useOptimistic:function(e,t){var l=ft();return at!==null?Kd(l,at,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ki,useCacheRefresh:pu};wu.useEffectEvent=ru;function rc(e,t,l,s){t=e.memoizedState,l=l(s,t),l=l==null?t:Q({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ic={enqueueSetState:function(e,t,l){e=e._reactInternals;var s=Wt(),n=Pa(s);n.payload=t,l!=null&&(n.callback=l),t=Fa(e,n,s),t!==null&&($t(t,e,s),Is(t,e,s))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var s=Wt(),n=Pa(s);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Fa(e,n,s),t!==null&&($t(t,e,s),Is(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),s=Pa(l);s.tag=2,t!=null&&(s.callback=t),t=Fa(e,s,l),t!==null&&($t(t,e,l),Is(t,e,l))}};function ku(e,t,l,s,n,r,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,r,i):t.prototype&&t.prototype.isPureReactComponent?!Gs(l,s)||!Gs(n,r):!0}function Su(e,t,l,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,s),t.state!==e&&ic.enqueueReplaceState(t,t.state,null)}function Hl(e,t){var l=t;if("ref"in t){l={};for(var s in t)s!=="ref"&&(l[s]=t[s])}if(e=e.defaultProps){l===t&&(l=Q({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Cu(e){Ln(e)}function Au(e){console.error(e)}function Mu(e){Ln(e)}function cr(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Eu(e,t,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function cc(e,t,l){return l=Pa(l),l.tag=3,l.payload={element:null},l.callback=function(){cr(e,t)},l}function _u(e){return e=Pa(e),e.tag=3,e}function Tu(e,t,l,s){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var r=s.value;e.payload=function(){return n(r)},e.callback=function(){Eu(t,l,s)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Eu(t,l,s),typeof n!="function"&&(nl===null?nl=new Set([this]):nl.add(this));var o=s.stack;this.componentDidCatch(s.value,{componentStack:o!==null?o:""})})}function Tf(e,t,l,s,n){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=l.alternate,t!==null&&ns(t,l,n,!0),l=Xt.current,l!==null){switch(l.tag){case 31:case 13:return ra===null?vr():l.alternate===null&&xt===0&&(xt=3),l.flags&=-257,l.flags|=65536,l.lanes=n,s===Jn?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([s]):t.add(s),Oc(e,s,n)),!1;case 22:return l.flags|=65536,s===Jn?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([s]):l.add(s)),Oc(e,s,n)),!1}throw Error(d(435,l.tag))}return Oc(e,s,n),vr(),!1}if(Ge)return t=Xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,s!==Ai&&(e=Error(d(422),{cause:s}),Vs(aa(e,l)))):(s!==Ai&&(t=Error(d(423),{cause:s}),Vs(aa(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,s=aa(s,l),n=cc(e.stateNode,s,n),Bi(e,n),xt!==4&&(xt=2)),!1;var r=Error(d(520),{cause:s});if(r=aa(r,l),un===null?un=[r]:un.push(r),xt!==4&&(xt=2),t===null)return!0;s=aa(s,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=cc(l.stateNode,s,e),Bi(l,e),!1;case 1:if(t=l.type,r=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(nl===null||!nl.has(r))))return l.flags|=65536,n&=-n,l.lanes|=n,n=_u(n),Tu(n,e,l,s),Bi(l,n),!1}l=l.return}while(l!==null);return!1}var oc=Error(d(461)),gt=!1;function Et(e,t,l,s){t.child=e===null?Hd(t,null,l,s):Ol(t,e.child,l,s)}function zu(e,t,l,s,n){l=l.render;var r=t.ref;if("ref"in s){var i={};for(var o in s)o!=="ref"&&(i[o]=s[o])}else i=s;return El(t),s=Qi(e,t,l,i,r,n),o=Vi(),e!==null&&!gt?(Zi(e,t,n),Ha(e,t,n)):(Ge&&o&&Si(t),t.flags|=1,Et(e,t,s,n),t.child)}function Ou(e,t,l,s,n){if(e===null){var r=l.type;return typeof r=="function"&&!Ni(r)&&r.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=r,Du(e,t,r,s,n)):(e=Yn(l.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!gc(e,n)){var i=r.memoizedProps;if(l=l.compare,l=l!==null?l:Gs,l(i,s)&&e.ref===t.ref)return Ha(e,t,n)}return t.flags|=1,e=Ea(r,s),e.ref=t.ref,e.return=t,t.child=e}function Du(e,t,l,s,n){if(e!==null){var r=e.memoizedProps;if(Gs(r,s)&&e.ref===t.ref)if(gt=!1,t.pendingProps=s=r,gc(e,n))(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,Ha(e,t,n)}return dc(e,t,l,s,n)}function Hu(e,t,l,s){var n=s.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|l:l,e!==null){for(s=t.child=e.child,n=0;s!==null;)n=n|s.lanes|s.childLanes,s=s.sibling;s=n&~r}else s=0,t.child=null;return Uu(e,t,r,l,s)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xn(t,r!==null?r.cachePool:null),r!==null?Bd(t,r):qi(),Ld(t);else return s=t.lanes=536870912,Uu(e,t,r!==null?r.baseLanes|l:l,l,s)}else r!==null?(Xn(t,r.cachePool),Bd(t,r),tl(),t.memoizedState=null):(e!==null&&Xn(t,null),qi(),tl());return Et(e,t,n,l),t.child}function ln(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Uu(e,t,l,s,n){var r=Di();return r=r===null?null:{parent:ht._currentValue,pool:r},t.memoizedState={baseLanes:l,cachePool:r},e!==null&&Xn(t,null),qi(),Ld(t),e!==null&&ns(e,t,s,!0),t.childLanes=n,null}function or(e,t){return t=ur({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ru(e,t,l){return Ol(t,e.child,null,l),e=or(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function zf(e,t,l){var s=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(s.mode==="hidden")return e=or(t,s),t.lanes=536870912,ln(null,e);if(Gi(t),(e=rt)?(e=J0(e,na),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xa!==null?{id:pa,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},l=vd(e),l.return=t,t.child=l,At=t,rt=null)):e=null,e===null)throw Ja(t);return t.lanes=536870912,null}return or(t,s)}var r=e.memoizedState;if(r!==null){var i=r.dehydrated;if(Gi(t),n)if(t.flags&256)t.flags&=-257,t=Ru(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(gt||ns(e,t,l,!1),n=(l&e.childLanes)!==0,gt||n){if(s=nt,s!==null&&(i=Qt(s,l),i!==0&&i!==r.retryLane))throw r.retryLane=i,Sl(e,i),$t(s,e,i),oc;vr(),t=Ru(e,t,l)}else e=r.treeContext,rt=ia(i.nextSibling),At=t,Ge=!0,Ka=null,na=!1,e!==null&&wd(t,e),t=or(t,s),t.flags|=4096;return t}return e=Ea(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dr(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(d(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function dc(e,t,l,s,n){return El(t),l=Qi(e,t,l,s,void 0,n),s=Vi(),e!==null&&!gt?(Zi(e,t,n),Ha(e,t,n)):(Ge&&s&&Si(t),t.flags|=1,Et(e,t,l,n),t.child)}function Bu(e,t,l,s,n,r){return El(t),t.updateQueue=null,l=$d(t,s,l,n),qd(e),s=Vi(),e!==null&&!gt?(Zi(e,t,r),Ha(e,t,r)):(Ge&&s&&Si(t),t.flags|=1,Et(e,t,l,r),t.child)}function Lu(e,t,l,s,n){if(El(t),t.stateNode===null){var r=ts,i=l.contextType;typeof i=="object"&&i!==null&&(r=Mt(i)),r=new l(s,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=ic,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=s,r.state=t.memoizedState,r.refs={},Ui(t),i=l.contextType,r.context=typeof i=="object"&&i!==null?Mt(i):ts,r.state=t.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(rc(t,l,i,s),r.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(i=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),i!==r.state&&ic.enqueueReplaceState(r,r.state,null),Ps(t,s,r,n),Ws(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){r=t.stateNode;var o=t.memoizedProps,x=Hl(l,o);r.props=x;var w=r.context,O=l.contextType;i=ts,typeof O=="object"&&O!==null&&(i=Mt(O));var B=l.getDerivedStateFromProps;O=typeof B=="function"||typeof r.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,O||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o||w!==i)&&Su(t,r,s,i),Wa=!1;var C=t.memoizedState;r.state=C,Ps(t,s,r,n),Ws(),w=t.memoizedState,o||C!==w||Wa?(typeof B=="function"&&(rc(t,l,B,s),w=t.memoizedState),(x=Wa||ku(t,l,x,s,C,w,i))?(O||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=w),r.props=s,r.state=w,r.context=i,s=x):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{r=t.stateNode,Ri(e,t),i=t.memoizedProps,O=Hl(l,i),r.props=O,B=t.pendingProps,C=r.context,w=l.contextType,x=ts,typeof w=="object"&&w!==null&&(x=Mt(w)),o=l.getDerivedStateFromProps,(w=typeof o=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(i!==B||C!==x)&&Su(t,r,s,x),Wa=!1,C=t.memoizedState,r.state=C,Ps(t,s,r,n),Ws();var E=t.memoizedState;i!==B||C!==E||Wa||e!==null&&e.dependencies!==null&&Vn(e.dependencies)?(typeof o=="function"&&(rc(t,l,o,s),E=t.memoizedState),(O=Wa||ku(t,l,O,s,C,E,x)||e!==null&&e.dependencies!==null&&Vn(e.dependencies))?(w||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(s,E,x),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(s,E,x)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||i===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=E),r.props=s,r.state=E,r.context=x,s=O):(typeof r.componentDidUpdate!="function"||i===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),s=!1)}return r=s,dr(e,t),s=(t.flags&128)!==0,r||s?(r=t.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&s?(t.child=Ol(t,e.child,null,n),t.child=Ol(t,null,l,n)):Et(e,t,l,n),t.memoizedState=r.state,e=t.child):e=Ha(e,t,n),e}function qu(e,t,l,s){return Al(),t.flags|=256,Et(e,t,l,s),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:Ed()}}function mc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=It),e}function $u(e,t,l){var s=t.pendingProps,n=!1,r=(t.flags&128)!==0,i;if((i=r)||(i=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),i&&(n=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(n?el(t):tl(),(e=rt)?(e=J0(e,na),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xa!==null?{id:pa,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},l=vd(e),l.return=t,t.child=l,At=t,rt=null)):e=null,e===null)throw Ja(t);return Jc(e)?t.lanes=32:t.lanes=536870912,null}var o=s.children;return s=s.fallback,n?(tl(),n=t.mode,o=ur({mode:"hidden",children:o},n),s=Cl(s,n,l,null),o.return=t,s.return=t,o.sibling=s,t.child=o,s=t.child,s.memoizedState=xc(l),s.childLanes=mc(e,i,l),t.memoizedState=uc,ln(null,s)):(el(t),fc(t,o))}var x=e.memoizedState;if(x!==null&&(o=x.dehydrated,o!==null)){if(r)t.flags&256?(el(t),t.flags&=-257,t=hc(e,t,l)):t.memoizedState!==null?(tl(),t.child=e.child,t.flags|=128,t=null):(tl(),o=s.fallback,n=t.mode,s=ur({mode:"visible",children:s.children},n),o=Cl(o,n,l,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,Ol(t,e.child,null,l),s=t.child,s.memoizedState=xc(l),s.childLanes=mc(e,i,l),t.memoizedState=uc,t=ln(null,s));else if(el(t),Jc(o)){if(i=o.nextSibling&&o.nextSibling.dataset,i)var w=i.dgst;i=w,s=Error(d(419)),s.stack="",s.digest=i,Vs({value:s,source:null,stack:null}),t=hc(e,t,l)}else if(gt||ns(e,t,l,!1),i=(l&e.childLanes)!==0,gt||i){if(i=nt,i!==null&&(s=Qt(i,l),s!==0&&s!==x.retryLane))throw x.retryLane=s,Sl(e,s),$t(i,e,s),oc;Kc(o)||vr(),t=hc(e,t,l)}else Kc(o)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,rt=ia(o.nextSibling),At=t,Ge=!0,Ka=null,na=!1,e!==null&&wd(t,e),t=fc(t,s.children),t.flags|=4096);return t}return n?(tl(),o=s.fallback,n=t.mode,x=e.child,w=x.sibling,s=Ea(x,{mode:"hidden",children:s.children}),s.subtreeFlags=x.subtreeFlags&65011712,w!==null?o=Ea(w,o):(o=Cl(o,n,l,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,ln(null,s),s=t.child,o=e.child.memoizedState,o===null?o=xc(l):(n=o.cachePool,n!==null?(x=ht._currentValue,n=n.parent!==x?{parent:x,pool:x}:n):n=Ed(),o={baseLanes:o.baseLanes|l,cachePool:n}),s.memoizedState=o,s.childLanes=mc(e,i,l),t.memoizedState=uc,ln(e.child,s)):(el(t),l=e.child,e=l.sibling,l=Ea(l,{mode:"visible",children:s.children}),l.return=t,l.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=l,t.memoizedState=null,l)}function fc(e,t){return t=ur({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ur(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function hc(e,t,l){return Ol(t,e.child,null,l),e=fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gu(e,t,l){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),_i(e.return,t,l)}function bc(e,t,l,s,n,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:n,treeForkCount:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=s,i.tail=l,i.tailMode=n,i.treeForkCount=r)}function Yu(e,t,l){var s=t.pendingProps,n=s.revealOrder,r=s.tail;s=s.children;var i=mt.current,o=(i&2)!==0;if(o?(i=i&1|2,t.flags|=128):i&=1,Y(mt,i),Et(e,t,s,l),s=Ge?Qs:0,!o&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gu(e,l,t);else if(e.tag===19)Gu(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&&Fn(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),bc(t,!1,n,l,r,s);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Fn(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}bc(t,!0,l,null,r,s);break;case"together":bc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ha(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),sl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ns(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,l=Ea(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ea(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function gc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vn(e)))}function Of(e,t,l){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),Ia(t,ht,e.memoizedState.cache),Al();break;case 27:case 5:te(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:Ia(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Gi(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(el(t),t.flags|=128,null):(l&t.child.childLanes)!==0?$u(e,t,l):(el(t),e=Ha(e,t,l),e!==null?e.sibling:null);el(t);break;case 19:var n=(e.flags&128)!==0;if(s=(l&t.childLanes)!==0,s||(ns(e,t,l,!1),s=(l&t.childLanes)!==0),n){if(s)return Yu(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Y(mt,mt.current),s)break;return null;case 22:return t.lanes=0,Hu(e,t,l,t.pendingProps);case 24:Ia(t,ht,e.memoizedState.cache)}return Ha(e,t,l)}function Qu(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)gt=!0;else{if(!gc(e,l)&&(t.flags&128)===0)return gt=!1,Of(e,t,l);gt=(e.flags&131072)!==0}else gt=!1,Ge&&(t.flags&1048576)!==0&&Nd(t,Qs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Tl(t.elementType),t.type=e,typeof e=="function")Ni(e)?(s=Hl(e,s),t.tag=1,t=Lu(null,t,e,s,l)):(t.tag=0,t=dc(null,t,e,s,l));else{if(e!=null){var n=e.$$typeof;if(n===J){t.tag=11,t=zu(null,t,e,s,l);break e}else if(n===le){t.tag=14,t=Ou(null,t,e,s,l);break e}}throw t=ue(e)||e,Error(d(306,t,""))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,l);case 1:return s=t.type,n=Hl(s,t.pendingProps),Lu(e,t,s,n,l);case 3:e:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(d(387));s=t.pendingProps;var r=t.memoizedState;n=r.element,Ri(e,t),Ps(t,s,null,l);var i=t.memoizedState;if(s=i.cache,Ia(t,ht,s),s!==r.cache&&Ti(t,[ht],l,!0),Ws(),s=i.element,r.isDehydrated)if(r={element:s,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=qu(e,t,s,l);break e}else if(s!==n){n=aa(Error(d(424)),t),Vs(n),t=qu(e,t,s,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(rt=ia(e.firstChild),At=t,Ge=!0,Ka=null,na=!0,l=Hd(t,null,s,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Al(),s===n){t=Ha(e,t,l);break e}Et(e,t,s,l)}t=t.child}return t;case 26:return dr(e,t),e===null?(l=tx(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ge||(l=t.type,e=t.pendingProps,s=Ar(ge.current).createElement(l),s[Ct]=t,s[Ht]=e,_t(s,l,e),jt(s),t.stateNode=s):t.memoizedState=tx(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Ge&&(s=t.stateNode=P0(t.type,t.pendingProps,ge.current),At=t,na=!0,n=rt,ol(t.type)?(Ic=n,rt=ia(s.firstChild)):rt=n),Et(e,t,t.pendingProps.children,l),dr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((n=s=rt)&&(s=oh(s,t.type,t.pendingProps,na),s!==null?(t.stateNode=s,At=t,rt=ia(s.firstChild),na=!1,n=!0):n=!1),n||Ja(t)),te(t),n=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,s=r.children,Vc(n,r)?s=null:i!==null&&Vc(n,i)&&(t.flags|=32),t.memoizedState!==null&&(n=Qi(e,t,kf,null,null,l),yn._currentValue=n),dr(e,t),Et(e,t,s,l),t.child;case 6:return e===null&&Ge&&((e=l=rt)&&(l=dh(l,t.pendingProps,na),l!==null?(t.stateNode=l,At=t,rt=null,e=!0):e=!1),e||Ja(t)),null;case 13:return $u(e,t,l);case 4:return Se(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ol(t,null,s,l):Et(e,t,s,l),t.child;case 11:return zu(e,t,t.type,t.pendingProps,l);case 7:return Et(e,t,t.pendingProps,l),t.child;case 8:return Et(e,t,t.pendingProps.children,l),t.child;case 12:return Et(e,t,t.pendingProps.children,l),t.child;case 10:return s=t.pendingProps,Ia(t,t.type,s.value),Et(e,t,s.children,l),t.child;case 9:return n=t.type._context,s=t.pendingProps.children,El(t),n=Mt(n),s=s(n),t.flags|=1,Et(e,t,s,l),t.child;case 14:return Ou(e,t,t.type,t.pendingProps,l);case 15:return Du(e,t,t.type,t.pendingProps,l);case 19:return Yu(e,t,l);case 31:return zf(e,t,l);case 22:return Hu(e,t,l,t.pendingProps);case 24:return El(t),s=Mt(ht),e===null?(n=Di(),n===null&&(n=nt,r=zi(),n.pooledCache=r,r.refCount++,r!==null&&(n.pooledCacheLanes|=l),n=r),t.memoizedState={parent:s,cache:n},Ui(t),Ia(t,ht,n)):((e.lanes&l)!==0&&(Ri(e,t),Ps(t,null,null,l),Ws()),n=e.memoizedState,r=t.memoizedState,n.parent!==s?(n={parent:s,cache:s},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Ia(t,ht,s)):(s=r.cache,Ia(t,ht,s),s!==n.cache&&Ti(t,[ht],l,!0))),Et(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function Ua(e){e.flags|=4}function pc(e,t,l,s,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(g0())e.flags|=8192;else throw zl=Jn,Hi}else e.flags&=-16777217}function Vu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rx(t))if(g0())e.flags|=8192;else throw zl=Jn,Hi}function xr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?dt():536870912,e.lanes|=t,gs|=t)}function sn(e,t){if(!Ge)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 s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,s|=n.subtreeFlags&65011712,s|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=l,t}function Df(e,t,l){var s=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return l=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),za(ht),He(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ss(t)?Ua(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mi())),it(t),null;case 26:var n=t.type,r=t.memoizedState;return e===null?(Ua(t),r!==null?(it(t),Vu(t,r)):(it(t),pc(t,n,null,s,l))):r?r!==e.memoizedState?(Ua(t),it(t),Vu(t,r)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ua(t),it(t),pc(t,n,e,s,l)),null;case 27:if(y(t),l=ge.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ua(t);else{if(!s){if(t.stateNode===null)throw Error(d(166));return it(t),null}e=ee.current,ss(t)?kd(t):(e=P0(n,s,l),t.stateNode=e,Ua(t))}return it(t),null;case 5:if(y(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ua(t);else{if(!s){if(t.stateNode===null)throw Error(d(166));return it(t),null}if(r=ee.current,ss(t))kd(t);else{var i=Ar(ge.current);switch(r){case 1:r=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:r=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":r=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":r=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":r=i.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof s.is=="string"?i.createElement("select",{is:s.is}):i.createElement("select"),s.multiple?r.multiple=!0:s.size&&(r.size=s.size);break;default:r=typeof s.is=="string"?i.createElement(n,{is:s.is}):i.createElement(n)}}r[Ct]=t,r[Ht]=s;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)r.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=r;e:switch(_t(r,n,s),n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ua(t)}}return it(t),pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ua(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(d(166));if(e=ge.current,ss(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,n=At,n!==null)switch(n.tag){case 27:case 5:s=n.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||$0(e.nodeValue,l)),e||Ja(t,!0)}else e=Ar(e).createTextNode(s),e[Ct]=t,t.stateNode=e}return it(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=ss(t),l!==null){if(e===null){if(!s)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[Ct]=t}else Al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else l=Mi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(d(558))}return it(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ss(t),s!==null&&s.dehydrated!==null){if(e===null){if(!n)throw Error(d(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(d(317));n[Ct]=t}else Al(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),n=!1}else n=Mi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,n=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(n=s.alternate.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==n&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),xr(t,t.updateQueue),it(t),null);case 4:return He(),e===null&&qc(t.stateNode.containerInfo),it(t),null;case 10:return za(t.type),it(t),null;case 19:if(p(mt),s=t.memoizedState,s===null)return it(t),null;if(n=(t.flags&128)!==0,r=s.rendering,r===null)if(n)sn(s,!1);else{if(xt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Fn(e),r!==null){for(t.flags|=128,sn(s,!1),e=r.updateQueue,t.updateQueue=e,xr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)yd(l,e),l=l.sibling;return Y(mt,mt.current&1|2),Ge&&_a(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Xe()>gr&&(t.flags|=128,n=!0,sn(s,!1),t.lanes=4194304)}else{if(!n)if(e=Fn(r),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,xr(t,e),sn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!r.alternate&&!Ge)return it(t),null}else 2*Xe()-s.renderingStartTime>gr&&l!==536870912&&(t.flags|=128,n=!0,sn(s,!1),t.lanes=4194304);s.isBackwards?(r.sibling=t.child,t.child=r):(e=s.last,e!==null?e.sibling=r:t.child=r,s.last=r)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Xe(),e.sibling=null,l=mt.current,Y(mt,n?l&1|2:l&1),Ge&&_a(t,s.treeForkCount),e):(it(t),null);case 22:case 23:return Kt(t),$i(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),l=t.updateQueue,l!==null&&xr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&p(_l),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),za(ht),it(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function Hf(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(ht),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return y(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(d(340));Al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));Al()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return p(mt),null;case 4:return He(),null;case 10:return za(t.type),null;case 22:case 23:return Kt(t),$i(),e!==null&&p(_l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return za(ht),null;case 25:return null;default:return null}}function Zu(e,t){switch(Ci(t),t.tag){case 3:za(ht),He();break;case 26:case 27:case 5:y(t);break;case 4:He();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:p(mt);break;case 10:za(t.type);break;case 22:case 23:Kt(t),$i(),e!==null&&p(_l);break;case 24:za(ht)}}function nn(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var n=s.next;l=n;do{if((l.tag&e)===e){s=void 0;var r=l.create,i=l.inst;s=r(),i.destroy=s}l=l.next}while(l!==n)}}catch(o){et(t,t.return,o)}}function al(e,t,l){try{var s=t.updateQueue,n=s!==null?s.lastEffect:null;if(n!==null){var r=n.next;s=r;do{if((s.tag&e)===e){var i=s.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,n=t;var x=l,w=o;try{w()}catch(O){et(n,x,O)}}}s=s.next}while(s!==r)}}catch(O){et(t,t.return,O)}}function Xu(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Rd(t,l)}catch(s){et(e,e.return,s)}}}function Ku(e,t,l){l.props=Hl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){et(e,t,s)}}function rn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(n){et(e,t,n)}}function va(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(n){et(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){et(e,t,n)}else l.current=null}function Ju(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(n){et(e,e.return,n)}}function yc(e,t,l){try{var s=e.stateNode;lh(s,e.type,l,t),s[Ht]=t}catch(n){et(e,e.return,n)}}function Iu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ol(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Iu(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&&ol(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 jc(e,t,l){var s=e.tag;if(s===5||s===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=Aa));else if(s!==4&&(s===27&&ol(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(jc(e,t,l),e=e.sibling;e!==null;)jc(e,t,l),e=e.sibling}function mr(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(s!==4&&(s===27&&ol(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(mr(e,t,l),e=e.sibling;e!==null;)mr(e,t,l),e=e.sibling}function Wu(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);_t(t,s,l),t[Ct]=e,t[Ht]=l}catch(r){et(e,e.return,r)}}var Ra=!1,pt=!1,Nc=!1,Pu=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function Uf(e,t){if(e=e.containerInfo,Yc=Dr,e=dd(e),hi(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var n=s.anchorOffset,r=s.focusNode;s=s.focusOffset;try{l.nodeType,r.nodeType}catch{l=null;break e}var i=0,o=-1,x=-1,w=0,O=0,B=e,C=null;t:for(;;){for(var E;B!==l||n!==0&&B.nodeType!==3||(o=i+n),B!==r||s!==0&&B.nodeType!==3||(x=i+s),B.nodeType===3&&(i+=B.nodeValue.length),(E=B.firstChild)!==null;)C=B,B=E;for(;;){if(B===e)break t;if(C===l&&++w===n&&(o=i),C===r&&++O===s&&(x=i),(E=B.nextSibling)!==null)break;B=C,C=B.parentNode}B=E}l=o===-1||x===-1?null:{start:o,end:x}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qc={focusedElem:e,selectionRange:l},Dr=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,r=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&&r!==null){e=void 0,l=t,n=r.memoizedProps,r=r.memoizedState,s=l.stateNode;try{var pe=Hl(l.type,n);e=s.getSnapshotBeforeUpdate(pe,r),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){et(l,l.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Xc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xc(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(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Nt=e;break}Nt=t.return}}function Fu(e,t,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:La(e,l),s&4&&nn(5,l);break;case 1:if(La(e,l),s&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(i){et(l,l.return,i)}else{var n=Hl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){et(l,l.return,i)}}s&64&&Xu(l),s&512&&rn(l,l.return);break;case 3:if(La(e,l),s&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{Rd(e,t)}catch(i){et(l,l.return,i)}}break;case 27:t===null&&s&4&&Wu(l);case 26:case 5:La(e,l),t===null&&s&4&&Ju(l),s&512&&rn(l,l.return);break;case 12:La(e,l);break;case 31:La(e,l),s&4&&a0(e,l);break;case 13:La(e,l),s&4&&l0(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Vf.bind(null,l),uh(e,l))));break;case 22:if(s=l.memoizedState!==null||Ra,!s){t=t!==null&&t.memoizedState!==null||pt,n=Ra;var r=pt;Ra=s,(pt=t)&&!r?qa(e,l,(l.subtreeFlags&8772)!==0):La(e,l),Ra=n,pt=r}break;case 30:break;default:La(e,l)}}function e0(e){var t=e.alternate;t!==null&&(e.alternate=null,e0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pr(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 ot=null,Rt=!1;function Ba(e,t,l){for(l=l.child;l!==null;)t0(e,t,l),l=l.sibling}function t0(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Pt,l)}catch{}switch(l.tag){case 26:pt||va(l,t),Ba(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:pt||va(l,t);var s=ot,n=Rt;ol(l.type)&&(ot=l.stateNode,Rt=!1),Ba(e,t,l),bn(l.stateNode),ot=s,Rt=n;break;case 5:pt||va(l,t);case 6:if(s=ot,n=Rt,ot=null,Ba(e,t,l),ot=s,Rt=n,ot!==null)if(Rt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(l.stateNode)}catch(r){et(l,t,r)}else try{ot.removeChild(l.stateNode)}catch(r){et(l,t,r)}break;case 18:ot!==null&&(Rt?(e=ot,X0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ss(e)):X0(ot,l.stateNode));break;case 4:s=ot,n=Rt,ot=l.stateNode.containerInfo,Rt=!0,Ba(e,t,l),ot=s,Rt=n;break;case 0:case 11:case 14:case 15:al(2,l,t),pt||al(4,l,t),Ba(e,t,l);break;case 1:pt||(va(l,t),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Ku(l,t,s)),Ba(e,t,l);break;case 21:Ba(e,t,l);break;case 22:pt=(s=pt)||l.memoizedState!==null,Ba(e,t,l),pt=s;break;default:Ba(e,t,l)}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ss(e)}catch(l){et(t,t.return,l)}}}function l0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ss(e)}catch(l){et(t,t.return,l)}}function Rf(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Pu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Pu),t;default:throw Error(d(435,e.tag))}}function fr(e,t){var l=Rf(e);t.forEach(function(s){if(!l.has(s)){l.add(s);var n=Zf.bind(null,e,s);s.then(n,n)}})}function Bt(e,t){var l=t.deletions;if(l!==null)for(var s=0;s<l.length;s++){var n=l[s],r=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 27:if(ol(o.type)){ot=o.stateNode,Rt=!1;break e}break;case 5:ot=o.stateNode,Rt=!1;break e;case 3:case 4:ot=o.stateNode.containerInfo,Rt=!0;break e}o=o.return}if(ot===null)throw Error(d(160));t0(r,i,n),ot=null,Rt=!1,r=n.alternate,r!==null&&(r.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)s0(t,e),t=t.sibling}var ma=null;function s0(e,t){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bt(t,e),Lt(e),s&4&&(al(3,e,e.return),nn(3,e),al(5,e,e.return));break;case 1:Bt(t,e),Lt(e),s&512&&(pt||l===null||va(l,l.return)),s&64&&Ra&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?s:l.concat(s))));break;case 26:var n=ma;if(Bt(t,e),Lt(e),s&512&&(pt||l===null||va(l,l.return)),s&4){var r=l!==null?l.memoizedState:null;if(s=e.memoizedState,l===null)if(s===null)if(e.stateNode===null){e:{s=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(s){case"title":r=n.getElementsByTagName("title")[0],(!r||r[Os]||r[Ct]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=n.createElement(s),n.head.insertBefore(r,n.querySelector("head > title"))),_t(r,s,l),r[Ct]=e,jt(r),s=r;break e;case"link":var i=sx("link","href",n).get(s+(l.href||""));if(i){for(var o=0;o<i.length;o++)if(r=i[o],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(o,1);break t}}r=n.createElement(s),_t(r,s,l),n.head.appendChild(r);break;case"meta":if(i=sx("meta","content",n).get(s+(l.content||""))){for(o=0;o<i.length;o++)if(r=i[o],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(o,1);break t}}r=n.createElement(s),_t(r,s,l),n.head.appendChild(r);break;default:throw Error(d(468,s))}r[Ct]=e,jt(r),s=r}e.stateNode=s}else nx(n,e.type,e.stateNode);else e.stateNode=lx(n,s,e.memoizedProps);else r!==s?(r===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):r.count--,s===null?nx(n,e.type,e.stateNode):lx(n,s,e.memoizedProps)):s===null&&e.stateNode!==null&&yc(e,e.memoizedProps,l.memoizedProps)}break;case 27:Bt(t,e),Lt(e),s&512&&(pt||l===null||va(l,l.return)),l!==null&&s&4&&yc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Bt(t,e),Lt(e),s&512&&(pt||l===null||va(l,l.return)),e.flags&32){n=e.stateNode;try{Kl(n,"")}catch(pe){et(e,e.return,pe)}}s&4&&e.stateNode!=null&&(n=e.memoizedProps,yc(e,n,l!==null?l.memoizedProps:n)),s&1024&&(Nc=!0);break;case 6:if(Bt(t,e),Lt(e),s&4){if(e.stateNode===null)throw Error(d(162));s=e.memoizedProps,l=e.stateNode;try{l.nodeValue=s}catch(pe){et(e,e.return,pe)}}break;case 3:if(_r=null,n=ma,ma=Mr(t.containerInfo),Bt(t,e),ma=n,Lt(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{Ss(t.containerInfo)}catch(pe){et(e,e.return,pe)}Nc&&(Nc=!1,n0(e));break;case 4:s=ma,ma=Mr(e.stateNode.containerInfo),Bt(t,e),Lt(e),ma=s;break;case 12:Bt(t,e),Lt(e);break;case 31:Bt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,fr(e,s)));break;case 13:Bt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(br=Xe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,fr(e,s)));break;case 22:n=e.memoizedState!==null;var x=l!==null&&l.memoizedState!==null,w=Ra,O=pt;if(Ra=w||n,pt=O||x,Bt(t,e),pt=O,Ra=w,Lt(e),s&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||x||Ra||pt||Ul(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){x=l=t;try{if(r=x.stateNode,n)i=r.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{o=x.stateNode;var B=x.memoizedProps.style,C=B!=null&&B.hasOwnProperty("display")?B.display:null;o.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}}catch(pe){et(x,x.return,pe)}}}else if(t.tag===6){if(l===null){x=t;try{x.stateNode.nodeValue=n?"":x.memoizedProps}catch(pe){et(x,x.return,pe)}}}else if(t.tag===18){if(l===null){x=t;try{var E=x.stateNode;n?K0(E,!0):K0(x.stateNode,!1)}catch(pe){et(x,x.return,pe)}}}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}s&4&&(s=e.updateQueue,s!==null&&(l=s.retryQueue,l!==null&&(s.retryQueue=null,fr(e,l))));break;case 19:Bt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,fr(e,s)));break;case 30:break;case 21:break;default:Bt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var l,s=e.return;s!==null;){if(Iu(s)){l=s;break}s=s.return}if(l==null)throw Error(d(160));switch(l.tag){case 27:var n=l.stateNode,r=vc(e);mr(e,r,n);break;case 5:var i=l.stateNode;l.flags&32&&(Kl(i,""),l.flags&=-33);var o=vc(e);mr(e,o,i);break;case 3:case 4:var x=l.stateNode.containerInfo,w=vc(e);jc(e,w,x);break;default:throw Error(d(161))}}catch(O){et(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function n0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;n0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function La(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Fu(e,t.alternate,t),t=t.sibling}function Ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:al(4,t,t.return),Ul(t);break;case 1:va(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ku(t,t.return,l),Ul(t);break;case 27:bn(t.stateNode);case 26:case 5:va(t,t.return),Ul(t);break;case 22:t.memoizedState===null&&Ul(t);break;case 30:Ul(t);break;default:Ul(t)}e=e.sibling}}function qa(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,n=e,r=t,i=r.flags;switch(r.tag){case 0:case 11:case 15:qa(n,r,l),nn(4,r);break;case 1:if(qa(n,r,l),s=r,n=s.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(w){et(s,s.return,w)}if(s=r,n=s.updateQueue,n!==null){var o=s.stateNode;try{var x=n.shared.hiddenCallbacks;if(x!==null)for(n.shared.hiddenCallbacks=null,n=0;n<x.length;n++)Ud(x[n],o)}catch(w){et(s,s.return,w)}}l&&i&64&&Xu(r),rn(r,r.return);break;case 27:Wu(r);case 26:case 5:qa(n,r,l),l&&s===null&&i&4&&Ju(r),rn(r,r.return);break;case 12:qa(n,r,l);break;case 31:qa(n,r,l),l&&i&4&&a0(n,r);break;case 13:qa(n,r,l),l&&i&4&&l0(n,r);break;case 22:r.memoizedState===null&&qa(n,r,l),rn(r,r.return);break;case 30:break;default:qa(n,r,l)}t=t.sibling}}function wc(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&&Zs(l))}function kc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zs(e))}function fa(e,t,l,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)r0(e,t,l,s),t=t.sibling}function r0(e,t,l,s){var n=t.flags;switch(t.tag){case 0:case 11:case 15:fa(e,t,l,s),n&2048&&nn(9,t);break;case 1:fa(e,t,l,s);break;case 3:fa(e,t,l,s),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zs(e)));break;case 12:if(n&2048){fa(e,t,l,s),e=t.stateNode;try{var r=t.memoizedProps,i=r.id,o=r.onPostCommit;typeof o=="function"&&o(i,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){et(t,t.return,x)}}else fa(e,t,l,s);break;case 31:fa(e,t,l,s);break;case 13:fa(e,t,l,s);break;case 23:break;case 22:r=t.stateNode,i=t.alternate,t.memoizedState!==null?r._visibility&2?fa(e,t,l,s):cn(e,t):r._visibility&2?fa(e,t,l,s):(r._visibility|=2,fs(e,t,l,s,(t.subtreeFlags&10256)!==0||!1)),n&2048&&wc(i,t);break;case 24:fa(e,t,l,s),n&2048&&kc(t.alternate,t);break;default:fa(e,t,l,s)}}function fs(e,t,l,s,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,i=t,o=l,x=s,w=i.flags;switch(i.tag){case 0:case 11:case 15:fs(r,i,o,x,n),nn(8,i);break;case 23:break;case 22:var O=i.stateNode;i.memoizedState!==null?O._visibility&2?fs(r,i,o,x,n):cn(r,i):(O._visibility|=2,fs(r,i,o,x,n)),n&&w&2048&&wc(i.alternate,i);break;case 24:fs(r,i,o,x,n),n&&w&2048&&kc(i.alternate,i);break;default:fs(r,i,o,x,n)}t=t.sibling}}function cn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,s=t,n=s.flags;switch(s.tag){case 22:cn(l,s),n&2048&&wc(s.alternate,s);break;case 24:cn(l,s),n&2048&&kc(s.alternate,s);break;default:cn(l,s)}t=t.sibling}}var on=8192;function hs(e,t,l){if(e.subtreeFlags&on)for(e=e.child;e!==null;)i0(e,t,l),e=e.sibling}function i0(e,t,l){switch(e.tag){case 26:hs(e,t,l),e.flags&on&&e.memoizedState!==null&&wh(l,ma,e.memoizedState,e.memoizedProps);break;case 5:hs(e,t,l);break;case 3:case 4:var s=ma;ma=Mr(e.stateNode.containerInfo),hs(e,t,l),ma=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=on,on=16777216,hs(e,t,l),on=s):hs(e,t,l));break;default:hs(e,t,l)}}function c0(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 dn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Nt=s,d0(s,e)}c0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)o0(e),e=e.sibling}function o0(e){switch(e.tag){case 0:case 11:case 15:dn(e),e.flags&2048&&al(9,e,e.return);break;case 3:dn(e);break;case 12:dn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hr(e)):dn(e);break;default:dn(e)}}function hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Nt=s,d0(s,e)}c0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:al(8,t,t.return),hr(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,hr(t));break;default:hr(t)}e=e.sibling}}function d0(e,t){for(;Nt!==null;){var l=Nt;switch(l.tag){case 0:case 11:case 15:al(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Zs(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,Nt=s;else e:for(l=e;Nt!==null;){s=Nt;var n=s.sibling,r=s.return;if(e0(s),s===l){Nt=null;break e}if(n!==null){n.return=r,Nt=n;break e}Nt=r}}}var Bf={getCacheForType:function(e){var t=Mt(ht),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Mt(ht).controller.signal}},Lf=typeof WeakMap=="function"?WeakMap:Map,Ke=0,nt=null,Be=null,qe=0,Fe=0,Jt=null,ll=!1,bs=!1,Sc=!1,$a=0,xt=0,sl=0,Rl=0,Cc=0,It=0,gs=0,un=null,qt=null,Ac=!1,br=0,u0=0,gr=1/0,pr=null,nl=null,yt=0,rl=null,ps=null,Ga=0,Mc=0,Ec=null,x0=null,xn=0,_c=null;function Wt(){return(Ke&2)!==0&&qe!==0?qe&-qe:A.T!==null?Uc():Mo()}function m0(){if(It===0)if((qe&536870912)===0||Ge){var e=v;v<<=1,(v&3932160)===0&&(v=262144),It=e}else It=536870912;return e=Xt.current,e!==null&&(e.flags|=32),It}function $t(e,t,l){(e===nt&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(ys(e,0),il(e,qe,It,!1)),Me(e,l),((Ke&2)===0||e!==nt)&&(e===nt&&((Ke&2)===0&&(Rl|=l),xt===4&&il(e,qe,It,!1)),ja(e))}function f0(e,t,l){if((Ke&6)!==0)throw Error(d(327));var s=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ye(e,t),n=s?Gf(e,t):zc(e,t,!0),r=s;do{if(n===0){bs&&!s&&il(e,t,0,!1);break}else{if(l=e.current.alternate,r&&!qf(l)){n=zc(e,t,!1),r=!1;continue}if(n===2){if(r=t,e.errorRecoveryDisabledLanes&r)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var o=e;n=un;var x=o.current.memoizedState.isDehydrated;if(x&&(ys(o,i).flags|=256),i=zc(o,i,!1),i!==2){if(Sc&&!x){o.errorRecoveryDisabledLanes|=r,Rl|=r,n=4;break e}r=qt,qt=n,r!==null&&(qt===null?qt=r:qt.push.apply(qt,r))}n=i}if(r=!1,n!==2)continue}}if(n===1){ys(e,0),il(e,t,0,!0);break}e:{switch(s=e,r=n,r){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:il(s,t,It,!ll);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(n=br+300-Xe(),10<n)){if(il(s,t,It,!ll),we(s,0,!0)!==0)break e;Ga=t,s.timeoutHandle=V0(h0.bind(null,s,l,qt,pr,Ac,t,It,Rl,gs,ll,r,"Throttled",-0,0),n);break e}h0(s,l,qt,pr,Ac,t,It,Rl,gs,ll,r,null,-0,0)}}break}while(!0);ja(e)}function h0(e,t,l,s,n,r,i,o,x,w,O,B,C,E){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Aa},i0(t,r,B);var pe=(r&62914560)===r?br-Xe():(r&4194048)===r?u0-Xe():0;if(pe=kh(B,pe),pe!==null){Ga=r,e.cancelPendingCommit=pe(w0.bind(null,e,t,r,l,s,n,i,o,x,O,B,null,C,E)),il(e,r,i,!w);return}}w0(e,t,r,l,s,n,i,o,x)}function qf(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 s=0;s<l.length;s++){var n=l[s],r=n.getSnapshot;n=n.value;try{if(!Vt(r(),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 il(e,t,l,s){t&=~Cc,t&=~Rl,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var n=t;0<n;){var r=31-St(n),i=1<<r;s[r]=-1,n&=~i}l!==0&&Je(e,l,t)}function yr(){return(Ke&6)===0?(mn(0),!1):!0}function Tc(){if(Be!==null){if(Fe===0)var e=Be.return;else e=Be,Ta=Ml=null,Xi(e),os=null,Ks=0,e=Be;for(;e!==null;)Zu(e.alternate,e),e=e.return;Be=null}}function ys(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,rh(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ga=0,Tc(),nt=e,Be=l=Ea(e.current,null),qe=t,Fe=0,Jt=null,ll=!1,bs=Ye(e,t),Sc=!1,gs=It=Cc=Rl=sl=xt=0,qt=un=null,Ac=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var n=31-St(s),r=1<<n;t|=e[n],s&=~r}return $a=t,qn(),l}function b0(e,t){Oe=null,A.H=an,t===cs||t===Kn?(t=zd(),Fe=3):t===Hi?(t=zd(),Fe=4):Fe=t===oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Be===null&&(xt=1,cr(e,aa(t,e.current)))}function g0(){var e=Xt.current;return e===null?!0:(qe&4194048)===qe?ra===null:(qe&62914560)===qe||(qe&536870912)!==0?e===ra:!1}function p0(){var e=A.H;return A.H=an,e===null?an:e}function y0(){var e=A.A;return A.A=Bf,e}function vr(){xt=4,ll||(qe&4194048)!==qe&&Xt.current!==null||(bs=!0),(sl&134217727)===0&&(Rl&134217727)===0||nt===null||il(nt,qe,It,!1)}function zc(e,t,l){var s=Ke;Ke|=2;var n=p0(),r=y0();(nt!==e||qe!==t)&&(pr=null,ys(e,t)),t=!1;var i=xt;e:do try{if(Fe!==0&&Be!==null){var o=Be,x=Jt;switch(Fe){case 8:Tc(),i=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(t=!0);var w=Fe;if(Fe=0,Jt=null,vs(e,o,x,w),l&&bs){i=0;break e}break;default:w=Fe,Fe=0,Jt=null,vs(e,o,x,w)}}$f(),i=xt;break}catch(O){b0(e,O)}while(!0);return t&&e.shellSuspendCounter++,Ta=Ml=null,Ke=s,A.H=n,A.A=r,Be===null&&(nt=null,qe=0,qn()),i}function $f(){for(;Be!==null;)v0(Be)}function Gf(e,t){var l=Ke;Ke|=2;var s=p0(),n=y0();nt!==e||qe!==t?(pr=null,gr=Xe()+500,ys(e,t)):bs=Ye(e,t);e:do try{if(Fe!==0&&Be!==null){t=Be;var r=Jt;t:switch(Fe){case 1:Fe=0,Jt=null,vs(e,t,r,1);break;case 2:case 9:if(_d(r)){Fe=0,Jt=null,j0(t);break}t=function(){Fe!==2&&Fe!==9||nt!==e||(Fe=7),ja(e)},r.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:_d(r)?(Fe=0,Jt=null,j0(t)):(Fe=0,Jt=null,vs(e,t,r,7));break;case 5:var i=null;switch(Be.tag){case 26:i=Be.memoizedState;case 5:case 27:var o=Be;if(i?rx(i):o.stateNode.complete){Fe=0,Jt=null;var x=o.sibling;if(x!==null)Be=x;else{var w=o.return;w!==null?(Be=w,jr(w)):Be=null}break t}}Fe=0,Jt=null,vs(e,t,r,5);break;case 6:Fe=0,Jt=null,vs(e,t,r,6);break;case 8:Tc(),xt=6;break e;default:throw Error(d(462))}}Yf();break}catch(O){b0(e,O)}while(!0);return Ta=Ml=null,A.H=s,A.A=n,Ke=l,Be!==null?0:(nt=null,qe=0,qn(),xt)}function Yf(){for(;Be!==null&&!ze();)v0(Be)}function v0(e){var t=Qu(e.alternate,e,$a);e.memoizedProps=e.pendingProps,t===null?jr(e):Be=t}function j0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Bu(l,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=Bu(l,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Xi(t);default:Zu(l,t),t=Be=yd(t,$a),t=Qu(l,t,$a)}e.memoizedProps=e.pendingProps,t===null?jr(e):Be=t}function vs(e,t,l,s){Ta=Ml=null,Xi(t),os=null,Ks=0;var n=t.return;try{if(Tf(e,n,t,l,qe)){xt=1,cr(e,aa(l,e.current)),Be=null;return}}catch(r){if(n!==null)throw Be=n,r;xt=1,cr(e,aa(l,e.current)),Be=null;return}t.flags&32768?(Ge||s===1?e=!0:bs||(qe&536870912)!==0?e=!1:(ll=e=!0,(s===2||s===9||s===3||s===6)&&(s=Xt.current,s!==null&&s.tag===13&&(s.flags|=16384))),N0(t,e)):jr(t)}function jr(e){var t=e;do{if((t.flags&32768)!==0){N0(t,ll);return}e=t.return;var l=Df(t.alternate,t,$a);if(l!==null){Be=l;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);xt===0&&(xt=5)}function N0(e,t){do{var l=Hf(e.alternate,e);if(l!==null){l.flags&=32767,Be=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=l}while(e!==null);xt=6,Be=null}function w0(e,t,l,s,n,r,i,o,x){e.cancelPendingCommit=null;do Nr();while(yt!==0);if((Ke&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(r=t.lanes|t.childLanes,r|=vi,Ue(e,l,r,i,o,x),e===nt&&(Be=nt=null,qe=0),ps=t,rl=e,Ga=l,Mc=r,Ec=n,x0=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Xf(ga,function(){return M0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=A.T,A.T=null,n=b.p,b.p=2,i=Ke,Ke|=4;try{Uf(e,t,l)}finally{Ke=i,b.p=n,A.T=s}}yt=1,k0(),S0(),C0()}}function k0(){if(yt===1){yt=0;var e=rl,t=ps,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=A.T,A.T=null;var s=b.p;b.p=2;var n=Ke;Ke|=4;try{s0(t,e);var r=Qc,i=dd(e.containerInfo),o=r.focusedElem,x=r.selectionRange;if(i!==o&&o&&o.ownerDocument&&od(o.ownerDocument.documentElement,o)){if(x!==null&&hi(o)){var w=x.start,O=x.end;if(O===void 0&&(O=w),"selectionStart"in o)o.selectionStart=w,o.selectionEnd=Math.min(O,o.value.length);else{var B=o.ownerDocument||document,C=B&&B.defaultView||window;if(C.getSelection){var E=C.getSelection(),pe=o.textContent.length,Ae=Math.min(x.start,pe),st=x.end===void 0?Ae:Math.min(x.end,pe);!E.extend&&Ae>st&&(i=st,st=Ae,Ae=i);var j=cd(o,Ae),f=cd(o,st);if(j&&f&&(E.rangeCount!==1||E.anchorNode!==j.node||E.anchorOffset!==j.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)){var N=B.createRange();N.setStart(j.node,j.offset),E.removeAllRanges(),Ae>st?(E.addRange(N),E.extend(f.node,f.offset)):(N.setEnd(f.node,f.offset),E.addRange(N))}}}}for(B=[],E=o;E=E.parentNode;)E.nodeType===1&&B.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<B.length;o++){var H=B[o];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Dr=!!Yc,Qc=Yc=null}finally{Ke=n,b.p=s,A.T=l}}e.current=t,yt=2}}function S0(){if(yt===2){yt=0;var e=rl,t=ps,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=A.T,A.T=null;var s=b.p;b.p=2;var n=Ke;Ke|=4;try{Fu(e,t.alternate,t)}finally{Ke=n,b.p=s,A.T=l}}yt=3}}function C0(){if(yt===4||yt===3){yt=0,kt();var e=rl,t=ps,l=Ga,s=x0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,ps=rl=null,A0(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(nl=null),Ir(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Pt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=A.T,n=b.p,b.p=2,A.T=null;try{for(var r=e.onRecoverableError,i=0;i<s.length;i++){var o=s[i];r(o.value,{componentStack:o.stack})}}finally{A.T=t,b.p=n}}(Ga&3)!==0&&Nr(),ja(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===_c?xn++:(xn=0,_c=e):xn=0,mn(0)}}function A0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zs(t)))}function Nr(){return k0(),S0(),C0(),M0()}function M0(){if(yt!==5)return!1;var e=rl,t=Mc;Mc=0;var l=Ir(Ga),s=A.T,n=b.p;try{b.p=32>l?32:l,A.T=null,l=Ec,Ec=null;var r=rl,i=Ga;if(yt=0,ps=rl=null,Ga=0,(Ke&6)!==0)throw Error(d(331));var o=Ke;if(Ke|=4,o0(r.current),r0(r,r.current,i,l),Ke=o,mn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Pt,r)}catch{}return!0}finally{b.p=n,A.T=s,A0(e,t)}}function E0(e,t,l){t=aa(l,t),t=cc(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(Me(e,2),ja(e))}function et(e,t,l){if(e.tag===3)E0(e,e,l);else for(;t!==null;){if(t.tag===3){E0(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(nl===null||!nl.has(s))){e=aa(l,e),l=_u(2),s=Fa(t,l,2),s!==null&&(Tu(l,s,t,e),Me(s,2),ja(s));break}}t=t.return}}function Oc(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new Lf;var n=new Set;s.set(t,n)}else n=s.get(t),n===void 0&&(n=new Set,s.set(t,n));n.has(l)||(Sc=!0,n.add(l),e=Qf.bind(null,e,t,l),t.then(e,e))}function Qf(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,nt===e&&(qe&l)===l&&(xt===4||xt===3&&(qe&62914560)===qe&&300>Xe()-br?(Ke&2)===0&&ys(e,0):Cc|=l,gs===qe&&(gs=0)),ja(e)}function _0(e,t){t===0&&(t=dt()),e=Sl(e,t),e!==null&&(Me(e,t),ja(e))}function Vf(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),_0(e,l)}function Zf(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(d(314))}s!==null&&s.delete(t),_0(e,l)}function Xf(e,t){return D(e,t)}var wr=null,js=null,Dc=!1,kr=!1,Hc=!1,cl=0;function ja(e){e!==js&&e.next===null&&(js===null?wr=js=e:js=js.next=e),kr=!0,Dc||(Dc=!0,Jf())}function mn(e,t){if(!Hc&&kr){Hc=!0;do for(var l=!1,s=wr;s!==null;){if(e!==0){var n=s.pendingLanes;if(n===0)var r=0;else{var i=s.suspendedLanes,o=s.pingedLanes;r=(1<<31-St(42|e)+1)-1,r&=n&~(i&~o),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(l=!0,D0(s,r))}else r=qe,r=we(s,s===nt?r:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(r&3)===0||Ye(s,r)||(l=!0,D0(s,r));s=s.next}while(l);Hc=!1}}function Kf(){T0()}function T0(){kr=Dc=!1;var e=0;cl!==0&&nh()&&(e=cl);for(var t=Xe(),l=null,s=wr;s!==null;){var n=s.next,r=z0(s,t);r===0?(s.next=null,l===null?wr=n:l.next=n,n===null&&(js=l)):(l=s,(e!==0||(r&3)!==0)&&(kr=!0)),s=n}yt!==0&&yt!==5||mn(e),cl!==0&&(cl=0)}function z0(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var i=31-St(r),o=1<<i,x=n[i];x===-1?((o&l)===0||(o&s)!==0)&&(n[i]=Pe(o,t)):x<=t&&(e.expiredLanes|=o),r&=~o}if(t=nt,l=qe,l=we(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&he(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ye(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(s!==null&&he(s),Ir(l)){case 2:case 8:l=Qa;break;case 32:l=ga;break;case 268435456:l=ka;break;default:l=ga}return s=O0.bind(null,e),l=D(l,s),e.callbackPriority=t,e.callbackNode=l,t}return s!==null&&s!==null&&he(s),e.callbackPriority=2,e.callbackNode=null,2}function O0(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Nr()&&e.callbackNode!==l)return null;var s=qe;return s=we(e,e===nt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(f0(e,s,t),z0(e,Xe()),e.callbackNode!=null&&e.callbackNode===l?O0.bind(null,e):null)}function D0(e,t){if(Nr())return null;f0(e,t,!0)}function Jf(){ih(function(){(Ke&6)!==0?D(Qe,Kf):T0()})}function Uc(){if(cl===0){var e=rs;e===0&&(e=da,da<<=1,(da&261888)===0&&(da=256)),cl=e}return cl}function H0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zn(""+e)}function U0(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 If(e,t,l,s,n){if(t==="submit"&&l&&l.stateNode===n){var r=H0((n[Ht]||null).action),i=s.submitter;i&&(t=(t=i[Ht]||null)?H0(t.formAction):i.getAttribute("formAction"),t!==null&&(r=t,i=null));var o=new Un("action","action",null,s,n);e.push({event:o,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(cl!==0){var x=i?U0(n,i):new FormData(n);ac(l,{pending:!0,data:x,method:n.method,action:r},null,x)}}else typeof r=="function"&&(o.preventDefault(),x=i?U0(n,i):new FormData(n),ac(l,{pending:!0,data:x,method:n.method,action:r},r,x))},currentTarget:n}]})}}for(var Rc=0;Rc<yi.length;Rc++){var Bc=yi[Rc],Wf=Bc.toLowerCase(),Pf=Bc[0].toUpperCase()+Bc.slice(1);xa(Wf,"on"+Pf)}xa(md,"onAnimationEnd"),xa(fd,"onAnimationIteration"),xa(hd,"onAnimationStart"),xa("dblclick","onDoubleClick"),xa("focusin","onFocus"),xa("focusout","onBlur"),xa(ff,"onTransitionRun"),xa(hf,"onTransitionStart"),xa(bf,"onTransitionCancel"),xa(bd,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fn="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(" "),Ff=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fn));function R0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],n=s.event;s=s.listeners;e:{var r=void 0;if(t)for(var i=s.length-1;0<=i;i--){var o=s[i],x=o.instance,w=o.currentTarget;if(o=o.listener,x!==r&&n.isPropagationStopped())break e;r=o,n.currentTarget=w;try{r(n)}catch(O){Ln(O)}n.currentTarget=null,r=x}else for(i=0;i<s.length;i++){if(o=s[i],x=o.instance,w=o.currentTarget,o=o.listener,x!==r&&n.isPropagationStopped())break e;r=o,n.currentTarget=w;try{r(n)}catch(O){Ln(O)}n.currentTarget=null,r=x}}}}function Le(e,t){var l=t[Wr];l===void 0&&(l=t[Wr]=new Set);var s=e+"__bubble";l.has(s)||(B0(t,e,2,!1),l.add(s))}function Lc(e,t,l){var s=0;t&&(s|=4),B0(l,e,s,t)}var Sr="_reactListening"+Math.random().toString(36).slice(2);function qc(e){if(!e[Sr]){e[Sr]=!0,To.forEach(function(l){l!=="selectionchange"&&(Ff.has(l)||Lc(l,!1,e),Lc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sr]||(t[Sr]=!0,Lc("selectionchange",!1,t))}}function B0(e,t,l,s){switch(mx(t)){case 2:var n=Ah;break;case 8:n=Mh;break;default:n=to}l=n.bind(null,t,l,e),n=void 0,!ri||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),s?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 $c(e,t,l,s,n){var r=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var i=s.tag;if(i===3||i===4){var o=s.stateNode.containerInfo;if(o===n)break;if(i===4)for(i=s.return;i!==null;){var x=i.tag;if((x===3||x===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;o!==null;){if(i=Yl(o),i===null)return;if(x=i.tag,x===5||x===6||x===26||x===27){s=r=i;continue e}o=o.parentNode}}s=s.return}Yo(function(){var w=r,O=si(l),B=[];e:{var C=gd.get(e);if(C!==void 0){var E=Un,pe=e;switch(e){case"keypress":if(Dn(l)===0)break e;case"keydown":case"keyup":E=Vm;break;case"focusin":pe="focus",E=di;break;case"focusout":pe="blur",E=di;break;case"beforeblur":case"afterblur":E=di;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":E=Zo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=Om;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Km;break;case md:case fd:case hd:E=Um;break;case bd:E=Im;break;case"scroll":case"scrollend":E=Tm;break;case"wheel":E=Pm;break;case"copy":case"cut":case"paste":E=Bm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=Ko;break;case"toggle":case"beforetoggle":E=ef}var Ae=(t&4)!==0,st=!Ae&&(e==="scroll"||e==="scrollend"),j=Ae?C!==null?C+"Capture":null:C;Ae=[];for(var f=w,N;f!==null;){var H=f;if(N=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||N===null||j===null||(H=Hs(f,j),H!=null&&Ae.push(hn(f,H,N))),st)break;f=f.return}0<Ae.length&&(C=new E(C,pe,null,l,O),B.push({event:C,listeners:Ae}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",E=e==="mouseout"||e==="pointerout",C&&l!==li&&(pe=l.relatedTarget||l.fromElement)&&(Yl(pe)||pe[Gl]))break e;if((E||C)&&(C=O.window===O?O:(C=O.ownerDocument)?C.defaultView||C.parentWindow:window,E?(pe=l.relatedTarget||l.toElement,E=w,pe=pe?Yl(pe):null,pe!==null&&(st=M(pe),Ae=pe.tag,pe!==st||Ae!==5&&Ae!==27&&Ae!==6)&&(pe=null)):(E=null,pe=w),E!==pe)){if(Ae=Zo,H="onMouseLeave",j="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Ko,H="onPointerLeave",j="onPointerEnter",f="pointer"),st=E==null?C:Ds(E),N=pe==null?C:Ds(pe),C=new Ae(H,f+"leave",E,l,O),C.target=st,C.relatedTarget=N,H=null,Yl(O)===w&&(Ae=new Ae(j,f+"enter",pe,l,O),Ae.target=N,Ae.relatedTarget=st,H=Ae),st=H,E&&pe)t:{for(Ae=eh,j=E,f=pe,N=0,H=j;H;H=Ae(H))N++;H=0;for(var Ce=f;Ce;Ce=Ae(Ce))H++;for(;0<N-H;)j=Ae(j),N--;for(;0<H-N;)f=Ae(f),H--;for(;N--;){if(j===f||f!==null&&j===f.alternate){Ae=j;break t}j=Ae(j),f=Ae(f)}Ae=null}else Ae=null;E!==null&&L0(B,C,E,Ae,!1),pe!==null&&st!==null&&L0(B,st,pe,Ae,!0)}}e:{if(C=w?Ds(w):window,E=C.nodeName&&C.nodeName.toLowerCase(),E==="select"||E==="input"&&C.type==="file")var Ve=ad;else if(ed(C))if(ld)Ve=uf;else{Ve=of;var je=cf}else E=C.nodeName,!E||E.toLowerCase()!=="input"||C.type!=="checkbox"&&C.type!=="radio"?w&&ai(w.elementType)&&(Ve=ad):Ve=df;if(Ve&&(Ve=Ve(e,w))){td(B,Ve,l,O);break e}je&&je(e,C,w),e==="focusout"&&w&&C.type==="number"&&w.memoizedProps.value!=null&&ti(C,"number",C.value)}switch(je=w?Ds(w):window,e){case"focusin":(ed(je)||je.contentEditable==="true")&&(Pl=je,bi=w,Ys=null);break;case"focusout":Ys=bi=Pl=null;break;case"mousedown":gi=!0;break;case"contextmenu":case"mouseup":case"dragend":gi=!1,ud(B,l,O);break;case"selectionchange":if(mf)break;case"keydown":case"keyup":ud(B,l,O)}var De;if(xi)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else Wl?Po(e,l)&&($e="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&($e="onCompositionStart");$e&&(Jo&&l.locale!=="ko"&&(Wl||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Wl&&(De=Qo()):(Za=O,ii="value"in Za?Za.value:Za.textContent,Wl=!0)),je=Cr(w,$e),0<je.length&&($e=new Xo($e,e,null,l,O),B.push({event:$e,listeners:je}),De?$e.data=De:(De=Fo(l),De!==null&&($e.data=De)))),(De=af?lf(e,l):sf(e,l))&&($e=Cr(w,"onBeforeInput"),0<$e.length&&(je=new Xo("onBeforeInput","beforeinput",null,l,O),B.push({event:je,listeners:$e}),je.data=De)),If(B,e,w,l,O)}R0(B,t)})}function hn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Cr(e,t){for(var l=t+"Capture",s=[];e!==null;){var n=e,r=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||r===null||(n=Hs(e,l),n!=null&&s.unshift(hn(e,n,r)),n=Hs(e,t),n!=null&&s.push(hn(e,n,r))),e.tag===3)return s;e=e.return}return[]}function eh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function L0(e,t,l,s,n){for(var r=t._reactName,i=[];l!==null&&l!==s;){var o=l,x=o.alternate,w=o.stateNode;if(o=o.tag,x!==null&&x===s)break;o!==5&&o!==26&&o!==27||w===null||(x=w,n?(w=Hs(l,r),w!=null&&i.unshift(hn(l,w,x))):n||(w=Hs(l,r),w!=null&&i.push(hn(l,w,x)))),l=l.return}i.length!==0&&e.push({event:t,listeners:i})}var th=/\r\n?/g,ah=/\u0000|\uFFFD/g;function q0(e){return(typeof e=="string"?e:""+e).replace(th,`
`).replace(ah,"")}function $0(e,t){return t=q0(t),q0(e)===t}function lt(e,t,l,s,n,r){switch(l){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Kl(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Kl(e,""+s);break;case"className":_n(e,"class",s);break;case"tabIndex":_n(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":_n(e,l,s);break;case"style":$o(e,s,r);break;case"data":if(t!=="object"){_n(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=zn(""+s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="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 r=="function"&&(l==="formAction"?(t!=="input"&&lt(e,t,"name",n.name,n,null),lt(e,t,"formEncType",n.formEncType,n,null),lt(e,t,"formMethod",n.formMethod,n,null),lt(e,t,"formTarget",n.formTarget,n,null)):(lt(e,t,"encType",n.encType,n,null),lt(e,t,"method",n.method,n,null),lt(e,t,"target",n.target,n,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=zn(""+s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=Aa);break;case"onScroll":s!=null&&Le("scroll",e);break;case"onScrollEnd":s!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(d(61));if(l=s.__html,l!=null){if(n.children!=null)throw Error(d(60));e.innerHTML=l}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=zn(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":Le("beforetoggle",e),Le("toggle",e),En(e,"popover",s);break;case"xlinkActuate":Ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ca(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ca(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ca(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ca(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":En(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Em.get(l)||l,En(e,l,s))}}function Gc(e,t,l,s,n,r){switch(l){case"style":$o(e,s,r);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(d(61));if(l=s.__html,l!=null){if(n.children!=null)throw Error(d(60));e.innerHTML=l}}break;case"children":typeof s=="string"?Kl(e,s):(typeof s=="number"||typeof s=="bigint")&&Kl(e,""+s);break;case"onScroll":s!=null&&Le("scroll",e);break;case"onScrollEnd":s!=null&&Le("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zo.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),r=e[Ht]||null,r=r!=null?r[l]:null,typeof r=="function"&&e.removeEventListener(t,r,n),typeof s=="function")){typeof r!="function"&&r!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,s,n);break e}l in e?e[l]=s:s===!0?e.setAttribute(l,""):En(e,l,s)}}}function _t(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var s=!1,n=!1,r;for(r in l)if(l.hasOwnProperty(r)){var i=l[r];if(i!=null)switch(r){case"src":s=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:lt(e,t,r,i,l,null)}}n&&lt(e,t,"srcSet",l.srcSet,l,null),s&&lt(e,t,"src",l.src,l,null);return;case"input":Le("invalid",e);var o=r=i=n=null,x=null,w=null;for(s in l)if(l.hasOwnProperty(s)){var O=l[s];if(O!=null)switch(s){case"name":n=O;break;case"type":i=O;break;case"checked":x=O;break;case"defaultChecked":w=O;break;case"value":r=O;break;case"defaultValue":o=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:lt(e,t,s,O,l,null)}}Ro(e,r,o,x,w,i,n,!1);return;case"select":Le("invalid",e),s=i=r=null;for(n in l)if(l.hasOwnProperty(n)&&(o=l[n],o!=null))switch(n){case"value":r=o;break;case"defaultValue":i=o;break;case"multiple":s=o;default:lt(e,t,n,o,l,null)}t=r,l=i,e.multiple=!!s,t!=null?Xl(e,!!s,t,!1):l!=null&&Xl(e,!!s,l,!0);return;case"textarea":Le("invalid",e),r=n=s=null;for(i in l)if(l.hasOwnProperty(i)&&(o=l[i],o!=null))switch(i){case"value":s=o;break;case"defaultValue":n=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(d(91));break;default:lt(e,t,i,o,l,null)}Lo(e,s,n,r);return;case"option":for(x in l)if(l.hasOwnProperty(x)&&(s=l[x],s!=null))switch(x){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:lt(e,t,x,s,l,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(s=0;s<fn.length;s++)Le(fn[s],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(w in l)if(l.hasOwnProperty(w)&&(s=l[w],s!=null))switch(w){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:lt(e,t,w,s,l,null)}return;default:if(ai(t)){for(O in l)l.hasOwnProperty(O)&&(s=l[O],s!==void 0&&Gc(e,t,O,s,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(s=l[o],s!=null&&lt(e,t,o,s,l,null))}function lh(e,t,l,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,r=null,i=null,o=null,x=null,w=null,O=null;for(E in l){var B=l[E];if(l.hasOwnProperty(E)&&B!=null)switch(E){case"checked":break;case"value":break;case"defaultValue":x=B;default:s.hasOwnProperty(E)||lt(e,t,E,null,s,B)}}for(var C in s){var E=s[C];if(B=l[C],s.hasOwnProperty(C)&&(E!=null||B!=null))switch(C){case"type":r=E;break;case"name":n=E;break;case"checked":w=E;break;case"defaultChecked":O=E;break;case"value":i=E;break;case"defaultValue":o=E;break;case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(d(137,t));break;default:E!==B&&lt(e,t,C,E,s,B)}}ei(e,i,o,x,w,O,r,n);return;case"select":E=i=o=C=null;for(r in l)if(x=l[r],l.hasOwnProperty(r)&&x!=null)switch(r){case"value":break;case"multiple":E=x;default:s.hasOwnProperty(r)||lt(e,t,r,null,s,x)}for(n in s)if(r=s[n],x=l[n],s.hasOwnProperty(n)&&(r!=null||x!=null))switch(n){case"value":C=r;break;case"defaultValue":o=r;break;case"multiple":i=r;default:r!==x&&lt(e,t,n,r,s,x)}t=o,l=i,s=E,C!=null?Xl(e,!!l,C,!1):!!s!=!!l&&(t!=null?Xl(e,!!l,t,!0):Xl(e,!!l,l?[]:"",!1));return;case"textarea":E=C=null;for(o in l)if(n=l[o],l.hasOwnProperty(o)&&n!=null&&!s.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:lt(e,t,o,null,s,n)}for(i in s)if(n=s[i],r=l[i],s.hasOwnProperty(i)&&(n!=null||r!=null))switch(i){case"value":C=n;break;case"defaultValue":E=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(d(91));break;default:n!==r&&lt(e,t,i,n,s,r)}Bo(e,C,E);return;case"option":for(var pe in l)if(C=l[pe],l.hasOwnProperty(pe)&&C!=null&&!s.hasOwnProperty(pe))switch(pe){case"selected":e.selected=!1;break;default:lt(e,t,pe,null,s,C)}for(x in s)if(C=s[x],E=l[x],s.hasOwnProperty(x)&&C!==E&&(C!=null||E!=null))switch(x){case"selected":e.selected=C&&typeof C!="function"&&typeof C!="symbol";break;default:lt(e,t,x,C,s,E)}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 Ae in l)C=l[Ae],l.hasOwnProperty(Ae)&&C!=null&&!s.hasOwnProperty(Ae)&&lt(e,t,Ae,null,s,C);for(w in s)if(C=s[w],E=l[w],s.hasOwnProperty(w)&&C!==E&&(C!=null||E!=null))switch(w){case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(d(137,t));break;default:lt(e,t,w,C,s,E)}return;default:if(ai(t)){for(var st in l)C=l[st],l.hasOwnProperty(st)&&C!==void 0&&!s.hasOwnProperty(st)&&Gc(e,t,st,void 0,s,C);for(O in s)C=s[O],E=l[O],!s.hasOwnProperty(O)||C===E||C===void 0&&E===void 0||Gc(e,t,O,C,s,E);return}}for(var j in l)C=l[j],l.hasOwnProperty(j)&&C!=null&&!s.hasOwnProperty(j)&&lt(e,t,j,null,s,C);for(B in s)C=s[B],E=l[B],!s.hasOwnProperty(B)||C===E||C==null&&E==null||lt(e,t,B,C,s,E)}function G0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sh(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var n=l[s],r=n.transferSize,i=n.initiatorType,o=n.duration;if(r&&o&&G0(i)){for(i=0,o=n.responseEnd,s+=1;s<l.length;s++){var x=l[s],w=x.startTime;if(w>o)break;var O=x.transferSize,B=x.initiatorType;O&&G0(B)&&(x=x.responseEnd,i+=O*(x<o?1:(o-w)/(x-w)))}if(--s,t+=8*(r+i)/(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 Yc=null,Qc=null;function Ar(e){return e.nodeType===9?e:e.ownerDocument}function Y0(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 Q0(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 Vc(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 Zc=null;function nh(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var V0=typeof setTimeout=="function"?setTimeout:void 0,rh=typeof clearTimeout=="function"?clearTimeout:void 0,Z0=typeof Promise=="function"?Promise:void 0,ih=typeof queueMicrotask=="function"?queueMicrotask:typeof Z0<"u"?function(e){return Z0.resolve(null).then(e).catch(ch)}:V0;function ch(e){setTimeout(function(){throw e})}function ol(e){return e==="head"}function X0(e,t){var l=t,s=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(n),Ss(t);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")bn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,bn(l);for(var r=l.firstChild;r;){var i=r.nextSibling,o=r.nodeName;r[Os]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&r.rel.toLowerCase()==="stylesheet"||l.removeChild(r),r=i}}else l==="body"&&bn(e.ownerDocument.body);l=n}while(l);Ss(t)}function K0(e,t){var l=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function Xc(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":Xc(l),Pr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function oh(e,t,l,s){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Os])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==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(r=e.getAttribute("src"),(r!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=ia(e.nextSibling),e===null)break}return null}function dh(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ia(e.nextSibling),e===null))return null;return e}function J0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ia(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Jc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function uh(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var s=function(){t(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function ia(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 Ic=null;function I0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ia(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function W0(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 P0(e,t,l){switch(t=Ar(l),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function bn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pr(e)}var ca=new Map,F0=new Set;function Mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ya=b.d;b.d={f:xh,r:mh,D:fh,C:hh,L:bh,m:gh,X:yh,S:ph,M:vh};function xh(){var e=Ya.f(),t=yr();return e||t}function mh(e){var t=Ql(e);t!==null&&t.tag===5&&t.type==="form"?bu(t):Ya.r(e)}var Ns=typeof document>"u"?null:document;function ex(e,t,l){var s=Ns;if(s&&typeof t=="string"&&t){var n=ea(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),F0.has(n)||(F0.add(n),e={rel:e,crossOrigin:l,href:t},s.querySelector(n)===null&&(t=s.createElement("link"),_t(t,"link",e),jt(t),s.head.appendChild(t)))}}function fh(e){Ya.D(e),ex("dns-prefetch",e,null)}function hh(e,t){Ya.C(e,t),ex("preconnect",e,t)}function bh(e,t,l){Ya.L(e,t,l);var s=Ns;if(s&&e&&t){var n='link[rel="preload"][as="'+ea(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+ea(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+ea(l.imageSizes)+'"]')):n+='[href="'+ea(e)+'"]';var r=n;switch(t){case"style":r=ws(e);break;case"script":r=ks(e)}ca.has(r)||(e=Q({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),ca.set(r,e),s.querySelector(n)!==null||t==="style"&&s.querySelector(gn(r))||t==="script"&&s.querySelector(pn(r))||(t=s.createElement("link"),_t(t,"link",e),jt(t),s.head.appendChild(t)))}}function gh(e,t){Ya.m(e,t);var l=Ns;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+ea(s)+'"][href="'+ea(e)+'"]',r=n;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=ks(e)}if(!ca.has(r)&&(e=Q({rel:"modulepreload",href:e},t),ca.set(r,e),l.querySelector(n)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pn(r)))return}s=l.createElement("link"),_t(s,"link",e),jt(s),l.head.appendChild(s)}}}function ph(e,t,l){Ya.S(e,t,l);var s=Ns;if(s&&e){var n=Vl(s).hoistableStyles,r=ws(e);t=t||"default";var i=n.get(r);if(!i){var o={loading:0,preload:null};if(i=s.querySelector(gn(r)))o.loading=5;else{e=Q({rel:"stylesheet",href:e,"data-precedence":t},l),(l=ca.get(r))&&Wc(e,l);var x=i=s.createElement("link");jt(x),_t(x,"link",e),x._p=new Promise(function(w,O){x.onload=w,x.onerror=O}),x.addEventListener("load",function(){o.loading|=1}),x.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Er(i,t,s)}i={type:"stylesheet",instance:i,count:1,state:o},n.set(r,i)}}}function yh(e,t){Ya.X(e,t);var l=Ns;if(l&&e){var s=Vl(l).hoistableScripts,n=ks(e),r=s.get(n);r||(r=l.querySelector(pn(n)),r||(e=Q({src:e,async:!0},t),(t=ca.get(n))&&Pc(e,t),r=l.createElement("script"),jt(r),_t(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},s.set(n,r))}}function vh(e,t){Ya.M(e,t);var l=Ns;if(l&&e){var s=Vl(l).hoistableScripts,n=ks(e),r=s.get(n);r||(r=l.querySelector(pn(n)),r||(e=Q({src:e,async:!0,type:"module"},t),(t=ca.get(n))&&Pc(e,t),r=l.createElement("script"),jt(r),_t(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},s.set(n,r))}}function tx(e,t,l,s){var n=(n=ge.current)?Mr(n):null;if(!n)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ws(l.href),l=Vl(n).hoistableStyles,s=l.get(t),s||(s={type:"style",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ws(l.href);var r=Vl(n).hoistableStyles,i=r.get(e);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,i),(r=n.querySelector(gn(e)))&&!r._p&&(i.instance=r,i.state.loading=5),ca.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},ca.set(e,l),r||jh(n,e,l,i.state))),t&&s===null)throw Error(d(528,""));return i}if(t&&s!==null)throw Error(d(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ks(l),l=Vl(n).hoistableScripts,s=l.get(t),s||(s={type:"script",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function ws(e){return'href="'+ea(e)+'"'}function gn(e){return'link[rel="stylesheet"]['+e+"]"}function ax(e){return Q({},e,{"data-precedence":e.precedence,precedence:null})}function jh(e,t,l,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),_t(t,"link",l),jt(t),e.head.appendChild(t))}function ks(e){return'[src="'+ea(e)+'"]'}function pn(e){return"script[async]"+e}function lx(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+ea(l.href)+'"]');if(s)return t.instance=s,jt(s),s;var n=Q({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),jt(s),_t(s,"style",n),Er(s,l.precedence,e),t.instance=s;case"stylesheet":n=ws(l.href);var r=e.querySelector(gn(n));if(r)return t.state.loading|=4,t.instance=r,jt(r),r;s=ax(l),(n=ca.get(n))&&Wc(s,n),r=(e.ownerDocument||e).createElement("link"),jt(r);var i=r;return i._p=new Promise(function(o,x){i.onload=o,i.onerror=x}),_t(r,"link",s),t.state.loading|=4,Er(r,l.precedence,e),t.instance=r;case"script":return r=ks(l.src),(n=e.querySelector(pn(r)))?(t.instance=n,jt(n),n):(s=l,(n=ca.get(r))&&(s=Q({},l),Pc(s,n)),e=e.ownerDocument||e,n=e.createElement("script"),jt(n),_t(n,"link",s),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Er(s,l.precedence,e));return t.instance}function Er(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=s.length?s[s.length-1]:null,r=n,i=0;i<s.length;i++){var o=s[i];if(o.dataset.precedence===t)r=o;else if(r!==n)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _r=null;function sx(e,t,l){if(_r===null){var s=new Map,n=_r=new Map;n.set(l,s)}else n=_r,s=n.get(l),s||(s=new Map,n.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var r=l[n];if(!(r[Os]||r[Ct]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var i=r.getAttribute(t)||"";i=e+i;var o=s.get(i);o?o.push(r):s.set(i,[r])}}return s}function nx(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Nh(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 rx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function wh(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=ws(s.href),r=t.querySelector(gn(n));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Tr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=r,jt(r);return}r=t.ownerDocument||t,s=ax(s),(n=ca.get(n))&&Wc(s,n),r=r.createElement("link"),jt(r);var i=r;i._p=new Promise(function(o,x){i.onload=o,i.onerror=x}),_t(r,"link",s),l.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Tr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Fc=0;function kh(e,t){return e.stylesheets&&e.count===0&&Or(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&Or(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*sh());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Or(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(n)}}:null}function Tr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Or(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zr=null;function Or(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zr=new Map,t.forEach(Sh,e),zr=null,Tr.call(e))}function Sh(e,t){if(!(t.state.loading&4)){var l=zr.get(e);if(l)var s=l.get(null);else{l=new Map,zr.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<n.length;r++){var i=n[r];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),s=i)}s&&l.set(null,s)}n=t.instance,i=n.getAttribute("data-precedence"),r=l.get(i)||s,r===s&&l.set(null,n),l.set(i,n),this.count++,s=Tr.bind(this),n.addEventListener("load",s),n.addEventListener("error",s),r?r.parentNode.insertBefore(n,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var yn={$$typeof:L,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function Ch(e,t,l,s,n,r,i,o,x){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=_(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_(0),this.hiddenUpdates=_(null),this.identifierPrefix=s,this.onUncaughtError=n,this.onCaughtError=r,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function ix(e,t,l,s,n,r,i,o,x,w,O,B){return e=new Ch(e,t,l,i,x,w,O,B,o),t=1,r===!0&&(t|=24),r=Zt(3,null,null,t),e.current=r,r.stateNode=e,t=zi(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:s,isDehydrated:l,cache:t},Ui(r),e}function cx(e){return e?(e=ts,e):ts}function ox(e,t,l,s,n,r){n=cx(n),s.context===null?s.context=n:s.pendingContext=n,s=Pa(t),s.payload={element:l},r=r===void 0?null:r,r!==null&&(s.callback=r),l=Fa(e,s,t),l!==null&&($t(l,e,t),Is(l,e,t))}function dx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function eo(e,t){dx(e,t),(e=e.alternate)&&dx(e,t)}function ux(e){if(e.tag===13||e.tag===31){var t=Sl(e,67108864);t!==null&&$t(t,e,67108864),eo(e,67108864)}}function xx(e){if(e.tag===13||e.tag===31){var t=Wt();t=ua(t);var l=Sl(e,t);l!==null&&$t(l,e,t),eo(e,t)}}var Dr=!0;function Ah(e,t,l,s){var n=A.T;A.T=null;var r=b.p;try{b.p=2,to(e,t,l,s)}finally{b.p=r,A.T=n}}function Mh(e,t,l,s){var n=A.T;A.T=null;var r=b.p;try{b.p=8,to(e,t,l,s)}finally{b.p=r,A.T=n}}function to(e,t,l,s){if(Dr){var n=ao(s);if(n===null)$c(e,t,s,Hr,l),fx(e,s);else if(_h(n,e,t,l,s))s.stopPropagation();else if(fx(e,s),t&4&&-1<Eh.indexOf(e)){for(;n!==null;){var r=Ql(n);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var i=ne(r.pendingLanes);if(i!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var x=1<<31-St(i);o.entanglements[1]|=x,i&=~x}ja(r),(Ke&6)===0&&(gr=Xe()+500,mn(0))}}break;case 31:case 13:o=Sl(r,2),o!==null&&$t(o,r,2),yr(),eo(r,2)}if(r=ao(s),r===null&&$c(e,t,s,Hr,l),r===n)break;n=r}n!==null&&s.stopPropagation()}else $c(e,t,s,null,l)}}function ao(e){return e=si(e),lo(e)}var Hr=null;function lo(e){if(Hr=null,e=Yl(e),e!==null){var t=M(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=V(t),e!==null)return e;e=null}else if(l===31){if(e=q(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 Hr=e,null}function mx(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(Ot()){case Qe:return 2;case Qa:return 8;case ga:case Ts:return 32;case ka:return 268435456;default:return 32}default:return 32}}var so=!1,dl=null,ul=null,xl=null,vn=new Map,jn=new Map,ml=[],Eh="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 fx(e,t){switch(e){case"focusin":case"focusout":dl=null;break;case"dragenter":case"dragleave":ul=null;break;case"mouseover":case"mouseout":xl=null;break;case"pointerover":case"pointerout":vn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jn.delete(t.pointerId)}}function Nn(e,t,l,s,n,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:l,eventSystemFlags:s,nativeEvent:r,targetContainers:[n]},t!==null&&(t=Ql(t),t!==null&&ux(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function _h(e,t,l,s,n){switch(t){case"focusin":return dl=Nn(dl,e,t,l,s,n),!0;case"dragenter":return ul=Nn(ul,e,t,l,s,n),!0;case"mouseover":return xl=Nn(xl,e,t,l,s,n),!0;case"pointerover":var r=n.pointerId;return vn.set(r,Nn(vn.get(r)||null,e,t,l,s,n)),!0;case"gotpointercapture":return r=n.pointerId,jn.set(r,Nn(jn.get(r)||null,e,t,l,s,n)),!0}return!1}function hx(e){var t=Yl(e.target);if(t!==null){var l=M(t);if(l!==null){if(t=l.tag,t===13){if(t=V(l),t!==null){e.blockedOn=t,Eo(e.priority,function(){xx(l)});return}}else if(t===31){if(t=q(l),t!==null){e.blockedOn=t,Eo(e.priority,function(){xx(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 Ur(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=ao(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);li=s,l.target.dispatchEvent(s),li=null}else return t=Ql(l),t!==null&&ux(t),e.blockedOn=l,!1;t.shift()}return!0}function bx(e,t,l){Ur(e)&&l.delete(t)}function Th(){so=!1,dl!==null&&Ur(dl)&&(dl=null),ul!==null&&Ur(ul)&&(ul=null),xl!==null&&Ur(xl)&&(xl=null),vn.forEach(bx),jn.forEach(bx)}function Rr(e,t){e.blockedOn===t&&(e.blockedOn=null,so||(so=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,Th)))}var Br=null;function gx(e){Br!==e&&(Br=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){Br===e&&(Br=null);for(var t=0;t<e.length;t+=3){var l=e[t],s=e[t+1],n=e[t+2];if(typeof s!="function"){if(lo(s||l)===null)continue;break}var r=Ql(l);r!==null&&(e.splice(t,3),t-=3,ac(r,{pending:!0,data:n,method:l.method,action:s},s,n))}}))}function Ss(e){function t(x){return Rr(x,e)}dl!==null&&Rr(dl,e),ul!==null&&Rr(ul,e),xl!==null&&Rr(xl,e),vn.forEach(t),jn.forEach(t);for(var l=0;l<ml.length;l++){var s=ml[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ml.length&&(l=ml[0],l.blockedOn===null);)hx(l),l.blockedOn===null&&ml.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var n=l[s],r=l[s+1],i=n[Ht]||null;if(typeof r=="function")i||gx(l);else if(i){var o=null;if(r&&r.hasAttribute("formAction")){if(n=r,i=r[Ht]||null)o=i.formAction;else if(lo(n)!==null)continue}else o=i.action;typeof o=="function"?l[s+1]=o:(l.splice(s,3),s-=3),gx(l)}}}function px(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function no(e){this._internalRoot=e}Lr.prototype.render=no.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var l=t.current,s=Wt();ox(l,s,e,t,null,null)},Lr.prototype.unmount=no.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ox(e.current,2,null,e,null,null),yr(),t[Gl]=null}};function Lr(e){this._internalRoot=e}Lr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mo();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ml.length&&t!==0&&t<ml[l].priority;l++);ml.splice(l,0,e),l===0&&hx(e)}};var yx=h.version;if(yx!=="19.2.8")throw Error(d(527,yx,"19.2.8"));b.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(t),e=e!==null?R(e):null,e=e===null?null:e.stateNode,e};var zh={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qr.isDisabled&&qr.supportsFiber)try{Pt=qr.inject(zh),vt=qr}catch{}}return kn.createRoot=function(e,t){if(!z(e))throw Error(d(299));var l=!1,s="",n=Cu,r=Au,i=Mu;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=ix(e,1,!1,null,null,l,s,null,n,r,i,px),e[Gl]=t.current,qc(e),new no(t)},kn.hydrateRoot=function(e,t,l){if(!z(e))throw Error(d(299));var s=!1,n="",r=Cu,i=Au,o=Mu,x=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(r=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(x=l.formState)),t=ix(e,1,!0,t,l??null,s,n,x,r,i,o,px),t.context=cx(null),l=t.current,s=Wt(),s=ua(s),n=Pa(s),n.callback=null,Fa(l,n,s),l=s,t.current.lanes=l,Me(t,l),ja(t),e[Gl]=t.current,qc(e),new Lr(t)},kn.version="19.2.8",kn}var Ex;function Yh(){if(Ex)return co.exports;Ex=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(h){console.error(h)}}return c(),co.exports=Gh(),co.exports}var Qh=Yh();/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vh=c=>c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zh=c=>c.replace(/^([A-Z])|[\s-_]+(\w)/g,(h,S,d)=>d?d.toUpperCase():S.toLowerCase()),_x=c=>{const h=Zh(c);return h.charAt(0).toUpperCase()+h.slice(1)},am=(...c)=>c.filter((h,S,d)=>!!h&&h.trim()!==""&&d.indexOf(h)===S).join(" ").trim(),Xh=c=>{for(const h in c)if(h.startsWith("aria-")||h==="role"||h==="title")return!0};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Kh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jh=m.forwardRef(({color:c="currentColor",size:h=24,strokeWidth:S=2,absoluteStrokeWidth:d,className:z="",children:M,iconNode:V,...q},k)=>m.createElement("svg",{ref:k,...Kh,width:h,height:h,stroke:c,strokeWidth:d?Number(S)*24/Number(h):S,className:am("lucide",z),...!M&&!Xh(q)&&{"aria-hidden":"true"},...q},[...V.map(([g,R])=>m.createElement(g,R)),...Array.isArray(M)?M:[M]]));/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z=(c,h)=>{const S=m.forwardRef(({className:d,...z},M)=>m.createElement(Jh,{ref:M,iconNode:h,className:am(`lucide-${Vh(_x(c))}`,`lucide-${c}`,d),...z}));return S.displayName=_x(c),S};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ih=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Gr=Z("archive",Ih);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wh=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Es=Z("arrow-left",Wh);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ph=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],An=Z("arrow-right",Ph);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fh=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],lm=Z("bold",Fh);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eb=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],tb=Z("bookmark",eb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ab=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],lb=Z("bot",ab);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sb=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],ho=Z("calendar",sb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nb=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],rb=Z("chart-column",nb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ib=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tt=Z("check",ib);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ha=Z("chevron-down",cb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ob=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Yr=Z("chevron-left",ob);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const db=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gt=Z("chevron-right",db);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ub=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Tx=Z("chevron-up",ub);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gl=Z("circle-check",xb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fb=Z("circle-question-mark",mb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hb=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Mn=Z("clock",hb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bb=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Sn=Z("cloud",bb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gb=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],bo=Z("copy",gb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pb=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],ko=Z("credit-card",pb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yb=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],sm=Z("crown",yb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],zx=Z("database",vb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jb=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],Nb=Z("dollar-sign",jb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wb=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],go=Z("download",wb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kb=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Qr=Z("ellipsis-vertical",kb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sb=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ox=Z("external-link",Sb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Dx=Z("eye",Cb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ab=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],Mb=Z("file-check",Ab);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eb=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],_b=Z("file-code-2",Eb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tb=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Hx=Z("file-spreadsheet",Tb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zb=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],wa=Z("file-text",zb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ob=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Db=Z("folder-plus",Ob);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hb=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ux=Z("folder",Hb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ub=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],po=Z("globe",Ub);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],nm=Z("grid-3x3",Rb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bb=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Vr=Z("hard-drive",Bb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],rm=Z("image",Lb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qb=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],$b=Z("inbox",qb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yb=Z("info",Gb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qb=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],im=Z("italic",Qb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vb=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Zb=Z("key",Vb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xb=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],So=Z("layers",Xb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kb=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Jb=Z("link-2",Kb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ib=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Wb=Z("link",Ib);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pb=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],cm=Z("list-ordered",Pb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fb=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Co=Z("list",Fb);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eg=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],yo=Z("loader-circle",eg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tg=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Zr=Z("lock",tg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ag=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],Rx=Z("log-in",ag);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lg=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],sg=Z("log-out",lg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ng=[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]],Bx=Z("mail-open",ng);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rg=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Ll=Z("mail",rg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ig=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],cg=Z("map-pin",ig);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const og=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Lx=Z("maximize-2",og);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dg=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],om=Z("menu",dg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ug=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],xg=Z("message-square",ug);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mg=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],fg=Z("minimize-2",mg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hg=[["path",{d:"M5 12h14",key:"1ays0h"}]],bg=Z("minus",hg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gg=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],pg=Z("moon",gg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yg=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],vg=Z("octagon-alert",yg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jg=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Ng=Z("palette",jg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wg=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Xr=Z("paperclip",wg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kg=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],dm=Z("pen",kg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sg=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],Cg=Z("pen-tool",Sg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ag=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],qx=Z("pencil",Ag);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mg=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],Eg=Z("pin-off",Mg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _g=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Tg=Z("pin",_g);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ba=Z("plus",zg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Og=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],$x=Z("printer",Og);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dg=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Hg=Z("quote",Dg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ug=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],um=Z("redo-2",Ug);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rg=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Kr=Z("refresh-cw",Rg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bg=[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]],Lg=Z("reply",Bg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qg=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$g=Z("rotate-ccw",qg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gg=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],_s=Z("search",Gg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yg=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Ao=Z("send",Yg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qg=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ql=Z("server",Qg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vg=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xm=Z("settings",Vg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zg=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],mo=Z("share-2",Zg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xg=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Jr=Z("shield-check",Xg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kg=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Gx=Z("shield",Kg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jg=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],Ig=Z("shopping-bag",Jg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wg=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],Pg=Z("sigma",Wg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fg=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],mm=Z("sliders-horizontal",Fg);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ep=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],tp=Z("smile",ep);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ap=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Tt=Z("sparkles",ap);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lp=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vo=Z("square-check-big",lp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sp=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],pl=Z("star",sp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const np=[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]],Yx=Z("sticky-note",np);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rp=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],ip=Z("strikethrough",rp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cp=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],op=Z("sun",cp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dp=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],fm=Z("tag",dp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const up=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],hm=Z("text-align-center",up);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xp=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],bm=Z("text-align-end",xp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mp=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],gm=Z("text-align-start",mp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fp=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],oa=Z("trash-2",fp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hp=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],bp=Z("trending-up",hp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gp=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],pm=Z("underline",gp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pp=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],ym=Z("undo-2",pp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yp=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],vp=Z("upload",yp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jp=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Np=Z("user-plus",jp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wp=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],As=Z("users",wp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kp=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],vm=Z("video",kp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sp=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],jo=Z("wand-sparkles",Sp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],wt=Z("x",Cp);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ap=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Bl=Z("zap",Ap),Qx=({size:c=36,className:h=""})=>{const[S,d]=m.useState(!1);return S?a.jsx("div",{className:`flex items-center justify-center rounded-xl bg-gradient-to-tr from-blue-600 via-indigo-600 to-red-500 text-white font-extrabold select-none shadow-xs shrink-0 ${h}`,style:{width:c,height:c},children:a.jsx("span",{className:"text-sm",children:"O"})}):a.jsx("img",{src:"/Omnio_Icon.png",onError:()=>d(!0),alt:"Omnio Brand Icon",style:{width:c,height:c},className:`object-contain select-none shrink-0 ${h}`})},Ms=({size:c=36,darkMode:h=!1,className:S=""})=>{const[d,z]=m.useState(!1);return d?a.jsxs("div",{className:`flex items-center space-x-2 select-none ${S}`,children:[a.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-tr from-red-500 via-amber-500 to-blue-600 text-white font-bold flex items-center justify-center text-sm shadow-xs",children:"O"}),a.jsx("span",{className:`font-bold tracking-tight text-lg ${h?"text-white":"text-gray-900"}`,children:"Omnio"})]}):a.jsx("div",{className:`flex items-center select-none ${S}`,children:a.jsx("img",{src:h?"/Omnio_Logo_White.png":"/Omnio_Logo_horizontal.png",onError:()=>z(!0),alt:"Omnio Logo",style:{height:c},className:"object-contain max-w-full"})})},Mp=({size:c=38,darkMode:h=!1,className:S=""})=>{const[d,z]=m.useState(!1);return d?a.jsxs("div",{className:`flex items-center space-x-2 select-none ${S}`,children:[a.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-tr from-red-500 via-amber-500 to-blue-600 text-white font-bold flex items-center justify-center text-sm shadow-xs",children:"O"}),a.jsxs("div",{className:"flex items-baseline space-x-1",children:[a.jsx("span",{className:`font-bold tracking-tight text-lg ${h?"text-white":"text-gray-900"}`,children:"Omnio"}),a.jsx("span",{className:"text-xs font-semibold text-blue-500",children:"mail"})]})]}):a.jsx("div",{className:`flex items-center select-none ${S}`,children:a.jsx("img",{src:"/Omnio_mail.png",onError:()=>z(!0),alt:"Omnio Mail Logo",style:{height:c,filter:h?"brightness(1.2) contrast(1.1)":"none"},className:"object-contain max-w-full"})})},Ep=({size:c=20,className:h=""})=>a.jsxs("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"currentColor",className:`shrink-0 ${h}`,children:[a.jsx("circle",{cx:"5",cy:"5",r:"2"}),a.jsx("circle",{cx:"12",cy:"5",r:"2"}),a.jsx("circle",{cx:"19",cy:"5",r:"2"}),a.jsx("circle",{cx:"5",cy:"12",r:"2"}),a.jsx("circle",{cx:"12",cy:"12",r:"2"}),a.jsx("circle",{cx:"19",cy:"12",r:"2"}),a.jsx("circle",{cx:"5",cy:"19",r:"2"}),a.jsx("circle",{cx:"12",cy:"19",r:"2"}),a.jsx("circle",{cx:"19",cy:"19",r:"2"})]}),_p=({size:c=36,className:h=""})=>a.jsx("div",{className:`flex items-center justify-center rounded-xl bg-[#D93025] text-white shadow-xs shrink-0 select-none ${h}`,style:{width:c,height:c},"aria-label":"Omnio Mail",children:a.jsxs("svg",{width:c*.55,height:c*.55,viewBox:"0 0 377.47 279",fill:"currentColor",children:[a.jsx("path",{d:"M199.65 186.73c-3.57,2.23 -7.58,3.12 -11.14,3.12 -3.57,0 -7.58,-0.89 -11.14,-3.12l-177.37 -108.3 0 143.95c0,30.75 24.96,55.71 55.71,55.71l266.06 0c30.75,0 55.71,-24.96 55.71,-55.71l0 -143.95 -177.82 108.3z"}),a.jsx("path",{d:"M321.77 0l-266.06 0c-26.3,0 -48.58,18.72 -53.93,43.67l187.18 114.09 186.73 -114.09c-5.35,-24.96 -27.63,-43.67 -53.92,-43.67z"})]})}),Tp=({size:c=36,className:h=""})=>a.jsx("div",{className:`flex items-center justify-center rounded-xl bg-[#F9AB00] text-white shadow-xs shrink-0 select-none ${h}`,style:{width:c,height:c},"aria-label":"Omnio Drive",children:a.jsxs("svg",{width:c*.55,height:c*.55,viewBox:"0 0 8031.59 7398",fill:"currentColor",children:[a.jsx("path",{d:"M7989.29 4417.35c-237.77,-190.22 -538.93,-306.47 -866.55,-306.47l-6213.95 0c-327.57,0 -628.78,116.26 -866.55,306.47l1025.1 -4121.5c42.24,-174.33 200.79,-295.9 375.17,-295.9l5141.24 0c179.7,0 332.93,121.57 375.17,295.9l1030.36 4121.5z"}),a.jsx("path",{d:"M7122.74 4586.42l-6213.95 0c-501.95,0 -908.79,406.9 -908.79,908.85l0 993.38c0,502 406.84,908.85 908.79,908.85l6213.95 0c501.95,0 908.85,-406.84 908.85,-908.85l0 -993.38c0,-501.95 -406.9,-908.85 -908.85,-908.85l0 0zm-1553.46 1638.05c0,95.11 -74.01,169.07 -169.12,169.07l-464.97 0c-95.11,0 -169.07,-73.96 -169.07,-169.07l0 -465.02c0,-95.11 73.96,-169.07 169.07,-169.07l464.97 0c95.11,0 169.12,73.96 169.12,169.07l0 465.02zm1204.69 0c0,95.11 -73.96,169.07 -169.07,169.07l-464.97 0c-95.11,0 -169.07,-73.96 -169.07,-169.07l0 -465.02c0,-95.11 73.96,-169.07 169.07,-169.07l464.97 0c95.11,0 169.07,73.96 169.07,169.07l0 465.02z"})]})}),zp=({size:c=36,className:h=""})=>a.jsx("div",{className:`flex items-center justify-center rounded-xl bg-[#1A73E8] text-white shadow-xs shrink-0 select-none ${h}`,style:{width:c,height:c},"aria-label":"Omnio Calendar",children:a.jsxs("svg",{width:c*.55,height:c*.55,viewBox:"216 -10 592 621",fill:"currentColor",children:[a.jsx("path",{d:"M354.79 0l0 0c15.78,0 28.58,12.8 28.58,28.58l0 28.58c0,15.78 -12.8,28.58 -28.58,28.58l0 0c-15.78,0 -28.58,-12.8 -28.58,-28.58l0 -28.58c0,-15.78 12.8,-28.58 28.58,-28.58z"}),a.jsx("path",{d:"M669.13 0l0 0c15.78,0 28.57,12.8 28.57,28.58l0 28.58c0,15.78 -12.8,28.58 -28.58,28.58l0 0c-15.78,0 -28.58,-12.8 -28.58,-28.58l0 -28.58c0,-15.78 12.8,-28.58 28.57,-28.58z"}),a.jsx("path",{d:"M226.2 214.32l0 328.63c0,31.56 25.59,57.15 57.15,57.15l457.22 0c31.57,0 57.15,-25.59 57.15,-57.15l0 -328.63 -571.53 0zm171.46 285.76c0,15.79 -12.79,28.58 -28.57,28.58l-28.58 0c-15.79,0 -28.58,-12.79 -28.58,-28.58l0 -28.57c0,-15.79 12.79,-28.58 28.58,-28.58l28.58 -0c15.79,0 28.57,12.79 28.57,28.58l0 28.58zm0 -157.17c0,15.79 -12.79,28.58 -28.57,28.58l-28.58 0c-15.79,0 -28.58,-12.79 -28.58,-28.58l0 -28.58c0,-15.79 12.79,-28.58 28.58,-28.58l28.58 0c15.79,0 28.57,12.79 28.57,28.58l0 28.58zm157.17 157.17c0,15.79 -12.79,28.58 -28.58,28.58l-28.58 0c-15.79,0 -28.58,-12.79 -28.58,-28.58l0 -28.57c0,-15.79 12.79,-28.58 28.58,-28.58l28.58 -0c15.79,0 28.58,12.79 28.58,28.58l0 28.58zm0 -157.17c0,15.79 -12.79,28.58 -28.58,28.58l-28.58 0c-15.79,0 -28.58,-12.79 -28.58,-28.58l0 -28.58c0,-15.79 12.79,-28.58 28.58,-28.58l28.58 0c15.79,0 28.58,12.79 28.58,28.58l0 28.58zm157.17 157.17c0,15.79 -12.79,28.58 -28.57,28.58l-28.58 0c-15.79,0 -28.58,-12.79 -28.58,-28.58l0 -28.57c0,-15.79 12.79,-28.58 28.58,-28.58l28.58 -0c15.78,0 28.57,12.79 28.57,28.58l0 28.58zm0 -157.17c0,15.79 -12.79,28.58 -28.57,28.58l-28.58 0c-15.79,0 -28.58,-12.79 -28.58,-28.58l0 -28.58c0,-15.79 12.79,-28.58 28.58,-28.58l28.58 0c15.78,0 28.57,12.79 28.57,28.58l0 28.58z"}),a.jsx("path",{d:"M797.73 185.74l0 -85.73c0,-31.57 -25.59,-57.15 -57.15,-57.15l-14.29 0 0 14.29c0,31.52 -25.63,57.15 -57.15,57.15 -31.52,0 -57.15,-25.63 -57.15,-57.15l0 -14.29 -200.04 0 0 14.29c0,31.52 -25.63,57.15 -57.15,57.15 -31.52,0 -57.15,-25.63 -57.15,-57.15l0 -14.29 -14.29 0c-31.56,0 -57.15,25.59 -57.15,57.15l0 85.73 571.53 0z"})]})}),Op=({size:c=36,className:h=""})=>a.jsx("div",{className:`flex items-center select-none ${h}`,children:a.jsx("img",{src:"/Omnio_Drive.png",alt:"Omnio Drive",style:{height:c},className:"object-contain max-w-full"})}),Dp=({size:c=36,className:h=""})=>a.jsx("div",{className:`flex items-center select-none ${h}`,children:a.jsx("img",{src:"/Omnio_calendar.png",alt:"Omnio Calendar",style:{height:c},className:"object-contain max-w-full"})}),Hp=({darkMode:c,onToggleDarkMode:h,searchFilter:S,onSearchChange:d,accounts:z,activeAccountId:M,onSelectAccount:V,onOpenConnectModal:q,onOpenPlansModal:k,onOpenProviderView:g,onOpenDriveView:R,onOpenCalendarView:Q,onOpenDocsView:W,onOpenSheetsView:I,onOpenKeepView:K,onToggleCopilot:X,isCopilotOpen:P,onToggleSidebar:be,onOpenLandingPage:ae,onOpenAdminDashboard:L,onSignOut:J,onShowToast:ce,userPlan:fe="free"})=>{const[le,ye]=m.useState(!1),[ke,ie]=m.useState(!1),[re,$]=m.useState(!1),de=z.find(ue=>ue.id===M)||z[0];return a.jsxs("header",{className:`h-16 px-4 flex items-center justify-between border-b select-none transition-colors duration-200 ${c?"bg-[#1f1f1f] border-[#333333] text-gray-100":"bg-[#f6f8fc] border-gray-200/80 text-[#1f1f1f]"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2 sm:space-x-3 shrink-0",children:[a.jsx("button",{onClick:be,className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 transition-colors cursor-pointer text-gray-600 dark:text-gray-300",title:"Toggle Main Menu",children:a.jsx(om,{className:"w-5 h-5"})}),a.jsx("div",{className:"flex items-center space-x-1.5 cursor-pointer group",onClick:()=>d({folder:"inbox",query:""}),children:a.jsx(Mp,{darkMode:c,size:34})})]}),a.jsx("div",{className:"flex-1 max-w-2xl px-1 sm:px-4 mx-1 sm:mx-2 min-w-0",children:a.jsxs("div",{className:"relative flex items-center",children:[a.jsx("div",{className:"absolute left-3 text-gray-500 dark:text-gray-400 pointer-events-none",children:a.jsx(_s,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),a.jsxs("div",{className:`w-full flex items-center rounded-full px-3 sm:px-4 py-1.5 transition-all duration-150 border ${c?"bg-[#2d2e30] border-transparent text-gray-100 focus-within:bg-[#383a3d] focus-within:ring-2 focus-within:ring-blue-500/50":"bg-[#eaf1fb] border-transparent text-gray-800 focus-within:bg-white focus-within:shadow-md focus-within:border-gray-200"}`,children:[a.jsx("input",{type:"text",value:S.query,onChange:ue=>d({query:ue.target.value}),onKeyDown:ue=>{ue.key==="Enter"&&(d({query:S.query}),ie(!1))},placeholder:"Search in mail...",className:"w-full bg-transparent pl-5 sm:pl-7 pr-1 py-1 outline-none text-xs sm:text-sm placeholder-gray-500 dark:placeholder-gray-400 truncate"}),S.query&&a.jsx("button",{onClick:()=>d({query:""}),className:"p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 dark:text-gray-400 transition-colors shrink-0 mr-1",title:"Clear search",children:a.jsx(wt,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>d({query:"Summarize today's unread emails"}),className:"hidden sm:flex ml-2 shrink-0 text-xs bg-white dark:bg-gray-800 text-blue-600 dark:text-blue-400 px-2.5 py-1 rounded-full border border-blue-200 dark:border-blue-800 font-semibold shadow-xs hover:bg-blue-50 dark:hover:bg-gray-700 transition-colors",children:"AI PROMPT"}),a.jsx("button",{onClick:()=>ie(!ke),className:"ml-1 sm:ml-2 p-1 sm:p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 dark:text-gray-400 transition-colors shrink-0",title:"Search options",children:a.jsx(mm,{className:"w-4 h-4"})})]}),ke&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-40 bg-black/10 dark:bg-black/40",onClick:()=>ie(!1)}),a.jsxs("div",{className:`absolute top-full mt-2 left-0 w-full sm:w-[520px] rounded-2xl shadow-2xl p-4 sm:p-5 z-50 border text-xs animate-in fade-in slide-in-from-top-2 ${c?"bg-[#28292c] border-gray-700 text-gray-200 shadow-black/50":"bg-white border-gray-200 text-gray-700"}`,children:[a.jsxs("div",{className:"flex justify-between items-center mb-3 pb-2 border-b border-gray-200 dark:border-gray-700 font-semibold text-sm",children:[a.jsx("span",{children:"Advanced Search Filters"}),a.jsx("button",{onClick:()=>ie(!1),className:"p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors cursor-pointer",children:"✕"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] text-gray-500 font-medium mb-1",children:"From"}),a.jsx("input",{type:"text",value:S.from||"",onChange:ue=>d({from:ue.target.value}),placeholder:"Sender name or email",className:`w-full p-2 rounded-lg border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] text-gray-500 font-medium mb-1",children:"Subject"}),a.jsx("input",{type:"text",value:S.subject||"",onChange:ue=>d({subject:ue.target.value}),placeholder:"Subject keywords",className:`w-full p-2 rounded-lg border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`})]})]}),a.jsxs("div",{className:"flex items-center space-x-4 mb-4",children:[a.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:S.hasAttachment||!1,onChange:ue=>d({hasAttachment:ue.target.checked}),className:"rounded text-blue-600"}),a.jsx("span",{children:"Has attachment"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"text-gray-500",children:"Category:"}),a.jsxs("select",{value:S.category||"all",onChange:ue=>d({category:ue.target.value}),className:`p-1 rounded border ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`,children:[a.jsx("option",{value:"all",children:"All Categories"}),a.jsx("option",{value:"primary",children:"Primary"}),a.jsx("option",{value:"promotions",children:"Promotions"}),a.jsx("option",{value:"social",children:"Social"}),a.jsx("option",{value:"updates",children:"Updates"}),a.jsx("option",{value:"forums",children:"Forums"})]})]})]}),a.jsxs("div",{className:"flex justify-end space-x-2 pt-2 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("button",{onClick:()=>{d({query:"",from:"",subject:"",hasAttachment:!1,category:"all"}),ie(!1)},className:"px-3 py-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-300",children:"Reset"}),a.jsx("button",{onClick:()=>ie(!1),className:"px-4 py-1.5 rounded-lg bg-blue-600 text-white hover:bg-blue-700 font-medium shadow-sm",children:"Search"})]})]})]})]})}),a.jsxs("div",{className:"flex items-center space-x-1 sm:space-x-2 shrink-0",children:[a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>$(!re),className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 transition-colors cursor-pointer",title:"Omnio Suite apps",children:a.jsx(Ep,{size:20})}),re&&a.jsxs("div",{className:`absolute right-0 top-12 w-84 rounded-3xl shadow-2xl p-4 z-[120] border text-xs transition-all animate-in fade-in zoom-in-95 ${c?"bg-[#28292c] border-gray-700 text-gray-200":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsxs("div",{className:"text-[11px] font-bold text-gray-400 uppercase tracking-wider px-2 mb-3 flex items-center justify-between",children:[a.jsx("span",{children:"Omnio Suite Apps"}),a.jsx("span",{className:"text-[10px] text-blue-500 font-normal",children:"Workspace"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{d({folder:"inbox",query:""}),$(!1)},children:[a.jsx(_p,{size:36}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Mail"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{R&&R(),$(!1)},children:[a.jsx(Tp,{size:36}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Drive"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{Q&&Q(),$(!1)},children:[a.jsx(zp,{size:36}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Calendar"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{ce&&ce("Omnio Meet Video Calls loaded."),$(!1)},children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-emerald-600 text-white flex items-center justify-center font-bold shadow-xs",children:a.jsx(vm,{className:"w-5 h-5"})}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Meet"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{W&&W(),$(!1)},children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-blue-500 text-white flex items-center justify-center font-bold shadow-xs",children:a.jsx(wa,{className:"w-5 h-5"})}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Docs"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{I&&I(),$(!1)},children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-emerald-500 text-white flex items-center justify-center font-bold shadow-xs",children:a.jsx(So,{className:"w-5 h-5"})}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Sheets"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{K&&K(),$(!1)},children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-amber-500 text-white flex items-center justify-center font-bold shadow-xs",children:a.jsx(Tt,{className:"w-5 h-5"})}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Keep"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{g(),$(!1)},children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-purple-600 text-white flex items-center justify-center font-bold shadow-xs",children:a.jsx(ql,{className:"w-5 h-5"})}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"WHM Host"})]}),a.jsxs("div",{className:"flex flex-col items-center p-2.5 rounded-2xl hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer transition-all",onClick:()=>{q(),$(!1)},children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gray-100 dark:bg-gray-800 text-blue-600 dark:text-blue-400 border border-dashed border-blue-400 flex items-center justify-center font-bold",children:a.jsx(ba,{className:"w-5 h-5"})}),a.jsx("span",{className:"mt-1.5 text-[11px] font-medium text-center",children:"Add Account"})]})]}),a.jsx("div",{className:"pt-3 mt-3 border-t border-gray-200 dark:border-gray-700 flex items-center justify-between",children:a.jsxs("button",{onClick:()=>{k(),$(!1)},className:"text-xs text-blue-600 dark:text-blue-400 font-bold hover:underline cursor-pointer",children:["Manage SaaS Plans (",fe.toUpperCase(),")"]})})]})]}),a.jsxs("div",{className:"relative pl-0.5",children:[a.jsx("button",{onClick:()=>ye(!le),className:"flex items-center p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/10 transition-colors border-2 border-blue-500/30 focus:border-blue-600 cursor-pointer",title:"Profile, Settings & Account Management",children:de.avatarUrl?a.jsx("img",{src:de.avatarUrl,alt:de.name,className:"w-8 h-8 rounded-full object-cover"}):a.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-600 text-white flex items-center justify-center font-bold text-xs",children:de.name.charAt(0)})}),le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-40 bg-black/10 dark:bg-black/40",onClick:()=>ye(!1)}),a.jsxs("div",{className:`absolute right-0 top-12 w-88 max-w-[92vw] rounded-3xl shadow-2xl p-4 sm:p-5 z-50 border transition-all animate-in fade-in zoom-in-95 ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-900"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-200 dark:border-gray-700",children:[de.avatarUrl?a.jsx("img",{src:de.avatarUrl,alt:de.name,className:"w-11 h-11 rounded-2xl object-cover ring-2 ring-blue-500/50 shrink-0"}):a.jsx("div",{className:"w-11 h-11 rounded-2xl bg-gradient-to-br from-blue-600 to-indigo-600 text-white flex items-center justify-center font-bold text-base ring-2 ring-blue-500/50 shrink-0",children:de.name.charAt(0)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-bold text-sm truncate",children:de.name}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:de.email}),a.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[a.jsxs("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase bg-blue-100 dark:bg-blue-900/60 text-blue-700 dark:text-blue-300",children:[fe.toUpperCase()," PLAN"]}),a.jsxs("span",{className:"text-[10px] text-gray-400 truncate",children:["via ",de.providerDisplayName]})]})]})]}),a.jsxs("div",{className:"py-3 border-b border-gray-200 dark:border-gray-700 space-y-2",children:[a.jsx("div",{className:"flex items-center justify-between text-[10px] font-bold text-gray-400 uppercase tracking-wider",children:a.jsx("span",{children:"Settings & Display"})}),a.jsxs("button",{onClick:h,className:`w-full flex items-center justify-between p-2.5 rounded-2xl border text-xs font-semibold transition-all cursor-pointer ${c?"bg-[#1f1f1f] border-gray-700 hover:bg-[#222]":"bg-gray-50 border-gray-200 hover:bg-gray-100"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[c?a.jsx(op,{className:"w-4 h-4 text-amber-300"}):a.jsx(pg,{className:"w-4 h-4 text-slate-700"}),a.jsxs("span",{children:["Theme: ",c?"Dark Mode":"Light Mode"]})]}),a.jsxs("span",{className:"text-[11px] font-bold text-blue-500",children:["Switch to ",c?"Light":"Dark"]})]}),a.jsxs("button",{onClick:()=>{if(ye(!1),fe==="free"){ce&&ce("Gemini AI Copilot requires Pro ($12/mo) or Business plan."),k();return}X()},className:`w-full flex items-center justify-between p-2.5 rounded-2xl border text-xs font-semibold transition-all cursor-pointer ${P?"bg-blue-600 text-white border-blue-600":c?"bg-[#1f1f1f] border-gray-700 hover:bg-[#222]":"bg-gray-50 border-gray-200 hover:bg-gray-100"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Tt,{className:"w-4 h-4 text-amber-400"}),a.jsx("span",{children:"Gemini AI Copilot Sidebar"})]}),a.jsx("span",{className:`text-[11px] font-bold ${P?"text-white":"text-blue-500"}`,children:P?"Active":fe==="free"?"Unlock PRO":"Open"})]})]}),a.jsxs("div",{className:"py-3 border-b border-gray-200 dark:border-gray-700 space-y-1",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-wider",children:"Connected Accounts (BYOM)"}),a.jsxs("span",{className:"text-[10px] font-mono text-gray-400",children:[z.length," Mailbox(es)"]})]}),a.jsx("div",{className:"max-h-36 overflow-y-auto space-y-1 my-1",children:z.map(ue=>a.jsxs("div",{onClick:()=>{V(ue.id),ye(!1)},className:`flex items-center justify-between p-2 rounded-xl cursor-pointer transition-colors ${ue.id===M?c?"bg-blue-900/40 text-blue-300":"bg-blue-50 text-blue-700 font-medium":c?"hover:bg-white/5":"hover:bg-gray-50"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2.5 overflow-hidden",children:[ue.avatarUrl?a.jsx("img",{src:ue.avatarUrl,alt:"",className:"w-6 h-6 rounded-full object-cover"}):a.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-600 text-white flex items-center justify-center text-xs",children:ue.name.charAt(0)}),a.jsxs("div",{className:"truncate text-xs",children:[a.jsx("p",{className:"truncate font-semibold",children:ue.name}),a.jsx("p",{className:"text-[10px] text-gray-400 truncate",children:ue.email})]})]}),ue.id===M&&a.jsx(tt,{className:"w-4 h-4 text-blue-600 dark:text-blue-400 shrink-0"})]},ue.id))}),a.jsxs("button",{onClick:()=>{ye(!1),q()},className:"w-full mt-1 py-2 px-3 rounded-xl border border-dashed border-blue-500/50 hover:bg-blue-50 dark:hover:bg-blue-900/30 text-blue-600 dark:text-blue-400 text-xs font-semibold flex items-center justify-center space-x-1.5 transition-colors cursor-pointer",children:[a.jsx(ba,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Connect Another Account"})]})]}),a.jsxs("div",{className:"pt-3 space-y-2",children:[a.jsxs("button",{onClick:()=>{ye(!1),k()},className:"w-full py-2 px-3 rounded-xl bg-gradient-to-r from-blue-600 to-indigo-600 text-white font-bold text-xs flex items-center justify-center space-x-1.5 shadow-xs hover:opacity-95 cursor-pointer",children:[a.jsx(Bl,{className:"w-3.5 h-3.5 text-amber-300"}),a.jsxs("span",{children:["Manage Subscription (",fe.toUpperCase(),")"]})]}),a.jsxs("button",{onClick:()=>{ye(!1),L&&L()},className:"w-full py-2 px-3 rounded-xl bg-gradient-to-r from-amber-500 to-amber-600 text-white font-bold text-xs flex items-center justify-center space-x-1.5 shadow-xs hover:opacity-95 cursor-pointer",children:[a.jsx(sm,{className:"w-3.5 h-3.5 text-white"}),a.jsx("span",{children:"SaaS Owner Admin Console"})]}),a.jsxs("button",{onClick:()=>{ye(!1),g()},className:"w-full py-2 px-3 rounded-xl border border-gray-200 dark:border-gray-700 hover:bg-black/5 dark:hover:bg-white/5 font-semibold text-xs flex items-center justify-center space-x-1.5 text-gray-700 dark:text-gray-300 cursor-pointer",children:[a.jsx(ql,{className:"w-3.5 h-3.5 text-emerald-500"}),a.jsx("span",{children:"WHM Host Provider Portal"})]}),a.jsxs("button",{onClick:()=>{ye(!1),J?J():(ce&&ce("Signed out successfully."),ae&&ae())},className:"w-full py-2 px-3 rounded-xl bg-rose-50 dark:bg-rose-950/40 hover:bg-rose-100 dark:hover:bg-rose-900/60 text-rose-600 dark:text-rose-400 text-xs font-semibold flex items-center justify-center space-x-1.5 transition-colors cursor-pointer",children:[a.jsx(sg,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Sign out of all accounts"})]})]})]})]})]})]})]})},Up=({darkMode:c,activeFolder:h,onSelectFolder:S,activeCustomLabel:d,totalUnreadCount:z,starredCount:M,draftsCount:V,onOpenCompose:q,accounts:k,activeAccountId:g,onSelectAccount:R,onOpenConnectModal:Q,onOpenPlansModal:W,onOpenProviderView:I,isOpen:K,onToggleSidebar:X,onMoveEmailsToFolder:P,emails:be=[]})=>{const[ae,L]=m.useState(!1),[J,ce]=m.useState(!1),[fe,le]=m.useState(!1),[ye,ke]=m.useState(null),ie=m.useMemo(()=>be?g==="all"?be:be.filter(b=>b.accountId===g):[],[be,g]),re=b=>{if(!be||be.length===0)return;let U=0;return b==="inbox"?U=ie.filter(G=>G.labels.includes("inbox")&&!G.labels.includes("trash")&&!G.labels.includes("spam")).length:b==="starred"?U=ie.filter(G=>G.starred&&!G.labels.includes("trash")).length:b==="snoozed"?U=ie.filter(G=>G.snoozed).length:b==="important"?U=ie.filter(G=>G.important&&!G.labels.includes("trash")).length:b==="sent"?U=ie.filter(G=>G.labels.includes("sent")).length:b==="drafts"?U=ie.filter(G=>G.labels.includes("drafts")).length:b==="purchases"?U=ie.filter(G=>G.labels.includes("purchases")).length:b==="social"?U=ie.filter(G=>G.category==="social"||G.labels.includes("social")).length:b==="updates"?U=ie.filter(G=>G.category==="updates"||G.labels.includes("updates")).length:b==="forums"?U=ie.filter(G=>G.category==="forums"||G.labels.includes("forums")).length:b==="promotions"?U=ie.filter(G=>G.category==="promotions"||G.labels.includes("promotions")).length:b==="spam"?U=ie.filter(G=>G.labels.includes("spam")).length:b==="trash"?U=ie.filter(G=>G.labels.includes("trash")).length:U=ie.filter(G=>G.labels.includes(b)).length,U>0?U.toLocaleString():void 0},$=(b,U)=>{S(b,U),window.innerWidth<768&&X&&X()},de=(b,U,G)=>{b.preventDefault(),ke(null);try{const se=b.dataTransfer.getData("text/plain");if(!se)return;const u=JSON.parse(se);Array.isArray(u)&&u.length>0&&P&&P(u,U,G)}catch(se){console.error("Drop error:",se)}},ue=[{id:"inbox",label:"Inbox",icon:$b,count:re("inbox"),isBold:!0},{id:"starred",label:"Starred",icon:pl,count:re("starred")},{id:"snoozed",label:"Snoozed",icon:Mn,count:re("snoozed")},{id:"important",label:"Important",icon:tb,count:re("important")},{id:"sent",label:"Sent",icon:Ao,count:re("sent")},{id:"drafts",label:"Drafts",icon:wa,count:re("drafts")},{id:"purchases",label:"Purchases",icon:Ig,count:re("purchases")},{id:"social",label:"Social",icon:As,count:re("social")},{id:"updates",label:"Updates",icon:Yb,count:re("updates")},{id:"forums",label:"Forums",icon:xg,count:re("forums")},{id:"promotions",label:"Promotions",icon:fm,count:re("promotions")}],oe=[{id:"scheduled",label:"Scheduled",icon:Mn,count:re("scheduled")},{id:"spam",label:"Spam",icon:vg,count:re("spam")},{id:"trash",label:"Trash",icon:oa,count:re("trash")}],A=[{id:"banking",label:"Banking",count:re("banking"),color:"bg-gray-700"},{id:"government",label:"Government",count:re("government"),color:"bg-emerald-600"},{id:"notes",label:"Notes",count:re("notes"),color:"bg-[#5c5c5c]"},{id:"personal",label:"Personal",count:re("personal"),color:"bg-blue-600"},{id:"travel",label:"Travel",count:re("travel"),color:"bg-purple-600"}];return K?a.jsxs(a.Fragment,{children:[X&&a.jsx("div",{onClick:X,className:"fixed inset-0 bg-black/40 z-40 md:hidden backdrop-blur-xs transition-opacity"}),a.jsxs("aside",{className:`fixed inset-y-0 left-0 z-50 w-64 shadow-2xl md:static md:w-[240px] md:shadow-none flex flex-col justify-between shrink-0 select-none py-2 pr-3 pl-2 transition-colors duration-200 overflow-y-auto no-scrollbar ${c?"bg-[#1f1f1f] text-gray-200":"bg-[#f6f8fc] text-[#1f1f1f]"}`,children:[a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"pl-2 pt-1 pb-1",children:a.jsxs("button",{onClick:q,className:`flex items-center px-6 py-4 rounded-2xl shadow-xs hover:shadow-md transition-all cursor-pointer ${c?"bg-[#37393d] hover:bg-[#43464b] text-white border border-gray-600":"bg-[#c2e7ff] hover:bg-[#b3dfff] text-[#001d35]"}`,children:[a.jsx(qx,{className:"w-5 h-5 mr-4 text-[#001d35] dark:text-blue-300"}),a.jsx("span",{className:"font-semibold text-sm tracking-wide",children:"Compose"})]})}),a.jsxs("nav",{className:"flex flex-col space-y-0.5 text-xs font-medium",children:[ue.map(b=>{const U=b.icon,G=h===b.id&&!d,se=ye===b.id;return a.jsxs("button",{onClick:()=>S(b.id),onDragOver:u=>{u.preventDefault(),u.dataTransfer.dropEffect="move",ke(b.id)},onDragLeave:()=>ke(null),onDrop:u=>de(u,b.id),className:`flex items-center justify-between px-4 py-1.5 rounded-r-full transition-all cursor-pointer ${se?"ring-2 ring-blue-500 bg-blue-100 dark:bg-blue-900/80 font-bold scale-[1.02]":G?c?"bg-[#004a77] text-blue-200 font-bold":"bg-[#d3e3fd] text-[#001d35] font-bold":c?"hover:bg-gray-800 text-gray-300":"hover:bg-gray-200/70 text-gray-800"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3.5 min-w-0",children:[a.jsx(U,{className:`w-4 h-4 shrink-0 ${G?"text-[#001d35] dark:text-blue-200":"text-gray-600 dark:text-gray-400"}`}),a.jsx("span",{className:`truncate ${G||b.isBold?"font-bold":"font-normal"}`,children:b.label})]}),b.count&&a.jsx("span",{className:`text-[11px] font-semibold ${G?"text-[#001d35] dark:text-blue-200 font-bold":"text-gray-600 dark:text-gray-400"}`,children:b.count})]},b.id)}),a.jsxs("button",{onClick:()=>ce(!J),className:"flex items-center px-4 py-1.5 hover:bg-gray-200/70 dark:hover:bg-gray-800 rounded-r-full text-gray-700 dark:text-gray-300 text-xs cursor-pointer font-normal",children:[J?a.jsx(Tx,{className:"w-4 h-4 mr-3.5 text-gray-500"}):a.jsx(ha,{className:"w-4 h-4 mr-3.5 text-gray-500"}),a.jsx("span",{children:J?"Less":"More"})]}),J&&a.jsx("div",{className:"space-y-0.5 pt-0.5",children:oe.map(b=>{const U=b.icon,G=h===b.id,se=ye===b.id;return a.jsx("button",{onClick:()=>S(b.id),onDragOver:u=>{u.preventDefault(),u.dataTransfer.dropEffect="move",ke(b.id)},onDragLeave:()=>ke(null),onDrop:u=>de(u,b.id),className:`flex items-center justify-between px-4 py-1.5 rounded-r-full text-xs transition-colors cursor-pointer w-full ${se?"ring-2 ring-blue-500 bg-blue-100 dark:bg-blue-900/80 font-bold scale-[1.02]":G?c?"bg-[#004a77] text-blue-200 font-bold":"bg-[#d3e3fd] text-[#001d35] font-bold":c?"hover:bg-gray-800 text-gray-300":"hover:bg-gray-200/70 text-gray-800"}`,children:a.jsxs("div",{className:"flex items-center space-x-3.5",children:[a.jsx(U,{className:"w-4 h-4 text-gray-500 shrink-0"}),a.jsx("span",{children:b.label})]})},b.id)})})]}),a.jsxs("div",{className:"pt-2",children:[a.jsxs("div",{className:"px-4 py-1 text-xs font-semibold text-gray-700 dark:text-gray-300 flex justify-between items-center",children:[a.jsx("span",{children:"Labels"}),a.jsx("button",{onClick:Q,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-800 cursor-pointer",title:"Add label",children:a.jsx(ba,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})})]}),a.jsxs("div",{className:"space-y-0.5 mt-0.5",children:[A.map(b=>{const U=h==="custom-label"&&d===b.id,G=ye===`label_${b.id}`;return a.jsxs("button",{onClick:()=>S("custom-label",b.id),onDragOver:se=>{se.preventDefault(),se.dataTransfer.dropEffect="move",ke(`label_${b.id}`)},onDragLeave:()=>ke(null),onDrop:se=>de(se,"custom-label",b.id),className:`w-full flex items-center justify-between px-4 py-1.5 rounded-r-full text-xs transition-colors cursor-pointer ${G?"ring-2 ring-blue-500 bg-blue-100 dark:bg-blue-900/80 font-bold scale-[1.02]":U?c?"bg-[#004a77] text-blue-200 font-bold":"bg-[#d3e3fd] text-[#001d35] font-bold":c?"hover:bg-gray-800 text-gray-300":"hover:bg-gray-200/70 text-gray-800"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3.5 truncate",children:[a.jsx("span",{className:`w-2.5 h-2.5 rounded-xs shrink-0 ${b.color}`}),a.jsx("span",{className:"truncate",children:b.label})]}),b.count&&a.jsx("span",{className:"text-[11px] text-gray-600 dark:text-gray-400 font-normal",children:b.count})]},b.id)}),a.jsxs("button",{onClick:()=>L(!ae),className:"w-full flex items-center px-4 py-1.5 hover:bg-gray-200/70 dark:hover:bg-gray-800 rounded-r-full text-gray-700 dark:text-gray-300 text-xs cursor-pointer font-normal",children:[ae?a.jsx(Tx,{className:"w-4 h-4 mr-3.5 text-gray-500"}):a.jsx(ha,{className:"w-4 h-4 mr-3.5 text-gray-500"}),a.jsx("span",{children:ae?"Less":"More"})]})]})]}),a.jsxs("div",{className:"pt-2 border-t border-gray-200/80 dark:border-gray-800",children:[a.jsxs("button",{onClick:()=>le(!fe),className:"w-full px-4 py-1 text-[11px] font-bold text-gray-500 dark:text-gray-400 uppercase tracking-wider flex justify-between items-center cursor-pointer",children:[a.jsxs("span",{children:["Providers (",k.length,")"]}),fe?a.jsx(ha,{className:"w-3.5 h-3.5"}):a.jsx(Gt,{className:"w-3.5 h-3.5"})]}),fe&&a.jsxs("div",{className:"space-y-0.5 mt-1",children:[a.jsxs("button",{onClick:()=>R("all"),className:`w-full flex items-center justify-between px-3 py-1.5 rounded-lg text-xs ${g==="all"?c?"bg-blue-900/50 text-blue-300 font-semibold":"bg-blue-100/70 text-blue-800 font-semibold":c?"hover:bg-gray-800 text-gray-400":"hover:bg-gray-200/50 text-gray-600"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(So,{className:"w-3.5 h-3.5 text-blue-600"}),a.jsx("span",{children:"Unified Inbox"})]}),a.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.2 rounded bg-blue-500/10 text-blue-600 font-bold",children:"ALL"})]}),k.map(b=>a.jsx("button",{onClick:()=>R(b.id),className:`w-full flex items-center justify-between px-3 py-1.5 rounded-lg text-xs truncate transition-colors ${g===b.id?c?"bg-blue-900/50 text-blue-300 font-semibold":"bg-blue-100/70 text-blue-800 font-semibold":c?"hover:bg-gray-800 text-gray-400":"hover:bg-gray-200/50 text-gray-600"}`,children:a.jsxs("div",{className:"flex items-center space-x-2 truncate",children:[a.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500 shrink-0"}),a.jsx("span",{className:"truncate",children:b.name})]})},b.id))]})]})]}),a.jsx("div",{className:"pt-2 border-t border-gray-200/80 dark:border-gray-800",children:a.jsxs("div",{onClick:I,className:"p-2 rounded-xl bg-gradient-to-r from-emerald-500/10 to-blue-500/10 border border-emerald-500/20 hover:border-emerald-500 cursor-pointer transition-all flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-2 text-xs font-semibold text-emerald-700 dark:text-emerald-400",children:[a.jsx(ql,{className:"w-3.5 h-3.5 shrink-0"}),a.jsx("span",{className:"truncate",children:"WHM Bridge Active"})]}),a.jsx("span",{className:"text-[9px] bg-emerald-600 text-white px-1.5 py-0.5 rounded font-mono font-bold",children:"READY"})]})})]})]}):a.jsxs("aside",{className:`hidden md:flex w-16 flex-col items-center py-3 space-y-3 shrink-0 select-none no-scrollbar overflow-y-auto ${c?"bg-[#1f1f1f] text-gray-200":"bg-[#f6f8fc] text-[#1f1f1f]"}`,children:[a.jsx("button",{onClick:q,title:"Compose",className:"w-12 h-12 rounded-2xl bg-[#c2e7ff] text-[#001d35] hover:shadow-md transition-all flex items-center justify-center cursor-pointer shadow-xs",children:a.jsx(qx,{className:"w-5 h-5"})}),a.jsxs("div",{className:"flex flex-col space-y-1 w-full px-2",children:[ue.slice(0,8).map(b=>{const U=b.icon,G=h===b.id;return a.jsxs("button",{onClick:()=>$(b.id),title:b.label,className:`relative w-12 h-9 rounded-full flex items-center justify-center mx-auto transition-colors cursor-pointer ${G?c?"bg-[#004a77] text-blue-200":"bg-[#d3e3fd] text-[#001d35]":c?"hover:bg-gray-800 text-gray-300":"hover:bg-gray-200 text-gray-700"}`,children:[a.jsx(U,{className:"w-5 h-5"}),b.count&&a.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-blue-600 dark:bg-blue-400"})]},b.id)}),a.jsx("button",{onClick:()=>X?X():ce(!0),title:"More",className:"w-12 h-9 rounded-full flex items-center justify-center mx-auto hover:bg-gray-200 dark:hover:bg-gray-800 text-gray-500 cursor-pointer",children:a.jsx(ha,{className:"w-4 h-4"})}),a.jsx("div",{className:"w-8 border-t border-gray-200 dark:border-gray-800 mx-auto my-1"}),a.jsx("button",{onClick:Q,title:"Add Label / Provider",className:"w-12 h-9 rounded-full flex items-center justify-center mx-auto hover:bg-gray-200 dark:hover:bg-gray-800 text-gray-500 cursor-pointer",children:a.jsx(ba,{className:"w-4 h-4"})})]})]})},$r=[{id:"important",label:"Important"},{id:"calendar",label:"Calendar"},{id:"team",label:"Team"},{id:"docs",label:"Docs"},{id:"other",label:"Other"}],Rp={recruiting:"bg-pink-100 text-pink-600 dark:bg-pink-500/15 dark:text-pink-300",review:"bg-violet-100 text-violet-600 dark:bg-violet-500/15 dark:text-violet-300",signature:"bg-orange-100 text-orange-600 dark:bg-orange-500/15 dark:text-orange-300",pitch:"bg-green-100 text-green-700 dark:bg-green-500/15 dark:text-green-300",marketing:"bg-teal-100 text-teal-700 dark:bg-teal-500/15 dark:text-teal-300",invite:"bg-blue-100 text-blue-600 dark:bg-blue-500/15 dark:text-blue-300",reminder:"bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300",newsletter:"bg-slate-200 text-slate-600 dark:bg-slate-500/20 dark:text-slate-300",billing:"bg-emerald-100 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",deploys:"bg-sky-100 text-sky-700 dark:bg-sky-500/15 dark:text-sky-300",hosting:"bg-indigo-100 text-indigo-600 dark:bg-indigo-500/15 dark:text-indigo-300",shared:"bg-cyan-100 text-cyan-700 dark:bg-cyan-500/15 dark:text-cyan-300",comment:"bg-fuchsia-100 text-fuchsia-600 dark:bg-fuchsia-500/15 dark:text-fuchsia-300",design:"bg-rose-100 text-rose-600 dark:bg-rose-500/15 dark:text-rose-300",notes:"bg-lime-100 text-lime-700 dark:bg-lime-500/15 dark:text-lime-300"},Vx=c=>Rp[c]??"bg-gray-100 text-gray-600 dark:bg-gray-500/20 dark:text-gray-300",Zx=c=>c.smartCategory??(c.important?"important":"other"),Xx=["bg-violet-500","bg-sky-500","bg-rose-500","bg-emerald-500","bg-amber-500"],Bp=({darkMode:c,emails:h,selectedEmailId:S,onSelectEmail:d,onToggleStar:z,onToggleUnread:M,onDeleteEmail:V,onBulkDelete:q,onBulkMarkRead:k,onBulkArchive:g,onBulkStar:R,activeCategory:Q,onChangeCategory:W,activeFolder:I,splitView:K,onChangeSplitView:X,onRefresh:P,isSyncing:be=!1,selectedAccountEmail:ae,onMoveEmailsToFolder:L})=>{var te;const[J,ce]=m.useState([]),[fe,le]=m.useState(!1),[ye,ke]=m.useState(!1),[ie,re]=m.useState("important"),[$,de]=m.useState([]),ue=(y,me)=>{const ve=J.includes(me)?J:[me];y.dataTransfer.setData("text/plain",JSON.stringify(ve)),y.dataTransfer.effectAllowed="move";const Ee=document.createElement("div");Ee.className="bg-blue-600 text-white font-bold text-xs px-3.5 py-2 rounded-xl shadow-2xl flex items-center space-x-2 pointer-events-none",Ee.style.position="absolute",Ee.style.top="-1000px",Ee.innerText=`Move ${ve.length} conversation${ve.length>1?"s":""}`,document.body.appendChild(Ee),y.dataTransfer.setDragImage(Ee,10,10),setTimeout(()=>{document.body.contains(Ee)&&document.body.removeChild(Ee)},0)},oe=h.length>0&&J.length===h.length,A=()=>{ce(oe?[]:h.map(y=>y.id))},b=(y,me)=>{me.stopPropagation(),J.includes(y)?ce(J.filter(ve=>ve!==y)):ce([...J,y])},U=()=>{q?q(J):J.forEach(y=>V(y,{})),ce([])},G=()=>{const me=h.filter(ve=>J.includes(ve.id)).every(ve=>!ve.unread);k?k(J,!me):J.forEach(ve=>M(ve,{}))},se=()=>{g&&g(J),ce([])},u=()=>{const me=h.filter(ve=>J.includes(ve.id)).every(ve=>ve.starred);R?R(J,!me):J.forEach(ve=>z(ve,{}))};let p=h;fe&&(p=p.filter(y=>y.unread)),ye&&(p=p.filter(y=>y.attachments&&y.attachments.length>0));const Y=I==="inbox",ee=$r.reduce((y,me)=>(y[me.id]=p.filter(ve=>Zx(ve)===me.id).length,y),{}),xe=Y?p.filter(y=>Zx(y)===ie):p,ge=bl.useRef(!1);bl.useEffect(()=>{if(!(ge.current||!Y||h.length===0)&&(ge.current=!0,ee[ie]===0)){const y=$r.find(me=>ee[me.id]>0);y&&re(y.id)}},[h.length]);const Ne=[];if(Y){const y=new Map;xe.forEach(ve=>{ve.aiCategoryPill&&y.set(ve.aiCategoryPill,[...y.get(ve.aiCategoryPill)||[],ve])});const me=new Set;xe.forEach(ve=>{var _e;const Ee=ve.aiCategoryPill;Ee&&(((_e=y.get(Ee))==null?void 0:_e.length)||0)>=2?me.has(Ee)||(me.add(Ee),Ne.push({type:"stack",label:Ee,emails:y.get(Ee)})):Ne.push({type:"email",email:ve})})}else xe.forEach(y=>Ne.push({type:"email",email:y}));const Se=y=>{de(me=>me.includes(y)?me.filter(ve=>ve!==y):[...me,y])},He=(y,me=!1)=>{const ve=J.includes(y.id),Ee=S===y.id||ve;return a.jsxs("div",{draggable:!0,onDragStart:_e=>ue(_e,y.id),onClick:()=>d(y),className:`group relative flex items-center pr-3 sm:pr-4 h-12 min-h-[44px] text-[13px] transition-colors cursor-pointer border-l-[3px] ${me?"pl-2 sm:pl-3":"pl-1 sm:pl-2"} ${Ee?"bg-[#f4f0fe] dark:bg-violet-500/10 border-l-violet-500":`border-l-transparent ${c?"hover:bg-[#28292c]":"hover:bg-gray-50"}`}`,children:[a.jsxs("div",{className:`flex items-center shrink-0 mr-1 transition-opacity ${ve||y.starred?"opacity-100":"opacity-0 group-hover:opacity-100"}`,onClick:_e=>_e.stopPropagation(),children:[a.jsx("button",{onClick:_e=>b(y.id,_e),className:"p-1 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors cursor-pointer",title:ve?"Deselect email":"Select email",children:ve?a.jsx("div",{className:"w-4 h-4 rounded bg-violet-600 flex items-center justify-center shadow-xs",children:a.jsx(tt,{className:"w-3 h-3 text-white stroke-[3]"})}):a.jsx("div",{className:"w-4 h-4 rounded border border-gray-300 dark:border-gray-600 group-hover:border-gray-500 dark:group-hover:border-gray-400 transition-colors"})}),a.jsx("button",{onClick:_e=>z(y.id,_e),className:"p-1 rounded transition-transform active:scale-125 cursor-pointer",title:y.starred?"Starred":"Not starred",children:a.jsx(pl,{className:`w-4 h-4 ${y.starred?"fill-amber-400 text-amber-400":"text-gray-300 dark:text-gray-600 hover:text-gray-500"}`})})]}),a.jsx("div",{className:"w-32 sm:w-40 md:w-44 shrink-0 truncate pr-3",children:a.jsx("span",{className:`truncate ${y.unread?`font-semibold ${c?"text-gray-50":"text-gray-900"}`:`font-normal ${c?"text-gray-300":"text-gray-700"}`}`,children:y.senderName})}),a.jsxs("div",{className:"flex-1 flex items-center min-w-0 pr-4",children:[y.aiCategoryPill&&!me&&a.jsx("span",{className:`shrink-0 mr-2.5 text-[11px] font-medium px-2 py-0.5 rounded-md lowercase ${Vx(y.aiCategoryPill)}`,children:y.aiCategoryPill}),a.jsx("span",{className:`truncate shrink-0 max-w-[55%] ${y.unread?`font-semibold ${c?"text-gray-50":"text-gray-900"}`:`font-medium ${c?"text-gray-300":"text-gray-800"}`}`,children:y.subject}),a.jsx("span",{className:"truncate ml-3 text-gray-400 dark:text-gray-500 font-normal",children:y.snippet})]}),y.attachments&&y.attachments.length>0&&a.jsxs("div",{className:"shrink-0 mr-3 flex items-center space-x-1 px-2 py-0.5 rounded-full bg-gray-100 dark:bg-gray-800 text-[10px] text-gray-600 dark:text-gray-300",children:[a.jsx(Xr,{className:"w-3 h-3 text-gray-400"}),a.jsx("span",{className:"font-mono",children:y.attachments.length})]}),a.jsxs("div",{className:"shrink-0 h-7 flex items-center justify-end",children:[a.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 font-medium group-hover:hidden whitespace-nowrap",children:y.date}),a.jsxs("div",{className:"hidden group-hover:flex items-center space-x-1 bg-inherit pl-2",onClick:_e=>_e.stopPropagation(),children:[a.jsx("button",{onClick:_e=>V(y.id,_e),className:"p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 hover:text-rose-600 transition-colors cursor-pointer",title:"Delete",children:a.jsx(oa,{className:"w-4 h-4"})}),a.jsx("button",{onClick:_e=>M(y.id,_e),className:"p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 hover:text-blue-600 transition-colors cursor-pointer",title:y.unread?"Mark as read":"Mark as unread",children:y.unread?a.jsx(Bx,{className:"w-4 h-4"}):a.jsx(Ll,{className:"w-4 h-4"})}),a.jsx("button",{className:"p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 hover:text-amber-500 transition-colors cursor-pointer",title:"Snooze",children:a.jsx(Mn,{className:"w-4 h-4"})}),a.jsx("button",{onClick:se,className:"p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 transition-colors cursor-pointer",title:"Archive",children:a.jsx(Gr,{className:"w-4 h-4"})})]})]})]},y.id)};return a.jsxs("section",{className:`flex-1 rounded-2xl shadow-xs border flex flex-col overflow-hidden select-none relative ${c?"bg-[#1f1f1f] border-gray-800 text-gray-200":"bg-white border-gray-200/80 text-gray-800"}`,children:[a.jsxs("div",{className:`px-2 sm:px-4 py-2 flex items-center justify-between border-b text-xs gap-2 ${c?"border-[#333333] bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2 sm:space-x-3 shrink-0",children:[a.jsx("button",{onClick:A,className:"p-1 rounded hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 transition-colors flex items-center justify-center cursor-pointer",title:oe?"Deselect All":"Select All",children:oe?a.jsx("div",{className:"w-4 h-4 rounded bg-blue-600 flex items-center justify-center shadow-xs",children:a.jsx(tt,{className:"w-3 h-3 text-white stroke-[3]"})}):J.length>0?a.jsx("div",{className:"w-4 h-4 rounded bg-blue-600 flex items-center justify-center shadow-xs",children:a.jsx("div",{className:"w-2 h-0.5 bg-white rounded-full"})}):a.jsx("div",{className:"w-4 h-4 rounded border border-gray-400 dark:border-gray-500 hover:border-gray-600 transition-colors"})}),a.jsx("button",{onClick:P,className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 transition-colors cursor-pointer",title:"Refresh inbox",children:a.jsx(Kr,{className:"w-4 h-4"})}),J.length>0&&a.jsxs("div",{className:"flex items-center space-x-1 pl-2 border-l border-gray-300 dark:border-gray-700",children:[a.jsx("button",{onClick:se,className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Archive selected",children:a.jsx(Gr,{className:"w-4 h-4"})}),a.jsx("button",{onClick:U,className:"p-1.5 rounded hover:bg-rose-50 dark:hover:bg-rose-950/40 text-rose-600 dark:text-rose-400 cursor-pointer",title:"Delete selected",children:a.jsx(oa,{className:"w-4 h-4"})}),a.jsxs("span",{className:"text-[11px] font-semibold text-gray-500 pl-1 whitespace-nowrap",children:[J.length," selected"]})]})]}),a.jsxs("div",{className:"flex items-center space-x-2 sm:space-x-3 shrink-0",children:[a.jsxs("div",{className:"hidden sm:flex items-center space-x-1.5",children:[a.jsx("button",{onClick:()=>le(!fe),className:`px-2.5 py-1 rounded-full text-[11px] font-medium transition-colors border cursor-pointer ${fe?"bg-blue-600 text-white border-blue-600":c?"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700":"bg-gray-100 border-gray-300 text-gray-600 hover:bg-gray-200"}`,children:"Unread"}),a.jsx("button",{onClick:()=>ke(!ye),className:`px-2.5 py-1 rounded-full text-[11px] font-medium transition-colors border cursor-pointer ${ye?"bg-blue-600 text-white border-blue-600":c?"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700":"bg-gray-100 border-gray-300 text-gray-600 hover:bg-gray-200"}`,children:"Has Attachment"})]}),a.jsxs("div",{className:"text-gray-500 text-[11px] whitespace-nowrap",children:["1-",xe.length," of ",xe.length]}),a.jsxs("div",{className:"flex items-center space-x-1 border-l border-gray-200 dark:border-gray-800 pl-2",children:[a.jsx("button",{className:"p-1 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 cursor-not-allowed",children:a.jsx(Yr,{className:"w-4 h-4"})}),a.jsx("button",{className:"p-1 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 cursor-not-allowed",children:a.jsx(Gt,{className:"w-4 h-4"})})]})]})]}),Y&&a.jsx("div",{className:`flex items-center border-b px-4 sm:px-6 space-x-5 sm:space-x-7 overflow-x-auto no-scrollbar ${c?"border-[#333333] bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:$r.map(y=>{const me=ie===y.id;return a.jsxs("button",{onClick:()=>re(y.id),className:`relative py-3 flex items-baseline space-x-1.5 whitespace-nowrap text-[15px] transition-colors cursor-pointer ${me?c?"text-gray-50 font-semibold":"text-gray-900 font-semibold":"text-gray-400 dark:text-gray-500 font-medium hover:text-gray-600 dark:hover:text-gray-300"}`,children:[a.jsx("span",{children:y.label}),a.jsx("span",{className:`text-[13px] font-normal ${me?"text-gray-400 dark:text-gray-400":"text-gray-300 dark:text-gray-600"}`,children:ee[y.id]}),me&&a.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[3px] rounded-t-full bg-violet-500"})]},y.id)})}),a.jsx("div",{className:"flex-1 overflow-y-auto divide-y divide-gray-100 dark:divide-gray-800/60 pb-12",children:Ne.length===0?a.jsxs("div",{className:"h-64 flex flex-col items-center justify-center text-gray-400",children:[a.jsx(Ll,{className:"w-12 h-12 mb-2 stroke-1 text-gray-300 dark:text-gray-600"}),a.jsxs("p",{className:"font-semibold text-sm",children:["Nothing in ",Y?(te=$r.find(y=>y.id===ie))==null?void 0:te.label:"this folder"]}),a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Try resetting search filters or switching tabs."})]}):Ne.map(y=>{if(y.type==="stack"){const me=$.includes(y.label),ve=y.emails[0],Ee=y.emails.some(_e=>_e.unread);return a.jsxs("div",{children:[a.jsxs("div",{onClick:()=>Se(y.label),className:`group relative flex items-center pl-2.5 sm:pl-4 pr-3 sm:pr-4 h-12 text-[13px] transition-colors cursor-pointer border-l-[3px] border-l-transparent ${c?"hover:bg-[#28292c]":"hover:bg-gray-50"}`,children:[a.jsx("div",{className:"flex items-center shrink-0 mr-3",children:y.emails.slice(0,3).map((_e,T)=>a.jsx("div",{className:`w-6 h-6 rounded-full ${Xx[T%Xx.length]} text-white text-[10px] font-bold flex items-center justify-center ring-2 ${c?"ring-[#1f1f1f]":"ring-white"} ${T>0?"-ml-2":""}`,children:_e.senderName.charAt(0).toUpperCase()},_e.id))}),a.jsx("span",{className:`shrink-0 mr-2 text-[11px] font-medium px-2 py-0.5 rounded-md lowercase ${Vx(y.label)}`,children:y.label}),a.jsxs("span",{className:`shrink-0 mr-2 ${Ee?"font-semibold":"font-medium"} ${c?"text-gray-100":"text-gray-900"}`,children:[y.emails.length," conversations"]}),a.jsxs("span",{className:"flex-1 truncate text-gray-400 dark:text-gray-500 pr-3",children:[ve.senderName,": ",ve.subject]}),a.jsxs("div",{className:"shrink-0 flex items-center space-x-2",children:[a.jsx("span",{className:"text-[11px] text-gray-500 dark:text-gray-400 font-medium whitespace-nowrap",children:ve.date}),a.jsx(ha,{className:`w-4 h-4 text-gray-400 transition-transform ${me?"rotate-180":""}`})]})]}),me&&a.jsx("div",{className:`border-l-2 ml-4 ${c?"border-violet-500/40 bg-white/[0.02]":"border-violet-300 bg-violet-50/30"}`,children:y.emails.map(_e=>He(_e,!0))})]},`stack-${y.label}`)}return He(y.email)})}),J.length>0&&a.jsxs("div",{className:`absolute bottom-12 left-1/2 -translate-x-1/2 z-30 flex items-center space-x-2 px-4 py-2 rounded-full shadow-2xl backdrop-blur-md border transition-all duration-200 animate-in fade-in slide-in-from-bottom-4 max-w-[95%] overflow-x-auto no-scrollbar ${c?"bg-gray-900/95 text-white border-gray-700/80":"bg-white/95 text-gray-800 border-gray-200 shadow-xl"}`,children:[a.jsxs("div",{className:`flex items-center space-x-2 pr-3 border-r ${c?"border-gray-700":"border-gray-200"}`,children:[a.jsx("button",{onClick:A,className:`p-0.5 rounded transition-colors cursor-pointer ${c?"hover:bg-gray-700":"hover:bg-gray-100"}`,title:oe?"Deselect all":"Select all",children:a.jsx("div",{className:"w-4 h-4 rounded bg-blue-600 flex items-center justify-center shadow-xs",children:a.jsx(tt,{className:"w-3 h-3 text-white stroke-[3]"})})}),a.jsxs("span",{className:`text-xs font-bold whitespace-nowrap ${c?"text-blue-300":"text-blue-600"}`,children:[J.length," selected"]})]}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsxs("button",{onClick:se,className:`flex items-center space-x-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-colors cursor-pointer ${c?"hover:bg-gray-700/80 text-gray-200 hover:text-white":"hover:bg-gray-100 text-gray-700 hover:text-gray-900"}`,title:"Archive selected",children:[a.jsx(Gr,{className:"w-3.5 h-3.5"}),a.jsx("span",{className:"hidden sm:inline",children:"Archive"})]}),a.jsxs("button",{onClick:G,className:`flex items-center space-x-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-colors cursor-pointer ${c?"hover:bg-gray-700/80 text-gray-200 hover:text-white":"hover:bg-gray-100 text-gray-700 hover:text-gray-900"}`,title:"Mark selected as read/unread",children:[a.jsx(Bx,{className:"w-3.5 h-3.5"}),a.jsx("span",{className:"hidden sm:inline",children:"Mark Read"})]}),a.jsxs("button",{onClick:u,className:`flex items-center space-x-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-colors cursor-pointer ${c?"hover:bg-gray-700/80 text-gray-200 hover:text-amber-400":"hover:bg-amber-50 text-gray-700 hover:text-amber-600"}`,title:"Star/Unstar selected",children:[a.jsx(pl,{className:"w-3.5 h-3.5 text-amber-400 fill-amber-400"}),a.jsx("span",{className:"hidden sm:inline",children:"Star"})]}),a.jsxs("button",{onClick:U,className:"flex items-center space-x-1.5 px-3 py-1.5 rounded-full text-xs font-semibold bg-rose-600/90 hover:bg-rose-600 text-white transition-colors cursor-pointer shadow-xs ml-1",title:"Delete selected emails",children:[a.jsx(oa,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Delete"})]})]}),a.jsx("div",{className:`pl-2 border-l ${c?"border-gray-700":"border-gray-200"}`,children:a.jsx("button",{onClick:()=>ce([]),className:`p-1 rounded-full transition-colors cursor-pointer ${c?"hover:bg-gray-700 text-gray-400 hover:text-white":"hover:bg-gray-100 text-gray-500 hover:text-gray-800"}`,title:"Clear selection",children:a.jsx(wt,{className:"w-4 h-4"})})})]}),a.jsxs("div",{className:"bg-[#edf2fa] dark:bg-[#252628] border-t border-gray-200 dark:border-gray-800 px-3 py-2 relative overflow-hidden shrink-0",children:[a.jsx("div",{className:"absolute top-0 left-0 w-1 bg-gradient-to-b from-blue-500 to-indigo-600 h-full"}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-2 truncate mr-2",children:[a.jsx(Tt,{className:"w-4 h-4 text-blue-600 dark:text-blue-400 shrink-0"}),a.jsxs("span",{className:"text-xs font-semibold text-gray-800 dark:text-gray-200 truncate",children:["AI Summary: ",a.jsxs("span",{className:"font-normal text-gray-600 dark:text-gray-400",children:[h.filter(y=>y.unread).length," unread emails. Sarah Miller sent weekly updates & Microsoft 365 security alert requires review."]})]})]}),a.jsxs("div",{className:"flex items-center space-x-2 shrink-0",children:[a.jsx("button",{onClick:()=>W("primary"),className:"text-xs bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-full px-2.5 py-0.5 hover:bg-gray-100 dark:hover:bg-gray-700 font-medium text-gray-700 dark:text-gray-200 transition-colors cursor-pointer",children:"Summarize"}),a.jsxs("button",{onClick:P,disabled:be,className:"text-xs bg-blue-50 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300 rounded-full px-2.5 py-0.5 hover:bg-blue-100 font-medium transition-colors cursor-pointer flex items-center space-x-1",children:[a.jsx(Kr,{className:`w-3 h-3 ${be?"animate-spin":""}`}),a.jsx("span",{children:be?"Syncing...":"Sync"})]})]})]})]})]})},Lp=({darkMode:c,email:h,onBack:S,onDelete:d,onToggleStar:z,account:M,onOpenComposeReply:V,onAddTaskFromEmail:q,onArchiveEmail:k,onMarkUnreadEmail:g})=>{const R=m.useRef(null),Q=m.useRef(null),[W,I]=m.useState(!1),[K,X]=m.useState(!1),[P,be]=m.useState(h.aiSummary||null),[ae,L]=m.useState(h.aiActionItems||null),[J,ce]=m.useState(h.aiSentiment||null),[fe,le]=m.useState(!1),[ye,ke]=m.useState(!1),[ie,re]=m.useState(!1),[$,de]=m.useState(null),[ue,oe]=m.useState(""),[A,b]=m.useState(!1),[U,G]=m.useState(["Thanks for the update, sounds good!","I'll review this and follow up shortly.","Could you share more details on this?"]),se=te=>{de(te),setTimeout(()=>de(null),3e3)},u=()=>{window.print()},p=()=>{k&&k(h.id),se("Email archived"),setTimeout(()=>S(),600)},Y=()=>{d(h.id),se("Email moved to Trash"),setTimeout(()=>S(),600)},ee=()=>{g&&g(h.id),se("Marked as unread"),setTimeout(()=>S(),600)},xe=te=>{ke(!1),se(`Email snoozed until ${te}`)},ge=()=>{q&&q(`Follow up on: ${h.subject}`),se("Added to Tasks sidebar!"),re(!1)},Ne=async()=>{X(!0);try{const y=await(await fetch("/api/ai/summarize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subject:h.subject,sender:h.senderName,body:h.body})})).json();y.summary&&be(y.summary),y.actionItems&&L(y.actionItems),y.sentiment&&ce(y.sentiment)}catch(te){console.error("AI Summary error:",te)}finally{X(!1)}},Se=async(te="Professional")=>{b(!0);try{const me=await(await fetch("/api/ai/reply",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subject:h.subject,body:h.body,tone:te})})).json();me.draftReply&&oe(me.draftReply),me.quickPills&&G(me.quickPills)}catch(y){console.error("AI Smart Reply error:",y)}finally{b(!1)}},He=(te,y)=>{const me=`Omnio Attachment Sample File
Filename: ${te}
Size: ${y}
Generated: ${new Date().toLocaleString()}

Thank you for using Omnio BYOM Client!`,ve=new Blob([me],{type:"text/plain"}),Ee=URL.createObjectURL(ve),_e=document.createElement("a");_e.href=Ee,_e.download=te.includes(".")?te:`${te}.txt`,document.body.appendChild(_e),_e.click(),document.body.removeChild(_e),URL.revokeObjectURL(Ee)};return a.jsxs("div",{className:`flex-1 flex flex-col h-full overflow-y-auto select-none ${c?"bg-[#1f1f1f] text-gray-200":"bg-white text-gray-800"}`,children:[$&&a.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-50 bg-gray-900 text-white px-4 py-2.5 rounded-full text-xs font-semibold shadow-2xl flex items-center space-x-2 animate-bounce",children:[a.jsx(gl,{className:"w-4 h-4 text-emerald-400"}),a.jsx("span",{children:$})]}),a.jsxs("div",{className:`h-12 px-4 flex items-center justify-between border-b text-xs sticky top-0 z-10 ${c?"border-[#333333] bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsxs("div",{className:"flex items-center space-x-1.5 sm:space-x-2",children:[a.jsx("button",{onClick:S,className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Back to list",children:a.jsx(Es,{className:"w-4 h-4"})}),a.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-700 mx-1"}),a.jsx("button",{onClick:p,className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Archive",children:a.jsx(Gr,{className:"w-4 h-4"})}),a.jsx("button",{onClick:Y,className:"p-1.5 rounded-full hover:bg-rose-50 dark:hover:bg-rose-950/40 text-rose-600 dark:text-rose-400 cursor-pointer",title:"Delete email",children:a.jsx(oa,{className:"w-4 h-4"})}),a.jsx("button",{onClick:ee,className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Mark as unread",children:a.jsx(Ll,{className:"w-4 h-4"})}),a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>ke(!ye),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Snooze",children:a.jsx(Mn,{className:"w-4 h-4"})}),ye&&a.jsxs("div",{className:`absolute left-0 top-9 w-48 rounded-xl shadow-xl p-2 z-50 border text-xs space-y-1 ${c?"bg-[#28292c] border-gray-700 text-gray-200":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsx("div",{className:"font-bold text-[11px] text-gray-400 uppercase px-2 py-1",children:"Snooze Until"}),a.jsx("button",{onClick:()=>xe("Later today (6:00 PM)"),className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 dark:hover:bg-blue-900/30 cursor-pointer",children:"Later today (6:00 PM)"}),a.jsx("button",{onClick:()=>xe("Tomorrow (8:00 AM)"),className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 dark:hover:bg-blue-900/30 cursor-pointer",children:"Tomorrow (8:00 AM)"}),a.jsx("button",{onClick:()=>xe("Next week (Mon 8:00 AM)"),className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-blue-50 dark:hover:bg-blue-900/30 cursor-pointer",children:"Next week (Mon 8:00 AM)"})]})]}),a.jsx("button",{onClick:ge,className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-sky-600 dark:text-sky-400 cursor-pointer",title:"Add to Tasks",children:a.jsx(fm,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"flex items-center space-x-1.5 sm:space-x-2",children:[a.jsx("button",{onClick:u,className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Print email",children:a.jsx($x,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>le(!0),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Pop out view",children:a.jsx(Ox,{className:"w-4 h-4"})}),a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>re(!ie),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"More options",children:a.jsx(Qr,{className:"w-4 h-4"})}),ie&&a.jsxs("div",{className:`absolute right-0 top-9 w-48 rounded-xl shadow-xl p-2 z-50 border text-xs space-y-1 ${c?"bg-[#28292c] border-gray-700 text-gray-200":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsx("button",{onClick:ge,className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 cursor-pointer font-medium",children:"Add to Tasks todo"}),a.jsx("button",{onClick:u,className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 cursor-pointer",children:"Print email"}),a.jsx("button",{onClick:()=>{se("Filter created"),re(!1)},className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 cursor-pointer",children:"Filter messages like this"}),a.jsx("button",{onClick:()=>{se("Reported as Spam"),re(!1)},className:"w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 cursor-pointer text-rose-500",children:"Report Spam"})]})]})]})]}),fe&&a.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-xs flex items-center justify-center p-4",children:a.jsxs("div",{className:`w-full max-w-3xl rounded-2xl shadow-2xl border p-6 space-y-4 max-h-[85vh] overflow-y-auto ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-900"}`,children:[a.jsxs("div",{className:"flex items-center justify-between border-b pb-3 border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Ox,{className:"w-5 h-5 text-blue-600"}),a.jsx("h2",{className:"font-bold text-base truncate",children:h.subject})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:u,className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/10",title:"Print",children:a.jsx($x,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>le(!1),className:"px-3 py-1 bg-gray-200 dark:bg-gray-700 rounded-lg text-xs font-semibold",children:"Close Window"})]})]}),a.jsxs("div",{className:"text-xs space-y-1 text-gray-500",children:[a.jsxs("p",{children:[a.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"From:"})," ",h.senderName," (",h.senderEmail,")"]}),a.jsxs("p",{children:[a.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Date:"})," ",h.date]})]}),a.jsx("div",{className:`p-4 rounded-xl border text-xs leading-relaxed whitespace-pre-wrap ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-200"}`,children:h.body})]})}),a.jsxs("div",{className:"max-w-4xl w-full mx-auto p-3 sm:p-6 space-y-4 sm:space-y-6",children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsxs("h1",{className:"text-xl font-bold font-sans tracking-tight text-gray-900 dark:text-gray-100 flex items-center space-x-2",children:[a.jsx("span",{children:h.subject}),h.labels.map(te=>a.jsx("span",{className:"text-[10px] uppercase font-mono px-2 py-0.5 rounded bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 font-semibold",children:te},te))]}),a.jsxs("p",{className:"text-xs text-gray-400",children:["Thread ID: ",a.jsx("span",{className:"font-mono",children:h.threadId})," • Connected Account: ",a.jsx("span",{className:"text-blue-500 font-medium",children:h.accountEmail})]})]}),a.jsx("button",{onClick:()=>z(h.id),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/10",children:a.jsx(pl,{className:`w-5 h-5 ${h.starred?"fill-amber-400 text-amber-400":"text-gray-400"}`})})]}),a.jsxs("div",{className:`p-4 rounded-2xl border shadow-sm transition-all ${c?"bg-gradient-to-r from-blue-950/40 via-indigo-950/30 to-purple-950/40 border-blue-800/40":"bg-gradient-to-r from-blue-50/80 via-indigo-50/50 to-purple-50/80 border-blue-200"}`,children:[a.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-blue-200/50 dark:border-blue-800/40",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("div",{className:"w-6 h-6 rounded-lg bg-gradient-to-tr from-blue-600 to-indigo-600 flex items-center justify-center text-white",children:a.jsx(Tt,{className:"w-3.5 h-3.5 text-amber-300"})}),a.jsx("span",{className:"font-bold text-xs text-blue-900 dark:text-blue-200",children:"Omnio Gemini AI Copilot"})]}),a.jsxs("button",{onClick:Ne,disabled:K,className:"px-3 py-1 rounded-full text-xs font-semibold bg-blue-600 hover:bg-blue-700 text-white shadow-sm flex items-center space-x-1 transition-all",children:[a.jsx(Kr,{className:`w-3 h-3 ${K?"animate-spin":""}`}),a.jsx("span",{children:K?"Analyzing...":"Generate Fresh AI Summary"})]})]}),a.jsxs("div",{className:"pt-3 text-xs space-y-2",children:[P?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-gray-700 dark:text-gray-300 leading-relaxed font-medium",children:P}),ae&&ae.length>0&&a.jsxs("div",{className:"pt-2 border-t border-blue-200/40 dark:border-blue-900/40",children:[a.jsx("span",{className:"font-bold text-[11px] text-blue-700 dark:text-blue-300 uppercase tracking-wider block mb-1",children:"🎯 Action Items Extracted:"}),a.jsx("ul",{className:"list-disc list-inside space-y-0.5 text-gray-600 dark:text-gray-400",children:ae.map((te,y)=>a.jsx("li",{children:te},y))})]})]}):a.jsx("p",{className:"text-gray-500 dark:text-gray-400 italic",children:'Click "Generate Fresh AI Summary" above to have Gemini synthesize key points and action items from this message.'}),a.jsxs("div",{className:"pt-2 flex items-center space-x-2 overflow-x-auto",children:[a.jsx("span",{className:"text-[10px] text-gray-500 font-semibold uppercase tracking-wider shrink-0",children:"Quick AI Replies:"}),U.map((te,y)=>a.jsx("button",{onClick:()=>{var me;oe(te),(me=R.current)==null||me.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{var ve;return(ve=Q.current)==null?void 0:ve.focus()},200)},className:"px-2.5 py-1 rounded-full text-[11px] bg-white dark:bg-[#2d2e30] hover:bg-blue-100 dark:hover:bg-blue-900/40 text-blue-700 dark:text-blue-300 border border-blue-200 dark:border-blue-800 shrink-0 font-medium transition-colors cursor-pointer shadow-2xs",children:te},y))]})]})]}),a.jsxs("div",{className:`p-4 rounded-2xl border ${c?"bg-[#28292c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[h.senderAvatar?a.jsx("img",{src:h.senderAvatar,alt:"",className:"w-10 h-10 rounded-full object-cover ring-2 ring-gray-300 dark:ring-gray-600"}):a.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-600 text-white flex items-center justify-center font-bold text-sm",children:h.senderName.charAt(0)}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"font-bold text-sm text-gray-900 dark:text-gray-100",children:h.senderName}),a.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["<",h.senderEmail,">"]})]}),a.jsxs("div",{className:"flex items-center space-x-1.5 text-xs text-gray-500 mt-0.5",children:[a.jsx("span",{children:"to me"}),a.jsx("button",{onClick:()=>I(!W),className:"p-0.5 rounded hover:bg-black/5 dark:hover:bg-white/10",children:a.jsx(ha,{className:"w-3.5 h-3.5"})})]})]})]}),a.jsx("div",{className:"text-right",children:a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 font-medium",children:h.date})})]}),W&&a.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-700 text-xs space-y-1 font-mono text-gray-600 dark:text-gray-300 bg-white/50 dark:bg-black/20 p-3 rounded-xl",children:[a.jsxs("p",{children:[a.jsx("span",{className:"font-semibold text-gray-400",children:"From:"})," ",h.senderName," <",h.senderEmail,">"]}),a.jsxs("p",{children:[a.jsx("span",{className:"font-semibold text-gray-400",children:"To:"})," ",h.recipients.join(", ")]}),a.jsxs("p",{children:[a.jsx("span",{className:"font-semibold text-gray-400",children:"Date:"})," ",new Date(h.timestamp).toLocaleString()]}),a.jsxs("p",{className:"flex items-center text-emerald-600 dark:text-emerald-400 font-semibold pt-1",children:[a.jsx(Jr,{className:"w-3.5 h-3.5 mr-1"})," Standard Encryption (TLS via Dovecot/Exchange IMAP Bridge)"]})]})]}),h.bodyHtml?a.jsx("div",{className:`rounded-2xl border overflow-hidden ${c?"border-gray-700":"border-gray-200"}`,children:a.jsx("iframe",{sandbox:"",srcDoc:h.bodyHtml,title:"Email content",className:"w-full min-h-[480px] bg-white"})}):a.jsx("div",{className:`p-6 rounded-2xl border min-h-[160px] text-sm leading-relaxed whitespace-pre-wrap font-sans ${c?"bg-[#252628] border-gray-700 text-gray-200":"bg-white border-gray-200 text-gray-800"}`,children:h.body||"Loading message…"}),h.attachments&&h.attachments.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-gray-500 flex items-center space-x-1.5",children:[a.jsx(Xr,{className:"w-4 h-4"}),a.jsxs("span",{children:["Attachments (",h.attachments.length,")"]})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:h.attachments.map(te=>a.jsxs("div",{className:`p-3 rounded-xl border flex items-center justify-between hover:shadow-md transition-shadow ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3 truncate",children:[a.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-100 dark:bg-blue-900/60 text-blue-600 dark:text-blue-300 flex items-center justify-center font-bold text-xs uppercase",children:te.fileType}),a.jsxs("div",{className:"truncate text-xs",children:[a.jsx("p",{className:"font-semibold truncate",children:te.fileName}),a.jsx("p",{className:"text-[10px] text-gray-400",children:te.fileSize})]})]}),a.jsx("button",{onClick:()=>He(te.fileName,te.fileSize),className:"p-1.5 rounded-lg hover:bg-blue-50 dark:hover:bg-blue-950/50 text-gray-500 hover:text-blue-600 cursor-pointer transition-colors",title:`Download ${te.fileName}`,children:a.jsx(go,{className:"w-4 h-4"})})]},te.id))})]}),a.jsxs("div",{ref:R,className:`p-4 rounded-2xl border space-y-3 transition-all ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-gray-200 dark:border-gray-700",children:[a.jsxs("span",{className:"font-bold text-xs text-gray-700 dark:text-gray-300 flex items-center space-x-1.5",children:[a.jsx(Lg,{className:"w-4 h-4 text-blue-500"}),a.jsxs("span",{children:["Reply to ",h.senderName]})]}),a.jsx("div",{className:"flex items-center space-x-1.5",children:a.jsxs("button",{onClick:()=>Se("Professional"),disabled:A,className:"px-2.5 py-1 rounded-lg text-xs font-semibold bg-indigo-50 dark:bg-indigo-950/60 text-indigo-600 dark:text-indigo-300 hover:bg-indigo-100 flex items-center space-x-1 cursor-pointer",children:[a.jsx(jo,{className:"w-3 h-3"}),a.jsx("span",{children:"AI Polish Draft"})]})})]}),a.jsxs("div",{className:"flex items-center space-x-2 overflow-x-auto pb-1",children:[a.jsx("span",{className:"text-[10px] text-gray-400 uppercase font-semibold shrink-0",children:"Quick Replies:"}),["Thanks, received!","Sounds great, let's schedule a call.","Could you please send more details?","I will review this and get back to you shortly."].map((te,y)=>a.jsx("button",{type:"button",onClick:()=>{var me;oe(te),(me=Q.current)==null||me.focus()},className:"px-2.5 py-1 rounded-full text-[11px] bg-blue-50 dark:bg-blue-950/40 text-blue-600 dark:text-blue-300 hover:bg-blue-100 dark:hover:bg-blue-900/60 border border-blue-200/60 shrink-0 font-medium transition-colors cursor-pointer",children:te},y))]}),a.jsx("textarea",{ref:Q,value:ue,onChange:te=>oe(te.target.value),placeholder:`Write a reply to ${h.senderName}...`,rows:4,className:`w-full p-3 text-xs rounded-xl border outline-none font-sans ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100 placeholder-gray-500":"bg-gray-50 border-gray-200 text-gray-800 placeholder-gray-400"}`}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{className:"text-[11px] text-gray-400",children:["Sending from ",a.jsx("span",{className:"font-semibold text-blue-500",children:h.accountEmail})]}),a.jsxs("button",{onClick:()=>{alert(`Reply sent to ${h.senderEmail}!`),oe("")},disabled:!ue.trim(),className:"px-5 py-2 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-md flex items-center space-x-2 disabled:opacity-50",children:[a.jsx(Ao,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Send Reply"})]})]})]})]})]})},qp=["#000000","#333333","#666666","#999999","#cccccc","#e6e6e6","#f3f3f3","#ffffff","#ff0000","#ff6600","#ffff00","#00ff00","#00ffff","#0000ff","#9900ff","#ff00ff","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc","#f4ccd3","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd","#ea9999","#e69138","#f1c232","#6aa84f","#45818e","#3c78d8","#674ea7","#a64d79","#cc0000","#b45f06","#bf9000","#38761d","#134f5c","#1155cc","#351c75","#741b47","#990000","#783f04","#7f6000","#274e13","#0c343d","#1c4587","#20124d","#4c1130","#660000"],$p=["#000000","#333333","#666666","#999999","#cccccc","#e6e6e6","#f3f3f3","#ffffff","#ff0000","#ff6600","#ffff00","#00ff00","#00ffff","#0000ff","#9900ff","#ff00ff","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc","#f4ccd3","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd","#ea9999","#e69138","#f1c232","#6aa84f","#45818e","#3c78d8","#674ea7","#a64d79","#cc0000","#b45f06","#bf9000","#38761d","#134f5c","#1155cc","#351c75","#741b47","#990000","#783f04","#7f6000","#274e13","#0c343d","#1c4587","#20124d","#4c1130","#660000"],fo=[{id:"smileys",name:"Smileys & People",emojis:["😊","😀","😃","😄","😁","😅","😂","🤣","🙂","🙃","😉","😇","🥰","😍","🤩","😘","😋","😛","😜","🤪","🧐","🤓","😎","🥳","😏","😒","😞","😔","😟","😕","🙁","😣","😫","😩","🥺","😢","😭","😤","😠","🤯","😳","😱","😨","😰","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","🥱","😴","😷","🤒","🤕"]},{id:"gestures",name:"Gestures",emojis:["👍","👎","👌","✌️","🤞","🤟","🤘","🤙","👈","👉","👆","👇","☝️","✋","🤚","🖐️","🖖","👋","✍️","🙏","💪","🤝","👀","🧠","🫀","👂","👃"]},{id:"work",name:"Work & Objects",emojis:["💼","📊","📈","📉","📌","📍","📝","✏️","📄","📁","📂","📅","📆","🗓️","📋","🖊️","🔍","💡","✨","⚡","🔥","🎉","🎊","⭐","🌟","💖","❤️","💙","✅","❌","💯","🚀","⏰","📞","📧","🏷️","🔒","🔑"]}],Kx=[{id:"drv_1",name:"Q3_Financial_Report_Final.pdf",size:"2.4 MB",type:"application/pdf",modified:"Today, 10:14 AM",icon:"📄"},{id:"drv_2",name:"2026_Budget_Projections.xlsx",size:"1.1 MB",type:"application/vnd.ms-excel",modified:"Yesterday, 4:30 PM",icon:"📊"},{id:"drv_3",name:"App_Design_Tokens_v2.fig",size:"18.5 MB",type:"image/svg+xml",modified:"Aug 2, 2026",icon:"🎨"},{id:"drv_4",name:"Executive_Board_Meeting_Notes.docx",size:"450 KB",type:"application/msword",modified:"Jul 28, 2026",icon:"📝"},{id:"drv_5",name:"Product_Launch_Deck.pptx",size:"14.2 MB",type:"application/vnd.ms-powerpoint",modified:"Jul 20, 2026",icon:"📽️"},{id:"drv_6",name:"Customer_Feedback_Analytics.csv",size:"820 KB",type:"text/csv",modified:"Jul 15, 2026",icon:"📈"}],Gp=({darkMode:c,isOpen:h,onClose:S,accounts:d,activeAccountId:z,onSendEmail:M,onSaveDraft:V,onShowToast:q})=>{var Pe,dt;const[k,g]=m.useState(z||((Pe=d[0])==null?void 0:Pe.id)||""),[R,Q]=m.useState(""),[W,I]=m.useState(""),[K,X]=m.useState(""),[P,be]=m.useState(!1),[ae,L]=m.useState(!1),[J,ce]=m.useState(""),[fe,le]=m.useState(!1),[ye,ke]=m.useState(!1),[ie,re]=m.useState(!1),[$,de]=m.useState(!1),[ue,oe]=m.useState("#ffffff"),[A,b]=m.useState("#000000"),[U,G]=m.useState(!1),[se,u]=m.useState(!1),[p,Y]=m.useState(!1),[ee,xe]=m.useState(!1),[ge,Ne]=m.useState([]),[Se,He]=m.useState(""),[te,y]=m.useState(!1),[me,ve]=m.useState(!1),[Ee,_e]=m.useState(""),[T,Re]=m.useState(""),[Ie,ct]=m.useState("smileys"),[D,he]=m.useState(!1),[ze,kt]=m.useState(""),[Xe,Ot]=m.useState([]),Qe=m.useRef(null),Qa=m.useRef(null),[ga,Ts]=m.useState(()=>"draft_"+Date.now()),[ka,$l]=m.useState(""),[yl,Pt]=m.useState("idle");if(m.useEffect(()=>{z&&d.some(_=>_.id===z)?g(z):d.length>0&&g(d[0].id)},[z,d]),m.useEffect(()=>{var Yt,Qt;const _=((Yt=Qe.current)==null?void 0:Yt.innerText.trim())||ka.trim(),Me=((Qt=Qe.current)==null?void 0:Qt.innerHTML)||"",Ue=!!(R.trim()||W.trim()||K.trim()||J.trim()||_||ge.length>0);if(!Ue){Pt("idle");return}Pt("saving");const Je=setTimeout(()=>{V&&Ue&&(V({id:ga,accountId:k,recipients:R?R.split(",").map(ua=>ua.trim()).filter(Boolean):[],subject:J||"(no subject)",snippet:_?_.substring(0,90):"Draft message",body:Me,attachments:ge}),Pt("saved"))},5e3);return()=>clearTimeout(Je)},[R,W,K,J,ka,ge,k,ga]),!h)return null;const vt=d.find(_=>_.id===k)||d[0],We=(_,Me=void 0)=>{document.execCommand(_,!1,Me),Qe.current&&Qe.current.focus()},St=_=>{if(!Qe.current){y(!1);return}const Me=_.replace(/\n/g,"<br/>");let Ue=0;const Je=3;Qe.current.innerHTML="";const Yt=setInterval(()=>{Ue+=Je,Ue>=Me.length?(clearInterval(Yt),Qe.current&&(Qe.current.innerHTML=Me),y(!1)):Qe.current&&(Qe.current.innerHTML=Me.substring(0,Ue)+'<span class="inline-block w-2 h-4 bg-blue-600 dark:bg-blue-400 animate-pulse align-middle ml-0.5 rounded-xs"></span>')},18)},vl=async(_="compose")=>{var Ue;const Me=Se.trim()||J.trim()||"Draft a professional business follow up email";y(!0);try{const Yt=await(await fetch("/api/ai/draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:Me,currentDraft:((Ue=Qe.current)==null?void 0:Ue.innerText)||"",mode:_,tone:"Professional"})})).json();if(Yt.draft){let Qt=Yt.draft;if(_==="compose"&&Qt.startsWith("Subject:")){const ua=Qt.split(`

`);ua.length>1&&(ce(ua[0].replace("Subject: ","").trim()),Qt=ua.slice(1).join(`

`))}He(""),St(Qt)}else y(!1)}catch(Je){console.error("AI draft generation error:",Je),y(!1)}},zs=()=>{var Me,Ue;if(!R.trim()){alert("Please enter a recipient email address in the To field.");return}const _=((Me=Qe.current)==null?void 0:Me.innerHTML)||"";M&&M({accountId:k,recipients:R.split(",").map(Je=>Je.trim()).filter(Boolean),cc:W?W.split(",").map(Je=>Je.trim()).filter(Boolean):void 0,bcc:K?K.split(",").map(Je=>Je.trim()).filter(Boolean):void 0,subject:J||"(No subject)",body:_,snippet:((Ue=Qe.current)==null?void 0:Ue.innerText.substring(0,90))||"",attachments:ge}),da()},Sa=(_=!0)=>{var Yt,Qt;const Me=((Yt=Qe.current)==null?void 0:Yt.innerText.trim())||ka.trim(),Ue=((Qt=Qe.current)==null?void 0:Qt.innerHTML)||"";!!(R.trim()||J.trim()||Me||ge.length>0)&&_&&V&&(V({id:ga,accountId:k,recipients:R?R.split(",").map(ua=>ua.trim()).filter(Boolean):[],subject:J||"(no subject)",snippet:Me?Me.substring(0,90):"Draft message",body:Ue,attachments:ge}),q&&q("Draft saved in Drafts folder")),da()},da=()=>{Q(""),I(""),X(""),ce(""),$l(""),Pt("idle"),Ts("draft_"+Date.now()),Qe.current&&(Qe.current.innerHTML=""),Ne([]),He(""),xe(!1),re(!1),de(!1),G(!1),u(!1),Y(!1),S()},v=_=>{if(_.target.files&&_.target.files.length>0){const Ue=Array.from(_.target.files).map(Je=>({id:"att_"+Math.random().toString(36).substr(2,9),name:Je.name,size:(Je.size/1024).toFixed(1)+" KB",type:Je.type||"application/octet-stream"}));Ne(Je=>[...Je,...Ue])}},F=_=>{Ne(Me=>Me.filter(Ue=>Ue.id!==_))},ne=_=>{Qe.current&&(Qe.current.focus(),document.execCommand("insertText",!1,_)),G(!1)},we=()=>{if(!Ee)return;const _=Ee.startsWith("http")?Ee:`https://${Ee}`;if(Qe.current){Qe.current.focus();const Me=window.getSelection();if(Me&&Me.toString().length>0)document.execCommand("createLink",!1,_);else{const Je=`<a href="${_}" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline">${T||_}</a>`;document.execCommand("insertHTML",!1,Je)}}_e(""),Re(""),ve(!1)},Ye=()=>{const _=`<br/><br/>--<br/><strong>${vt.name}</strong><br/><span style="color:#666;">${vt.email}</span><br/><span style="color:#2563eb;font-size:11px;">Sent via Omnio BYOM</span>`;Qe.current&&(Qe.current.focus(),document.execCommand("insertHTML",!1,_))};return fe?a.jsxs("div",{onClick:()=>le(!1),className:`fixed bottom-0 right-4 z-50 w-72 h-11 px-4 rounded-t-xl shadow-2xl border flex items-center justify-between cursor-pointer select-none transition-all ${c?"bg-[#28292c] border-gray-700 text-gray-200 hover:bg-[#323438]":"bg-[#f2f6fc] border-gray-300 text-gray-800 hover:bg-[#e4ebf5]"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2 truncate",children:[a.jsx(Tt,{className:"w-4 h-4 text-blue-500 shrink-0"}),a.jsx("span",{className:"font-semibold text-xs truncate",children:J||"New Message"})]}),a.jsxs("div",{className:"flex items-center space-x-1 shrink-0",onClick:_=>_.stopPropagation(),children:[a.jsx("button",{onClick:()=>le(!1),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:"Expand",children:a.jsx(Lx,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:da,className:"p-1 rounded hover:bg-rose-50 dark:hover:bg-rose-950/40 text-gray-500 hover:text-rose-600 cursor-pointer",title:"Close",children:a.jsx(wt,{className:"w-4 h-4"})})]})]}):a.jsxs("div",{className:`fixed z-50 rounded-t-2xl shadow-2xl border flex flex-col transition-all duration-200 ${ye?"inset-2 sm:inset-6 w-auto h-auto":"bottom-0 right-0 sm:right-4 w-full sm:w-[580px] max-w-full h-[620px] max-h-[92vh]"} ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-800"}`,children:[a.jsx("input",{type:"file",ref:Qa,onChange:v,multiple:!0,className:"hidden"}),a.jsxs("div",{className:`h-11 px-4 flex items-center justify-between rounded-t-2xl select-none shrink-0 ${c?"bg-[#1f1f1f] text-gray-200 border-b border-gray-800":"bg-[#f2f6fc] text-gray-800 border-b border-gray-200"}`,children:[a.jsx("div",{className:"flex items-center space-x-2",children:a.jsx("span",{className:"font-semibold text-xs font-sans text-gray-800 dark:text-gray-100",children:"New Message"})}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx("button",{onClick:()=>le(!0),className:"p-1 rounded hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:"Minimize",children:a.jsx(bg,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>ke(!ye),className:"p-1 rounded hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:ye?"Restore size":"Maximize",children:ye?a.jsx(fg,{className:"w-3.5 h-3.5"}):a.jsx(Lx,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>Sa(!0),className:"p-1 rounded hover:bg-rose-50 dark:hover:bg-rose-950/40 text-gray-500 hover:text-rose-600 cursor-pointer",title:"Close and save draft",children:a.jsx(wt,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{className:"px-4 py-2 border-b border-gray-200 dark:border-gray-700/60 space-y-1 text-xs shrink-0",children:[a.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[a.jsx("span",{className:"text-gray-400 font-medium w-16 shrink-0",children:"From:"}),a.jsx("select",{value:k,onChange:_=>g(_.target.value),className:`flex-1 p-1 rounded border text-xs outline-none font-medium cursor-pointer ${c?"bg-[#1f1f1f] border-gray-700 text-blue-300":"bg-gray-50 border-gray-300 text-blue-700"}`,children:d.map(_=>a.jsxs("option",{value:_.id,children:[_.name," <",_.email,"> (",_.providerDisplayName,")"]},_.id))})]}),a.jsxs("div",{className:"flex items-center border-b border-gray-100 dark:border-gray-800/80 py-1",children:[a.jsx("span",{className:"text-gray-400 font-medium w-16 shrink-0",children:"To:"}),a.jsx("input",{type:"text",value:R,onChange:_=>Q(_.target.value),placeholder:"Recipients",className:"flex-1 bg-transparent border-none outline-none text-xs text-gray-900 dark:text-gray-100 placeholder-gray-400"}),a.jsxs("div",{className:"flex items-center space-x-2 text-[11px] text-gray-400 font-medium shrink-0 ml-2",children:[!P&&a.jsx("button",{onClick:()=>be(!0),className:"hover:text-gray-700 dark:hover:text-gray-200 cursor-pointer",children:"Cc"}),!ae&&a.jsx("button",{onClick:()=>L(!0),className:"hover:text-gray-700 dark:hover:text-gray-200 cursor-pointer",children:"Bcc"})]})]}),P&&a.jsxs("div",{className:"flex items-center border-b border-gray-100 dark:border-gray-800/80 py-1 animate-in fade-in",children:[a.jsx("span",{className:"text-gray-400 font-medium w-16 shrink-0",children:"Cc:"}),a.jsx("input",{type:"text",value:W,onChange:_=>I(_.target.value),placeholder:"Cc recipients",className:"flex-1 bg-transparent border-none outline-none text-xs text-gray-900 dark:text-gray-100 placeholder-gray-400"}),a.jsx("button",{onClick:()=>be(!1),className:"text-gray-400 hover:text-gray-600 text-[10px]",children:"✕"})]}),ae&&a.jsxs("div",{className:"flex items-center border-b border-gray-100 dark:border-gray-800/80 py-1 animate-in fade-in",children:[a.jsx("span",{className:"text-gray-400 font-medium w-16 shrink-0",children:"Bcc:"}),a.jsx("input",{type:"text",value:K,onChange:_=>X(_.target.value),placeholder:"Bcc recipients",className:"flex-1 bg-transparent border-none outline-none text-xs text-gray-900 dark:text-gray-100 placeholder-gray-400"}),a.jsx("button",{onClick:()=>L(!1),className:"text-gray-400 hover:text-gray-600 text-[10px]",children:"✕"})]}),a.jsx("div",{className:"flex items-center py-1",children:a.jsx("input",{type:"text",value:J,onChange:_=>ce(_.target.value),placeholder:"Subject",className:"w-full bg-transparent border-none outline-none text-xs font-semibold text-gray-900 dark:text-gray-100 placeholder-gray-400"})})]}),ee&&a.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/40 border-b border-amber-200 dark:border-amber-800 px-4 py-1.5 flex items-center justify-between text-[11px] text-amber-800 dark:text-amber-300",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Zr,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Confidential mode: Recipients won't have options to forward, copy, print, or download."})]}),a.jsx("button",{onClick:()=>xe(!1),className:"hover:underline font-bold",children:"Remove"})]}),ie&&a.jsxs("div",{className:`px-3 py-1.5 border-b flex items-center flex-wrap gap-1 text-xs shrink-0 ${c?"bg-[#1f2124] border-gray-700 text-gray-200":"bg-gray-100 border-gray-200 text-gray-700"}`,children:[a.jsxs("select",{onChange:_=>We("fontName",_.target.value),className:"bg-transparent text-xs p-1 rounded border border-gray-300 dark:border-gray-600 outline-none cursor-pointer",children:[a.jsx("option",{value:"Sans-Serif",children:"Sans Serif"}),a.jsx("option",{value:"Serif",children:"Serif"}),a.jsx("option",{value:"Fixed Width",children:"Monospace"}),a.jsx("option",{value:"Georgia",children:"Georgia"}),a.jsx("option",{value:"Verdana",children:"Verdana"})]}),a.jsxs("select",{onChange:_=>We("fontSize",_.target.value),className:"bg-transparent text-xs p-1 rounded border border-gray-300 dark:border-gray-600 outline-none cursor-pointer",children:[a.jsx("option",{value:"2",children:"Small"}),a.jsx("option",{value:"3",children:"Normal"}),a.jsx("option",{value:"5",children:"Large"}),a.jsx("option",{value:"7",children:"Huge"})]}),a.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-700 mx-1"}),a.jsx("button",{onClick:()=>We("bold"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 font-bold",title:"Bold (Ctrl+B)",children:a.jsx(lm,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("italic"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 italic",title:"Italic (Ctrl+I)",children:a.jsx(im,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("underline"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 underline",title:"Underline (Ctrl+U)",children:a.jsx(pm,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("strikeThrough"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Strikethrough",children:a.jsx(ip,{className:"w-3.5 h-3.5"})}),a.jsxs("div",{className:"relative inline-block",children:[a.jsxs("button",{onClick:()=>de(!$),className:`px-1.5 py-0.5 rounded hover:bg-black/10 dark:hover:bg-white/10 flex items-center space-x-0.5 border cursor-pointer ${$?"bg-black/10 dark:bg-white/20 border-gray-400":"border-transparent"}`,title:"Text color & background color",children:[a.jsx("span",{className:"font-bold text-xs border-b-2 border-blue-600 px-0.5",children:"A"}),a.jsx(ha,{className:"w-3 h-3 text-gray-500"})]}),$&&a.jsxs("div",{className:`absolute top-full left-0 mt-1 p-3 rounded-2xl shadow-2xl border z-[200] flex items-start space-x-4 w-max shrink-0 ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsxs("div",{className:"flex flex-col shrink-0 w-[156px]",children:[a.jsx("span",{className:"text-[11px] font-semibold text-gray-600 dark:text-gray-300 mb-2 block truncate",children:"Background color"}),a.jsx("div",{className:"grid grid-cols-8 gap-1 w-[156px] shrink-0",children:qp.map((_,Me)=>{const Ue=ue.toLowerCase()===_.toLowerCase(),Je=_==="#ffffff"||_==="#f3f3f3"||_==="#e6e6e6"||_.startsWith("#f")||_.startsWith("#d")||_.startsWith("#e");return a.jsx("button",{type:"button",onClick:()=>{We("hiliteColor",_),We("backColor",_),oe(_)},style:{backgroundColor:_},className:"w-4 h-4 rounded-xs border border-gray-300 dark:border-gray-600 flex items-center justify-center hover:scale-110 cursor-pointer transition-transform shrink-0",title:`Background: ${_}`,children:Ue&&a.jsx(tt,{className:`w-3 h-3 ${Je?"text-black":"text-white"}`})},Me)})})]}),a.jsx("div",{className:"w-px h-28 bg-gray-200 dark:bg-gray-700 shrink-0 my-1 self-stretch"}),a.jsxs("div",{className:"flex flex-col shrink-0 w-[156px]",children:[a.jsx("span",{className:"text-[11px] font-semibold text-gray-600 dark:text-gray-300 mb-2 block truncate",children:"Text color"}),a.jsx("div",{className:"grid grid-cols-8 gap-1 w-[156px] shrink-0",children:$p.map((_,Me)=>{const Ue=A.toLowerCase()===_.toLowerCase(),Je=_==="#ffffff"||_==="#f3f3f3"||_==="#e6e6e6"||_.startsWith("#f")||_.startsWith("#d")||_.startsWith("#e");return a.jsx("button",{type:"button",onClick:()=>{We("foreColor",_),b(_)},style:{backgroundColor:_},className:"w-4 h-4 rounded-xs border border-gray-300 dark:border-gray-600 flex items-center justify-center hover:scale-110 cursor-pointer transition-transform shrink-0",title:`Text: ${_}`,children:Ue&&a.jsx(tt,{className:`w-3 h-3 ${Je?"text-black":"text-white"}`})},Me)})})]})]})]}),a.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-700 mx-1"}),a.jsx("button",{onClick:()=>We("justifyLeft"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Align Left",children:a.jsx(gm,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("justifyCenter"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Align Center",children:a.jsx(hm,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("justifyRight"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Align Right",children:a.jsx(bm,{className:"w-3.5 h-3.5"})}),a.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-700 mx-1"}),a.jsx("button",{onClick:()=>We("insertUnorderedList"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Bulleted list",children:a.jsx(Co,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("insertOrderedList"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Numbered list",children:a.jsx(cm,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>We("formatBlock","blockquote"),className:"p-1 rounded hover:bg-black/10 dark:hover:bg-white/10",title:"Quote block",children:a.jsx(Hg,{className:"w-3.5 h-3.5"})}),a.jsx("div",{className:"h-4 w-px bg-gray-300 dark:bg-gray-700 mx-1"}),a.jsx("button",{onClick:()=>We("removeFormat"),className:"px-2 py-0.5 text-[11px] rounded hover:bg-black/10 dark:hover:bg-white/10 text-gray-500",title:"Remove formatting",children:"Tx"})]}),a.jsxs("div",{className:"flex-1 p-4 flex flex-col relative overflow-y-auto min-h-[140px]",children:[te&&a.jsxs("div",{className:"flex items-center space-x-3 p-3 rounded-xl bg-gradient-to-r from-blue-500/10 via-indigo-500/10 to-purple-500/10 border border-blue-500/30 text-blue-600 dark:text-blue-300 mb-3 animate-pulse shrink-0",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-600 text-white shrink-0 shadow-sm",children:a.jsx(Tt,{className:"w-4 h-4 animate-spin"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"font-bold text-xs",children:"Gemini AI is writing your email message..."}),a.jsxs("span",{className:"inline-flex space-x-1",children:[a.jsx("span",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.3s]"}),a.jsx("span",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]"}),a.jsx("span",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full animate-bounce"})]})]}),a.jsx("p",{className:"text-[10px] text-gray-500 dark:text-gray-400",children:"Crafting professional response & drafting content live..."})]})]}),a.jsx("div",{ref:Qe,contentEditable:!te,suppressContentEditableWarning:!0,onInput:()=>{var _;return $l(((_=Qe.current)==null?void 0:_.innerText)||"")},className:"w-full flex-1 outline-none text-xs leading-relaxed font-sans min-h-[120px] text-gray-900 dark:text-gray-100 whitespace-pre-wrap focus:ring-0","data-placeholder":"Press / to write using Omnio Mail & Drive"}),ge.length>0&&a.jsx("div",{className:"mt-3 pt-2 border-t border-gray-200 dark:border-gray-700 flex flex-wrap gap-2",children:ge.map(_=>a.jsxs("div",{className:`flex items-center space-x-2 px-2.5 py-1 rounded-lg border text-xs ${c?"bg-[#1f2124] border-gray-700":"bg-gray-100 border-gray-300"}`,children:[a.jsx(Xr,{className:"w-3.5 h-3.5 text-blue-500"}),a.jsx("span",{className:"font-medium max-w-[140px] truncate",children:_.name}),a.jsxs("span",{className:"text-[10px] text-gray-400",children:["(",_.size,")"]}),a.jsx("button",{onClick:()=>F(_.id),className:"text-gray-400 hover:text-rose-500 ml-1 p-0.5 rounded cursor-pointer",children:a.jsx(wt,{className:"w-3 h-3"})})]},_.id))})]}),a.jsxs("div",{className:"px-3 py-2 border-t border-gray-100 dark:border-gray-800 flex items-center justify-between gap-2 shrink-0 bg-white dark:bg-[#28292c]",children:[a.jsxs("div",{className:`flex-1 flex items-center space-x-2 px-3 py-1.5 rounded-full border transition-all ${te?"ring-2 ring-blue-500/50 border-blue-500 bg-blue-50/50 dark:bg-blue-950/30":c?"bg-[#1e2023] border-gray-700 focus-within:border-blue-500":"bg-[#f0f4f9] border-gray-200 focus-within:border-blue-500"}`,children:[te?a.jsx(yo,{className:"w-4 h-4 text-blue-600 dark:text-blue-400 animate-spin shrink-0"}):a.jsx(jo,{className:"w-4 h-4 text-gray-500 dark:text-gray-400 shrink-0"}),a.jsx("input",{type:"text",value:Se,onChange:_=>He(_.target.value),disabled:te,placeholder:te?"Gemini is writing draft...":"Describe your message",className:"flex-1 bg-transparent border-none outline-none text-xs text-gray-800 dark:text-gray-100 placeholder-gray-500 disabled:opacity-75",onKeyDown:_=>{_.key==="Enter"&&vl("compose")}}),a.jsxs("button",{onClick:()=>vl("compose"),disabled:te,className:"p-1 px-2.5 py-1 rounded-full bg-blue-600 text-white hover:bg-blue-700 text-xs shrink-0 cursor-pointer disabled:opacity-60 flex items-center space-x-1",title:"Generate draft",children:[a.jsx(Tt,{className:`w-3 h-3 ${te?"animate-spin":""}`}),te&&a.jsx("span",{className:"text-[10px] font-semibold",children:"Writing..."})]})]}),a.jsxs("div",{className:"flex items-center space-x-1 shrink-0",children:[a.jsx("button",{onClick:()=>We("undo"),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:"Undo",children:a.jsx(ym,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>We("redo"),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:"Redo",children:a.jsx(um,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{className:`h-14 px-3 sm:px-4 flex items-center justify-between border-t rounded-b-2xl shrink-0 relative ${c?"border-gray-700 bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsxs("div",{className:"flex items-center space-x-1 sm:space-x-1.5 flex-wrap",children:[a.jsxs("div",{className:"relative inline-flex items-center rounded-full bg-blue-600 hover:bg-blue-700 text-white shadow-sm shrink-0 mr-1",children:[a.jsx("button",{onClick:zs,className:"px-4 sm:px-5 py-2 font-semibold text-xs flex items-center space-x-1 rounded-l-full hover:bg-blue-700 cursor-pointer",children:a.jsx("span",{children:"Send"})}),a.jsx("div",{className:"w-px h-5 bg-blue-500/80"}),a.jsx("button",{onClick:()=>Y(!p),className:"px-2.5 py-2 rounded-r-full hover:bg-blue-800 cursor-pointer",title:"More send options",children:a.jsx(ha,{className:"w-3.5 h-3.5"})}),p&&a.jsxs("div",{className:`absolute bottom-full left-0 mb-2 w-52 rounded-2xl shadow-2xl border p-2 text-xs z-[100] ${c?"bg-[#28292c] border-gray-700 text-gray-200":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsx("div",{className:"font-semibold text-gray-400 px-2 py-1 text-[11px] border-b border-gray-200 dark:border-gray-700/60 mb-1",children:"Schedule send"}),a.jsxs("button",{onClick:()=>{Y(!1),alert("Scheduled for Tomorrow morning at 8:00 AM")},className:"w-full text-left px-2.5 py-2 hover:bg-blue-50 dark:hover:bg-blue-900/40 hover:text-blue-600 dark:hover:text-blue-300 rounded-xl cursor-pointer transition-colors",children:["Tomorrow morning ",a.jsx("span",{className:"text-gray-400 text-[10px] block",children:"Aug 6, 8:00 AM"})]}),a.jsxs("button",{onClick:()=>{Y(!1),alert("Scheduled for Tomorrow afternoon at 1:00 PM")},className:"w-full text-left px-2.5 py-2 hover:bg-blue-50 dark:hover:bg-blue-900/40 hover:text-blue-600 dark:hover:text-blue-300 rounded-xl cursor-pointer transition-colors",children:["Tomorrow afternoon ",a.jsx("span",{className:"text-gray-400 text-[10px] block",children:"Aug 6, 1:00 PM"})]}),a.jsxs("button",{onClick:()=>{Y(!1),alert("Scheduled for Monday morning at 8:00 AM")},className:"w-full text-left px-2.5 py-2 hover:bg-blue-50 dark:hover:bg-blue-900/40 hover:text-blue-600 dark:hover:text-blue-300 rounded-xl cursor-pointer transition-colors",children:["Monday morning ",a.jsx("span",{className:"text-gray-400 text-[10px] block",children:"Aug 10, 8:00 AM"})]})]})]}),a.jsx("button",{onClick:()=>re(!ie),className:`p-2 rounded-full font-serif font-bold text-sm cursor-pointer transition-colors ${ie?"bg-blue-100 text-blue-700 dark:bg-blue-950 dark:text-blue-300":"hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300"}`,title:"Formatting options",children:"Aa"}),a.jsx("button",{onClick:()=>vl("refine"),className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Help me write (Gemini AI)",children:a.jsx(jo,{className:"w-4 h-4 text-blue-500"})}),a.jsx("button",{onClick:()=>{var _;return(_=Qa.current)==null?void 0:_.click()},className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Attach files",children:a.jsx(Xr,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>ve(!0),className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Insert link",children:a.jsx(Jb,{className:"w-4 h-4"})}),a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>G(!U),className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Insert emoji",children:a.jsx(tp,{className:"w-4 h-4"})}),U&&a.jsxs("div",{className:`absolute bottom-full left-0 mb-2 w-72 rounded-2xl shadow-2xl border p-3 z-[100] ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsx("div",{className:"flex items-center space-x-1 pb-2 border-b border-gray-200 dark:border-gray-700 mb-2 overflow-x-auto text-[11px]",children:fo.map(_=>a.jsx("button",{onClick:()=>ct(_.id),className:`px-2 py-1 rounded-lg font-medium whitespace-nowrap cursor-pointer transition-colors ${Ie===_.id?"bg-blue-600 text-white":"hover:bg-black/5 dark:hover:bg-white/10 text-gray-500"}`,children:_.name},_.id))}),a.jsx("div",{className:"grid grid-cols-7 gap-1 max-h-48 overflow-y-auto pr-1",children:(((dt=fo.find(_=>_.id===Ie))==null?void 0:dt.emojis)||fo[0].emojis).map((_,Me)=>a.jsx("button",{onClick:()=>ne(_),className:"p-1.5 text-lg rounded-lg hover:bg-blue-100 dark:hover:bg-blue-900/50 transition-transform active:scale-125 cursor-pointer flex items-center justify-center",children:_},Me))})]})]}),a.jsx("button",{onClick:()=>{Ot([]),he(!0)},className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Insert files using Drive",children:a.jsx(Vr,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>{var _;return(_=Qa.current)==null?void 0:_.click()},className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Insert photo",children:a.jsx(rm,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>xe(!ee),className:`p-2 rounded-full cursor-pointer transition-colors ${ee?"bg-amber-100 text-amber-700 dark:bg-amber-950 dark:text-amber-300":"hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300"}`,title:"Toggle confidential mode",children:a.jsx(Zr,{className:"w-4 h-4"})}),a.jsx("button",{onClick:Ye,className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"Insert signature",children:a.jsx(Cg,{className:"w-4 h-4"})}),a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>u(!se),className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 cursor-pointer",title:"More options",children:a.jsx(Qr,{className:"w-4 h-4"})}),se&&a.jsxs("div",{className:`absolute bottom-full left-0 mb-2 w-44 rounded-xl shadow-2xl border p-1 text-xs z-[100] ${c?"bg-[#28292c] border-gray-700 text-gray-200":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsx("button",{onClick:()=>{u(!1),Ye()},className:"w-full text-left px-3 py-1.5 hover:bg-black/5 dark:hover:bg-white/10 rounded cursor-pointer",children:"Insert Signature"}),a.jsx("button",{onClick:()=>{u(!1),Sa(!0)},className:"w-full text-left px-3 py-1.5 hover:bg-black/5 dark:hover:bg-white/10 rounded cursor-pointer font-medium text-blue-600 dark:text-blue-400",children:"Save as Draft"}),a.jsx("button",{onClick:()=>{u(!1),alert("Plain text mode enabled")},className:"w-full text-left px-3 py-1.5 hover:bg-black/5 dark:hover:bg-white/10 rounded cursor-pointer",children:"Plain text mode"}),a.jsx("button",{onClick:()=>{u(!1),window.print()},className:"w-full text-left px-3 py-1.5 hover:bg-black/5 dark:hover:bg-white/10 rounded cursor-pointer",children:"Print draft"}),a.jsx("button",{onClick:()=>{u(!1),alert("No spelling errors found.")},className:"w-full text-left px-3 py-1.5 hover:bg-black/5 dark:hover:bg-white/10 rounded cursor-pointer",children:"Check spelling"})]})]})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[yl==="saving"&&a.jsxs("span",{className:"text-[11px] text-blue-500 font-medium flex items-center space-x-1 animate-pulse",children:[a.jsx(yo,{className:"w-3 h-3 animate-spin"}),a.jsx("span",{children:"Saving draft..."})]}),yl==="saved"&&a.jsxs("span",{className:"text-[11px] text-emerald-600 dark:text-emerald-400 font-medium flex items-center space-x-1",children:[a.jsx(tt,{className:"w-3 h-3"}),a.jsx("span",{children:"Draft saved"})]}),a.jsx("button",{onClick:()=>Sa(!0),className:"p-2 rounded-full hover:bg-rose-50 dark:hover:bg-rose-950/40 text-gray-400 hover:text-rose-600 cursor-pointer transition-colors",title:"Discard / Save draft",children:a.jsx(oa,{className:"w-4 h-4"})})]})]}),D&&a.jsx("div",{className:"fixed inset-0 z-[200] bg-black/50 backdrop-blur-xs flex items-center justify-center p-4",children:a.jsxs("div",{className:`w-full max-w-lg rounded-2xl p-5 shadow-2xl border text-xs flex flex-col space-y-4 max-h-[85vh] ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Vr,{className:"w-5 h-5 text-emerald-500"}),a.jsx("span",{className:"font-bold text-sm",children:"Insert files using Omnio Drive"})]}),a.jsx("button",{onClick:()=>he(!1),className:"p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-400 cursor-pointer",children:a.jsx(wt,{className:"w-4 h-4"})})]}),a.jsx("input",{type:"text",value:ze,onChange:_=>kt(_.target.value),placeholder:"Search in Drive...",className:`w-full p-2.5 rounded-xl border outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-200 text-gray-800"}`}),a.jsx("div",{className:"flex-1 overflow-y-auto space-y-1 pr-1 max-h-60 border rounded-xl p-2 border-gray-200 dark:border-gray-700",children:Kx.filter(_=>_.name.toLowerCase().includes(ze.toLowerCase())).map(_=>{const Me=Xe.includes(_.id);return a.jsxs("div",{onClick:()=>{Ot(Me?Ue=>Ue.filter(Je=>Je!==_.id):Ue=>[...Ue,_.id])},className:`p-2.5 rounded-xl flex items-center justify-between cursor-pointer transition-colors ${Me?c?"bg-blue-900/40 border border-blue-500":"bg-blue-50 border border-blue-300":c?"hover:bg-gray-800":"hover:bg-gray-100"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3 truncate",children:[a.jsx("span",{className:"text-lg",children:_.icon}),a.jsxs("div",{className:"truncate",children:[a.jsx("p",{className:"font-semibold text-xs truncate",children:_.name}),a.jsxs("p",{className:"text-[10px] text-gray-400",children:[_.size," • Modified ",_.modified]})]})]}),a.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center shrink-0 ${Me?"bg-blue-600 border-blue-600 text-white":"border-gray-400"}`,children:Me&&a.jsx(tt,{className:"w-3 h-3"})})]},_.id)})}),a.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-gray-200 dark:border-gray-700",children:[a.jsxs("span",{className:"text-gray-400 text-[11px]",children:[Xe.length," ",Xe.length===1?"file":"files"," selected"]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:()=>he(!1),className:"px-3 py-1.5 rounded-xl border border-gray-300 dark:border-gray-700 text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer",children:"Cancel"}),a.jsx("button",{onClick:()=>{const Me=Kx.filter(Ue=>Xe.includes(Ue.id)).map(Ue=>({id:"drive_"+Date.now()+"_"+Ue.id,name:Ue.name,size:Ue.size,type:Ue.type}));Ne(Ue=>[...Ue,...Me]),he(!1)},disabled:Xe.length===0,className:"px-4 py-1.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold cursor-pointer disabled:opacity-50",children:"Insert Selected"})]})]})]})}),me&&a.jsx("div",{className:"fixed inset-0 z-50 bg-black/40 flex items-center justify-center p-4",children:a.jsxs("div",{className:`w-full max-w-sm rounded-2xl p-5 shadow-2xl border text-xs ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsx("h3",{className:"font-bold text-sm mb-3",children:"Insert Link"}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-gray-400 mb-1",children:"Text to display:"}),a.jsx("input",{type:"text",value:T,onChange:_=>Re(_.target.value),placeholder:"e.g. Visit our website",className:`w-full p-2 rounded border outline-none ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-gray-400 mb-1",children:"Web address (URL):"}),a.jsx("input",{type:"text",value:Ee,onChange:_=>_e(_.target.value),placeholder:"https://example.com",className:`w-full p-2 rounded border outline-none ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`})]})]}),a.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[a.jsx("button",{onClick:()=>ve(!1),className:"px-3 py-1.5 rounded border border-gray-300 dark:border-gray-700 text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer",children:"Cancel"}),a.jsx("button",{onClick:we,className:"px-4 py-1.5 rounded bg-blue-600 text-white hover:bg-blue-700 font-semibold cursor-pointer",children:"Insert"})]})]})})]})},Yp="modulepreload",Qp=function(c){return"/"+c},Jx={},Vp=function(h,S,d){let z=Promise.resolve();if(S&&S.length>0){let V=function(g){return Promise.all(g.map(R=>Promise.resolve(R).then(Q=>({status:"fulfilled",value:Q}),Q=>({status:"rejected",reason:Q}))))};document.getElementsByTagName("link");const q=document.querySelector("meta[property=csp-nonce]"),k=(q==null?void 0:q.nonce)||(q==null?void 0:q.getAttribute("nonce"));z=V(S.map(g=>{if(g=Qp(g),g in Jx)return;Jx[g]=!0;const R=g.endsWith(".css"),Q=R?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${Q}`))return;const W=document.createElement("link");if(W.rel=R?"stylesheet":Yp,R||(W.as="script"),W.crossOrigin="",W.href=g,k&&W.setAttribute("nonce",k),document.head.appendChild(W),R)return new Promise((I,K)=>{W.addEventListener("load",I),W.addEventListener("error",()=>K(new Error(`Unable to preload CSS for ${g}`)))})}))}function M(V){const q=new Event("vite:preloadError",{cancelable:!0});if(q.payload=V,window.dispatchEvent(q),!q.defaultPrevented)throw V}return z.then(V=>{for(const q of V||[])q.status==="rejected"&&M(q.reason);return h().catch(M)})},Zp=({darkMode:c,isOpen:h,onClose:S,onAddAccount:d,userPlan:z="free",currentAccountsCount:M=1,onOpenPlansModal:V,onRealConnected:q})=>{const[k,g]=m.useState("gmail"),[R,Q]=m.useState(""),[W,I]=m.useState(""),[K,X]=m.useState(""),[P,be]=m.useState("993"),[ae,L]=m.useState(""),[J,ce]=m.useState("465"),[fe,le]=m.useState(""),[ye,ke]=m.useState(!1);if(!h)return null;const ie=z==="free"?1:z==="pro"?5:z==="business"?10:999,re=M>=ie,$=[{id:"gmail",name:"Google Workspace / Gmail",desc:"OAuth 2.0 Direct Google Auth",iconName:"G",badge:"Popular"},{id:"m365",name:"Microsoft 365 / Exchange",desc:"Azure AD OAuth & Outlook.com",iconName:"M",badge:"Enterprise"},{id:"cpanel",name:"cPanel / WHM Webmail",desc:"Dovecot IMAP & Exim SMTP Auto-Discovery",iconName:"C",badge:"Provider"},{id:"zoho",name:"Zoho Mail Pro",desc:"Secure IMAP / POP3 Sync",iconName:"Z"},{id:"fastmail",name:"Fastmail / iCloud Mail",desc:"App-specific Password & IMAP",iconName:"F"},{id:"imap",name:"Custom Generic IMAP / POP3",desc:"Port 993/587 SSL Configuration",iconName:"I"}],de=["cpanel","imap","zoho","fastmail","plesk","exchange","icloud"].includes(k),ue=async oe=>{oe.preventDefault();const A=de&&fe.trim().length>0;if(re&&!A){alert(`Your ${z.toUpperCase()} plan limit is ${ie} connected account(s). Please upgrade your plan to connect more mailboxes.`),V&&V();return}if(!R.trim()){alert("Please enter a valid email address.");return}if(ke(!0),de&&fe.trim()){try{const{mailApi:b}=await Vp(async()=>{const{mailApi:se}=await Promise.resolve().then(()=>ay);return{mailApi:se}},void 0),U=await b.connect({email:R.trim(),password:fe,displayName:W||void 0,imapHost:K.trim()||void 0,imapPort:Number(P)||993,smtpHost:ae.trim()||void 0,smtpPort:Number(J)||void 0}),G=$.find(se=>se.id===k);d({id:`real-${R.trim()}`,email:R.trim(),name:W||R.split("@")[0],provider:k,providerDisplayName:(G==null?void 0:G.name)||"IMAP Server",isDefault:!0,unreadCount:0,status:"connected",serverHost:U.imapHost}),q&&q({email:R.trim(),displayName:W,imapHost:U.imapHost}),ke(!1),S()}catch(b){ke(!1),alert(`Connection failed: ${(b==null?void 0:b.message)||"Could not reach the mail server."}

Check the server host, port, and password.`)}return}setTimeout(()=>{const b=$.find(G=>G.id===k),U={id:`acc-${Date.now()}`,email:R,name:W||R.split("@")[0],provider:k,providerDisplayName:(b==null?void 0:b.name)||"IMAP Server",isDefault:!1,unreadCount:0,status:"connected",serverHost:K||`mail.${R.split("@")[1]||"domain.com"}`,quotaUsedGb:.5,quotaTotalGb:25};d(U),ke(!1),S()},800)};return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs select-none",children:a.jsxs("div",{className:`w-full max-w-2xl rounded-3xl shadow-2xl border overflow-hidden transition-all ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-900"}`,children:[a.jsxs("div",{className:`p-6 border-b flex items-center justify-between ${c?"border-gray-700 bg-[#1f1f1f]":"border-gray-100 bg-gray-50"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-2xl bg-blue-600 text-white flex items-center justify-center font-bold text-lg shadow-md",children:a.jsx(Ll,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-lg font-bold font-sans",children:"Bring Your Own Mail (BYOM)"}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Messages remain safely on your original provider's server."})]})]}),a.jsx("button",{onClick:S,className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-500",children:a.jsx(wt,{className:"w-5 h-5"})})]}),a.jsxs("form",{onSubmit:ue,className:"p-6 space-y-6",children:[re&&a.jsxs("div",{className:"p-4 rounded-2xl bg-amber-500/10 border border-amber-500/30 text-amber-600 dark:text-amber-300 text-xs flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"font-bold",children:["Mailbox Limit Reached (",M,"/",ie,")"]}),a.jsxs("p",{className:"mt-0.5 text-[11px] opacity-90",children:["Your current ",z.toUpperCase()," plan allows connecting ",ie," email account(s)."]})]}),a.jsx("button",{type:"button",onClick:()=>{S(),V&&V()},className:"px-3 py-1.5 rounded-xl bg-amber-600 hover:bg-amber-700 text-white font-bold text-xs shrink-0 cursor-pointer shadow-sm",children:"Upgrade Plan"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-bold uppercase tracking-wider text-gray-400 mb-2",children:"1. Choose Email Provider:"}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:$.map(oe=>{const A=k===oe.id;return a.jsxs("div",{onClick:()=>{g(oe.id),oe.id==="cpanel"&&!K&&X("mail.hostingdomain.com")},className:`p-3 rounded-2xl border cursor-pointer transition-all flex items-start space-x-3 ${A?c?"bg-blue-900/40 border-blue-500 ring-2 ring-blue-500/30":"bg-blue-50/80 border-blue-600 ring-2 ring-blue-500/20":c?"bg-[#1f1f1f] border-gray-700 hover:border-gray-500":"bg-gray-50 border-gray-200 hover:border-gray-400"}`,children:[a.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-tr from-blue-600 to-indigo-600 text-white font-bold flex items-center justify-center text-xs shrink-0 mt-0.5",children:oe.iconName}),a.jsxs("div",{className:"flex-1 truncate",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-semibold text-xs truncate",children:oe.name}),oe.badge&&a.jsx("span",{className:"text-[9px] uppercase font-mono px-1.5 py-0.2 rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 font-bold shrink-0 ml-1",children:oe.badge})]}),a.jsx("p",{className:"text-[10px] text-gray-400 truncate mt-0.5",children:oe.desc})]})]},oe.id)})})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("label",{className:"block text-xs font-bold uppercase tracking-wider text-gray-400",children:"2. Credentials & Server Details:"}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:"Email Address"}),a.jsx("input",{type:"email",required:!0,value:R,onChange:oe=>Q(oe.target.value),placeholder:"user@omnio.email",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:"Account Display Name"}),a.jsx("input",{type:"text",value:W,onChange:oe=>I(oe.target.value),placeholder:"e.g. Work Mail / Sales Account",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]})]}),(k==="cpanel"||k==="imap")&&a.jsxs("div",{className:"grid grid-cols-3 gap-3 pt-1",children:[a.jsxs("div",{className:"col-span-2",children:[a.jsx("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:"IMAP Server Host"}),a.jsx("input",{type:"text",value:K,onChange:oe=>X(oe.target.value),placeholder:"mail.yourhost.com",className:`w-full p-2.5 rounded-xl border text-xs outline-none font-mono ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:"Port (SSL)"}),a.jsx("input",{type:"text",value:P,onChange:oe=>be(oe.target.value),placeholder:"993",className:`w-full p-2.5 rounded-xl border text-xs outline-none font-mono ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{className:"col-span-2",children:[a.jsxs("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:["SMTP Server Host ",a.jsx("span",{className:"opacity-60",children:"(optional — defaults to IMAP host)"})]}),a.jsx("input",{type:"text",value:ae,onChange:oe=>L(oe.target.value),placeholder:"same as IMAP host",className:`w-full p-2.5 rounded-xl border text-xs outline-none font-mono ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:"SMTP Port"}),a.jsx("input",{type:"text",value:J,onChange:oe=>ce(oe.target.value),placeholder:"465",className:`w-full p-2.5 rounded-xl border text-xs outline-none font-mono ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-medium text-gray-500 mb-1",children:"Password / App Password"}),a.jsx("input",{type:"password",value:fe,onChange:oe=>le(oe.target.value),placeholder:"••••••••••••••••",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]})]}),a.jsxs("div",{className:"p-3 rounded-2xl bg-emerald-50 dark:bg-emerald-950/40 border border-emerald-200 dark:border-emerald-800 flex items-center space-x-3 text-xs text-emerald-800 dark:text-emerald-300",children:[a.jsx(Jr,{className:"w-5 h-5 shrink-0 text-emerald-600"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-bold",children:"Zero Storage Cost Model Active"}),a.jsx("p",{className:"text-[11px] text-emerald-700 dark:text-emerald-400",children:"Omnio acts strictly as a smart client. Emails stay stored on your provider server."})]})]}),a.jsxs("div",{className:"flex items-center justify-end space-x-3 pt-2",children:[a.jsx("button",{type:"button",onClick:S,className:"px-4 py-2 rounded-xl text-xs font-semibold text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",children:"Cancel"}),a.jsxs("button",{type:"submit",disabled:ye,className:"px-6 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-md flex items-center space-x-2 transition-transform active:scale-95 disabled:opacity-50",children:[a.jsx("span",{children:ye?"Verifying Credentials...":"Connect Provider"}),a.jsx(An,{className:"w-4 h-4"})]})]})]})]})})},Ix=[{id:"acc-1",email:"komail.lalani@gmail.com",name:"Komail Lalani",provider:"gmail",providerDisplayName:"Google Workspace",avatarUrl:"https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=150&auto=format&fit=crop&q=80",isDefault:!0,unreadCount:3,status:"connected",quotaUsedGb:4.2,quotaTotalGb:15},{id:"acc-2",email:"komail@techventures.io",name:"Komail (Tech Ventures)",provider:"m365",providerDisplayName:"Microsoft 365 Exchange",avatarUrl:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&auto=format&fit=crop&q=80",isDefault:!1,unreadCount:1,status:"connected",quotaUsedGb:12.8,quotaTotalGb:50},{id:"acc-3",email:"support@cloudserverhost.com",name:"CloudServer Admin",provider:"cpanel",providerDisplayName:"cPanel / Dovecot IMAP",avatarUrl:"https://images.unsplash.com/photo-1560250097-0b93528c311a?w=150&auto=format&fit=crop&q=80",isDefault:!1,unreadCount:2,serverHost:"mail.cloudserverhost.com",status:"connected",quotaUsedGb:8.4,quotaTotalGb:100},{id:"acc-4",email:"me@zoho.customdomain.org",name:"Custom Domain Mail",provider:"zoho",providerDisplayName:"Zoho Mail Pro",isDefault:!1,unreadCount:0,status:"connected",quotaUsedGb:1.1,quotaTotalGb:10}],Xp=[{id:"msg-101",threadId:"th-101",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Google Cloud Platform",senderEmail:"no-reply@cloud.google.com",senderAvatar:"https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=100&auto=format&fit=crop&q=80",recipients:["komail.lalani@gmail.com"],subject:"Omnio Cloud Run deployment succeeded (Asia-East1)",snippet:"Your Cloud Run service ais-dev-awhit26m4yksmn5bihucfg has completed build and traffic routing. 100% traffic allocated to latest revision.",body:`Hello Komail,

Great news! Your Cloud Run deployment for Omnio Workspace is complete and live.

Deployment Summary:
- Service Name: ais-dev-awhit26m4yksmn5bihucfg
- Region: asia-east1
- Container Port: 3000
- Gemini API Integration: Active (Server-side @google/genai SDK initialized)
- Reverse Proxy: Nginx ingress configured

Performance metrics and telemetry logs are now accessible directly in the Google Cloud Console.

Best regards,
Google Cloud Platform Team`,date:"10:42 AM",timestamp:Date.now()-1e3*60*15,unread:!0,starred:!0,snoozed:!1,important:!0,category:"primary",smartCategory:"important",labels:["inbox","important"],aiSummary:"Cloud Run service deployment succeeded on port 3000 in region asia-east1 with Gemini API active.",aiActionItems:["Check Cloud Console telemetry","Verify domain ingress routing"],aiSentiment:"Positive / Informational",aiUrgency:"Medium",aiCategoryPill:"deploys"},{id:"msg-102",threadId:"th-102",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Sarah Jenkins (VP Engineering)",senderEmail:"sarah.j@techventures.io",senderAvatar:"https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=100&auto=format&fit=crop&q=80",recipients:["komail@techventures.io"],cc:["architecture-team@techventures.io"],subject:"Q4 Architecture Review: BYOM Omnio Migration & Cost Projections",snippet:"Hi Komail, I reviewed the Omnio BYOM architecture proposal. Keeping messages on existing M365 and cPanel servers cuts our cloud storage spend by 85%...",body:`Hi Komail,

I thoroughly reviewed the Omnio "Bring Your Own Mail" (BYOM) proposal for our enterprise client accounts.

Here are the key findings:
1. Storage Efficiency: Since messages remain on Microsoft 365, Google Workspace, and cPanel/Dovecot host servers, Omnio only caches metadata and fast index tables. This eliminates cloud storage replication costs.
2. Provider Edition for Hosting Partners: Webmail hosting providers are thrilled about the cPanel/WHM extension because they don't have to perform mailbox migrations.
3. AI Security: Gemini API calls run strictly on server-side proxies, protecting keys while giving users smart drafts and thread summaries.

Attached is the updated financial model comparison. Let's touch base on Thursday at 2:00 PM EST.

Cheers,
Sarah Jenkins
VP of Engineering`,date:"9:15 AM",timestamp:Date.now()-1e3*60*90,unread:!0,starred:!0,snoozed:!1,important:!0,category:"primary",smartCategory:"important",labels:["inbox","important","work"],attachments:[{id:"att-1",fileName:"Omnio_BYOM_Cost_Analysis.pdf",fileSize:"2.4 MB",fileType:"pdf"},{id:"att-2",fileName:"cPanel_Plugin_Integration.doc",fileSize:"840 KB",fileType:"doc"}],aiSummary:"BYOM model reduces cloud storage expenses by 85%. Sarah requests meeting Thursday at 2 PM EST to finalize provider partnerships.",aiActionItems:["Review PDF attachment","Confirm Thursday 2:00 PM EST calendar invite"],aiSentiment:"Enthusiastic / Business",aiUrgency:"High",aiCategoryPill:"review"},{id:"msg-103",threadId:"th-103",accountId:"acc-3",accountEmail:"support@cloudserverhost.com",senderName:"cPanel & WHM Webmail System",senderEmail:"cpanel-sys@cloudserverhost.com",senderAvatar:"https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?w=100&auto=format&fit=crop&q=80",recipients:["support@cloudserverhost.com"],subject:"Omnio Provider Edition Plugin: Zero-Migration Dovecot Bridge Active",snippet:"Automatic discovery finished for 1,420 cPanel accounts. Dovecot IMAP and Exim SMTP channels verified on port 993 / 587.",body:`Hello Admin,

The Omnio Provider Edition WHM plugin has successfully established local IPC bridge with Dovecot & Postfix.

System Diagnostics:
- Active Mailboxes Discovered: 1,420
- Roundcube Migration Needed: NO (Zero-Migration Architecture)
- Single Sign-On (SSO): Enabled from WHM & cPanel dashboards
- White-label Branding: Applied ("HostSphere AI Webmail")
- Webmail Launch URL: https://webmail.cloudserverhost.com

Users can now sign in with their existing email credentials seamlessly.

cPanel Automated Daemon`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*20,unread:!1,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"important",labels:["inbox","hosting"],aiSummary:"cPanel WHM plugin bridge activated for 1,420 mailboxes without needing Roundcube migration.",aiActionItems:["Test webmail SSO login","Verify white-label branding"],aiSentiment:"Technical / System",aiUrgency:"Low",aiCategoryPill:"hosting"},{id:"msg-104",threadId:"th-104",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"GitHub Notifications",senderEmail:"notifications@github.com",senderAvatar:"https://images.unsplash.com/photo-1618401471353-b98aedd04e11?w=100&auto=format&fit=crop&q=80",recipients:["komail.lalani@gmail.com"],subject:"[omnio/applet] PR #42: Add Dark/Light Gmail matching UI & AI Smart Composer",snippet:"mergify[bot] merged 1 commit into main from feature/ai-smart-composer. All 14 CI checks passed.",body:`Pull Request #42 Status: MERGED

Branch: feature/ai-smart-composer -> main
Author: @komail-dev
Reviewers: @qa-lead, @ux-designer (Approved)

Changes included:
- Replicated exact Gmail layout (Search bar, Left sidebar, Category tabs, Right workspace apps).
- Added Light/Dark mode auto-switch with accurate Google colors.
- Integrated Gemini server-side endpoint for Smart Reply and Thread Summaries.

View full diff on GitHub.`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*26,unread:!1,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"other",labels:["inbox"],aiSummary:"GitHub PR #42 adding dark/light themes and Gemini composer merged cleanly.",aiActionItems:["Pull latest main branch"],aiSentiment:"Neutral",aiUrgency:"Low"},{id:"msg-105",threadId:"th-105",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Substack Weekly Tech",senderEmail:"newsletter@substack.com",senderAvatar:"https://images.unsplash.com/photo-1585829365295-ab7cd400c167?w=100&auto=format&fit=crop&q=80",recipients:["komail.lalani@gmail.com"],subject:'Why "The Operating System for Email" will replace traditional Webmail hosting',snippet:"In this issue: How modern smart clients sit on top of Microsoft 365, Google Workspace, and cPanel to deliver AI super-powers without storage lock-in...",body:`Hello Tech Enthusiasts,

Why are email storage models failing?

When companies start selling 50GB or 100GB email hosting, they suddenly turn into cloud storage infrastructure vendors. They face compliance overhead, abuse prevention, and heavy hardware budgets.

Enter Omnio: "The Operating System for Email".

Instead of storing gigabytes of email data, Omnio operates as a smart client layer.
- Users bring their existing Gmail, Outlook, Zoho, or cPanel IMAP accounts.
- AI handles automatic triage, smart drafting, and action item tracking.
- Webmasters connect Dovecot or Exim and replace outdated Roundcube interfaces in minutes.

Read the full analysis in today's post!`,date:"Aug 3",timestamp:Date.now()-1e3*60*60*48,unread:!1,starred:!1,snoozed:!1,important:!1,category:"promotions",smartCategory:"other",labels:["inbox"],aiSummary:"Newsletter breakdown on why smart email OS layers beat traditional mail storage selling.",aiActionItems:[],aiSentiment:"Informative",aiUrgency:"Low",aiCategoryPill:"newsletter"},{id:"msg-106",threadId:"th-106",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"LinkedIn Connections",senderEmail:"invitations@linkedin.com",senderAvatar:"https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?w=100&auto=format&fit=crop&q=80",recipients:["komail.lalani@gmail.com"],subject:"Marcus Vance (CTO at HostingGlobe) wants to connect with you",snippet:'Marcus Vance: "Hi Komail, saw your Omnio Provider Edition demo for WHM/Plesk. We host over 85,000 cPanel mailboxes and would love to pilot your AI webmail..."',body:`Marcus Vance sent you an invitation to connect on LinkedIn.

CTO at HostingGlobe | Cloud Hosting & Infrastructure

Message:
"Hi Komail, saw your Omnio Provider Edition demo for WHM/Plesk. We host over 85,000 cPanel mailboxes and would love to pilot your AI webmail interface with our WHMCS billing setup. Let's connect!"`,date:"Aug 2",timestamp:Date.now()-1e3*60*60*72,unread:!1,starred:!0,snoozed:!1,important:!0,category:"social",smartCategory:"important",labels:["inbox","starred"],aiSummary:"Marcus Vance (CTO at HostingGlobe) wants to pilot Omnio Provider Edition for 85k mailboxes.",aiActionItems:["Accept LinkedIn invite","Send follow-up email to Marcus regarding WHMCS pilot"],aiSentiment:"High Lead Opportunity",aiUrgency:"High",aiCategoryPill:"pitch"},{id:"msg-107",threadId:"th-107",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Stripe Billing",senderEmail:"receipts@stripe.com",senderAvatar:"https://images.unsplash.com/photo-1556742049-0a67e008406f?w=100&auto=format&fit=crop&q=80",recipients:["komail@techventures.io"],subject:"Your receipt from Omnio Pro Workspace (#INV-2026-0801)",snippet:"Amount Paid: $12.00 USD. Plan: Pro Workspace (Unlimited BYOM Accounts + Gemini AI Assistant).",body:`Receipt from Omnio Inc.

Invoice #INV-2026-0801
Date: Aug 1, 2026
Payment Method: Visa ending in 8842

Summary:
- Omnio Pro Plan (Monthly): $12.00
- Connected Accounts: 4 Active (Gmail, M365, cPanel, Zoho)
- AI Smart Actions: Unlimited

Thank you for choosing Omnio!`,date:"Aug 1",timestamp:Date.now()-1e3*60*60*96,unread:!1,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"other",labels:["inbox","finance"],attachments:[{id:"att-3",fileName:"Stripe_Invoice_INV20260801.pdf",fileSize:"120 KB",fileType:"pdf"}],aiSummary:"Monthly receipt for Omnio Pro Plan ($12.00).",aiActionItems:[],aiSentiment:"Transactional",aiUrgency:"Low",aiCategoryPill:"billing"},{id:"msg-108",threadId:"th-108",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Aisha Malik",senderEmail:"aisha.malik@outlook.com",recipients:["komail@techventures.io"],subject:"Application for Product Manager position",snippet:"Your job posting for a PM with hosting-industry experience caught my eye — I led the webmail relaunch at a top-10 EU host and would love to talk.",body:`Hi Komail,

Your job posting for a Product Manager with hosting-industry experience caught my eye. I led the webmail relaunch at a top-10 EU hosting provider (2M mailboxes on Dovecot) and grew activation 40%.

Resume attached — would love 20 minutes this week.

Best,
Aisha Malik`,date:"11:20 AM",timestamp:Date.now()-1e3*60*5,unread:!0,starred:!1,snoozed:!1,important:!0,category:"primary",smartCategory:"important",labels:["inbox"],attachments:[{id:"att-4",fileName:"Aisha_Malik_Resume.pdf",fileSize:"310 KB",fileType:"pdf"}],aiUrgency:"Medium",aiCategoryPill:"recruiting"},{id:"msg-109",threadId:"th-109",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Kristin Vega",senderEmail:"kristin.vega@legalpartners.co",recipients:["komail@techventures.io"],subject:"Final contract signature needed — HostingGlobe pilot MSA",snippet:"Sending over the final MSA for the HostingGlobe pilot. Everything from redline round two is incorporated — just needs your signature.",body:`Hi Komail,

Sending over the final Master Service Agreement for the HostingGlobe pilot. Everything from redline round two is incorporated — payment terms net-30, liability cap at 12 months of fees.

Just needs your signature before Friday.

Kristin Vega
Legal Partners`,date:"8:47 AM",timestamp:Date.now()-1e3*60*140,unread:!0,starred:!1,snoozed:!1,important:!0,category:"primary",smartCategory:"important",labels:["inbox"],attachments:[{id:"att-5",fileName:"HostingGlobe_Pilot_MSA_Final.pdf",fileSize:"1.1 MB",fileType:"pdf"}],aiUrgency:"High",aiCategoryPill:"signature"},{id:"msg-110",threadId:"th-110",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"CodeSprint Agency",senderEmail:"hello@codesprint.dev",recipients:["komail.lalani@gmail.com"],subject:"Mobile Development Partnership",snippet:"Good afternoon — we build native iOS/Android shells for web products and think Omnio Mail would shine as a mobile app. Open to a partnership chat?",body:`Good afternoon Komail,

We build native iOS/Android shells for web products and think Omnio Mail would shine as a mobile app. We work rev-share or fixed-bid.

Open to a 30-minute chat next week?

— CodeSprint Agency`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*22,unread:!1,starred:!1,snoozed:!1,important:!1,category:"primary",smartCategory:"important",labels:["inbox"],aiUrgency:"Low",aiCategoryPill:"pitch"},{id:"msg-111",threadId:"th-111",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Daniel Foster",senderEmail:"daniel@brandlift.agency",recipients:["komail.lalani@gmail.com"],subject:"Let's Elevate Your Brand in 2026",snippet:"All brands need a story — we position dev-tools and SaaS products for launch. Here is a teardown of the Omnio landing page with three quick wins.",body:`Hi Komail,

All brands need a story. We position dev-tools and SaaS products for launch, and I did a quick teardown of the Omnio landing page — three quick wins inside.

Daniel Foster
BrandLift Agency`,date:"Aug 4",timestamp:Date.now()-1e3*60*60*40,unread:!1,starred:!1,snoozed:!1,important:!1,category:"promotions",smartCategory:"important",labels:["inbox"],aiUrgency:"Low",aiCategoryPill:"marketing"},{id:"msg-112",threadId:"th-112",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Omnio Calendar",senderEmail:"calendar-notify@omnio.email",recipients:["komail@techventures.io"],subject:"Invitation: Q4 Architecture Review — Thu, 2:00 PM EST",snippet:"Sarah Jenkins invited you. Agenda: BYOM cost model sign-off, Provider Edition rollout gates, Gemini proxy security review.",body:`Sarah Jenkins invited you to "Q4 Architecture Review".

Thursday, 2:00–3:00 PM EST · Meet link attached
Agenda: BYOM cost model sign-off, Provider Edition rollout gates, Gemini proxy security review.

Going? Yes / Maybe / No`,date:"9:20 AM",timestamp:Date.now()-1e3*60*85,unread:!0,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"calendar",labels:["inbox"],aiUrgency:"Medium",aiCategoryPill:"invite"},{id:"msg-113",threadId:"th-113",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Omnio Calendar",senderEmail:"calendar-notify@omnio.email",recipients:["komail@techventures.io"],subject:"Updated: BYOM Weekly Sync moved to Friday 11:00 AM",snippet:'Priya Raman changed the time of "BYOM Weekly Sync" from Thursday 4:00 PM to Friday 11:00 AM. All other details unchanged.',body:`Priya Raman changed the time of "BYOM Weekly Sync".

New time: Friday, 11:00–11:45 AM
All other details unchanged.`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*18,unread:!1,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"calendar",labels:["inbox"],aiUrgency:"Low",aiCategoryPill:"invite"},{id:"msg-114",threadId:"th-114",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Zoom",senderEmail:"no-reply@zoom.us",recipients:["komail.lalani@gmail.com"],subject:"Reminder: HostingGlobe pilot kickoff tomorrow at 10:00 AM",snippet:'Your meeting "HostingGlobe × Omnio — Pilot Kickoff" starts in 24 hours. 6 participants confirmed including Marcus Vance.',body:`Your meeting "HostingGlobe × Omnio — Pilot Kickoff" starts in 24 hours.

6 participants confirmed, including Marcus Vance (CTO).
Join link in calendar.`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*21,unread:!1,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"calendar",labels:["inbox"],aiUrgency:"Medium",aiCategoryPill:"reminder"},{id:"msg-115",threadId:"th-115",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Priya Raman",senderEmail:"priya.r@techventures.io",recipients:["komail@techventures.io"],subject:"Re: Provider Edition white-label QA — 3 blockers left",snippet:"Down to three blockers: SSO token refresh on Plesk, RTL layout in compose, and the WHMCS webhook retry queue. Details and owners inside.",body:`Hi Komail,

Down to three blockers on white-label QA:
1. SSO token refresh on Plesk (owner: me)
2. RTL layout in compose (owner: Leo)
3. WHMCS webhook retry queue (owner: Nadia)

All trending green for Friday.

Priya`,date:"10:05 AM",timestamp:Date.now()-1e3*60*50,unread:!0,starred:!1,snoozed:!1,important:!1,category:"primary",smartCategory:"team",labels:["inbox","work"],aiUrgency:"Medium",aiCategoryPill:"review"},{id:"msg-116",threadId:"th-116",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Leo Martins",senderEmail:"leo.m@techventures.io",recipients:["komail@techventures.io"],subject:"Design tokens for dark mode — final palette",snippet:"Locked the dark palette: surface #1f1f1f, raised #28292c, accent stays brand blue. Figma link inside, tokens exported to tailwind config.",body:`Hey,

Locked the dark palette: surface #1f1f1f, raised #28292c, accent stays brand blue. Tokens exported to the Tailwind config.

Figma link in the doc.

Leo`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*19,unread:!1,starred:!1,snoozed:!1,important:!1,category:"primary",smartCategory:"team",labels:["inbox","work"],aiUrgency:"Low",aiCategoryPill:"design"},{id:"msg-117",threadId:"th-117",accountId:"acc-2",accountEmail:"komail@techventures.io",senderName:"Nadia Chen",senderEmail:"nadia.c@techventures.io",recipients:["komail@techventures.io"],subject:"Standup notes — Wednesday",snippet:"Shipped: drive quota widget, calendar month view perf. In progress: IMAP idle reconnect. Blocked: nothing. Full notes in the thread.",body:`Standup notes — Wednesday

Shipped: drive quota widget, calendar month view perf.
In progress: IMAP idle reconnect.
Blocked: nothing.

Nadia`,date:"Aug 4",timestamp:Date.now()-1e3*60*60*44,unread:!1,starred:!1,snoozed:!1,important:!1,category:"primary",smartCategory:"team",labels:["inbox","work"],aiUrgency:"Low",aiCategoryPill:"notes"},{id:"msg-118",threadId:"th-118",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Omnio Drive",senderEmail:"drive-share@omnio.email",recipients:["komail.lalani@gmail.com"],subject:'Sarah Jenkins shared "BYOM_Cost_Model_v3.xlsx" with you',snippet:'Sarah Jenkins granted you edit access. "Latest numbers for Thursday — tab 2 has the provider-edition scenario you asked about."',body:`Sarah Jenkins shared a spreadsheet with you.

"BYOM_Cost_Model_v3.xlsx" — edit access.
Note: "Latest numbers for Thursday — tab 2 has the provider-edition scenario you asked about."`,date:"7:58 AM",timestamp:Date.now()-1e3*60*180,unread:!0,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"docs",labels:["inbox"],attachments:[{id:"att-6",fileName:"BYOM_Cost_Model_v3.xlsx",fileSize:"640 KB",fileType:"sheet"}],aiUrgency:"Medium",aiCategoryPill:"shared"},{id:"msg-119",threadId:"th-119",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Omnio Drive",senderEmail:"drive-share@omnio.email",recipients:["komail.lalani@gmail.com"],subject:'Priya commented on "Provider_Onboarding.pdf"',snippet:'"Section 4 still references Roundcube skinning — should this be the white-label flow instead?" Reply or resolve in Drive.',body:`Priya Raman commented on "Provider_Onboarding.pdf":

"Section 4 still references Roundcube skinning — should this be the white-label flow instead?"

Reply or resolve in Drive.`,date:"Yesterday",timestamp:Date.now()-1e3*60*60*23,unread:!1,starred:!1,snoozed:!1,important:!1,category:"updates",smartCategory:"docs",labels:["inbox"],aiUrgency:"Low",aiCategoryPill:"comment"},{id:"msg-120",threadId:"th-120",accountId:"acc-1",accountEmail:"komail.lalani@gmail.com",senderName:"Product Hunt Digest",senderEmail:"hello@producthunt.com",recipients:["komail.lalani@gmail.com"],subject:"Today: AI inboxes, self-hosted everything, and a Roundcube killer",snippet:"The top launches today include three AI email clients and a self-hosted drive. Your space is heating up — see who launched.",body:`Today on Product Hunt:

- Three AI email clients launched (your space is heating up)
- A self-hosted drive alternative hit #1
- "Roundcube killer" trending in comments

See the full leaderboard.`,date:"Aug 3",timestamp:Date.now()-1e3*60*60*50,unread:!1,starred:!1,snoozed:!1,important:!1,category:"promotions",smartCategory:"other",labels:["inbox"],aiUrgency:"Low",aiCategoryPill:"newsletter"}],Kp=[{id:"free",name:"BYOM Free",priceMonthly:"$0",targetAudience:"Basic single mailbox user without AI features",features:["Connect 1 BYOM Email Account (Gmail, M365, cPanel)","Connect 1 Cloud Drive Storage Account","Unified Omnio Inbox & Interface","Omnio Calendar & Keep Notes","⚡ No Gemini AI Features"],ctaText:"Current Plan"},{id:"pro",name:"BYOM Pro",priceMonthly:"$12",badge:"Most Popular",highlighted:!0,targetAudience:"Power users & professionals with multiple inboxes",features:["Connect up to 5 BYOM Email Accounts (Gmail, M365, Zoho, IMAP)","Connect up to 5 Cloud Drive Storage Accounts","Full Gemini AI Copilot (Summarizer, Smart Reply, Draft Generator)","Omnio Calendar, Keep Notes & Tasks","Automated rules & priority action items"],ctaText:"Upgrade to BYOM Pro"},{id:"business",name:"BYOM Business",priceMonthly:"$29",targetAudience:"Teams, agencies & multi-inbox collaboration",features:["Connect up to 10 BYOM Email Accounts","Connect up to 10 Cloud Drive Storage Accounts","Full Gemini AI Copilot & Team Workspaces","Shared Team Inboxes & Delegated Mailboxes","Custom Domain Branding on omnio.email","Priority 24/7 Enterprise Support"],ctaText:"Start BYOM Business"},{id:"provider",name:"Provider Edition",priceMonthly:"$49 / server",badge:"For Web Hosts",targetAudience:"cPanel / WHM / Plesk / DirectAdmin Hosting Companies",features:["cPanel, WHM, Plesk & DirectAdmin Plugins","Zero Migration — Connects to existing Dovecot / Exim host","WHMCS & Blesta Billing Auto-Provisioning","Unlimited customer mailboxes per server node","Full white-label webmail on omnio.email","Replaces legacy Roundcube with Omnio Mail OS"],ctaText:"Explore Provider License"}],Wx=[{name:"cPanel & WHM Plugin",iconName:"Server",type:"cPanel / WHM",version:"v3.4.0",status:"Active",mailboxesManaged:1420,description:"Hooks directly into cPanel Webmail daemon. Replaces Roundcube with Omnio zero-migration interface."},{name:"Plesk Obsidian Extension",iconName:"Cpu",type:"Plesk",version:"v2.1.0",status:"Active",mailboxesManaged:850,description:"One-click extension for Plesk Linux & Windows servers. Auto-configures Dovecot IMAP and MailEnable SSL."},{name:"DirectAdmin Module",iconName:"HardDrive",type:"DirectAdmin",version:"v1.9.2",status:"Active",mailboxesManaged:310,description:"Lightweight binary hook for DirectAdmin exim/dovecot stacks. Zero storage duplication."},{name:"WHMCS Auto-Provisioning Plugin",iconName:"CreditCard",type:"WHMCS",version:"v4.0.1",status:"Active",mailboxesManaged:2580,description:"Automates license assignment and webmail URL generation upon cPanel account order completion."}],Jp=({darkMode:c,onBack:h,onAddAccount:S,onSelectAccount:d,onShowToast:z})=>{const[M,V]=m.useState("webmail.omnio.email"),[q,k]=m.useState("Omnio Mail Webmail"),[g,R]=m.useState("#2563eb"),[Q,W]=m.useState("user@omnio.email"),[I,K]=m.useState("password123"),[X,P]=m.useState("extensions"),be=ae=>{ae.preventDefault();const L=Q.trim()||"customer@clientdomain.com",J={id:"acc_"+Date.now(),name:L.split("@")[0]||"Customer",email:L,provider:"cpanel",providerDisplayName:q||"CloudServer AI Webmail",serverHost:M||"webmail.cloudserverhost.com",isDefault:!1,status:"connected",unreadCount:3};S&&S(J),d&&d(J.id),z&&z(`Signed in to ${q} as ${L}`),h()};return a.jsx("div",{className:`flex-1 flex flex-col h-full overflow-y-auto p-3 sm:p-6 select-none ${c?"bg-[#1f1f1f] text-gray-100":"bg-gray-50 text-gray-900"}`,children:a.jsxs("div",{className:"max-w-6xl w-full mx-auto space-y-6",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-4 border-b border-gray-200 dark:border-gray-800",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-12 h-12 rounded-2xl bg-gradient-to-tr from-emerald-600 to-teal-600 text-white flex items-center justify-center shadow-lg shrink-0",children:a.jsx(ql,{className:"w-6 h-6"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center space-x-2 flex-wrap gap-1",children:[a.jsx("h1",{className:"text-xl font-bold font-sans",children:"Omnio Provider Edition"}),a.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-emerald-100 dark:bg-emerald-950 text-emerald-800 dark:text-emerald-300 border border-emerald-500/30",children:"Zero Mailbox Migration"})]}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Replace Roundcube for cPanel, WHM, Plesk & DirectAdmin while retaining existing server storage."})]})]}),a.jsx("button",{onClick:h,className:"self-start sm:self-auto px-4 py-2 rounded-xl border text-xs font-semibold hover:bg-black/5 dark:hover:bg-white/10 cursor-pointer",children:"← Back to Mail Workspace"})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsxs("div",{className:`p-4 rounded-2xl border ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx(Jr,{className:"w-5 h-5 text-emerald-500 mb-2"}),a.jsx("h3",{className:"font-bold text-xs",children:"Zero Storage Overhead"}),a.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"Messages remain stored on host's Dovecot/Postfix servers."})]}),a.jsxs("div",{className:`p-4 rounded-2xl border ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx(po,{className:"w-5 h-5 text-blue-500 mb-2"}),a.jsx("h3",{className:"font-bold text-xs",children:"White-Label Webmail"}),a.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"Custom domain URL, logo, CSS, and brand colors."})]}),a.jsxs("div",{className:`p-4 rounded-2xl border ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx(ko,{className:"w-5 h-5 text-purple-500 mb-2"}),a.jsx("h3",{className:"font-bold text-xs",children:"WHMCS Auto-Provisioning"}),a.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"Automatic licensing and webmail URL assignment on order."})]}),a.jsxs("div",{className:`p-4 rounded-2xl border ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx(Bl,{className:"w-5 h-5 text-amber-500 mb-2"}),a.jsx("h3",{className:"font-bold text-xs",children:"AI Assistant for Customers"}),a.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"Provides Gemini smart reply and thread summaries to end users."})]})]}),a.jsxs("div",{className:"flex border-b border-gray-200 dark:border-gray-800 space-x-6 text-xs font-semibold",children:[a.jsxs("button",{onClick:()=>P("extensions"),className:`pb-3 border-b-2 transition-colors ${X==="extensions"?"border-emerald-500 text-emerald-600 dark:text-emerald-400":"border-transparent text-gray-400"}`,children:["Connected Control Panels (",Wx.length,")"]}),a.jsx("button",{onClick:()=>P("whm-config"),className:`pb-3 border-b-2 transition-colors ${X==="whm-config"?"border-emerald-500 text-emerald-600 dark:text-emerald-400":"border-transparent text-gray-400"}`,children:"White-Label Branding & Domain"}),a.jsx("button",{onClick:()=>P("whmcs"),className:`pb-3 border-b-2 transition-colors ${X==="whmcs"?"border-emerald-500 text-emerald-600 dark:text-emerald-400":"border-transparent text-gray-400"}`,children:"WHMCS Billing Setup"}),a.jsx("button",{onClick:()=>P("savings"),className:`pb-3 border-b-2 transition-colors ${X==="savings"?"border-emerald-500 text-emerald-600 dark:text-emerald-400":"border-transparent text-gray-400"}`,children:"Infrastructure Cost Savings"})]}),X==="extensions"&&a.jsx("div",{className:"grid grid-cols-2 gap-4",children:Wx.map((ae,L)=>a.jsxs("div",{className:`p-5 rounded-2xl border space-y-3 ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-100 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400 flex items-center justify-center font-bold",children:a.jsx(ql,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-bold text-sm",children:ae.name}),a.jsxs("p",{className:"text-[11px] text-gray-400 font-mono",children:[ae.type," • ",ae.version]})]})]}),a.jsxs("span",{className:"px-2.5 py-1 rounded-full text-[10px] font-mono font-bold bg-emerald-100 dark:bg-emerald-900/60 text-emerald-700 dark:text-emerald-300",children:["● ",ae.status]})]}),a.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 leading-relaxed",children:ae.description}),a.jsxs("div",{className:"pt-2 border-t border-gray-100 dark:border-gray-800 flex items-center justify-between text-xs font-mono",children:[a.jsx("span",{className:"text-gray-400",children:"Active Mailboxes Managed:"}),a.jsx("span",{className:"font-bold text-emerald-600 dark:text-emerald-400",children:ae.mailboxesManaged.toLocaleString()})]})]},L))}),X==="whm-config"&&a.jsxs("div",{className:`p-6 rounded-2xl border space-y-6 ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx("h2",{className:"text-sm font-bold text-emerald-600 dark:text-emerald-400 uppercase tracking-wider",children:"Host White-Label Branding Customizer"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 text-xs",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-gray-400 mb-1 font-semibold",children:"Custom Webmail URL Hostname"}),a.jsx("input",{type:"text",value:M,onChange:ae=>V(ae.target.value),className:`w-full p-2.5 rounded-xl border font-mono outline-none ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-gray-400 mb-1 font-semibold",children:"Brand / Host Title"}),a.jsx("input",{type:"text",value:q,onChange:ae=>k(ae.target.value),className:`w-full p-2.5 rounded-xl border outline-none ${c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-300"}`})]})]}),a.jsxs("div",{className:"pt-4 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("span",{className:"block text-xs font-bold text-gray-400 uppercase tracking-wider mb-2",children:"Customer Webmail Login Preview (Interactive Demo):"}),a.jsxs("form",{onSubmit:be,className:"p-6 rounded-2xl bg-slate-900 text-white space-y-4 max-w-md mx-auto shadow-xl",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(po,{className:"w-5 h-5 text-emerald-400"}),a.jsx("span",{className:"font-bold text-sm",children:q})]}),a.jsxs("p",{className:"text-xs text-gray-400 font-mono",children:["URL: https://",M]}),a.jsxs("div",{className:"space-y-2.5",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] text-gray-400 mb-0.5",children:"Email Address"}),a.jsx("input",{type:"email",required:!0,value:Q,onChange:ae=>W(ae.target.value),placeholder:"customer@clientdomain.com",className:"w-full p-2.5 rounded-xl bg-slate-800 text-xs text-gray-200 border border-slate-700 outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] text-gray-400 mb-0.5",children:"Password"}),a.jsx("input",{type:"password",required:!0,value:I,onChange:ae=>K(ae.target.value),placeholder:"Password",className:"w-full p-2.5 rounded-xl bg-slate-800 text-xs text-gray-200 border border-slate-700 outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500"})]}),a.jsxs("button",{type:"submit",className:"w-full py-2.5 rounded-xl bg-emerald-600 hover:bg-emerald-500 font-bold text-xs text-white shadow-lg cursor-pointer transition-all active:scale-[0.98] flex items-center justify-center space-x-2 mt-2",children:[a.jsxs("span",{children:["Sign in to ",q]}),a.jsx(An,{className:"w-4 h-4"})]}),a.jsx("p",{className:"text-[10px] text-center text-emerald-400/80 font-mono pt-1",children:"✓ Instant single sign-on without migration"})]})]})]})]}),X==="whmcs"&&a.jsxs("div",{className:`p-6 rounded-2xl border space-y-4 ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx("h2",{className:"text-sm font-bold text-emerald-600 dark:text-emerald-400 uppercase tracking-wider",children:"WHMCS & Blesta Billing Auto-Provisioning"}),a.jsx("p",{className:"text-xs text-gray-400 leading-relaxed",children:"When a web hosting customer orders a cPanel or Plesk hosting package through WHMCS, the Omnio WHMCS plugin automatically generates their single sign-on token and configures their email client launch URL."}),a.jsxs("div",{className:"rounded-xl bg-[#0f172a] border border-slate-800 shadow-xl overflow-hidden font-mono text-xs",children:[a.jsxs("div",{className:"bg-[#1e293b] px-4 py-2 border-b border-slate-800 flex items-center justify-between text-slate-400 text-[11px]",children:[a.jsxs("span",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-rose-500/80 inline-block"}),a.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500/80 inline-block"}),a.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500/80 inline-block"}),a.jsx("span",{className:"ml-2 font-medium text-slate-300",children:"whmcs_hook_sso.php"})]}),a.jsx("span",{className:"text-[10px] text-slate-500",children:"PHP 8.2 • WHMCS 8.x Hook"})]}),a.jsxs("div",{className:"p-4 space-y-1.5 text-slate-200 overflow-x-auto leading-relaxed",children:[a.jsx("p",{className:"text-slate-400 font-italic",children:"// WHMCS Module Hook Script Sample"}),a.jsxs("p",{children:[a.jsx("span",{className:"text-purple-400 font-semibold",children:"add_hook"}),a.jsx("span",{className:"text-slate-300",children:"("}),a.jsx("span",{className:"text-emerald-300",children:"'ServerCreate'"}),a.jsx("span",{className:"text-slate-300",children:", "}),a.jsx("span",{className:"text-amber-300",children:"1"}),a.jsx("span",{className:"text-slate-300",children:", "}),a.jsx("span",{className:"text-purple-400 font-semibold",children:"function"}),a.jsx("span",{className:"text-slate-300",children:"("}),a.jsx("span",{className:"text-sky-300",children:"$vars"}),a.jsx("span",{className:"text-slate-300",children:") {"})]}),a.jsxs("p",{className:"pl-6",children:[a.jsx("span",{className:"text-sky-300",children:"$mailbox"}),a.jsx("span",{className:"text-slate-300",children:" = "}),a.jsx("span",{className:"text-sky-300",children:"$vars"}),a.jsx("span",{className:"text-slate-300",children:"["}),a.jsx("span",{className:"text-emerald-300",children:"'params'"}),a.jsx("span",{className:"text-slate-300",children:"]["}),a.jsx("span",{className:"text-emerald-300",children:"'username'"}),a.jsx("span",{className:"text-slate-300",children:"] . "}),a.jsx("span",{className:"text-emerald-300",children:"'@'"}),a.jsx("span",{className:"text-slate-300",children:" . "}),a.jsx("span",{className:"text-sky-300",children:"$vars"}),a.jsx("span",{className:"text-slate-300",children:"["}),a.jsx("span",{className:"text-emerald-300",children:"'params'"}),a.jsx("span",{className:"text-slate-300",children:"]["}),a.jsx("span",{className:"text-emerald-300",children:"'domain'"}),a.jsx("span",{className:"text-slate-300",children:"];"})]}),a.jsxs("p",{className:"pl-6",children:[a.jsx("span",{className:"text-sky-300",children:"$ssoUrl"}),a.jsx("span",{className:"text-slate-300",children:" = "}),a.jsx("span",{className:"text-amber-300 font-semibold",children:"OmnioProvider"}),a.jsx("span",{className:"text-slate-300",children:"::"}),a.jsx("span",{className:"text-blue-400",children:"provisionSSO"}),a.jsx("span",{className:"text-slate-300",children:"("}),a.jsx("span",{className:"text-sky-300",children:"$mailbox"}),a.jsx("span",{className:"text-slate-300",children:");"})]}),a.jsxs("p",{className:"pl-6",children:[a.jsx("span",{className:"text-purple-400 font-semibold",children:"return"}),a.jsx("span",{className:"text-slate-300",children:" "}),a.jsx("span",{className:"text-pink-400",children:"array"}),a.jsx("span",{className:"text-slate-300",children:"("}),a.jsx("span",{className:"text-emerald-300",children:"'success'"}),a.jsx("span",{className:"text-slate-300",children:" => "}),a.jsx("span",{className:"text-amber-300",children:"true"}),a.jsx("span",{className:"text-slate-300",children:", "}),a.jsx("span",{className:"text-emerald-300",children:"'webmail_url'"}),a.jsx("span",{className:"text-slate-300",children:" => "}),a.jsx("span",{className:"text-sky-300",children:"$ssoUrl"}),a.jsx("span",{className:"text-slate-300",children:");"})]}),a.jsx("p",{children:"});"})]})]})]}),X==="savings"&&a.jsxs("div",{className:`p-6 rounded-2xl border space-y-4 ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:[a.jsx("h2",{className:"text-sm font-bold text-emerald-600 dark:text-emerald-400 uppercase tracking-wider",children:"Financial Analysis: Selling Features vs Selling Cloud Storage"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 text-xs",children:[a.jsxs("div",{className:"p-4 rounded-xl bg-rose-950/20 border border-rose-800/40 space-y-2",children:[a.jsx("span",{className:"font-bold text-rose-400 block text-sm",children:"❌ Traditional Storage Provider Model"}),a.jsx("p",{className:"text-gray-400",children:"Selling 50GB / 100GB Mailboxes:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-1 text-gray-300",children:[a.jsx("li",{children:"High SAN/NVMe hardware & backup costs"}),a.jsx("li",{children:"Mailbox migration headache & downtime"}),a.jsx("li",{children:"Compliance & spam abuse liability"}),a.jsx("li",{children:"Low profit margins per customer"})]})]}),a.jsxs("div",{className:"p-4 rounded-xl bg-emerald-950/20 border border-emerald-800/40 space-y-2",children:[a.jsx("span",{className:"font-bold text-emerald-400 block text-sm",children:"✅ Omnio Operating System Model"}),a.jsx("p",{className:"text-gray-400",children:"Selling AI & Workspace Productivity Features:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-1 text-gray-300",children:[a.jsx("li",{children:"Zero storage cost (Host Dovecot retains mail)"}),a.jsx("li",{children:"Instant zero-migration setup"}),a.jsx("li",{children:"High customer retention with AI Copilot"}),a.jsx("li",{children:"90%+ gross margins for hosting providers"})]})]})]})]})]})})},Ip=({darkMode:c,isOpen:h,onClose:S,currentPlan:d="free",onSelectPlan:z})=>h?a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs select-none",children:a.jsxs("div",{className:`w-full max-w-5xl max-h-[90vh] overflow-y-auto rounded-3xl shadow-2xl border p-6 space-y-6 transition-all ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-900"}`,children:[a.jsxs("div",{className:"flex items-start justify-between pb-4 border-b border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-tr from-blue-600 to-indigo-600 text-white flex items-center justify-center font-bold",children:a.jsx(Bl,{className:"w-4 h-4 text-amber-300"})}),a.jsx("h2",{className:"text-xl font-bold font-sans",children:"Omnio Mail OS Subscription Plans"})]}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Select a plan to fit your mailbox and storage needs. Free plan includes 1 mailbox (no AI). Pro & Business plans unlock up to 5 or 10 mailboxes + Gemini AI Copilot."})]}),a.jsx("button",{onClick:S,className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 cursor-pointer",children:a.jsx(wt,{className:"w-5 h-5"})})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Kp.map(M=>{const V=d===M.id;return a.jsxs("div",{className:`p-5 rounded-2xl border flex flex-col justify-between relative transition-all ${V?"ring-2 ring-emerald-500 bg-emerald-500/5 border-emerald-500":M.highlighted?c?"bg-blue-950/40 border-blue-500 shadow-xl":"bg-blue-50/80 border-blue-600 shadow-xl":c?"bg-[#1f1f1f] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[V?a.jsxs("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 px-3 py-0.5 rounded-full text-[10px] uppercase font-mono font-bold bg-emerald-600 text-white shadow-sm flex items-center space-x-1",children:[a.jsx(tt,{className:"w-3 h-3"}),a.jsx("span",{children:"Active Plan"})]}):M.badge?a.jsx("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 px-3 py-0.5 rounded-full text-[10px] uppercase font-mono font-bold bg-gradient-to-r from-blue-600 to-indigo-600 text-white shadow-sm",children:M.badge}):null,a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-bold text-sm",children:M.name}),a.jsxs("div",{className:"flex items-baseline space-x-1 mt-1",children:[a.jsx("span",{className:"text-2xl font-extrabold font-sans",children:M.priceMonthly}),M.priceMonthly.includes("$")&&a.jsx("span",{className:"text-xs text-gray-400",children:"/month"})]}),a.jsx("p",{className:"text-[10px] text-gray-400 mt-1 min-h-[30px]",children:M.targetAudience})]}),a.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-800 space-y-2 text-xs",children:M.features.map((q,k)=>a.jsxs("div",{className:"flex items-start space-x-2",children:[a.jsx(tt,{className:`w-3.5 h-3.5 shrink-0 mt-0.5 ${q.includes("No Gemini AI")?"text-rose-500":"text-blue-500"}`}),a.jsx("span",{className:`leading-tight ${q.includes("No Gemini AI")?"text-rose-500 font-semibold":"text-gray-600 dark:text-gray-300"}`,children:q})]},k))})]}),a.jsx("div",{className:"pt-4 mt-4 border-t border-gray-200 dark:border-gray-800",children:a.jsx("button",{disabled:V,onClick:()=>{z&&z(M.id),S()},className:`w-full py-2 px-3 rounded-xl font-semibold text-xs transition-colors shadow-sm cursor-pointer ${V?"bg-emerald-600 text-white opacity-90 cursor-default":M.highlighted?"bg-blue-600 hover:bg-blue-700 text-white":c?"bg-gray-800 hover:bg-gray-700 text-gray-200":"bg-white border hover:bg-gray-100 text-gray-800"}`,children:V?"Current Plan":`Switch to ${M.name}`})})]},M.id)})}),a.jsxs("div",{className:"p-4 rounded-2xl bg-gradient-to-r from-blue-900/30 via-indigo-900/30 to-purple-900/30 border border-blue-500/30 text-xs space-y-1",children:[a.jsxs("p",{className:"font-bold text-blue-400 flex items-center space-x-1.5",children:[a.jsx(Tt,{className:"w-4 h-4 text-amber-400"}),a.jsx("span",{children:"Omnio Mail OS Storage & BYOM Architecture"})]}),a.jsx("p",{className:"text-gray-300 leading-relaxed",children:"Omnio Mail OS gives subscribers dedicated cloud storage on @omnio.email while allowing BYOM (Bring Your Own Mail) accounts to connect directly via OAuth or IMAP without mandatory server migration."})]})]})}):null,Wp=[{id:"usr_1",name:"Komail Lalani",email:"komail.lalani@gmail.com",plan:"pro",status:"active",connectedMailboxes:3,joinedDate:"2026-01-15",stripeCustomerId:"cus_N8x2kLp91a",mrr:12},{id:"usr_2",name:"Sarah Jenkins",email:"sarah.j@techcorp.io",plan:"business",status:"active",connectedMailboxes:8,joinedDate:"2026-02-01",stripeCustomerId:"cus_M7x1aBq42z",mrr:29},{id:"usr_3",name:"HostMaster WHM Admin",email:"admin@cloudnode-hosting.net",plan:"provider",status:"active",connectedMailboxes:1420,joinedDate:"2025-11-20",stripeCustomerId:"cus_P9z3mLu88c",mrr:199},{id:"usr_4",name:"Alex Rivera",email:"alex.rivera@designstudio.co",plan:"free",status:"active",connectedMailboxes:1,joinedDate:"2026-03-10",mrr:0},{id:"usr_5",name:"Elena Rostova",email:"elena@startuphub.com",plan:"pro",status:"active",connectedMailboxes:4,joinedDate:"2026-03-22",stripeCustomerId:"cus_K4y9pQ11vv",mrr:12}],Pp=({darkMode:c,isOpen:h,onClose:S,currentUserPlan:d,onUpdateCurrentUserPlan:z,onShowToast:M})=>{const[V,q]=m.useState("users"),[k,g]=m.useState(Wp),[R,Q]=m.useState(""),[W,I]=m.useState("sk_live_51Mxxxxxxxxxxxxxxxxxxxxxxx"),[K,X]=m.useState("pk_live_51Mxxxxxxxxxxxxxxxxxxxxxxx"),[P,be]=m.useState("whsec_xxxxxxxxxxxxxxxxxxxxxxx"),[ae,L]=m.useState(!1),[J,ce]=m.useState("connected"),[fe,le]=m.useState("cpanel_mysql"),[ye,ke]=m.useState("localhost"),[ie,re]=m.useState("3306"),[$,de]=m.useState("cpaneluser_omniouser"),[ue,oe]=m.useState("cpaneluser_omnio_db"),[A,b]=m.useState("••••••••••••••••");if(!h)return null;const U=k.filter(p=>p.name.toLowerCase().includes(R.toLowerCase())||p.email.toLowerCase().includes(R.toLowerCase())||p.plan.toLowerCase().includes(R.toLowerCase())),G=k.reduce((p,Y)=>p+Y.mrr,0),se=k.filter(p=>p.plan!=="free").length,u=(p,Y)=>{const ee={free:0,pro:12,business:29,provider:199};g(ge=>ge.map(Ne=>Ne.id===p?{...Ne,plan:Y,mrr:ee[Y]}:Ne));const xe=k.find(ge=>ge.id===p);xe&&xe.email==="komail.lalani@gmail.com"&&z(Y),M&&M(`User plan updated to ${Y.toUpperCase()} successfully.`)};return a.jsx("div",{className:"fixed inset-0 z-[110] flex items-center justify-center p-3 sm:p-6 bg-black/70 backdrop-blur-sm select-none",children:a.jsxs("div",{className:`w-full max-w-6xl h-[92vh] flex flex-col rounded-3xl shadow-2xl border overflow-hidden transition-all ${c?"bg-[#212225] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-900"}`,children:[a.jsxs("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gradient-to-r from-blue-600/10 via-indigo-600/10 to-transparent",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-2xl bg-gradient-to-tr from-blue-600 to-indigo-600 text-white flex items-center justify-center font-bold shadow-md",children:a.jsx(sm,{className:"w-5 h-5 text-amber-300"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("h2",{className:"text-lg font-bold font-sans",children:"Omnio SaaS Owner Admin Console"}),a.jsx("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-amber-500/20 text-amber-700 dark:text-amber-300 border border-amber-500/30",children:"SUPER ADMIN"})]}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Manage user subscriptions, Stripe payment gateways, user databases, and system licenses."})]})]}),a.jsx("button",{onClick:S,className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-500 cursor-pointer",children:a.jsx(wt,{className:"w-5 h-5"})})]}),a.jsxs("div",{className:"px-6 py-2 border-b border-gray-200 dark:border-gray-800 flex items-center space-x-2 overflow-x-auto bg-gray-50/50 dark:bg-[#191a1c]",children:[a.jsxs("button",{onClick:()=>q("users"),className:`flex items-center space-x-2 px-4 py-2 rounded-xl text-xs font-semibold transition-all cursor-pointer ${V==="users"?"bg-blue-600 text-white shadow-sm":"hover:bg-gray-200/60 dark:hover:bg-white/5 text-gray-600 dark:text-gray-400"}`,children:[a.jsx(As,{className:"w-4 h-4"}),a.jsxs("span",{children:["Users & Subscribers (",k.length,")"]})]}),a.jsxs("button",{onClick:()=>q("stripe"),className:`flex items-center space-x-2 px-4 py-2 rounded-xl text-xs font-semibold transition-all cursor-pointer ${V==="stripe"?"bg-blue-600 text-white shadow-sm":"hover:bg-gray-200/60 dark:hover:bg-white/5 text-gray-600 dark:text-gray-400"}`,children:[a.jsx(ko,{className:"w-4 h-4 text-emerald-400"}),a.jsx("span",{children:"Stripe Payments & Billing"})]}),a.jsxs("button",{onClick:()=>q("database"),className:`flex items-center space-x-2 px-4 py-2 rounded-xl text-xs font-semibold transition-all cursor-pointer ${V==="database"?"bg-blue-600 text-white shadow-sm":"hover:bg-gray-200/60 dark:hover:bg-white/5 text-gray-600 dark:text-gray-400"}`,children:[a.jsx(zx,{className:"w-4 h-4 text-indigo-400"}),a.jsx("span",{children:"Database & Storage"})]}),a.jsxs("button",{onClick:()=>q("analytics"),className:`flex items-center space-x-2 px-4 py-2 rounded-xl text-xs font-semibold transition-all cursor-pointer ${V==="analytics"?"bg-blue-600 text-white shadow-sm":"hover:bg-gray-200/60 dark:hover:bg-white/5 text-gray-600 dark:text-gray-400"}`,children:[a.jsx(rb,{className:"w-4 h-4 text-purple-400"}),a.jsx("span",{children:"MRR & SaaS Metrics"})]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[V==="users"&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3",children:[a.jsxs("div",{className:"relative w-full sm:w-80",children:[a.jsx(_s,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),a.jsx("input",{type:"text",placeholder:"Search by name, email, or plan...",value:R,onChange:p=>Q(p.target.value),className:"w-full pl-9 pr-4 py-2 text-xs rounded-xl border border-gray-300 dark:border-gray-700 bg-transparent focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),a.jsx("div",{className:"flex items-center space-x-2 w-full sm:w-auto",children:a.jsxs("button",{onClick:()=>{const p={id:`usr_${Date.now()}`,name:"New Client User",email:`client${Math.floor(Math.random()*1e3)}@example.com`,plan:"free",status:"active",connectedMailboxes:1,joinedDate:new Date().toISOString().split("T")[0],mrr:0};g([p,...k]),M&&M("New user account created.")},className:"flex-1 sm:flex-none flex items-center justify-center space-x-1.5 px-3 py-2 rounded-xl bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold transition-colors cursor-pointer",children:[a.jsx(ba,{className:"w-4 h-4"}),a.jsx("span",{children:"Create User"})]})})]}),a.jsx("div",{className:"rounded-2xl border border-gray-200 dark:border-gray-700 overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-left text-xs",children:[a.jsx("thead",{className:`border-b font-semibold uppercase tracking-wider text-[10px] ${c?"bg-[#1a1b1d] border-gray-700 text-gray-400":"bg-gray-50 border-gray-200 text-gray-500"}`,children:a.jsxs("tr",{children:[a.jsx("th",{className:"py-3 px-4",children:"User Details"}),a.jsx("th",{className:"py-3 px-4",children:"Subscription Plan"}),a.jsx("th",{className:"py-3 px-4",children:"Status"}),a.jsx("th",{className:"py-3 px-4",children:"Mailboxes"}),a.jsx("th",{className:"py-3 px-4",children:"MRR"}),a.jsx("th",{className:"py-3 px-4 text-right",children:"Owner Action (Change Plan)"})]})}),a.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-800",children:U.map(p=>a.jsxs("tr",{className:c?"hover:bg-white/5":"hover:bg-gray-50",children:[a.jsxs("td",{className:"py-3 px-4",children:[a.jsx("div",{className:"font-bold",children:p.name}),a.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 font-mono",children:p.email})]}),a.jsx("td",{className:"py-3 px-4",children:a.jsx("span",{className:`px-2.5 py-1 rounded-full text-[10px] font-bold uppercase font-mono ${p.plan==="free"?"bg-gray-200 text-gray-700 dark:bg-gray-800 dark:text-gray-300":p.plan==="pro"?"bg-blue-100 text-blue-800 dark:bg-blue-900/60 dark:text-blue-300":p.plan==="business"?"bg-purple-100 text-purple-800 dark:bg-purple-900/60 dark:text-purple-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/60 dark:text-emerald-300"}`,children:p.plan.toUpperCase()})}),a.jsx("td",{className:"py-3 px-4",children:a.jsxs("span",{className:"flex items-center space-x-1 text-emerald-600 dark:text-emerald-400 font-medium",children:[a.jsx(gl,{className:"w-3.5 h-3.5"}),a.jsx("span",{className:"capitalize",children:p.status})]})}),a.jsx("td",{className:"py-3 px-4 font-mono font-semibold",children:p.connectedMailboxes}),a.jsxs("td",{className:"py-3 px-4 font-mono font-bold text-emerald-600 dark:text-emerald-400",children:["$",p.mrr,"/mo"]}),a.jsx("td",{className:"py-3 px-4 text-right",children:a.jsxs("div",{className:"inline-flex items-center space-x-1",children:[a.jsx("button",{onClick:()=>u(p.id,"free"),title:"Make Free User",className:`px-2 py-1 rounded-lg text-[10px] font-bold transition-all cursor-pointer ${p.plan==="free"?"bg-gray-300 dark:bg-gray-700 opacity-50":"bg-gray-200 dark:bg-gray-800 hover:bg-gray-300"}`,children:"Free"}),a.jsx("button",{onClick:()=>u(p.id,"pro"),title:"Upgrade to PRO ($12/mo)",className:`px-2 py-1 rounded-lg text-[10px] font-bold transition-all cursor-pointer ${p.plan==="pro"?"bg-blue-600 text-white shadow-xs":"bg-blue-100 dark:bg-blue-900/50 text-blue-700 dark:text-blue-300 hover:bg-blue-200"}`,children:"PRO ($12)"}),a.jsx("button",{onClick:()=>u(p.id,"business"),title:"Upgrade to Business ($29/mo)",className:`px-2 py-1 rounded-lg text-[10px] font-bold transition-all cursor-pointer ${p.plan==="business"?"bg-purple-600 text-white shadow-xs":"bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 hover:bg-purple-200"}`,children:"Biz ($29)"}),a.jsx("button",{onClick:()=>u(p.id,"provider"),title:"Grant Host Provider Edition ($199/mo)",className:`px-2 py-1 rounded-lg text-[10px] font-bold transition-all cursor-pointer ${p.plan==="provider"?"bg-emerald-600 text-white shadow-xs":"bg-emerald-100 dark:bg-emerald-900/50 text-emerald-700 dark:text-emerald-300 hover:bg-emerald-200"}`,children:"Host ($199)"})]})})]},p.id))})]})})})]}),V==="stripe"&&a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200 dark:border-gray-800",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Zb,{className:"w-5 h-5 text-amber-400"}),a.jsx("h3",{className:"font-bold text-sm",children:"Stripe Payment Gateway Credentials"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Mode:"}),a.jsx("button",{onClick:()=>{L(!ae),M&&M(`Switched to ${ae?"LIVE":"TEST"} Stripe mode.`)},className:`px-3 py-1 rounded-full text-xs font-bold transition-all cursor-pointer ${ae?"bg-amber-500/20 text-amber-700 dark:text-amber-300 border border-amber-500/40":"bg-emerald-500/20 text-emerald-700 dark:text-emerald-300 border border-emerald-500/40"}`,children:ae?"TEST MODE":"LIVE PRODUCTION"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-bold uppercase text-gray-400 mb-1",children:"Stripe Secret Key (STRIPE_SECRET_KEY)"}),a.jsx("input",{type:"password",value:W,onChange:p=>I(p.target.value),className:"w-full px-3 py-2 text-xs font-mono rounded-xl border border-gray-300 dark:border-gray-700 bg-transparent focus:ring-2 focus:ring-blue-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[11px] font-bold uppercase text-gray-400 mb-1",children:"Stripe Publishable Key (VITE_STRIPE_PUBLIC_KEY)"}),a.jsx("input",{type:"text",value:K,onChange:p=>X(p.target.value),className:"w-full px-3 py-2 text-xs font-mono rounded-xl border border-gray-300 dark:border-gray-700 bg-transparent focus:ring-2 focus:ring-blue-500"})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("label",{className:"block text-[11px] font-bold uppercase text-gray-400 mb-1",children:"Stripe Webhook Endpoint Secret (STRIPE_WEBHOOK_SECRET)"}),a.jsx("input",{type:"password",value:P,onChange:p=>be(p.target.value),className:"w-full px-3 py-2 text-xs font-mono rounded-xl border border-gray-300 dark:border-gray-700 bg-transparent focus:ring-2 focus:ring-blue-500"})]})]}),a.jsxs("div",{className:"mt-4 pt-3 border-t border-gray-200 dark:border-gray-800 flex justify-between items-center",children:[a.jsx("p",{className:"text-[11px] text-gray-500",children:"Keys are securely referenced from process.env on your Cloud Run or WHM node server."}),a.jsx("button",{onClick:()=>{M&&M("Stripe API keys saved successfully.")},className:"px-4 py-2 rounded-xl bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold transition-colors cursor-pointer",children:"Save Credentials"})]})]}),a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsxs("h3",{className:"font-bold text-sm mb-3 flex items-center space-x-2",children:[a.jsx(Nb,{className:"w-4 h-4 text-emerald-500"}),a.jsx("span",{children:"Simulate Stripe Checkout Webhook Event"})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{onClick:()=>{u("usr_1","pro"),M&&M("Simulated Stripe event: customer.subscription.created ($12/mo PRO)")},className:"px-3 py-2 rounded-xl bg-blue-600/10 text-blue-600 dark:text-blue-400 border border-blue-500/30 text-xs font-semibold hover:bg-blue-600/20 cursor-pointer",children:"Simulate $12/mo Pro Payment"}),a.jsx("button",{onClick:()=>{u("usr_1","business"),M&&M("Simulated Stripe event: customer.subscription.created ($29/mo BUSINESS)")},className:"px-3 py-2 rounded-xl bg-purple-600/10 text-purple-600 dark:text-purple-400 border border-purple-500/30 text-xs font-semibold hover:bg-purple-600/20 cursor-pointer",children:"Simulate $29/mo Business Payment"}),a.jsx("button",{onClick:()=>{u("usr_1","provider"),M&&M("Simulated Stripe event: customer.subscription.created ($199/mo WHM HOST)")},className:"px-3 py-2 rounded-xl bg-emerald-600/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/30 text-xs font-semibold hover:bg-emerald-600/20 cursor-pointer",children:"Simulate $199/mo Provider Payment"})]})]})]}),V==="database"&&a.jsx("div",{className:"space-y-6",children:a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200 dark:border-gray-800",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(zx,{className:"w-5 h-5 text-indigo-400"}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-bold text-sm",children:"User Database Connection"}),a.jsx("p",{className:"text-[11px] text-gray-500",children:"Stores user profiles, subscriptions, connected mailboxes, and OAuth tokens."})]})]}),a.jsxs("span",{className:"flex items-center space-x-1.5 px-3 py-1 rounded-full text-xs font-bold bg-emerald-500/20 text-emerald-700 dark:text-emerald-300 border border-emerald-500/30",children:[a.jsx(gl,{className:"w-3.5 h-3.5 text-emerald-500"}),a.jsx("span",{children:"Database Connected"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 mt-4",children:[a.jsxs("div",{className:`p-4 rounded-xl border cursor-pointer transition-all ${fe==="cpanel_mysql"?"border-amber-500 bg-amber-500/10":"border-gray-300 dark:border-gray-700"}`,onClick:()=>le("cpanel_mysql"),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"font-bold text-xs flex items-center space-x-1",children:[a.jsx(ql,{className:"w-3.5 h-3.5 text-amber-500"}),a.jsx("span",{children:"cPanel MySQL (phpMyAdmin)"})]}),fe==="cpanel_mysql"&&a.jsx(tt,{className:"w-4 h-4 text-amber-500"})]}),a.jsx("p",{className:"text-[11px] text-gray-500 mt-1",children:"Native MySQL DB created in cPanel Databases wizard with phpMyAdmin management."})]}),a.jsxs("div",{className:`p-4 rounded-xl border cursor-pointer transition-all ${fe==="firestore"?"border-blue-500 bg-blue-500/10":"border-gray-300 dark:border-gray-700"}`,onClick:()=>le("firestore"),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-xs",children:"Firebase Firestore (Cloud)"}),fe==="firestore"&&a.jsx(tt,{className:"w-4 h-4 text-blue-500"})]}),a.jsx("p",{className:"text-[11px] text-gray-500 mt-1",children:"Real-time NoSQL document persistence with Firebase Authentication."})]}),a.jsxs("div",{className:`p-4 rounded-xl border cursor-pointer transition-all ${fe==="postgres"?"border-blue-500 bg-blue-500/10":"border-gray-300 dark:border-gray-700"}`,onClick:()=>le("postgres"),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-xs",children:"Cloud SQL PostgreSQL"}),fe==="postgres"&&a.jsx(tt,{className:"w-4 h-4 text-blue-500"})]}),a.jsx("p",{className:"text-[11px] text-gray-500 mt-1",children:"Relational database connected via GCP Cloud SQL or Supabase."})]})]}),fe==="cpanel_mysql"&&a.jsxs("div",{className:"mt-4 p-4 rounded-2xl border border-amber-500/30 bg-amber-500/5 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-amber-500/20 pb-2",children:[a.jsxs("h4",{className:"font-bold text-xs text-amber-700 dark:text-amber-300 flex items-center space-x-1.5",children:[a.jsx(Bl,{className:"w-4 h-4 text-amber-500"}),a.jsx("span",{children:"cPanel MySQL Connection Credentials"})]}),a.jsx("span",{className:"text-[10px] font-mono text-gray-500",children:"Port 3306 (Standard MySQL)"})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase text-gray-400 mb-1",children:"MySQL Host (MYSQL_HOST)"}),a.jsx("input",{type:"text",value:ye,onChange:p=>ke(p.target.value),className:"w-full px-3 py-1.5 text-xs font-mono rounded-lg border border-gray-300 dark:border-gray-700 bg-transparent focus:ring-2 focus:ring-amber-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase text-gray-400 mb-1",children:"Database Name (MYSQL_DATABASE)"}),a.jsx("input",{type:"text",value:ue,onChange:p=>oe(p.target.value),className:"w-full px-3 py-1.5 text-xs font-mono rounded-lg border border-gray-300 dark:border-gray-700 bg-transparent focus:ring-2 focus:ring-amber-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase text-gray-400 mb-1",children:"Database User (MYSQL_USER)"}),a.jsx("input",{type:"text",value:$,onChange:p=>de(p.target.value),className:"w-full px-3 py-1.5 text-xs font-mono rounded-lg border border-gray-300 dark:border-gray-700 bg-transparent focus:ring-2 focus:ring-amber-500"})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-[11px] font-bold text-gray-700 dark:text-gray-300",children:"phpMyAdmin SQL Table Initialization Script"}),a.jsx("button",{onClick:()=>{navigator.clipboard.writeText(`CREATE TABLE IF NOT EXISTS users (
  id VARCHAR(64) PRIMARY KEY,
  email VARCHAR(255) NOT NULL UNIQUE,
  name VARCHAR(255),
  plan ENUM('free', 'pro', 'business', 'provider') DEFAULT 'free',
  status VARCHAR(32) DEFAULT 'active',
  connected_mailboxes INT DEFAULT 1,
  mrr DECIMAL(10,2) DEFAULT 0.00,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);`),M&&M("cPanel MySQL CREATE TABLE SQL copied to clipboard!")},className:"text-[10px] font-bold px-2 py-0.5 rounded bg-amber-500/20 text-amber-700 dark:text-amber-300 hover:bg-amber-500/30 cursor-pointer",children:"Copy SQL to Clipboard"})]}),a.jsx("pre",{className:"p-2.5 rounded-lg bg-black/80 text-emerald-400 text-[10px] font-mono overflow-x-auto",children:`CREATE TABLE IF NOT EXISTS users (
  id VARCHAR(64) PRIMARY KEY,
  email VARCHAR(255) NOT NULL UNIQUE,
  name VARCHAR(255),
  plan ENUM('free', 'pro', 'business', 'provider') DEFAULT 'free',
  status VARCHAR(32) DEFAULT 'active',
  connected_mailboxes INT DEFAULT 1,
  mrr DECIMAL(10,2) DEFAULT 0.00,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);`})]})]}),a.jsxs("div",{className:"mt-4 p-4 rounded-xl bg-black/5 dark:bg-white/5 space-y-2 text-xs font-mono",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-400",children:"Database Engine:"}),a.jsx("span",{className:"text-amber-400 font-bold",children:"MySQL 8.0 / MariaDB (cPanel)"})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-400",children:"Database Latency:"}),a.jsx("span",{className:"text-emerald-400 font-bold",children:"2 ms (Local cPanel Loopback)"})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-400",children:"Tables Initialized:"}),a.jsx("span",{className:"font-bold",children:"users, accounts, subscriptions, mailboxes, audit_logs"})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-400",children:"Total Records:"}),a.jsxs("span",{className:"font-bold",children:[k.length*14," user records"]})]})]})]})}),V==="analytics"&&a.jsx("div",{className:"space-y-6",children:a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsx("p",{className:"text-xs text-gray-500 font-semibold uppercase tracking-wider",children:"Monthly Recurring Revenue"}),a.jsxs("p",{className:"text-2xl font-extrabold text-emerald-500 mt-1",children:["$",G," / mo"]}),a.jsxs("p",{className:"text-[10px] text-gray-400 mt-1 flex items-center space-x-1",children:[a.jsx(bp,{className:"w-3 h-3 text-emerald-500"}),a.jsx("span",{children:"+24.5% vs last month"})]})]}),a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsx("p",{className:"text-xs text-gray-500 font-semibold uppercase tracking-wider",children:"Active Paid Subscribers"}),a.jsxs("p",{className:"text-2xl font-extrabold text-blue-500 mt-1",children:[se," Accounts"]}),a.jsxs("p",{className:"text-[10px] text-gray-400 mt-1",children:["Out of ",k.length," total registered"]})]}),a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsx("p",{className:"text-xs text-gray-500 font-semibold uppercase tracking-wider",children:"Free to Pro Conversion"}),a.jsx("p",{className:"text-2xl font-extrabold text-purple-500 mt-1",children:"18.4%"}),a.jsx("p",{className:"text-[10px] text-gray-400 mt-1",children:"Industry benchmark is ~4-7%"})]}),a.jsxs("div",{className:`p-5 rounded-2xl border ${c?"bg-[#191a1c] border-gray-700":"bg-gray-50 border-gray-200"}`,children:[a.jsx("p",{className:"text-xs text-gray-500 font-semibold uppercase tracking-wider",children:"Connected Mailboxes"}),a.jsx("p",{className:"text-2xl font-extrabold text-amber-500 mt-1",children:"1,436 Total"}),a.jsx("p",{className:"text-[10px] text-gray-400 mt-1",children:"cPanel / WHM / OAuth IMAP"})]})]})})]})]})})},Fp=({darkMode:c,isOpen:h,onToggleOpen:S,activeWidget:d,onSelectWidget:z,emails:M})=>{const[V,q]=m.useState(""),[k,g]=m.useState([{sender:"ai",text:"Hi! I'm Omnio Gemini Copilot. How can I help with your inbox today?",actions:["Summarize today's unread emails","Find high priority tasks","Draft weekly update"]}]),[R,Q]=m.useState(!1),[W,I]=m.useState([{id:"1",title:"Review Cloud Run deployment log",completed:!0},{id:"2",title:"Confirm Thursday 2:00 PM architecture review meeting",completed:!1},{id:"3",title:"Connect external Outlook IMAP account",completed:!1}]),[K,X]=m.useState(""),[P,be]=m.useState([{id:"1",title:"💡 Omnio BYOM Notes",content:"Remember to double-check Dovecot TLS port 993 SSL certificates for CloudServer Host migration."},{id:"2",title:"📌 Q4 Sprint Goals",content:"Finalize multi-provider sync layer and optimize local indexed state for zero overhead."}]),[ae,L]=m.useState(""),[J,ce]=m.useState(""),[fe,le]=m.useState(!1),[ye,ke]=m.useState([{id:"1",title:"Q4 Architecture Review (Sarah Jenkins)",time:"2:00 PM - 3:00 PM",location:"Omnio Meet"},{id:"2",title:"cPanel WHM Webmail Sync Pilot",time:"4:30 PM - 5:00 PM",location:"Zoom Room 4"}]),[ie,re]=m.useState(""),[$,de]=m.useState(""),[ue,oe]=m.useState(!1),[A,b]=m.useState([{id:"1",name:"Sarah Jenkins",email:"sarah.j@techventures.io"},{id:"2",name:"Alex Rivera",email:"arivera@cloudscale.net"},{id:"3",name:"Tech Support",email:"support@hostmasters.org"}]),[U,G]=m.useState(""),[se,u]=m.useState(""),[p,Y]=m.useState(!1),ee=()=>{K.trim()&&(I([...W,{id:Date.now().toString(),title:K.trim(),completed:!1}]),X(""))},xe=y=>{I(W.map(me=>me.id===y?{...me,completed:!me.completed}:me))},ge=y=>{I(W.filter(me=>me.id!==y))},Ne=()=>{!ae.trim()&&!J.trim()||(be([...P,{id:Date.now().toString(),title:ae||"Untitled Note",content:J}]),L(""),ce(""),le(!1))},Se=()=>{ie.trim()&&(ke([...ye,{id:Date.now().toString(),title:ie,time:$||"10:00 AM - 11:00 AM"}]),re(""),de(""),oe(!1))},He=()=>{!U.trim()||!se.trim()||(b([...A,{id:Date.now().toString(),name:U,email:se}]),G(""),u(""),Y(!1))},te=async y=>{const me=y||V;if(!me.trim())return;const ve=[...k,{sender:"user",text:me}];g(ve),q(""),Q(!0);try{const _e=await(await fetch("/api/ai/copilot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userMessage:me,inboxContext:M.map(T=>({id:T.id,subject:T.subject,sender:T.senderName,unread:T.unread,date:T.date,summary:T.aiSummary,actionItems:T.aiActionItems}))})})).json();g([...ve,{sender:"ai",text:_e.reply||"I analyzed your inbox. You have several pending action items.",actions:_e.suggestedActions}])}catch(Ee){console.error("Copilot error:",Ee),g([...ve,{sender:"ai",text:"Sorry, I had trouble processing your inbox request. Please try again."}])}finally{Q(!1)}};return a.jsxs("div",{className:`hidden lg:flex shrink-0 border-l select-none transition-all duration-200 ${c?"bg-[#1f1f1f] border-[#333333] text-gray-200":"bg-[#f6f8fc] border-gray-200 text-gray-800"}`,children:[a.jsxs("div",{className:"w-14 py-4 flex flex-col items-center space-y-4 border-r border-transparent",children:[a.jsx("button",{onClick:()=>{z("copilot"),h||S()},className:`p-2.5 rounded-full transition-all cursor-pointer ${h&&d==="copilot"?"bg-blue-600 text-white shadow-md":c?"hover:bg-white/10 text-blue-400":"hover:bg-black/5 text-blue-600"}`,title:"Gemini AI Copilot Sidebar",children:a.jsx(Tt,{className:"w-5 h-5 text-amber-300"})}),a.jsx("button",{onClick:()=>{z("calendar"),h||S()},className:`p-2.5 rounded-full transition-all cursor-pointer ${h&&d==="calendar"?"bg-blue-600 text-white shadow-md":c?"hover:bg-white/10 text-gray-400":"hover:bg-black/5 text-gray-600"}`,title:"Omnio Calendar",children:a.jsx(ho,{className:"w-5 h-5"})}),a.jsx("button",{onClick:()=>{z("notes"),h||S()},className:`p-2.5 rounded-full transition-all cursor-pointer ${h&&d==="notes"?"bg-blue-600 text-white shadow-md":c?"hover:bg-white/10 text-gray-400":"hover:bg-black/5 text-gray-600"}`,title:"Keep Notes",children:a.jsx(wa,{className:"w-5 h-5 text-amber-500"})}),a.jsx("button",{onClick:()=>{z("tasks"),h||S()},className:`p-2.5 rounded-full transition-all cursor-pointer ${h&&d==="tasks"?"bg-blue-600 text-white shadow-md":c?"hover:bg-white/10 text-gray-400":"hover:bg-black/5 text-gray-600"}`,title:"Tasks",children:a.jsx(vo,{className:"w-5 h-5 text-sky-500"})}),a.jsx("button",{onClick:()=>{z("contacts"),h||S()},className:`p-2.5 rounded-full transition-all cursor-pointer ${h&&d==="contacts"?"bg-blue-600 text-white shadow-md":c?"hover:bg-white/10 text-gray-400":"hover:bg-black/5 text-gray-600"}`,title:"Contacts",children:a.jsx(As,{className:"w-5 h-5 text-emerald-500"})}),a.jsx("div",{className:"flex-1"}),a.jsx("button",{onClick:S,className:"p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-400 cursor-pointer",title:h?"Collapse side panel":"Expand side panel",children:h?a.jsx(Gt,{className:"w-4 h-4"}):a.jsx(Yr,{className:"w-4 h-4"})})]}),h&&a.jsxs(a.Fragment,{children:[a.jsx("div",{onClick:S,className:"fixed inset-0 bg-black/40 z-40 md:hidden backdrop-blur-xs transition-opacity"}),a.jsxs("div",{className:`fixed inset-y-0 right-0 z-50 w-80 max-w-full shadow-2xl md:static md:w-80 md:shadow-none h-full flex flex-col border-l transition-all ${c?"bg-[#28292c] border-gray-700 text-gray-100":"bg-white border-gray-200 text-gray-800"}`,children:[a.jsxs("div",{className:"h-12 px-4 border-b flex items-center justify-between border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[d==="copilot"&&a.jsx(Tt,{className:"w-4 h-4 text-amber-400"}),d==="calendar"&&a.jsx(ho,{className:"w-4 h-4 text-blue-500"}),d==="notes"&&a.jsx(wa,{className:"w-4 h-4 text-amber-500"}),d==="tasks"&&a.jsx(vo,{className:"w-4 h-4 text-sky-500"}),d==="contacts"&&a.jsx(As,{className:"w-4 h-4 text-emerald-500"}),a.jsxs("span",{className:"font-bold text-xs capitalize",children:[d," Sidebar"]})]}),a.jsx("button",{onClick:S,className:"p-1 rounded hover:bg-black/5 dark:hover:bg-white/10 text-gray-400",children:a.jsx(wt,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[d==="copilot"&&a.jsxs("div",{className:"flex flex-col h-full justify-between space-y-3",children:[a.jsxs("div",{className:"flex-1 space-y-3 overflow-y-auto pr-1",children:[k.map((y,me)=>a.jsxs("div",{className:`p-3 rounded-2xl text-xs space-y-2 ${y.sender==="user"?"bg-blue-600 text-white ml-6":c?"bg-[#1f1f1f] text-gray-200 border border-gray-700":"bg-blue-50/70 text-gray-800 border border-blue-100"}`,children:[a.jsx("p",{className:"leading-relaxed",children:y.text}),y.actions&&y.actions.length>0&&a.jsx("div",{className:"space-y-1 pt-1",children:y.actions.map((ve,Ee)=>a.jsxs("button",{onClick:()=>te(ve),className:"w-full text-left px-2.5 py-1 rounded-lg bg-white/80 dark:bg-gray-800 hover:bg-blue-100 text-blue-700 dark:text-blue-300 font-medium text-[11px] block transition-colors",children:["⚡ ",ve]},Ee))})]},me)),R&&a.jsx("div",{className:"p-3 rounded-2xl bg-gray-100 dark:bg-gray-800 text-xs text-gray-500 italic animate-pulse",children:"Gemini is thinking and reviewing your inbox..."})]}),a.jsxs("div",{className:"pt-2 border-t border-gray-200 dark:border-gray-700 flex items-center space-x-2",children:[a.jsx("input",{type:"text",value:V,onChange:y=>q(y.target.value),onKeyDown:y=>{y.key==="Enter"&&te()},placeholder:"Ask Gemini about emails...",className:`flex-1 p-2 rounded-xl text-xs outline-none border ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`}),a.jsx("button",{onClick:()=>te(),className:"p-2 rounded-xl bg-blue-600 text-white hover:bg-blue-700 shrink-0",children:a.jsx(Ao,{className:"w-3.5 h-3.5"})})]})]}),d==="calendar"&&a.jsxs("div",{className:"space-y-3 text-xs",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-sm",children:"Today, Aug 5, 2026"}),a.jsx("button",{onClick:()=>oe(!ue),className:"px-2 py-1 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-semibold text-[11px] cursor-pointer",children:"+ Add Event"})]}),ue&&a.jsxs("div",{className:"p-3 rounded-xl border border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/20 space-y-2",children:[a.jsx("input",{type:"text",placeholder:"Event title...",value:ie,onChange:y=>re(y.target.value),className:"w-full p-2 rounded-lg border text-xs outline-none bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700"}),a.jsx("input",{type:"text",placeholder:"Time (e.g. 3:00 PM - 4:00 PM)",value:$,onChange:y=>de(y.target.value),className:"w-full p-2 rounded-lg border text-xs outline-none bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700"}),a.jsxs("div",{className:"flex justify-end space-x-2 pt-1",children:[a.jsx("button",{onClick:()=>oe(!1),className:"px-2.5 py-1 rounded-md text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700",children:"Cancel"}),a.jsx("button",{onClick:Se,className:"px-3 py-1 rounded-md bg-blue-600 text-white font-semibold",children:"Save Event"})]})]}),a.jsx("div",{className:"space-y-2",children:ye.map(y=>a.jsxs("div",{className:"p-3 rounded-xl bg-blue-50 dark:bg-blue-950/40 border border-blue-200 dark:border-blue-800 space-y-1",children:[a.jsx("span",{className:"font-bold text-blue-700 dark:text-blue-300",children:y.time}),a.jsx("p",{className:"font-medium",children:y.title}),y.location&&a.jsx("p",{className:"text-[10px] text-gray-500",children:y.location})]},y.id))})]}),d==="notes"&&a.jsxs("div",{className:"space-y-3 text-xs",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-xs uppercase text-gray-400 tracking-wider",children:"Keep Notes"}),a.jsx("button",{onClick:()=>le(!fe),className:"px-2 py-1 rounded-lg bg-amber-500 hover:bg-amber-600 text-white font-semibold text-[11px] cursor-pointer",children:"+ Add Note"})]}),fe&&a.jsxs("div",{className:"p-3 rounded-xl border border-amber-300 dark:border-amber-700 bg-amber-50/50 dark:bg-amber-950/20 space-y-2",children:[a.jsx("input",{type:"text",placeholder:"Note Title...",value:ae,onChange:y=>L(y.target.value),className:"w-full p-2 rounded-lg border text-xs outline-none bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700"}),a.jsx("textarea",{placeholder:"Note details...",rows:3,value:J,onChange:y=>ce(y.target.value),className:"w-full p-2 rounded-lg border text-xs outline-none bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700"}),a.jsxs("div",{className:"flex justify-end space-x-2",children:[a.jsx("button",{onClick:()=>le(!1),className:"px-2.5 py-1 rounded-md text-gray-500",children:"Cancel"}),a.jsx("button",{onClick:Ne,className:"px-3 py-1 rounded-md bg-amber-500 text-white font-semibold",children:"Save Note"})]})]}),a.jsx("div",{className:"space-y-2",children:P.map(y=>a.jsxs("div",{className:"p-3 rounded-xl bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800 font-sans space-y-1",children:[a.jsx("span",{className:"font-bold text-amber-800 dark:text-amber-300 block",children:y.title}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-[11px] leading-relaxed",children:y.content})]},y.id))})]}),d==="tasks"&&a.jsxs("div",{className:"space-y-3 text-xs",children:[a.jsx("div",{className:"space-y-1.5",children:a.jsxs("div",{className:"flex items-center space-x-1.5",children:[a.jsx("input",{type:"text",placeholder:"Add a task todo...",value:K,onChange:y=>X(y.target.value),onKeyDown:y=>{y.key==="Enter"&&ee()},className:`flex-1 p-2 rounded-xl text-xs outline-none border ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`}),a.jsx("button",{onClick:ee,disabled:!K.trim(),className:"px-3 py-2 rounded-xl bg-sky-600 hover:bg-sky-700 text-white font-semibold text-xs cursor-pointer disabled:opacity-50",children:"+ Add"})]})}),a.jsxs("div",{className:"font-bold text-[11px] text-gray-400 uppercase tracking-wider",children:["Tasks (",W.filter(y=>!y.completed).length," pending)"]}),a.jsx("div",{className:"space-y-1.5 max-h-80 overflow-y-auto pr-1",children:W.map(y=>a.jsxs("div",{className:`flex items-center justify-between p-2 rounded-xl border transition-colors ${c?"border-gray-700 hover:bg-white/5":"border-gray-200 hover:bg-gray-50"}`,children:[a.jsxs("div",{onClick:()=>xe(y.id),className:"flex items-center space-x-2.5 cursor-pointer flex-1 overflow-hidden",children:[a.jsx(gl,{className:`w-4 h-4 shrink-0 ${y.completed?"text-emerald-500 fill-emerald-100 dark:fill-emerald-950":"text-gray-400"}`}),a.jsx("span",{className:`text-xs truncate ${y.completed?"line-through text-gray-400":"font-medium"}`,children:y.title})]}),a.jsx("button",{onClick:()=>ge(y.id),className:"p-1 rounded text-gray-400 hover:text-rose-500 hover:bg-rose-50 dark:hover:bg-rose-950/40 cursor-pointer",title:"Delete task",children:a.jsx(wt,{className:"w-3.5 h-3.5"})})]},y.id))})]}),d==="contacts"&&a.jsxs("div",{className:"space-y-3 text-xs",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-xs uppercase text-gray-400 tracking-wider",children:"Contacts"}),a.jsx("button",{onClick:()=>Y(!p),className:"px-2 py-1 rounded-lg bg-emerald-600 hover:bg-emerald-700 text-white font-semibold text-[11px] cursor-pointer",children:"+ Add Contact"})]}),p&&a.jsxs("div",{className:"p-3 rounded-xl border border-emerald-300 dark:border-emerald-700 bg-emerald-50/50 dark:bg-emerald-950/20 space-y-2",children:[a.jsx("input",{type:"text",placeholder:"Contact Name...",value:U,onChange:y=>G(y.target.value),className:"w-full p-2 rounded-lg border text-xs outline-none bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700"}),a.jsx("input",{type:"email",placeholder:"Contact Email...",value:se,onChange:y=>u(y.target.value),className:"w-full p-2 rounded-lg border text-xs outline-none bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700"}),a.jsxs("div",{className:"flex justify-end space-x-2",children:[a.jsx("button",{onClick:()=>Y(!1),className:"px-2.5 py-1 rounded-md text-gray-500",children:"Cancel"}),a.jsx("button",{onClick:He,className:"px-3 py-1 rounded-md bg-emerald-600 text-white font-semibold",children:"Save Contact"})]})]}),a.jsx("div",{className:"space-y-2",children:A.map(y=>a.jsxs("div",{className:"flex items-center space-x-2.5 p-2.5 rounded-xl border border-gray-200 dark:border-gray-700 hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:[a.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-600 text-white flex items-center justify-center font-bold text-xs shrink-0",children:y.name.charAt(0)}),a.jsxs("div",{className:"truncate",children:[a.jsx("p",{className:"font-bold truncate",children:y.name}),a.jsx("p",{className:"text-[10px] text-gray-400 truncate",children:y.email})]})]},y.id))})]})]})]})]})]})},ey=({onLaunchApp:c,onSignIn:h,onOpenPlans:S,onOpenConnectAccount:d})=>{const[z,M]=m.useState("annual"),[V,q]=m.useState(""),[k,g]=m.useState(!1),[R,Q]=m.useState(null),[W,I]=m.useState(!1),K=P=>{P.preventDefault(),V&&c()},X=P=>{Q(P)};return a.jsxs("div",{className:"min-h-screen bg-white text-gray-900 font-sans selection:bg-blue-100 selection:text-blue-900",children:[a.jsxs("div",{className:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 text-white px-3 sm:px-4 py-1.5 text-xs text-center font-medium flex items-center justify-center flex-wrap gap-x-2 gap-y-1 shadow-xs",children:[a.jsxs("div",{className:"flex items-center space-x-1.5",children:[a.jsx(Tt,{className:"w-3.5 h-3.5 text-amber-300 animate-pulse shrink-0"}),a.jsx("span",{children:"Omnio Mail OS 2.0: Gemini AI & Omnio Drive active on all plans."})]}),a.jsx("button",{onClick:c,className:"underline font-bold text-amber-200 hover:text-white cursor-pointer whitespace-nowrap",children:"Launch Omnio Webmail →"})]}),a.jsxs("header",{className:"sticky top-0 z-50 bg-white/95 backdrop-blur-md border-b border-gray-100 px-4 sm:px-6 lg:px-12 py-2.5 shadow-2xs",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[a.jsx("div",{className:"cursor-pointer shrink-0",onClick:c,children:a.jsx(Ms,{size:32})}),a.jsxs("nav",{className:"hidden lg:flex items-center space-x-5 text-sm font-medium text-gray-600 whitespace-nowrap",children:[a.jsx("a",{href:"#features",className:"hover:text-blue-600 transition-colors whitespace-nowrap",children:"Features"}),a.jsx("a",{href:"#suite",className:"hover:text-blue-600 transition-colors whitespace-nowrap",children:"Omnio Suite"}),a.jsx("a",{href:"#ai-gemini",className:"hover:text-blue-600 transition-colors whitespace-nowrap",children:"Gemini AI"}),a.jsx("a",{href:"#pricing",className:"hover:text-blue-600 transition-colors whitespace-nowrap",children:"Pricing"}),a.jsx("a",{href:"#security",className:"hover:text-blue-600 transition-colors whitespace-nowrap",children:"Security"}),a.jsx("a",{href:"#byom",className:"hover:text-blue-600 transition-colors whitespace-nowrap",children:"BYOM Bridge"})]})]}),a.jsxs("div",{className:"flex items-center space-x-2 sm:space-x-3",children:[a.jsxs("div",{className:"hidden sm:flex items-center space-x-2",children:[a.jsxs("button",{onClick:h||c,className:"px-3 py-1.5 text-xs font-semibold text-gray-700 hover:text-blue-600 hover:bg-gray-100 rounded-full transition-colors cursor-pointer flex items-center space-x-1 whitespace-nowrap border border-gray-200 sm:border-transparent",children:[a.jsx(Rx,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Sign in"})]}),a.jsxs("button",{onClick:c,className:"px-3.5 py-1.5 text-xs font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-full shadow-xs hover:shadow-sm transition-all cursor-pointer flex items-center space-x-1.5 whitespace-nowrap",children:[a.jsx("span",{children:"Open Omnio Mail"}),a.jsx(An,{className:"w-3.5 h-3.5"})]})]}),a.jsx("button",{onClick:()=>I(!W),className:"lg:hidden p-2 rounded-xl text-gray-600 hover:text-gray-900 hover:bg-gray-100 transition-colors cursor-pointer","aria-label":"Toggle Navigation Menu",children:W?a.jsx(wt,{className:"w-6 h-6"}):a.jsx(om,{className:"w-6 h-6"})})]})]}),W&&a.jsxs("div",{className:"lg:hidden mt-3 pt-3 border-t border-gray-100 space-y-3 pb-2 animate-in fade-in slide-in-from-top-2 duration-150",children:[a.jsxs("nav",{className:"flex flex-col space-y-1 font-medium text-sm text-gray-700",children:[a.jsxs("a",{href:"#features",onClick:()=>I(!1),className:"px-3 py-2 rounded-xl hover:bg-gray-50 flex items-center justify-between transition-colors",children:[a.jsx("span",{children:"Features"}),a.jsx(Gt,{className:"w-4 h-4 text-gray-400"})]}),a.jsxs("a",{href:"#suite",onClick:()=>I(!1),className:"px-3 py-2 rounded-xl hover:bg-gray-50 flex items-center justify-between transition-colors",children:[a.jsx("span",{children:"Omnio Suite"}),a.jsx(Gt,{className:"w-4 h-4 text-gray-400"})]}),a.jsxs("a",{href:"#ai-gemini",onClick:()=>I(!1),className:"px-3 py-2 rounded-xl hover:bg-gray-50 flex items-center justify-between transition-colors",children:[a.jsx("span",{children:"Gemini AI Copilot"}),a.jsx(Gt,{className:"w-4 h-4 text-gray-400"})]}),a.jsxs("a",{href:"#pricing",onClick:()=>I(!1),className:"px-3 py-2 rounded-xl hover:bg-gray-50 flex items-center justify-between transition-colors",children:[a.jsx("span",{children:"Pricing & Plans"}),a.jsx(Gt,{className:"w-4 h-4 text-gray-400"})]}),a.jsxs("a",{href:"#security",onClick:()=>I(!1),className:"px-3 py-2 rounded-xl hover:bg-gray-50 flex items-center justify-between transition-colors",children:[a.jsx("span",{children:"Security"}),a.jsx(Gt,{className:"w-4 h-4 text-gray-400"})]}),a.jsxs("a",{href:"#byom",onClick:()=>I(!1),className:"px-3 py-2 rounded-xl hover:bg-gray-50 flex items-center justify-between transition-colors",children:[a.jsx("span",{children:"BYOM Bridge"}),a.jsx(Gt,{className:"w-4 h-4 text-gray-400"})]})]}),a.jsxs("div",{className:"pt-3 border-t border-gray-100 flex flex-col space-y-2",children:[a.jsxs("button",{onClick:()=>{I(!1),(h||c)()},className:"w-full py-2.5 px-4 text-sm font-semibold text-gray-800 bg-gray-100 hover:bg-gray-200 rounded-xl transition-colors flex items-center justify-center space-x-2 cursor-pointer",children:[a.jsx(Rx,{className:"w-4 h-4"}),a.jsx("span",{children:"Sign in to Omnio Mail"})]}),a.jsxs("button",{onClick:()=>{I(!1),c()},className:"w-full py-2.5 px-4 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-xl transition-all shadow-sm flex items-center justify-center space-x-2 cursor-pointer",children:[a.jsx("span",{children:"Open Omnio Mail OS"}),a.jsx(An,{className:"w-4 h-4"})]})]})]})]}),a.jsxs("section",{className:"pt-12 pb-20 px-4 lg:px-12 max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-12 gap-12 items-center",children:[a.jsxs("div",{className:"lg:col-span-6 space-y-6",children:[a.jsxs("div",{className:"inline-flex items-center space-x-2 bg-blue-50 text-blue-700 px-3.5 py-1.5 rounded-full text-xs font-semibold border border-blue-200/60",children:[a.jsx(Tt,{className:"w-3.5 h-3.5 text-blue-600"}),a.jsx("span",{children:"Next-Generation Omnio Mail OS & Workspace"})]}),a.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-extrabold tracking-tight text-gray-900 leading-[1.15]",children:["Secure, smart, and collaborative ",a.jsx("span",{className:"bg-gradient-to-r from-red-600 via-amber-500 to-blue-600 bg-clip-text text-transparent",children:"business mail OS"})]}),a.jsxs("p",{className:"text-lg text-gray-600 leading-relaxed max-w-xl",children:["Connect all your existing mail accounts & cloud drives seamlessly with ",a.jsx("strong",{className:"text-gray-900",children:"Omnio Mail OS"})," — the ultimate Bring Your Own Mail (BYOM) platform. Includes built-in Gemini AI assistant, Omnio Drive & Calendar sync, 99.9% uptime, and zero storage lock-in."]}),a.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center space-y-3 sm:space-y-0 sm:space-x-4 pt-2",children:[a.jsxs("button",{onClick:c,className:"px-8 py-3.5 text-base font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-full shadow-lg hover:shadow-xl transition-all cursor-pointer text-center flex items-center justify-center space-x-2",children:[a.jsx("span",{children:"Launch Omnio Webmail"}),a.jsx(Gt,{className:"w-5 h-5"})]}),a.jsx("button",{onClick:()=>{const P=document.getElementById("pricing");P==null||P.scrollIntoView({behavior:"smooth"})},className:"px-7 py-3.5 text-base font-semibold text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-full transition-colors cursor-pointer text-center flex items-center justify-center space-x-2",children:a.jsx("span",{children:"View Business Plans"})})]}),a.jsxs("div",{className:"pt-6 border-t border-gray-100 flex items-center space-x-6 text-xs text-gray-500",children:[a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(gl,{className:"w-4 h-4 text-emerald-600"}),a.jsx("span",{children:"Multi-Provider Connected"})]}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(Gx,{className:"w-4 h-4 text-blue-600"}),a.jsx("span",{children:"Enterprise Encryption"})]}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(Bl,{className:"w-4 h-4 text-amber-500"}),a.jsx("span",{children:"Instant cPanel & IMAP Sync"})]})]})]}),a.jsx("div",{className:"lg:col-span-6 relative",children:a.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl border border-gray-200/90 bg-slate-900 p-2 sm:p-4 text-white",children:[a.jsxs("div",{className:"flex items-center justify-between pb-3 px-2 border-b border-slate-800",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("div",{className:"w-3 h-3 rounded-full bg-rose-500"}),a.jsx("div",{className:"w-3 h-3 rounded-full bg-amber-500"}),a.jsx("div",{className:"w-3 h-3 rounded-full bg-emerald-500"})]}),a.jsxs("div",{className:"bg-slate-800/80 px-4 py-1 rounded-full text-[11px] font-mono text-slate-300 flex items-center space-x-2",children:[a.jsx(Qx,{size:14}),a.jsx("span",{children:"mail.omnio.email/inbox"})]}),a.jsx("div",{className:"text-[10px] text-blue-400 font-bold uppercase tracking-wider",children:"Omnio Mail OS"})]}),a.jsxs("div",{className:"grid grid-cols-12 gap-2 mt-3 bg-slate-950 rounded-xl p-3 border border-slate-800 text-xs",children:[a.jsxs("div",{className:"col-span-3 space-y-2 border-r border-slate-800/80 pr-2",children:[a.jsxs("div",{className:"bg-blue-600 text-white p-2 rounded-xl text-[11px] font-bold text-center flex items-center justify-center space-x-1 shadow-xs",children:[a.jsx(Ll,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Compose"})]}),a.jsxs("div",{className:"space-y-1 text-[11px]",children:[a.jsxs("div",{className:"p-1.5 rounded-lg bg-blue-900/50 text-blue-300 font-semibold flex items-center justify-between",children:[a.jsx("span",{children:"Inbox"}),a.jsx("span",{className:"bg-blue-600 text-white text-[9px] px-1.5 py-0.5 rounded-full",children:"12"})]}),a.jsx("div",{className:"p-1.5 rounded-lg text-slate-400 hover:text-slate-200",children:"Starred"}),a.jsx("div",{className:"p-1.5 rounded-lg text-slate-400 hover:text-slate-200",children:"Snoozed"}),a.jsx("div",{className:"p-1.5 rounded-lg text-slate-400 hover:text-slate-200",children:"Sent"}),a.jsx("div",{className:"p-1.5 rounded-lg text-slate-400 hover:text-slate-200",children:"Purchases"}),a.jsx("div",{className:"p-1.5 rounded-lg text-slate-400 hover:text-slate-200",children:"Social"})]})]}),a.jsxs("div",{className:"col-span-9 space-y-2 pl-1",children:[a.jsxs("div",{className:"bg-slate-900 p-2 rounded-lg border border-slate-800 flex items-center justify-between text-[11px]",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Tt,{className:"w-3.5 h-3.5 text-amber-400"}),a.jsx("span",{className:"font-semibold text-slate-200",children:"Gemini AI Assistant"})]}),a.jsx("span",{className:"text-[10px] bg-emerald-900/60 text-emerald-300 px-2 py-0.5 rounded",children:"Active"})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs("div",{className:"p-2 rounded-lg bg-slate-900/90 border border-slate-800 flex items-center justify-between text-[11px]",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-bold text-slate-100",children:"Sarah Jenkins (VP Eng)"}),a.jsx("p",{className:"text-[10px] text-slate-400",children:"Q4 Omnio Mail OS Architecture Plan..."})]}),a.jsx("span",{className:"text-[10px] text-slate-500",children:"2:15 PM"})]}),a.jsxs("div",{className:"p-2 rounded-lg bg-slate-900/40 border border-slate-800/60 flex items-center justify-between text-[11px]",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-300",children:"Omnio Cloud System"}),a.jsx("p",{className:"text-[10px] text-slate-400",children:"Security Update & 100 GB Storage Synced"})]}),a.jsx("span",{className:"text-[10px] text-slate-500",children:"11:00 AM"})]}),a.jsxs("div",{className:"p-2 rounded-lg bg-slate-900/40 border border-slate-800/60 flex items-center justify-between text-[11px]",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-300",children:"GitHub Notifications"}),a.jsx("p",{className:"text-[10px] text-slate-400",children:"[omnio/mail-os] PR #42 Merged successfully"})]}),a.jsx("span",{className:"text-[10px] text-slate-500",children:"Yesterday"})]})]})]})]}),a.jsxs("div",{className:"mt-3 flex items-center justify-between text-[11px] text-slate-400 px-1",children:[a.jsxs("span",{className:"flex items-center space-x-1",children:[a.jsx(gl,{className:"w-3.5 h-3.5 text-emerald-400"}),a.jsx("span",{children:"Zero Storage Replication"})]}),a.jsxs("span",{className:"flex items-center space-x-1",children:[a.jsx(Bl,{className:"w-3.5 h-3.5 text-amber-400"}),a.jsx("span",{children:"Instant IMAP & Direct OAuth"})]})]})]})})]}),a.jsx("section",{id:"suite",className:"bg-gray-50/80 py-16 border-y border-gray-100",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 lg:px-12",children:[a.jsx("p",{className:"text-center text-xs font-bold uppercase tracking-wider text-gray-500 mb-8",children:"Complete Omnio OS Workspace Productivity Suite Included"}),a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-5 text-center",children:[a.jsxs("div",{className:"p-4 rounded-2xl bg-white shadow-2xs border border-gray-200/60 flex flex-col items-center space-y-2 hover:shadow-md transition-all",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-red-50 text-red-600 flex items-center justify-center",children:a.jsx(Ll,{className:"w-5 h-5"})}),a.jsx("span",{className:"text-sm font-bold text-gray-900",children:"Omnio Mail"}),a.jsx("span",{className:"text-xs text-gray-500",children:"Custom email OS"})]}),a.jsxs("div",{className:"p-4 rounded-2xl bg-white shadow-2xs border border-gray-200/60 flex flex-col items-center space-y-2 hover:shadow-md transition-all",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-amber-50 text-amber-600 flex items-center justify-center",children:a.jsx(Vr,{className:"w-5 h-5"})}),a.jsx("span",{className:"text-sm font-bold text-gray-900",children:"Omnio Drive"}),a.jsx("span",{className:"text-xs text-gray-500",children:"Cloud file storage"})]}),a.jsxs("div",{className:"p-4 rounded-2xl bg-white shadow-2xs border border-gray-200/60 flex flex-col items-center space-y-2 hover:shadow-md transition-all",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-50 text-blue-600 flex items-center justify-center",children:a.jsx(ho,{className:"w-5 h-5"})}),a.jsx("span",{className:"text-sm font-bold text-gray-900",children:"Omnio Calendar"}),a.jsx("span",{className:"text-xs text-gray-500",children:"Smart scheduling"})]}),a.jsxs("div",{className:"p-4 rounded-2xl bg-white shadow-2xs border border-gray-200/60 flex flex-col items-center space-y-2 hover:shadow-md transition-all relative",children:[a.jsx("span",{className:"absolute -top-2 px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider bg-amber-100 text-amber-800 border border-amber-200",children:"Coming Soon"}),a.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-50 text-emerald-600 flex items-center justify-center",children:a.jsx(vm,{className:"w-5 h-5"})}),a.jsx("span",{className:"text-sm font-bold text-gray-900",children:"Omnio Meet"}),a.jsx("span",{className:"text-xs text-gray-500",children:"HD Video Calls"})]}),a.jsxs("div",{className:"p-4 rounded-2xl bg-white shadow-2xs border border-gray-200/60 flex flex-col items-center space-y-2 hover:shadow-md transition-all",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-purple-50 text-purple-600 flex items-center justify-center",children:a.jsx(wa,{className:"w-5 h-5"})}),a.jsx("span",{className:"text-sm font-bold text-gray-900",children:"Omnio Keep"}),a.jsx("span",{className:"text-xs text-gray-500",children:"Notes & scratchpad"})]}),a.jsxs("div",{className:"p-4 rounded-2xl bg-white shadow-2xs border border-gray-200/60 flex flex-col items-center space-y-2 hover:shadow-md transition-all",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-50 text-indigo-600 flex items-center justify-center",children:a.jsx(vo,{className:"w-5 h-5"})}),a.jsx("span",{className:"text-sm font-bold text-gray-900",children:"Omnio Tasks"}),a.jsx("span",{className:"text-xs text-gray-500",children:"Task management"})]})]})]})}),a.jsxs("section",{id:"ai-gemini",className:"py-20 px-4 lg:px-12 max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-12 gap-12 items-center",children:[a.jsx("div",{className:"lg:col-span-6",children:a.jsxs("div",{className:"rounded-2xl border border-gray-200 shadow-xl bg-white p-6 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between border-b pb-3",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-purple-100 text-purple-700",children:a.jsx(Tt,{className:"w-4 h-4"})}),a.jsx("span",{className:"font-bold text-sm text-gray-900",children:"Omnio Gemini Copilot"})]}),a.jsx("span",{className:"text-xs bg-purple-50 text-purple-700 font-semibold px-2.5 py-0.5 rounded-full border border-purple-200/60",children:"AI Smart Composer"})]}),a.jsxs("div",{className:"space-y-3 text-xs",children:[a.jsxs("div",{className:"bg-gray-50 p-3 rounded-xl border border-gray-200/80",children:[a.jsx("p",{className:"font-semibold text-gray-800 mb-1",children:"Prompt: Draft executive response to Sarah regarding Q4 Architecture review"}),a.jsxs("div",{className:"bg-white p-3 rounded-lg border border-purple-200 text-gray-700 space-y-2",children:[a.jsx("p",{className:"font-medium text-purple-900 font-mono text-[11px]",children:"✨ Gemini AI Suggestion:"}),a.jsx("p",{children:`"Hi Sarah, thanks for sharing the Q4 Architecture plan. I reviewed the Omnio Mail OS specifications and approve proceeding with the BYOM bridge strategy. Let's sync tomorrow at 2 PM."`})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center text-[11px]",children:[a.jsx("div",{className:"p-2 rounded-lg bg-blue-50 text-blue-700 font-semibold border border-blue-200/60",children:"⚡ 1-Click Polish"}),a.jsx("div",{className:"p-2 rounded-lg bg-emerald-50 text-emerald-700 font-semibold border border-emerald-200/60",children:"📝 Thread Summary"}),a.jsx("div",{className:"p-2 rounded-lg bg-amber-50 text-amber-700 font-semibold border border-amber-200/60",children:"🏷️ Auto-Categorize"})]})]})]})}),a.jsxs("div",{className:"lg:col-span-6 space-y-6",children:[a.jsxs("div",{className:"inline-flex items-center space-x-2 bg-purple-50 text-purple-700 px-3.5 py-1.5 rounded-full text-xs font-semibold border border-purple-200/60",children:[a.jsx(Tt,{className:"w-3.5 h-3.5 text-purple-600"}),a.jsx("span",{children:"Built-in Gemini AI Copilot"})]}),a.jsx("h2",{className:"text-3xl sm:text-4xl font-extrabold text-gray-900 tracking-tight leading-tight",children:"Write faster, summarize instantly, and organize smarter"}),a.jsx("p",{className:"text-gray-600 text-base leading-relaxed",children:"Gemini AI works directly inside Omnio Mail OS to write polished drafts, generate thread summaries, extract action items, and categorize your inbox automatically."}),a.jsxs("div",{className:"space-y-4 pt-2",children:[a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-50 text-blue-600 shrink-0",children:a.jsx(lb,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-bold text-gray-900",children:"Help me write"}),a.jsx("p",{className:"text-xs text-gray-600",children:"Draft professional emails, adapt tone (Formal, Concise, Elaborate), or polish existing text in 1-click."})]})]}),a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-emerald-50 text-emerald-600 shrink-0",children:a.jsx(gl,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-bold text-gray-900",children:"Thread Digest & Action Items"}),a.jsx("p",{className:"text-xs text-gray-600",children:"Never miss a deadline. Gemini extracts clear key takeaways and task lists from long email chains."})]})]}),a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-amber-50 text-amber-600 shrink-0",children:a.jsx(Bl,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-bold text-gray-900",children:"Smart Omnio Category Sorting"}),a.jsx("p",{className:"text-xs text-gray-600",children:"Inbox categories (Primary, Promotions, Social, Updates, Purchases) organize incoming mail cleanly."})]})]})]})]})]}),a.jsx("section",{id:"pricing",className:"py-20 bg-gray-50/80 border-t border-gray-100",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 lg:px-12",children:[a.jsxs("div",{className:"text-center max-w-3xl mx-auto space-y-4 mb-12",children:[a.jsx("h2",{className:"text-3xl sm:text-4xl font-extrabold text-gray-900 tracking-tight",children:"Bring Your Own Mail (BYOM) Plans — Zero Storage Replication"}),a.jsx("p",{className:"text-gray-600 text-base",children:"No need to pay for redundant email or cloud drive storage. Omnio Mail OS connects directly to your existing Gmail, Microsoft 365, cPanel IMAP, Google Drive, and OneDrive accounts."}),a.jsxs("div",{className:"pt-4 inline-flex items-center bg-gray-200/70 p-1 rounded-full text-xs font-semibold",children:[a.jsx("button",{onClick:()=>M("monthly"),className:`px-4 py-1.5 rounded-full transition-all cursor-pointer ${z==="monthly"?"bg-white text-gray-900 shadow-xs":"text-gray-600 hover:text-gray-900"}`,children:"Monthly billing"}),a.jsxs("button",{onClick:()=>M("annual"),className:`px-4 py-1.5 rounded-full transition-all cursor-pointer flex items-center space-x-1 ${z==="annual"?"bg-blue-600 text-white shadow-xs":"text-gray-600 hover:text-gray-900"}`,children:[a.jsx("span",{children:"Annual commitment"}),a.jsx("span",{className:"bg-amber-300 text-gray-900 px-1.5 py-0.5 rounded-full text-[10px] font-extrabold",children:"Save 20%"})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[a.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-gray-200 shadow-xs flex flex-col justify-between hover:shadow-lg transition-shadow",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsx("span",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:"Free"}),a.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"BYOM Free"}),a.jsxs("div",{className:"flex items-baseline space-x-1",children:[a.jsx("span",{className:"text-3xl font-extrabold text-gray-900",children:"$0"}),a.jsx("span",{className:"text-xs text-gray-500",children:"/ forever"})]}),a.jsx("p",{className:"text-xs text-gray-500",children:"Ideal for personal email productivity and basic account sync."}),a.jsxs("ul",{className:"space-y-2.5 pt-4 text-xs text-gray-700 border-t border-gray-100",children:[a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Connect 2 BYOM Mail accounts"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Connect Google Drive & OneDrive"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Omnio Calendar, Keep Notes & Tasks"})]}),a.jsxs("li",{className:"flex items-center space-x-2 text-gray-500",children:[a.jsx(tt,{className:"w-4 h-4 text-gray-400 shrink-0"}),a.jsx("span",{children:"Omnio Meet (Coming Soon)"})]})]})]}),a.jsx("button",{onClick:()=>X("BYOM Free"),className:"mt-8 w-full py-2.5 px-4 bg-gray-100 hover:bg-gray-200 text-gray-800 font-semibold text-xs rounded-full transition-colors cursor-pointer text-center",children:"Current Plan"})]}),a.jsxs("div",{className:"bg-white rounded-2xl p-6 border-2 border-blue-600 shadow-md flex flex-col justify-between relative hover:shadow-xl transition-shadow",children:[a.jsx("div",{className:"absolute -top-3.5 left-1/2 -translate-x-1/2 bg-blue-600 text-white px-3 py-1 rounded-full text-[11px] font-bold tracking-wider uppercase shadow-xs",children:"Most Popular"}),a.jsxs("div",{className:"space-y-4 pt-2",children:[a.jsx("span",{className:"text-xs font-bold text-blue-600 uppercase tracking-wider font-mono",children:"Pro BYOM"}),a.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"BYOM Pro"}),a.jsxs("div",{className:"flex items-baseline space-x-1",children:[a.jsx("span",{className:"text-3xl font-extrabold text-gray-900",children:z==="annual"?"$12":"$15"}),a.jsx("span",{className:"text-xs text-gray-500",children:"/ user / month"})]}),a.jsx("p",{className:"text-xs text-gray-500",children:"Unlimited mailboxes + full Gemini AI writing & smart search."}),a.jsxs("ul",{className:"space-y-2.5 pt-4 text-xs text-gray-700 border-t border-gray-100",children:[a.jsxs("li",{className:"flex items-center space-x-2 font-medium",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Unlimited BYOM accounts (Gmail, M365, Zoho)"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Full Gemini AI Copilot (Summarizer & Drafts)"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Zero Storage Fees — uses host servers"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Omnio Calendar, Keep Notes & Tasks"})]})]})]}),a.jsx("button",{onClick:()=>X("BYOM Pro"),className:"mt-8 w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs rounded-full transition-colors cursor-pointer text-center shadow-xs",children:"Upgrade to BYOM Pro"})]}),a.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-gray-200 shadow-xs flex flex-col justify-between hover:shadow-lg transition-shadow",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsx("span",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:"Business"}),a.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"BYOM Business"}),a.jsxs("div",{className:"flex items-baseline space-x-1",children:[a.jsx("span",{className:"text-3xl font-extrabold text-gray-900",children:z==="annual"?"$29":"$35"}),a.jsx("span",{className:"text-xs text-gray-500",children:"/ user / month"})]}),a.jsx("p",{className:"text-xs text-gray-500",children:"Shared team inboxes, delegated mailboxes & custom domain branding."}),a.jsxs("ul",{className:"space-y-2.5 pt-4 text-xs text-gray-700 border-t border-gray-100",children:[a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Shared Team Inboxes & Workspaces"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Custom Domain Branding on omnio.email"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Admin Audit Logs & DLP Rules"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-emerald-600 shrink-0"}),a.jsx("span",{children:"Priority 24/7 Enterprise Support"})]})]})]}),a.jsx("button",{onClick:()=>X("BYOM Business"),className:"mt-8 w-full py-2.5 px-4 bg-gray-900 hover:bg-black text-white font-semibold text-xs rounded-full transition-colors cursor-pointer text-center",children:"Start BYOM Business"})]}),a.jsxs("div",{className:"bg-gradient-to-b from-gray-900 to-blue-950 text-white rounded-2xl p-6 border border-gray-800 shadow-md flex flex-col justify-between hover:shadow-xl transition-shadow",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsx("span",{className:"text-xs font-bold text-amber-400 uppercase tracking-wider",children:"Hosting / WHM Edition"}),a.jsx("h3",{className:"text-xl font-bold text-white",children:"Omnio Provider"}),a.jsxs("div",{className:"flex items-baseline space-x-1",children:[a.jsx("span",{className:"text-3xl font-extrabold text-white",children:"$49"}),a.jsx("span",{className:"text-xs text-gray-300",children:"/ server / month"})]}),a.jsx("p",{className:"text-xs text-gray-300",children:"For web hosts, cPanel/Plesk admins to brand & deliver Webmail OS."}),a.jsxs("ul",{className:"space-y-2.5 pt-4 text-xs text-gray-200 border-t border-gray-800",children:[a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-amber-400 shrink-0"}),a.jsx("span",{children:"Unlimited mailboxes on cPanel / Plesk"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-amber-400 shrink-0"}),a.jsx("span",{children:"Zero MX DNS modification required"})]}),a.jsxs("li",{className:"flex items-center space-x-2",children:[a.jsx(tt,{className:"w-4 h-4 text-amber-400 shrink-0"}),a.jsx("span",{children:"Whitelabel webmail on omnio.email"})]})]})]}),a.jsx("button",{onClick:()=>X("Omnio Provider License"),className:"mt-8 w-full py-2.5 px-4 bg-amber-400 hover:bg-amber-300 text-gray-950 font-bold text-xs rounded-full transition-colors cursor-pointer text-center",children:"Get Provider License"})]})]})]})}),a.jsx("section",{id:"security",className:"py-20 px-4 lg:px-12 max-w-7xl mx-auto",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[a.jsxs("div",{className:"p-6 rounded-2xl bg-white border border-gray-200/80 shadow-2xs space-y-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-50 text-blue-600 flex items-center justify-center",children:a.jsx(Gx,{className:"w-5 h-5"})}),a.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Industry-leading Security"}),a.jsx("p",{className:"text-xs text-gray-600 leading-relaxed",children:"Omnio Mail blocks 99.9% of spam, phishing, and malware before it ever reaches your inbox with automated machine learning filters."})]}),a.jsxs("div",{className:"p-6 rounded-2xl bg-white border border-gray-200/80 shadow-2xs space-y-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-50 text-emerald-600 flex items-center justify-center",children:a.jsx(Kr,{className:"w-5 h-5"})}),a.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"BYOM Webmail Bridge"}),a.jsx("p",{className:"text-xs text-gray-600 leading-relaxed",children:"Connect your existing mail server credentials (cPanel, Outlook, Fastmail, Zoho, IMAP) and experience full Omnio features with zero server migration."})]}),a.jsxs("div",{className:"p-6 rounded-2xl bg-white border border-gray-200/80 shadow-2xs space-y-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-purple-50 text-purple-600 flex items-center justify-center",children:a.jsx(So,{className:"w-5 h-5"})}),a.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Multi-Account Unified Inbox"}),a.jsx("p",{className:"text-xs text-gray-600 leading-relaxed",children:"Switch or combine personal, company, and client mailboxes cleanly in a single browser window with instant account toggling."})]})]})}),k&&a.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-xs flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white rounded-2xl p-6 sm:p-8 max-w-md w-full shadow-2xl border border-gray-200 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(Qx,{size:24}),a.jsx("span",{className:"font-bold text-lg text-gray-900",children:"Sign in to Omnio Mail"})]}),a.jsx("button",{onClick:()=>g(!1),className:"text-gray-400 hover:text-gray-600 text-lg font-bold cursor-pointer",children:"×"})]}),a.jsx("p",{className:"text-xs text-gray-600",children:"Enter your work or personal email address to log directly into Omnio Mail OS."}),a.jsxs("form",{onSubmit:K,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-700 mb-1",children:"Email address"}),a.jsx("input",{type:"email",required:!0,value:V,onChange:P=>q(P.target.value),placeholder:"user@omnio.email",className:"w-full px-3.5 py-2.5 rounded-xl border border-gray-300 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),a.jsx("button",{type:"submit",className:"w-full py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold text-sm rounded-xl transition-colors cursor-pointer shadow-md",children:"Sign In & Launch Omnio Webmail"})]}),a.jsx("div",{className:"border-t border-gray-100 pt-4 flex items-center justify-between text-xs text-gray-500",children:a.jsx("button",{type:"button",onClick:()=>{g(!1),d()},className:"text-blue-600 hover:underline cursor-pointer font-medium",children:"Connect custom IMAP / cPanel mailbox →"})})]})}),R&&a.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-xs flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white rounded-2xl p-6 sm:p-8 max-w-md w-full shadow-2xl border border-gray-200 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-2 text-emerald-600",children:[a.jsx(gl,{className:"w-6 h-6"}),a.jsxs("span",{className:"font-bold text-lg text-gray-900",children:["Subscribe to ",R]})]}),a.jsx("button",{onClick:()=>Q(null),className:"text-gray-400 hover:text-gray-600 text-lg font-bold cursor-pointer",children:"×"})]}),a.jsxs("p",{className:"text-xs text-gray-600",children:["You are subscribing to ",a.jsx("strong",{className:"text-gray-800",children:R})," (",z," billing). Complete setup to launch your account instantly."]}),a.jsxs("div",{className:"space-y-3 bg-gray-50 p-4 rounded-xl border border-gray-200/80 text-xs",children:[a.jsxs("div",{className:"flex justify-between text-gray-700",children:[a.jsx("span",{children:"Plan selected"}),a.jsx("span",{className:"font-bold",children:R})]}),a.jsxs("div",{className:"flex justify-between text-gray-700",children:[a.jsx("span",{children:"Setup fee"}),a.jsx("span",{className:"font-bold text-emerald-600",children:"Free ($0)"})]}),a.jsxs("div",{className:"flex justify-between text-gray-700",children:[a.jsx("span",{children:"Instant Access"}),a.jsx("span",{className:"font-bold text-blue-600",children:"Enabled"})]})]}),a.jsxs("button",{onClick:()=>{Q(null),c()},className:"w-full py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold text-sm rounded-xl transition-colors cursor-pointer shadow-md flex items-center justify-center space-x-2",children:[a.jsx(ko,{className:"w-4 h-4"}),a.jsx("span",{children:"Complete Purchase & Open Webmail"})]})]})}),a.jsx("footer",{className:"bg-gray-900 text-gray-400 py-12 px-4 lg:px-12 border-t border-gray-800 text-xs",children:a.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-6",children:[a.jsx("div",{className:"flex items-center space-x-2 text-white cursor-pointer",onClick:c,children:a.jsx(Ms,{darkMode:!0,size:28})}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-6 text-gray-400",children:[a.jsx("a",{href:"#features",className:"hover:text-white transition-colors",children:"Features"}),a.jsx("a",{href:"#suite",className:"hover:text-white transition-colors",children:"Omnio Suite"}),a.jsx("a",{href:"#pricing",className:"hover:text-white transition-colors",children:"Pricing"}),a.jsx("a",{href:"#security",className:"hover:text-white transition-colors",children:"Security"}),a.jsx("button",{onClick:c,className:"hover:text-white cursor-pointer transition-colors",children:"Launch App"})]}),a.jsxs("p",{className:"text-gray-500",children:["© ",new Date().getFullYear()," Omnio OS Inc. / Omnio Mail OS. All rights reserved."]})]})})]})},hl=async c=>{const h=await c.json().catch(()=>({}));if(!c.ok)throw new Error(h.message||h.error||`Request failed (${c.status})`);return h},Na={status:()=>fetch("/api/mail/status").then(hl),connect:c=>fetch("/api/mail/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then(hl),disconnect:()=>fetch("/api/mail/disconnect",{method:"POST"}).then(hl),messages:(c,h=50)=>fetch(`/api/mail/messages?folder=${encodeURIComponent(c)}&limit=${h}`).then(hl),message:(c,h)=>fetch(`/api/mail/message?folder=${encodeURIComponent(c)}&uid=${h}`).then(hl),setFlag:(c,h,S,d)=>fetch("/api/mail/flags",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:c,uid:h,flag:S,value:d})}).then(hl),delete:(c,h)=>fetch("/api/mail/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:c,uid:h})}).then(hl),send:c=>fetch("/api/mail/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then(hl)},ty=c=>{const h=new Date(c),S=new Date;if(h.toDateString()===S.toDateString())return h.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});const z=new Date(S);return z.setDate(S.getDate()-1),h.toDateString()===z.toDateString()?"Yesterday":h.toLocaleDateString([],{month:"short",day:"numeric"})},jm=(c,h,S,d)=>({id:`real-${c.folder}-${c.uid}`,threadId:`real-th-${c.folder}-${c.uid}`,accountId:h,accountEmail:S,senderName:c.senderName,senderEmail:c.senderEmail,recipients:c.recipients,subject:c.subject,snippet:"",body:"",date:ty(c.date),timestamp:new Date(c.date).getTime(),unread:c.unread,starred:c.starred,snoozed:!1,important:c.smartCategory==="important",category:"primary",smartCategory:c.smartCategory,labels:[d],attachments:c.hasAttachment?[{id:`att-${c.uid}`,fileName:"attachment",fileSize:"",fileType:"doc"}]:void 0,imapUid:c.uid,imapFolder:c.folder}),ay=Object.freeze(Object.defineProperty({__proto__:null,mailApi:Na,mapRealMessage:jm},Symbol.toStringTag,{value:"Module"})),ly=({onSignedIn:c,onDemo:h,onBackToLanding:S})=>{const[d,z]=m.useState(""),[M,V]=m.useState(""),[q,k]=m.useState(!1),[g,R]=m.useState(""),[Q,W]=m.useState("993"),[I,K]=m.useState(""),[X,P]=m.useState("465"),[be,ae]=m.useState(!1),[L,J]=m.useState(null),ce=d.split("@")[1]||"",fe=ce?`mail.${ce}`:"mail.yourdomain.com",le=async ie=>{if(ie.preventDefault(),J(null),!d.trim()||!M){J("Enter your email address and password.");return}ae(!0);try{const re=await Na.connect({email:d.trim(),password:M,imapHost:g.trim()||void 0,imapPort:Number(Q)||993,smtpHost:I.trim()||void 0,smtpPort:Number(X)||void 0});c(re)}catch(re){J((re==null?void 0:re.message)||"Could not reach the mail server. Check the server settings below."),k(!0)}finally{ae(!1)}},ye="w-full pl-10 pr-3 py-3 rounded-xl border border-gray-300 bg-white text-sm text-gray-900 outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 transition-all placeholder:text-gray-400",ke="w-full px-3 py-2.5 rounded-xl border border-gray-300 bg-white text-xs font-mono text-gray-900 outline-none focus:border-blue-500 transition-colors placeholder:text-gray-400";return a.jsxs("div",{className:"min-h-screen w-screen flex flex-col bg-gradient-to-br from-[#f6f8fc] via-white to-blue-50 text-gray-800 font-sans overflow-y-auto",children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-5",children:[a.jsx("button",{onClick:S,className:"cursor-pointer",title:"Back to omnio.email",children:a.jsx(Ms,{size:30})}),a.jsxs("div",{className:"flex items-center space-x-1.5 text-xs text-gray-500",children:[a.jsx(Jr,{className:"w-4 h-4 text-emerald-500"}),a.jsx("span",{children:"Zero-storage BYOM · Mail stays on your server"})]})]}),a.jsx("div",{className:"flex-1 flex items-center justify-center px-4 pb-10",children:a.jsxs("div",{className:"w-full max-w-md",children:[a.jsxs("div",{className:"bg-white rounded-3xl shadow-xl border border-gray-200/80 p-8",children:[a.jsx("h1",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"Sign in to Omnio Mail"}),a.jsx("p",{className:"text-sm text-gray-500 mt-1.5 mb-7",children:"Use your existing mailbox — cPanel, Dovecot, or any IMAP account. Your login is your email password; Omnio stores nothing."}),a.jsxs("form",{onSubmit:le,className:"space-y-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Ll,{className:"w-4 h-4 text-gray-400 absolute left-3.5 top-1/2 -translate-y-1/2"}),a.jsx("input",{type:"email",value:d,onChange:ie=>z(ie.target.value),placeholder:"you@yourdomain.com",autoFocus:!0,className:ye})]}),a.jsxs("div",{className:"relative",children:[a.jsx(Zr,{className:"w-4 h-4 text-gray-400 absolute left-3.5 top-1/2 -translate-y-1/2"}),a.jsx("input",{type:"password",value:M,onChange:ie=>V(ie.target.value),placeholder:"Mailbox password",className:ye})]}),a.jsxs("button",{type:"button",onClick:()=>k(!q),className:"flex items-center space-x-1.5 text-xs font-semibold text-gray-500 hover:text-gray-700 transition-colors cursor-pointer",children:[a.jsx(ql,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Server settings"}),a.jsx(ha,{className:`w-3.5 h-3.5 transition-transform ${q?"rotate-180":""}`}),a.jsxs("span",{className:"font-normal text-gray-400",children:["— auto-detected as ",fe]})]}),q&&a.jsxs("div",{className:"grid grid-cols-3 gap-2.5 p-3.5 rounded-2xl bg-gray-50 border border-gray-200",children:[a.jsxs("div",{className:"col-span-2",children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wider text-gray-400 mb-1",children:"IMAP host"}),a.jsx("input",{value:g,onChange:ie=>R(ie.target.value),placeholder:fe,className:ke})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wider text-gray-400 mb-1",children:"IMAP port"}),a.jsx("input",{value:Q,onChange:ie=>W(ie.target.value),placeholder:"993",className:ke})]}),a.jsxs("div",{className:"col-span-2",children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wider text-gray-400 mb-1",children:"SMTP host"}),a.jsx("input",{value:I,onChange:ie=>K(ie.target.value),placeholder:"same as IMAP",className:ke})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wider text-gray-400 mb-1",children:"SMTP port"}),a.jsx("input",{value:X,onChange:ie=>P(ie.target.value),placeholder:"465",className:ke})]})]}),L&&a.jsx("div",{className:"p-3 rounded-xl bg-rose-50 border border-rose-200 text-rose-600 text-xs font-medium",children:L}),a.jsx("button",{type:"submit",disabled:be,className:"w-full flex items-center justify-center space-x-2 py-3 rounded-xl bg-blue-600 hover:bg-blue-700 disabled:opacity-60 text-white text-sm font-semibold shadow-md shadow-blue-600/20 transition-all cursor-pointer",children:be?a.jsxs(a.Fragment,{children:[a.jsx(yo,{className:"w-4 h-4 animate-spin"}),a.jsx("span",{children:"Connecting to your mailbox…"})]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"Sign in"}),a.jsx(An,{className:"w-4 h-4"})]})})]}),a.jsxs("div",{className:"flex items-center my-6",children:[a.jsx("div",{className:"flex-1 h-px bg-gray-200"}),a.jsx("span",{className:"px-3 text-[11px] font-semibold uppercase tracking-wider text-gray-400",children:"or"}),a.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),a.jsxs("button",{onClick:h,className:"w-full flex items-center justify-center space-x-2 py-3 rounded-xl border border-gray-300 hover:border-blue-400 hover:bg-blue-50/50 text-sm font-semibold text-gray-700 transition-all cursor-pointer",children:[a.jsx(Tt,{className:"w-4 h-4 text-blue-500"}),a.jsx("span",{children:"Explore the demo workspace"})]})]}),a.jsxs("p",{className:"text-center text-[11px] text-gray-400 mt-5 leading-relaxed",children:["Your credentials are encrypted (AES-256) into your own browser session and used only to talk to your mail server.",a.jsx("br",{}),"Google Workspace & Microsoft 365 sign-in (OAuth) is coming in the next phase."]})]})})]})},sy=({darkMode:c,onBackToMail:h,onShowToast:S,userPlan:d="free",onOpenPlansModal:z})=>{const[M,V]=m.useState("home"),[q,k]=m.useState("list"),[g,R]=m.useState("all"),[Q,W]=m.useState(!0),[I,K]=m.useState(""),[X,P]=m.useState(!1),[be,ae]=m.useState(!1),[L,J]=m.useState(null),[ce,fe]=m.useState(null),[le,ye]=m.useState(""),[ke,ie]=m.useState("Editor"),[re,$]=m.useState("restricted"),[de,ue]=m.useState(null),[oe,A]=m.useState(""),[b,U]=m.useState(null),[G,se]=m.useState([{id:"d1",provider:"google",name:"Google Drive (Work)",email:"komail@google.com",usedGb:820,totalGb:2e3,connected:!0},{id:"d2",provider:"onedrive",name:"Microsoft OneDrive Pro",email:"komail@m365.com",usedGb:320,totalGb:1e3,connected:!0},{id:"d3",provider:"zoho",name:"Zoho WorkDrive",email:"komail@zoho.com",usedGb:0,totalGb:500,connected:!1},{id:"d4",provider:"dropbox",name:"Dropbox Business",email:"komail@dropbox.com",usedGb:0,totalGb:2e3,connected:!1}]),[u,p]=m.useState([{id:"f1",name:"applet_access_history.json",type:"json",sizeBytes:24500,reasonSuggested:"You modified · 1:20 AM",owner:"me",location:"Google AI Studio",updatedAt:"Today, 1:20 AM",content:`{
  "access_logs": [
    { "user": "komail.lalani@gmail.com", "role": "admin", "timestamp": "2026-08-05T01:20:00Z" }
  ]
}`},{id:"f2",name:"Rootmyst_Capsules_60_final.cdr",type:"design",sizeBytes:42e5,reasonSuggested:"You opened · Aug 5",owner:"me",location:"Labels",updatedAt:"Aug 5, 2026"},{id:"f3",name:"Highfields_Dates_Almond.ai",type:"design",sizeBytes:85e5,reasonSuggested:"You uploaded · 12:08 AM",owner:"me",location:"Other",updatedAt:"Aug 5, 2026"},{id:"f4",name:"Komail_Passport_2024_.pdf",type:"pdf",sizeBytes:12e5,reasonSuggested:"You opened · Aug 4",owner:"me",location:"Imp_Docs",updatedAt:"Aug 4, 2026",starred:!0},{id:"f5",name:"67 Digital Daily Time sheet",type:"sheet",sizeBytes:58e4,reasonSuggested:"You opened · Jul 24",owner:"me",location:"67 Digital",updatedAt:"Jul 24, 2026",starred:!0,shared:!0},{id:"f6",name:"ROOTMYST Prices & STOCK",type:"sheet",sizeBytes:94e4,reasonSuggested:"You opened · Jul 22",owner:"me",location:"Price & Products",updatedAt:"Jul 22, 2026",starred:!0,shared:!0},{id:"f7",name:"Komail_Passport_2024.pdf",type:"pdf",sizeBytes:12e5,reasonSuggested:"You opened · Aug 4",owner:"me",location:"Imp_Docs",updatedAt:"Aug 4, 2026"},{id:"f8",name:"Sliced Cranberry Print File.cdr",type:"design",sizeBytes:61e5,reasonSuggested:"You uploaded · 12:08 AM",owner:"me",location:"Other",updatedAt:"Aug 5, 2026"},{id:"f9",name:"Passport_2024_Page1.png",type:"image",sizeBytes:18e5,reasonSuggested:"You opened · Aug 4",owner:"me",location:"Imp_Docs",updatedAt:"Aug 4, 2026"},{id:"f10",name:"Rootmyst_Gummies_30_4.cdr",type:"design",sizeBytes:39e5,reasonSuggested:"You uploaded · Aug 5",owner:"me",location:"Labels",updatedAt:"Aug 5, 2026"}]);m.useEffect(()=>{const D=()=>U(null);return window.addEventListener("click",D),()=>window.removeEventListener("click",D)},[]);const ee=(u.reduce((D,he)=>D+he.sizeBytes,0)/(1024*1024)).toFixed(1),xe=d==="free"?1:d==="pro"?5:d==="business"?10:999,ge=D=>{const he=G.filter(Xe=>Xe.connected).length,ze=G.find(Xe=>Xe.id===D);if(ze&&!ze.connected&&he>=xe){S(`Plan limit reached: ${d.toUpperCase()} plan allows ${xe} connected drive(s). Upgrade to connect more!`),z&&z();return}let kt="";se(Xe=>Xe.map(Ot=>{if(Ot.id===D){const Qe=!Ot.connected;return kt=Qe?`Connected ${Ot.name} cloud storage!`:`Disconnected ${Ot.name}`,{...Ot,connected:Qe}}return Ot})),kt&&S(kt)},Ne=D=>{switch(D){case"json":case"doc":return a.jsx(_b,{className:"w-5 h-5 text-blue-600 shrink-0"});case"sheet":return a.jsx(Hx,{className:"w-5 h-5 text-emerald-600 shrink-0"});case"pdf":return a.jsx(wa,{className:"w-5 h-5 text-red-600 shrink-0"});case"image":return a.jsx(rm,{className:"w-5 h-5 text-amber-600 shrink-0"});case"design":default:return a.jsx(Mb,{className:"w-5 h-5 text-purple-600 shrink-0"})}},Se=(D,he)=>{D.preventDefault(),D.stopPropagation(),U({x:Math.min(D.clientX,window.innerWidth-220),y:Math.min(D.clientY,window.innerHeight-300),file:he})},He=D=>{if(D.target.files&&D.target.files[0]){const he=D.target.files[0],ze={id:`f-${Date.now()}`,name:he.name,type:he.name.endsWith(".pdf")?"pdf":he.name.endsWith(".xlsx")||he.name.endsWith(".csv")?"sheet":he.type.startsWith("image/")?"image":"doc",sizeBytes:he.size||52e4,reasonSuggested:"You uploaded · Just now",owner:"me",location:"My Drive",updatedAt:"Just now"};p(kt=>[ze,...kt]),S(`Uploaded "${he.name}" to Omnio Drive Storage!`),P(!1)}},te=D=>{const he=D==="doc"?".docx":".xlsx",ze=D==="doc"?`Untitled Document ${u.length+1}${he}`:`Untitled Spreadsheet ${u.length+1}${he}`,kt={id:`f-${Date.now()}`,name:ze,type:D,sizeBytes:125e3,reasonSuggested:"Created in Omnio Drive · Just now",owner:"me",location:"My Drive",updatedAt:"Just now"};p(Xe=>[kt,...Xe]),S(`Created new ${D==="doc"?"Document":"Spreadsheet"} "${ze}"`),P(!1)},y=D=>{p(he=>he.map(ze=>{if(ze.id===D){const kt=!ze.starred;return S(kt?`Starred "${ze.name}"`:`Unstarred "${ze.name}"`),{...ze,starred:kt}}return ze}))},me=D=>{p(he=>he.map(ze=>ze.id===D?{...ze,inTrash:!0}:ze)),S("Moved file to Trash")},ve=D=>{p(he=>he.map(ze=>ze.id===D?{...ze,inTrash:!1}:ze)),S("Restored file from Trash")},Ee=D=>{p(he=>he.filter(ze=>ze.id!==D)),S("Deleted file permanently")},_e=D=>{D.preventDefault(),!(!ce||!le)&&(p(he=>he.map(ze=>ze.id===ce.id?{...ze,shared:!0}:ze)),S(`Shared "${ce.name}" with ${le} (${ke})`),fe(null),ye(""))},T=D=>{D.preventDefault(),!(!de||!oe.trim())&&(p(he=>he.map(ze=>ze.id===de.id?{...ze,name:oe.trim()}:ze)),S(`Renamed file to "${oe.trim()}"`),ue(null))},Re=D=>{S(`Downloading "${D.name}"...`)},Ie=D=>{navigator.clipboard.writeText(`https://omnio.drive/f/${D.id}`),S(`Copied link for "${D.name}" to clipboard!`)},ct=u.filter(D=>{if(M==="trash"){if(!D.inTrash)return!1}else if(D.inTrash||M==="starred"&&!D.starred||M==="shared"&&!D.shared||M==="my-drive"&&D.owner!=="me")return!1;if(g!=="all"&&(g==="doc"&&D.type!=="doc"&&D.type!=="json"||g==="sheet"&&D.type!=="sheet"||g==="pdf"&&D.type!=="pdf"||g==="image"&&D.type!=="image"&&D.type!=="design"))return!1;if(I.trim()){const he=I.toLowerCase();return D.name.toLowerCase().includes(he)||D.location.toLowerCase().includes(he)||D.owner.toLowerCase().includes(he)}return!0});return a.jsxs("div",{className:`h-full w-full flex flex-col overflow-hidden font-sans ${c?"bg-[#1f1f1f] text-gray-100":"bg-white text-gray-800"}`,children:[a.jsxs("header",{className:`h-16 border-b flex items-center justify-between px-4 shrink-0 ${c?"bg-[#1a1a1a] border-gray-800":"bg-white border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsxs("button",{onClick:h,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-300 transition-colors flex items-center space-x-1",title:"Back to Mail",children:[a.jsx(Es,{className:"w-5 h-5"}),a.jsx("span",{className:"text-xs font-semibold hidden sm:inline",children:"Mail"})]}),a.jsx("div",{className:"flex items-center select-none",children:a.jsx(Op,{size:38})})]}),a.jsx("div",{className:"flex-1 max-w-2xl mx-4",children:a.jsxs("div",{className:`relative flex items-center rounded-2xl px-4 py-2 transition-all ${c?"bg-[#2b2c30] text-gray-100 focus-within:bg-[#33353a]":"bg-[#edf2fc] text-gray-800 focus-within:bg-white focus-within:shadow-md"}`,children:[a.jsx(_s,{className:"w-5 h-5 text-gray-500 mr-3 shrink-0"}),a.jsx("input",{type:"text",value:I,onChange:D=>K(D.target.value),placeholder:"Search files and folders in Drive...",className:"w-full bg-transparent border-none outline-none text-sm placeholder-gray-500"}),I&&a.jsx("button",{onClick:()=>K(""),className:"p-1 text-gray-400 hover:text-gray-600",children:a.jsx(wt,{className:"w-4 h-4"})}),a.jsx("button",{className:"p-1 hover:bg-black/5 dark:hover:bg-white/10 rounded-lg text-gray-500 ml-1",children:a.jsx(mm,{className:"w-4 h-4"})})]})}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsxs("button",{onClick:()=>ae(!0),className:"hidden md:flex items-center space-x-1.5 px-3 py-1.5 rounded-full bg-blue-50 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 border border-blue-200 dark:border-blue-700 text-xs font-semibold hover:bg-blue-100 cursor-pointer",children:[a.jsx(Sn,{className:"w-4 h-4"}),a.jsx("span",{children:"Connect Storage"})]}),a.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-300",children:a.jsx(fb,{className:"w-5 h-5"})}),a.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-300",children:a.jsx(xm,{className:"w-5 h-5"})})]})]}),a.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[a.jsxs("aside",{className:`w-60 border-r flex flex-col justify-between p-3 shrink-0 select-none overflow-y-auto ${c?"bg-[#1a1a1a] border-gray-800":"bg-[#f8faef]/30 border-gray-200"}`,children:[a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>P(!X),className:"flex items-center space-x-3 px-5 py-3 rounded-2xl bg-white dark:bg-[#2a2c30] text-gray-800 dark:text-gray-100 border border-gray-200 dark:border-gray-700 shadow-md hover:shadow-lg transition-all font-semibold text-sm cursor-pointer",children:[a.jsx(ba,{className:"w-6 h-6 text-blue-600"}),a.jsx("span",{children:"New"})]}),X&&a.jsxs("div",{className:"absolute top-14 left-0 z-50 w-56 bg-white dark:bg-[#2d2e32] rounded-2xl shadow-2xl border border-gray-200 dark:border-gray-700 py-2 text-xs text-gray-700 dark:text-gray-200 animate-in fade-in zoom-in-95",children:[a.jsxs("label",{className:"flex items-center space-x-3 px-4 py-2.5 hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer",children:[a.jsx(vp,{className:"w-4 h-4 text-blue-600"}),a.jsx("span",{children:"File upload"}),a.jsx("input",{type:"file",onChange:He,className:"hidden"})]}),a.jsxs("label",{className:"flex items-center space-x-3 px-4 py-2.5 hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer",children:[a.jsx(Db,{className:"w-4 h-4 text-amber-600"}),a.jsx("span",{children:"Folder upload"}),a.jsx("input",{type:"file",onChange:He,className:"hidden"})]}),a.jsx("div",{className:"border-t my-1 border-gray-100 dark:border-gray-700"}),a.jsxs("button",{onClick:()=>te("doc"),className:"w-full flex items-center space-x-3 px-4 py-2.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(wa,{className:"w-4 h-4 text-blue-600"}),a.jsx("span",{children:"Omnio Docs"})]}),a.jsxs("button",{onClick:()=>te("sheet"),className:"w-full flex items-center space-x-3 px-4 py-2.5 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(Hx,{className:"w-4 h-4 text-emerald-600"}),a.jsx("span",{children:"Omnio Sheets"})]})]})]}),a.jsxs("nav",{className:"space-y-1 text-xs font-medium text-gray-700 dark:text-gray-300",children:[a.jsxs("button",{onClick:()=>V("home"),className:`w-full flex items-center space-x-3 px-4 py-2.5 rounded-full transition-colors ${M==="home"?"bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200 font-bold":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[a.jsx(Vr,{className:"w-4 h-4 text-blue-600"}),a.jsx("span",{children:"Home"})]}),a.jsxs("button",{onClick:()=>V("my-drive"),className:`w-full flex items-center space-x-3 px-4 py-2.5 rounded-full transition-colors ${M==="my-drive"?"bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200 font-bold":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[a.jsx(Ux,{className:"w-4 h-4 text-amber-500"}),a.jsx("span",{className:"flex-1 text-left",children:"My Drive"}),a.jsx(Gt,{className:"w-3.5 h-3.5 text-gray-400"})]}),a.jsxs("button",{onClick:()=>V("shared"),className:`w-full flex items-center space-x-3 px-4 py-2.5 rounded-full transition-colors ${M==="shared"?"bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200 font-bold":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[a.jsx(As,{className:"w-4 h-4 text-emerald-600"}),a.jsx("span",{className:"flex-1 text-left",children:"Shared drives"}),a.jsx(Gt,{className:"w-3.5 h-3.5 text-gray-400"})]}),a.jsxs("button",{onClick:()=>V("recent"),className:`w-full flex items-center space-x-3 px-4 py-2.5 rounded-full transition-colors ${M==="recent"?"bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200 font-bold":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[a.jsx(Mn,{className:"w-4 h-4 text-purple-600"}),a.jsx("span",{children:"Recent"})]}),a.jsxs("button",{onClick:()=>V("starred"),className:`w-full flex items-center space-x-3 px-4 py-2.5 rounded-full transition-colors ${M==="starred"?"bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200 font-bold":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[a.jsx(pl,{className:"w-4 h-4 text-amber-400"}),a.jsx("span",{children:"Starred"})]}),a.jsxs("button",{onClick:()=>V("trash"),className:`w-full flex items-center space-x-3 px-4 py-2.5 rounded-full transition-colors ${M==="trash"?"bg-blue-100 dark:bg-blue-900/50 text-blue-800 dark:text-blue-200 font-bold":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[a.jsx(oa,{className:"w-4 h-4 text-gray-500"}),a.jsx("span",{children:"Trash"})]})]}),a.jsxs("div",{className:"pt-4 border-t border-gray-200 dark:border-gray-800 space-y-2",children:[a.jsxs("div",{className:"flex items-center space-x-2 text-xs font-semibold text-gray-600 dark:text-gray-400",children:[a.jsx(Sn,{className:"w-4 h-4 text-blue-500"}),a.jsx("span",{children:"Storage"})]}),a.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 h-2 rounded-full overflow-hidden",children:a.jsx("div",{className:"bg-blue-600 h-full w-[28%]"})}),a.jsxs("p",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["1.14 TB + ",ee," MB of 5 TB used"]}),a.jsx("button",{onClick:()=>ae(!0),className:"text-xs font-medium text-blue-600 hover:underline cursor-pointer block pt-1",children:"Get more storage / Connect drives"})]})]}),a.jsxs("div",{className:"pt-4 border-t border-gray-200 dark:border-gray-800",children:[a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400 block mb-2",children:"Connected Storage"}),a.jsx("div",{className:"space-y-1.5 text-xs",children:G.map(D=>a.jsxs("div",{className:"flex items-center justify-between p-1.5 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800",children:[a.jsxs("div",{className:"flex items-center space-x-2 truncate mr-1",children:[a.jsx("span",{className:`w-2 h-2 rounded-full ${D.connected?"bg-emerald-500":"bg-gray-300 dark:bg-gray-600"}`}),a.jsx("span",{className:"truncate text-[11px] font-medium",children:D.name})]}),a.jsx("button",{onClick:()=>ge(D.id),className:`text-[10px] font-bold px-1.5 py-0.5 rounded cursor-pointer ${D.connected?"text-red-600 hover:bg-red-50 dark:hover:bg-red-950/40":"text-blue-600 hover:bg-blue-50 dark:hover:bg-blue-950/40"}`,children:D.connected?"Disconnect":"Connect"})]},D.id))})]})]}),a.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden p-4 sm:p-6 space-y-4",children:[Q&&a.jsxs("div",{className:"p-4 rounded-2xl bg-blue-50/80 dark:bg-blue-950/40 border border-blue-200 dark:border-blue-800 flex items-center justify-between text-xs text-blue-900 dark:text-blue-200 animate-in fade-in",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx(Tt,{className:"w-5 h-5 text-blue-600 shrink-0"}),a.jsxs("p",{className:"leading-relaxed",children:[a.jsx("strong",{className:"font-semibold",children:"Try AI directly in Drive:"})," Use Gemini to generate summaries, search document contents, and analyze spreadsheets automatically."]})]}),a.jsxs("div",{className:"flex items-center space-x-3 shrink-0 ml-4",children:[a.jsx("button",{onClick:()=>S("Gemini Drive Copilot active!"),className:"px-3 py-1.5 rounded-full bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-xs",children:"Get started"}),a.jsx("button",{onClick:()=>W(!1),className:"p-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",children:a.jsx(wt,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[a.jsx("h1",{className:"text-2xl font-bold tracking-tight capitalize",children:M==="home"?"Welcome to Drive":M.replace("-"," ")}),a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsxs("div",{className:"flex items-center space-x-1.5 text-xs",children:[a.jsx("button",{onClick:()=>R("all"),className:`px-3 py-1.5 rounded-xl font-medium transition-colors cursor-pointer ${g==="all"?"bg-blue-600 text-white font-bold":"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300"}`,children:"All"}),a.jsx("button",{onClick:()=>R("doc"),className:`px-3 py-1.5 rounded-xl font-medium transition-colors cursor-pointer ${g==="doc"?"bg-blue-600 text-white font-bold":"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300"}`,children:"Docs"}),a.jsx("button",{onClick:()=>R("sheet"),className:`px-3 py-1.5 rounded-xl font-medium transition-colors cursor-pointer ${g==="sheet"?"bg-blue-600 text-white font-bold":"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300"}`,children:"Sheets"}),a.jsx("button",{onClick:()=>R("pdf"),className:`px-3 py-1.5 rounded-xl font-medium transition-colors cursor-pointer ${g==="pdf"?"bg-blue-600 text-white font-bold":"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300"}`,children:"PDFs"})]}),a.jsxs("div",{className:"flex items-center bg-gray-100 dark:bg-gray-800 p-0.5 rounded-xl border border-gray-200 dark:border-gray-700",children:[a.jsx("button",{onClick:()=>k("list"),className:`p-1.5 rounded-lg text-xs font-medium cursor-pointer transition-colors ${q==="list"?"bg-white dark:bg-[#2d2e32] shadow-xs text-blue-600":"text-gray-500"}`,children:a.jsx(Co,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>k("grid"),className:`p-1.5 rounded-lg text-xs font-medium cursor-pointer transition-colors ${q==="grid"?"bg-white dark:bg-[#2d2e32] shadow-xs text-blue-600":"text-gray-500"}`,children:a.jsx(nm,{className:"w-4 h-4"})})]})]})]}),a.jsxs("div",{className:"flex items-center space-x-2 text-xs font-semibold text-gray-500 uppercase tracking-wider",children:[a.jsx(ha,{className:"w-4 h-4"}),a.jsx("span",{children:"Suggested files (Right-click or click for actions)"})]}),a.jsx("div",{className:"flex-1 overflow-y-auto rounded-2xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-[#1a1a1a]",children:ct.length===0?a.jsxs("div",{className:"p-12 text-center text-gray-400 space-y-3",children:[a.jsx(Ux,{className:"w-12 h-12 mx-auto stroke-1 text-gray-300"}),a.jsx("p",{className:"text-sm font-medium",children:"No files found in this view."})]}):q==="list"?a.jsxs("table",{className:"w-full text-left text-xs border-collapse",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-800 text-gray-400 font-semibold uppercase text-[10px]",children:[a.jsx("th",{className:"py-3 px-4",children:"Name"}),a.jsx("th",{className:"py-3 px-4",children:"Reason suggested"}),a.jsx("th",{className:"py-3 px-4",children:"Owner"}),a.jsx("th",{className:"py-3 px-4",children:"Location"}),a.jsx("th",{className:"py-3 px-2 text-right",children:"Actions"})]})}),a.jsx("tbody",{className:"divide-y divide-gray-100 dark:divide-gray-800/60 text-gray-700 dark:text-gray-200",children:ct.map(D=>a.jsxs("tr",{onContextMenu:he=>Se(he,D),onClick:()=>J(D),className:"hover:bg-blue-50/60 dark:hover:bg-blue-950/30 transition-colors group cursor-pointer",children:[a.jsx("td",{className:"py-3 px-4",children:a.jsxs("div",{className:"flex items-center space-x-3 font-medium",children:[Ne(D.type),a.jsx("span",{className:"truncate max-w-xs",children:D.name}),D.starred&&a.jsx(pl,{className:"w-3.5 h-3.5 text-amber-400 fill-amber-400 shrink-0"}),D.shared&&a.jsx(As,{className:"w-3.5 h-3.5 text-blue-500 shrink-0"})]})}),a.jsx("td",{className:"py-3 px-4 text-gray-500 dark:text-gray-400",children:D.reasonSuggested}),a.jsx("td",{className:"py-3 px-4 text-gray-500 dark:text-gray-400",children:D.owner}),a.jsx("td",{className:"py-3 px-4",children:a.jsx("span",{className:"px-2 py-0.5 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 font-mono text-[10px]",children:D.location})}),a.jsx("td",{className:"py-3 px-2 text-right",children:a.jsxs("div",{className:"flex items-center justify-end space-x-1",onClick:he=>he.stopPropagation(),children:[a.jsx("button",{onClick:()=>J(D),className:"p-1.5 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500",title:"Preview file",children:a.jsx(Dx,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>{fe(D),A(D.name)},className:"p-1.5 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 text-blue-600",title:"Share file",children:a.jsx(mo,{className:"w-4 h-4"})}),a.jsx("button",{onClick:he=>Se(he,D),className:"p-1.5 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500",children:a.jsx(Qr,{className:"w-4 h-4"})})]})})]},D.id))})]}):a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4 p-4",children:ct.map(D=>a.jsxs("div",{onContextMenu:he=>Se(he,D),onClick:()=>J(D),className:"p-4 rounded-2xl border border-gray-200 dark:border-gray-800 hover:shadow-lg transition-all space-y-3 bg-white dark:bg-[#25262a] cursor-pointer group",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[Ne(D.type),a.jsxs("div",{className:"flex items-center space-x-1",onClick:he=>he.stopPropagation(),children:[a.jsx("button",{onClick:()=>y(D.id),className:"p-1 hover:text-amber-400",children:a.jsx(pl,{className:`w-4 h-4 ${D.starred?"text-amber-400 fill-amber-400":"text-gray-400"}`})}),a.jsx("button",{onClick:he=>Se(he,D),className:"p-1 text-gray-400 hover:text-gray-600",children:a.jsx(Qr,{className:"w-4 h-4"})})]})]}),a.jsx("p",{className:"font-semibold text-xs truncate",children:D.name}),a.jsxs("div",{className:"text-[10px] text-gray-400 space-y-0.5",children:[a.jsx("p",{children:D.reasonSuggested}),a.jsx("p",{className:"text-blue-500",children:D.location})]})]},D.id))})})]})]}),b&&a.jsxs("div",{style:{top:b.y,left:b.x},className:"fixed z-50 w-52 bg-white dark:bg-[#2d2e32] rounded-2xl shadow-2xl border border-gray-200 dark:border-gray-700 py-2 text-xs text-gray-700 dark:text-gray-200 animate-in fade-in",onClick:D=>D.stopPropagation(),children:[a.jsx("div",{className:"px-3 py-1.5 font-bold text-[10px] text-gray-400 uppercase truncate border-b border-gray-100 dark:border-gray-700 mb-1",children:b.file.name}),a.jsxs("button",{onClick:()=>{J(b.file),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(Dx,{className:"w-4 h-4 text-blue-500"}),a.jsx("span",{children:"Preview"})]}),a.jsxs("button",{onClick:()=>{fe(b.file),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(mo,{className:"w-4 h-4 text-emerald-500"}),a.jsx("span",{children:"Share"})]}),a.jsxs("button",{onClick:()=>{Ie(b.file),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(bo,{className:"w-4 h-4 text-purple-500"}),a.jsx("span",{children:"Copy link"})]}),a.jsxs("button",{onClick:()=>{Re(b.file),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(go,{className:"w-4 h-4 text-amber-500"}),a.jsx("span",{children:"Download"})]}),a.jsxs("button",{onClick:()=>{ue(b.file),A(b.file.name),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(dm,{className:"w-4 h-4 text-indigo-500"}),a.jsx("span",{children:"Rename"})]}),a.jsxs("button",{onClick:()=>{y(b.file.id),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(pl,{className:`w-4 h-4 ${b.file.starred?"text-amber-400 fill-amber-400":"text-gray-400"}`}),a.jsx("span",{children:b.file.starred?"Remove from Starred":"Add to Starred"})]}),a.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1"}),b.file.inTrash?a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:()=>{ve(b.file.id),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left text-emerald-600",children:[a.jsx($g,{className:"w-4 h-4"}),a.jsx("span",{children:"Restore"})]}),a.jsxs("button",{onClick:()=>{Ee(b.file.id),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left text-red-600",children:[a.jsx(oa,{className:"w-4 h-4"}),a.jsx("span",{children:"Delete permanently"})]})]}):a.jsxs("button",{onClick:()=>{me(b.file.id),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left text-red-600",children:[a.jsx(oa,{className:"w-4 h-4"}),a.jsx("span",{children:"Move to Trash"})]})]}),L&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/75 backdrop-blur-sm animate-in fade-in",children:a.jsxs("div",{className:"w-full max-w-2xl rounded-3xl bg-white dark:bg-[#28292c] p-6 shadow-2xl border border-gray-200 dark:border-gray-700 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 dark:border-gray-700 pb-3",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[Ne(L.type),a.jsxs("div",{children:[a.jsx("h2",{className:"font-bold text-sm",children:L.name}),a.jsxs("p",{className:"text-[11px] text-gray-400",children:[L.location," · ",L.updatedAt]})]})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:()=>Ie(L),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:a.jsx(bo,{className:"w-4 h-4 text-gray-500"})}),a.jsx("button",{onClick:()=>Re(L),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:a.jsx(go,{className:"w-4 h-4 text-gray-500"})}),a.jsx("button",{onClick:()=>J(null),className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:a.jsx(wt,{className:"w-5 h-5 text-gray-400"})})]})]}),a.jsx("div",{className:"p-6 rounded-2xl bg-gray-50 dark:bg-[#1a1a1a] border border-gray-200 dark:border-gray-800 min-h-[220px] flex flex-col items-center justify-center text-center space-y-3",children:L.content?a.jsx("pre",{className:"text-left font-mono text-xs w-full overflow-x-auto p-4 bg-gray-900 text-emerald-400 rounded-xl",children:L.content}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"p-4 rounded-full bg-blue-100 dark:bg-blue-900/40 text-blue-600",children:Ne(L.type)}),a.jsxs("p",{className:"text-xs text-gray-500",children:["Document viewer active for ",L.name]}),a.jsxs("p",{className:"text-[11px] font-mono text-gray-400",children:["Size: ",(L.sizeBytes/1024).toFixed(0)," KB"]})]})}),a.jsx("div",{className:"flex justify-end space-x-3 pt-2",children:a.jsx("button",{onClick:()=>{fe(L),J(null)},className:"px-4 py-2 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs",children:"Share File"})})]})}),ce&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs",children:a.jsxs("form",{onSubmit:_e,className:"w-full max-w-lg rounded-3xl bg-white dark:bg-[#28292c] p-6 shadow-2xl border border-gray-200 dark:border-gray-700 space-y-5",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(mo,{className:"w-5 h-5 text-blue-600"}),a.jsxs("h3",{className:"font-bold text-base",children:['Share "',ce.name,'"']})]}),a.jsx("button",{type:"button",onClick:()=>fe(null),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:a.jsx(wt,{className:"w-5 h-5 text-gray-400"})})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-500 mb-1",children:"Add people or email addresses"}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx("input",{type:"email",required:!0,value:le,onChange:D=>ye(D.target.value),placeholder:"user@organization.com",className:`flex-1 p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`}),a.jsxs("select",{value:ke,onChange:D=>ie(D.target.value),className:`p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`,children:[a.jsx("option",{value:"Editor",children:"Editor"}),a.jsx("option",{value:"Viewer",children:"Viewer"})]})]})]}),a.jsxs("div",{className:"pt-3 border-t border-gray-100 dark:border-gray-700 space-y-2",children:[a.jsx("span",{className:"text-xs font-bold text-gray-500 block",children:"General access"}),a.jsxs("div",{className:"flex items-center space-x-3 p-3 rounded-2xl bg-gray-50 dark:bg-gray-800/50",children:[re==="restricted"?a.jsx(Zr,{className:"w-5 h-5 text-amber-500 shrink-0"}):a.jsx(po,{className:"w-5 h-5 text-emerald-500 shrink-0"}),a.jsx("div",{className:"flex-1",children:a.jsxs("select",{value:re,onChange:D=>$(D.target.value),className:"bg-transparent font-semibold text-xs border-none outline-none cursor-pointer",children:[a.jsx("option",{value:"restricted",children:"Restricted — Only added people can open"}),a.jsx("option",{value:"anyone",children:"Anyone with the link can view"})]})})]})]})]}),a.jsxs("div",{className:"flex items-center justify-between pt-2",children:[a.jsxs("button",{type:"button",onClick:()=>Ie(ce),className:"flex items-center space-x-1.5 px-3 py-2 rounded-xl border border-gray-200 dark:border-gray-700 text-xs font-semibold text-gray-600 dark:text-gray-300 hover:bg-gray-50",children:[a.jsx(Wb,{className:"w-4 h-4"}),a.jsx("span",{children:"Copy link"})]}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx("button",{type:"button",onClick:()=>fe(null),className:"px-4 py-2 rounded-xl text-xs font-semibold text-gray-500",children:"Cancel"}),a.jsx("button",{type:"submit",className:"px-5 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-md",children:"Send Invite"})]})]})]})}),de&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs",children:a.jsxs("form",{onSubmit:T,className:"w-full max-w-md rounded-3xl bg-white dark:bg-[#28292c] p-6 shadow-2xl border border-gray-200 dark:border-gray-700 space-y-4",children:[a.jsx("h3",{className:"font-bold text-base",children:"Rename file"}),a.jsx("input",{type:"text",required:!0,value:oe,onChange:D=>A(D.target.value),className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`}),a.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[a.jsx("button",{type:"button",onClick:()=>ue(null),className:"px-4 py-2 rounded-xl text-xs font-semibold text-gray-500",children:"Cancel"}),a.jsx("button",{type:"submit",className:"px-5 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-md",children:"OK"})]})]})}),be&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs",children:a.jsxs("div",{className:"w-full max-w-lg rounded-3xl bg-white dark:bg-[#28292c] p-6 shadow-2xl border border-gray-200 dark:border-gray-700 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx(Sn,{className:"w-6 h-6 text-blue-600"}),a.jsx("h2",{className:"text-lg font-bold",children:"Connect External Cloud Storage"})]}),a.jsx("button",{onClick:()=>ae(!1),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:a.jsx(wt,{className:"w-5 h-5 text-gray-400"})})]}),a.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"Bring Your Own Drive (BYOD): Link your existing Google Drive, OneDrive, or Zoho Drive seamlessly."}),a.jsx("div",{className:"space-y-3",children:G.map(D=>a.jsxs("div",{className:"p-3.5 rounded-2xl border border-gray-200 dark:border-gray-700 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-bold text-xs",children:D.name}),a.jsx("p",{className:"text-[11px] text-gray-400",children:D.email})]}),a.jsx("button",{onClick:()=>ge(D.id),className:`px-3 py-1.5 rounded-xl text-xs font-semibold cursor-pointer ${D.connected?"bg-red-50 text-red-600 border border-red-200":"bg-blue-600 text-white"}`,children:D.connected?"Disconnect":"Connect Account"})]},D.id))}),a.jsx("div",{className:"flex justify-end pt-2",children:a.jsx("button",{onClick:()=>ae(!1),className:"px-5 py-2 rounded-xl bg-gray-100 dark:bg-gray-700 text-xs font-semibold",children:"Done"})})]})})]})},ny=({darkMode:c,onBackToMail:h,onShowToast:S})=>{const[d,z]=m.useState(new Date(2026,7,6)),[M,V]=m.useState("Month"),[q,k]=m.useState(""),[g,R]=m.useState({primary:!0,birthdays:!0,family:!0,tasks:!0}),[Q,W]=m.useState({holidays:!0}),[I,K]=m.useState(!1),[X,P]=m.useState(null),[be,ae]=m.useState(6),[L,J]=m.useState(""),[ce,fe]=m.useState("10:00 AM"),[le,ye]=m.useState(""),[ke,ie]=m.useState("primary"),[re,$]=m.useState("bg-blue-600 text-white"),[de,ue]=m.useState(!1),[oe,A]=m.useState(""),[b,U]=m.useState(null),[G,se]=m.useState([{id:"e1",title:"Omnio Product Strategy Sync",date:6,month:7,year:2026,time:"10:00 AM",hour:10,color:"bg-blue-600 text-white",calendar:"primary",location:"Google Meet",description:"Review roadmap & Drive integration"},{id:"e2",title:"Komail Birthday Celebration",date:12,month:7,year:2026,time:"All day",color:"bg-emerald-600 text-white",calendar:"birthdays"},{id:"e3",title:"Family Dinner at Restaurant",date:15,month:7,year:2026,time:"7:30 PM",hour:19,color:"bg-amber-600 text-white",calendar:"family"},{id:"e4",title:"Review Q3 Financial Metrics",date:20,month:7,year:2026,time:"2:00 PM",hour:14,color:"bg-indigo-600 text-white",calendar:"tasks"},{id:"e5",title:"Client Demo & Feedback Call",date:24,month:7,year:2026,time:"4:00 PM",hour:16,color:"bg-blue-600 text-white",calendar:"primary"},{id:"e6",title:"Independence Day Holiday",date:15,month:7,year:2026,time:"All day",color:"bg-purple-600 text-white",calendar:"holidays"}]);m.useEffect(()=>{const T=()=>U(null);return window.addEventListener("click",T),()=>window.removeEventListener("click",T)},[]);const p=`${["January","February","March","April","May","June","July","August","September","October","November","December"][d.getMonth()]} ${d.getFullYear()}`,Y=T=>{P(null),ae(T),J(""),fe("10:00 AM"),ye(""),ie("primary"),$("bg-blue-600 text-white"),K(!0)},ee=T=>{P(T.id),ae(T.date),J(T.title),fe(T.time),ye(T.location||""),ie(T.calendar),$(T.color),K(!0)},xe=T=>{if(T.preventDefault(),!!L.trim()){if(X)se(Re=>Re.map(Ie=>Ie.id===X?{...Ie,title:L,date:be,time:ce,location:le,calendar:ke,color:re}:Ie)),S(`Updated event "${L}"`);else{const Re={id:`ev-${Date.now()}`,title:L,date:be,month:d.getMonth(),year:d.getFullYear(),time:ce,color:re,calendar:ke,location:le};se(Ie=>[...Ie,Re]),S(`Event created: "${L}"`)}K(!1)}},ge=T=>{se(Re=>Re.filter(Ie=>Ie.id!==T)),S("Deleted calendar event")},Ne=T=>{const Re={...T,id:`ev-${Date.now()}`,title:`${T.title} (Copy)`};se(Ie=>[...Ie,Re]),S(`Duplicated event "${Re.title}"`)},Se=(T,Re)=>{T.preventDefault(),T.stopPropagation(),U({x:Math.min(T.clientX,window.innerWidth-200),y:Math.min(T.clientY,window.innerHeight-250),event:Re})},He=T=>{T.preventDefault(),oe.trim()&&(S(`Created new calendar "${oe}"`),ue(!1),A(""))},te=T=>{const Re=new Date(d.getFullYear(),d.getMonth()+T,1);z(Re)},y=()=>{z(new Date(2026,7,6))},me=G.filter(T=>{if(T.calendar==="primary"&&!g.primary||T.calendar==="birthdays"&&!g.birthdays||T.calendar==="family"&&!g.family||T.calendar==="tasks"&&!g.tasks||T.calendar==="holidays"&&!Q.holidays)return!1;if(q.trim()){const Re=q.toLowerCase();return T.title.toLowerCase().includes(Re)||T.location&&T.location.toLowerCase().includes(Re)}return!0}),ve=Array.from({length:31},(T,Re)=>Re+1),Ee=[26,27,28,29,30,31],_e=[8,9,10,11,12,13,14,15,16,17,18,19,20];return a.jsxs("div",{className:`h-full w-full flex flex-col overflow-hidden font-sans ${c?"bg-[#1f1f1f] text-gray-100":"bg-white text-gray-800"}`,children:[a.jsxs("header",{className:`h-16 border-b flex items-center justify-between px-4 shrink-0 select-none ${c?"bg-[#1a1a1a] border-gray-800":"bg-white border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center space-x-3 sm:space-x-4",children:[a.jsxs("button",{onClick:h,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-600 dark:text-gray-300 transition-colors flex items-center space-x-1",title:"Back to Mail",children:[a.jsx(Es,{className:"w-5 h-5"}),a.jsx("span",{className:"text-xs font-semibold hidden sm:inline",children:"Mail"})]}),a.jsx("div",{className:"flex items-center select-none",children:a.jsx(Dp,{size:38})}),a.jsx("button",{onClick:y,className:"px-3.5 py-1.5 rounded-full border border-gray-300 dark:border-gray-700 text-xs font-semibold hover:bg-gray-50 dark:hover:bg-gray-800 ml-2 sm:ml-4 cursor-pointer",children:"Today"}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx("button",{onClick:()=>te(-1),className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800",children:a.jsx(Yr,{className:"w-5 h-5 text-gray-600 dark:text-gray-300"})}),a.jsx("button",{onClick:()=>te(1),className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800",children:a.jsx(Gt,{className:"w-5 h-5 text-gray-600 dark:text-gray-300"})})]}),a.jsx("h2",{className:"text-lg sm:text-xl font-bold text-gray-800 dark:text-gray-100 ml-1 sm:ml-2 truncate",children:p})]}),a.jsxs("div",{className:"flex items-center space-x-2 sm:space-x-3",children:[a.jsxs("div",{className:`hidden md:flex items-center rounded-2xl px-3 py-1.5 border ${c?"bg-[#2b2c30] border-gray-700":"bg-gray-100 border-gray-200"}`,children:[a.jsx(_s,{className:"w-4 h-4 text-gray-400 mr-2"}),a.jsx("input",{type:"text",value:q,onChange:T=>k(T.target.value),placeholder:"Search events...",className:"bg-transparent border-none outline-none text-xs w-36"})]}),a.jsx("div",{className:"flex items-center bg-gray-100 dark:bg-gray-800 p-0.5 rounded-xl border border-gray-200 dark:border-gray-700",children:["Month","Week","Day"].map(T=>a.jsx("button",{onClick:()=>V(T),className:`px-3 py-1 rounded-lg text-xs font-semibold transition-colors cursor-pointer ${M===T?"bg-white dark:bg-[#2d2e32] shadow-xs text-blue-600":"text-gray-500"}`,children:T},T))}),a.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800",children:a.jsx(xm,{className:"w-5 h-5 text-gray-600 dark:text-gray-300"})})]})]}),a.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[a.jsxs("aside",{className:`w-60 border-r p-3.5 flex flex-col space-y-5 shrink-0 select-none overflow-y-auto ${c?"bg-[#1a1a1a] border-gray-800":"bg-gray-50/50 border-gray-200"}`,children:[a.jsx("div",{children:a.jsxs("button",{onClick:()=>Y(6),className:"flex items-center space-x-3 px-5 py-3 rounded-2xl bg-white dark:bg-[#2d2e32] text-gray-800 dark:text-gray-100 border border-gray-200 dark:border-gray-700 shadow-md hover:shadow-lg transition-all font-semibold text-sm cursor-pointer",children:[a.jsx(ba,{className:"w-6 h-6 text-blue-600"}),a.jsx("span",{children:"Create Event"})]})}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between text-xs font-bold text-gray-700 dark:text-gray-200",children:[a.jsx("span",{children:"August 2026"}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx(Yr,{onClick:()=>te(-1),className:"w-4 h-4 cursor-pointer hover:text-blue-600"}),a.jsx(Gt,{onClick:()=>te(1),className:"w-4 h-4 cursor-pointer hover:text-blue-600"})]})]}),a.jsxs("div",{className:"grid grid-cols-7 text-center text-[10px] font-semibold text-gray-400 gap-y-1",children:[a.jsx("span",{children:"S"}),a.jsx("span",{children:"M"}),a.jsx("span",{children:"T"}),a.jsx("span",{children:"W"}),a.jsx("span",{children:"T"}),a.jsx("span",{children:"F"}),a.jsx("span",{children:"S"}),Array.from({length:31},(T,Re)=>Re+1).map(T=>a.jsx("span",{onClick:()=>Y(T),className:`py-1 rounded-full cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 ${T===6?"bg-blue-600 text-white font-bold":""}`,children:T},T))]})]}),a.jsxs("div",{className:"relative",children:[a.jsx(Np,{className:"w-4 h-4 text-gray-400 absolute left-3 top-2.5"}),a.jsx("input",{type:"text",placeholder:"Search guests or people",className:`w-full pl-9 pr-3 py-2 rounded-xl border text-xs outline-none ${c?"bg-[#25262a] border-gray-700 text-gray-100":"bg-gray-100 border-gray-200 text-gray-800"}`})]}),a.jsxs("div",{className:"space-y-2.5 text-xs",children:[a.jsxs("div",{className:"flex items-center justify-between text-gray-500 font-bold uppercase text-[10px] tracking-wider",children:[a.jsx("span",{children:"My calendars"}),a.jsx(ha,{className:"w-3.5 h-3.5"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"flex items-center space-x-2.5 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:g.primary,onChange:T=>R({...g,primary:T.target.checked}),className:"w-4 h-4 rounded text-blue-600 accent-blue-600 cursor-pointer"}),a.jsx("span",{className:"font-medium",children:"Komail Lalani"})]}),a.jsxs("label",{className:"flex items-center space-x-2.5 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:g.birthdays,onChange:T=>R({...g,birthdays:T.target.checked}),className:"w-4 h-4 rounded text-emerald-600 accent-emerald-600 cursor-pointer"}),a.jsx("span",{className:"font-medium",children:"Birthdays"})]}),a.jsxs("label",{className:"flex items-center space-x-2.5 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:g.family,onChange:T=>R({...g,family:T.target.checked}),className:"w-4 h-4 rounded text-amber-600 accent-amber-600 cursor-pointer"}),a.jsx("span",{className:"font-medium",children:"Family"})]}),a.jsxs("label",{className:"flex items-center space-x-2.5 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:g.tasks,onChange:T=>R({...g,tasks:T.target.checked}),className:"w-4 h-4 rounded text-indigo-600 accent-indigo-600 cursor-pointer"}),a.jsx("span",{className:"font-medium",children:"Tasks"})]})]})]}),a.jsxs("div",{className:"space-y-2.5 text-xs pt-2 border-t border-gray-200 dark:border-gray-800",children:[a.jsxs("div",{className:"flex items-center justify-between text-gray-500 font-bold uppercase text-[10px] tracking-wider",children:[a.jsx("span",{children:"Other calendars"}),a.jsx("button",{onClick:()=>ue(!0),className:"p-0.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",children:a.jsx(ba,{className:"w-3.5 h-3.5"})})]}),a.jsx("div",{className:"space-y-2",children:a.jsxs("label",{className:"flex items-center space-x-2.5 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:Q.holidays,onChange:T=>W({...Q,holidays:T.target.checked}),className:"w-4 h-4 rounded text-purple-600 accent-purple-600 cursor-pointer"}),a.jsx("span",{className:"font-medium",children:"Public Holidays"})]})})]})]}),a.jsx("main",{className:"flex-1 flex flex-col overflow-hidden",children:M==="Month"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-7 border-b border-gray-200 dark:border-gray-800 text-center text-xs font-semibold text-gray-500 py-2",children:[a.jsx("div",{children:"SUN"}),a.jsx("div",{children:"MON"}),a.jsx("div",{children:"TUE"}),a.jsx("div",{children:"WED"}),a.jsx("div",{children:"THU"}),a.jsx("div",{children:"FRI"}),a.jsx("div",{children:"SAT"})]}),a.jsxs("div",{className:"flex-1 grid grid-cols-7 grid-rows-5 border-l border-t border-gray-200 dark:border-gray-800 overflow-y-auto",children:[Ee.map(T=>a.jsx("div",{className:"border-r border-b border-gray-200 dark:border-gray-800 p-2 bg-gray-50/40 dark:bg-gray-900/40 text-gray-400 text-xs font-medium",children:T},`jul-${T}`)),ve.map(T=>{const Re=me.filter(ct=>ct.date===T),Ie=T===6;return a.jsxs("div",{onClick:()=>Y(T),className:`border-r border-b border-gray-200 dark:border-gray-800 p-1.5 flex flex-col transition-colors hover:bg-blue-50/30 dark:hover:bg-blue-950/20 cursor-pointer min-h-[90px] ${Ie?"bg-blue-50/20 dark:bg-blue-950/10":""}`,children:[a.jsx("div",{className:"flex justify-center mb-1",children:a.jsx("span",{className:`text-xs font-bold w-6 h-6 flex items-center justify-center rounded-full ${Ie?"bg-blue-600 text-white":"text-gray-700 dark:text-gray-300"}`,children:T})}),a.jsx("div",{className:"space-y-1 overflow-y-auto flex-1",children:Re.map(ct=>a.jsxs("div",{onClick:D=>{D.stopPropagation(),ee(ct)},onContextMenu:D=>Se(D,ct),className:`text-[10px] font-semibold px-2 py-1 rounded-lg truncate shadow-xs transition-transform hover:scale-102 cursor-pointer ${ct.color}`,children:[ct.time!=="All day"&&a.jsx("span",{className:"opacity-80 mr-1",children:ct.time}),ct.title]},ct.id))})]},`aug-${T}`)})]})]}):M==="Week"?a.jsxs("div",{className:"flex-1 flex flex-col overflow-y-auto",children:[a.jsxs("div",{className:"grid grid-cols-8 border-b border-gray-200 dark:border-gray-800 text-center text-xs font-semibold py-2",children:[a.jsx("div",{className:"text-gray-400",children:"Time"}),a.jsx("div",{children:"Sun 2"}),a.jsx("div",{children:"Mon 3"}),a.jsx("div",{children:"Tue 4"}),a.jsx("div",{children:"Wed 5"}),a.jsx("div",{className:"text-blue-600 font-bold",children:"Thu 6"}),a.jsx("div",{children:"Fri 7"}),a.jsx("div",{children:"Sat 8"})]}),a.jsx("div",{className:"flex-1 divide-y divide-gray-100 dark:divide-gray-800",children:_e.map(T=>a.jsxs("div",{className:"grid grid-cols-8 min-h-[50px] text-xs",children:[a.jsx("div",{className:"p-2 text-right text-gray-400 text-[11px] font-mono border-r border-gray-200 dark:border-gray-800",children:T>12?`${T-12} PM`:`${T} AM`}),Array.from({length:7}).map((Re,Ie)=>{const ct=Ie+2,D=me.filter(he=>he.date===ct&&(he.hour===T||T===10&&he.time.includes("10")));return a.jsx("div",{onClick:()=>Y(ct),className:"border-r border-gray-100 dark:border-gray-800 p-1 hover:bg-blue-50/20 cursor-pointer",children:D.map(he=>a.jsx("div",{onClick:ze=>{ze.stopPropagation(),ee(he)},onContextMenu:ze=>Se(ze,he),className:`text-[10px] font-bold p-1 rounded-md truncate ${he.color}`,children:he.title},he.id))},Ie)})]},T))})]}):a.jsxs("div",{className:"flex-1 flex flex-col overflow-y-auto p-4 space-y-3",children:[a.jsx("h2",{className:"text-lg font-bold text-blue-600",children:"Thursday, August 6, 2026"}),a.jsx("div",{className:"space-y-2",children:me.filter(T=>T.date===6).map(T=>a.jsxs("div",{onClick:()=>ee(T),onContextMenu:Re=>Se(Re,T),className:`p-4 rounded-2xl shadow-sm space-y-1 cursor-pointer ${T.color}`,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-bold text-sm",children:T.title}),a.jsx("span",{className:"text-xs font-mono opacity-90",children:T.time})]}),T.location&&a.jsxs("p",{className:"text-xs opacity-80 flex items-center",children:[a.jsx(cg,{className:"w-3.5 h-3.5 mr-1"})," ",T.location]}),T.description&&a.jsx("p",{className:"text-xs opacity-90",children:T.description})]},T.id))})]})})]}),b&&a.jsxs("div",{style:{top:b.y,left:b.x},className:"fixed z-50 w-48 bg-white dark:bg-[#2d2e32] rounded-2xl shadow-2xl border border-gray-200 dark:border-gray-700 py-2 text-xs text-gray-700 dark:text-gray-200 animate-in fade-in",onClick:T=>T.stopPropagation(),children:[a.jsxs("button",{onClick:()=>{ee(b.event),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(dm,{className:"w-4 h-4 text-blue-500"}),a.jsx("span",{children:"Edit event"})]}),a.jsxs("button",{onClick:()=>{Ne(b.event),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left",children:[a.jsx(bo,{className:"w-4 h-4 text-amber-500"}),a.jsx("span",{children:"Duplicate event"})]}),a.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1"}),a.jsxs("button",{onClick:()=>{ge(b.event.id),U(null)},className:"w-full flex items-center space-x-2.5 px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-left text-red-600",children:[a.jsx(oa,{className:"w-4 h-4"}),a.jsx("span",{children:"Delete event"})]})]}),I&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs",children:a.jsxs("form",{onSubmit:xe,className:"w-full max-w-md rounded-3xl bg-white dark:bg-[#28292c] p-6 shadow-2xl border border-gray-200 dark:border-gray-700 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-base font-bold",children:X?"Edit Event":`Add Event — Aug ${be}, 2026`}),a.jsx("button",{type:"button",onClick:()=>K(!1),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700",children:a.jsx(wt,{className:"w-5 h-5 text-gray-400"})})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-500 mb-1",children:"Title"}),a.jsx("input",{type:"text",required:!0,value:L,onChange:T=>J(T.target.value),placeholder:"e.g. Omnio Team Standup",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-500 mb-1",children:"Time"}),a.jsx("input",{type:"text",value:ce,onChange:T=>fe(T.target.value),placeholder:"10:00 AM",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-500 mb-1",children:"Calendar"}),a.jsxs("select",{value:ke,onChange:T=>ie(T.target.value),className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`,children:[a.jsx("option",{value:"primary",children:"Komail Lalani (Primary)"}),a.jsx("option",{value:"family",children:"Family"}),a.jsx("option",{value:"tasks",children:"Tasks"})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-500 mb-1",children:"Location or Meeting Link"}),a.jsx("input",{type:"text",value:le,onChange:T=>ye(T.target.value),placeholder:"e.g. Conference Room A / Google Meet",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-semibold text-gray-500 mb-1.5",children:"Color Tag"}),a.jsx("div",{className:"flex space-x-2",children:[{name:"Blue",color:"bg-blue-600 text-white"},{name:"Emerald",color:"bg-emerald-600 text-white"},{name:"Amber",color:"bg-amber-600 text-white"},{name:"Indigo",color:"bg-indigo-600 text-white"},{name:"Purple",color:"bg-purple-600 text-white"}].map(T=>a.jsx("button",{type:"button",onClick:()=>$(T.color),className:`w-7 h-7 rounded-full ${T.color} flex items-center justify-center cursor-pointer ${re===T.color?"ring-2 ring-offset-2 ring-blue-500":""}`,children:re===T.color&&a.jsx(tt,{className:"w-3.5 h-3.5"})},T.name))})]}),a.jsxs("div",{className:"flex justify-between items-center pt-2",children:[X?a.jsx("button",{type:"button",onClick:()=>{ge(X),K(!1)},className:"px-3 py-2 rounded-xl text-xs font-semibold text-red-600 hover:bg-red-50 dark:hover:bg-red-950/40",children:"Delete"}):a.jsx("div",{}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx("button",{type:"button",onClick:()=>K(!1),className:"px-4 py-2 rounded-xl text-xs font-semibold text-gray-500",children:"Cancel"}),a.jsx("button",{type:"submit",className:"px-5 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-md",children:"Save Event"})]})]})]})}),de&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs",children:a.jsxs("form",{onSubmit:He,className:"w-full max-w-md rounded-3xl bg-white dark:bg-[#28292c] p-6 shadow-2xl border border-gray-200 dark:border-gray-700 space-y-4",children:[a.jsx("h3",{className:"font-bold text-base",children:"Add New Calendar"}),a.jsx("input",{type:"text",required:!0,value:oe,onChange:T=>A(T.target.value),placeholder:"e.g. Client Projects, Marketing",className:`w-full p-2.5 rounded-xl border text-xs outline-none ${c?"bg-[#1f1f1f] border-gray-700 text-gray-100":"bg-gray-50 border-gray-300 text-gray-800"}`}),a.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[a.jsx("button",{type:"button",onClick:()=>ue(!1),className:"px-4 py-2 rounded-xl text-xs font-semibold text-gray-500",children:"Cancel"}),a.jsx("button",{type:"submit",className:"px-5 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs shadow-md",children:"Create"})]})]})})]})},Px=[{id:"doc-1",title:"Provider Edition Onboarding Guide",content:"<h2>Provider Edition Onboarding</h2><p>This guide walks hosting partners through connecting cPanel/WHM to Omnio Mail with the zero-migration bridge.</p><ul><li>Install the WHM plugin</li><li>Verify Dovecot IMAP on port 993</li><li>Apply white-label branding</li></ul>",edited:"Edited 2 hours ago"},{id:"doc-2",title:"Q4 Architecture Review Notes",content:"<h2>Q4 Architecture Review</h2><p>BYOM cost model sign-off pending. Storage stays on host servers — Omnio caches metadata and index tables only.</p><p><b>Action items:</b> confirm Thursday 2 PM sync with Sarah.</p>",edited:"Edited yesterday"},{id:"doc-3",title:"Launch Announcement Draft",content:"<h1>Introducing Omnio Mail OS</h1><p>Secure, smart, and collaborative business mail — connect every account you already own.</p>",edited:"Edited Aug 3"}],ry=({darkMode:c,onBackToMail:h,onShowToast:S})=>{var ae;const[d,z]=m.useState(()=>{try{const L=localStorage.getItem("omnio_docs");return L?JSON.parse(L):Px}catch{return Px}}),[M,V]=m.useState(((ae=d[0])==null?void 0:ae.id)??""),[q,k]=m.useState(""),g=m.useRef(null),R=d.find(L=>L.id===M);m.useEffect(()=>{try{localStorage.setItem("omnio_docs",JSON.stringify(d))}catch{}},[d]),m.useEffect(()=>{g.current&&R&&(g.current.innerHTML=R.content)},[M]);const Q=L=>{z(J=>J.map(ce=>ce.id===M?{...ce,...L,edited:"Edited just now"}:ce))},W=()=>{const L={id:`doc-${Date.now()}`,title:"Untitled document",content:"<p></p>",edited:"Edited just now"};z(J=>[L,...J]),V(L.id)},I=(L,J)=>{J.stopPropagation();const ce=d.filter(fe=>fe.id!==L);z(ce),L===M&&ce.length>0&&V(ce[0].id),S("Document moved to trash.")},K=(L,J)=>{var ce;document.execCommand(L,!1,J),(ce=g.current)==null||ce.focus()},X=d.filter(L=>L.title.toLowerCase().includes(q.toLowerCase())),P=R?R.content.replace(/<[^>]*>/g," ").trim().split(/\s+/).filter(Boolean).length:0,be="p-1.5 rounded hover:bg-black/10 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 transition-colors cursor-pointer";return a.jsxs("div",{className:`h-screen w-screen flex flex-col overflow-hidden font-sans ${c?"bg-[#1f1f1f] text-gray-100":"bg-[#f6f8fc] text-gray-800"}`,children:[a.jsxs("header",{className:`flex items-center px-3 sm:px-4 h-16 shrink-0 border-b ${c?"border-gray-800 bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsxs("button",{onClick:h,className:"flex items-center space-x-1.5 p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 transition-colors cursor-pointer mr-2",title:"Back to Omnio Mail",children:[a.jsx(Es,{className:"w-5 h-5"}),a.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"Mail"})]}),a.jsxs("div",{className:"flex items-center space-x-2 mr-4 select-none",children:[a.jsx(Ms,{size:30,darkMode:c}),a.jsx("div",{className:"w-8 h-8 rounded-xl bg-blue-500 text-white flex items-center justify-center shadow-xs shrink-0",children:a.jsx(wa,{className:"w-4.5 h-4.5"})})]}),a.jsxs("div",{className:`flex-1 max-w-xl flex items-center px-4 h-11 rounded-full ${c?"bg-[#28292c]":"bg-[#eaf1fb]"}`,children:[a.jsx(_s,{className:"w-4 h-4 text-gray-500 mr-3 shrink-0"}),a.jsx("input",{value:q,onChange:L=>k(L.target.value),placeholder:"Search documents...",className:"bg-transparent outline-none text-sm w-full placeholder:text-gray-500"})]}),a.jsxs("div",{className:"ml-auto flex items-center space-x-2 text-xs text-gray-400",children:[a.jsx(Sn,{className:"w-4 h-4 text-emerald-500"}),a.jsx("span",{className:"hidden sm:inline",children:"All changes saved"})]})]}),a.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[a.jsxs("aside",{className:`w-64 shrink-0 border-r flex flex-col ${c?"border-gray-800 bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsx("div",{className:"p-3",children:a.jsxs("button",{onClick:W,className:"w-full flex items-center justify-center space-x-2 py-2.5 rounded-2xl bg-blue-600 hover:bg-blue-700 text-white text-sm font-semibold shadow-xs transition-colors cursor-pointer",children:[a.jsx(ba,{className:"w-4 h-4"}),a.jsx("span",{children:"New document"})]})}),a.jsxs("div",{className:"flex-1 overflow-y-auto px-2 pb-4 space-y-1",children:[X.map(L=>a.jsxs("div",{onClick:()=>V(L.id),className:`group flex items-start px-3 py-2.5 rounded-xl cursor-pointer transition-colors ${L.id===M?c?"bg-blue-900/30 text-blue-300":"bg-blue-50 text-blue-700":"hover:bg-black/5 dark:hover:bg-white/5 text-gray-700 dark:text-gray-300"}`,children:[a.jsx(wa,{className:`w-4 h-4 mt-0.5 mr-2.5 shrink-0 ${L.id===M?"text-blue-500":"text-gray-400"}`}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:L.title}),a.jsx("p",{className:"text-[11px] text-gray-400 truncate",children:L.edited})]}),a.jsx("button",{onClick:J=>I(L.id,J),className:"opacity-0 group-hover:opacity-100 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 text-gray-400 hover:text-rose-500 transition-all cursor-pointer",title:"Delete document",children:a.jsx(oa,{className:"w-3.5 h-3.5"})})]},L.id)),X.length===0&&a.jsx("p",{className:"text-xs text-gray-400 text-center py-8",children:"No documents found"})]})]}),a.jsx("main",{className:"flex-1 flex flex-col overflow-hidden",children:R?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`flex items-center px-4 py-1.5 space-x-1 border-b shrink-0 overflow-x-auto no-scrollbar ${c?"border-gray-800 bg-[#232427]":"border-gray-200 bg-white"}`,children:[a.jsx("button",{className:be,title:"Undo",onClick:()=>K("undo"),children:a.jsx(ym,{className:"w-4 h-4"})}),a.jsx("button",{className:be,title:"Redo",onClick:()=>K("redo"),children:a.jsx(um,{className:"w-4 h-4"})}),a.jsx("div",{className:"w-px h-5 bg-gray-200 dark:bg-gray-700 mx-1"}),a.jsx("button",{className:be,title:"Bold",onClick:()=>K("bold"),children:a.jsx(lm,{className:"w-4 h-4"})}),a.jsx("button",{className:be,title:"Italic",onClick:()=>K("italic"),children:a.jsx(im,{className:"w-4 h-4"})}),a.jsx("button",{className:be,title:"Underline",onClick:()=>K("underline"),children:a.jsx(pm,{className:"w-4 h-4"})}),a.jsx("div",{className:"w-px h-5 bg-gray-200 dark:bg-gray-700 mx-1"}),a.jsx("button",{className:be,title:"Bulleted list",onClick:()=>K("insertUnorderedList"),children:a.jsx(Co,{className:"w-4 h-4"})}),a.jsx("button",{className:be,title:"Numbered list",onClick:()=>K("insertOrderedList"),children:a.jsx(cm,{className:"w-4 h-4"})}),a.jsx("div",{className:"w-px h-5 bg-gray-200 dark:bg-gray-700 mx-1"}),a.jsx("button",{className:be,title:"Align left",onClick:()=>K("justifyLeft"),children:a.jsx(gm,{className:"w-4 h-4"})}),a.jsx("button",{className:be,title:"Align center",onClick:()=>K("justifyCenter"),children:a.jsx(hm,{className:"w-4 h-4"})}),a.jsx("button",{className:be,title:"Align right",onClick:()=>K("justifyRight"),children:a.jsx(bm,{className:"w-4 h-4"})}),a.jsx("div",{className:"flex-1"}),a.jsxs("span",{className:"text-[11px] text-gray-400 whitespace-nowrap pl-2",children:[P," words"]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto py-6 px-4",children:a.jsxs("div",{className:`max-w-3xl mx-auto rounded-xl shadow-sm border min-h-full px-10 sm:px-14 py-10 ${c?"bg-[#28292c] border-gray-800":"bg-white border-gray-200"}`,children:[a.jsx("input",{value:R.title,onChange:L=>Q({title:L.target.value}),className:"w-full bg-transparent outline-none text-3xl font-bold mb-6 placeholder:text-gray-300",placeholder:"Untitled document"}),a.jsx("div",{ref:g,contentEditable:!0,suppressContentEditableWarning:!0,onInput:L=>Q({content:L.target.innerHTML}),className:"outline-none min-h-[50vh] text-[15px] leading-relaxed prose-headings:font-bold [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-3 [&_h2]:text-xl [&_h2]:font-bold [&_h2]:mb-2 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:list-decimal [&_ol]:pl-6 [&_p]:mb-2"})]})})]}):a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-gray-400",children:[a.jsx(wa,{className:"w-14 h-14 mb-3 stroke-1"}),a.jsx("p",{className:"font-semibold",children:"No document selected"}),a.jsx("p",{className:"text-sm mt-1",children:"Create a new document to get started."})]})})]})]})},Cn=["A","B","C","D","E","F","G","H"],iy=30,Fx={A1:"BYOM Cost Model — Provider Edition",A3:"Item",B3:"Monthly $",C3:"Notes",A4:"Cloud storage (avoided)",B4:"14200",C4:"Mail stays on host servers",A5:"Metadata cache",B5:"820",C5:"Fast index tables only",A6:"Gemini API proxy",B6:"390",C6:"Server-side keys",A7:"CDN + edge",B7:"240",A9:"Total run cost",B9:"=SUM(B5:B7)"},No=(c,h,S=0)=>{if(!c.startsWith("=")||S>4)return c;let d=c.slice(1).toUpperCase();if(d=d.replace(/SUM\(([A-H])(\d+):([A-H])(\d+)\)/g,(z,M,V,q,k)=>{let g=0;const R=Cn.indexOf(M),Q=Cn.indexOf(q);for(let W=Math.min(R,Q);W<=Math.max(R,Q);W++)for(let I=Math.min(+V,+k);I<=Math.max(+V,+k);I++){const K=No(h[`${Cn[W]}${I}`]||"",h,S+1),X=parseFloat(K);isNaN(X)||(g+=X)}return String(g)}),d=d.replace(/([A-H])(\d+)/g,(z,M,V)=>{const q=No(h[`${M}${V}`]||"0",h,S+1),k=parseFloat(q);return isNaN(k)?"0":String(k)}),!/^[\d+\-*/().\s]+$/.test(d))return"#ERROR";try{const z=Function(`"use strict"; return (${d})`)();return typeof z=="number"&&isFinite(z)?String(z):"#ERROR"}catch{return"#ERROR"}},cy=({darkMode:c,onBackToMail:h,onShowToast:S})=>{const[d,z]=m.useState(()=>{try{const I=localStorage.getItem("omnio_sheet_cells");return I?JSON.parse(I):Fx}catch{return Fx}}),[M,V]=m.useState("A1"),[q,k]=m.useState("BYOM Cost Model");m.useEffect(()=>{try{localStorage.setItem("omnio_sheet_cells",JSON.stringify(d))}catch{}},[d]);const g=d[M]||"",R=M.charAt(0),Q=M.slice(1),W=(I,K)=>{z(X=>{const P={...X};return K===""?delete P[I]:P[I]=K,P})};return a.jsxs("div",{className:`h-screen w-screen flex flex-col overflow-hidden font-sans ${c?"bg-[#1f1f1f] text-gray-100":"bg-[#f6f8fc] text-gray-800"}`,children:[a.jsxs("header",{className:`flex items-center px-3 sm:px-4 h-16 shrink-0 border-b ${c?"border-gray-800 bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsxs("button",{onClick:h,className:"flex items-center space-x-1.5 p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 transition-colors cursor-pointer mr-2",title:"Back to Omnio Mail",children:[a.jsx(Es,{className:"w-5 h-5"}),a.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"Mail"})]}),a.jsxs("div",{className:"flex items-center space-x-2 mr-4 select-none",children:[a.jsx(Ms,{size:30,darkMode:c}),a.jsx("div",{className:"w-8 h-8 rounded-xl bg-emerald-500 text-white flex items-center justify-center shadow-xs shrink-0",children:a.jsx(nm,{className:"w-4.5 h-4.5"})})]}),a.jsx("input",{value:q,onChange:I=>k(I.target.value),className:`bg-transparent outline-none text-sm font-semibold rounded-lg px-2 py-1 border border-transparent focus:border-emerald-400 transition-colors max-w-[220px] ${c?"hover:bg-white/5":"hover:bg-gray-100"}`}),a.jsxs("div",{className:"ml-auto flex items-center space-x-2 text-xs text-gray-400",children:[a.jsx(Sn,{className:"w-4 h-4 text-emerald-500"}),a.jsx("span",{className:"hidden sm:inline",children:"All changes saved"})]})]}),a.jsxs("div",{className:`flex items-center px-4 py-1.5 space-x-3 border-b shrink-0 text-sm ${c?"border-gray-800 bg-[#232427]":"border-gray-200 bg-white"}`,children:[a.jsx("span",{className:`w-14 text-center text-xs font-bold rounded-md py-1 ${c?"bg-white/5 text-gray-300":"bg-gray-100 text-gray-600"}`,children:M}),a.jsx(Pg,{className:"w-4 h-4 text-gray-400 shrink-0"}),a.jsx("input",{value:g,onChange:I=>W(M,I.target.value),placeholder:"Enter a value or formula, e.g. =SUM(B5:B7)",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-gray-400"})]}),a.jsx("div",{className:"flex-1 overflow-auto",children:a.jsxs("table",{className:"border-collapse select-none",style:{tableLayout:"fixed"},children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:`sticky top-0 left-0 z-20 w-12 h-7 border text-[11px] font-normal ${c?"bg-[#28292c] border-gray-700 text-gray-500":"bg-gray-100 border-gray-300 text-gray-500"}`}),Cn.map(I=>a.jsx("th",{className:`sticky top-0 z-10 h-7 border text-[11px] font-semibold ${R===I?c?"bg-emerald-900/50 border-gray-700 text-emerald-300":"bg-emerald-100 border-gray-300 text-emerald-700":c?"bg-[#28292c] border-gray-700 text-gray-400":"bg-gray-100 border-gray-300 text-gray-600"}`,style:{width:I==="A"?220:130},children:I},I))]})}),a.jsx("tbody",{children:Array.from({length:iy},(I,K)=>K+1).map(I=>a.jsxs("tr",{children:[a.jsx("td",{className:`sticky left-0 z-10 w-12 h-7 border text-center text-[11px] ${Q===String(I)?c?"bg-emerald-900/50 border-gray-700 text-emerald-300 font-semibold":"bg-emerald-100 border-gray-300 text-emerald-700 font-semibold":c?"bg-[#28292c] border-gray-700 text-gray-500":"bg-gray-100 border-gray-300 text-gray-500"}`,children:I}),Cn.map(K=>{const X=`${K}${I}`,P=d[X]||"",be=M===X,ae=be?P:No(P,d),L=!be&&ae!==""&&!isNaN(parseFloat(ae))&&/^-?[\d.]+$/.test(ae.trim());return a.jsx("td",{className:`h-7 border p-0 ${c?"border-gray-800":"border-gray-200"} ${be?"outline outline-2 outline-emerald-500 -outline-offset-1":""}`,children:a.jsx("input",{value:ae,onFocus:()=>V(X),onChange:J=>W(X,J.target.value),className:`w-full h-full px-1.5 bg-transparent outline-none text-xs truncate ${L?"text-right":"text-left"} ${I===1?"font-bold":""} ${I===3?"font-semibold":""}`})},X)})]},I))})]})}),a.jsxs("div",{className:`flex items-center px-3 py-1 space-x-1 border-t shrink-0 text-xs ${c?"border-gray-800 bg-[#232427]":"border-gray-200 bg-white"}`,children:[a.jsx("button",{onClick:()=>S("Multiple sheets coming soon."),className:"p-1.5 rounded hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:"Add sheet",children:a.jsx(ba,{className:"w-4 h-4"})}),a.jsx("div",{className:`px-4 py-1.5 rounded-t-lg font-semibold border-b-2 border-emerald-500 ${c?"bg-white/5 text-emerald-300":"bg-emerald-50 text-emerald-700"}`,children:"Sheet1"})]})]})},Cs={default:{light:"bg-white border-gray-200",dark:"bg-[#28292c] border-gray-700"},amber:{light:"bg-amber-50 border-amber-200",dark:"bg-amber-900/25 border-amber-700/50"},rose:{light:"bg-rose-50 border-rose-200",dark:"bg-rose-900/25 border-rose-700/50"},sky:{light:"bg-sky-50 border-sky-200",dark:"bg-sky-900/25 border-sky-700/50"},emerald:{light:"bg-emerald-50 border-emerald-200",dark:"bg-emerald-900/25 border-emerald-700/50"},violet:{light:"bg-violet-50 border-violet-200",dark:"bg-violet-900/25 border-violet-700/50"}},em={default:"bg-gray-200 dark:bg-gray-600",amber:"bg-amber-300",rose:"bg-rose-300",sky:"bg-sky-300",emerald:"bg-emerald-300",violet:"bg-violet-300"},tm=[{id:"note-1",title:"HostingGlobe pilot",body:"Sign MSA before Friday. Kickoff call tomorrow 10 AM with Marcus Vance — demo the WHM zero-migration bridge.",color:"amber",pinned:!0,edited:"Edited 1 hour ago"},{id:"note-2",title:"Inbox redesign follow-ups",body:`Unread-only toggle for smart tabs
Stack auto-collapse after read
Keyboard nav (j/k)`,color:"violet",pinned:!0,edited:"Edited today"},{id:"note-3",title:"Groceries",body:"Coffee beans, oat milk, dates, pistachios",color:"emerald",pinned:!1,edited:"Edited yesterday"},{id:"note-4",title:"",body:"Idea: Provider Edition case study with CloudServerHost — 1,420 mailboxes, zero migration, before/after screenshots of Roundcube vs Omnio.",color:"sky",pinned:!1,edited:"Edited Aug 3"}],oy=({darkMode:c,onBackToMail:h,onShowToast:S})=>{const[d,z]=m.useState(()=>{try{const $=localStorage.getItem("omnio_keep_notes");return $?JSON.parse($):tm}catch{return tm}}),[M,V]=m.useState(""),[q,k]=m.useState(!1),[g,R]=m.useState(""),[Q,W]=m.useState(""),[I,K]=m.useState("default"),[X,P]=m.useState(null),be=m.useRef(null);m.useEffect(()=>{try{localStorage.setItem("omnio_keep_notes",JSON.stringify(d))}catch{}},[d]),m.useEffect(()=>{const $=()=>P(null);return window.addEventListener("click",$),()=>window.removeEventListener("click",$)},[]);const ae=()=>{if(!g.trim()&&!Q.trim()){k(!1);return}const $={id:`note-${Date.now()}`,title:g.trim(),body:Q.trim(),color:I,pinned:!1,edited:"Edited just now"};z(de=>[$,...de]),R(""),W(""),K("default"),k(!1),S("Note added.")},L=$=>{z(de=>de.map(ue=>ue.id===$?{...ue,pinned:!ue.pinned}:ue))},J=$=>{z(de=>de.filter(ue=>ue.id!==$)),S("Note deleted.")},ce=($,de)=>{z(ue=>ue.map(oe=>oe.id===$?{...oe,color:de}:oe)),P(null)},fe=M.toLowerCase(),le=d.filter($=>$.title.toLowerCase().includes(fe)||$.body.toLowerCase().includes(fe)),ye=le.filter($=>$.pinned),ke=le.filter($=>!$.pinned),ie=$=>{var de,ue;return c?((de=Cs[$])==null?void 0:de.dark)??Cs.default.dark:((ue=Cs[$])==null?void 0:ue.light)??Cs.default.light},re=$=>a.jsxs("div",{className:`group relative break-inside-avoid mb-4 rounded-2xl border p-4 shadow-xs hover:shadow-md transition-shadow ${ie($.color)}`,children:[a.jsx("button",{onClick:()=>L($.id),className:`absolute top-2.5 right-2.5 p-1.5 rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-all cursor-pointer ${$.pinned?"text-amber-500":"text-gray-400 opacity-0 group-hover:opacity-100"}`,title:$.pinned?"Unpin note":"Pin note",children:$.pinned?a.jsx(Tg,{className:"w-4 h-4 fill-current"}):a.jsx(Eg,{className:"w-4 h-4"})}),$.title&&a.jsx("h3",{className:"font-semibold text-sm mb-1.5 pr-8",children:$.title}),a.jsx("p",{className:"text-[13px] whitespace-pre-wrap leading-relaxed text-gray-700 dark:text-gray-300",children:$.body}),a.jsxs("div",{className:"flex items-center justify-between mt-3 pt-1",children:[a.jsx("span",{className:"text-[10px] text-gray-400",children:$.edited}),a.jsxs("div",{className:"flex items-center space-x-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:de=>{de.stopPropagation(),P(X===$.id?null:$.id)},className:"p-1.5 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 cursor-pointer",title:"Change color",children:a.jsx(Ng,{className:"w-3.5 h-3.5"})}),X===$.id&&a.jsx("div",{onClick:de=>de.stopPropagation(),className:`absolute bottom-8 right-0 z-20 flex items-center space-x-1.5 p-2 rounded-xl shadow-xl border ${c?"bg-[#28292c] border-gray-700":"bg-white border-gray-200"}`,children:Object.keys(Cs).map(de=>a.jsx("button",{onClick:()=>ce($.id,de),className:`w-6 h-6 rounded-full ${em[de]} border-2 transition-transform hover:scale-110 cursor-pointer ${$.color===de?"border-gray-500":"border-transparent"}`,title:de},de))})]}),a.jsx("button",{onClick:()=>J($.id),className:"p-1.5 rounded-full hover:bg-black/10 dark:hover:bg-white/10 text-gray-500 hover:text-rose-500 cursor-pointer",title:"Delete note",children:a.jsx(oa,{className:"w-3.5 h-3.5"})})]})]})]},$.id);return a.jsxs("div",{className:`h-screen w-screen flex flex-col overflow-hidden font-sans ${c?"bg-[#1f1f1f] text-gray-100":"bg-[#f6f8fc] text-gray-800"}`,children:[a.jsxs("header",{className:`flex items-center px-3 sm:px-4 h-16 shrink-0 border-b ${c?"border-gray-800 bg-[#1f1f1f]":"border-gray-200 bg-white"}`,children:[a.jsxs("button",{onClick:h,className:"flex items-center space-x-1.5 p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300 transition-colors cursor-pointer mr-2",title:"Back to Omnio Mail",children:[a.jsx(Es,{className:"w-5 h-5"}),a.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"Mail"})]}),a.jsxs("div",{className:"flex items-center space-x-2 mr-4 select-none",children:[a.jsx(Ms,{size:30,darkMode:c}),a.jsx("div",{className:"w-8 h-8 rounded-xl bg-amber-500 text-white flex items-center justify-center shadow-xs shrink-0",children:a.jsx(Yx,{className:"w-4.5 h-4.5"})})]}),a.jsxs("div",{className:`flex-1 max-w-xl flex items-center px-4 h-11 rounded-full ${c?"bg-[#28292c]":"bg-[#eaf1fb]"}`,children:[a.jsx(_s,{className:"w-4 h-4 text-gray-500 mr-3 shrink-0"}),a.jsx("input",{value:M,onChange:$=>V($.target.value),placeholder:"Search notes...",className:"bg-transparent outline-none text-sm w-full placeholder:text-gray-500"})]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto px-4 sm:px-8 py-6",children:[a.jsx("div",{ref:be,className:`max-w-xl mx-auto mb-8 rounded-2xl border shadow-sm transition-all ${ie(I)}`,children:q?a.jsxs("div",{className:"p-4",children:[a.jsx("input",{value:g,onChange:$=>R($.target.value),placeholder:"Title",autoFocus:!0,className:"w-full bg-transparent outline-none font-semibold text-sm mb-2 placeholder:text-gray-400"}),a.jsx("textarea",{value:Q,onChange:$=>W($.target.value),placeholder:"Take a note...",rows:3,className:"w-full bg-transparent outline-none text-[13px] resize-none placeholder:text-gray-400"}),a.jsxs("div",{className:"flex items-center justify-between mt-2",children:[a.jsx("div",{className:"flex items-center space-x-1.5",children:Object.keys(Cs).map($=>a.jsx("button",{onClick:()=>K($),className:`w-5 h-5 rounded-full ${em[$]} border-2 transition-transform hover:scale-110 cursor-pointer ${I===$?"border-gray-500":"border-transparent"}`,title:$},$))}),a.jsx("button",{onClick:ae,className:"px-4 py-1.5 rounded-full bg-amber-500 hover:bg-amber-600 text-white text-xs font-semibold transition-colors cursor-pointer",children:"Done"})]})]}):a.jsxs("button",{onClick:()=>k(!0),className:"w-full flex items-center px-4 py-3.5 text-sm text-gray-400 cursor-text",children:[a.jsx(ba,{className:"w-4 h-4 mr-2"}),"Take a note..."]})}),le.length===0?a.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-gray-400",children:[a.jsx(Yx,{className:"w-14 h-14 mb-3 stroke-1"}),a.jsx("p",{className:"font-semibold",children:"No notes found"}),a.jsx("p",{className:"text-sm mt-1",children:"Notes you add appear here."})]}):a.jsxs("div",{className:"max-w-6xl mx-auto",children:[ye.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-gray-400 mb-3 px-1",children:"Pinned"}),a.jsx("div",{className:"columns-1 sm:columns-2 lg:columns-3 xl:columns-4 gap-4 mb-6",children:ye.map(re)})]}),ke.length>0&&a.jsxs(a.Fragment,{children:[ye.length>0&&a.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-gray-400 mb-3 px-1",children:"Others"}),a.jsx("div",{className:"columns-1 sm:columns-2 lg:columns-3 xl:columns-4 gap-4",children:ke.map(re)})]})]})]})]})};function dy(){var da;const[c,h]=m.useState(!1),[S,d]=m.useState(()=>{try{const v=localStorage.getItem("omnio_saved_accounts");return v?JSON.parse(v):Ix}catch{return Ix}});bl.useEffect(()=>{try{localStorage.setItem("omnio_saved_accounts",JSON.stringify(S))}catch(v){console.error("Failed to save accounts to localStorage",v)}},[S]);const[z,M]=m.useState("all"),[V,q]=m.useState(Xp),[k,g]=m.useState("inbox"),[R,Q]=m.useState("primary"),[W,I]=m.useState(void 0),[K,X]=m.useState(null),[P,be]=m.useState({query:"",category:"all"}),[ae,L]=m.useState("mail"),[J,ce]=m.useState(!0),[fe,le]=m.useState(!1),[ye,ke]=m.useState(!1),[ie,re]=m.useState(!1),[$,de]=m.useState(!1),[ue,oe]=m.useState(!1),[A,b]=m.useState(!1),[U,G]=m.useState("copilot"),[se,u]=m.useState(!0);bl.useEffect(()=>{c?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[c]);const p=()=>{h(v=>!v)},[Y,ee]=m.useState(null),[xe,ge]=m.useState(()=>{try{return localStorage.getItem("omnio_user_plan")||"free"}catch{return"free"}}),Ne=v=>{ge(v);try{localStorage.setItem("omnio_user_plan",v)}catch(F){console.error(F)}Se(`Switched plan to ${v.toUpperCase()}!`)},Se=v=>{ee(v),setTimeout(()=>{ee(null)},3500)},He=v=>{d(F=>[...F,v]),M(v.id)},[te,y]=m.useState(null),[me,ve]=m.useState(!1),Ee=()=>ve(!0),_e=async()=>{try{await Na.disconnect()}catch{}try{localStorage.removeItem("omnio_demo_mode"),localStorage.removeItem("omnio_saved_accounts")}catch{}window.location.reload()},T=v=>{var F;return{id:`real-${v.email}`,email:v.email||"",name:v.displayName||((F=v.email)==null?void 0:F.split("@")[0])||"Mailbox",provider:"cpanel",providerDisplayName:"Live IMAP Mailbox",isDefault:!0,unreadCount:0,status:"connected",serverHost:v.imapHost}},Re=bl.useCallback(async(v,F)=>{he(!0);try{const{messages:ne}=await Na.messages(v,50),we=`real-${F}`,Ye=ne.map(Pe=>jm(Pe,we,F,v));q(Pe=>[...Pe.filter(dt=>dt.imapUid===void 0||dt.imapFolder!==v),...Ye])}catch(ne){Se(`Mail sync failed: ${(ne==null?void 0:ne.message)||"server error"}`)}finally{he(!1)}},[]),Ie=bl.useCallback(v=>{y(v);const F=T(v);d([F]),M(F.id),q([]),X(null),ce(!1),Re("inbox",v.email||"")},[Re]);bl.useEffect(()=>{Na.status().then(v=>{v.connected&&Ie(v)}).catch(()=>{})},[]),bl.useEffect(()=>{if(!(te!=null&&te.connected))return;const F=["inbox","sent","drafts","trash","spam"].includes(k)?k:"inbox";Re(F,te.email||"")},[te==null?void 0:te.email,k]);const ct=v=>{const F=S.find(we=>we.id===v.accountId)||S[0],ne=v.id||"draft_"+Date.now();q(we=>{const Ye=we.findIndex(dt=>dt.id===ne),Pe={id:ne,threadId:v.threadId||"thread_"+Date.now(),accountId:(F==null?void 0:F.id)||"acc_1",accountEmail:(F==null?void 0:F.email)||"me@example.com",senderName:(F==null?void 0:F.name)||"Me",senderEmail:(F==null?void 0:F.email)||"me@example.com",recipients:v.recipients||[],subject:v.subject||"(no subject)",snippet:v.snippet||(v.body?v.body.replace(/<[^>]*>?/gm,"").substring(0,90):"Draft message"),body:v.body||"",date:"Draft",timestamp:Date.now(),unread:!1,starred:!1,snoozed:!1,important:!1,category:"primary",labels:["drafts"],attachments:v.attachments||[]};if(Ye>=0){const dt=[...we];return dt[Ye]=Pe,dt}return[Pe,...we]})},[D,he]=m.useState(!1),ze=()=>{if(te!=null&&te.connected){const F=["inbox","sent","drafts","trash","spam"].includes(k)?k:"inbox";Re(F,te.email||"");return}he(!0),setTimeout(()=>{he(!1),Se("Mailboxes synced: 0 new messages")},1200)},kt=(v,F)=>{F==null||F.stopPropagation();const ne=V.find(we=>we.id===v);ne!=null&&ne.imapUid&&ne.imapFolder&&Na.setFlag(ne.imapFolder,ne.imapUid,"flagged",!ne.starred).catch(()=>Se("Could not update star on server.")),q(we=>we.map(Ye=>Ye.id===v?{...Ye,starred:!Ye.starred}:Ye)),K&&K.id===v&&X(we=>we?{...we,starred:!we.starred}:null)},Xe=(v,F)=>{F==null||F.stopPropagation();const ne=V.find(we=>we.id===v);ne!=null&&ne.imapUid&&ne.imapFolder&&Na.setFlag(ne.imapFolder,ne.imapUid,"seen",ne.unread).catch(()=>Se("Could not update read state on server.")),q(we=>we.map(Ye=>Ye.id===v?{...Ye,unread:!Ye.unread}:Ye))},Ot=(v,F)=>{F==null||F.stopPropagation();const ne=V.find(we=>we.id===v);ne!=null&&ne.imapUid&&ne.imapFolder&&Na.delete(ne.imapFolder,ne.imapUid).catch(()=>Se("Could not delete on server.")),q(we=>we.filter(Ye=>Ye.id!==v)),K&&K.id===v&&X(null)},Qe=v=>{X(v),v.unread&&Xe(v.id),v.imapUid&&v.imapFolder&&!v.body&&Na.message(v.imapFolder,v.imapUid).then(F=>{X(ne=>ne&&ne.id===v.id?{...ne,body:F.text||"(no text content)",bodyHtml:F.html||void 0,attachments:F.attachments.map((we,Ye)=>({id:`att-${v.imapUid}-${Ye}`,fileName:we.fileName,fileSize:we.fileSize,fileType:/pdf/i.test(we.contentType)?"pdf":/image/i.test(we.contentType)?"image":/sheet|excel|csv/i.test(we.contentType)?"sheet":/zip/i.test(we.contentType)?"zip":"doc"}))}:ne),q(ne=>ne.map(we=>we.id===v.id?{...we,body:F.text||""}:we))}).catch(()=>Se("Could not load message body."))},Qa=v=>{var we,Ye;te!=null&&te.connected&&Na.send({to:(v.recipients||[]).join(", "),cc:(we=v.cc)==null?void 0:we.join(", "),bcc:(Ye=v.bcc)==null?void 0:Ye.join(", "),subject:v.subject||"(no subject)",text:(v.body||"").replace(/<[^>]*>?/gm,"")}).then(()=>Se(`Sent via ${te.imapHost||"your mail server"} ✓`)).catch(Pe=>Se(`Send failed: ${(Pe==null?void 0:Pe.message)||"SMTP error"}`));const F=S.find(Pe=>Pe.id===v.accountId)||S[0],ne={id:"msg_"+Date.now(),threadId:"thread_"+Date.now(),accountId:(F==null?void 0:F.id)||"acc_1",accountEmail:(F==null?void 0:F.email)||"me@example.com",senderName:(F==null?void 0:F.name)||"Me",senderEmail:(F==null?void 0:F.email)||"me@example.com",recipients:v.recipients||[],subject:v.subject||"(no subject)",snippet:v.snippet||(v.body?v.body.replace(/<[^>]*>?/gm,"").substring(0,90):""),body:v.body||"",date:"Just now",timestamp:Date.now(),unread:!1,starred:!1,snoozed:!1,important:!1,category:"primary",labels:["sent"],attachments:[]};q(Pe=>[ne,...Pe])},ga=v=>{q(F=>F.filter(ne=>!v.includes(ne.id))),K&&v.includes(K.id)&&X(null)},Ts=(v,F)=>{q(ne=>ne.map(we=>v.includes(we.id)?{...we,unread:!F}:we))},ka=v=>{q(F=>F.map(ne=>v.includes(ne.id)?{...ne,labels:ne.labels.filter(we=>we!=="inbox")}:ne)),K&&v.includes(K.id)&&X(null)},$l=(v,F)=>{q(ne=>ne.map(we=>v.includes(we.id)?{...we,starred:F}:we))},yl=(v,F,ne)=>{q(Ye=>Ye.map(Pe=>{if(!v.includes(Pe.id))return Pe;let dt={...Pe};if(F==="custom-label"&&ne){const Me=Pe.labels.includes(ne)?Pe.labels:[...Pe.labels,ne];return{...dt,labels:Me}}return F==="starred"?{...dt,starred:!0}:F==="important"?{...dt,important:!0}:F==="snoozed"?{...dt,snoozed:!0}:F==="purchases"?{...dt,category:"primary",labels:[...Pe.labels.filter(Me=>Me!=="trash"&&Me!=="spam"),"purchases"]}:["primary","promotions","social","updates","forums"].includes(F)?{...dt,category:F}:{...dt,labels:[F]}}));const we=F==="custom-label"&&ne?ne:F;Se(`Moved ${v.length} conversation${v.length>1?"s":""} to ${we}`)},Pt=v=>{be(F=>({...F,...v})),X(null),de(!1),L("mail")},vt=m.useMemo(()=>V.filter(v=>{if(z!=="all"&&v.accountId!==z)return!1;if(!!(P.query&&P.query.trim().length>0||P.from&&P.from.trim().length>0||P.subject&&P.subject.trim().length>0||P.hasAttachment)){if(k==="trash"&&!v.labels.includes("trash")||k==="spam"&&!v.labels.includes("spam")||k!=="trash"&&k!=="spam"&&(v.labels.includes("trash")||v.labels.includes("spam")))return!1}else if(k==="inbox"){if(!v.labels.includes("inbox"))return!1}else if(k==="starred"){if(!v.starred)return!1}else if(k==="snoozed"){if(!v.snoozed)return!1}else if(k==="sent"){if(!v.labels.includes("sent"))return!1}else if(k==="drafts"){if(!v.labels.includes("drafts"))return!1}else if(k==="important"){if(!v.important)return!1}else if(k==="purchases"){if(!v.labels.includes("purchases"))return!1}else if(k==="social"){if(v.category!=="social"&&!v.labels.includes("social"))return!1}else if(k==="updates"){if(v.category!=="updates"&&!v.labels.includes("updates"))return!1}else if(k==="forums"){if(v.category!=="forums"&&!v.labels.includes("forums"))return!1}else if(k==="promotions"){if(v.category!=="promotions"&&!v.labels.includes("promotions"))return!1}else if(k==="spam"){if(!v.labels.includes("spam"))return!1}else if(k==="trash"){if(!v.labels.includes("trash"))return!1}else if(k==="scheduled"){if(!v.labels.includes("scheduled"))return!1}else if(k==="custom-label"&&W&&!v.labels.includes(W))return!1;if(P.query&&P.query.trim()){const ne=P.query.toLowerCase().trim(),we=v.subject.toLowerCase().includes(ne),Ye=v.senderName.toLowerCase().includes(ne)||v.senderEmail.toLowerCase().includes(ne),Pe=v.snippet.toLowerCase().includes(ne),dt=v.body?v.body.toLowerCase().includes(ne):!1,_=v.recipients?v.recipients.some(Me=>Me.toLowerCase().includes(ne)):!1;if(!we&&!Ye&&!Pe&&!dt&&!_)return!1}if(P.from&&P.from.trim()){const ne=P.from.toLowerCase().trim();if(!v.senderName.toLowerCase().includes(ne)&&!v.senderEmail.toLowerCase().includes(ne))return!1}return!(P.subject&&P.subject.trim()&&!v.subject.toLowerCase().includes(P.subject.toLowerCase().trim())||P.hasAttachment&&(!v.attachments||v.attachments.length===0))}),[V,z,k,R,W,P]),We=(v,F)=>{g(v),["primary","promotions","social","updates","forums"].includes(v)&&Q(v),I(F),X(null),de(!1)},St=V.filter(v=>v.labels.includes("inbox")&&v.unread).length,vl=V.filter(v=>v.starred).length,zs=V.filter(v=>v.labels.includes("drafts")).length,Sa=S.find(v=>v.id===z);return J?a.jsx(ey,{onLaunchApp:()=>ce(!1),onSignIn:()=>{ve(!1),ce(!1)},onOpenPlans:()=>re(!0),onOpenConnectAccount:()=>{ce(!1),ke(!0)}}):!(te!=null&&te.connected)&&!me?a.jsx(ly,{onSignedIn:v=>Ie(v),onDemo:Ee,onBackToLanding:()=>ce(!0)}):ae==="drive"?a.jsx(sy,{darkMode:c,onBackToMail:()=>L("mail"),onShowToast:Se,userPlan:xe,onOpenPlansModal:()=>re(!0)}):ae==="calendar"?a.jsx(ny,{darkMode:c,onBackToMail:()=>L("mail"),onShowToast:Se}):ae==="docs"?a.jsx(ry,{darkMode:c,onBackToMail:()=>L("mail"),onShowToast:Se}):ae==="sheets"?a.jsx(cy,{darkMode:c,onBackToMail:()=>L("mail"),onShowToast:Se}):ae==="keep"?a.jsx(oy,{darkMode:c,onBackToMail:()=>L("mail"),onShowToast:Se}):a.jsxs("div",{className:`h-screen w-screen flex flex-col overflow-hidden font-sans ${c?"bg-[#1f1f1f] text-gray-100":"bg-[#f6f8fc] text-gray-800"}`,children:[a.jsx(Hp,{darkMode:c,onToggleDarkMode:p,searchFilter:P,onSearchChange:Pt,accounts:S,activeAccountId:z,onSelectAccount:v=>{M(v),X(null)},onOpenConnectModal:()=>ke(!0),onOpenPlansModal:()=>re(!0),onOpenProviderView:()=>{de(!0),X(null)},onOpenDriveView:()=>{L("drive"),X(null)},onOpenCalendarView:()=>{L("calendar"),X(null)},onOpenDocsView:()=>{L("docs"),X(null)},onOpenSheetsView:()=>{L("sheets"),X(null)},onOpenKeepView:()=>{L("keep"),X(null)},onToggleCopilot:()=>{G("copilot"),b(!A)},isCopilotOpen:A&&U==="copilot",onToggleSidebar:()=>u(!se),onOpenLandingPage:()=>ce(!0),onOpenAdminDashboard:()=>oe(!0),onSignOut:_e,onShowToast:Se,userPlan:xe}),a.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[a.jsx(Up,{darkMode:c,activeFolder:k,onSelectFolder:We,activeCustomLabel:W,totalUnreadCount:St,starredCount:vl,draftsCount:zs,onOpenCompose:()=>le(!0),accounts:S,activeAccountId:z,onSelectAccount:v=>{M(v),X(null)},onOpenConnectModal:()=>ke(!0),onOpenPlansModal:()=>re(!0),onOpenProviderView:()=>{de(!0),X(null)},isOpen:se,onToggleSidebar:()=>u(!se),onMoveEmailsToFolder:yl,emails:V}),a.jsx("main",{className:"flex-1 flex flex-col h-full overflow-hidden bg-[#f6f8fc] dark:bg-[#1f1f1f] p-1 sm:p-2 sm:pl-0",children:$?a.jsx(Jp,{darkMode:c,onBack:()=>de(!1),onAddAccount:He,onSelectAccount:v=>{M(v),X(null)},onShowToast:Se}):K?a.jsx(Lp,{darkMode:c,email:K,onBack:()=>X(null),onDelete:Ot,onToggleStar:kt,account:S.find(v=>v.id===K.accountId),onOpenComposeReply:()=>le(!0),onAddTaskFromEmail:v=>{G("tasks"),b(!0),Se(`Task created: "${v}"`)},onArchiveEmail:v=>ka([v]),onMarkUnreadEmail:v=>Xe(v)}):a.jsx(Bp,{darkMode:c,emails:vt,selectedEmailId:K==null?void 0:K.id,onSelectEmail:Qe,onToggleStar:kt,onToggleUnread:Xe,onDeleteEmail:Ot,onBulkDelete:ga,onBulkMarkRead:Ts,onBulkArchive:ka,onBulkStar:$l,activeCategory:R,onChangeCategory:v=>{Q(v),(k==="inbox"||["social","promotions","updates","forums","primary"].includes(k))&&g(v),X(null)},activeFolder:k,splitView:"none",onChangeSplitView:()=>{},onRefresh:ze,isSyncing:D,selectedAccountEmail:Sa==null?void 0:Sa.email,onMoveEmailsToFolder:yl})}),a.jsx(Fp,{darkMode:c,isOpen:A,onToggleOpen:()=>b(!A),activeWidget:U,onSelectWidget:v=>G(v),emails:V,onOpenCompose:()=>le(!0),onShowToast:Se})]}),a.jsxs("footer",{className:`h-6 flex items-center px-4 md:px-6 justify-between text-[10px] select-none border-t shrink-0 overflow-hidden whitespace-nowrap ${c?"bg-[#181818] border-gray-800 text-gray-400":"bg-[#f6f8fc] border-gray-200 text-gray-500"}`,children:[a.jsxs("div",{className:"flex items-center space-x-2 md:space-x-3 truncate mr-2",children:[a.jsx("span",{children:"0 GB of 15 GB used (0%)"}),a.jsx("span",{className:"hidden sm:inline",children:"·"}),a.jsxs("span",{className:"hidden sm:inline",children:["Connected Providers: ",a.jsx("strong",{className:"text-blue-600 dark:text-blue-400",children:S.length})]}),a.jsx("span",{className:"hidden md:inline",children:"·"}),a.jsx("span",{className:"hidden md:inline truncate",children:"Dovecot / WHM zero-migration bridge connected"})]}),a.jsxs("div",{className:"flex items-center space-x-2 md:space-x-3 shrink-0",children:[a.jsx("button",{onClick:()=>re(!0),className:"hover:underline cursor-pointer",children:"SaaS Plans"}),a.jsx("span",{children:"·"}),a.jsx("button",{onClick:()=>de(!0),className:"hover:underline cursor-pointer",children:"Provider WHM"}),a.jsx("span",{className:"hidden sm:inline",children:"·"}),a.jsx("span",{className:"hidden sm:inline hover:underline cursor-pointer",children:"Program Policies"})]})]}),a.jsx(Gp,{darkMode:c,isOpen:fe,onClose:()=>le(!1),accounts:S,activeAccountId:z==="all"?(da=S[0])==null?void 0:da.id:z,onSendEmail:Qa,onSaveDraft:ct,onShowToast:Se}),Y&&a.jsxs("div",{className:"fixed bottom-10 left-6 z-[300] bg-[#323232] text-white px-4 py-2.5 rounded-xl shadow-2xl text-xs flex items-center space-x-3 border border-gray-700 animate-in fade-in slide-in-from-bottom-2",children:[a.jsx("span",{children:Y}),a.jsx("button",{onClick:()=>ee(null),className:"text-gray-400 hover:text-white font-bold cursor-pointer",children:"✕"})]}),a.jsx(Zp,{darkMode:c,isOpen:ye,onClose:()=>ke(!1),onAddAccount:He,userPlan:xe,currentAccountsCount:S.length,onOpenPlansModal:()=>re(!0),onRealConnected:v=>Ie({connected:!0,...v})}),a.jsx(Ip,{darkMode:c,isOpen:ie,onClose:()=>re(!1),currentPlan:xe,onSelectPlan:Ne}),a.jsx(Pp,{darkMode:c,isOpen:ue,onClose:()=>oe(!1),currentUserPlan:xe,onUpdateCurrentUserPlan:Ne,onShowToast:Se})]})}Qh.createRoot(document.getElementById("root")).render(a.jsx(m.StrictMode,{children:a.jsx(dy,{})}));
