330 lines
392 KiB
JavaScript
330 lines
392 KiB
JavaScript
(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))r(g);new MutationObserver(g=>{for(const b of g)if(b.type==="childList")for(const S of b.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&r(S)}).observe(document,{childList:!0,subtree:!0});function x(g){const b={};return g.integrity&&(b.integrity=g.integrity),g.referrerPolicy&&(b.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?b.credentials="include":g.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function r(g){if(g.ep)return;g.ep=!0;const b=x(g);fetch(g.href,b)}})();function bx(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Hr={exports:{}},Js={};/**
|
|
* @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 o0;function yx(){if(o0)return Js;o0=1;var u=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function x(r,g,b){var S=null;if(b!==void 0&&(S=""+b),g.key!==void 0&&(S=""+g.key),"key"in g){b={};for(var C in g)C!=="key"&&(b[C]=g[C])}else b=g;return g=b.ref,{$$typeof:u,type:r,key:S,ref:g!==void 0?g:null,props:b}}return Js.Fragment=d,Js.jsx=x,Js.jsxs=x,Js}var u0;function gx(){return u0||(u0=1,Hr.exports=yx()),Hr.exports}var s=gx(),Vr={exports:{}},xe={};/**
|
|
* @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 d0;function vx(){if(d0)return xe;d0=1;var u=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),U=Symbol.iterator;function J(h){return h===null||typeof h!="object"?null:(h=U&&h[U]||h["@@iterator"],typeof h=="function"?h:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,se={};function I(h,_,V){this.props=h,this.context=_,this.refs=se,this.updater=V||R}I.prototype.isReactComponent={},I.prototype.setState=function(h,_){if(typeof h!="object"&&typeof h!="function"&&h!=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,h,_,"setState")},I.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function ee(){}ee.prototype=I.prototype;function be(h,_,V){this.props=h,this.context=_,this.refs=se,this.updater=V||R}var Oe=be.prototype=new ee;Oe.constructor=be,Z(Oe,I.prototype),Oe.isPureReactComponent=!0;var Ne=Array.isArray;function re(){}var F={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function v(h,_,V){var L=V.ref;return{$$typeof:u,type:h,key:_,ref:L!==void 0?L:null,props:V}}function m(h,_){return v(h.type,_,h.props)}function z(h){return typeof h=="object"&&h!==null&&h.$$typeof===u}function K(h){var _={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(V){return _[V]})}var Q=/\/+/g;function te(h,_){return typeof h=="object"&&h!==null&&h.key!=null?K(""+h.key):_.toString(36)}function he(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(re,re):(h.status="pending",h.then(function(_){h.status==="pending"&&(h.status="fulfilled",h.value=_)},function(_){h.status==="pending"&&(h.status="rejected",h.reason=_)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function T(h,_,V,L,le){var $=typeof h;($==="undefined"||$==="boolean")&&(h=null);var ce=!1;if(h===null)ce=!0;else switch($){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(h.$$typeof){case u:case d:ce=!0;break;case N:return ce=h._init,T(ce(h._payload),_,V,L,le)}}if(ce)return le=le(h),ce=L===""?"."+te(h,0):L,Ne(le)?(V="",ce!=null&&(V=ce.replace(Q,"$&/")+"/"),T(le,_,V,"",function(me){return me})):le!=null&&(z(le)&&(le=m(le,V+(le.key==null||h&&h.key===le.key?"":(""+le.key).replace(Q,"$&/")+"/")+ce)),_.push(le)),1;ce=0;var He=L===""?".":L+":";if(Ne(h))for(var ae=0;ae<h.length;ae++)L=h[ae],$=He+te(L,ae),ce+=T(L,_,V,$,le);else if(ae=J(h),typeof ae=="function")for(h=ae.call(h),ae=0;!(L=h.next()).done;)L=L.value,$=He+te(L,ae++),ce+=T(L,_,V,$,le);else if($==="object"){if(typeof h.then=="function")return T(he(h),_,V,L,le);throw _=String(h),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return ce}function M(h,_,V){if(h==null)return h;var L=[],le=0;return T(h,L,"","",function($){return _.call(V,$,le++)}),L}function Y(h){if(h._status===-1){var _=h._result;_=_(),_.then(function(V){(h._status===0||h._status===-1)&&(h._status=1,h._result=V)},function(V){(h._status===0||h._status===-1)&&(h._status=2,h._result=V)}),h._status===-1&&(h._status=0,h._result=_)}if(h._status===1)return h._result.default;throw h._result}var X=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)},G={map:M,forEach:function(h,_,V){M(h,function(){_.apply(this,arguments)},V)},count:function(h){var _=0;return M(h,function(){_++}),_},toArray:function(h){return M(h,function(_){return _})||[]},only:function(h){if(!z(h))throw Error("React.Children.only expected to receive a single React element child.");return h}};return xe.Activity=k,xe.Children=G,xe.Component=I,xe.Fragment=x,xe.Profiler=g,xe.PureComponent=be,xe.StrictMode=r,xe.Suspense=j,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,xe.__COMPILER_RUNTIME={__proto__:null,c:function(h){return F.H.useMemoCache(h)}},xe.cache=function(h){return function(){return h.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(h,_,V){if(h==null)throw Error("The argument must be a React element, but you passed "+h+".");var L=Z({},h.props),le=h.key;if(_!=null)for($ in _.key!==void 0&&(le=""+_.key),_)!ne.call(_,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&_.ref===void 0||(L[$]=_[$]);var $=arguments.length-2;if($===1)L.children=V;else if(1<$){for(var ce=Array($),He=0;He<$;He++)ce[He]=arguments[He+2];L.children=ce}return v(h.type,le,L)},xe.createContext=function(h){return h={$$typeof:S,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null},h.Provider=h,h.Consumer={$$typeof:b,_context:h},h},xe.createElement=function(h,_,V){var L,le={},$=null;if(_!=null)for(L in _.key!==void 0&&($=""+_.key),_)ne.call(_,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(le[L]=_[L]);var ce=arguments.length-2;if(ce===1)le.children=V;else if(1<ce){for(var He=Array(ce),ae=0;ae<ce;ae++)He[ae]=arguments[ae+2];le.children=He}if(h&&h.defaultProps)for(L in ce=h.defaultProps,ce)le[L]===void 0&&(le[L]=ce[L]);return v(h,$,le)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(h){return{$$typeof:C,render:h}},xe.isValidElement=z,xe.lazy=function(h){return{$$typeof:N,_payload:{_status:-1,_result:h},_init:Y}},xe.memo=function(h,_){return{$$typeof:f,type:h,compare:_===void 0?null:_}},xe.startTransition=function(h){var _=F.T,V={};F.T=V;try{var L=h(),le=F.S;le!==null&&le(V,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(re,X)}catch($){X($)}finally{_!==null&&V.types!==null&&(_.types=V.types),F.T=_}},xe.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},xe.use=function(h){return F.H.use(h)},xe.useActionState=function(h,_,V){return F.H.useActionState(h,_,V)},xe.useCallback=function(h,_){return F.H.useCallback(h,_)},xe.useContext=function(h){return F.H.useContext(h)},xe.useDebugValue=function(){},xe.useDeferredValue=function(h,_){return F.H.useDeferredValue(h,_)},xe.useEffect=function(h,_){return F.H.useEffect(h,_)},xe.useEffectEvent=function(h){return F.H.useEffectEvent(h)},xe.useId=function(){return F.H.useId()},xe.useImperativeHandle=function(h,_,V){return F.H.useImperativeHandle(h,_,V)},xe.useInsertionEffect=function(h,_){return F.H.useInsertionEffect(h,_)},xe.useLayoutEffect=function(h,_){return F.H.useLayoutEffect(h,_)},xe.useMemo=function(h,_){return F.H.useMemo(h,_)},xe.useOptimistic=function(h,_){return F.H.useOptimistic(h,_)},xe.useReducer=function(h,_,V){return F.H.useReducer(h,_,V)},xe.useRef=function(h){return F.H.useRef(h)},xe.useState=function(h){return F.H.useState(h)},xe.useSyncExternalStore=function(h,_,V){return F.H.useSyncExternalStore(h,_,V)},xe.useTransition=function(){return F.H.useTransition()},xe.version="19.2.8",xe}var f0;function ao(){return f0||(f0=1,Vr.exports=vx()),Vr.exports}var oe=ao(),Yr={exports:{}},Fs={},Gr={exports:{}},Zr={};/**
|
|
* @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 h0;function Sx(){return h0||(h0=1,(function(u){function d(T,M){var Y=T.length;T.push(M);e:for(;0<Y;){var X=Y-1>>>1,G=T[X];if(0<g(G,M))T[X]=M,T[Y]=G,Y=X;else break e}}function x(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var M=T[0],Y=T.pop();if(Y!==M){T[0]=Y;e:for(var X=0,G=T.length,h=G>>>1;X<h;){var _=2*(X+1)-1,V=T[_],L=_+1,le=T[L];if(0>g(V,Y))L<G&&0>g(le,V)?(T[X]=le,T[L]=Y,X=L):(T[X]=V,T[_]=Y,X=_);else if(L<G&&0>g(le,Y))T[X]=le,T[L]=Y,X=L;else break e}}return M}function g(T,M){var Y=T.sortIndex-M.sortIndex;return Y!==0?Y:T.id-M.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;u.unstable_now=function(){return b.now()}}else{var S=Date,C=S.now();u.unstable_now=function(){return S.now()-C}}var j=[],f=[],N=1,k=null,U=3,J=!1,R=!1,Z=!1,se=!1,I=typeof setTimeout=="function"?setTimeout:null,ee=typeof clearTimeout=="function"?clearTimeout:null,be=typeof setImmediate<"u"?setImmediate:null;function Oe(T){for(var M=x(f);M!==null;){if(M.callback===null)r(f);else if(M.startTime<=T)r(f),M.sortIndex=M.expirationTime,d(j,M);else break;M=x(f)}}function Ne(T){if(Z=!1,Oe(T),!R)if(x(j)!==null)R=!0,re||(re=!0,K());else{var M=x(f);M!==null&&he(Ne,M.startTime-T)}}var re=!1,F=-1,ne=5,v=-1;function m(){return se?!0:!(u.unstable_now()-v<ne)}function z(){if(se=!1,re){var T=u.unstable_now();v=T;var M=!0;try{e:{R=!1,Z&&(Z=!1,ee(F),F=-1),J=!0;var Y=U;try{t:{for(Oe(T),k=x(j);k!==null&&!(k.expirationTime>T&&m());){var X=k.callback;if(typeof X=="function"){k.callback=null,U=k.priorityLevel;var G=X(k.expirationTime<=T);if(T=u.unstable_now(),typeof G=="function"){k.callback=G,Oe(T),M=!0;break t}k===x(j)&&r(j),Oe(T)}else r(j);k=x(j)}if(k!==null)M=!0;else{var h=x(f);h!==null&&he(Ne,h.startTime-T),M=!1}}break e}finally{k=null,U=Y,J=!1}M=void 0}}finally{M?K():re=!1}}}var K;if(typeof be=="function")K=function(){be(z)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,te=Q.port2;Q.port1.onmessage=z,K=function(){te.postMessage(null)}}else K=function(){I(z,0)};function he(T,M){F=I(function(){T(u.unstable_now())},M)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(T){T.callback=null},u.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<T?Math.floor(1e3/T):5},u.unstable_getCurrentPriorityLevel=function(){return U},u.unstable_next=function(T){switch(U){case 1:case 2:case 3:var M=3;break;default:M=U}var Y=U;U=M;try{return T()}finally{U=Y}},u.unstable_requestPaint=function(){se=!0},u.unstable_runWithPriority=function(T,M){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var Y=U;U=T;try{return M()}finally{U=Y}},u.unstable_scheduleCallback=function(T,M,Y){var X=u.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?X+Y:X):Y=X,T){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=Y+G,T={id:N++,callback:M,priorityLevel:T,startTime:Y,expirationTime:G,sortIndex:-1},Y>X?(T.sortIndex=Y,d(f,T),x(j)===null&&T===x(f)&&(Z?(ee(F),F=-1):Z=!0,he(Ne,Y-X))):(T.sortIndex=G,d(j,T),R||J||(R=!0,re||(re=!0,K()))),T},u.unstable_shouldYield=m,u.unstable_wrapCallback=function(T){var M=U;return function(){var Y=U;U=M;try{return T.apply(this,arguments)}finally{U=Y}}}})(Zr)),Zr}var m0;function jx(){return m0||(m0=1,Gr.exports=Sx()),Gr.exports}var Kr={exports:{}},jt={};/**
|
|
* @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 x0;function Nx(){if(x0)return jt;x0=1;var u=ao();function d(j){var f="https://react.dev/errors/"+j;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)f+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+j+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function x(){}var r={d:{f:x,r:function(){throw Error(d(522))},D:x,C:x,L:x,m:x,X:x,S:x,M:x},p:0,findDOMNode:null},g=Symbol.for("react.portal");function b(j,f,N){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g,key:k==null?null:""+k,children:j,containerInfo:f,implementation:N}}var S=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function C(j,f){if(j==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,jt.createPortal=function(j,f){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(d(299));return b(j,f,null,N)},jt.flushSync=function(j){var f=S.T,N=r.p;try{if(S.T=null,r.p=2,j)return j()}finally{S.T=f,r.p=N,r.d.f()}},jt.preconnect=function(j,f){typeof j=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(j,f))},jt.prefetchDNS=function(j){typeof j=="string"&&r.d.D(j)},jt.preinit=function(j,f){if(typeof j=="string"&&f&&typeof f.as=="string"){var N=f.as,k=C(N,f.crossOrigin),U=typeof f.integrity=="string"?f.integrity:void 0,J=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;N==="style"?r.d.S(j,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:k,integrity:U,fetchPriority:J}):N==="script"&&r.d.X(j,{crossOrigin:k,integrity:U,fetchPriority:J,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},jt.preinitModule=function(j,f){if(typeof j=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var N=C(f.as,f.crossOrigin);r.d.M(j,{crossOrigin:N,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(j)},jt.preload=function(j,f){if(typeof j=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var N=f.as,k=C(N,f.crossOrigin);r.d.L(j,N,{crossOrigin:k,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},jt.preloadModule=function(j,f){if(typeof j=="string")if(f){var N=C(f.as,f.crossOrigin);r.d.m(j,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:N,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(j)},jt.requestFormReset=function(j){r.d.r(j)},jt.unstable_batchedUpdates=function(j,f){return j(f)},jt.useFormState=function(j,f,N){return S.H.useFormState(j,f,N)},jt.useFormStatus=function(){return S.H.useHostTransitionStatus()},jt.version="19.2.8",jt}var p0;function kx(){if(p0)return Kr.exports;p0=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(d){console.error(d)}}return u(),Kr.exports=Nx(),Kr.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 b0;function wx(){if(b0)return Fs;b0=1;var u=jx(),d=ao(),x=kx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function b(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 S(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 C(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 j(e){if(b(e)!==e)throw Error(r(188))}function f(e){var t=e.alternate;if(!t){if(t=b(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return j(n),e;if(i===a)return j(n),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=n,a=i;else{for(var c=!1,o=n.child;o;){if(o===l){c=!0,l=n,a=i;break}if(o===a){c=!0,a=n,l=i;break}o=o.sibling}if(!c){for(o=i.child;o;){if(o===l){c=!0,l=i,a=n;break}if(o===a){c=!0,a=i,l=n;break}o=o.sibling}if(!c)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}var k=Object.assign,U=Symbol.for("react.element"),J=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),be=Symbol.for("react.context"),Oe=Symbol.for("react.forward_ref"),Ne=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),m=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=z&&e[z]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case I:return"Profiler";case se:return"StrictMode";case Ne:return"Suspense";case re:return"SuspenseList";case v:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case be:return e.displayName||"Context";case ee:return(e._context.displayName||"Context")+".Consumer";case Oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var he=Array.isArray,T=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=x.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},X=[],G=-1;function h(e){return{current:e}}function _(e){0>G||(e.current=X[G],X[G]=null,G--)}function V(e,t){G++,X[G]=e.current,e.current=t}var L=h(null),le=h(null),$=h(null),ce=h(null);function He(e,t){switch(V($,t),V(le,e),V(L,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Tf(t),e=Mf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(L),V(L,e)}function ae(){_(L),_(le),_($)}function me(e){e.memoizedState!==null&&V(ce,e);var t=L.current,l=Mf(t,e.type);t!==l&&(V(le,e),V(L,l))}function Le(e){le.current===e&&(_(L),_(le)),ce.current===e&&(_(ce),Zs._currentValue=Y)}var fe,qe;function Ue(e){if(fe===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",qe=-1<l.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+fe+e+qe}var Te=!1;function Ce(e,t){if(!e||Te)return"";Te=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(D){var O=D}Reflect.construct(e,[],H)}else{try{H.call()}catch(D){O=D}e.call(H.prototype)}}else{try{throw Error()}catch(D){O=D}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(D){if(D&&O&&typeof D.stack=="string")return[D.stack,O.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),c=i[0],o=i[1];if(c&&o){var p=c.split(`
|
|
`),E=o.split(`
|
|
`);for(n=a=0;a<p.length&&!p[a].includes("DetermineComponentFrameRoot");)a++;for(;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;if(a===p.length||n===E.length)for(a=p.length-1,n=E.length-1;1<=a&&0<=n&&p[a]!==E[n];)n--;for(;1<=a&&0<=n;a--,n--)if(p[a]!==E[n]){if(a!==1||n!==1)do if(a--,n--,0>n||p[a]!==E[n]){var q=`
|
|
`+p[a].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=a&&0<=n);break}}}finally{Te=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ue(l):""}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return Ue(e.type);case 16:return Ue("Lazy");case 13:return e.child!==t&&t!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return Ue("Activity");default:return""}}function at(e){try{var t="",l=null;do t+=ge(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
Error generating stack: `+a.message+`
|
|
`+a.stack}}var _e=Object.prototype.hasOwnProperty,Be=u.unstable_scheduleCallback,Je=u.unstable_cancelCallback,Ht=u.unstable_shouldYield,vt=u.unstable_requestPaint,We=u.unstable_now,et=u.unstable_getCurrentPriorityLevel,Nt=u.unstable_ImmediatePriority,Pe=u.unstable_UserBlockingPriority,st=u.unstable_NormalPriority,Tt=u.unstable_LowPriority,sl=u.unstable_IdlePriority,$l=u.log,ve=u.unstable_setDisableYieldValue,pe=null,Ge=null;function St(e){if(typeof $l=="function"&&ve(e),Ge&&typeof Ge.setStrictMode=="function")try{Ge.setStrictMode(pe,e)}catch{}}var dt=Math.clz32?Math.clz32:en,ba=Math.log,Ps=Math.LN2;function en(e){return e>>>=0,e===0?32:31-(ba(e)/Ps|0)|0}var tn=256,ln=262144,an=4194304;function Il(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 sn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var o=a&134217727;return o!==0?(a=o&~i,a!==0?n=Il(a):(c&=o,c!==0?n=Il(c):l||(l=o&~e,l!==0&&(n=Il(l))))):(o=a&~i,o!==0?n=Il(o):c!==0?n=Il(c):l||(l=a&~e,l!==0&&(n=Il(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function as(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function sh(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 fo(){var e=an;return an<<=1,(an&62914560)===0&&(an=4194304),e}function Ai(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ss(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nh(e,t,l,a,n,i){var c=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var o=e.entanglements,p=e.expirationTimes,E=e.hiddenUpdates;for(l=c&~l;0<l;){var q=31-dt(l),H=1<<q;o[q]=0,p[q]=-1;var O=E[q];if(O!==null)for(E[q]=null,q=0;q<O.length;q++){var D=O[q];D!==null&&(D.lane&=-536870913)}l&=~H}a!==0&&ho(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function ho(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-dt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function mo(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-dt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function xo(e,t){var l=t&-t;return l=(l&42)!==0?1:Ei(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ei(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 zi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function po(){var e=M.p;return e!==0?e:(e=window.event,e===void 0?32:l0(e.type))}function bo(e,t){var l=M.p;try{return M.p=e,t()}finally{M.p=l}}var Nl=Math.random().toString(36).slice(2),xt="__reactFiber$"+Nl,wt="__reactProps$"+Nl,ya="__reactContainer$"+Nl,Oi="__reactEvents$"+Nl,ih="__reactListeners$"+Nl,ch="__reactHandles$"+Nl,yo="__reactResources$"+Nl,ns="__reactMarker$"+Nl;function Ti(e){delete e[xt],delete e[wt],delete e[Oi],delete e[ih],delete e[ch]}function ga(e){var t=e[xt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ya]||l[xt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Hf(e);e!==null;){if(l=e[xt])return l;e=Hf(e)}return t}e=l,l=e.parentNode}return null}function va(e){if(e=e[xt]||e[ya]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function is(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Sa(e){var t=e[yo];return t||(t=e[yo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[ns]=!0}var go=new Set,vo={};function Wl(e,t){ja(e,t),ja(e+"Capture",t)}function ja(e,t){for(vo[e]=t,e=0;e<t.length;e++)go.add(t[e])}var rh=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]*$"),So={},jo={};function oh(e){return _e.call(jo,e)?!0:_e.call(So,e)?!1:rh.test(e)?jo[e]=!0:(So[e]=!0,!1)}function nn(e,t,l){if(oh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function cn(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 nl(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function No(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uh(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mi(e){if(!e._valueTracker){var t=No(e)?"checked":"value";e._valueTracker=uh(e,t,""+e[t])}}function ko(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=No(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function rn(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 dh=/[\n"\\]/g;function Yt(e){return e.replace(dh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Di(e,t,l,a,n,i,c,o){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vt(t)):e.value!==""+Vt(t)&&(e.value=""+Vt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Ui(e,c,Vt(t)):l!=null?Ui(e,c,Vt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Vt(o):e.removeAttribute("name")}function wo(e,t,l,a,n,i,c,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Mi(e);return}l=l!=null?""+Vt(l):"",t=t!=null?""+Vt(t):l,o||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=o?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),Mi(e)}function Ui(e,t,l){t==="number"&&rn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Na(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Vt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Co(e,t,l){if(t!=null&&(t=""+Vt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Vt(l):""}function _o(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(he(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Vt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Mi(e)}function ka(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var fh=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 Ao(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||fh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Eo(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&Ao(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&Ao(e,i,t[i])}function Ri(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 hh=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"]]),mh=/^[\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 on(e){return mh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function il(){}var Li=null;function qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wa=null,Ca=null;function zo(e){var t=va(e);if(t&&(e=t.stateNode)){var l=e[wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Di(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="'+Yt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[wt]||null;if(!n)throw Error(r(90));Di(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&ko(a)}break e;case"textarea":Co(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Na(e,!!l.multiple,t,!1)}}}var Bi=!1;function Oo(e,t,l){if(Bi)return e(t,l);Bi=!0;try{var a=e(t);return a}finally{if(Bi=!1,(wa!==null||Ca!==null)&&($n(),wa&&(t=wa,e=Ca,Ca=wa=null,zo(t),e)))for(t=0;t<e.length;t++)zo(e[t])}}function cs(e,t){var l=e.stateNode;if(l===null)return null;var a=l[wt]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var cl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(cl)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{Hi=!1}var kl=null,Vi=null,un=null;function To(){if(un)return un;var e,t=Vi,l=t.length,a,n="value"in kl?kl.value:kl.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===n[i-a];a++);return un=n.slice(e,1<a?1-a: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 fn(){return!0}function Mo(){return!1}function Ct(e){function t(l,a,n,i,c){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(l=e[o],this[o]=l?l(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?fn:Mo,this.isPropagationStopped=Mo,this}return k(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=fn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=fn)},persist:function(){},isPersistent:fn}),t}var Pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=Ct(Pl),os=k({},Pl,{view:0,detail:0}),xh=Ct(os),Yi,Gi,us,mn=k({},os,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ki,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!==us&&(us&&e.type==="mousemove"?(Yi=e.screenX-us.screenX,Gi=e.screenY-us.screenY):Gi=Yi=0,us=e),Yi)},movementY:function(e){return"movementY"in e?e.movementY:Gi}}),Do=Ct(mn),ph=k({},mn,{dataTransfer:0}),bh=Ct(ph),yh=k({},os,{relatedTarget:0}),Zi=Ct(yh),gh=k({},Pl,{animationName:0,elapsedTime:0,pseudoElement:0}),vh=Ct(gh),Sh=k({},Pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jh=Ct(Sh),Nh=k({},Pl,{data:0}),Uo=Ct(Nh),kh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wh={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"},Ch={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _h(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ch[e])?!!t[e]:!1}function Ki(){return _h}var Ah=k({},os,{key:function(e){if(e.key){var t=kh[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"?wh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ki,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}}),Eh=Ct(Ah),zh=k({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ro=Ct(zh),Oh=k({},os,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ki}),Th=Ct(Oh),Mh=k({},Pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dh=Ct(Mh),Uh=k({},mn,{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}),Rh=Ct(Uh),Lh=k({},Pl,{newState:0,oldState:0}),qh=Ct(Lh),Bh=[9,13,27,32],Qi=cl&&"CompositionEvent"in window,ds=null;cl&&"documentMode"in document&&(ds=document.documentMode);var Hh=cl&&"TextEvent"in window&&!ds,Lo=cl&&(!Qi||ds&&8<ds&&11>=ds),qo=" ",Bo=!1;function Ho(e,t){switch(e){case"keyup":return Bh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function Vh(e,t){switch(e){case"compositionend":return Vo(t);case"keypress":return t.which!==32?null:(Bo=!0,qo);case"textInput":return e=t.data,e===qo&&Bo?null:e;default:return null}}function Yh(e,t){if(_a)return e==="compositionend"||!Qi&&Ho(e,t)?(e=To(),un=Vi=kl=null,_a=!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 Lo&&t.locale!=="ko"?null:t.data;default:return null}}var Gh={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 Yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gh[e.type]:t==="textarea"}function Go(e,t,l,a){wa?Ca?Ca.push(a):Ca=[a]:wa=a,t=ai(t,"onChange"),0<t.length&&(l=new hn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var fs=null,hs=null;function Zh(e){Cf(e,0)}function xn(e){var t=is(e);if(ko(t))return e}function Zo(e,t){if(e==="change")return t}var Ko=!1;if(cl){var Xi;if(cl){var Ji="oninput"in document;if(!Ji){var Qo=document.createElement("div");Qo.setAttribute("oninput","return;"),Ji=typeof Qo.oninput=="function"}Xi=Ji}else Xi=!1;Ko=Xi&&(!document.documentMode||9<document.documentMode)}function Xo(){fs&&(fs.detachEvent("onpropertychange",Jo),hs=fs=null)}function Jo(e){if(e.propertyName==="value"&&xn(hs)){var t=[];Go(t,hs,e,qi(e)),Oo(Zh,t)}}function Kh(e,t,l){e==="focusin"?(Xo(),fs=t,hs=l,fs.attachEvent("onpropertychange",Jo)):e==="focusout"&&Xo()}function Qh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xn(hs)}function Xh(e,t){if(e==="click")return xn(t)}function Jh(e,t){if(e==="input"||e==="change")return xn(t)}function Fh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:Fh;function ms(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!_e.call(t,n)||!Mt(e[n],t[n]))return!1}return!0}function Fo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $o(e,t){var l=Fo(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Fo(l)}}function Io(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Io(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rn(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=rn(e.document)}return t}function Fi(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 $h=cl&&"documentMode"in document&&11>=document.documentMode,Aa=null,$i=null,xs=null,Ii=!1;function Po(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ii||Aa==null||Aa!==rn(a)||(a=Aa,"selectionStart"in a&&Fi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),xs&&ms(xs,a)||(xs=a,a=ai($i,"onSelect"),0<a.length&&(t=new hn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Aa)))}function ea(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ea={animationend:ea("Animation","AnimationEnd"),animationiteration:ea("Animation","AnimationIteration"),animationstart:ea("Animation","AnimationStart"),transitionrun:ea("Transition","TransitionRun"),transitionstart:ea("Transition","TransitionStart"),transitioncancel:ea("Transition","TransitionCancel"),transitionend:ea("Transition","TransitionEnd")},Wi={},eu={};cl&&(eu=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function ta(e){if(Wi[e])return Wi[e];if(!Ea[e])return e;var t=Ea[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in eu)return Wi[e]=t[l];return e}var tu=ta("animationend"),lu=ta("animationiteration"),au=ta("animationstart"),Ih=ta("transitionrun"),Wh=ta("transitionstart"),Ph=ta("transitioncancel"),su=ta("transitionend"),nu=new Map,Pi="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(" ");Pi.push("scrollEnd");function It(e,t){nu.set(e,t),Wl(t,[e])}var pn=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)},Gt=[],za=0,ec=0;function bn(){for(var e=za,t=ec=za=0;t<e;){var l=Gt[t];Gt[t++]=null;var a=Gt[t];Gt[t++]=null;var n=Gt[t];Gt[t++]=null;var i=Gt[t];if(Gt[t++]=null,a!==null&&n!==null){var c=a.pending;c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n}i!==0&&iu(l,n,i)}}function yn(e,t,l,a){Gt[za++]=e,Gt[za++]=t,Gt[za++]=l,Gt[za++]=a,ec|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function tc(e,t,l,a){return yn(e,t,l,a),gn(e)}function la(e,t){return yn(e,null,null,t),gn(e)}function iu(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-dt(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function gn(e){if(50<Ls)throw Ls=0,ur=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oa={};function em(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,l,a){return new em(e,t,l,a)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rl(e,t){var l=e.alternate;return l===null?(l=Dt(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 cu(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 vn(e,t,l,a,n,i){var c=0;if(a=e,typeof e=="function")lc(e)&&(c=1);else if(typeof e=="string")c=nx(e,l,L.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case v:return e=Dt(31,l,t,n),e.elementType=v,e.lanes=i,e;case Z:return aa(l.children,n,i,t);case se:c=8,n|=24;break;case I:return e=Dt(12,l,t,n|2),e.elementType=I,e.lanes=i,e;case Ne:return e=Dt(13,l,t,n),e.elementType=Ne,e.lanes=i,e;case re:return e=Dt(19,l,t,n),e.elementType=re,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case be:c=10;break e;case ee:c=9;break e;case Oe:c=11;break e;case F:c=14;break e;case ne:c=16,a=null;break e}c=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Dt(c,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function aa(e,t,l,a){return e=Dt(7,e,a,t),e.lanes=l,e}function ac(e,t,l){return e=Dt(6,e,null,t),e.lanes=l,e}function ru(e){var t=Dt(18,null,null,0);return t.stateNode=e,t}function sc(e,t,l){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ou=new WeakMap;function Zt(e,t){if(typeof e=="object"&&e!==null){var l=ou.get(e);return l!==void 0?l:(t={value:e,source:t,stack:at(t)},ou.set(e,t),t)}return{value:e,source:t,stack:at(t)}}var Ta=[],Ma=0,Sn=null,ps=0,Kt=[],Qt=0,wl=null,el=1,tl="";function ol(e,t){Ta[Ma++]=ps,Ta[Ma++]=Sn,Sn=e,ps=t}function uu(e,t,l){Kt[Qt++]=el,Kt[Qt++]=tl,Kt[Qt++]=wl,wl=e;var a=el;e=tl;var n=32-dt(a)-1;a&=~(1<<n),l+=1;var i=32-dt(t)+n;if(30<i){var c=n-n%5;i=(a&(1<<c)-1).toString(32),a>>=c,n-=c,el=1<<32-dt(t)+n|l<<n|a,tl=i+e}else el=1<<i|l<<n|a,tl=e}function nc(e){e.return!==null&&(ol(e,1),uu(e,1,0))}function ic(e){for(;e===Sn;)Sn=Ta[--Ma],Ta[Ma]=null,ps=Ta[--Ma],Ta[Ma]=null;for(;e===wl;)wl=Kt[--Qt],Kt[Qt]=null,tl=Kt[--Qt],Kt[Qt]=null,el=Kt[--Qt],Kt[Qt]=null}function du(e,t){Kt[Qt++]=el,Kt[Qt++]=tl,Kt[Qt++]=wl,el=t.id,tl=t.overflow,wl=e}var pt=null,Fe=null,ze=!1,Cl=null,Xt=!1,cc=Error(r(519));function _l(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bs(Zt(t,e)),cc}function fu(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[xt]=e,t[wt]=a,l){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(l=0;l<Bs.length;l++)we(Bs[l],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),wo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),_o(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||zf(t.textContent,l)?(a.popover!=null&&(we("beforetoggle",t),we("toggle",t)),a.onScroll!=null&&we("scroll",t),a.onScrollEnd!=null&&we("scrollend",t),a.onClick!=null&&(t.onclick=il),t=!0):t=!1,t||_l(e,!0)}function hu(e){for(pt=e.return;pt;)switch(pt.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:pt=pt.return}}function Da(e){if(e!==pt)return!1;if(!ze)return hu(e),ze=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||wr(e.type,e.memoizedProps)),l=!l),l&&Fe&&_l(e),hu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Fe=Bf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Fe=Bf(e)}else t===27?(t=Fe,Vl(e.type)?(e=zr,zr=null,Fe=e):Fe=t):Fe=pt?Ft(e.stateNode.nextSibling):null;return!0}function sa(){Fe=pt=null,ze=!1}function rc(){var e=Cl;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Cl=null),e}function bs(e){Cl===null?Cl=[e]:Cl.push(e)}var oc=h(null),na=null,ul=null;function Al(e,t,l){V(oc,t._currentValue),t._currentValue=l}function dl(e){e._currentValue=oc.current,_(oc)}function uc(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function dc(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var c=n.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=n;for(var p=0;p<t.length;p++)if(o.context===t[p]){i.lanes|=l,o=i.alternate,o!==null&&(o.lanes|=l),uc(i.return,l,e),a||(c=null);break e}i=o.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error(r(341));c.lanes|=l,i=c.alternate,i!==null&&(i.lanes|=l),uc(c,l,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function Ua(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var c=n.alternate;if(c===null)throw Error(r(387));if(c=c.memoizedProps,c!==null){var o=n.type;Mt(n.pendingProps.value,c.value)||(e!==null?e.push(o):e=[o])}}else if(n===ce.current){if(c=n.alternate,c===null)throw Error(r(387));c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Zs):e=[Zs])}n=n.return}e!==null&&dc(t,e,l,a),t.flags|=262144}function jn(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ia(e){na=e,ul=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function bt(e){return mu(na,e)}function Nn(e,t){return na===null&&ia(e),mu(e,t)}function mu(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ul===null){if(e===null)throw Error(r(308));ul=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ul=ul.next=t;return l}var tm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},lm=u.unstable_scheduleCallback,am=u.unstable_NormalPriority,ct={$$typeof:be,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fc(){return{controller:new tm,data:new Map,refCount:0}}function ys(e){e.refCount--,e.refCount===0&&lm(am,function(){e.controller.abort()})}var gs=null,hc=0,Ra=0,La=null;function sm(e,t){if(gs===null){var l=gs=[];hc=0,Ra=pr(),La={status:"pending",value:void 0,then:function(a){l.push(a)}}}return hc++,t.then(xu,xu),t}function xu(){if(--hc===0&&gs!==null){La!==null&&(La.status="fulfilled");var e=gs;gs=null,Ra=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function nm(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var pu=T.S;T.S=function(e,t){Pd=We(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sm(e,t),pu!==null&&pu(e,t)};var ca=h(null);function mc(){var e=ca.current;return e!==null?e:Xe.pooledCache}function kn(e,t){t===null?V(ca,ca.current):V(ca,t.pool)}function bu(){var e=mc();return e===null?null:{parent:ct._currentValue,pool:e}}var qa=Error(r(460)),xc=Error(r(474)),wn=Error(r(542)),Cn={then:function(){}};function yu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(il,il),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Su(e),e;default:if(typeof t.status=="string")t.then(il,il);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Su(e),e}throw oa=t,qa}}function ra(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(oa=l,qa):l}}var oa=null;function vu(){if(oa===null)throw Error(r(459));var e=oa;return oa=null,e}function Su(e){if(e===qa||e===wn)throw Error(r(483))}var Ba=null,vs=0;function _n(e){var t=vs;return vs+=1,Ba===null&&(Ba=[]),gu(Ba,e,t)}function Ss(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function An(e,t){throw t.$$typeof===U?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ju(e){function t(w,y){if(e){var A=w.deletions;A===null?(w.deletions=[y],w.flags|=16):A.push(y)}}function l(w,y){if(!e)return null;for(;y!==null;)t(w,y),y=y.sibling;return null}function a(w){for(var y=new Map;w!==null;)w.key!==null?y.set(w.key,w):y.set(w.index,w),w=w.sibling;return y}function n(w,y){return w=rl(w,y),w.index=0,w.sibling=null,w}function i(w,y,A){return w.index=A,e?(A=w.alternate,A!==null?(A=A.index,A<y?(w.flags|=67108866,y):A):(w.flags|=67108866,y)):(w.flags|=1048576,y)}function c(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function o(w,y,A,B){return y===null||y.tag!==6?(y=ac(A,w.mode,B),y.return=w,y):(y=n(y,A),y.return=w,y)}function p(w,y,A,B){var ie=A.type;return ie===Z?q(w,y,A.props.children,B,A.key):y!==null&&(y.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ne&&ra(ie)===y.type)?(y=n(y,A.props),Ss(y,A),y.return=w,y):(y=vn(A.type,A.key,A.props,null,w.mode,B),Ss(y,A),y.return=w,y)}function E(w,y,A,B){return y===null||y.tag!==4||y.stateNode.containerInfo!==A.containerInfo||y.stateNode.implementation!==A.implementation?(y=sc(A,w.mode,B),y.return=w,y):(y=n(y,A.children||[]),y.return=w,y)}function q(w,y,A,B,ie){return y===null||y.tag!==7?(y=aa(A,w.mode,B,ie),y.return=w,y):(y=n(y,A),y.return=w,y)}function H(w,y,A){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=ac(""+y,w.mode,A),y.return=w,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case J:return A=vn(y.type,y.key,y.props,null,w.mode,A),Ss(A,y),A.return=w,A;case R:return y=sc(y,w.mode,A),y.return=w,y;case ne:return y=ra(y),H(w,y,A)}if(he(y)||K(y))return y=aa(y,w.mode,A,null),y.return=w,y;if(typeof y.then=="function")return H(w,_n(y),A);if(y.$$typeof===be)return H(w,Nn(w,y),A);An(w,y)}return null}function O(w,y,A,B){var ie=y!==null?y.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ie!==null?null:o(w,y,""+A,B);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case J:return A.key===ie?p(w,y,A,B):null;case R:return A.key===ie?E(w,y,A,B):null;case ne:return A=ra(A),O(w,y,A,B)}if(he(A)||K(A))return ie!==null?null:q(w,y,A,B,null);if(typeof A.then=="function")return O(w,y,_n(A),B);if(A.$$typeof===be)return O(w,y,Nn(w,A),B);An(w,A)}return null}function D(w,y,A,B,ie){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return w=w.get(A)||null,o(y,w,""+B,ie);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case J:return w=w.get(B.key===null?A:B.key)||null,p(y,w,B,ie);case R:return w=w.get(B.key===null?A:B.key)||null,E(y,w,B,ie);case ne:return B=ra(B),D(w,y,A,B,ie)}if(he(B)||K(B))return w=w.get(A)||null,q(y,w,B,ie,null);if(typeof B.then=="function")return D(w,y,A,_n(B),ie);if(B.$$typeof===be)return D(w,y,A,Nn(y,B),ie);An(y,B)}return null}function W(w,y,A,B){for(var ie=null,Me=null,P=y,Se=y=0,Ee=null;P!==null&&Se<A.length;Se++){P.index>Se?(Ee=P,P=null):Ee=P.sibling;var De=O(w,P,A[Se],B);if(De===null){P===null&&(P=Ee);break}e&&P&&De.alternate===null&&t(w,P),y=i(De,y,Se),Me===null?ie=De:Me.sibling=De,Me=De,P=Ee}if(Se===A.length)return l(w,P),ze&&ol(w,Se),ie;if(P===null){for(;Se<A.length;Se++)P=H(w,A[Se],B),P!==null&&(y=i(P,y,Se),Me===null?ie=P:Me.sibling=P,Me=P);return ze&&ol(w,Se),ie}for(P=a(P);Se<A.length;Se++)Ee=D(P,w,Se,A[Se],B),Ee!==null&&(e&&Ee.alternate!==null&&P.delete(Ee.key===null?Se:Ee.key),y=i(Ee,y,Se),Me===null?ie=Ee:Me.sibling=Ee,Me=Ee);return e&&P.forEach(function(Ql){return t(w,Ql)}),ze&&ol(w,Se),ie}function ue(w,y,A,B){if(A==null)throw Error(r(151));for(var ie=null,Me=null,P=y,Se=y=0,Ee=null,De=A.next();P!==null&&!De.done;Se++,De=A.next()){P.index>Se?(Ee=P,P=null):Ee=P.sibling;var Ql=O(w,P,De.value,B);if(Ql===null){P===null&&(P=Ee);break}e&&P&&Ql.alternate===null&&t(w,P),y=i(Ql,y,Se),Me===null?ie=Ql:Me.sibling=Ql,Me=Ql,P=Ee}if(De.done)return l(w,P),ze&&ol(w,Se),ie;if(P===null){for(;!De.done;Se++,De=A.next())De=H(w,De.value,B),De!==null&&(y=i(De,y,Se),Me===null?ie=De:Me.sibling=De,Me=De);return ze&&ol(w,Se),ie}for(P=a(P);!De.done;Se++,De=A.next())De=D(P,w,Se,De.value,B),De!==null&&(e&&De.alternate!==null&&P.delete(De.key===null?Se:De.key),y=i(De,y,Se),Me===null?ie=De:Me.sibling=De,Me=De);return e&&P.forEach(function(px){return t(w,px)}),ze&&ol(w,Se),ie}function Qe(w,y,A,B){if(typeof A=="object"&&A!==null&&A.type===Z&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case J:e:{for(var ie=A.key;y!==null;){if(y.key===ie){if(ie=A.type,ie===Z){if(y.tag===7){l(w,y.sibling),B=n(y,A.props.children),B.return=w,w=B;break e}}else if(y.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ne&&ra(ie)===y.type){l(w,y.sibling),B=n(y,A.props),Ss(B,A),B.return=w,w=B;break e}l(w,y);break}else t(w,y);y=y.sibling}A.type===Z?(B=aa(A.props.children,w.mode,B,A.key),B.return=w,w=B):(B=vn(A.type,A.key,A.props,null,w.mode,B),Ss(B,A),B.return=w,w=B)}return c(w);case R:e:{for(ie=A.key;y!==null;){if(y.key===ie)if(y.tag===4&&y.stateNode.containerInfo===A.containerInfo&&y.stateNode.implementation===A.implementation){l(w,y.sibling),B=n(y,A.children||[]),B.return=w,w=B;break e}else{l(w,y);break}else t(w,y);y=y.sibling}B=sc(A,w.mode,B),B.return=w,w=B}return c(w);case ne:return A=ra(A),Qe(w,y,A,B)}if(he(A))return W(w,y,A,B);if(K(A)){if(ie=K(A),typeof ie!="function")throw Error(r(150));return A=ie.call(A),ue(w,y,A,B)}if(typeof A.then=="function")return Qe(w,y,_n(A),B);if(A.$$typeof===be)return Qe(w,y,Nn(w,A),B);An(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,y!==null&&y.tag===6?(l(w,y.sibling),B=n(y,A),B.return=w,w=B):(l(w,y),B=ac(A,w.mode,B),B.return=w,w=B),c(w)):l(w,y)}return function(w,y,A,B){try{vs=0;var ie=Qe(w,y,A,B);return Ba=null,ie}catch(P){if(P===qa||P===wn)throw P;var Me=Dt(29,P,null,w.mode);return Me.lanes=B,Me.return=w,Me}finally{}}}var ua=ju(!0),Nu=ju(!1),El=!1;function pc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(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 zl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ol(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Re&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=gn(e),iu(e,null,l),t}return yn(e,a,t,l),gn(e)}function js(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,mo(e,l)}}function yc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=c:i=i.next=c,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var gc=!1;function Ns(){if(gc){var e=La;if(e!==null)throw e}}function ks(e,t,l,a){gc=!1;var n=e.updateQueue;El=!1;var i=n.firstBaseUpdate,c=n.lastBaseUpdate,o=n.shared.pending;if(o!==null){n.shared.pending=null;var p=o,E=p.next;p.next=null,c===null?i=E:c.next=E,c=p;var q=e.alternate;q!==null&&(q=q.updateQueue,o=q.lastBaseUpdate,o!==c&&(o===null?q.firstBaseUpdate=E:o.next=E,q.lastBaseUpdate=p))}if(i!==null){var H=n.baseState;c=0,q=E=p=null,o=i;do{var O=o.lane&-536870913,D=O!==o.lane;if(D?(Ae&O)===O:(a&O)===O){O!==0&&O===Ra&&(gc=!0),q!==null&&(q=q.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var W=e,ue=o;O=t;var Qe=l;switch(ue.tag){case 1:if(W=ue.payload,typeof W=="function"){H=W.call(Qe,H,O);break e}H=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=ue.payload,O=typeof W=="function"?W.call(Qe,H,O):W,O==null)break e;H=k({},H,O);break e;case 2:El=!0}}O=o.callback,O!==null&&(e.flags|=64,D&&(e.flags|=8192),D=n.callbacks,D===null?n.callbacks=[O]:D.push(O))}else D={lane:O,tag:o.tag,payload:o.payload,callback:o.callback,next:null},q===null?(E=q=D,p=H):q=q.next=D,c|=O;if(o=o.next,o===null){if(o=n.shared.pending,o===null)break;D=o,o=D.next,D.next=null,n.lastBaseUpdate=D,n.shared.pending=null}}while(!0);q===null&&(p=H),n.baseState=p,n.firstBaseUpdate=E,n.lastBaseUpdate=q,i===null&&(n.shared.lanes=0),Rl|=c,e.lanes=c,e.memoizedState=H}}function ku(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function wu(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ku(l[e],t)}var Ha=h(null),En=h(0);function Cu(e,t){e=vl,V(En,e),V(Ha,t),vl=e|t.baseLanes}function vc(){V(En,vl),V(Ha,Ha.current)}function Sc(){vl=En.current,_(Ha),_(En)}var Ut=h(null),Jt=null;function Tl(e){var t=e.alternate;V(nt,nt.current&1),V(Ut,e),Jt===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(Jt=e)}function jc(e){V(nt,nt.current),V(Ut,e),Jt===null&&(Jt=e)}function _u(e){e.tag===22?(V(nt,nt.current),V(Ut,e),Jt===null&&(Jt=e)):Ml()}function Ml(){V(nt,nt.current),V(Ut,Ut.current)}function Rt(e){_(Ut),Jt===e&&(Jt=null),_(nt)}var nt=h(0);function zn(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Ar(l)||Er(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 fl=0,ye=null,Ze=null,rt=null,On=!1,Va=!1,da=!1,Tn=0,ws=0,Ya=null,im=0;function tt(){throw Error(r(321))}function Nc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Mt(e[l],t[l]))return!1;return!0}function kc(e,t,l,a,n,i){return fl=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?ud:Bc,da=!1,i=l(a,n),da=!1,Va&&(i=Eu(t,l,a,n)),Au(e),i}function Au(e){T.H=As;var t=Ze!==null&&Ze.next!==null;if(fl=0,rt=Ze=ye=null,On=!1,ws=0,Ya=null,t)throw Error(r(300));e===null||ot||(e=e.dependencies,e!==null&&jn(e)&&(ot=!0))}function Eu(e,t,l,a){ye=e;var n=0;do{if(Va&&(Ya=null),ws=0,Va=!1,25<=n)throw Error(r(301));if(n+=1,rt=Ze=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=dd,i=t(l,a)}while(Va);return i}function cm(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Cs(t):t,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(ye.flags|=1024),t}function wc(){var e=Tn!==0;return Tn=0,e}function Cc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function _c(e){if(On){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}On=!1}fl=0,rt=Ze=ye=null,Va=!1,ws=Tn=0,Ya=null}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?ye.memoizedState=rt=e:rt=rt.next=e,rt}function it(){if(Ze===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=rt===null?ye.memoizedState:rt.next;if(t!==null)rt=t,Ze=e;else{if(e===null)throw ye.alternate===null?Error(r(467)):Error(r(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},rt===null?ye.memoizedState=rt=e:rt=rt.next=e}return rt}function Mn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cs(e){var t=ws;return ws+=1,Ya===null&&(Ya=[]),e=gu(Ya,e,t),t=ye,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?ud:Bc),e}function Dn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Cs(e);if(e.$$typeof===be)return bt(e)}throw Error(r(438,String(e)))}function Ac(e){var t=null,l=ye.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ye.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Mn(),ye.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=m;return t.index++,l}function hl(e,t){return typeof t=="function"?t(e):t}function Un(e){var t=it();return Ec(t,Ze,e)}function Ec(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var c=n.next;n.next=i.next,i.next=c}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var o=c=null,p=null,E=t,q=!1;do{var H=E.lane&-536870913;if(H!==E.lane?(Ae&H)===H:(fl&H)===H){var O=E.revertLane;if(O===0)p!==null&&(p=p.next={lane:0,revertLane:0,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),H===Ra&&(q=!0);else if((fl&O)===O){E=E.next,O===Ra&&(q=!0);continue}else H={lane:0,revertLane:E.revertLane,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},p===null?(o=p=H,c=i):p=p.next=H,ye.lanes|=O,Rl|=O;H=E.action,da&&l(i,H),i=E.hasEagerState?E.eagerState:l(i,H)}else O={lane:H,revertLane:E.revertLane,gesture:E.gesture,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},p===null?(o=p=O,c=i):p=p.next=O,ye.lanes|=H,Rl|=H;E=E.next}while(E!==null&&E!==t);if(p===null?c=i:p.next=o,!Mt(i,e.memoizedState)&&(ot=!0,q&&(l=La,l!==null)))throw l;e.memoizedState=i,e.baseState=c,e.baseQueue=p,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function zc(e){var t=it(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var c=n=n.next;do i=e(i,c.action),c=c.next;while(c!==n);Mt(i,t.memoizedState)||(ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function zu(e,t,l){var a=ye,n=it(),i=ze;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var c=!Mt((Ze||n).memoizedState,l);if(c&&(n.memoizedState=l,ot=!0),n=n.queue,Mc(Mu.bind(null,a,n,e),[e]),n.getSnapshot!==t||c||rt!==null&&rt.memoizedState.tag&1){if(a.flags|=2048,Ga(9,{destroy:void 0},Tu.bind(null,a,n,l,t),null),Xe===null)throw Error(r(349));i||(fl&127)!==0||Ou(a,t,l)}return l}function Ou(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ye.updateQueue,t===null?(t=Mn(),ye.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Tu(e,t,l,a){t.value=l,t.getSnapshot=a,Du(t)&&Uu(e)}function Mu(e,t,l){return l(function(){Du(t)&&Uu(e)})}function Du(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Mt(e,l)}catch{return!0}}function Uu(e){var t=la(e,2);t!==null&&Ot(t,e,2)}function Oc(e){var t=kt();if(typeof e=="function"){var l=e;if(e=l(),da){St(!0);try{l()}finally{St(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:e},t}function Ru(e,t,l,a){return e.baseState=l,Ec(e,Ze,typeof a=="function"?a:hl)}function rm(e,t,l,a,n){if(qn(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};T.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Lu(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Lu(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=T.T,c={};T.T=c;try{var o=l(n,a),p=T.S;p!==null&&p(c,o),qu(e,t,o)}catch(E){Tc(e,t,E)}finally{i!==null&&c.types!==null&&(i.types=c.types),T.T=i}}else try{i=l(n,a),qu(e,t,i)}catch(E){Tc(e,t,E)}}function qu(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Bu(e,t,a)},function(a){return Tc(e,t,a)}):Bu(e,t,l)}function Bu(e,t,l){t.status="fulfilled",t.value=l,Hu(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Lu(e,l)))}function Tc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Hu(t),t=t.next;while(t!==a)}e.action=null}function Hu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vu(e,t){return t}function Yu(e,t){if(ze){var l=Xe.formState;if(l!==null){e:{var a=ye;if(ze){if(Fe){t:{for(var n=Fe,i=Xt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Ft(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Fe=Ft(n.nextSibling),a=n.data==="F!";break e}}_l(a)}a=!1}a&&(t=l[0])}}return l=kt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vu,lastRenderedState:t},l.queue=a,l=cd.bind(null,ye,a),a.dispatch=l,a=Oc(!1),i=qc.bind(null,ye,!1,a.queue),a=kt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=rm.bind(null,ye,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Gu(e){var t=it();return Zu(t,Ze,e)}function Zu(e,t,l){if(t=Ec(e,t,Vu)[0],e=Un(hl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Cs(t)}catch(c){throw c===qa?wn:c}else a=t;t=it();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(ye.flags|=2048,Ga(9,{destroy:void 0},om.bind(null,n,l),null)),[a,i,e]}function om(e,t){e.action=t}function Ku(e){var t=it(),l=Ze;if(l!==null)return Zu(t,l,e);it(),t=t.memoizedState,l=it();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ga(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ye.updateQueue,t===null&&(t=Mn(),ye.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Qu(){return it().memoizedState}function Rn(e,t,l,a){var n=kt();ye.flags|=e,n.memoizedState=Ga(1|t,{destroy:void 0},l,a===void 0?null:a)}function Ln(e,t,l,a){var n=it();a=a===void 0?null:a;var i=n.memoizedState.inst;Ze!==null&&a!==null&&Nc(a,Ze.memoizedState.deps)?n.memoizedState=Ga(t,i,l,a):(ye.flags|=e,n.memoizedState=Ga(1|t,i,l,a))}function Xu(e,t){Rn(8390656,8,e,t)}function Mc(e,t){Ln(2048,8,e,t)}function um(e){ye.flags|=4;var t=ye.updateQueue;if(t===null)t=Mn(),ye.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ju(e){var t=it().memoizedState;return um({ref:t,nextImpl:e}),function(){if((Re&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Fu(e,t){return Ln(4,2,e,t)}function $u(e,t){return Ln(4,4,e,t)}function Iu(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 Wu(e,t,l){l=l!=null?l.concat([e]):null,Ln(4,4,Iu.bind(null,t,e),l)}function Dc(){}function Pu(e,t){var l=it();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Nc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function ed(e,t){var l=it();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Nc(t,a[1]))return a[0];if(a=e(),da){St(!0);try{e()}finally{St(!1)}}return l.memoizedState=[a,t],a}function Uc(e,t,l){return l===void 0||(fl&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=tf(),ye.lanes|=e,Rl|=e,l)}function td(e,t,l,a){return Mt(l,t)?l:Ha.current!==null?(e=Uc(e,l,a),Mt(e,t)||(ot=!0),e):(fl&42)===0||(fl&1073741824)!==0&&(Ae&261930)===0?(ot=!0,e.memoizedState=l):(e=tf(),ye.lanes|=e,Rl|=e,t)}function ld(e,t,l,a,n){var i=M.p;M.p=i!==0&&8>i?i:8;var c=T.T,o={};T.T=o,qc(e,!1,t,l);try{var p=n(),E=T.S;if(E!==null&&E(o,p),p!==null&&typeof p=="object"&&typeof p.then=="function"){var q=nm(p,a);_s(e,t,q,Bt(e))}else _s(e,t,a,Bt(e))}catch(H){_s(e,t,{then:function(){},status:"rejected",reason:H},Bt())}finally{M.p=i,c!==null&&o.types!==null&&(c.types=o.types),T.T=c}}function dm(){}function Rc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=ad(e).queue;ld(e,n,t,Y,l===null?dm:function(){return sd(e),l(a)})}function ad(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:Y},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sd(e){var t=ad(e);t.next===null&&(t=e.alternate.memoizedState),_s(e,t.next.queue,{},Bt())}function Lc(){return bt(Zs)}function nd(){return it().memoizedState}function id(){return it().memoizedState}function fm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Bt();e=zl(l);var a=Ol(t,e,l);a!==null&&(Ot(a,t,l),js(a,t,l)),t={cache:fc()},e.payload=t;return}t=t.return}}function hm(e,t,l){var a=Bt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qn(e)?rd(t,l):(l=tc(e,t,l,a),l!==null&&(Ot(l,e,a),od(l,t,a)))}function cd(e,t,l){var a=Bt();_s(e,t,l,a)}function _s(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(qn(e))rd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,o=i(c,l);if(n.hasEagerState=!0,n.eagerState=o,Mt(o,c))return yn(e,t,n,0),Xe===null&&bn(),!1}catch{}finally{}if(l=tc(e,t,n,a),l!==null)return Ot(l,e,a),od(l,t,a),!0}return!1}function qc(e,t,l,a){if(a={lane:2,revertLane:pr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},qn(e)){if(t)throw Error(r(479))}else t=tc(e,l,a,2),t!==null&&Ot(t,e,2)}function qn(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function rd(e,t){Va=On=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function od(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,mo(e,l)}}var As={readContext:bt,use:Dn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};As.useEffectEvent=tt;var ud={readContext:bt,use:Dn,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Xu,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Rn(4194308,4,Iu.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Rn(4194308,4,e,t)},useInsertionEffect:function(e,t){Rn(4,2,e,t)},useMemo:function(e,t){var l=kt();t=t===void 0?null:t;var a=e();if(da){St(!0);try{e()}finally{St(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=kt();if(l!==void 0){var n=l(t);if(da){St(!0);try{l(t)}finally{St(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=hm.bind(null,ye,e),[a.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:function(e){e=Oc(e);var t=e.queue,l=cd.bind(null,ye,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Dc,useDeferredValue:function(e,t){var l=kt();return Uc(l,e,t)},useTransition:function(){var e=Oc(!1);return e=ld.bind(null,ye,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ye,n=kt();if(ze){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Xe===null)throw Error(r(349));(Ae&127)!==0||Ou(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Xu(Mu.bind(null,a,i,e),[e]),a.flags|=2048,Ga(9,{destroy:void 0},Tu.bind(null,a,i,l,t),null),l},useId:function(){var e=kt(),t=Xe.identifierPrefix;if(ze){var l=tl,a=el;l=(a&~(1<<32-dt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Tn++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=im++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lc,useFormState:Yu,useActionState:Yu,useOptimistic:function(e){var t=kt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=qc.bind(null,ye,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ac,useCacheRefresh:function(){return kt().memoizedState=fm.bind(null,ye)},useEffectEvent:function(e){var t=kt(),l={impl:e};return t.memoizedState=l,function(){if((Re&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Bc={readContext:bt,use:Dn,useCallback:Pu,useContext:bt,useEffect:Mc,useImperativeHandle:Wu,useInsertionEffect:Fu,useLayoutEffect:$u,useMemo:ed,useReducer:Un,useRef:Qu,useState:function(){return Un(hl)},useDebugValue:Dc,useDeferredValue:function(e,t){var l=it();return td(l,Ze.memoizedState,e,t)},useTransition:function(){var e=Un(hl)[0],t=it().memoizedState;return[typeof e=="boolean"?e:Cs(e),t]},useSyncExternalStore:zu,useId:nd,useHostTransitionStatus:Lc,useFormState:Gu,useActionState:Gu,useOptimistic:function(e,t){var l=it();return Ru(l,Ze,e,t)},useMemoCache:Ac,useCacheRefresh:id};Bc.useEffectEvent=Ju;var dd={readContext:bt,use:Dn,useCallback:Pu,useContext:bt,useEffect:Mc,useImperativeHandle:Wu,useInsertionEffect:Fu,useLayoutEffect:$u,useMemo:ed,useReducer:zc,useRef:Qu,useState:function(){return zc(hl)},useDebugValue:Dc,useDeferredValue:function(e,t){var l=it();return Ze===null?Uc(l,e,t):td(l,Ze.memoizedState,e,t)},useTransition:function(){var e=zc(hl)[0],t=it().memoizedState;return[typeof e=="boolean"?e:Cs(e),t]},useSyncExternalStore:zu,useId:nd,useHostTransitionStatus:Lc,useFormState:Ku,useActionState:Ku,useOptimistic:function(e,t){var l=it();return Ze!==null?Ru(l,Ze,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ac,useCacheRefresh:id};dd.useEffectEvent=Ju;function Hc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:k({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Vc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Bt(),n=zl(a);n.payload=t,l!=null&&(n.callback=l),t=Ol(e,n,a),t!==null&&(Ot(t,e,a),js(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Bt(),n=zl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Ol(e,n,a),t!==null&&(Ot(t,e,a),js(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Bt(),a=zl(l);a.tag=2,t!=null&&(a.callback=t),t=Ol(e,a,l),t!==null&&(Ot(t,e,l),js(t,e,l))}};function fd(e,t,l,a,n,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!ms(l,a)||!ms(n,i):!0}function hd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function fa(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=k({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function md(e){pn(e)}function xd(e){console.error(e)}function pd(e){pn(e)}function Bn(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function bd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Yc(e,t,l){return l=zl(l),l.tag=3,l.payload={element:null},l.callback=function(){Bn(e,t)},l}function yd(e){return e=zl(e),e.tag=3,e}function gd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){bd(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){bd(t,l,a),typeof n!="function"&&(Ll===null?Ll=new Set([this]):Ll.add(this));var o=a.stack;this.componentDidCatch(a.value,{componentStack:o!==null?o:""})})}function mm(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ua(t,l,n,!0),l=Ut.current,l!==null){switch(l.tag){case 31:case 13:return Jt===null?In():l.alternate===null&<===0&&(lt=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Cn?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),hr(e,a,n)),!1;case 22:return l.flags|=65536,a===Cn?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),hr(e,a,n)),!1}throw Error(r(435,l.tag))}return hr(e,a,n),In(),!1}if(ze)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==cc&&(e=Error(r(422),{cause:a}),bs(Zt(e,l)))):(a!==cc&&(t=Error(r(423),{cause:a}),bs(Zt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Zt(a,l),n=Yc(e.stateNode,a,n),yc(e,n),lt!==4&&(lt=2)),!1;var i=Error(r(520),{cause:a});if(i=Zt(i,l),Rs===null?Rs=[i]:Rs.push(i),lt!==4&&(lt=2),t===null)return!0;a=Zt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Yc(l.stateNode,a,e),yc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ll===null||!Ll.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=yd(n),gd(n,e,l,a),yc(l,n),!1}l=l.return}while(l!==null);return!1}var Gc=Error(r(461)),ot=!1;function yt(e,t,l,a){t.child=e===null?Nu(t,null,l,a):ua(t,e.child,l,a)}function vd(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var c={};for(var o in a)o!=="ref"&&(c[o]=a[o])}else c=a;return ia(t),a=kc(e,t,l,c,i,n),o=wc(),e!==null&&!ot?(Cc(e,t,n),ml(e,t,n)):(ze&&o&&nc(t),t.flags|=1,yt(e,t,a,n),t.child)}function Sd(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!lc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,jd(e,t,i,a,n)):(e=vn(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Ic(e,n)){var c=i.memoizedProps;if(l=l.compare,l=l!==null?l:ms,l(c,a)&&e.ref===t.ref)return ml(e,t,n)}return t.flags|=1,e=rl(i,a),e.ref=t.ref,e.return=t,t.child=e}function jd(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(ms(i,a)&&e.ref===t.ref)if(ot=!1,t.pendingProps=a=i,Ic(e,n))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,ml(e,t,n)}return Zc(e,t,l,a,n)}function Nd(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return kd(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kn(t,i!==null?i.cachePool:null),i!==null?Cu(t,i):vc(),_u(t);else return a=t.lanes=536870912,kd(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(kn(t,i.cachePool),Cu(t,i),Ml(),t.memoizedState=null):(e!==null&&kn(t,null),vc(),Ml());return yt(e,t,n,l),t.child}function Es(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function kd(e,t,l,a,n){var i=mc();return i=i===null?null:{parent:ct._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&kn(t,null),vc(),_u(t),e!==null&&Ua(e,t,a,!0),t.childLanes=n,null}function Hn(e,t){return t=Yn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wd(e,t,l){return ua(t,e.child,null,l),e=Hn(t,t.pendingProps),e.flags|=2,Rt(t),t.memoizedState=null,e}function xm(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(a.mode==="hidden")return e=Hn(t,a),t.lanes=536870912,Es(null,e);if(jc(t),(e=Fe)?(e=qf(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wl!==null?{id:el,overflow:tl}:null,retryLane:536870912,hydrationErrors:null},l=ru(e),l.return=t,t.child=l,pt=t,Fe=null)):e=null,e===null)throw _l(t);return t.lanes=536870912,null}return Hn(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(jc(t),n)if(t.flags&256)t.flags&=-257,t=wd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ot||Ua(e,t,l,!1),n=(l&e.childLanes)!==0,ot||n){if(a=Xe,a!==null&&(c=xo(a,l),c!==0&&c!==i.retryLane))throw i.retryLane=c,la(e,c),Ot(a,e,c),Gc;In(),t=wd(e,t,l)}else e=i.treeContext,Fe=Ft(c.nextSibling),pt=t,ze=!0,Cl=null,Xt=!1,e!==null&&du(t,e),t=Hn(t,a),t.flags|=4096;return t}return e=rl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Vn(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Zc(e,t,l,a,n){return ia(t),l=kc(e,t,l,a,void 0,n),a=wc(),e!==null&&!ot?(Cc(e,t,n),ml(e,t,n)):(ze&&a&&nc(t),t.flags|=1,yt(e,t,l,n),t.child)}function Cd(e,t,l,a,n,i){return ia(t),t.updateQueue=null,l=Eu(t,a,l,n),Au(e),a=wc(),e!==null&&!ot?(Cc(e,t,i),ml(e,t,i)):(ze&&a&&nc(t),t.flags|=1,yt(e,t,l,i),t.child)}function _d(e,t,l,a,n){if(ia(t),t.stateNode===null){var i=Oa,c=l.contextType;typeof c=="object"&&c!==null&&(i=bt(c)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Vc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},pc(t),c=l.contextType,i.context=typeof c=="object"&&c!==null?bt(c):Oa,i.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(Hc(t,l,c,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Vc.enqueueReplaceState(i,i.state,null),ks(t,a,i,n),Ns(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,p=fa(l,o);i.props=p;var E=i.context,q=l.contextType;c=Oa,typeof q=="object"&&q!==null&&(c=bt(q));var H=l.getDerivedStateFromProps;q=typeof H=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,q||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||E!==c)&&hd(t,i,a,c),El=!1;var O=t.memoizedState;i.state=O,ks(t,a,i,n),Ns(),E=t.memoizedState,o||O!==E||El?(typeof H=="function"&&(Hc(t,l,H,a),E=t.memoizedState),(p=El||fd(t,l,p,a,O,E,c))?(q||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=E),i.props=a,i.state=E,i.context=c,a=p):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,bc(e,t),c=t.memoizedProps,q=fa(l,c),i.props=q,H=t.pendingProps,O=i.context,E=l.contextType,p=Oa,typeof E=="object"&&E!==null&&(p=bt(E)),o=l.getDerivedStateFromProps,(E=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==H||O!==p)&&hd(t,i,a,p),El=!1,O=t.memoizedState,i.state=O,ks(t,a,i,n),Ns();var D=t.memoizedState;c!==H||O!==D||El||e!==null&&e.dependencies!==null&&jn(e.dependencies)?(typeof o=="function"&&(Hc(t,l,o,a),D=t.memoizedState),(q=El||fd(t,l,q,a,O,D,p)||e!==null&&e.dependencies!==null&&jn(e.dependencies))?(E||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,D,p),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,D,p)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=D),i.props=a,i.state=D,i.context=p,a=q):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Vn(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ua(t,e.child,null,n),t.child=ua(t,null,l,n)):yt(e,t,l,n),t.memoizedState=i.state,e=t.child):e=ml(e,t,n),e}function Ad(e,t,l,a){return sa(),t.flags|=256,yt(e,t,l,a),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qc(e){return{baseLanes:e,cachePool:bu()}}function Xc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=qt),e}function Ed(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),c&&(n=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(n?Tl(t):Ml(),(e=Fe)?(e=qf(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wl!==null?{id:el,overflow:tl}:null,retryLane:536870912,hydrationErrors:null},l=ru(e),l.return=t,t.child=l,pt=t,Fe=null)):e=null,e===null)throw _l(t);return Er(e)?t.lanes=32:t.lanes=536870912,null}var o=a.children;return a=a.fallback,n?(Ml(),n=t.mode,o=Yn({mode:"hidden",children:o},n),a=aa(a,n,l,null),o.return=t,a.return=t,o.sibling=a,t.child=o,a=t.child,a.memoizedState=Qc(l),a.childLanes=Xc(e,c,l),t.memoizedState=Kc,Es(null,a)):(Tl(t),Jc(t,o))}var p=e.memoizedState;if(p!==null&&(o=p.dehydrated,o!==null)){if(i)t.flags&256?(Tl(t),t.flags&=-257,t=Fc(e,t,l)):t.memoizedState!==null?(Ml(),t.child=e.child,t.flags|=128,t=null):(Ml(),o=a.fallback,n=t.mode,a=Yn({mode:"visible",children:a.children},n),o=aa(o,n,l,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ua(t,e.child,null,l),a=t.child,a.memoizedState=Qc(l),a.childLanes=Xc(e,c,l),t.memoizedState=Kc,t=Es(null,a));else if(Tl(t),Er(o)){if(c=o.nextSibling&&o.nextSibling.dataset,c)var E=c.dgst;c=E,a=Error(r(419)),a.stack="",a.digest=c,bs({value:a,source:null,stack:null}),t=Fc(e,t,l)}else if(ot||Ua(e,t,l,!1),c=(l&e.childLanes)!==0,ot||c){if(c=Xe,c!==null&&(a=xo(c,l),a!==0&&a!==p.retryLane))throw p.retryLane=a,la(e,a),Ot(c,e,a),Gc;Ar(o)||In(),t=Fc(e,t,l)}else Ar(o)?(t.flags|=192,t.child=e.child,t=null):(e=p.treeContext,Fe=Ft(o.nextSibling),pt=t,ze=!0,Cl=null,Xt=!1,e!==null&&du(t,e),t=Jc(t,a.children),t.flags|=4096);return t}return n?(Ml(),o=a.fallback,n=t.mode,p=e.child,E=p.sibling,a=rl(p,{mode:"hidden",children:a.children}),a.subtreeFlags=p.subtreeFlags&65011712,E!==null?o=rl(E,o):(o=aa(o,n,l,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,Es(null,a),a=t.child,o=e.child.memoizedState,o===null?o=Qc(l):(n=o.cachePool,n!==null?(p=ct._currentValue,n=n.parent!==p?{parent:p,pool:p}:n):n=bu(),o={baseLanes:o.baseLanes|l,cachePool:n}),a.memoizedState=o,a.childLanes=Xc(e,c,l),t.memoizedState=Kc,Es(e.child,a)):(Tl(t),l=e.child,e=l.sibling,l=rl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function Jc(e,t){return t=Yn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yn(e,t){return e=Dt(22,e,null,t),e.lanes=0,e}function Fc(e,t,l){return ua(t,e.child,null,l),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),uc(e.return,t,l)}function $c(e,t,l,a,n,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=n,c.treeForkCount=i)}function Od(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var c=nt.current,o=(c&2)!==0;if(o?(c=c&1|2,t.flags|=128):c&=1,V(nt,c),yt(e,t,a,l),a=ze?ps:0,!o&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zd(e,l,t);else if(e.tag===19)zd(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&&zn(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),$c(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&zn(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}$c(t,!0,l,null,i,a);break;case"together":$c(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function ml(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Rl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ua(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=rl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=rl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Ic(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&jn(e)))}function pm(e,t,l){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),Al(t,ct,e.memoizedState.cache),sa();break;case 27:case 5:me(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:Al(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,jc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Tl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Ed(e,t,l):(Tl(t),e=ml(e,t,l),e!==null?e.sibling:null);Tl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ua(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Od(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),V(nt,nt.current),a)break;return null;case 22:return t.lanes=0,Nd(e,t,l,t.pendingProps);case 24:Al(t,ct,e.memoizedState.cache)}return ml(e,t,l)}function Td(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!Ic(e,l)&&(t.flags&128)===0)return ot=!1,pm(e,t,l);ot=(e.flags&131072)!==0}else ot=!1,ze&&(t.flags&1048576)!==0&&uu(t,ps,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ra(t.elementType),t.type=e,typeof e=="function")lc(e)?(a=fa(e,a),t.tag=1,t=_d(null,t,e,a,l)):(t.tag=0,t=Zc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===Oe){t.tag=11,t=vd(null,t,e,a,l);break e}else if(n===F){t.tag=14,t=Sd(null,t,e,a,l);break e}}throw t=te(e)||e,Error(r(306,t,""))}}return t;case 0:return Zc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=fa(a,t.pendingProps),_d(e,t,a,n,l);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,bc(e,t),ks(t,a,null,l);var c=t.memoizedState;if(a=c.cache,Al(t,ct,a),a!==i.cache&&dc(t,[ct],l,!0),Ns(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Ad(e,t,a,l);break e}else if(a!==n){n=Zt(Error(r(424)),t),bs(n),t=Ad(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Fe=Ft(e.firstChild),pt=t,ze=!0,Cl=null,Xt=!0,l=Nu(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(sa(),a===n){t=ml(e,t,l);break e}yt(e,t,a,l)}t=t.child}return t;case 26:return Vn(e,t),e===null?(l=Zf(t.type,null,t.pendingProps,null))?t.memoizedState=l:ze||(l=t.type,e=t.pendingProps,a=si($.current).createElement(l),a[xt]=t,a[wt]=e,gt(a,l,e),ht(a),t.stateNode=a):t.memoizedState=Zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&ze&&(a=t.stateNode=Vf(t.type,t.pendingProps,$.current),pt=t,Xt=!0,n=Fe,Vl(t.type)?(zr=n,Fe=Ft(a.firstChild)):Fe=n),yt(e,t,t.pendingProps.children,l),Vn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((n=a=Fe)&&(a=Qm(a,t.type,t.pendingProps,Xt),a!==null?(t.stateNode=a,pt=t,Fe=Ft(a.firstChild),Xt=!1,n=!0):n=!1),n||_l(t)),me(t),n=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,wr(n,i)?a=null:c!==null&&wr(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=kc(e,t,cm,null,null,l),Zs._currentValue=n),Vn(e,t),yt(e,t,a,l),t.child;case 6:return e===null&&ze&&((e=l=Fe)&&(l=Xm(l,t.pendingProps,Xt),l!==null?(t.stateNode=l,pt=t,Fe=null,e=!0):e=!1),e||_l(t)),null;case 13:return Ed(e,t,l);case 4:return He(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ua(t,null,a,l):yt(e,t,a,l),t.child;case 11:return vd(e,t,t.type,t.pendingProps,l);case 7:return yt(e,t,t.pendingProps,l),t.child;case 8:return yt(e,t,t.pendingProps.children,l),t.child;case 12:return yt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Al(t,t.type,a.value),yt(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,ia(t),n=bt(n),a=a(n),t.flags|=1,yt(e,t,a,l),t.child;case 14:return Sd(e,t,t.type,t.pendingProps,l);case 15:return jd(e,t,t.type,t.pendingProps,l);case 19:return Od(e,t,l);case 31:return xm(e,t,l);case 22:return Nd(e,t,l,t.pendingProps);case 24:return ia(t),a=bt(ct),e===null?(n=mc(),n===null&&(n=Xe,i=fc(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},pc(t),Al(t,ct,n)):((e.lanes&l)!==0&&(bc(e,t),ks(t,null,null,l),Ns()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Al(t,ct,a)):(a=i.cache,Al(t,ct,a),a!==n.cache&&dc(t,[ct],l,!0))),yt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function xl(e){e.flags|=4}function Wc(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(nf())e.flags|=8192;else throw oa=Cn,xc}else e.flags&=-16777217}function Md(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ff(t))if(nf())e.flags|=8192;else throw oa=Cn,xc}function Gn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?fo():536870912,e.lanes|=t,Xa|=t)}function zs(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function bm(e,t,l){var a=t.pendingProps;switch(ic(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),dl(ct),ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Da(t)?xl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rc())),$e(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(xl(t),i!==null?($e(t),Md(t,i)):($e(t),Wc(t,n,null,a,l))):i?i!==e.memoizedState?(xl(t),$e(t),Md(t,i)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&xl(t),$e(t),Wc(t,n,e,a,l)),null;case 27:if(Le(t),l=$.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return $e(t),null}e=L.current,Da(t)?fu(t):(e=Vf(n,a,l),t.stateNode=e,xl(t))}return $e(t),null;case 5:if(Le(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return $e(t),null}if(i=L.current,Da(t))fu(t);else{var c=si($.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}i[xt]=t,i[wt]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(gt(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&xl(t)}}return $e(t),Wc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&xl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=$.current,Da(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=pt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[xt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||zf(e.nodeValue,l)),e||_l(t,!0)}else e=si(e).createTextNode(a),e[xt]=t,t.stateNode=e}return $e(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Da(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[xt]=t}else sa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else l=rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Rt(t),t):(Rt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return $e(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Da(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[xt]=t}else sa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),n=!1}else n=rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Rt(t),t):(Rt(t),null)}return Rt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Gn(t,t.updateQueue),$e(t),null);case 4:return ae(),e===null&&vr(t.stateNode.containerInfo),$e(t),null;case 10:return dl(t.type),$e(t),null;case 19:if(_(nt),a=t.memoizedState,a===null)return $e(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)zs(a,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=zn(e),i!==null){for(t.flags|=128,zs(a,!1),e=i.updateQueue,t.updateQueue=e,Gn(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)cu(l,e),l=l.sibling;return V(nt,nt.current&1|2),ze&&ol(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&We()>Jn&&(t.flags|=128,n=!0,zs(a,!1),t.lanes=4194304)}else{if(!n)if(e=zn(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Gn(t,e),zs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ze)return $e(t),null}else 2*We()-a.renderingStartTime>Jn&&l!==536870912&&(t.flags|=128,n=!0,zs(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=We(),e.sibling=null,l=nt.current,V(nt,n?l&1|2:l&1),ze&&ol(t,a.treeForkCount),e):($e(t),null);case 22:case 23:return Rt(t),Sc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),l=t.updateQueue,l!==null&&Gn(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&_(ca),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),dl(ct),$e(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function ym(e,t){switch(ic(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dl(ct),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Le(t),null;case 31:if(t.memoizedState!==null){if(Rt(t),t.alternate===null)throw Error(r(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Rt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(nt),null;case 4:return ae(),null;case 10:return dl(t.type),null;case 22:case 23:return Rt(t),Sc(),e!==null&&_(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return dl(ct),null;case 25:return null;default:return null}}function Dd(e,t){switch(ic(t),t.tag){case 3:dl(ct),ae();break;case 26:case 27:case 5:Le(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&Rt(t);break;case 13:Rt(t);break;case 19:_(nt);break;case 10:dl(t.type);break;case 22:case 23:Rt(t),Sc(),e!==null&&_(ca);break;case 24:dl(ct)}}function Os(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,c=l.inst;a=i(),c.destroy=a}l=l.next}while(l!==n)}}catch(o){Ye(t,t.return,o)}}function Dl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var c=a.inst,o=c.destroy;if(o!==void 0){c.destroy=void 0,n=t;var p=l,E=o;try{E()}catch(q){Ye(n,p,q)}}}a=a.next}while(a!==i)}}catch(q){Ye(t,t.return,q)}}function Ud(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{wu(t,l)}catch(a){Ye(e,e.return,a)}}}function Rd(e,t,l){l.props=fa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ye(e,t,a)}}function Ts(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ye(e,t,n)}}function ll(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ye(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ye(e,t,n)}else l.current=null}function Ld(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ye(e,e.return,n)}}function Pc(e,t,l){try{var a=e.stateNode;Hm(a,e.type,l,t),a[wt]=t}catch(n){Ye(e,e.return,n)}}function qd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vl(e.type)||e.tag===4}function er(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qd(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&&Vl(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 tr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=il));else if(a!==4&&(a===27&&Vl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(tr(e,t,l),e=e.sibling;e!==null;)tr(e,t,l),e=e.sibling}function Zn(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Vl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Zn(e,t,l),e=e.sibling;e!==null;)Zn(e,t,l),e=e.sibling}function Bd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);gt(t,a,l),t[xt]=e,t[wt]=l}catch(i){Ye(e,e.return,i)}}var pl=!1,ut=!1,lr=!1,Hd=typeof WeakSet=="function"?WeakSet:Set,mt=null;function gm(e,t){if(e=e.containerInfo,Nr=di,e=Wo(e),Fi(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var c=0,o=-1,p=-1,E=0,q=0,H=e,O=null;t:for(;;){for(var D;H!==l||n!==0&&H.nodeType!==3||(o=c+n),H!==i||a!==0&&H.nodeType!==3||(p=c+a),H.nodeType===3&&(c+=H.nodeValue.length),(D=H.firstChild)!==null;)O=H,H=D;for(;;){if(H===e)break t;if(O===l&&++E===n&&(o=c),O===i&&++q===a&&(p=c),(D=H.nextSibling)!==null)break;H=O,O=H.parentNode}H=D}l=o===-1||p===-1?null:{start:o,end:p}}else l=null}l=l||{start:0,end:0}}else l=null;for(kr={focusedElem:e,selectionRange:l},di=!1,mt=t;mt!==null;)if(t=mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,mt=e;else for(;mt!==null;){switch(t=mt,i=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&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var W=fa(l.type,n);e=a.getSnapshotBeforeUpdate(W,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Ye(l,l.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)_r(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_r(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,mt=e;break}mt=t.return}}function Vd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:yl(e,l),a&4&&Os(5,l);break;case 1:if(yl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){Ye(l,l.return,c)}else{var n=fa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ye(l,l.return,c)}}a&64&&Ud(l),a&512&&Ts(l,l.return);break;case 3:if(yl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{wu(e,t)}catch(c){Ye(l,l.return,c)}}break;case 27:t===null&&a&4&&Bd(l);case 26:case 5:yl(e,l),t===null&&a&4&&Ld(l),a&512&&Ts(l,l.return);break;case 12:yl(e,l);break;case 31:yl(e,l),a&4&&Zd(e,l);break;case 13:yl(e,l),a&4&&Kd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Am.bind(null,l),Jm(e,l))));break;case 22:if(a=l.memoizedState!==null||pl,!a){t=t!==null&&t.memoizedState!==null||ut,n=pl;var i=ut;pl=a,(ut=t)&&!i?gl(e,l,(l.subtreeFlags&8772)!==0):yl(e,l),pl=n,ut=i}break;case 30:break;default:yl(e,l)}}function Yd(e){var t=e.alternate;t!==null&&(e.alternate=null,Yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ti(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 Ie=null,_t=!1;function bl(e,t,l){for(l=l.child;l!==null;)Gd(e,t,l),l=l.sibling}function Gd(e,t,l){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(pe,l)}catch{}switch(l.tag){case 26:ut||ll(l,t),bl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ut||ll(l,t);var a=Ie,n=_t;Vl(l.type)&&(Ie=l.stateNode,_t=!1),bl(e,t,l),Vs(l.stateNode),Ie=a,_t=n;break;case 5:ut||ll(l,t);case 6:if(a=Ie,n=_t,Ie=null,bl(e,t,l),Ie=a,_t=n,Ie!==null)if(_t)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(l.stateNode)}catch(i){Ye(l,t,i)}else try{Ie.removeChild(l.stateNode)}catch(i){Ye(l,t,i)}break;case 18:Ie!==null&&(_t?(e=Ie,Rf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ts(e)):Rf(Ie,l.stateNode));break;case 4:a=Ie,n=_t,Ie=l.stateNode.containerInfo,_t=!0,bl(e,t,l),Ie=a,_t=n;break;case 0:case 11:case 14:case 15:Dl(2,l,t),ut||Dl(4,l,t),bl(e,t,l);break;case 1:ut||(ll(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Rd(l,t,a)),bl(e,t,l);break;case 21:bl(e,t,l);break;case 22:ut=(a=ut)||l.memoizedState!==null,bl(e,t,l),ut=a;break;default:bl(e,t,l)}}function Zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ts(e)}catch(l){Ye(t,t.return,l)}}}function Kd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ts(e)}catch(l){Ye(t,t.return,l)}}function vm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hd),t;default:throw Error(r(435,e.tag))}}function Kn(e,t){var l=vm(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Em.bind(null,e,a);a.then(n,n)}})}function At(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,c=t,o=c;e:for(;o!==null;){switch(o.tag){case 27:if(Vl(o.type)){Ie=o.stateNode,_t=!1;break e}break;case 5:Ie=o.stateNode,_t=!1;break e;case 3:case 4:Ie=o.stateNode.containerInfo,_t=!0;break e}o=o.return}if(Ie===null)throw Error(r(160));Gd(i,c,n),Ie=null,_t=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qd(t,e),t=t.sibling}var Wt=null;function Qd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:At(t,e),Et(e),a&4&&(Dl(3,e,e.return),Os(3,e),Dl(5,e,e.return));break;case 1:At(t,e),Et(e),a&512&&(ut||l===null||ll(l,l.return)),a&64&&pl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Wt;if(At(t,e),Et(e),a&512&&(ut||l===null||ll(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[ns]||i[xt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),gt(i,a,l),i[xt]=e,ht(i),a=i;break e;case"link":var c=Xf("link","href",n).get(a+(l.href||""));if(c){for(var o=0;o<c.length;o++)if(i=c[o],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(o,1);break t}}i=n.createElement(a),gt(i,a,l),n.head.appendChild(i);break;case"meta":if(c=Xf("meta","content",n).get(a+(l.content||""))){for(o=0;o<c.length;o++)if(i=c[o],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(o,1);break t}}i=n.createElement(a),gt(i,a,l),n.head.appendChild(i);break;default:throw Error(r(468,a))}i[xt]=e,ht(i),a=i}e.stateNode=a}else Jf(n,e.type,e.stateNode);else e.stateNode=Qf(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Jf(n,e.type,e.stateNode):Qf(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Pc(e,e.memoizedProps,l.memoizedProps)}break;case 27:At(t,e),Et(e),a&512&&(ut||l===null||ll(l,l.return)),l!==null&&a&4&&Pc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(At(t,e),Et(e),a&512&&(ut||l===null||ll(l,l.return)),e.flags&32){n=e.stateNode;try{ka(n,"")}catch(W){Ye(e,e.return,W)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Pc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(lr=!0);break;case 6:if(At(t,e),Et(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(W){Ye(e,e.return,W)}}break;case 3:if(ci=null,n=Wt,Wt=ni(t.containerInfo),At(t,e),Wt=n,Et(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{ts(t.containerInfo)}catch(W){Ye(e,e.return,W)}lr&&(lr=!1,Xd(e));break;case 4:a=Wt,Wt=ni(e.stateNode.containerInfo),At(t,e),Et(e),Wt=a;break;case 12:At(t,e),Et(e);break;case 31:At(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Kn(e,a)));break;case 13:At(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Xn=We()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Kn(e,a)));break;case 22:n=e.memoizedState!==null;var p=l!==null&&l.memoizedState!==null,E=pl,q=ut;if(pl=E||n,ut=q||p,At(t,e),ut=q,pl=E,Et(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||p||pl||ut||ha(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){p=l=t;try{if(i=p.stateNode,n)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{o=p.stateNode;var H=p.memoizedProps.style,O=H!=null&&H.hasOwnProperty("display")?H.display:null;o.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(W){Ye(p,p.return,W)}}}else if(t.tag===6){if(l===null){p=t;try{p.stateNode.nodeValue=n?"":p.memoizedProps}catch(W){Ye(p,p.return,W)}}}else if(t.tag===18){if(l===null){p=t;try{var D=p.stateNode;n?Lf(D,!0):Lf(p.stateNode,!1)}catch(W){Ye(p,p.return,W)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Kn(e,l))));break;case 19:At(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Kn(e,a)));break;case 30:break;case 21:break;default:At(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(qd(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var n=l.stateNode,i=er(e);Zn(e,i,n);break;case 5:var c=l.stateNode;l.flags&32&&(ka(c,""),l.flags&=-33);var o=er(e);Zn(e,o,c);break;case 3:case 4:var p=l.stateNode.containerInfo,E=er(e);tr(e,E,p);break;default:throw Error(r(161))}}catch(q){Ye(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vd(e,t.alternate,t),t=t.sibling}function ha(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Dl(4,t,t.return),ha(t);break;case 1:ll(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Rd(t,t.return,l),ha(t);break;case 27:Vs(t.stateNode);case 26:case 5:ll(t,t.return),ha(t);break;case 22:t.memoizedState===null&&ha(t);break;case 30:ha(t);break;default:ha(t)}e=e.sibling}}function gl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:gl(n,i,l),Os(4,i);break;case 1:if(gl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(E){Ye(a,a.return,E)}if(a=i,n=a.updateQueue,n!==null){var o=a.stateNode;try{var p=n.shared.hiddenCallbacks;if(p!==null)for(n.shared.hiddenCallbacks=null,n=0;n<p.length;n++)ku(p[n],o)}catch(E){Ye(a,a.return,E)}}l&&c&64&&Ud(i),Ts(i,i.return);break;case 27:Bd(i);case 26:case 5:gl(n,i,l),l&&a===null&&c&4&&Ld(i),Ts(i,i.return);break;case 12:gl(n,i,l);break;case 31:gl(n,i,l),l&&c&4&&Zd(n,i);break;case 13:gl(n,i,l),l&&c&4&&Kd(n,i);break;case 22:i.memoizedState===null&&gl(n,i,l),Ts(i,i.return);break;case 30:break;default:gl(n,i,l)}t=t.sibling}}function ar(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&&ys(l))}function sr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e))}function Pt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jd(e,t,l,a),t=t.sibling}function Jd(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Pt(e,t,l,a),n&2048&&Os(9,t);break;case 1:Pt(e,t,l,a);break;case 3:Pt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e)));break;case 12:if(n&2048){Pt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,o=i.onPostCommit;typeof o=="function"&&o(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(p){Ye(t,t.return,p)}}else Pt(e,t,l,a);break;case 31:Pt(e,t,l,a);break;case 13:Pt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?Pt(e,t,l,a):Ms(e,t):i._visibility&2?Pt(e,t,l,a):(i._visibility|=2,Za(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&ar(c,t);break;case 24:Pt(e,t,l,a),n&2048&&sr(t.alternate,t);break;default:Pt(e,t,l,a)}}function Za(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,o=l,p=a,E=c.flags;switch(c.tag){case 0:case 11:case 15:Za(i,c,o,p,n),Os(8,c);break;case 23:break;case 22:var q=c.stateNode;c.memoizedState!==null?q._visibility&2?Za(i,c,o,p,n):Ms(i,c):(q._visibility|=2,Za(i,c,o,p,n)),n&&E&2048&&ar(c.alternate,c);break;case 24:Za(i,c,o,p,n),n&&E&2048&&sr(c.alternate,c);break;default:Za(i,c,o,p,n)}t=t.sibling}}function Ms(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Ms(l,a),n&2048&&ar(a.alternate,a);break;case 24:Ms(l,a),n&2048&&sr(a.alternate,a);break;default:Ms(l,a)}t=t.sibling}}var Ds=8192;function Ka(e,t,l){if(e.subtreeFlags&Ds)for(e=e.child;e!==null;)Fd(e,t,l),e=e.sibling}function Fd(e,t,l){switch(e.tag){case 26:Ka(e,t,l),e.flags&Ds&&e.memoizedState!==null&&ix(l,Wt,e.memoizedState,e.memoizedProps);break;case 5:Ka(e,t,l);break;case 3:case 4:var a=Wt;Wt=ni(e.stateNode.containerInfo),Ka(e,t,l),Wt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ds,Ds=16777216,Ka(e,t,l),Ds=a):Ka(e,t,l));break;default:Ka(e,t,l)}}function $d(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 Us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];mt=a,Wd(a,e)}$d(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Id(e),e=e.sibling}function Id(e){switch(e.tag){case 0:case 11:case 15:Us(e),e.flags&2048&&Dl(9,e,e.return);break;case 3:Us(e);break;case 12:Us(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qn(e)):Us(e);break;default:Us(e)}}function Qn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];mt=a,Wd(a,e)}$d(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dl(8,t,t.return),Qn(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Qn(t));break;default:Qn(t)}e=e.sibling}}function Wd(e,t){for(;mt!==null;){var l=mt;switch(l.tag){case 0:case 11:case 15:Dl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ys(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,mt=a;else e:for(l=e;mt!==null;){a=mt;var n=a.sibling,i=a.return;if(Yd(a),a===l){mt=null;break e}if(n!==null){n.return=i,mt=n;break e}mt=i}}}var Sm={getCacheForType:function(e){var t=bt(ct),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return bt(ct).controller.signal}},jm=typeof WeakMap=="function"?WeakMap:Map,Re=0,Xe=null,ke=null,Ae=0,Ve=0,Lt=null,Ul=!1,Qa=!1,nr=!1,vl=0,lt=0,Rl=0,ma=0,ir=0,qt=0,Xa=0,Rs=null,zt=null,cr=!1,Xn=0,Pd=0,Jn=1/0,Fn=null,Ll=null,ft=0,ql=null,Ja=null,Sl=0,rr=0,or=null,ef=null,Ls=0,ur=null;function Bt(){return(Re&2)!==0&&Ae!==0?Ae&-Ae:T.T!==null?pr():po()}function tf(){if(qt===0)if((Ae&536870912)===0||ze){var e=ln;ln<<=1,(ln&3932160)===0&&(ln=262144),qt=e}else qt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),qt}function Ot(e,t,l){(e===Xe&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Fa(e,0),Bl(e,Ae,qt,!1)),ss(e,l),((Re&2)===0||e!==Xe)&&(e===Xe&&((Re&2)===0&&(ma|=l),lt===4&&Bl(e,Ae,qt,!1)),al(e))}function lf(e,t,l){if((Re&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||as(e,t),n=a?wm(e,t):fr(e,t,!0),i=a;do{if(n===0){Qa&&!a&&Bl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Nm(l)){n=fr(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var o=e;n=Rs;var p=o.current.memoizedState.isDehydrated;if(p&&(Fa(o,c).flags|=256),c=fr(o,c,!1),c!==2){if(nr&&!p){o.errorRecoveryDisabledLanes|=i,ma|=i,n=4;break e}i=zt,zt=n,i!==null&&(zt===null?zt=i:zt.push.apply(zt,i))}n=c}if(i=!1,n!==2)continue}}if(n===1){Fa(e,0),Bl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Bl(a,t,qt,!Ul);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(n=Xn+300-We(),10<n)){if(Bl(a,t,qt,!Ul),sn(a,0,!0)!==0)break e;Sl=t,a.timeoutHandle=Df(af.bind(null,a,l,zt,Fn,cr,t,qt,ma,Xa,Ul,i,"Throttled",-0,0),n);break e}af(a,l,zt,Fn,cr,t,qt,ma,Xa,Ul,i,null,-0,0)}}break}while(!0);al(e)}function af(e,t,l,a,n,i,c,o,p,E,q,H,O,D){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:il},Fd(t,i,H);var W=(i&62914560)===i?Xn-We():(i&4194048)===i?Pd-We():0;if(W=cx(H,W),W!==null){Sl=i,e.cancelPendingCommit=W(ff.bind(null,e,t,i,l,a,n,c,o,p,q,H,null,O,D)),Bl(e,i,c,!E);return}}ff(e,t,i,l,a,n,c,o,p)}function Nm(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!Mt(i(),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 Bl(e,t,l,a){t&=~ir,t&=~ma,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-dt(n),c=1<<i;a[i]=-1,n&=~c}l!==0&&ho(e,l,t)}function $n(){return(Re&6)===0?(qs(0),!1):!0}function dr(){if(ke!==null){if(Ve===0)var e=ke.return;else e=ke,ul=na=null,_c(e),Ba=null,vs=0,e=ke;for(;e!==null;)Dd(e.alternate,e),e=e.return;ke=null}}function Fa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Gm(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Sl=0,dr(),Xe=e,ke=l=rl(e.current,null),Ae=t,Ve=0,Lt=null,Ul=!1,Qa=as(e,t),nr=!1,Xa=qt=ir=ma=Rl=lt=0,zt=Rs=null,cr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-dt(a),i=1<<n;t|=e[n],a&=~i}return vl=t,bn(),l}function sf(e,t){ye=null,T.H=As,t===qa||t===wn?(t=vu(),Ve=3):t===xc?(t=vu(),Ve=4):Ve=t===Gc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,ke===null&&(lt=1,Bn(e,Zt(t,e.current)))}function nf(){var e=Ut.current;return e===null?!0:(Ae&4194048)===Ae?Jt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Jt:!1}function cf(){var e=T.H;return T.H=As,e===null?As:e}function rf(){var e=T.A;return T.A=Sm,e}function In(){lt=4,Ul||(Ae&4194048)!==Ae&&Ut.current!==null||(Qa=!0),(Rl&134217727)===0&&(ma&134217727)===0||Xe===null||Bl(Xe,Ae,qt,!1)}function fr(e,t,l){var a=Re;Re|=2;var n=cf(),i=rf();(Xe!==e||Ae!==t)&&(Fn=null,Fa(e,t)),t=!1;var c=lt;e:do try{if(Ve!==0&&ke!==null){var o=ke,p=Lt;switch(Ve){case 8:dr(),c=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var E=Ve;if(Ve=0,Lt=null,$a(e,o,p,E),l&&Qa){c=0;break e}break;default:E=Ve,Ve=0,Lt=null,$a(e,o,p,E)}}km(),c=lt;break}catch(q){sf(e,q)}while(!0);return t&&e.shellSuspendCounter++,ul=na=null,Re=a,T.H=n,T.A=i,ke===null&&(Xe=null,Ae=0,bn()),c}function km(){for(;ke!==null;)of(ke)}function wm(e,t){var l=Re;Re|=2;var a=cf(),n=rf();Xe!==e||Ae!==t?(Fn=null,Jn=We()+500,Fa(e,t)):Qa=as(e,t);e:do try{if(Ve!==0&&ke!==null){t=ke;var i=Lt;t:switch(Ve){case 1:Ve=0,Lt=null,$a(e,t,i,1);break;case 2:case 9:if(yu(i)){Ve=0,Lt=null,uf(t);break}t=function(){Ve!==2&&Ve!==9||Xe!==e||(Ve=7),al(e)},i.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:yu(i)?(Ve=0,Lt=null,uf(t)):(Ve=0,Lt=null,$a(e,t,i,7));break;case 5:var c=null;switch(ke.tag){case 26:c=ke.memoizedState;case 5:case 27:var o=ke;if(c?Ff(c):o.stateNode.complete){Ve=0,Lt=null;var p=o.sibling;if(p!==null)ke=p;else{var E=o.return;E!==null?(ke=E,Wn(E)):ke=null}break t}}Ve=0,Lt=null,$a(e,t,i,5);break;case 6:Ve=0,Lt=null,$a(e,t,i,6);break;case 8:dr(),lt=6;break e;default:throw Error(r(462))}}Cm();break}catch(q){sf(e,q)}while(!0);return ul=na=null,T.H=a,T.A=n,Re=l,ke!==null?0:(Xe=null,Ae=0,bn(),lt)}function Cm(){for(;ke!==null&&!Ht();)of(ke)}function of(e){var t=Td(e.alternate,e,vl);e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function uf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Cd(l,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=Cd(l,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:_c(t);default:Dd(l,t),t=ke=cu(t,vl),t=Td(l,t,vl)}e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function $a(e,t,l,a){ul=na=null,_c(t),Ba=null,vs=0;var n=t.return;try{if(mm(e,n,t,l,Ae)){lt=1,Bn(e,Zt(l,e.current)),ke=null;return}}catch(i){if(n!==null)throw ke=n,i;lt=1,Bn(e,Zt(l,e.current)),ke=null;return}t.flags&32768?(ze||a===1?e=!0:Qa||(Ae&536870912)!==0?e=!1:(Ul=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ut.current,a!==null&&a.tag===13&&(a.flags|=16384))),df(t,e)):Wn(t)}function Wn(e){var t=e;do{if((t.flags&32768)!==0){df(t,Ul);return}e=t.return;var l=bm(t.alternate,t,vl);if(l!==null){ke=l;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);lt===0&&(lt=5)}function df(e,t){do{var l=ym(e.alternate,e);if(l!==null){l.flags&=32767,ke=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=l}while(e!==null);lt=6,ke=null}function ff(e,t,l,a,n,i,c,o,p){e.cancelPendingCommit=null;do Pn();while(ft!==0);if((Re&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=ec,nh(e,l,i,c,o,p),e===Xe&&(ke=Xe=null,Ae=0),Ja=t,ql=e,Sl=l,rr=i,or=n,ef=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zm(st,function(){return bf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,n=M.p,M.p=2,c=Re,Re|=4;try{gm(e,t,l)}finally{Re=c,M.p=n,T.T=a}}ft=1,hf(),mf(),xf()}}function hf(){if(ft===1){ft=0;var e=ql,t=Ja,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null;var a=M.p;M.p=2;var n=Re;Re|=4;try{Qd(t,e);var i=kr,c=Wo(e.containerInfo),o=i.focusedElem,p=i.selectionRange;if(c!==o&&o&&o.ownerDocument&&Io(o.ownerDocument.documentElement,o)){if(p!==null&&Fi(o)){var E=p.start,q=p.end;if(q===void 0&&(q=E),"selectionStart"in o)o.selectionStart=E,o.selectionEnd=Math.min(q,o.value.length);else{var H=o.ownerDocument||document,O=H&&H.defaultView||window;if(O.getSelection){var D=O.getSelection(),W=o.textContent.length,ue=Math.min(p.start,W),Qe=p.end===void 0?ue:Math.min(p.end,W);!D.extend&&ue>Qe&&(c=Qe,Qe=ue,ue=c);var w=$o(o,ue),y=$o(o,Qe);if(w&&y&&(D.rangeCount!==1||D.anchorNode!==w.node||D.anchorOffset!==w.offset||D.focusNode!==y.node||D.focusOffset!==y.offset)){var A=H.createRange();A.setStart(w.node,w.offset),D.removeAllRanges(),ue>Qe?(D.addRange(A),D.extend(y.node,y.offset)):(A.setEnd(y.node,y.offset),D.addRange(A))}}}}for(H=[],D=o;D=D.parentNode;)D.nodeType===1&&H.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<H.length;o++){var B=H[o];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}di=!!Nr,kr=Nr=null}finally{Re=n,M.p=a,T.T=l}}e.current=t,ft=2}}function mf(){if(ft===2){ft=0;var e=ql,t=Ja,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=T.T,T.T=null;var a=M.p;M.p=2;var n=Re;Re|=4;try{Vd(e,t.alternate,t)}finally{Re=n,M.p=a,T.T=l}}ft=3}}function xf(){if(ft===4||ft===3){ft=0,vt();var e=ql,t=Ja,l=Sl,a=ef;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ft=5:(ft=0,Ja=ql=null,pf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Ll=null),zi(l),t=t.stateNode,Ge&&typeof Ge.onCommitFiberRoot=="function")try{Ge.onCommitFiberRoot(pe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,n=M.p,M.p=2,T.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var o=a[c];i(o.value,{componentStack:o.stack})}}finally{T.T=t,M.p=n}}(Sl&3)!==0&&Pn(),al(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===ur?Ls++:(Ls=0,ur=e):Ls=0,qs(0)}}function pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ys(t)))}function Pn(){return hf(),mf(),xf(),bf()}function bf(){if(ft!==5)return!1;var e=ql,t=rr;rr=0;var l=zi(Sl),a=T.T,n=M.p;try{M.p=32>l?32:l,T.T=null,l=or,or=null;var i=ql,c=Sl;if(ft=0,Ja=ql=null,Sl=0,(Re&6)!==0)throw Error(r(331));var o=Re;if(Re|=4,Id(i.current),Jd(i,i.current,c,l),Re=o,qs(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(pe,i)}catch{}return!0}finally{M.p=n,T.T=a,pf(e,t)}}function yf(e,t,l){t=Zt(l,t),t=Yc(e.stateNode,t,2),e=Ol(e,t,2),e!==null&&(ss(e,2),al(e))}function Ye(e,t,l){if(e.tag===3)yf(e,e,l);else for(;t!==null;){if(t.tag===3){yf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ll===null||!Ll.has(a))){e=Zt(l,e),l=yd(2),a=Ol(t,l,2),a!==null&&(gd(l,a,t,e),ss(a,2),al(a));break}}t=t.return}}function hr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new jm;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(nr=!0,n.add(l),e=_m.bind(null,e,t,l),t.then(e,e))}function _m(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Xe===e&&(Ae&l)===l&&(lt===4||lt===3&&(Ae&62914560)===Ae&&300>We()-Xn?(Re&2)===0&&Fa(e,0):ir|=l,Xa===Ae&&(Xa=0)),al(e)}function gf(e,t){t===0&&(t=fo()),e=la(e,t),e!==null&&(ss(e,t),al(e))}function Am(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),gf(e,l)}function Em(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),gf(e,l)}function zm(e,t){return Be(e,t)}var ei=null,Ia=null,mr=!1,ti=!1,xr=!1,Hl=0;function al(e){e!==Ia&&e.next===null&&(Ia===null?ei=Ia=e:Ia=Ia.next=e),ti=!0,mr||(mr=!0,Tm())}function qs(e,t){if(!xr&&ti){xr=!0;do for(var l=!1,a=ei;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var c=a.suspendedLanes,o=a.pingedLanes;i=(1<<31-dt(42|e)+1)-1,i&=n&~(c&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Nf(a,i))}else i=Ae,i=sn(a,a===Xe?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||as(a,i)||(l=!0,Nf(a,i));a=a.next}while(l);xr=!1}}function Om(){vf()}function vf(){ti=mr=!1;var e=0;Hl!==0&&Ym()&&(e=Hl);for(var t=We(),l=null,a=ei;a!==null;){var n=a.next,i=Sf(a,t);i===0?(a.next=null,l===null?ei=n:l.next=n,n===null&&(Ia=l)):(l=a,(e!==0||(i&3)!==0)&&(ti=!0)),a=n}ft!==0&&ft!==5||qs(e),Hl!==0&&(Hl=0)}function Sf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-dt(i),o=1<<c,p=n[c];p===-1?((o&l)===0||(o&a)!==0)&&(n[c]=sh(o,t)):p<=t&&(e.expiredLanes|=o),i&=~o}if(t=Xe,l=Ae,l=sn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Je(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||as(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Je(a),zi(l)){case 2:case 8:l=Pe;break;case 32:l=st;break;case 268435456:l=sl;break;default:l=st}return a=jf.bind(null,e),l=Be(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Je(a),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(ft!==0&&ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Pn()&&e.callbackNode!==l)return null;var a=Ae;return a=sn(e,e===Xe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(lf(e,a,t),Sf(e,We()),e.callbackNode!=null&&e.callbackNode===l?jf.bind(null,e):null)}function Nf(e,t){if(Pn())return null;lf(e,t,!0)}function Tm(){Zm(function(){(Re&6)!==0?Be(Nt,Om):vf()})}function pr(){if(Hl===0){var e=Ra;e===0&&(e=tn,tn<<=1,(tn&261888)===0&&(tn=256)),Hl=e}return Hl}function kf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:on(""+e)}function wf(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 Mm(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=kf((n[wt]||null).action),c=a.submitter;c&&(t=(t=c[wt]||null)?kf(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var o=new hn("action","action",null,a,n);e.push({event:o,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Hl!==0){var p=c?wf(n,c):new FormData(n);Rc(l,{pending:!0,data:p,method:n.method,action:i},null,p)}}else typeof i=="function"&&(o.preventDefault(),p=c?wf(n,c):new FormData(n),Rc(l,{pending:!0,data:p,method:n.method,action:i},i,p))},currentTarget:n}]})}}for(var br=0;br<Pi.length;br++){var yr=Pi[br],Dm=yr.toLowerCase(),Um=yr[0].toUpperCase()+yr.slice(1);It(Dm,"on"+Um)}It(tu,"onAnimationEnd"),It(lu,"onAnimationIteration"),It(au,"onAnimationStart"),It("dblclick","onDoubleClick"),It("focusin","onFocus"),It("focusout","onBlur"),It(Ih,"onTransitionRun"),It(Wh,"onTransitionStart"),It(Ph,"onTransitionCancel"),It(su,"onTransitionEnd"),ja("onMouseEnter",["mouseout","mouseover"]),ja("onMouseLeave",["mouseout","mouseover"]),ja("onPointerEnter",["pointerout","pointerover"]),ja("onPointerLeave",["pointerout","pointerover"]),Wl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bs="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(" "),Rm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bs));function Cf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var o=a[c],p=o.instance,E=o.currentTarget;if(o=o.listener,p!==i&&n.isPropagationStopped())break e;i=o,n.currentTarget=E;try{i(n)}catch(q){pn(q)}n.currentTarget=null,i=p}else for(c=0;c<a.length;c++){if(o=a[c],p=o.instance,E=o.currentTarget,o=o.listener,p!==i&&n.isPropagationStopped())break e;i=o,n.currentTarget=E;try{i(n)}catch(q){pn(q)}n.currentTarget=null,i=p}}}}function we(e,t){var l=t[Oi];l===void 0&&(l=t[Oi]=new Set);var a=e+"__bubble";l.has(a)||(_f(t,e,2,!1),l.add(a))}function gr(e,t,l){var a=0;t&&(a|=4),_f(l,e,a,t)}var li="_reactListening"+Math.random().toString(36).slice(2);function vr(e){if(!e[li]){e[li]=!0,go.forEach(function(l){l!=="selectionchange"&&(Rm.has(l)||gr(l,!1,e),gr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[li]||(t[li]=!0,gr("selectionchange",!1,t))}}function _f(e,t,l,a){switch(l0(t)){case 2:var n=ux;break;case 8:n=dx;break;default:n=Ur}l=n.bind(null,t,l,e),n=void 0,!Hi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Sr(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var o=a.stateNode.containerInfo;if(o===n)break;if(c===4)for(c=a.return;c!==null;){var p=c.tag;if((p===3||p===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;o!==null;){if(c=ga(o),c===null)return;if(p=c.tag,p===5||p===6||p===26||p===27){a=i=c;continue e}o=o.parentNode}}a=a.return}Oo(function(){var E=i,q=qi(l),H=[];e:{var O=nu.get(e);if(O!==void 0){var D=hn,W=e;switch(e){case"keypress":if(dn(l)===0)break e;case"keydown":case"keyup":D=Eh;break;case"focusin":W="focus",D=Zi;break;case"focusout":W="blur",D=Zi;break;case"beforeblur":case"afterblur":D=Zi;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":D=Do;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=bh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Th;break;case tu:case lu:case au:D=vh;break;case su:D=Dh;break;case"scroll":case"scrollend":D=xh;break;case"wheel":D=Rh;break;case"copy":case"cut":case"paste":D=jh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Ro;break;case"toggle":case"beforetoggle":D=qh}var ue=(t&4)!==0,Qe=!ue&&(e==="scroll"||e==="scrollend"),w=ue?O!==null?O+"Capture":null:O;ue=[];for(var y=E,A;y!==null;){var B=y;if(A=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||A===null||w===null||(B=cs(y,w),B!=null&&ue.push(Hs(y,B,A))),Qe)break;y=y.return}0<ue.length&&(O=new D(O,W,null,l,q),H.push({event:O,listeners:ue}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",O&&l!==Li&&(W=l.relatedTarget||l.fromElement)&&(ga(W)||W[ya]))break e;if((D||O)&&(O=q.window===q?q:(O=q.ownerDocument)?O.defaultView||O.parentWindow:window,D?(W=l.relatedTarget||l.toElement,D=E,W=W?ga(W):null,W!==null&&(Qe=b(W),ue=W.tag,W!==Qe||ue!==5&&ue!==27&&ue!==6)&&(W=null)):(D=null,W=E),D!==W)){if(ue=Do,B="onMouseLeave",w="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(ue=Ro,B="onPointerLeave",w="onPointerEnter",y="pointer"),Qe=D==null?O:is(D),A=W==null?O:is(W),O=new ue(B,y+"leave",D,l,q),O.target=Qe,O.relatedTarget=A,B=null,ga(q)===E&&(ue=new ue(w,y+"enter",W,l,q),ue.target=A,ue.relatedTarget=Qe,B=ue),Qe=B,D&&W)t:{for(ue=Lm,w=D,y=W,A=0,B=w;B;B=ue(B))A++;B=0;for(var ie=y;ie;ie=ue(ie))B++;for(;0<A-B;)w=ue(w),A--;for(;0<B-A;)y=ue(y),B--;for(;A--;){if(w===y||y!==null&&w===y.alternate){ue=w;break t}w=ue(w),y=ue(y)}ue=null}else ue=null;D!==null&&Af(H,O,D,ue,!1),W!==null&&Qe!==null&&Af(H,Qe,W,ue,!0)}}e:{if(O=E?is(E):window,D=O.nodeName&&O.nodeName.toLowerCase(),D==="select"||D==="input"&&O.type==="file")var Me=Zo;else if(Yo(O))if(Ko)Me=Jh;else{Me=Qh;var P=Kh}else D=O.nodeName,!D||D.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?E&&Ri(E.elementType)&&(Me=Zo):Me=Xh;if(Me&&(Me=Me(e,E))){Go(H,Me,l,q);break e}P&&P(e,O,E),e==="focusout"&&E&&O.type==="number"&&E.memoizedProps.value!=null&&Ui(O,"number",O.value)}switch(P=E?is(E):window,e){case"focusin":(Yo(P)||P.contentEditable==="true")&&(Aa=P,$i=E,xs=null);break;case"focusout":xs=$i=Aa=null;break;case"mousedown":Ii=!0;break;case"contextmenu":case"mouseup":case"dragend":Ii=!1,Po(H,l,q);break;case"selectionchange":if($h)break;case"keydown":case"keyup":Po(H,l,q)}var Se;if(Qi)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else _a?Ho(e,l)&&(Ee="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ee="onCompositionStart");Ee&&(Lo&&l.locale!=="ko"&&(_a||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&_a&&(Se=To()):(kl=q,Vi="value"in kl?kl.value:kl.textContent,_a=!0)),P=ai(E,Ee),0<P.length&&(Ee=new Uo(Ee,e,null,l,q),H.push({event:Ee,listeners:P}),Se?Ee.data=Se:(Se=Vo(l),Se!==null&&(Ee.data=Se)))),(Se=Hh?Vh(e,l):Yh(e,l))&&(Ee=ai(E,"onBeforeInput"),0<Ee.length&&(P=new Uo("onBeforeInput","beforeinput",null,l,q),H.push({event:P,listeners:Ee}),P.data=Se)),Mm(H,e,E,l,q)}Cf(H,t)})}function Hs(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ai(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=cs(e,l),n!=null&&a.unshift(Hs(e,n,i)),n=cs(e,t),n!=null&&a.push(Hs(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Lm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Af(e,t,l,a,n){for(var i=t._reactName,c=[];l!==null&&l!==a;){var o=l,p=o.alternate,E=o.stateNode;if(o=o.tag,p!==null&&p===a)break;o!==5&&o!==26&&o!==27||E===null||(p=E,n?(E=cs(l,i),E!=null&&c.unshift(Hs(l,E,p))):n||(E=cs(l,i),E!=null&&c.push(Hs(l,E,p)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var qm=/\r\n?/g,Bm=/\u0000|\uFFFD/g;function Ef(e){return(typeof e=="string"?e:""+e).replace(qm,`
|
|
`).replace(Bm,"")}function zf(e,t){return t=Ef(t),Ef(e)===t}function Ke(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ka(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ka(e,""+a);break;case"className":cn(e,"class",a);break;case"tabIndex":cn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":cn(e,l,a);break;case"style":Eo(e,a,i);break;case"data":if(t!=="object"){cn(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=on(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&Ke(e,t,"name",n.name,n,null),Ke(e,t,"formEncType",n.formEncType,n,null),Ke(e,t,"formMethod",n.formMethod,n,null),Ke(e,t,"formTarget",n.formTarget,n,null)):(Ke(e,t,"encType",n.encType,n,null),Ke(e,t,"method",n.method,n,null),Ke(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=on(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=il);break;case"onScroll":a!=null&&we("scroll",e);break;case"onScrollEnd":a!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=on(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":we("beforetoggle",e),we("toggle",e),nn(e,"popover",a);break;case"xlinkActuate":nl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":nl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":nl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":nl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":nl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":nl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":nl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":nl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":nl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":nn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=hh.get(l)||l,nn(e,l,a))}}function jr(e,t,l,a,n,i){switch(l){case"style":Eo(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ka(e,a):(typeof a=="number"||typeof a=="bigint")&&ka(e,""+a);break;case"onScroll":a!=null&&we("scroll",e);break;case"onScrollEnd":a!=null&&we("scrollend",e);break;case"onClick":a!=null&&(e.onclick=il);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vo.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[wt]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):nn(e,l,a)}}}function gt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ke(e,t,i,c,l,null)}}n&&Ke(e,t,"srcSet",l.srcSet,l,null),a&&Ke(e,t,"src",l.src,l,null);return;case"input":we("invalid",e);var o=i=c=n=null,p=null,E=null;for(a in l)if(l.hasOwnProperty(a)){var q=l[a];if(q!=null)switch(a){case"name":n=q;break;case"type":c=q;break;case"checked":p=q;break;case"defaultChecked":E=q;break;case"value":i=q;break;case"defaultValue":o=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Ke(e,t,a,q,l,null)}}wo(e,i,o,p,E,c,n,!1);return;case"select":we("invalid",e),a=c=i=null;for(n in l)if(l.hasOwnProperty(n)&&(o=l[n],o!=null))switch(n){case"value":i=o;break;case"defaultValue":c=o;break;case"multiple":a=o;default:Ke(e,t,n,o,l,null)}t=i,l=c,e.multiple=!!a,t!=null?Na(e,!!a,t,!1):l!=null&&Na(e,!!a,l,!0);return;case"textarea":we("invalid",e),i=n=a=null;for(c in l)if(l.hasOwnProperty(c)&&(o=l[c],o!=null))switch(c){case"value":a=o;break;case"defaultValue":n=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:Ke(e,t,c,o,l,null)}_o(e,a,n,i);return;case"option":for(p in l)if(l.hasOwnProperty(p)&&(a=l[p],a!=null))switch(p){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ke(e,t,p,a,l,null)}return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(a=0;a<Bs.length;a++)we(Bs[a],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("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(E in l)if(l.hasOwnProperty(E)&&(a=l[E],a!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ke(e,t,E,a,l,null)}return;default:if(Ri(t)){for(q in l)l.hasOwnProperty(q)&&(a=l[q],a!==void 0&&jr(e,t,q,a,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(a=l[o],a!=null&&Ke(e,t,o,a,l,null))}function Hm(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,c=null,o=null,p=null,E=null,q=null;for(D in l){var H=l[D];if(l.hasOwnProperty(D)&&H!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":p=H;default:a.hasOwnProperty(D)||Ke(e,t,D,null,a,H)}}for(var O in a){var D=a[O];if(H=l[O],a.hasOwnProperty(O)&&(D!=null||H!=null))switch(O){case"type":i=D;break;case"name":n=D;break;case"checked":E=D;break;case"defaultChecked":q=D;break;case"value":c=D;break;case"defaultValue":o=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:D!==H&&Ke(e,t,O,D,a,H)}}Di(e,c,o,p,E,q,i,n);return;case"select":D=c=o=O=null;for(i in l)if(p=l[i],l.hasOwnProperty(i)&&p!=null)switch(i){case"value":break;case"multiple":D=p;default:a.hasOwnProperty(i)||Ke(e,t,i,null,a,p)}for(n in a)if(i=a[n],p=l[n],a.hasOwnProperty(n)&&(i!=null||p!=null))switch(n){case"value":O=i;break;case"defaultValue":o=i;break;case"multiple":c=i;default:i!==p&&Ke(e,t,n,i,a,p)}t=o,l=c,a=D,O!=null?Na(e,!!l,O,!1):!!a!=!!l&&(t!=null?Na(e,!!l,t,!0):Na(e,!!l,l?[]:"",!1));return;case"textarea":D=O=null;for(o in l)if(n=l[o],l.hasOwnProperty(o)&&n!=null&&!a.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ke(e,t,o,null,a,n)}for(c in a)if(n=a[c],i=l[c],a.hasOwnProperty(c)&&(n!=null||i!=null))switch(c){case"value":O=n;break;case"defaultValue":D=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==i&&Ke(e,t,c,n,a,i)}Co(e,O,D);return;case"option":for(var W in l)if(O=l[W],l.hasOwnProperty(W)&&O!=null&&!a.hasOwnProperty(W))switch(W){case"selected":e.selected=!1;break;default:Ke(e,t,W,null,a,O)}for(p in a)if(O=a[p],D=l[p],a.hasOwnProperty(p)&&O!==D&&(O!=null||D!=null))switch(p){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Ke(e,t,p,O,a,D)}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 ue in l)O=l[ue],l.hasOwnProperty(ue)&&O!=null&&!a.hasOwnProperty(ue)&&Ke(e,t,ue,null,a,O);for(E in a)if(O=a[E],D=l[E],a.hasOwnProperty(E)&&O!==D&&(O!=null||D!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Ke(e,t,E,O,a,D)}return;default:if(Ri(t)){for(var Qe in l)O=l[Qe],l.hasOwnProperty(Qe)&&O!==void 0&&!a.hasOwnProperty(Qe)&&jr(e,t,Qe,void 0,a,O);for(q in a)O=a[q],D=l[q],!a.hasOwnProperty(q)||O===D||O===void 0&&D===void 0||jr(e,t,q,O,a,D);return}}for(var w in l)O=l[w],l.hasOwnProperty(w)&&O!=null&&!a.hasOwnProperty(w)&&Ke(e,t,w,null,a,O);for(H in a)O=a[H],D=l[H],!a.hasOwnProperty(H)||O===D||O==null&&D==null||Ke(e,t,H,O,a,D)}function Of(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,c=n.initiatorType,o=n.duration;if(i&&o&&Of(c)){for(c=0,o=n.responseEnd,a+=1;a<l.length;a++){var p=l[a],E=p.startTime;if(E>o)break;var q=p.transferSize,H=p.initiatorType;q&&Of(H)&&(p=p.responseEnd,c+=q*(p<o?1:(o-E)/(p-E)))}if(--a,t+=8*(i+c)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nr=null,kr=null;function si(e){return e.nodeType===9?e:e.ownerDocument}function Tf(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 Mf(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 wr(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 Cr=null;function Ym(){var e=window.event;return e&&e.type==="popstate"?e===Cr?!1:(Cr=e,!0):(Cr=null,!1)}var Df=typeof setTimeout=="function"?setTimeout:void 0,Gm=typeof clearTimeout=="function"?clearTimeout:void 0,Uf=typeof Promise=="function"?Promise:void 0,Zm=typeof queueMicrotask=="function"?queueMicrotask:typeof Uf<"u"?function(e){return Uf.resolve(null).then(e).catch(Km)}:Df;function Km(e){setTimeout(function(){throw e})}function Vl(e){return e==="head"}function Rf(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),ts(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Vs(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Vs(l);for(var i=l.firstChild;i;){var c=i.nextSibling,o=i.nodeName;i[ns]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=c}}else l==="body"&&Vs(e.ownerDocument.body);l=n}while(l);ts(t)}function Lf(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function _r(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":_r(l),Ti(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Qm(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ns])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==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(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Ft(e.nextSibling),e===null)break}return null}function Xm(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ft(e.nextSibling),e===null))return null;return e}function qf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ft(e.nextSibling),e===null))return null;return e}function Ar(e){return e.data==="$?"||e.data==="$~"}function Er(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Jm(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ft(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 zr=null;function Bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ft(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Hf(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 Vf(e,t,l){switch(t=si(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Vs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ti(e)}var $t=new Map,Yf=new Set;function ni(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jl=M.d;M.d={f:Fm,r:$m,D:Im,C:Wm,L:Pm,m:ex,X:lx,S:tx,M:ax};function Fm(){var e=jl.f(),t=$n();return e||t}function $m(e){var t=va(e);t!==null&&t.tag===5&&t.type==="form"?sd(t):jl.r(e)}var Wa=typeof document>"u"?null:document;function Gf(e,t,l){var a=Wa;if(a&&typeof t=="string"&&t){var n=Yt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Yf.has(n)||(Yf.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),gt(t,"link",e),ht(t),a.head.appendChild(t)))}}function Im(e){jl.D(e),Gf("dns-prefetch",e,null)}function Wm(e,t){jl.C(e,t),Gf("preconnect",e,t)}function Pm(e,t,l){jl.L(e,t,l);var a=Wa;if(a&&e&&t){var n='link[rel="preload"][as="'+Yt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Yt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Yt(l.imageSizes)+'"]')):n+='[href="'+Yt(e)+'"]';var i=n;switch(t){case"style":i=Pa(e);break;case"script":i=es(e)}$t.has(i)||(e=k({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),$t.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Ys(i))||t==="script"&&a.querySelector(Gs(i))||(t=a.createElement("link"),gt(t,"link",e),ht(t),a.head.appendChild(t)))}}function ex(e,t){jl.m(e,t);var l=Wa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Yt(a)+'"][href="'+Yt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=es(e)}if(!$t.has(i)&&(e=k({rel:"modulepreload",href:e},t),$t.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Gs(i)))return}a=l.createElement("link"),gt(a,"link",e),ht(a),l.head.appendChild(a)}}}function tx(e,t,l){jl.S(e,t,l);var a=Wa;if(a&&e){var n=Sa(a).hoistableStyles,i=Pa(e);t=t||"default";var c=n.get(i);if(!c){var o={loading:0,preload:null};if(c=a.querySelector(Ys(i)))o.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":t},l),(l=$t.get(i))&&Or(e,l);var p=c=a.createElement("link");ht(p),gt(p,"link",e),p._p=new Promise(function(E,q){p.onload=E,p.onerror=q}),p.addEventListener("load",function(){o.loading|=1}),p.addEventListener("error",function(){o.loading|=2}),o.loading|=4,ii(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:o},n.set(i,c)}}}function lx(e,t){jl.X(e,t);var l=Wa;if(l&&e){var a=Sa(l).hoistableScripts,n=es(e),i=a.get(n);i||(i=l.querySelector(Gs(n)),i||(e=k({src:e,async:!0},t),(t=$t.get(n))&&Tr(e,t),i=l.createElement("script"),ht(i),gt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function ax(e,t){jl.M(e,t);var l=Wa;if(l&&e){var a=Sa(l).hoistableScripts,n=es(e),i=a.get(n);i||(i=l.querySelector(Gs(n)),i||(e=k({src:e,async:!0,type:"module"},t),(t=$t.get(n))&&Tr(e,t),i=l.createElement("script"),ht(i),gt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Zf(e,t,l,a){var n=(n=$.current)?ni(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Pa(l.href),l=Sa(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Pa(l.href);var i=Sa(n).hoistableStyles,c=i.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=n.querySelector(Ys(e)))&&!i._p&&(c.instance=i,c.state.loading=5),$t.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},$t.set(e,l),i||sx(n,e,l,c.state))),t&&a===null)throw Error(r(528,""));return c}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=es(l),l=Sa(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Pa(e){return'href="'+Yt(e)+'"'}function Ys(e){return'link[rel="stylesheet"]['+e+"]"}function Kf(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function sx(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),gt(t,"link",l),ht(t),e.head.appendChild(t))}function es(e){return'[src="'+Yt(e)+'"]'}function Gs(e){return"script[async]"+e}function Qf(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Yt(l.href)+'"]');if(a)return t.instance=a,ht(a),a;var n=k({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ht(a),gt(a,"style",n),ii(a,l.precedence,e),t.instance=a;case"stylesheet":n=Pa(l.href);var i=e.querySelector(Ys(n));if(i)return t.state.loading|=4,t.instance=i,ht(i),i;a=Kf(l),(n=$t.get(n))&&Or(a,n),i=(e.ownerDocument||e).createElement("link"),ht(i);var c=i;return c._p=new Promise(function(o,p){c.onload=o,c.onerror=p}),gt(i,"link",a),t.state.loading|=4,ii(i,l.precedence,e),t.instance=i;case"script":return i=es(l.src),(n=e.querySelector(Gs(i)))?(t.instance=n,ht(n),n):(a=l,(n=$t.get(i))&&(a=k({},l),Tr(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),ht(n),gt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ii(a,l.precedence,e));return t.instance}function ii(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,c=0;c<a.length;c++){var o=a[c];if(o.dataset.precedence===t)i=o;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Or(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Tr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ci=null;function Xf(e,t,l){if(ci===null){var a=new Map,n=ci=new Map;n.set(l,a)}else n=ci,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[ns]||i[xt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var o=a.get(c);o?o.push(i):a.set(c,[i])}}return a}function Jf(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function nx(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 Ff(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ix(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Pa(a.href),i=t.querySelector(Ys(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ri.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,ht(i);return}i=t.ownerDocument||t,a=Kf(a),(n=$t.get(n))&&Or(a,n),i=i.createElement("link"),ht(i);var c=i;c._p=new Promise(function(o,p){c.onload=o,c.onerror=p}),gt(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ri.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Mr=0;function cx(e,t){return e.stylesheets&&e.count===0&&ui(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&ui(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Mr===0&&(Mr=62500*Vm());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ui(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Mr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function ri(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ui(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oi=null;function ui(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oi=new Map,t.forEach(rx,e),oi=null,ri.call(e))}function rx(e,t){if(!(t.state.loading&4)){var l=oi.get(e);if(l)var a=l.get(null);else{l=new Map,oi.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var c=n[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}n=t.instance,c=n.getAttribute("data-precedence"),i=l.get(c)||a,i===a&&l.set(null,n),l.set(c,n),this.count++,a=ri.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Zs={$$typeof:be,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function ox(e,t,l,a,n,i,c,o,p){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=Ai(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ai(0),this.hiddenUpdates=Ai(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=p,this.incompleteTransitions=new Map}function $f(e,t,l,a,n,i,c,o,p,E,q,H){return e=new ox(e,t,l,c,p,E,q,H,o),t=1,i===!0&&(t|=24),i=Dt(3,null,null,t),e.current=i,i.stateNode=e,t=fc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},pc(i),e}function If(e){return e?(e=Oa,e):Oa}function Wf(e,t,l,a,n,i){n=If(n),a.context===null?a.context=n:a.pendingContext=n,a=zl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Ol(e,a,t),l!==null&&(Ot(l,e,t),js(l,e,t))}function Pf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Dr(e,t){Pf(e,t),(e=e.alternate)&&Pf(e,t)}function e0(e){if(e.tag===13||e.tag===31){var t=la(e,67108864);t!==null&&Ot(t,e,67108864),Dr(e,67108864)}}function t0(e){if(e.tag===13||e.tag===31){var t=Bt();t=Ei(t);var l=la(e,t);l!==null&&Ot(l,e,t),Dr(e,t)}}var di=!0;function ux(e,t,l,a){var n=T.T;T.T=null;var i=M.p;try{M.p=2,Ur(e,t,l,a)}finally{M.p=i,T.T=n}}function dx(e,t,l,a){var n=T.T;T.T=null;var i=M.p;try{M.p=8,Ur(e,t,l,a)}finally{M.p=i,T.T=n}}function Ur(e,t,l,a){if(di){var n=Rr(a);if(n===null)Sr(e,t,a,fi,l),a0(e,a);else if(hx(n,e,t,l,a))a.stopPropagation();else if(a0(e,a),t&4&&-1<fx.indexOf(e)){for(;n!==null;){var i=va(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Il(i.pendingLanes);if(c!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;c;){var p=1<<31-dt(c);o.entanglements[1]|=p,c&=~p}al(i),(Re&6)===0&&(Jn=We()+500,qs(0))}}break;case 31:case 13:o=la(i,2),o!==null&&Ot(o,i,2),$n(),Dr(i,2)}if(i=Rr(a),i===null&&Sr(e,t,a,fi,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Sr(e,t,a,null,l)}}function Rr(e){return e=qi(e),Lr(e)}var fi=null;function Lr(e){if(fi=null,e=ga(e),e!==null){var t=b(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=S(t),e!==null)return e;e=null}else if(l===31){if(e=C(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 fi=e,null}function l0(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(et()){case Nt:return 2;case Pe:return 8;case st:case Tt:return 32;case sl:return 268435456;default:return 32}default:return 32}}var qr=!1,Yl=null,Gl=null,Zl=null,Ks=new Map,Qs=new Map,Kl=[],fx="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 a0(e,t){switch(e){case"focusin":case"focusout":Yl=null;break;case"dragenter":case"dragleave":Gl=null;break;case"mouseover":case"mouseout":Zl=null;break;case"pointerover":case"pointerout":Ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(t.pointerId)}}function Xs(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=va(t),t!==null&&e0(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function hx(e,t,l,a,n){switch(t){case"focusin":return Yl=Xs(Yl,e,t,l,a,n),!0;case"dragenter":return Gl=Xs(Gl,e,t,l,a,n),!0;case"mouseover":return Zl=Xs(Zl,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return Ks.set(i,Xs(Ks.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,Qs.set(i,Xs(Qs.get(i)||null,e,t,l,a,n)),!0}return!1}function s0(e){var t=ga(e.target);if(t!==null){var l=b(t);if(l!==null){if(t=l.tag,t===13){if(t=S(l),t!==null){e.blockedOn=t,bo(e.priority,function(){t0(l)});return}}else if(t===31){if(t=C(l),t!==null){e.blockedOn=t,bo(e.priority,function(){t0(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 hi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Rr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Li=a,l.target.dispatchEvent(a),Li=null}else return t=va(l),t!==null&&e0(t),e.blockedOn=l,!1;t.shift()}return!0}function n0(e,t,l){hi(e)&&l.delete(t)}function mx(){qr=!1,Yl!==null&&hi(Yl)&&(Yl=null),Gl!==null&&hi(Gl)&&(Gl=null),Zl!==null&&hi(Zl)&&(Zl=null),Ks.forEach(n0),Qs.forEach(n0)}function mi(e,t){e.blockedOn===t&&(e.blockedOn=null,qr||(qr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,mx)))}var xi=null;function i0(e){xi!==e&&(xi=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){xi===e&&(xi=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(Lr(a||l)===null)continue;break}var i=va(l);i!==null&&(e.splice(t,3),t-=3,Rc(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function ts(e){function t(p){return mi(p,e)}Yl!==null&&mi(Yl,e),Gl!==null&&mi(Gl,e),Zl!==null&&mi(Zl,e),Ks.forEach(t),Qs.forEach(t);for(var l=0;l<Kl.length;l++){var a=Kl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Kl.length&&(l=Kl[0],l.blockedOn===null);)s0(l),l.blockedOn===null&&Kl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],c=n[wt]||null;if(typeof i=="function")c||i0(l);else if(c){var o=null;if(i&&i.hasAttribute("formAction")){if(n=i,c=i[wt]||null)o=c.formAction;else if(Lr(n)!==null)continue}else o=c.action;typeof o=="function"?l[a+1]=o:(l.splice(a,3),a-=3),i0(l)}}}function c0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function Br(e){this._internalRoot=e}pi.prototype.render=Br.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Bt();Wf(l,a,e,t,null,null)},pi.prototype.unmount=Br.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wf(e.current,2,null,e,null,null),$n(),t[ya]=null}};function pi(e){this._internalRoot=e}pi.prototype.unstable_scheduleHydration=function(e){if(e){var t=po();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Kl.length&&t!==0&&t<Kl[l].priority;l++);Kl.splice(l,0,e),l===0&&s0(e)}};var r0=d.version;if(r0!=="19.2.8")throw Error(r(527,r0,"19.2.8"));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=f(t),e=e!==null?N(e):null,e=e===null?null:e.stateNode,e};var xx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bi.isDisabled&&bi.supportsFiber)try{pe=bi.inject(xx),Ge=bi}catch{}}return Fs.createRoot=function(e,t){if(!g(e))throw Error(r(299));var l=!1,a="",n=md,i=xd,c=pd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=$f(e,1,!1,null,null,l,a,null,n,i,c,c0),e[ya]=t.current,vr(e),new Br(t)},Fs.hydrateRoot=function(e,t,l){if(!g(e))throw Error(r(299));var a=!1,n="",i=md,c=xd,o=pd,p=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(p=l.formState)),t=$f(e,1,!0,t,l??null,a,n,p,i,c,o,c0),t.context=If(null),l=t.current,a=Bt(),a=Ei(a),n=zl(a),n.callback=null,Ol(l,n,a),l=a,t.current.lanes=l,ss(t,l),al(t),e[ya]=t.current,vr(e),new pi(t)},Fs.version="19.2.8",Fs}var y0;function Cx(){if(y0)return Yr.exports;y0=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(d){console.error(d)}}return u(),Yr.exports=wx(),Yr.exports}var _x=Cx();const so="https://dbit.digitalcompass.agency".replace(/\/$/,""),Si="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE",Ax="https://agenteit.digitalcompass.agency/webhook/lucozade-auth-v6",no="lucozade-audit-auth-session",io="lucozade-audit-auth-tab-session",$r="lucozade-audit-remembered-email";function O0(){if(!so||!Si)throw new Error("Authentication is not configured. Check the Supabase environment variables.")}function co(u,d){return(u==null?void 0:u.msg)||(u==null?void 0:u.message)||(u==null?void 0:u.error_description)||(u==null?void 0:u.error)||d}function Ex(){const u="/lucozade/";return new URL(u,window.location.origin).toString()}async function ls(u,d,x){O0();const r=await fetch(`${so}${u}`,{...d,cache:"no-store",headers:{apikey:Si,Authorization:`Bearer ${x||Si}`,"Content-Type":"application/json",...d.headers||{}}}),g=await r.json().catch(()=>({}));if(!r.ok)throw new Error(co(g,`Authentication error (${r.status})`));return g}async function T0(u,d){var b;const x=new AbortController,r=window.setTimeout(()=>x.abort(),6e4),g=new URLSearchParams({action:u,email:d.email.trim().toLowerCase(),fullName:((b=d.fullName)==null?void 0:b.trim())||"",password:d.password||"",redirectUrl:Ex(),website:""});try{const S=await fetch(Ax,{method:"POST",body:g,signal:x.signal,cache:"no-store",credentials:"omit",mode:"cors",headers:{Accept:"application/json"}}),C=await S.text();let j={};if(C)try{j=JSON.parse(C)}catch{j={message:C}}if(!S.ok||j.ok===!1)throw new Error(co(j,`Authentication service error (${S.status})`));return j}catch(S){throw(S==null?void 0:S.name)==="AbortError"?new Error("The authentication service took too long to respond. Please try again."):S instanceof TypeError||String((S==null?void 0:S.message)||"").toLowerCase().includes("failed to fetch")?new Error("The authentication service could not be reached. Please try again."):S}finally{window.clearTimeout(r)}}function M0(u,d){const x=u.user||d;return!u.access_token||!u.refresh_token||!x?null:{access_token:u.access_token,refresh_token:u.refresh_token,expires_at:u.expires_at||Math.floor(Date.now()/1e3)+(u.expires_in||3600),token_type:u.token_type,user:x}}async function D0(u){if(!u)throw new Error("The authentication token is missing.");return ls("/auth/v1/user",{method:"GET"},u)}async function ro(u){O0();const d=encodeURIComponent(u.user.id),x=await fetch(`${so}/rest/v1/lucozade_access?user_id=eq.${d}&is_active=eq.true&select=user_id`,{method:"GET",cache:"no-store",headers:{apikey:Si,Authorization:`Bearer ${u.access_token}`,Accept:"application/json"}}),r=await x.json().catch(()=>[]);if(!x.ok)throw new Error(co(r,"Unable to verify access to this application."));if(!Array.isArray(r)||r.length===0)throw new Error("This account is not authorized to access this application.")}function Fl(){localStorage.removeItem(no),sessionStorage.removeItem(io)}function U0(u,d=!1){if(Fl(),!u)return;const x=JSON.stringify({...u,remember:d});d?localStorage.setItem(no,x):sessionStorage.setItem(io,x)}function g0(u,d){var x;if(!u)return null;try{const r=JSON.parse(u);return!(r!=null&&r.access_token)||!(r!=null&&r.refresh_token)||!((x=r==null?void 0:r.user)!=null&&x.id)?null:{...r,remember:d}}catch{return null}}function zx(){const u=g0(sessionStorage.getItem(io),!1);if(u)return u;const d=g0(localStorage.getItem(no),!0);return d||(Fl(),null)}function Ox(){return(localStorage.getItem($r)||"").trim().toLowerCase()}function R0(u,d){d?localStorage.setItem($r,u.trim().toLowerCase()):localStorage.removeItem($r)}async function L0(u,d,x=!1){const r=u.trim().toLowerCase(),g=await ls("/auth/v1/token?grant_type=password",{method:"POST",body:JSON.stringify({email:r,password:d})}),b=g.user||await D0(g.access_token||""),S=M0(g,b);if(!S)throw new Error("The session could not be started.");const C={...S,remember:x};try{await ro(C)}catch(j){throw Fl(),j}return R0(r,x),U0(C,x),C}async function Tx(u,d,x){const r=d.trim().toLowerCase(),g=await T0("register",{fullName:u.trim(),email:r,password:x});let b=null;for(const C of[100,250,500,900,1500,2500]){await new Promise(j=>window.setTimeout(j,C));try{return{session:await L0(r,x,!1),message:g.message||"Account created successfully."}}catch(j){b=j}}const S=b instanceof Error?b.message:"";return{session:null,message:g.message||S||"Account created successfully. Sign in with your email and password."}}async function Mx(u){return(await T0("recover",{email:u.trim().toLowerCase()})).message||"If an active account exists, a recovery link has been sent."}function Dx(){return new URLSearchParams(window.location.hash.replace(/^#/,""))}async function Ux(){const u=Dx(),d=(u.get("error_description")||u.get("error")||"").trim();if(d)return{session:null,error:d};const x=(u.get("type")||"").toLowerCase(),r=(u.get("access_token")||"").trim();if(x!=="recovery"||!r)return{session:null,error:""};try{const g=await D0(r),b=Number(u.get("expires_in")||"3600");return{session:{access_token:r,refresh_token:(u.get("refresh_token")||"").trim()||void 0,token_type:(u.get("token_type")||"bearer").trim(),expires_at:Math.floor(Date.now()/1e3)+(Number.isFinite(b)?b:3600),user:g},error:""}}catch(g){return{session:null,error:(g==null?void 0:g.message)||"The recovery link is invalid or has expired."}}}async function Rx(u,d){if(!(u!=null&&u.access_token))throw new Error("The recovery link is invalid or has expired.");if(u.expires_at*1e3<=Date.now())throw new Error("The recovery link has expired. Request a new one.");await ls("/auth/v1/user",{method:"PUT",body:JSON.stringify({password:d})},u.access_token);try{await ls("/auth/v1/logout",{method:"POST"},u.access_token)}catch{}Fl()}function v0(){window.history.replaceState({},document.title,`${window.location.pathname}${window.location.search}`)}async function q0(u){try{const d=await ls("/auth/v1/token?grant_type=refresh_token",{method:"POST",body:JSON.stringify({refresh_token:u.refresh_token})}),x=M0(d,d.user||u.user);if(!x)return Fl(),null;const r={...x,remember:!!u.remember};return await ro(r),U0(r,!!r.remember),r}catch{return Fl(),null}}async function Lx(){const u=zx();if(!u)return null;if(u.expires_at*1e3<=Date.now()+6e4)return q0(u);try{return await ro(u),u}catch{return Fl(),null}}async function qx(u){try{u!=null&&u.access_token&&await ls("/auth/v1/logout",{method:"POST"},u.access_token)}catch{}finally{Fl()}}var vi={exports:{}};/* @license
|
|
Papa Parse
|
|
v5.5.4
|
|
https://github.com/mholt/PapaParse
|
|
License: MIT
|
|
*/var Bx=vi.exports,S0;function Hx(){return S0||(S0=1,(function(u,d){((x,r)=>{u.exports=r()})(Bx,function x(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},g,b=!r.document&&!!r.postMessage,S=r.IS_PAPA_WORKER||!1,C={},j=0,f={};function N(v){return v.charCodeAt(0)===65279?v.slice(1):v}function k(v){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(m){var z=re(m);z.chunkSize=parseInt(z.chunkSize),m.step||m.chunk||(z.chunkSize=null),this._handle=new se(z),(this._handle.streamer=this)._config=z}).call(this,v),this.parseChunk=function(m,z){var K=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<K){let te=this._config.newline;te||(Q=this._config.quoteChar||'"',te=this._handle.guessLineEndings(m,Q)),m=[...m.split(te).slice(K)].join(te)}this.isFirstChunk&&ne(this._config.beforeFirstChunk)&&(Q=this._config.beforeFirstChunk(m))!==void 0&&(m=Q),this.isFirstChunk=!1,this._halted=!1;var K=this._partialLine+m,Q=(this._partialLine="",this._handle.parse(K,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(m=Q.meta.cursor,K=(this._finished||(this._partialLine=K.substring(m-this._baseIndex),this._baseIndex=m),Q&&Q.data&&(this._rowCount+=Q.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),S)r.postMessage({results:Q,workerId:f.WORKER_ID,finished:K});else if(ne(this._config.chunk)&&!z){if(this._config.chunk(Q,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=Q=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(Q.data),this._completeResults.errors=this._completeResults.errors.concat(Q.errors),this._completeResults.meta=Q.meta),this._completed||!K||!ne(this._config.complete)||Q&&Q.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),K||Q&&Q.meta.paused||this._nextChunk(),Q}this._halted=!0},this._sendError=function(m){ne(this._config.error)?this._config.error(m):S&&this._config.error&&r.postMessage({workerId:f.WORKER_ID,error:m,finished:!1})}}function U(v){var m;(v=v||{}).chunkSize||(v.chunkSize=f.RemoteChunkSize),k.call(this,v),this._nextChunk=b?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(z){this._input=z,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(m=new XMLHttpRequest,this._config.withCredentials&&(m.withCredentials=this._config.withCredentials),b||(m.onload=F(this._chunkLoaded,this),m.onerror=F(this._chunkError,this)),m.open(this._config.downloadRequestBody?"POST":"GET",this._input,!b),this._config.downloadRequestHeaders){var z,K=this._config.downloadRequestHeaders;for(z in K)m.setRequestHeader(z,K[z])}var Q;this._config.chunkSize&&(Q=this._start+this._config.chunkSize-1,m.setRequestHeader("Range","bytes="+this._start+"-"+Q));try{m.send(this._config.downloadRequestBody)}catch(te){this._chunkError(te.message)}b&&m.status===0&&this._chunkError()}},this._chunkLoaded=function(){m.readyState===4&&(m.status<200||400<=m.status?this._chunkError():(this._start+=this._config.chunkSize||m.responseText.length,this._finished=!this._config.chunkSize||this._start>=(z=>(z=z.getResponseHeader("Content-Range"))!==null?parseInt(z.substring(z.lastIndexOf("/")+1)):-1)(m),this.parseChunk(m.responseText)))},this._chunkError=function(z){z=m.statusText||z,this._sendError(new Error(z))}}function J(v){(v=v||{}).chunkSize||(v.chunkSize=f.LocalChunkSize),k.call(this,v);var m,z,K=typeof FileReader<"u";this.stream=function(Q){this._input=Q,z=Q.slice||Q.webkitSlice||Q.mozSlice,K?((m=new FileReader).onload=F(this._chunkLoaded,this),m.onerror=F(this._chunkError,this)):m=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var Q=this._input,te=(this._config.chunkSize&&(te=Math.min(this._start+this._config.chunkSize,this._input.size),Q=z.call(Q,this._start,te)),m.readAsText(Q,this._config.encoding));K||this._chunkLoaded({target:{result:te}})},this._chunkLoaded=function(Q){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(Q.target.result)},this._chunkError=function(){this._sendError(m.error)}}function R(v){var m;k.call(this,v=v||{}),this.stream=function(z){return m=z,this._nextChunk()},this._nextChunk=function(){var z,K;if(!this._finished)return z=this._config.chunkSize,m=z?(K=m.substring(0,z),m.substring(z)):(K=m,""),this._finished=!m,this.parseChunk(K)}}function Z(v){k.call(this,v=v||{});var m=[],z=!0,K=!1;this.pause=function(){k.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){k.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Q){this._input=Q,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){K&&m.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),m.length?this.parseChunk(m.shift()):z=!0},this._streamData=F(function(Q){try{m.push(typeof Q=="string"?Q:Q.toString(this._config.encoding)),z&&(z=!1,this._checkIsFinished(),this.parseChunk(m.shift()))}catch(te){this._streamError(te)}},this),this._streamError=F(function(Q){this._streamCleanUp(),this._sendError(Q)},this),this._streamEnd=F(function(){this._streamCleanUp(),K=!0,this._streamData("")},this),this._streamCleanUp=F(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function se(v){var m,z,K,Q,te=Math.pow(2,53),he=-te,T=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,M=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Y=this,X=0,G=0,h=!1,_=!1,V=[],L={data:[],errors:[],meta:{}};function le(ae){return v.skipEmptyLines==="greedy"?ae.join("").trim()==="":ae.length===1&&ae[0].length===0}function $(){if(L&&K&&(He("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+f.DefaultDelimiter+"'"),K=!1),v.skipEmptyLines&&(L.data=L.data.filter(function(qe){return!le(qe)})),ce()){let qe=function(Ue,Te){Ue=N(Ue),ne(v.transformHeader)&&(Ue=v.transformHeader(Ue,Te)),V.push(Ue)};var fe=qe;if(L)if(Array.isArray(L.data[0])){for(var ae=0;ce()&&ae<L.data.length;ae++)L.data[ae].forEach(qe);L.data.splice(0,1)}else L.data.forEach(qe)}function me(qe,Ue){for(var Te=v.header?{}:[],Ce=0;Ce<qe.length;Ce++){var ge=Ce,at=qe[Ce],at=((_e,Be)=>(Je=>(v.dynamicTypingFunction&&v.dynamicTyping[Je]===void 0&&(v.dynamicTyping[Je]=v.dynamicTypingFunction(Je)),(v.dynamicTyping[Je]||v.dynamicTyping)===!0))(_e)?Be==="true"||Be==="TRUE"||Be!=="false"&&Be!=="FALSE"&&((Je=>{if(T.test(Je)&&(Je=parseFloat(Je),he<Je&&Je<te))return 1})(Be)?parseFloat(Be):M.test(Be)?new Date(Be):Be===""?null:Be):Be)(ge=v.header?Ce>=V.length?"__parsed_extra":V[Ce]:ge,at=v.transform?v.transform(at,ge):at);ge==="__parsed_extra"?(Te[ge]=Te[ge]||[],Te[ge].push(at)):Te[ge]=at}return v.header&&(Ce>V.length?He("FieldMismatch","TooManyFields","Too many fields: expected "+V.length+" fields but parsed "+Ce,G+Ue):Ce<V.length&&He("FieldMismatch","TooFewFields","Too few fields: expected "+V.length+" fields but parsed "+Ce,G+Ue)),Te}var Le;L&&(v.header||v.dynamicTyping||v.transform)&&(Le=1,!L.data.length||Array.isArray(L.data[0])?(L.data=L.data.map(me),Le=L.data.length):L.data=me(L.data,0),v.header&&L.meta&&(L.meta.fields=V),G+=Le)}function ce(){return v.header&&V.length===0}function He(ae,me,Le,fe){ae={type:ae,code:me,message:Le},fe!==void 0&&(ae.row=fe),L.errors.push(ae)}ne(v.step)&&(Q=v.step,v.step=function(ae){L=ae,ce()?$():($(),L.data.length!==0&&(X+=ae.data.length,v.preview&&X>v.preview?z.abort():(L.data=L.data[0],Q(L,Y))))}),this.parse=function(ae,me,Le){var fe=v.quoteChar||'"',fe=(v.newline||(v.newline=this.guessLineEndings(ae,fe)),K=!1,v.delimiter?ne(v.delimiter)&&(v.delimiter=v.delimiter(ae),L.meta.delimiter=v.delimiter):((fe=((qe,Ue,Te,Ce,ge)=>{var at,_e,Be,Je;ge=ge||[","," ","|",";",f.RECORD_SEP,f.UNIT_SEP];for(var Ht=0;Ht<ge.length;Ht++){for(var vt,We=ge[Ht],et=0,Nt=0,Pe=0,st=(Be=void 0,new ee({comments:Ce,delimiter:We,newline:Ue,preview:10}).parse(qe)),Tt=0;Tt<st.data.length;Tt++)Te&&le(st.data[Tt])?Pe++:(vt=st.data[Tt].length,Nt+=vt,Be===void 0?Be=vt:0<vt&&(et+=Math.abs(vt-Be),Be=vt));0<st.data.length&&(Nt/=st.data.length-Pe),(_e===void 0||et<=_e)&&(Je===void 0||Je<Nt)&&1.99<Nt&&(_e=et,at=We,Je=Nt)}return{successful:!!(v.delimiter=at),bestDelimiter:at}})(ae,v.newline,v.skipEmptyLines,v.comments,v.delimitersToGuess)).successful?v.delimiter=fe.bestDelimiter:(K=!0,v.delimiter=f.DefaultDelimiter),L.meta.delimiter=v.delimiter),re(v));return v.preview&&v.header&&fe.preview++,m=ae,z=new ee(fe),L=z.parse(m,me,Le),$(),h?{meta:{paused:!0}}:L||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,z.abort(),m=ne(v.chunk)?"":m.substring(z.getCharIndex())},this.resume=function(){Y.streamer._halted?(h=!1,Y.streamer.parseChunk(m,!0)):setTimeout(Y.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,z.abort(),L.meta.aborted=!0,ne(v.complete)&&v.complete(L),m=""},this.guessLineEndings=function(qe,fe){qe=qe.substring(0,1048576);var fe=new RegExp(I(fe)+"([^]*?)"+I(fe),"gm"),Le=(qe=qe.replace(fe,"")).split("\r"),fe=qe.split(`
|
|
`),qe=1<fe.length&&fe[0].length<Le[0].length;if(Le.length===1||qe)return`
|
|
`;for(var Ue=0,Te=0;Te<Le.length;Te++)Le[Te][0]===`
|
|
`&&Ue++;return Ue>=Le.length/2?`\r
|
|
`:"\r"}}function I(v){return v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ee(v){var m=(v=v||{}).delimiter,z=v.newline,K=v.comments,Q=v.step,te=v.preview,he=v.fastMode,T=null,M=!1,Y=v.quoteChar==null?'"':v.quoteChar,X=Y;if(v.escapeChar!==void 0&&(X=v.escapeChar),(typeof m!="string"||-1<f.BAD_DELIMITERS.indexOf(m))&&(m=","),K===m)throw new Error("Comment character same as delimiter");K===!0?K="#":(typeof K!="string"||-1<f.BAD_DELIMITERS.indexOf(K))&&(K=!1),z!==`
|
|
`&&z!=="\r"&&z!==`\r
|
|
`&&(z=`
|
|
`);var G=0,h=!1;this.parse=function(_,V,L){if(typeof _!="string")throw new Error("Input must be a string");var le=_.length,$=m.length,ce=z.length,He=K.length,ae=ne(Q),me=[],Le=[],fe=[],qe=G=0;if(!_)return et();if(he||he!==!1&&_.indexOf(Y)===-1){for(var Ue=_.split(z),Te=0;Te<Ue.length;Te++){if(fe=Ue[Te],G+=fe.length,Te!==Ue.length-1)G+=z.length;else if(L)return et();if(!K||fe.substring(0,He)!==K){if(ae){if(me=[],Je(fe.split(m)),Nt(),h)return et()}else Je(fe.split(m));if(te&&te<=Te)return me=me.slice(0,te),et(!0)}}return et()}for(var Ce=_.indexOf(m,G),ge=_.indexOf(z,G),at=new RegExp(I(X)+I(Y),"g"),_e=_.indexOf(Y,G);;)if(_[G]===Y)for(_e=G,G++;;){if((_e=_.indexOf(Y,_e+1))===-1)return L||Le.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:me.length,index:G}),vt();if(_e===le-1)return vt(_.substring(G,_e).replace(at,Y));if(Y===X&&_[_e+1]===X)_e++;else if(Y===X||_e===0||_[_e-1]!==X){Ce!==-1&&Ce<_e+1&&(Ce=_.indexOf(m,_e+1));var Be=Ht((ge=ge!==-1&&ge<_e+1?_.indexOf(z,_e+1):ge)===-1?Ce:Math.min(Ce,ge));if(_.substr(_e+1+Be,$)===m){fe.push(_.substring(G,_e).replace(at,Y)),_[G=_e+1+Be+$]!==Y&&(_e=_.indexOf(Y,G)),Ce=_.indexOf(m,G),ge=_.indexOf(z,G);break}if(Be=Ht(ge),_.substring(_e+1+Be,_e+1+Be+ce)===z){if(fe.push(_.substring(G,_e).replace(at,Y)),We(_e+1+Be+ce),Ce=_.indexOf(m,G),_e=_.indexOf(Y,G),ae&&(Nt(),h))return et();if(te&&me.length>=te)return et(!0);break}Le.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:me.length,index:G}),_e++}}else if(K&&fe.length===0&&_.substring(G,G+He)===K){if(ge===-1)return et();G=ge+ce,ge=_.indexOf(z,G),Ce=_.indexOf(m,G)}else if(Ce!==-1&&(Ce<ge||ge===-1))fe.push(_.substring(G,Ce)),G=Ce+$,Ce=_.indexOf(m,G);else{if(ge===-1)break;if(fe.push(_.substring(G,ge)),We(ge+ce),ae&&(Nt(),h))return et();if(te&&me.length>=te)return et(!0)}return vt();function Je(Pe){me.push(Pe),qe=G}function Ht(Pe){var st=0;return st=Pe!==-1&&(Pe=_.substring(_e+1,Pe))&&Pe.trim()===""?Pe.length:st}function vt(Pe){return L||(Pe===void 0&&(Pe=_.substring(G)),fe.push(Pe),G=le,Je(fe),ae&&Nt()),et()}function We(Pe){G=Pe,Je(fe),fe=[],ge=_.indexOf(z,G)}function et(Pe){if(v.header&&!V&&me.length&&!M){var st=me[0],Tt=Object.create(null),sl=new Set(st);let $l=!1;for(let ve=0;ve<st.length;ve++){let pe=N(st[ve]);if(Tt[pe=ne(v.transformHeader)?v.transformHeader(pe,ve):pe]){let Ge,St=Tt[pe];for(;Ge=pe+"_"+St,St++,sl.has(Ge););sl.add(Ge),st[ve]=Ge,Tt[pe]++,$l=!0,(T=T===null?{}:T)[Ge]=pe}else Tt[pe]=1,st[ve]=pe;sl.add(pe)}$l&&console.warn("Duplicate headers found and renamed."),M=!0}return{data:me,errors:Le,meta:{delimiter:m,linebreak:z,aborted:h,truncated:!!Pe,cursor:qe+(V||0),renamedHeaders:T}}}function Nt(){Q(et()),me=[],Le=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return G}}function be(v){var m=v.data,z=C[m.workerId],K=!1;if(m.error)z.userError(m.error,m.file);else if(m.results&&m.results.data){var Q={abort:function(){K=!0,Oe(m.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:Ne,resume:Ne};if(ne(z.userStep)){for(var te=0;te<m.results.data.length&&(z.userStep({data:m.results.data[te],errors:m.results.errors,meta:m.results.meta},Q),!K);te++);delete m.results}else ne(z.userChunk)&&(z.userChunk(m.results,Q,m.file),delete m.results)}m.finished&&!K&&Oe(m.workerId,m.results)}function Oe(v,m){var z=C[v];ne(z.userComplete)&&z.userComplete(m),z.terminate(),delete C[v]}function Ne(){throw new Error("Not implemented.")}function re(v){if(typeof v!="object"||v===null)return v;var m,z=Array.isArray(v)?[]:{};for(m in v)z[m]=re(v[m]);return z}function F(v,m){return function(){v.apply(m,arguments)}}function ne(v){return typeof v=="function"}return f.parse=function(v,m){var z=(m=m||{}).dynamicTyping||!1;if(ne(z)&&(m.dynamicTypingFunction=z,z={}),m.dynamicTyping=z,m.transform=!!ne(m.transform)&&m.transform,!m.worker||!f.WORKERS_SUPPORTED)return z=null,f.NODE_STREAM_INPUT,typeof v=="string"?(v=N(v),z=new(m.download?U:R)(m)):v.readable===!0&&ne(v.read)&&ne(v.on)?z=new Z(m):(r.File&&v instanceof File||v instanceof Object)&&(z=new J(m)),z.stream(v);(z=(()=>{var K;return!!f.WORKERS_SUPPORTED&&(K=(()=>{var Q=r.URL||r.webkitURL||null,te=x.toString();return f.BLOB_URL||(f.BLOB_URL=Q.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",te,")();"],{type:"text/javascript"})))})(),(K=new r.Worker(K)).onmessage=be,K.id=j++,C[K.id]=K)})()).userStep=m.step,z.userChunk=m.chunk,z.userComplete=m.complete,z.userError=m.error,m.step=ne(m.step),m.chunk=ne(m.chunk),m.complete=ne(m.complete),m.error=ne(m.error),delete m.worker,z.postMessage({input:v,config:m,workerId:z.id})},f.unparse=function(v,m){var z=!1,K=!0,Q=",",te=`\r
|
|
`,he='"',T=he+he,M=!1,Y=null,X=!1,G=((()=>{if(typeof m=="object"){if(typeof m.delimiter!="string"||f.BAD_DELIMITERS.filter(function(V){return m.delimiter.indexOf(V)!==-1}).length||(Q=m.delimiter),typeof m.quotes!="boolean"&&typeof m.quotes!="function"&&!Array.isArray(m.quotes)||(z=m.quotes),typeof m.skipEmptyLines!="boolean"&&typeof m.skipEmptyLines!="string"||(M=m.skipEmptyLines),typeof m.newline=="string"&&(te=m.newline),typeof m.quoteChar=="string"&&(he=m.quoteChar,T=he+he),typeof m.header=="boolean"&&(K=m.header),Array.isArray(m.columns)){if(m.columns.length===0)throw new Error("Option columns is empty");Y=m.columns}m.escapeChar!==void 0&&(T=m.escapeChar+he),m.escapeFormulae instanceof RegExp?X=m.escapeFormulae:typeof m.escapeFormulae=="boolean"&&m.escapeFormulae&&(X=/^[=+\-@\t\r].*$/)}})(),new RegExp(I(he),"g"));if(typeof v=="string"&&(v=JSON.parse(v)),Array.isArray(v)){if(!v.length||Array.isArray(v[0]))return h(null,v,M);if(typeof v[0]=="object")return h(Y||Object.keys(v[0]),v,M)}else if(typeof v=="object")return typeof v.data=="string"&&(v.data=JSON.parse(v.data)),Array.isArray(v.data)&&(v.fields||(v.fields=v.meta&&v.meta.fields||Y),v.fields||(v.fields=Array.isArray(v.data[0])?v.fields:typeof v.data[0]=="object"?Object.keys(v.data[0]):[]),Array.isArray(v.data[0])||typeof v.data[0]=="object"||(v.data=[v.data])),h(v.fields||[],v.data||[],M);throw new Error("Unable to serialize unrecognized input");function h(V,L,le){var $="",ce=(typeof V=="string"&&(V=JSON.parse(V)),typeof L=="string"&&(L=JSON.parse(L)),Array.isArray(V)&&0<V.length),He=!Array.isArray(L[0]);if(ce&&K){for(var ae=0;ae<V.length;ae++)0<ae&&($+=Q),$+=_(V[ae],ae);0<L.length&&($+=te)}for(var me=0;me<L.length;me++){var Le=(ce?V:L[me]).length,fe=!1,qe=ce?Object.keys(L[me]).length===0:L[me].length===0;if(le&&!ce&&(fe=le==="greedy"?L[me].join("").trim()==="":L[me].length===1&&L[me][0].length===0),le==="greedy"&&ce){for(var Ue=[],Te=0;Te<Le;Te++){var Ce=He?V[Te]:Te;Ue.push(L[me][Ce])}fe=Ue.join("").trim()===""}if(!fe){for(var ge=0;ge<Le;ge++){0<ge&&!qe&&($+=Q);var at=ce&&He?V[ge]:ge;$+=_(L[me][at],ge)}me<L.length-1&&(!le||0<Le&&!qe)&&($+=te)}}return $}function _(V,L){var le,$,ce;return V==null?"":V.constructor===Date?JSON.stringify(V).slice(1,25):(ce=!1,X&&typeof V=="string"&&X.test(V)&&(V="'"+V,ce=!0),$=(le=V.toString()).replace(G,T),(ce=ce||z===!0||typeof z=="function"&&z(V,L)||Array.isArray(z)&&z[L]||((He,ae)=>{for(var me=0;me<ae.length;me++)if(-1<He.indexOf(ae[me]))return!0;return!1})($,f.BAD_DELIMITERS)||-1<$.indexOf(Q)||-1<le.indexOf(he)||$.charAt(0)===" "||$.charAt($.length-1)===" ")?he+$+he:$)}},f.RECORD_SEP="",f.UNIT_SEP="",f.BYTE_ORDER_MARK="\uFEFF",f.BAD_DELIMITERS=["\r",`
|
|
`,'"',f.BYTE_ORDER_MARK],f.WORKERS_SUPPORTED=!b&&!!r.Worker,f.NODE_STREAM_INPUT=1,f.LocalChunkSize=10485760,f.RemoteChunkSize=5242880,f.DefaultDelimiter=",",f.Parser=ee,f.ParserHandle=se,f.NetworkStreamer=U,f.FileStreamer=J,f.StringStreamer=R,f.ReadableStreamStreamer=Z,r.jQuery&&((g=r.jQuery).fn.parse=function(v){var m=v.config||{},z=[];return this.each(function(te){if(!(g(this).prop("tagName").toUpperCase()==="INPUT"&&g(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var he=0;he<this.files.length;he++)z.push({file:this.files[he],inputElem:this,instanceConfig:g.extend({},m)})}),K(),this;function K(){if(z.length===0)ne(v.complete)&&v.complete();else{var te,he,T,M,Y=z[0];if(ne(v.before)){var X=v.before(Y.file,Y.inputElem);if(typeof X=="object"){if(X.action==="abort")return te="AbortError",he=Y.file,T=Y.inputElem,M=X.reason,void(ne(v.error)&&v.error({name:te},he,T,M));if(X.action==="skip")return void Q();typeof X.config=="object"&&(Y.instanceConfig=g.extend(Y.instanceConfig,X.config))}else if(X==="skip")return void Q()}var G=Y.instanceConfig.complete;Y.instanceConfig.complete=function(h){ne(G)&&G(h,Y.file,Y.inputElem),Q()},f.parse(Y.file,Y.instanceConfig)}}function Q(){z.splice(0,1),K()}}),S&&(r.onmessage=function(v){v=v.data,f.WORKER_ID===void 0&&v&&(f.WORKER_ID=v.workerId),typeof v.input=="string"?r.postMessage({workerId:f.WORKER_ID,results:f.parse(v.input,v.config),finished:!0}):(r.File&&v.input instanceof File||v.input instanceof Object)&&(v=f.parse(v.input,v.config))&&r.postMessage({workerId:f.WORKER_ID,results:v,finished:!0})}),(U.prototype=Object.create(k.prototype)).constructor=U,(J.prototype=Object.create(k.prototype)).constructor=J,(R.prototype=Object.create(R.prototype)).constructor=R,(Z.prototype=Object.create(k.prototype)).constructor=Z,f})})(vi)),vi.exports}var Vx=Hx();const j0=bx(Vx),Qr=[{customer:"Supermercado El Rey - Calle 50",zone:"Zona Centro",address:"Calle 50 y San Francisco, N° 102",coordinates:"8.9833, -79.5167",customerCode:"CUST-1001",customerChannel:"Supermercados",csSoldIn:120,unitsSoldIn:1440,lSoldIn:720,auditor:"Auditor #01 - Carlos Ruiz",visitDays:["Monday","Thursday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Super 99 - Vía Porras",zone:"Zona Centro",address:"Vía Porras y Calle 68, San Francisco",coordinates:"8.9891, -79.5102",customerCode:"CUST-1002",customerChannel:"Supermercados",csSoldIn:95,unitsSoldIn:1140,lSoldIn:570,auditor:"Auditor #01 - Carlos Ruiz",visitDays:["Monday","Wednesday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Riba Smith - Bella Vista",zone:"Zona Centro",address:"Av. Justo Arosemena, Bella Vista",coordinates:"8.9744, -79.5298",customerCode:"CUST-1003",customerChannel:"Supermercados",csSoldIn:150,unitsSoldIn:1800,lSoldIn:900,auditor:"Auditor #02 - Ana Gómez",visitDays:["Tuesday","Friiday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Minisuper La Bendición - San Miguelito",zone:"Zona Norte",address:"Calle Principal, Sector 3, San Miguelito",coordinates:"9.0333, -79.5000",customerCode:"CUST-1004",customerChannel:"Tradicional",csSoldIn:30,unitsSoldIn:360,lSoldIn:180,auditor:"Auditor #03 - Jorge Mendoza",visitDays:["Monday","Wednesday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Tienda Va y Ven - Terpel Brisas",zone:"Zona Este",address:"Av. Manuel E. Batista, Brisas del Golf",coordinates:"9.0512, -79.4520",customerCode:"CUST-1005",customerChannel:"Conveniencia",csSoldIn:45,unitsSoldIn:540,lSoldIn:270,auditor:"Auditor #02 - Ana Gómez",visitDays:["Tuesday","Thursday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Farmacias Arrocha - Costa del Este",zone:"Zona Este",address:"Paseo del Mar, Costa del Este",coordinates:"9.0110, -79.4700",customerCode:"CUST-1006",customerChannel:"Farmacias",csSoldIn:60,unitsSoldIn:720,lSoldIn:360,auditor:"Auditor #04 - Luisa Fernández",visitDays:["Wednesday","Friiday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Pricesmart - Vía España",zone:"Zona Centro",address:"Vía España y Calle 12, Carrasquilla",coordinates:"8.9950, -79.5080",customerCode:"CUST-1007",customerChannel:"Clubes de Compra",csSoldIn:300,unitsSoldIn:3600,lSoldIn:1800,auditor:"Auditor #01 - Carlos Ruiz",visitDays:["Monday","Friiday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Super Carnes - David Chiriquí",zone:"Zona Oeste",address:"Av. Central, David, Chiriquí",coordinates:"8.4273, -82.4308",customerCode:"CUST-1008",customerChannel:"Supermercados",csSoldIn:110,unitsSoldIn:1320,lSoldIn:660,auditor:"Auditor #05 - Roberto Blanco",visitDays:["Tuesday","Thursday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Minisuper Express - Chorrera",zone:"Zona Oeste",address:"Av. las Américas, La Chorrera",coordinates:"8.8803, -79.7833",customerCode:"CUST-1009",customerChannel:"Tradicional",csSoldIn:25,unitsSoldIn:300,lSoldIn:150,auditor:"Auditor #05 - Roberto Blanco",visitDays:["Wednesday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Deli Gourmet - Obarrio",zone:"Zona Centro",address:"Calle 54, Obarrio",coordinates:"8.9865, -79.5190",customerCode:"CUST-1010",customerChannel:"Conveniencia",csSoldIn:40,unitsSoldIn:480,lSoldIn:240,auditor:"Auditor #02 - Ana Gómez",visitDays:["Monday","Thursday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-20"},{customer:"Supermercado El Rey - Calle 50",zone:"Zona Centro",address:"Calle 50 y San Francisco, N° 102",coordinates:"8.9833, -79.5167",customerCode:"CUST-1001",customerChannel:"Supermercados",csSoldIn:120,unitsSoldIn:1440,lSoldIn:720,auditor:"Auditor #01 - Carlos Ruiz",visitDays:["Monday","Thursday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-27"},{customer:"Super 99 - Vía Porras",zone:"Zona Centro",address:"Vía Porras y Calle 68, San Francisco",coordinates:"8.9891, -79.5102",customerCode:"CUST-1002",customerChannel:"Supermercados",csSoldIn:95,unitsSoldIn:1140,lSoldIn:570,auditor:"Auditor #01 - Carlos Ruiz",visitDays:["Monday","Wednesday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-27"},{customer:"Riba Smith - Bella Vista",zone:"Zona Centro",address:"Av. Justo Arosemena, Bella Vista",coordinates:"8.9744, -79.5298",customerCode:"CUST-1003",customerChannel:"Supermercados",csSoldIn:150,unitsSoldIn:1800,lSoldIn:900,auditor:"Auditor #02 - Ana Gómez",visitDays:["Tuesday","Friiday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-27"},{customer:"Minisuper La Bendición - San Miguelito",zone:"Zona Norte",address:"Calle Principal, Sector 3, San Miguelito",coordinates:"9.0333, -79.5000",customerCode:"CUST-1004",customerChannel:"Tradicional",csSoldIn:30,unitsSoldIn:360,lSoldIn:180,auditor:"Auditor #03 - Jorge Mendoza",visitDays:["Monday","Wednesday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-27"},{customer:"Farmacias Arrocha - Costa del Este",zone:"Zona Este",address:"Paseo del Mar, Costa del Este",coordinates:"9.0110, -79.4700",customerCode:"CUST-1006",customerChannel:"Farmacias",csSoldIn:60,unitsSoldIn:720,lSoldIn:360,auditor:"Auditor #04 - Luisa Fernández",visitDays:["Wednesday","Friiday"],skuDetail:"LUCOZADE SPORT ICE KICK 12/500ML",assignedDate:"2026-07-27"}],Xr=[{submissionId:"SUB-88201",submissionDate:"2026-07-20 09:15",customer:"Supermercado El Rey - Calle 50",isAvailable:"Yes",placementLocation:"Estante Principal",shelfPhotos:["https://images.unsplash.com/photo-1578916171728-46686eac8d58?auto=format&fit=crop&w=800&q=80","https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=800&q=80"],popVisible:"Wobblers, Posters, Cenefa en buen estado",popPhotos:["https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?auto=format&fit=crop&w=800&q=80"],retailPrice:2.25,facingsIceKick:6,facingsLucozadeBrand:14,facingsCategoryTotal:48,categoryPhotos:["https://images.unsplash.com/photo-1622483767028-3f66f32aef97?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"Gatorade Cool Blue 500ml (-2 frentes)",totalPhysicalInventory:340,lastUpdateDate:"2026-07-20 09:30"},{submissionId:"SUB-88202",submissionDate:"2026-07-20 11:20",customer:"Super 99 - Vía Porras",isAvailable:"Yes",placementLocation:"Exhibición Secundaria",shelfPhotos:["https://images.unsplash.com/photo-1583258292688-d0213dc5a3a8?auto=format&fit=crop&w=800&q=80"],popVisible:"Poster Promocional y Stopper",popPhotos:["https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?auto=format&fit=crop&w=800&q=80"],retailPrice:2.3,facingsIceKick:4,facingsLucozadeBrand:10,facingsCategoryTotal:40,categoryPhotos:["https://images.unsplash.com/photo-1534723452862-4c874018d66d?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"Powerade Mountain Blast 500ml (-2 frentes)",totalPhysicalInventory:185,lastUpdateDate:"2026-07-20 11:45"},{submissionId:"SUB-88203",submissionDate:"2026-07-21 08:45",customer:"Riba Smith - Bella Vista",isAvailable:"Yes",placementLocation:"Cabecera de Góndola",shelfPhotos:["https://images.unsplash.com/photo-1604719312566-8912e9227c6a?auto=format&fit=crop&w=800&q=80"],popVisible:"Wobbler y Cabecera Decorada Completa",popPhotos:["https://images.unsplash.com/photo-1507679799987-c73779587ccf?auto=format&fit=crop&w=800&q=80"],retailPrice:2.5,facingsIceKick:8,facingsLucozadeBrand:18,facingsCategoryTotal:52,categoryPhotos:["https://images.unsplash.com/photo-1578916171728-46686eac8d58?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"Red Bull 250ml Regular (-3 frentes)",totalPhysicalInventory:420,lastUpdateDate:"2026-07-21 09:05"},{submissionId:"SUB-88204",submissionDate:"2026-07-21 10:10",customer:"Minisuper La Bendición - San Miguelito",isAvailable:"No",placementLocation:"N/A - Agotado",shelfPhotos:[],popVisible:"Sin material POP visible",popPhotos:[],retailPrice:0,facingsIceKick:0,facingsLucozadeBrand:2,facingsCategoryTotal:18,categoryPhotos:["https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"N/A - Producto sin stock",totalPhysicalInventory:0,lastUpdateDate:"2026-07-21 10:20"},{submissionId:"SUB-88205",submissionDate:"2026-07-21 14:00",customer:"Tienda Va y Ven - Terpel Brisas",isAvailable:"Yes",placementLocation:"Estante Principal",shelfPhotos:["https://images.unsplash.com/photo-1583258292688-d0213dc5a3a8?auto=format&fit=crop&w=800&q=80"],popVisible:"Stopper de Nevera y Sticker de Precio",popPhotos:["https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?auto=format&fit=crop&w=800&q=80"],retailPrice:2.6,facingsIceKick:3,facingsLucozadeBrand:6,facingsCategoryTotal:24,categoryPhotos:["https://images.unsplash.com/photo-1534723452862-4c874018d66d?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"Monster Energy Original 473ml (-1 frente)",totalPhysicalInventory:64,lastUpdateDate:"2026-07-21 14:15"},{submissionId:"SUB-88211",submissionDate:"2026-07-27 10:00",customer:"Supermercado El Rey - Calle 50",isAvailable:"Yes",placementLocation:"Estante Principal",shelfPhotos:["https://images.unsplash.com/photo-1578916171728-46686eac8d58?auto=format&fit=crop&w=800&q=80"],popVisible:"Wobblers y Cenefa",popPhotos:[],retailPrice:2.25,facingsIceKick:8,facingsLucozadeBrand:16,facingsCategoryTotal:50,categoryPhotos:["https://images.unsplash.com/photo-1622483767028-3f66f32aef97?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"Gatorade Cool Blue (-2 frentes)",totalPhysicalInventory:310,lastUpdateDate:"2026-07-27 10:20"},{submissionId:"SUB-88212",submissionDate:"2026-07-28 11:30",customer:"Super 99 - Vía Porras",isAvailable:"No",placementLocation:"N/A - Agotado",shelfPhotos:[],popVisible:"Poster Promocional",popPhotos:[],retailPrice:0,facingsIceKick:0,facingsLucozadeBrand:8,facingsCategoryTotal:42,categoryPhotos:["https://images.unsplash.com/photo-1534723452862-4c874018d66d?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"N/A - Sin stock",totalPhysicalInventory:0,lastUpdateDate:"2026-07-28 11:45"},{submissionId:"SUB-88213",submissionDate:"2026-07-28 15:10",customer:"Minisuper La Bendición - San Miguelito",isAvailable:"Yes",placementLocation:"Estante Principal",shelfPhotos:["https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=800&q=80"],popVisible:"Poster reubicado",popPhotos:[],retailPrice:2.2,facingsIceKick:3,facingsLucozadeBrand:6,facingsCategoryTotal:20,categoryPhotos:["https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=800&q=80"],skuSubstitution:"Gatorade (-1 frente)",totalPhysicalInventory:85,lastUpdateDate:"2026-07-28 15:25"}];function oo(u){if(!u||!u.trim())return null;const d=u.trim(),x=Number(d);if(!isNaN(x)&&x>3e4&&x<6e4){const S=(x-25569)*86400*1e3,C=new Date(S);if(!isNaN(C.getTime()))return new Date(C.getFullYear(),C.getMonth(),C.getDate())}const r=d.match(/^(\d{4})[\/-](\d{1,2})[\/-](\d{1,2})/);if(r){const S=parseInt(r[1],10),C=parseInt(r[2],10)-1,j=parseInt(r[3],10);if(C>=0&&C<=11&&j>=1&&j<=31)return new Date(S,C,j)}const g=d.match(/^(\d{1,2})[\/-](\d{1,2})[\/-](\d{2,4})/);if(g){const S=parseInt(g[1],10),C=parseInt(g[2],10);let j=parseInt(g[3],10);j<100&&(j+=2e3);let f=S,N=C-1;if(S>12?(f=S,N=C-1):C>12?(N=S-1,f=C):(f=S,N=C-1),N>=0&&N<=11&&f>=1&&f<=31)return new Date(j,N,f)}const b=Date.parse(d);if(!isNaN(b)){const S=new Date(b);if(!isNaN(S.getTime()))return new Date(S.getFullYear(),S.getMonth(),S.getDate())}return null}function Ir(u){const d=typeof u=="string"?oo(u):u;if(!d||isNaN(d.getTime()))return null;const x=d.getDay(),r=x===0?-6:1-x,g=new Date(d.getFullYear(),d.getMonth(),d.getDate());g.setDate(d.getDate()+r);const b=new Date(g.getFullYear(),g.getMonth(),g.getDate());b.setDate(g.getDate()+6);const S=R=>R<10?"0"+R:""+R,C=`${g.getFullYear()}-${S(g.getMonth()+1)}-${S(g.getDate())}`,j=`${b.getFullYear()}-${S(b.getMonth()+1)}-${S(b.getDate())}`,f=R=>R.toLocaleDateString("en-US",{month:"short",day:"numeric"}),N=g.getFullYear(),k=`${C}_${j}`,U=`${f(g)} - ${f(b)}, ${N}`,J=`${f(g)} - ${f(b)}`;return{key:k,label:U,shortLabel:J,startDate:C,endDate:j}}function B0(u,d){if(!u||!d||d==="all")return!0;const x=Ir(u);return x?x.key===d:!1}function ji(u){if(!u)return"";const d=u.trim();if(!d)return"";const x=d.match(/\d+/);if(x){const r=parseInt(x[0],10);if(!isNaN(r)&&r>0&&r<100)return`Semana ${r}`}return d.charAt(0).toUpperCase()+d.slice(1)}function Yx(u){const d=typeof u=="string"?oo(u):u;if(!d||isNaN(d.getTime()))return null;const x=new Date(d.valueOf()),r=(d.getDay()+6)%7;x.setDate(x.getDate()-r+3);const g=x.valueOf();return x.setMonth(0,1),x.getDay()!==4&&x.setMonth(0,1+(4-x.getDay()+7)%7),1+Math.ceil((g-x.valueOf())/6048e5)}function N0(u,d,x){if(x==="all")return!0;const r=ji(x),g=ji(u);if(g&&r&&g.toLowerCase()===r.toLowerCase())return!0;if(d){if(B0(d,x))return!0;const b=Yx(d);if(b&&r.toLowerCase()===`semana ${b}`)return!0}return!1}function Gx(u,d){const x=new Set;if(u.forEach(g=>{const b=ji(g.week);b&&x.add(b)}),d.forEach(g=>{const b=ji(g.week);b&&x.add(b)}),x.size>0)return Array.from(x).sort((b,S)=>{const C=(b.match(/\d+/)||[])[0]?parseInt((b.match(/\d+/)||[])[0],10):0,j=(S.match(/\d+/)||[])[0]?parseInt((S.match(/\d+/)||[])[0],10):0;return C&&j?j-C:S.localeCompare(b,void 0,{numeric:!0})}).map(b=>({key:b,label:b,shortLabel:b,startDate:b,endDate:b}));const r=new Map;return u.forEach(g=>{if(g.assignedDate){const b=Ir(g.assignedDate);b&&!r.has(b.key)&&r.set(b.key,b)}}),d.forEach(g=>{if(g.submissionDate){const b=Ir(g.submissionDate);b&&!r.has(b.key)&&r.set(b.key,b)}}),Array.from(r.values()).sort((g,b)=>b.startDate.localeCompare(g.startDate))}const Ni="https://docs.google.com/spreadsheets/d/e/2PACX-1vQL9z6VLMOImLy33neZsu4iT6gLJe9pUv3hukhF5uq_RQ71musz6y4k4ljV4ywYcUZLu25NcnaDw_Mw/pubhtml";function je(u,d){if(!u)return"";const x=Object.keys(u);for(const r of d){const g=r.toLowerCase().trim(),b=x.find(S=>S.toLowerCase().trim()===g);if(b&&u[b]!==void 0&&u[b]!==null){const S=String(u[b]).trim();if(S!=="")return S}}for(const r of d){const g=r.toLowerCase().trim(),b=x.find(S=>S.toLowerCase().trim().includes(g));if(b&&u[b]!==void 0&&u[b]!==null){const S=String(u[b]).trim();if(S!=="")return S}}return""}function Jl(u){if(!u)return 0;const d=u.replace(/[^0-9.-]+/g,""),x=parseFloat(d);return isNaN(x)?0:x}function Xl(u){return!u||typeof u!="string"?"":u.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]/g," ").replace(/\s+/g," ").trim()}function Zx(u){return!u||u.length===0?[]:u.map((d,x)=>{const r=je(d,["Customer","Punto de venta","Tienda","Store","Nombre","Punto de Venta","Cliente","cliente"])||`Store #${x+1}`,g=je(d,["Zone","Zona"])||"General Zone",b=je(d,["Address","Direccion","Dirección"])||"N/A",S=je(d,["Coordinates","Coordenadas"])||"",C=je(d,["Customer Code","Codigo cliente","Código","Code","Codigo"])||`CUST-${1e3+x}`,j=je(d,["Customer Channel","Canal","Channel"])||"General",f=Jl(je(d,["Cs Sold In","Cajas"])),N=Jl(je(d,["Units Sold In","Unidades"])),k=Jl(je(d,["L Sold In","Litros"])),U=je(d,["Auditor #","Auditor"])||"Assigned Auditor",J=[];(je(d,["Monday","Lunes"]).toLowerCase().includes("y")||je(d,["Monday"]).length>0)&&J.push("Monday"),(je(d,["Tuesday","Martes"]).toLowerCase().includes("y")||je(d,["Tuesday"]).length>0)&&J.push("Tuesday"),(je(d,["Wednesday","Miercoles"]).toLowerCase().includes("y")||je(d,["Wednesday"]).length>0)&&J.push("Wednesday"),(je(d,["Thursday","Jueves"]).toLowerCase().includes("y")||je(d,["Thursday"]).length>0)&&J.push("Thursday"),(je(d,["Friiday","Friday","Viernes"]).toLowerCase().includes("y")||je(d,["Friiday","Friday"]).length>0)&&J.push("Friiday");const R=je(d,["LUCOZADE SPORT","SKU","Lemon Lime"]),Z=je(d,["Fecha Programada","Fecha de Visita","Fecha Visita","Fecha de Asignación","Fecha de asignacion","Fecha Asignada","Fecha Inicio","Assigned Date","Fecha","Date","fecha"]),se=je(d,["Week","week","SEMANA","Semana","Semanas","semana","Semana de auditoría","Semana Auditoría","Semana de Auditoria","semana_de_auditoria"]);return{customer:r,zone:g,address:b,coordinates:S,customerCode:C,customerChannel:j,csSoldIn:f,unitsSoldIn:N,lSoldIn:k,auditor:U,visitDays:J,skuDetail:R,assignedDate:Z,week:se}}).filter(d=>d.customer&&d.customer!=="N/A")}function Kx(u){return!u||u.length===0?[]:u.map((d,x)=>{const r=je(d,["Submission ID","ID","Id","Timestamp","Marca temporal"])||`SUB-${Date.now()}-${x}`,g=je(d,["Marca temporal","Timestamp","Submission Date","Fecha de Respuesta","Fecha de Formulario","Fecha de envío","Fecha de envio","Fecha de auditoría","Fecha de auditoria","Fecha","Date","fecha"])||new Date().toISOString().slice(0,16).replace("T"," "),b=je(d,["Dynamic Dropdowns","Punto de venta","Customer","Tienda","Store","Nombre","Punto de Venta","Cliente","cliente"])||"",C=(je(d,["available","available for sale","Is Lucozade Sport Ice Kick available","Ice Kick available","Agotado","Disponible","Producto disponible","isAvailable"])||"").toLowerCase();let j="No";if(C.includes("yes")||C.includes("si")||C.includes("sí")||C==="1"||C==="true"||C.includes("disponible"))j="Yes";else if(C.includes("no")||C==="0"||C==="false"||C.includes("agotado"))j="No";else{const m=JSON.stringify(d).toLowerCase();(m.includes('"yes"')||m.includes("disponible")||m.includes('"si"'))&&(j="Yes")}const f=je(d,["Where is the product located","Ubicacion","Ubicación","Location","Placement","Lugar"])||"Main Shelf",N=m=>m?m.split(/[\r\n,;\s]+/).map(K=>K.trim()).filter(K=>K.startsWith("http://")||K.startsWith("https://")):[],k=je(d,["photos of the shelf","Add photos of the shelf","Fotos de estante","Shelf photos"]),U=N(k),J=je(d,["Is promotional (POP) material visible","POP material","Material POP","POP visible"])||"Not Reported",R=je(d,["photos of the material POP","Add photos of the material POP","Fotos POP"]),Z=N(R),se=Jl(je(d,["exact retail price","Consumer Price","Precio","Price","Retail Price"])),I=Jl(je(d,["facings of Lucozade Ice Kick","Facings (Ice Kick)","Facings Ice Kick","Ice Kick Facings"])),ee=Jl(je(d,["facings of the entire Lucozade brand","Share of Brand Shelf","Facings Lucozade","Brand Facings"])),be=Jl(je(d,["facings of the entire energy and sports drink category","Share of Shelf by Facings","Total Category Facings","Category Facings"])),Oe=je(d,["photos of the Energy & Sports Drinks shelf","Add photos of the Energy","Category Photos"]),Ne=N(Oe),re=je(d,["Which brand/SKU gave up shelf space","SKU Substitution","Sustitución","Sustitucion"])||"None / N/A",F=Jl(je(d,["Total Physical Inventory","Inventario Fisico","Inventario Físico","Physical Inventory","Inventory"])),ne=je(d,["Last Update Date","Ultima actualizacion","Última actualización"])||g,v=je(d,["Week","week","SEMANA","Semana","Semanas","semana","Semana de auditoría","Semana Auditoría","Semana de Auditoria","semana_de_auditoria"]);return{submissionId:r,submissionDate:g,customer:b,isAvailable:j,placementLocation:f,shelfPhotos:U,popVisible:J,popPhotos:Z,retailPrice:se,facingsIceKick:I,facingsLucozadeBrand:ee,facingsCategoryTotal:be,categoryPhotos:Ne,skuSubstitution:re,totalPhysicalInventory:F,lastUpdateDate:ne,week:v}}).filter(d=>d.customer)}function k0(u){if(!u)return 0;const d=oo(u);return d?d.getTime():0}function w0(u){return!u||typeof u!="string"?"":u.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\b(supermercado|minisuper|tienda|farmacia|arrocha|super|express|autoservicio|despensa|abarrotes|sucursal|suc|no|n°|num|numero|vial)\b/gi,"").replace(/[^a-z0-9]/g," ").replace(/\s+/g," ").trim()}function Qx(u,d){const x=Xl(u),r=Xl(d);if(!x||!r)return 0;if(x===r)return 1;const g=new Set(x.split(" ").filter(j=>j.length>1)),b=new Set(r.split(" ").filter(j=>j.length>1));if(g.size===0||b.size===0)return 0;let S=0;g.forEach(j=>{b.has(j)&&S++});const C=new Set([...g,...b]).size;return C>0?S/C:0}function ki(u,d){if(!u||u.length===0)return[];const x=new Map,r=new Set,g=(S,C)=>{x.has(S)||x.set(S,[]),x.get(S).push(C),r.add(C.submissionId)},b=u.map((S,C)=>({idx:C,store:S,normName:Xl(S.customer),codeNorm:Xl(S.customerCode),cleanName:w0(S.customer)}));return d.forEach(S=>{if(r.has(S.submissionId))return;const C=Xl(S.customer),j=Xl(S.customerCode),f=b.find(N=>C&&N.normName===C||j&&N.codeNorm&&j===N.codeNorm);f&&g(f.idx,S)}),d.forEach(S=>{if(r.has(S.submissionId))return;const C=Xl(S.customer),j=w0(S.customer),f=b.find(N=>!!(j&&N.cleanName&&j===N.cleanName||C.length>=4&&N.normName.length>=4&&(C.includes(N.normName)||N.normName.includes(C))));f&&g(f.idx,S)}),d.forEach(S=>{if(r.has(S.submissionId)||!Xl(S.customer))return;let j=-1,f=0;b.forEach(N=>{const k=Qx(S.customer,N.store.customer);k>f&&k>=.35&&(f=k,j=N.idx)}),j!==-1&&g(j,S)}),d.forEach(S=>{if(r.has(S.submissionId))return;const C=b.find(j=>!x.has(j.idx));g(C?C.idx:0,S)}),u.map((S,C)=>{const f=[...x.get(C)||[]].sort((ee,be)=>{const Oe=k0(ee.submissionDate||ee.lastUpdateDate),Ne=k0(be.submissionDate||be.lastUpdateDate);return Oe-Ne}),N=f.length>0?f[f.length-1]:void 0,k=!!N,U=k?(N==null?void 0:N.isAvailable)==="No":!1,J=(N==null?void 0:N.facingsIceKick)||0,R=(N==null?void 0:N.facingsLucozadeBrand)||0,Z=(N==null?void 0:N.facingsCategoryTotal)||0,se=R>0?J/R*100:0,I=Z>0?R/Z*100:0;return{store:S,response:N,allResponses:f,status:k?"Visited":"Pending",hasOOS:U,shareOfBrandShelf:se,shareOfCategoryShelf:I}})}function Xx(u,d){let x=u.trim();const r=[];let g="";if(x.includes("/d/e/")){const b=x.match(/\/d\/e\/([a-zA-Z0-9-_]+)/);b&&b[1]&&(g=b[1])}else x.startsWith("2PACX-")&&(g=x);if(g)return r.push(`https://docs.google.com/spreadsheets/d/e/${g}/pub?output=csv&sheet=${encodeURIComponent(d)}`),r.push(`https://docs.google.com/spreadsheets/d/e/${g}/gviz/tq?tqx=out:csv&sheet=${encodeURIComponent(d)}`),r;if(x.includes("/spreadsheets/d/")){const b=x.match(/\/spreadsheets\/d\/([a-zA-Z0-9-_]+)/);b&&b[1]&&(x=b[1])}return r.push(`https://docs.google.com/spreadsheets/d/${x}/gviz/tq?tqx=out:csv&sheet=${encodeURIComponent(d)}`),r.push(`https://docs.google.com/spreadsheets/d/${x}/pub?output=csv&sheet=${encodeURIComponent(d)}`),r}async function C0(u,d){let x=u.trim(),r="";if(x.includes("/d/e/")){const b=x.match(/\/d\/e\/([a-zA-Z0-9-_]+)/);b&&b[1]&&(r=b[1])}else x.startsWith("2PACX-")&&(r=x);if(r)try{const b=`https://docs.google.com/spreadsheets/d/e/${r}/pubhtml`,S=await fetch(b);if(S.ok){const C=await S.text(),j=/items\.push\(\{name:\s*"([^"]+)",[^}]*gid:\s*"([^"]+)"/g;let f,N="";for(;(f=j.exec(C))!==null;)if(f[1].trim().toLowerCase()===d.trim().toLowerCase()){N=f[2];break}if(N){const k=`https://docs.google.com/spreadsheets/d/e/${r}/pub?gid=${N}&single=true&output=csv`,U=await fetch(k);if(U.ok){const J=await U.text();if(J&&!J.includes("<!DOCTYPE html")){const R=await new Promise((Z,se)=>{j0.parse(J,{header:!0,skipEmptyLines:!0,complete:I=>Z(I.data),error:I=>se(I)})});if(R&&R.length>0)return R}}}}}catch(b){console.warn("pubhtml resolution failed, trying fallback candidates...",b)}const g=Xx(u,d);for(const b of g)try{const S=await fetch(b);if(!S.ok)continue;const C=await S.text();if(!C||C.includes("<!DOCTYPE html")||C.includes("<html"))continue;const j=await new Promise((f,N)=>{j0.parse(C,{header:!0,skipEmptyLines:!0,complete:k=>f(k.data),error:k=>N(k)})});if(j&&j.length>0)return j}catch{}throw new Error(`No se pudo obtener datos CSV de la pestaña "${d}".`)}async function Jx(u=Ni,d){const x=new Date().toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit",second:"2-digit"});try{const g=await C0(u,"tiendas"),b=await C0(u,"Form responses"),S=Zx(g),C=Kx(b),j=S.length>0?S:Qr,f=C.length>0?C:Xr,N=ki(j,f);return{stores:j,responses:f,merged:N,lastSynced:x,source:"google_sheets_csv"}}catch(g){console.warn("CSV export fetch failed, using realistic demo dataset:",g)}const r=ki(Qr,Xr);return{stores:Qr,responses:Xr,merged:r,lastSynced:x,source:"fallback_demo",error:"No se pudo conectar directamente con Google Sheets. Mostrando dataset precargado."}}/**
|
|
* @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 Fx=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$x=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(d,x,r)=>r?r.toUpperCase():x.toLowerCase()),_0=u=>{const d=$x(u);return d.charAt(0).toUpperCase()+d.slice(1)},H0=(...u)=>u.filter((d,x,r)=>!!d&&d.trim()!==""&&r.indexOf(d)===x).join(" ").trim(),Ix=u=>{for(const d in u)if(d.startsWith("aria-")||d==="role"||d==="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 Wx={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 Px=oe.forwardRef(({color:u="currentColor",size:d=24,strokeWidth:x=2,absoluteStrokeWidth:r,className:g="",children:b,iconNode:S,...C},j)=>oe.createElement("svg",{ref:j,...Wx,width:d,height:d,stroke:u,strokeWidth:r?Number(x)*24/Number(d):x,className:H0("lucide",g),...!b&&!Ix(C)&&{"aria-hidden":"true"},...C},[...S.map(([f,N])=>oe.createElement(f,N)),...Array.isArray(b)?b:[b]]));/**
|
|
* @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 de=(u,d)=>{const x=oe.forwardRef(({className:r,...g},b)=>oe.createElement(Px,{ref:b,iconNode:d,className:H0(`lucide-${Fx(_0(u))}`,`lucide-${u}`,r),...g}));return x.displayName=_0(u),x};/**
|
|
* @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=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],tp=de("arrow-down-right",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 lp=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ap=de("arrow-left",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:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],V0=de("arrow-right",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:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],ip=de("award",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 cp=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Y0=de("building-2",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 rp=[["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"}]],G0=de("calendar",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 op=[["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"}]],Z0=de("chart-column",op);/**
|
|
* @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:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],dp=de("chart-no-axes-column",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 fp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],A0=de("check",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:"m6 9 6 6 6-6",key:"qrunsl"}]],mp=de("chevron-down",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 xp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Wr=de("chevron-left",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 pp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pr=de("chevron-right",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 bp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],yp=de("circle-alert",bp);/**
|
|
* @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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],xa=de("circle-check",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 vp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],wi=de("circle-x",vp);/**
|
|
* @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:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],jp=de("clock",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=[["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"}]],K0=de("database",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 kp=[["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"}]],Q0=de("dollar-sign",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 wp=[["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"}]],eo=de("download",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 Cp=[["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"}]],X0=de("external-link",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 _p=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Ap=de("eye-off",_p);/**
|
|
* @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=[["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"}]],Is=de("eye",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 zp=[["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"}]],Op=de("file-spreadsheet",zp);/**
|
|
* @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 Tp=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],J0=de("funnel",Tp);/**
|
|
* @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=[["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"}]],Dp=de("image",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 Up=[["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"}]],Ws=de("layers",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 Rp=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Lp=de("layout-dashboard",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 qp=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],F0=de("loader-circle",qp);/**
|
|
* @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 Bp=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],Hp=de("lock-keyhole",Bp);/**
|
|
* @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 Vp=[["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"}]],Yp=de("log-out",Vp);/**
|
|
* @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:"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"}]],Zp=de("mail",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 Kp=[["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"}]],$0=de("map-pin",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 Qp=[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]],Ci=de("package-check",Qp);/**
|
|
* @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:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],to=de("presentation",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 Jp=[["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"}]],I0=de("refresh-cw",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 Fp=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],$p=de("repeat",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 Ip=[["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"}]],Wp=de("rotate-ccw",Ip);/**
|
|
* @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:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],W0=de("search",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 eb=[["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"}]],P0=de("shopping-bag",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:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],lb=de("sliders-vertical",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 ab=[["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"}]],lo=de("sparkles",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:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],eh=de("store",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:"M12 3v18",key:"108xh3"}],["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"}]],ib=de("table",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 cb=[["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"}]],uo=de("tag",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 rb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],th=de("triangle-alert",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 ob=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],ub=de("truck",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=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],lh=de("user-round",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 fb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pa=de("x",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 hb=[["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"}]],_i=de("zap",hb),mb=({lastSynced:u,isSyncing:d,onRefresh:x,onOpenTutorial:r,userEmail:g,onLogout:b})=>s.jsx("header",{className:"bg-white/90 backdrop-blur-md border-b border-sky-100 sticky top-0 z-30 shadow-xs",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between py-3.5 gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-sky-500 to-blue-600 flex items-center justify-center text-amber-300 font-black text-xl shadow-md shrink-0 border border-sky-300/40",children:s.jsx(_i,{className:"w-5 h-5 fill-amber-300 text-amber-300"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 border border-amber-200/80 font-bold text-[10px] uppercase tracking-wider px-2.5 py-0.5 rounded-full shadow-2xs font-figtree",children:"ICE KICK"}),s.jsxs("h1",{className:"text-base sm:text-lg font-bold text-slate-900 tracking-tight font-ibm",children:["Lucozade Sport ",s.jsx("span",{className:"text-sky-600",children:"Store Audit"})]})]}),s.jsx("p",{className:"text-2xs text-slate-500 font-medium font-figtree",children:"POS Audit Dashboard, OOS Availability & Inventory Tracker"})]})]}),s.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 w-full sm:w-auto justify-between sm:justify-end",children:[s.jsxs("button",{onClick:r,className:"inline-flex items-center gap-2 px-3.5 py-2 text-xs font-bold text-sky-800 bg-sky-50 hover:bg-sky-100 border border-sky-200/80 rounded-xl transition-all shadow-2xs active:scale-95 cursor-pointer font-figtree",title:"Open Client PPT Tutorial Guide",children:[s.jsx(to,{className:"w-3.5 h-3.5 text-sky-600"}),s.jsx("span",{className:"hidden md:inline",children:"Client PPT Guide"}),s.jsx("span",{className:"md:hidden",children:"Guide"})]}),s.jsxs("div",{className:"hidden lg:block text-right",children:[s.jsx("span",{className:"block text-[10px] text-slate-400 font-semibold uppercase tracking-wider font-figtree",children:"Last Sync"}),s.jsx("span",{className:"block text-xs font-bold text-sky-700 font-geist",children:u||"Just Now"})]}),s.jsxs("button",{onClick:x,disabled:d,title:"Refresh data",className:"inline-flex items-center gap-2 px-3.5 py-2 text-xs font-bold text-amber-950 bg-amber-100 hover:bg-amber-200/80 border border-amber-200/80 rounded-xl transition-all shadow-2xs active:scale-95 disabled:opacity-50 cursor-pointer font-figtree",children:[s.jsx(I0,{className:`w-3.5 h-3.5 text-amber-800 ${d?"animate-spin":""}`}),s.jsx("span",{className:"hidden md:inline",children:d?"Refreshing...":"Refresh"})]}),s.jsxs("div",{className:"hidden xl:flex items-center gap-2 max-w-48 px-3 py-2 rounded-xl border border-slate-200 bg-slate-50 text-slate-600",title:g,children:[s.jsx(lh,{className:"w-3.5 h-3.5 shrink-0 text-sky-600"}),s.jsx("span",{className:"text-[11px] font-bold truncate",children:g})]}),s.jsxs("button",{type:"button",onClick:b,title:"Sign out","aria-label":"Sign out",className:"inline-flex items-center justify-center gap-2 h-9 px-3 text-xs font-extrabold text-slate-600 bg-white hover:text-rose-700 hover:bg-rose-50 border border-slate-200 hover:border-rose-200 rounded-xl transition-all cursor-pointer",children:[s.jsx(Yp,{className:"w-4 h-4"}),s.jsx("span",{children:"Sign out"})]})]})]})})}),xb=({stores:u,selectedCustomer:d,onSelectCustomer:x})=>{const[r,g]=oe.useState(!1),[b,S]=oe.useState(""),C=oe.useRef(null);oe.useEffect(()=>{const N=k=>{C.current&&!C.current.contains(k.target)&&g(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const j=oe.useMemo(()=>{const N=new Map;return u.forEach(k=>{if(!k.customer||!k.customer.trim())return;const U=k.customer.trim().toLowerCase();N.has(U)||N.set(U,k)}),Array.from(N.values()).sort((k,U)=>k.customer.localeCompare(U.customer))},[u]),f=oe.useMemo(()=>{if(!b.trim())return j;const N=b.toLowerCase().trim();return j.filter(k=>k.customer.toLowerCase().includes(N)||k.customerCode.toLowerCase().includes(N)||k.zone.toLowerCase().includes(N)||k.address.toLowerCase().includes(N))},[j,b]);return s.jsxs("div",{className:"relative",ref:C,children:[s.jsxs("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-1 flex items-center justify-between font-figtree",children:[s.jsx("span",{children:"Store"}),d!=="all"&&s.jsx("span",{className:"text-amber-600 font-extrabold text-[10px]",children:"1 store selected"})]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{type:"button",onClick:()=>g(!r),className:`w-full px-3 py-1.5 text-xs bg-sky-50/50 border ${d!=="all"?"border-amber-400 bg-amber-50/40 text-slate-900 shadow-2xs":"border-sky-100 text-slate-700 hover:border-sky-300"} rounded-xl text-left flex items-center justify-between focus:outline-none focus:ring-2 focus:ring-sky-500 font-medium transition-all cursor-pointer`,children:[s.jsxs("div",{className:"flex items-center gap-2 truncate pr-2",children:[s.jsx(eh,{className:`w-3.5 h-3.5 shrink-0 ${d!=="all"?"text-amber-600":"text-sky-500"}`}),s.jsx("span",{className:`truncate ${d!=="all"?"font-extrabold text-slate-900":"font-semibold text-slate-700"}`,children:d==="all"?`All Stores (${j.length} total)`:d})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[d!=="all"&&s.jsx("span",{onClick:N=>{N.stopPropagation(),x("all")},className:"p-0.5 hover:bg-amber-200 text-slate-600 hover:text-slate-950 rounded-full cursor-pointer transition-colors",title:"Clear store selection",children:s.jsx(pa,{className:"w-3 h-3"})}),s.jsx(mp,{className:`w-3.5 h-3.5 text-slate-400 transition-transform duration-200 ${r?"rotate-180":""}`})]})]}),r&&s.jsxs("div",{className:"absolute left-0 right-0 top-full mt-1 z-30 bg-white border border-sky-100 rounded-2xl shadow-xl p-2.5 min-w-[300px]",children:[s.jsxs("div",{className:"relative mb-2",children:[s.jsx(W0,{className:"w-3.5 h-3.5 text-sky-500 absolute left-2.5 top-1/2 -translate-y-1/2"}),s.jsx("input",{type:"text",value:b,onChange:N=>S(N.target.value),placeholder:"Search store name, code, zone...",autoFocus:!0,className:"w-full pl-8 pr-7 py-1.5 text-xs bg-sky-50/60 border border-sky-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 text-slate-900 font-bold placeholder-slate-400"}),b&&s.jsx("button",{type:"button",onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-700 p-0.5",children:s.jsx(pa,{className:"w-3 h-3"})})]}),s.jsxs("div",{className:"max-h-60 overflow-y-auto space-y-0.5 pr-1",children:[s.jsxs("button",{type:"button",onClick:()=>{x("all"),g(!1),S("")},className:`w-full text-left px-3 py-2 rounded-xl text-xs font-bold flex items-center justify-between transition-colors cursor-pointer ${d==="all"?"bg-amber-100 text-amber-950 font-black":"text-slate-700 hover:bg-sky-50"}`,children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Y0,{className:"w-3.5 h-3.5 text-sky-600"}),s.jsxs("span",{children:["All Stores (",j.length,")"]})]}),d==="all"&&s.jsx(A0,{className:"w-3.5 h-3.5 text-amber-700 shrink-0"})]}),s.jsx("div",{className:"h-px bg-sky-100 my-1"}),f.length===0?s.jsxs("div",{className:"p-3 text-center text-xs text-slate-400 font-medium",children:['No stores match "',b,'"']}):f.map(N=>{const k=d===N.customer;return s.jsxs("button",{type:"button",onClick:()=>{x(N.customer),g(!1),S("")},className:`w-full text-left px-3 py-2 rounded-xl text-xs transition-colors flex items-center justify-between gap-2 cursor-pointer ${k?"bg-amber-400 text-slate-950 font-black shadow-2xs":"hover:bg-sky-50 text-slate-800"}`,children:[s.jsxs("div",{className:"truncate min-w-0",children:[s.jsx("div",{className:"font-extrabold truncate",children:N.customer}),s.jsxs("div",{className:`text-[10px] font-medium flex items-center gap-1.5 ${k?"text-slate-900":"text-slate-400"}`,children:[s.jsx("span",{children:N.customerCode}),s.jsx("span",{children:"•"}),s.jsx("span",{children:N.zone})]})]}),k&&s.jsx(A0,{className:"w-4 h-4 text-slate-950 shrink-0"})]},N.customer)})]})]})]})]})},pb=({filters:u,stores:d,weekOptions:x,onChange:r,onReset:g})=>{const b=Array.from(new Set(d.map(f=>f.zone))).filter(Boolean).sort(),S=Array.from(new Set(d.map(f=>f.customerChannel))).filter(Boolean).sort(),C=(f,N)=>{r({...u,[f]:N})},j=u.zone!=="all"||u.channel!=="all"||u.customer!=="all"||u.status!=="all"||u.oosStatus!=="all"||u.selectedWeek&&u.selectedWeek!=="all"||u.search.trim()!=="";return s.jsxs("div",{className:"sticky top-[58px] sm:top-[65px] z-25 bg-white/95 backdrop-blur-md rounded-2xl border border-sky-100/90 p-3.5 sm:p-4 mb-6 shadow-md transition-all",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 pb-2.5 border-b border-sky-100/60",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-sky-50 text-sky-600",children:s.jsx(J0,{className:"w-3.5 h-3.5"})}),s.jsx("h2",{className:"text-xs font-bold text-slate-800 uppercase tracking-wider font-ibm",children:"Audit Dashboard Filters"})]}),j&&s.jsxs("button",{onClick:g,className:"inline-flex items-center gap-1 text-xs font-bold text-sky-700 hover:text-sky-800 bg-sky-50 hover:bg-sky-100 px-3 py-1 rounded-lg transition-colors cursor-pointer font-figtree",children:[s.jsx(Wp,{className:"w-3 h-3"}),"Reset Filters"]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsx(xb,{stores:d,selectedCustomer:u.customer,onSelectCustomer:f=>C("customer",f)})}),s.jsxs("div",{className:"lg:col-span-2",children:[s.jsxs("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-1 flex items-center gap-1",children:[s.jsx(G0,{className:"w-3 h-3 text-sky-500"}),s.jsx("span",{children:"Audit Week (Mon - Sun)"})]}),s.jsxs("select",{value:u.selectedWeek||"all",onChange:f=>C("selectedWeek",f.target.value),className:`w-full px-2.5 py-1.5 text-xs border rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 transition-all font-bold cursor-pointer ${u.selectedWeek&&u.selectedWeek!=="all"?"bg-amber-50/80 border-amber-300 text-amber-950":"bg-sky-50/40 border-sky-100 text-slate-900"}`,children:[s.jsx("option",{value:"all",children:"All Weeks (Latest Visit per POS)"}),x.map(f=>s.jsx("option",{value:f.key,children:f.label},f.key))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-1",children:"Store Code"}),s.jsxs("div",{className:"relative",children:[s.jsx(W0,{className:"w-3.5 h-3.5 text-sky-500 absolute left-3 top-1/2 -translate-y-1/2"}),s.jsx("input",{type:"text",value:u.search,onChange:f=>C("search",f.target.value),placeholder:"e.g. CUST-1001",className:"w-full pl-9 pr-3 py-1.5 text-xs bg-sky-50/40 border border-sky-100 rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 focus:bg-white transition-all text-slate-900 placeholder-slate-400 font-medium"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-1",children:"Geographic Zone"}),s.jsxs("select",{value:u.zone,onChange:f=>C("zone",f.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-sky-50/40 border border-sky-100 rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 focus:bg-white transition-all text-slate-900 font-medium cursor-pointer",children:[s.jsx("option",{value:"all",children:"All Zones"}),b.map(f=>s.jsx("option",{value:f,children:f},f))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-1",children:"Sales Channel"}),s.jsxs("select",{value:u.channel,onChange:f=>C("channel",f.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-sky-50/40 border border-sky-100 rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 focus:bg-white transition-all text-slate-900 font-medium cursor-pointer",children:[s.jsx("option",{value:"all",children:"All Channels"}),S.map(f=>s.jsx("option",{value:f,children:f},f))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-1",children:"Audit Status"}),s.jsxs("select",{value:u.status,onChange:f=>C("status",f.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-sky-50/40 border border-sky-100 rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 focus:bg-white transition-all text-slate-900 font-medium cursor-pointer",children:[s.jsx("option",{value:"all",children:"All Statuses"}),s.jsx("option",{value:"Visited",children:"Visited (Audited)"}),s.jsx("option",{value:"Pending",children:"Pending Audit"})]})]})]})]})},bb=({kpis:u})=>s.jsx("div",{className:"mb-6 font-figtree",children:s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",children:[s.jsxs("div",{className:"lg:col-span-2 bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Store Audit Coverage"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-sky-50 text-sky-600 shrink-0 flex items-center gap-1",children:s.jsx(Y0,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 items-center",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-baseline gap-1",children:[s.jsxs("span",{className:"text-2xl font-bold text-sky-600 tracking-tight font-geist",children:[u.complianceRate.toFixed(1),"%"]}),s.jsx("span",{className:"text-xs font-bold text-slate-400 font-figtree",children:"Coverage"})]}),s.jsx("div",{className:"w-full bg-sky-50 rounded-full h-2 mt-1.5 overflow-hidden",children:s.jsx("div",{className:"bg-sky-500 h-2 rounded-full transition-all duration-500",style:{width:`${Math.min(u.complianceRate,100)}%`}})})]}),s.jsxs("div",{className:"flex items-center justify-around bg-sky-50/50 rounded-xl p-2 border border-sky-100/60 font-figtree",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-[10px] uppercase font-bold text-slate-400",children:"Total"}),s.jsx("div",{className:"text-lg font-bold text-slate-800 font-geist",children:u.totalStores})]}),s.jsx("div",{className:"h-6 w-px bg-sky-200/60"}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-[10px] uppercase font-bold text-slate-400",children:"Visited"}),s.jsx("div",{className:"text-lg font-bold text-emerald-600 font-geist",children:u.visitedStores})]})]})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Out Of Stock (OOS)"}),s.jsx("div",{className:`p-1.5 rounded-lg shrink-0 ${u.oosStores>0?"bg-rose-50 text-rose-600":"bg-emerald-50 text-emerald-600"}`,children:s.jsx(th,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsxs("span",{className:`text-2xl font-bold tracking-tight font-geist ${u.oosStores>0?"text-rose-600":"text-emerald-600"}`,children:[u.oosRate.toFixed(1),"%"]}),s.jsxs("span",{className:"text-xs font-bold text-rose-500 font-figtree",children:["(",u.oosStores,"/",u.visitedStores,")"]})]}),s.jsxs("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:["In Stock: ",s.jsxs("span",{className:"font-bold text-emerald-600 font-geist",children:[u.availableStores,"/",u.visitedStores," (",u.numericDistribution.toFixed(1),"%)"]})]})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"% Add. Exhibition (Secondary)"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-emerald-50 text-emerald-600 shrink-0",children:s.jsx(Ws,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsxs("span",{className:"text-2xl font-bold text-emerald-600 tracking-tight font-geist",children:[u.secondaryDisplayRate.toFixed(1),"%"]}),s.jsxs("span",{className:"text-xs font-bold text-emerald-600 font-figtree",children:["(",u.secondaryDisplayStores,"/",u.visitedStores,")"]})]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Stores with Secondary Display"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"% Add. Exhibition (Gondola)"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-sky-50 text-sky-600 shrink-0",children:s.jsx(lo,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsxs("span",{className:"text-2xl font-bold text-sky-600 tracking-tight font-geist",children:[u.gondolaEndRate.toFixed(1),"%"]}),s.jsxs("span",{className:"text-xs font-bold text-sky-600 font-figtree",children:["(",u.gondolaEndStores,"/",u.visitedStores,")"]})]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Stores with Gondola End"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Lucozade Brand Share"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-sky-50 text-sky-600 shrink-0",children:s.jsx(Ws,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-2xl font-bold text-sky-600 tracking-tight font-geist",children:[u.avgBrandShelfShare.toFixed(1),"%"]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Ice Kick vs Lucozade Brand"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Avg Shelf Price"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-sky-50 text-sky-600 shrink-0",children:s.jsx(uo,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-2xl font-bold text-slate-900 tracking-tight font-geist",children:["$",u.avgRetailPrice.toFixed(2)]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Avg. consumer retail price"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Volume Sell-Out"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-amber-50 text-amber-600 shrink-0",children:s.jsx(P0,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-2xl font-bold text-amber-600 tracking-tight font-geist",children:[u.totalSellOutUnits.toLocaleString()," ",s.jsx("span",{className:"text-xs font-bold text-slate-400 font-figtree",children:"units"})]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Sell-In - Physical Inventory"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Value Sell-Out"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-emerald-50 text-emerald-600 shrink-0",children:s.jsx(Q0,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-2xl font-bold text-emerald-600 tracking-tight font-geist",children:["$",u.totalSellOutValue.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Volume Sell-Out * Shelf Price"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100/80 p-3.5 shadow-2xs hover:shadow-xs transition-all flex flex-col justify-between",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Physical Inventory"}),s.jsx("div",{className:"p-1.5 rounded-lg bg-amber-50 text-amber-600 shrink-0",children:s.jsx(Ci,{className:"w-4 h-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-2xl font-bold text-slate-900 tracking-tight font-geist",children:[u.totalPhysicalInventory.toLocaleString()," ",s.jsx("span",{className:"text-xs font-bold text-slate-400 font-figtree",children:"units"})]}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-figtree",children:"Sales Floor + Backroom"})]})]})]})}),E0=({mergedData:u,onSelectStore:d})=>{const x=u.filter(j=>j.status==="Visited"),r=x.filter(j=>{var f;return((f=j.response)==null?void 0:f.isAvailable)==="Yes"}),g=x.filter(j=>{var f;return((f=j.response)==null?void 0:f.isAvailable)==="No"}),b=x.length>0?r.length/x.length*100:0,S=x.length>0?g.length/x.length*100:0,C=new Map;return x.forEach(j=>{var k;const f=j.store.zone||"Unassigned Zone",N=C.get(f)||{total:0,available:0,oos:0};N.total+=1,((k=j.response)==null?void 0:k.isAvailable)==="Yes"?N.available+=1:N.oos+=1,C.set(f,N)}),s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"bg-white border border-sky-100 p-4 sm:p-5 rounded-3xl shadow-2xs",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 border border-amber-200/80 font-bold text-[10px] uppercase tracking-wider px-2.5 py-0.5 rounded-full font-figtree",children:"Step 1"}),s.jsx("h2",{className:"text-lg font-extrabold text-slate-900",children:"Presence Validation (First Impression)"})]}),s.jsx("p",{className:"text-xs text-slate-500 max-w-2xl font-medium",children:"Immediate POS availability evaluation. If out of stock (OOS), the workflow directs auditors to check the backroom for urgent replenishment."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"bg-sky-50/50 px-4 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsxs("div",{className:"text-xl font-black text-emerald-600 font-mono",children:[b.toFixed(1),"%"]}),s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-bold",children:"Numeric Distribution"})]}),s.jsxs("div",{className:"bg-sky-50/50 px-4 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsxs("div",{className:"text-xl font-black text-rose-600 font-mono",children:[S.toFixed(1),"%"]}),s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-bold",children:"Out of Stock Rate (OOS)"})]})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"bg-white border border-sky-100 rounded-2xl p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-emerald-700 font-extrabold text-sm",children:[s.jsx(xa,{className:"w-5 h-5 text-emerald-600"}),s.jsx("span",{children:"Available for Sale Today (Yes)"})]}),s.jsxs("span",{className:"text-lg font-black text-emerald-700 bg-emerald-50 px-3 py-0.5 rounded-full border border-emerald-200",children:[r.length," Stores"]})]}),s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:"Lucozade Sport Ice Kick is active on the sales floor. Proceed to Step 2 (Placement & Display)."}),s.jsx("div",{className:"w-full bg-emerald-50 rounded-full h-2 overflow-hidden",children:s.jsx("div",{className:"bg-emerald-500 h-2 rounded-full transition-all duration-500",style:{width:`${b}%`}})})]}),s.jsxs("div",{className:"bg-white border border-sky-100 rounded-2xl p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-rose-700 font-extrabold text-sm",children:[s.jsx(wi,{className:"w-5 h-5 text-rose-600"}),s.jsx("span",{children:"Out of Stock / OOS (No)"})]}),s.jsxs("span",{className:"text-lg font-black text-rose-700 bg-rose-50 px-3 py-0.5 rounded-full border border-rose-200",children:[g.length," Stores"]})]}),s.jsxs("p",{className:"text-xs text-slate-500 mb-3",children:["Auditor reported shelf out of stock. ",s.jsx("strong",{className:"text-rose-700",children:"System Action:"})," Priority backroom check required (Step 4)."]}),s.jsx("div",{className:"w-full bg-rose-50 rounded-full h-2 overflow-hidden",children:s.jsx("div",{className:"bg-rose-500 h-2 rounded-full transition-all duration-500",style:{width:`${S}%`}})})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 shadow-2xs overflow-hidden",children:[s.jsxs("div",{className:"p-4 border-b border-sky-100 bg-sky-50/30 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 flex items-center gap-2",children:[s.jsx(th,{className:"w-4 h-4 text-rose-600"}),"Out of Stock Stores (OOS) - Priority Action"]}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"List of stores with no product on display. Backroom check required (Step 4)."})]}),s.jsxs("span",{className:"text-xs font-bold text-rose-700 bg-rose-50 border border-rose-200 px-2.5 py-1 rounded-full",children:[g.length," active alerts"]})]}),g.length===0?s.jsxs("div",{className:"p-8 text-center text-slate-500",children:[s.jsx(xa,{className:"w-10 h-10 text-emerald-500 mx-auto mb-2"}),s.jsx("p",{className:"text-sm font-bold text-slate-800",children:"Excellent! No out of stock issues reported."}),s.jsx("p",{className:"text-xs text-slate-500",children:"All audited stores have product availability today."})]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-xs",children:[s.jsx("thead",{className:"bg-sky-50/60 text-slate-500 font-extrabold uppercase text-[10px] tracking-wider border-b border-sky-100",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3",children:"Store / Customer"}),s.jsx("th",{className:"px-4 py-3",children:"Zone"}),s.jsx("th",{className:"px-4 py-3",children:"Channel"}),s.jsx("th",{className:"px-4 py-3",children:"Report Date"}),s.jsx("th",{className:"px-4 py-3",children:"Backroom Inv. (Step 4)"}),s.jsx("th",{className:"px-4 py-3 text-right",children:"Auditor Action"})]})}),s.jsx("tbody",{className:"divide-y divide-sky-100/60 text-slate-700",children:g.map(j=>{var f,N,k,U;return s.jsxs("tr",{className:"hover:bg-sky-50/30 transition-colors",children:[s.jsxs("td",{className:"px-4 py-3 font-bold text-slate-900",children:[j.store.customer,s.jsx("span",{className:"block text-[10px] font-normal text-slate-400",children:j.store.address})]}),s.jsx("td",{className:"px-4 py-3 text-slate-700 font-medium",children:j.store.zone}),s.jsx("td",{className:"px-4 py-3 text-slate-700 font-medium",children:j.store.customerChannel}),s.jsx("td",{className:"px-4 py-3 text-slate-400",children:(f=j.response)==null?void 0:f.submissionDate}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("span",{className:`inline-flex items-center gap-1 font-bold font-mono ${(((N=j.response)==null?void 0:N.totalPhysicalInventory)||0)>0?"text-amber-600":"text-rose-600"}`,children:[((k=j.response)==null?void 0:k.totalPhysicalInventory)||0," units",(((U=j.response)==null?void 0:U.totalPhysicalInventory)||0)>0?" (Stored)":" (Total Out)"]})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsxs("button",{onClick:()=>d(j),className:"inline-flex items-center gap-1.5 text-xs font-bold text-amber-950 bg-amber-100 hover:bg-amber-200/80 border border-amber-200/80 px-3 py-1.5 rounded-xl transition-all shadow-2xs active:scale-95 cursor-pointer font-figtree",children:[s.jsx("span",{children:"Go to Step 4 (Backroom)"}),s.jsx(V0,{className:"w-3.5 h-3.5 text-amber-900"})]})})]},j.store.customerCode)})})]})})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 mb-3",children:"OOS Availability by Geographic Zone"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from(C.entries()).map(([j,f])=>{const N=f.total>0?f.available/f.total*100:0;return s.jsxs("div",{className:"border border-sky-100 rounded-xl p-3 bg-sky-50/20",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"font-extrabold text-slate-900 text-xs",children:j}),s.jsxs("span",{className:"text-[10px] font-bold text-slate-400",children:[f.total," audited"]})]}),s.jsxs("div",{className:"flex items-baseline justify-between text-xs my-1",children:[s.jsxs("span",{className:"text-emerald-700 font-bold",children:[f.available," avail."]}),s.jsxs("span",{className:"text-rose-600 font-bold",children:[f.oos," OOS"]})]}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-1.5 overflow-hidden",children:s.jsx("div",{className:"bg-emerald-500 h-1.5 rounded-full",style:{width:`${N}%`}})})]},j)})})]})]})},yb=({mergedData:u,onSelectStore:d})=>{const x=u.filter(m=>m.status==="Visited"),r=u.filter(m=>{var z;return m.status==="Visited"&&((z=m.response)==null?void 0:z.isAvailable)==="Yes"}),[g,b]=oe.useState(null),S=g?x.filter(m=>m.store.customer===g):x;g&&r.filter(m=>m.store.customer===g);let C=0,j=0,f=0;S.forEach(m=>{var K;const z=(((K=m.response)==null?void 0:K.placementLocation)||"").toLowerCase();(z.includes("estante")||z.includes("main")||z.includes("shelf"))&&C++,(z.includes("exhibici")||z.includes("display")||z.includes("secondary")||z.includes("secundaria"))&&j++,(z.includes("cabecera")||z.includes("endcap")||z.includes("gondola")||z.includes("góndola")||z.includes("end"))&&f++});const N=S.length||1,k=m=>m?m.flatMap(z=>z.split(/[\r\n,;\s]+/).map(K=>K.trim())).filter(z=>z.startsWith("http://")||z.startsWith("https://")):[],U=S.flatMap(m=>{var K;return k((K=m.response)==null?void 0:K.shelfPhotos).map(Q=>{var te,he;return{url:Q,store:m.store.customer,type:((te=m.response)==null?void 0:te.placementLocation)||"Display / Shelf",date:((he=m.response)==null?void 0:he.submissionDate)||"",auditItem:m}})}),J=S.flatMap(m=>{var K;return k((K=m.response)==null?void 0:K.popPhotos).map(Q=>{var te,he;return{url:Q,store:m.store.customer,type:((te=m.response)==null?void 0:te.popVisible)||"POP Material",date:((he=m.response)==null?void 0:he.submissionDate)||"",auditItem:m}})}),[R,Z]=oe.useState(1),[se,I]=oe.useState(1),ee=6,be=Math.ceil(U.length/ee)||1,Oe=U.slice((R-1)*ee,R*ee),Ne=Math.ceil(J.length/ee)||1,re=J.slice((se-1)*ee,se*ee),[F,ne]=oe.useState(null),v=m=>{b(g===m?null:m),Z(1),I(1)};return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"bg-white border border-sky-100 p-4 sm:p-5 rounded-3xl shadow-2xs",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 border border-amber-200/80 font-bold text-[10px] uppercase tracking-wider px-2.5 py-0.5 rounded-full font-figtree",children:"Step 2"}),s.jsx("h2",{className:"text-lg font-extrabold text-slate-900",children:"Placement & Display (Store Mapping)"})]}),s.jsx("p",{className:"text-xs text-slate-500 max-w-2xl font-medium",children:"Assessment of Share of Display, physical location, and execution of POP materials in active stores."})]}),s.jsxs("div",{className:"bg-sky-50/50 px-4 py-2 rounded-2xl border border-sky-100 text-center shrink-0",children:[s.jsx("div",{className:"text-xl font-black text-amber-600 font-mono",children:r.length}),s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-bold",children:"Stores with Display"})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Main Shelf"}),s.jsxs("span",{className:"text-xs font-black text-amber-900 bg-amber-100 px-2.5 py-0.5 rounded-full",children:[(C/N*100).toFixed(0),"%"]})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-slate-900 mb-1",children:[C," stores"]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium mb-3",children:"Standard placement in beverage section"}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-1.5 overflow-hidden",children:s.jsx("div",{className:"bg-amber-400 h-1.5 rounded-full",style:{width:`${C/N*100}%`}})})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Secondary Display"}),s.jsxs("span",{className:"text-xs font-black text-emerald-700 bg-emerald-50 px-2.5 py-0.5 rounded-full border border-emerald-200",children:[(j/N*100).toFixed(0),"%"]})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-emerald-600 mb-1",children:[j," stores"]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium mb-3",children:"Promotional island, auxiliary cooler, dump bin"}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-1.5 overflow-hidden",children:s.jsx("div",{className:"bg-emerald-500 h-1.5 rounded-full",style:{width:`${j/N*100}%`}})})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Endcap"}),s.jsxs("span",{className:"text-xs font-black text-sky-700 bg-sky-50 px-2.5 py-0.5 rounded-full border border-sky-200",children:[(f/N*100).toFixed(0),"%"]})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-sky-600 mb-1",children:[f," stores"]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium mb-3",children:"High-visibility endcap placement"}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-1.5 overflow-hidden",children:s.jsx("div",{className:"bg-sky-500 h-1.5 rounded-full",style:{width:`${f/N*100}%`}})})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 items-stretch",children:[s.jsxs("div",{className:"lg:col-span-7 bg-white rounded-2xl border border-sky-100 shadow-2xs overflow-hidden flex flex-col h-full",children:[s.jsxs("div",{className:"p-3.5 border-b border-sky-100 bg-sky-50/40 flex items-center justify-between gap-2 shrink-0",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900",children:"Display & Promotional Material (POP) Mapping"}),g&&s.jsxs("span",{className:"inline-flex items-center gap-1 bg-amber-100 text-amber-900 border border-amber-300 text-[10px] font-black px-2 py-0.5 rounded-full",children:["Filtered: ",g,s.jsx("button",{onClick:m=>{m.stopPropagation(),b(null),Z(1),I(1)},className:"p-0.5 hover:bg-amber-200 rounded-full cursor-pointer",title:"Clear filter",children:s.jsx(pa,{className:"w-3 h-3 text-amber-800"})})]})]}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5",children:"Click a store row to filter photo galleries and metrics."})]}),g&&s.jsxs("button",{onClick:()=>{b(null),Z(1),I(1)},className:"text-[11px] font-extrabold text-amber-700 hover:text-amber-900 underline cursor-pointer shrink-0",children:["View All (",r.length,")"]})]}),s.jsx("div",{className:"overflow-x-auto overflow-y-auto max-h-[640px] scrollbar-thin flex-1",children:s.jsxs("table",{className:"w-full text-left text-xs",children:[s.jsx("thead",{className:"bg-sky-50 text-slate-500 font-extrabold uppercase text-[10px] tracking-wider border-b border-sky-100 sticky top-0 z-10 shadow-2xs",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3.5 py-2.5",children:"Store / Customer"}),s.jsx("th",{className:"px-3 py-2.5",children:"Zone"}),s.jsx("th",{className:"px-3 py-2.5",children:"Product Location"}),s.jsx("th",{className:"px-3 py-2.5",children:"POP Material"})]})}),s.jsx("tbody",{className:"divide-y divide-sky-100/60 text-slate-700",children:r.map(m=>{var K,Q;const z=g===m.store.customer;return s.jsxs("tr",{onClick:()=>v(m.store.customer),className:`cursor-pointer transition-all ${z?"bg-amber-100/70 border-l-4 border-l-amber-500 font-bold text-slate-950":"hover:bg-sky-50/60"}`,children:[s.jsxs("td",{className:"px-3.5 py-2.5 font-bold text-slate-900 flex items-center justify-between gap-2",children:[s.jsx("span",{children:m.store.customer}),z&&s.jsx("span",{className:"text-[9px] bg-amber-400 text-slate-950 px-1.5 py-0.5 rounded-full font-black uppercase tracking-wider shrink-0",children:"Filtered"})]}),s.jsx("td",{className:"px-3 py-2.5 text-slate-600 font-medium",children:m.store.zone}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx("span",{className:`inline-flex items-center font-bold px-2 py-0.5 rounded-lg text-[11px] ${z?"bg-amber-200 text-amber-950":"bg-sky-50 border border-sky-100 text-slate-800"}`,children:((K=m.response)==null?void 0:K.placementLocation)||"No Location"})}),s.jsx("td",{className:"px-3 py-2.5 text-slate-600",children:((Q=m.response)==null?void 0:Q.popVisible)||"None"})]},m.store.customerCode)})})]})})]}),s.jsxs("div",{className:"lg:col-span-5 flex flex-col gap-4 justify-between",children:[s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs flex flex-col justify-between flex-1",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 border-b border-sky-100 pb-2.5",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 flex items-center gap-1.5",children:[s.jsx(Ws,{className:"w-4 h-4 text-sky-600"}),"Display & Shelf Photos"]}),s.jsx("p",{className:"text-[10px] text-slate-500 mt-0.5",children:"Shelf & display photos from floor audit"})]}),s.jsxs("span",{className:"text-xs font-bold text-sky-800 bg-sky-50 border border-sky-100 px-2.5 py-0.5 rounded-full",children:[U.length," photo(s)"]})]}),U.length===0?s.jsx("div",{className:"text-center py-8 text-slate-400 text-xs font-medium",children:"No shelf photos attached for this selection."}):s.jsx("div",{className:"grid grid-cols-3 gap-2",children:Oe.map((m,z)=>s.jsxs("div",{onClick:()=>ne(m),className:"group relative rounded-xl border border-slate-200/80 bg-slate-900 overflow-hidden cursor-pointer aspect-[4/3] shadow-2xs hover:shadow-md hover:border-sky-500 transition-all flex flex-col justify-end",children:[s.jsx("img",{src:m.url,alt:m.store,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-950/80 via-slate-950/20 to-transparent pointer-events-none"}),s.jsx("div",{className:"relative z-10 p-1.5 text-white",children:s.jsx("p",{className:"text-[9px] font-extrabold truncate drop-shadow-xs",title:m.store,children:m.store})})]},z))})]}),U.length>0&&s.jsxs("div",{className:"flex items-center justify-between border-t border-sky-100 pt-2.5 mt-3 bg-slate-50/60 p-1.5 rounded-xl",children:[s.jsxs("button",{disabled:R===1,onClick:()=>Z(m=>Math.max(1,m-1)),className:"flex items-center gap-1 text-[11px] font-bold text-slate-700 bg-white border border-slate-200 px-2.5 py-1 rounded-lg disabled:opacity-40 disabled:cursor-not-allowed hover:bg-slate-100 transition-colors cursor-pointer shadow-2xs",children:[s.jsx(Wr,{className:"w-3 h-3"}),"Prev"]}),s.jsxs("span",{className:"text-[11px] font-bold text-slate-700 font-mono",children:["Page ",s.jsx("span",{className:"text-sky-700",children:R})," of ",be]}),s.jsxs("button",{disabled:R===be,onClick:()=>Z(m=>Math.min(be,m+1)),className:"flex items-center gap-1 text-[11px] font-bold text-slate-700 bg-white border border-slate-200 px-2.5 py-1 rounded-lg disabled:opacity-40 disabled:cursor-not-allowed hover:bg-slate-100 transition-colors cursor-pointer shadow-2xs",children:["Next",s.jsx(Pr,{className:"w-3 h-3"})]})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs flex flex-col justify-between flex-1",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 border-b border-sky-100 pb-2.5",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 flex items-center gap-1.5",children:[s.jsx(uo,{className:"w-4 h-4 text-amber-600"}),"POP Material Photos"]}),s.jsx("p",{className:"text-[10px] text-slate-500 mt-0.5",children:"Promotional POP photos (posters, wobblers, shelf strips)"})]}),s.jsxs("span",{className:"text-xs font-bold text-amber-800 bg-amber-50 border border-amber-200 px-2.5 py-0.5 rounded-full",children:[J.length," photo(s)"]})]}),J.length===0?s.jsx("div",{className:"text-center py-8 text-slate-400 text-xs font-medium",children:"No POP material photos attached for this selection."}):s.jsx("div",{className:"grid grid-cols-3 gap-2",children:re.map((m,z)=>s.jsxs("div",{onClick:()=>ne(m),className:"group relative rounded-xl border border-slate-200/80 bg-slate-900 overflow-hidden cursor-pointer aspect-[4/3] shadow-2xs hover:shadow-md hover:border-amber-500 transition-all flex flex-col justify-end",children:[s.jsx("img",{src:m.url,alt:m.store,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-950/80 via-slate-950/20 to-transparent pointer-events-none"}),s.jsx("div",{className:"relative z-10 p-1.5 text-white",children:s.jsx("p",{className:"text-[9px] font-extrabold truncate drop-shadow-xs",title:m.store,children:m.store})})]},z))})]}),J.length>0&&s.jsxs("div",{className:"flex items-center justify-between border-t border-sky-100 pt-2.5 mt-3 bg-slate-50/60 p-1.5 rounded-xl",children:[s.jsxs("button",{disabled:se===1,onClick:()=>I(m=>Math.max(1,m-1)),className:"flex items-center gap-1 text-[11px] font-bold text-slate-700 bg-white border border-slate-200 px-2.5 py-1 rounded-lg disabled:opacity-40 disabled:cursor-not-allowed hover:bg-slate-100 transition-colors cursor-pointer shadow-2xs",children:[s.jsx(Wr,{className:"w-3 h-3"}),"Prev"]}),s.jsxs("span",{className:"text-[11px] font-bold text-slate-700 font-mono",children:["Page ",s.jsx("span",{className:"text-amber-700",children:se})," of ",Ne]}),s.jsxs("button",{disabled:se===Ne,onClick:()=>I(m=>Math.min(Ne,m+1)),className:"flex items-center gap-1 text-[11px] font-bold text-slate-700 bg-white border border-slate-200 px-2.5 py-1 rounded-lg disabled:opacity-40 disabled:cursor-not-allowed hover:bg-slate-100 transition-colors cursor-pointer shadow-2xs",children:["Next",s.jsx(Pr,{className:"w-3 h-3"})]})]})]})]})]}),F&&s.jsx("div",{onClick:()=>ne(null),className:"fixed inset-0 z-50 bg-slate-950/80 backdrop-blur-xs flex items-center justify-center p-4 cursor-pointer",children:s.jsxs("div",{onClick:m=>m.stopPropagation(),className:"relative max-w-3xl w-full bg-white border border-sky-100 rounded-3xl overflow-hidden p-4 shadow-2xl space-y-3 cursor-default",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-sky-100 pb-2",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-extrabold text-slate-900",children:F.store}),s.jsxs("p",{className:"text-xs text-sky-700 font-bold mt-0.5",children:[F.type," • ",F.date]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("a",{href:F.url,target:"_blank",rel:"noreferrer",className:"p-1.5 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-700 transition-colors",title:"Open original image",children:s.jsx(X0,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>ne(null),className:"p-1.5 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-700 transition-colors cursor-pointer",children:s.jsx(pa,{className:"w-4 h-4"})})]})]}),s.jsx("div",{className:"bg-slate-950 rounded-2xl overflow-hidden flex items-center justify-center min-h-[300px] max-h-[70vh]",children:s.jsx("img",{src:F.url,alt:F.store,className:"max-w-full max-h-[65vh] object-contain"})}),s.jsxs("div",{className:"flex justify-between items-center text-xs pt-1",children:[s.jsx("button",{onClick:()=>{ne(null),d(F.auditItem)},className:"font-bold text-sky-700 hover:underline cursor-pointer",children:"View full store report →"}),s.jsx("button",{onClick:()=>ne(null),className:"font-bold text-slate-500 hover:text-slate-800 cursor-pointer",children:"Close"})]})]})})]})},gb=({mergedData:u,onSelectStore:d})=>{const x=u.filter(R=>{var Z;return R.status==="Visited"&&((Z=R.response)==null?void 0:Z.isAvailable)==="Yes"});let r=0,g=0,b=0,S=0,C=0;x.forEach(R=>{const Z=R.response;Z&&(r+=Z.facingsIceKick||0,g+=Z.facingsLucozadeBrand||0,b+=Z.facingsCategoryTotal||0,Z.retailPrice&&Z.retailPrice>0&&(S+=Z.retailPrice,C++))});const j=x.length>0?r/x.length:0;x.length>0&&g/x.length,x.length>0&&b/x.length;const f=C>0?S/C:0,N=g>0?r/g*100:0,k=b>0?g/b*100:0,U=b>0?r/b*100:0,J=x.map(R=>{var Z,se,I;return{store:R.store.customer,sub:((Z=R.response)==null?void 0:Z.skuSubstitution)||"N/A",iceKickFacings:((se=R.response)==null?void 0:se.facingsIceKick)||0,price:((I=R.response)==null?void 0:I.retailPrice)||0}}).filter(R=>R.sub&&!R.sub.toLowerCase().includes("ninguna")&&!R.sub.toLowerCase().includes("n/a"));return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"bg-white border border-sky-100 p-4 sm:p-5 rounded-3xl shadow-2xs",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 border border-amber-200/80 font-bold text-[10px] uppercase tracking-wider px-2.5 py-0.5 rounded-full font-figtree",children:"Step 3"}),s.jsx("h2",{className:"text-lg font-extrabold text-slate-900",children:"Main Shelf Measurement (Detailed Analysis)"})]}),s.jsx("p",{className:"text-xs text-slate-500 max-w-2xl font-medium",children:"Detailed audit of consumer price, facing counts, Share of Brand Shelf, Share of Category, and competitor SKU substitution."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"bg-sky-50/50 px-3.5 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsxs("div",{className:"text-lg font-black text-emerald-600 font-mono",children:["$",f.toFixed(2)]}),s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-bold",children:"Avg Price"})]}),s.jsxs("div",{className:"bg-sky-50/50 px-3.5 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsxs("div",{className:"text-lg font-black text-amber-600 font-mono",children:[N.toFixed(1),"%"]}),s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-bold",children:"Brand Share"})]})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Ice Kick Facings"}),s.jsx("span",{className:"p-1.5 rounded-xl bg-amber-50 text-amber-600 border border-amber-200",children:s.jsx(dp,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-slate-900 mb-0.5",children:[j.toFixed(1)," ",s.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"facings/store"})]}),s.jsxs("p",{className:"text-[10px] text-slate-400 font-medium",children:["Total accum: ",r," facings"]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs font-figtree",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Share of Brand Shelf"}),s.jsx("span",{className:"p-1.5 rounded-xl bg-sky-50 text-sky-600 border border-sky-200",children:s.jsx(Ws,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-bold text-sky-600 mb-0.5 font-geist",children:[N.toFixed(1),"%"]}),s.jsxs("p",{className:"text-[10px] text-slate-400 font-medium",children:["Ice Kick / Total Lucozade Brand (",g," facings)"]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs font-figtree",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider font-ibm",children:"Share of Category"}),s.jsx("span",{className:"p-1.5 rounded-xl bg-amber-50 text-amber-600 border border-amber-200",children:s.jsx(ip,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-bold text-amber-600 mb-0.5 font-geist",children:[k.toFixed(1),"%"]}),s.jsxs("p",{className:"text-[10px] text-slate-400 font-medium",children:["Lucozade / Total Category (",b," facings)"]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Avg Retail Price"}),s.jsx("span",{className:"p-1.5 rounded-xl bg-emerald-50 text-emerald-600 border border-emerald-200",children:s.jsx(uo,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-emerald-600 font-mono mb-0.5",children:["$",f.toFixed(2)]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium",children:"Main shelf retail price"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 mb-1",children:"Energy & Sports Drinks Shelf Composition"}),s.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"Total facing distribution across Lucozade Ice Kick, rest of Lucozade, and competitors."}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-xs font-bold text-slate-800 mb-1",children:[s.jsxs("span",{children:["Lucozade Ice Kick (",r," facings)"]}),s.jsxs("span",{className:"text-sky-600 font-extrabold",children:[U.toFixed(1),"% of category"]})]}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-3 overflow-hidden",children:s.jsx("div",{className:"bg-sky-500 h-3 rounded-full",style:{width:`${U}%`}})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-xs font-bold text-slate-800 mb-1",children:[s.jsxs("span",{children:["Total Lucozade Brand (",g," facings)"]}),s.jsxs("span",{className:"text-amber-600 font-extrabold",children:[k.toFixed(1),"% of category"]})]}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-3 overflow-hidden",children:s.jsx("div",{className:"bg-amber-400 h-3 rounded-full",style:{width:`${k}%`}})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-xs font-bold text-slate-800 mb-1",children:[s.jsxs("span",{children:["Competitors / Total Category (",b," facings)"]}),s.jsx("span",{className:"text-slate-400 font-extrabold",children:"100% of shelf"})]}),s.jsx("div",{className:"w-full bg-sky-100/60 rounded-full h-3 overflow-hidden",children:s.jsx("div",{className:"bg-slate-300 h-3 rounded-full",style:{width:"100%"}})})]})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 shadow-2xs overflow-hidden",children:[s.jsxs("div",{className:"p-4 border-b border-sky-100 bg-sky-50/30 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 flex items-center gap-2",children:[s.jsx($p,{className:"w-4 h-4 text-sky-600"}),"SKU Substitution Tracking (Space Gain)"]}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Which competitor brands or SKUs surrendered shelf space for Ice Kick placement?"})]}),s.jsxs("span",{className:"text-xs font-bold text-amber-800 bg-amber-50 border border-amber-200 px-2.5 py-1 rounded-full",children:[J.length," space gain(s) recorded"]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-xs",children:[s.jsx("thead",{className:"bg-sky-50/60 text-slate-500 font-extrabold uppercase text-[10px] tracking-wider border-b border-sky-100",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3",children:"Store / Customer"}),s.jsx("th",{className:"px-4 py-3",children:"Surrendered Brand / SKU"}),s.jsx("th",{className:"px-4 py-3",children:"Facings Gained by Ice Kick"}),s.jsx("th",{className:"px-4 py-3",children:"Shelf Price"}),s.jsx("th",{className:"px-4 py-3 text-right",children:"View Report"})]})}),s.jsx("tbody",{className:"divide-y divide-sky-100/60 text-slate-700",children:x.map(R=>{var Z,se,I;return s.jsxs("tr",{className:"hover:bg-sky-50/30 transition-colors",children:[s.jsx("td",{className:"px-4 py-3 font-bold text-slate-900",children:R.store.customer}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1 font-bold text-amber-900 bg-amber-50 border border-amber-200 px-2.5 py-0.5 rounded-lg",children:[s.jsx(tp,{className:"w-3.5 h-3.5 text-amber-600"}),((Z=R.response)==null?void 0:Z.skuSubstitution)||"N/A"]})}),s.jsxs("td",{className:"px-4 py-3 font-extrabold text-emerald-600 font-mono",children:["+",((se=R.response)==null?void 0:se.facingsIceKick)||0," facings"]}),s.jsxs("td",{className:"px-4 py-3 font-bold text-slate-900 font-mono",children:["$",(((I=R.response)==null?void 0:I.retailPrice)||0).toFixed(2)]}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx("button",{onClick:()=>d(R),className:"text-xs font-bold text-sky-700 hover:text-sky-900 hover:underline cursor-pointer",children:"View Details →"})})]},R.store.customerCode)})})]})})]})]})},vb=({mergedData:u,onSelectStore:d})=>{const x=u.filter(C=>C.status==="Visited");let r=0,g=0,b=0,S=0;return x.forEach(C=>{var J,R;const j=((J=C.response)==null?void 0:J.totalPhysicalInventory)||0,f=((R=C.response)==null?void 0:R.retailPrice)||0,N=C.store.unitsSoldIn||0,k=Math.max(0,N-j),U=k*f;r+=j,g+=N,b+=k,S+=U}),s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"bg-white border border-sky-100 p-4 sm:p-5 rounded-3xl shadow-2xs",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 border border-amber-200/80 font-bold text-[10px] uppercase tracking-wider px-2.5 py-0.5 rounded-full font-figtree",children:"Step 4"}),s.jsx("h2",{className:"text-lg font-extrabold text-slate-900",children:"Inventory & Closing (Store Manager Alignment)"})]}),s.jsx("p",{className:"text-xs text-slate-500 max-w-2xl font-medium",children:"Final physical count combining sales floor units and backroom stock. Volume Sell-Out is calculated by subtracting physical inventory from dispatched Sell-In."})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsxs("div",{className:"bg-sky-50/50 px-3.5 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsx("div",{className:"text-lg font-black text-slate-900 font-mono",children:r.toLocaleString()}),s.jsx("div",{className:"text-[9px] uppercase tracking-wider text-slate-400 font-bold",children:"Physical Inventory"})]}),s.jsxs("div",{className:"bg-sky-50/50 px-3.5 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsx("div",{className:"text-lg font-black text-sky-600 font-mono",children:b.toLocaleString()}),s.jsx("div",{className:"text-[9px] uppercase tracking-wider text-slate-400 font-bold",children:"Volume Sell-Out (Units)"})]}),s.jsxs("div",{className:"bg-sky-50/50 px-3.5 py-2 rounded-2xl border border-sky-100 text-center",children:[s.jsxs("div",{className:"text-lg font-black text-emerald-600 font-mono",children:["$",S.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]}),s.jsx("div",{className:"text-[9px] uppercase tracking-wider text-slate-400 font-bold",children:"Value Sell-Out ($)"})]})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Physical Inventory (Floor + Backroom)"}),s.jsx("div",{className:"p-1.5 rounded-xl bg-amber-50 text-amber-600 border border-amber-200",children:s.jsx(Ci,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-slate-900 font-mono mb-0.5",children:[r.toLocaleString()," ",s.jsx("span",{className:"text-xs font-bold text-slate-400 font-sans",children:"units"})]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium",children:"Physical count reported by auditor in Step 4"})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Dispatched Sell-In (Units Sold In)"}),s.jsx("div",{className:"p-1.5 rounded-xl bg-sky-50 text-sky-600 border border-sky-200",children:s.jsx(ub,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-sky-600 font-mono mb-0.5",children:[g.toLocaleString()," ",s.jsx("span",{className:"text-xs font-bold text-slate-400 font-sans",children:"units"})]}),s.jsxs("p",{className:"text-[10px] text-slate-400 font-medium",children:["Provided by the ",s.jsx("span",{className:"font-semibold text-slate-700",children:"tiendas"})," sheet"]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Volume Sell-Out (Units)"}),s.jsx("div",{className:"p-1.5 rounded-xl bg-amber-50 text-amber-700 border border-amber-200",children:s.jsx(P0,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-amber-600 font-mono mb-0.5",children:[b.toLocaleString()," ",s.jsx("span",{className:"text-xs font-bold text-slate-400 font-sans",children:"units"})]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium",children:"Calculated (Dispatched Sell-In - Physical Inv)"})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 p-4 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[10px] font-extrabold text-slate-400 uppercase tracking-wider",children:"Estimated Value Sell-Out ($)"}),s.jsx("div",{className:"p-1.5 rounded-xl bg-emerald-50 text-emerald-600 border border-emerald-200",children:s.jsx(Q0,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"text-2xl font-extrabold text-emerald-600 font-mono mb-0.5",children:["$",S.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]}),s.jsx("p",{className:"text-[10px] text-slate-400 font-medium",children:"Calculated (Volume Sell-Out * Shelf Price)"})]})]}),s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 shadow-2xs overflow-hidden",children:[s.jsx("div",{className:"p-4 border-b border-sky-100 bg-sky-50/30 flex items-center justify-between",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900",children:"Physical Inventory and Sell-Out by Store"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Relationship between dispatched Sell-In, physical inventory, and calculated Sell-Out (Units and Value)."})]})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-xs",children:[s.jsx("thead",{className:"bg-sky-50/60 text-slate-500 font-extrabold uppercase text-[10px] tracking-wider border-b border-sky-100",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3",children:"Store / Customer"}),s.jsx("th",{className:"px-4 py-3",children:"Zone / Channel"}),s.jsx("th",{className:"px-4 py-3",children:"Sell-In (Units Sold In)"}),s.jsx("th",{className:"px-4 py-3",children:"Total Physical Inv (Floor + Backroom)"}),s.jsx("th",{className:"px-4 py-3 text-amber-700 bg-amber-50/40",children:"Sell-Out (Units)"}),s.jsx("th",{className:"px-4 py-3",children:"Shelf Price"}),s.jsx("th",{className:"px-4 py-3 text-emerald-700 bg-emerald-50/30",children:"Value Sell-Out ($)"}),s.jsx("th",{className:"px-4 py-3 text-right",children:"View Report"})]})}),s.jsx("tbody",{className:"divide-y divide-sky-100/60 text-slate-700",children:x.map(C=>{var J,R;const j=((J=C.response)==null?void 0:J.totalPhysicalInventory)||0,f=((R=C.response)==null?void 0:R.retailPrice)||0,N=C.store.unitsSoldIn||0,k=Math.max(0,N-j),U=k*f;return s.jsxs("tr",{className:"hover:bg-sky-50/30 transition-colors",children:[s.jsx("td",{className:"px-4 py-3 font-bold text-slate-900",children:C.store.customer}),s.jsxs("td",{className:"px-4 py-3 text-slate-700 font-medium",children:[C.store.zone," - ",C.store.customerChannel]}),s.jsxs("td",{className:"px-4 py-3 font-bold text-sky-600 font-mono",children:[N.toLocaleString()," units"]}),s.jsxs("td",{className:"px-4 py-3 font-extrabold text-slate-900 font-mono",children:[j.toLocaleString()," units",C.hasOOS&&j>0&&s.jsx("span",{className:"block text-[10px] text-amber-600 font-bold",children:"⚠️ In Backroom (OOS on shelf)"})]}),s.jsxs("td",{className:"px-4 py-3 font-black text-amber-700 bg-amber-50/30 font-mono",children:[k.toLocaleString()," units"]}),s.jsxs("td",{className:"px-4 py-3 font-bold text-slate-800 font-mono",children:["$",f.toFixed(2)]}),s.jsxs("td",{className:"px-4 py-3 font-bold text-emerald-600 bg-emerald-50/20 font-mono",children:["$",U.toFixed(2)]}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx("button",{onClick:()=>d(C),className:"text-xs font-bold text-sky-700 hover:text-sky-900 hover:underline cursor-pointer",children:"View Details →"})})]},C.store.customerCode)})})]})})]})]})},z0=({mergedData:u,onSelectStore:d})=>{const[x,r]=oe.useState("customer"),[g,b]=oe.useState(!0),S=N=>{x===N?b(!g):(r(N),b(!0))},C=[...u].sort((N,k)=>{let U=N.store.customer,J=k.store.customer;const R=N.response,Z=k.response,se=(R==null?void 0:R.retailPrice)||0,I=(Z==null?void 0:Z.retailPrice)||0,ee=(R==null?void 0:R.totalPhysicalInventory)||0,be=(Z==null?void 0:Z.totalPhysicalInventory)||0,Oe=N.store.unitsSoldIn||0,Ne=k.store.unitsSoldIn||0,re=Math.max(0,Oe-ee),F=Math.max(0,Ne-be);return x==="zone"?(U=N.store.zone,J=k.store.zone):x==="channel"?(U=N.store.customerChannel,J=k.store.customerChannel):x==="date"?(U=(R==null?void 0:R.submissionDate)||N.store.assignedDate||"",J=(Z==null?void 0:Z.submissionDate)||k.store.assignedDate||""):x==="status"?(U=N.status,J=k.status):x==="oos"?(U=(R==null?void 0:R.isAvailable)||"",J=(Z==null?void 0:Z.isAvailable)||""):x==="placement"?(U=(R==null?void 0:R.placementLocation)||"",J=(Z==null?void 0:Z.placementLocation)||""):x==="pop"?(U=(R==null?void 0:R.popVisible)||"",J=(Z==null?void 0:Z.popVisible)||""):x==="price"?(U=se,J=I):x==="iceKickFacings"?(U=(R==null?void 0:R.facingsIceKick)||0,J=(Z==null?void 0:Z.facingsIceKick)||0):x==="lucozadeFacings"?(U=(R==null?void 0:R.facingsLucozadeBrand)||0,J=(Z==null?void 0:Z.facingsLucozadeBrand)||0):x==="inventory"?(U=ee,J=be):x==="sellIn"?(U=Oe,J=Ne):x==="sellOut"?(U=re,J=F):x==="sellOutValue"&&(U=re*se,J=F*I),U<J?g?-1:1:U>J?g?1:-1:0}),j=N=>N==null?'""':`"${String(N).replace(/[\r\n]+/g," ").trim().replace(/"/g,'""')}"`,f=()=>{const N=["Punto de Venta","Fecha Visita","Zona","Channel","Estatus de Auditoría","OOS Availability","Placement","POP","Price Shelf ($)","Ice Kick Facings","Lucozade Facings","Physical Inventory","Sell In","Sell Out","Sell Out Value ($)"],k=C.map(se=>{const I=se.status==="Visited",ee=se.response,be=(ee==null?void 0:ee.retailPrice)||0,Oe=(ee==null?void 0:ee.totalPhysicalInventory)||0,Ne=se.store.unitsSoldIn||0,re=I?Math.max(0,Ne-Oe):0,F=re*be;return[se.store.customer,(ee==null?void 0:ee.submissionDate)||se.store.assignedDate||"Pending",se.store.zone,se.store.customerChannel,I?"Visited":"Pending",I?(ee==null?void 0:ee.isAvailable)==="Yes"?"Available":"Out of Stock":"Not Reported",I&&(ee==null?void 0:ee.placementLocation)||"N/A",I?(ee==null?void 0:ee.popVisible)||"No POP":"N/A",I?be.toFixed(2):"0.00",I&&(ee==null?void 0:ee.facingsIceKick)||0,I&&(ee==null?void 0:ee.facingsLucozadeBrand)||0,I?Oe:0,Ne,I?re:0,I?F.toFixed(2):"0.00"]}),U=[N.map(se=>j(se)).join(","),...k.map(se=>se.map(I=>j(I)).join(","))].join(`\r
|
|
`),J=new Blob(["\uFEFF"+U],{type:"text/csv;charset=utf-8;"}),R=URL.createObjectURL(J),Z=document.createElement("a");Z.href=R,Z.setAttribute("download",`lucozade_audit_master_table_${new Date().toISOString().slice(0,10)}.csv`),document.body.appendChild(Z),Z.click(),document.body.removeChild(Z),URL.revokeObjectURL(R)};return s.jsxs("div",{className:"bg-white rounded-2xl border border-sky-100 shadow-2xs overflow-hidden",children:[s.jsxs("div",{className:"p-4 border-b border-sky-100 bg-sky-50/40 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-xs sm:text-sm font-bold text-slate-800 flex items-center gap-2 font-ibm",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-sky-100 text-sky-700",children:s.jsx(eh,{className:"w-4 h-4"})}),"Consolidated Store Audit Directory"]}),s.jsx("p",{className:"text-2xs text-slate-500 mt-0.5 font-figtree",children:"Complete store audit breakdown across 14 independent key performance indicators."})]}),s.jsxs("button",{onClick:f,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-slate-700 bg-white hover:bg-slate-50 border border-slate-200 rounded-xl transition-all shadow-2xs cursor-pointer font-figtree",children:[s.jsx(eo,{className:"w-3.5 h-3.5 text-slate-500"}),s.jsx("span",{children:"Export CSV"})]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-xs whitespace-nowrap font-fira",children:[s.jsx("thead",{className:"bg-sky-50/60 text-slate-500 font-extrabold uppercase text-[10px] tracking-wider border-b border-sky-100",children:s.jsxs("tr",{children:[s.jsx("th",{onClick:()=>S("customer"),className:"px-3.5 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Point of Sale (Store) ↑↓"}),s.jsx("th",{onClick:()=>S("date"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Visit Date / Week ↑↓"}),s.jsx("th",{onClick:()=>S("zone"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Zone ↑↓"}),s.jsx("th",{onClick:()=>S("channel"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Channel ↑↓"}),s.jsx("th",{onClick:()=>S("status"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Audit Status ↑↓"}),s.jsx("th",{onClick:()=>S("oos"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"OOS Availability ↑↓"}),s.jsx("th",{onClick:()=>S("placement"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Placement ↑↓"}),s.jsx("th",{onClick:()=>S("pop"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"POP ↑↓"}),s.jsx("th",{onClick:()=>S("price"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Price Shelf ↑↓"}),s.jsx("th",{onClick:()=>S("iceKickFacings"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Ice Kick Facings ↑↓"}),s.jsx("th",{onClick:()=>S("lucozadeFacings"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Lucozade Facings ↑↓"}),s.jsx("th",{onClick:()=>S("inventory"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Physical Inventory ↑↓"}),s.jsx("th",{onClick:()=>S("sellIn"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors",children:"Sell In ↑↓"}),s.jsx("th",{onClick:()=>S("sellOut"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors bg-amber-50/50 text-amber-800",children:"Sell Out ↑↓"}),s.jsx("th",{onClick:()=>S("sellOutValue"),className:"px-3 py-3 cursor-pointer hover:bg-sky-100/50 transition-colors bg-emerald-50/50 text-emerald-800",children:"Sell Out Value ↑↓"}),s.jsx("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),s.jsx("tbody",{className:"divide-y divide-sky-100/60 text-slate-700",children:C.map(N=>{const k=N.response,U=N.status==="Visited",J=(k==null?void 0:k.retailPrice)||0,R=(k==null?void 0:k.totalPhysicalInventory)||0,Z=N.store.unitsSoldIn||0,se=U?Math.max(0,Z-R):0,I=se*J;return s.jsxs("tr",{className:"hover:bg-sky-50/30 transition-colors",children:[s.jsxs("td",{className:"px-3.5 py-3 font-bold text-slate-900",children:[s.jsx("div",{children:N.store.customer}),s.jsx("span",{className:"text-[10px] font-normal text-slate-400 block max-w-[180px] truncate",children:N.store.address})]}),s.jsx("td",{className:"px-3 py-3 text-slate-700 font-mono text-[11px]",children:(k==null?void 0:k.submissionDate)||N.store.assignedDate||"Pending"}),s.jsx("td",{className:"px-3 py-3 font-semibold text-slate-800",children:N.store.zone}),s.jsx("td",{className:"px-3 py-3 text-slate-600",children:N.store.customerChannel}),s.jsx("td",{className:"px-3 py-3",children:U?s.jsxs("span",{className:"inline-flex items-center gap-1 bg-emerald-50 text-emerald-700 border border-emerald-200 px-2.5 py-0.5 rounded-full font-bold text-[10px]",children:[s.jsx(xa,{className:"w-3 h-3 text-emerald-600"}),"Visited"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 bg-slate-100 text-slate-500 border border-slate-200 px-2.5 py-0.5 rounded-full font-semibold text-[10px]",children:[s.jsx(jp,{className:"w-3 h-3 text-slate-400"}),"Pending"]})}),s.jsx("td",{className:"px-3 py-3",children:U?(k==null?void 0:k.isAvailable)==="Yes"?s.jsxs("span",{className:"inline-flex items-center gap-1 bg-emerald-50 text-emerald-700 border border-emerald-200 px-2 py-0.5 rounded-md font-bold text-[10px]",children:[s.jsx(xa,{className:"w-3 h-3 text-emerald-600"}),"Available"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 bg-rose-50 text-rose-700 border border-rose-200 px-2 py-0.5 rounded-md font-extrabold text-[10px]",children:[s.jsx(wi,{className:"w-3 h-3 text-rose-600"}),"Out of Stock"]}):s.jsx("span",{className:"text-slate-400 text-[10px]",children:"Not Reported"})}),s.jsx("td",{className:"px-3 py-3 font-medium text-slate-800",children:U?(k==null?void 0:k.placementLocation)||"N/A":"-"}),s.jsx("td",{className:"px-3 py-3 font-medium text-slate-800",children:U?(k==null?void 0:k.popVisible)||"No POP":"-"}),s.jsx("td",{className:"px-3 py-3 font-bold font-mono text-slate-900",children:U?`$${J.toFixed(2)}`:"-"}),s.jsx("td",{className:"px-3 py-3 font-bold font-mono text-slate-800",children:U?(k==null?void 0:k.facingsIceKick)||0:"-"}),s.jsx("td",{className:"px-3 py-3 font-bold font-mono text-slate-800",children:U?(k==null?void 0:k.facingsLucozadeBrand)||0:"-"}),s.jsx("td",{className:"px-3 py-3 font-black text-slate-900 font-mono",children:U?`${R.toLocaleString()} units`:"-"}),s.jsxs("td",{className:"px-3 py-3 font-bold text-sky-600 font-mono",children:[Z.toLocaleString()," units"]}),s.jsx("td",{className:"px-3 py-3 font-black text-amber-600 bg-amber-50/30 font-mono",children:U?`${se.toLocaleString()} units`:"-"}),s.jsx("td",{className:"px-3 py-3 font-bold text-emerald-600 bg-emerald-50/20 font-mono",children:U?`$${I.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:"-"}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsxs("button",{onClick:()=>d(N),className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-amber-100 hover:bg-amber-200/80 text-amber-950 font-bold border border-amber-200/80 rounded-xl text-xs transition-all shadow-2xs active:scale-95 cursor-pointer",children:[s.jsx(Is,{className:"w-3.5 h-3.5 text-amber-800"}),s.jsx("span",{children:"Report"})]})})]},`${N.store.customerCode}_${(k==null?void 0:k.submissionId)||"pending"}`)})})]})})]})},Sb=({item:u,onClose:d})=>{var N;if(!u)return null;const{store:x,response:r,status:g,hasOOS:b}=u,S=g==="Visited",[C,j]=oe.useState(null),f=[...((r==null?void 0:r.shelfPhotos)||[]).map(k=>({url:k,title:"Shelf / Display Photo"})),...((r==null?void 0:r.popPhotos)||[]).map(k=>({url:k,title:"POP Material Photo"})),...((r==null?void 0:r.categoryPhotos)||[]).map(k=>({url:k,title:"Category Gondola Photo"}))];return s.jsxs("div",{className:"fixed inset-0 z-50 bg-slate-950/60 backdrop-blur-sm flex items-center justify-center p-3 sm:p-6 overflow-y-auto",children:[s.jsxs("div",{className:"bg-white rounded-3xl max-w-4xl w-full my-auto overflow-hidden shadow-2xl border border-sky-100",children:[s.jsxs("div",{className:"bg-sky-50/50 p-5 flex items-start justify-between relative border-b border-sky-100",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 border border-amber-200/80 text-[10px] font-bold uppercase tracking-wider px-2.5 py-0.5 rounded-full font-figtree",children:"Audit Report File"}),s.jsx("span",{className:"text-xs text-slate-400 font-mono",children:x.customerCode})]}),s.jsx("h2",{className:"text-xl font-bold tracking-tight text-slate-900 font-ibm",children:x.customer}),s.jsxs("p",{className:"text-xs text-slate-500 flex items-center gap-1.5 mt-1 font-figtree",children:[s.jsx($0,{className:"w-3.5 h-3.5 text-sky-600"}),x.address," • ",s.jsx("span",{className:"font-semibold text-sky-700",children:x.zone})," • ",s.jsx("span",{children:x.customerChannel})]})]}),s.jsx("button",{onClick:d,className:"p-2 text-slate-400 hover:text-slate-800 hover:bg-sky-100/60 rounded-xl transition-colors cursor-pointer",children:s.jsx(pa,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"p-5 space-y-6 max-h-[78vh] overflow-y-auto text-slate-700",children:[s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 bg-sky-50/30 p-3 rounded-2xl border border-sky-100 text-xs",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] text-slate-400 uppercase font-bold block",children:"Assigned Auditor"}),s.jsx("span",{className:"font-bold text-slate-800",children:x.auditor||"Unassigned"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] text-slate-400 uppercase font-bold block",children:"Visit Days"}),s.jsx("span",{className:"font-bold text-slate-800",children:((N=x.visitDays)==null?void 0:N.join(", "))||"Monday - Friday"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] text-slate-400 uppercase font-bold block",children:"Sell-In (Units Sold In)"}),s.jsxs("span",{className:"font-bold font-mono text-sky-600",children:[(x.unitsSoldIn||0).toLocaleString()," units"]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] text-slate-400 uppercase font-bold block",children:"Latest Report Date"}),s.jsx("span",{className:"font-bold text-slate-800",children:(r==null?void 0:r.submissionDate)||"No report"})]})]}),u.allResponses&&u.allResponses.length>0&&s.jsxs("div",{className:"border border-sky-100 rounded-2xl p-4 bg-sky-50/30",children:[s.jsxs("h3",{className:"text-xs font-extrabold text-slate-900 mb-2 flex items-center gap-1.5",children:[s.jsx(G0,{className:"w-4 h-4 text-sky-600"}),s.jsxs("span",{children:["Weekly Visit History for this POS (",u.allResponses.length," total recorded visits)"]})]}),s.jsx("div",{className:"space-y-2",children:u.allResponses.map((k,U)=>s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100 flex flex-wrap items-center justify-between gap-2 text-xs",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-extrabold text-slate-900 block",children:k.submissionDate}),s.jsxs("span",{className:"text-slate-500 text-[10px]",children:[k.placementLocation||"Main Shelf"," • POP: ",k.popVisible||"None"]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:`px-2.5 py-0.5 rounded-full text-[10px] font-bold ${k.isAvailable==="Yes"?"bg-emerald-50 text-emerald-700 border border-emerald-200":"bg-rose-50 text-rose-700 border border-rose-200"}`,children:k.isAvailable==="Yes"?"Available":"Out of Stock"}),s.jsxs("span",{className:"font-mono font-bold text-slate-700",children:["$",(k.retailPrice||0).toFixed(2)]}),s.jsxs("span",{className:"font-mono text-sky-600 font-bold",children:[k.totalPhysicalInventory||0," units"]})]})]},k.submissionId||U))})]}),S?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"border border-sky-100 rounded-2xl p-4 bg-sky-50/20 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 border-b border-sky-100 pb-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"w-6 h-6 rounded-lg bg-sky-600 text-white font-black text-xs flex items-center justify-center",children:"1"}),s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900",children:"Step 1: Presence Validation (First Impression)"})]}),(r==null?void 0:r.isAvailable)==="Yes"?s.jsxs("span",{className:"inline-flex items-center gap-1 bg-emerald-50 text-emerald-700 border border-emerald-200 px-3 py-1 rounded-full text-xs font-extrabold",children:[s.jsx(xa,{className:"w-4 h-4 text-emerald-600"}),"Available for Sale Today (Yes)"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 bg-rose-50 text-rose-700 border border-rose-200 px-3 py-1 rounded-full text-xs font-extrabold",children:[s.jsx(wi,{className:"w-4 h-4 text-rose-600"}),"Out of Stock (No)"]})]}),b&&s.jsxs("div",{className:"bg-rose-50 border border-rose-200 text-rose-800 p-3 rounded-xl text-xs font-medium flex items-center gap-2",children:[s.jsx(wi,{className:"w-4 h-4 text-rose-600 shrink-0"}),s.jsxs("span",{children:[s.jsx("strong",{className:"text-rose-900",children:"Auditor Alert:"})," Product not available on sales floor. Proceeded to Step 4 (Backroom) to inspect stored stock."]})]})]}),s.jsxs("div",{className:"border border-sky-100 rounded-2xl p-4 bg-sky-50/20 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 border-b border-sky-100 pb-2.5",children:[s.jsx("span",{className:"w-6 h-6 rounded-lg bg-sky-600 text-white font-black text-xs flex items-center justify-center",children:"2"}),s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900",children:"Step 2: Placement & Display (Store Mapping)"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block mb-1",children:"Product Location"}),s.jsx("span",{className:"text-sm font-bold text-slate-900",children:(r==null?void 0:r.placementLocation)||"N/A"})]}),s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block mb-1",children:"Promotional Material (POP)"}),s.jsx("span",{className:"text-sm font-bold text-slate-900",children:(r==null?void 0:r.popVisible)||"No POP"})]})]})]}),s.jsxs("div",{className:"border border-sky-100 rounded-2xl p-4 bg-sky-50/20 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 border-b border-sky-100 pb-2.5",children:[s.jsx("span",{className:"w-6 h-6 rounded-lg bg-sky-600 text-white font-black text-xs flex items-center justify-center",children:"3"}),s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900",children:"Step 3: Main Shelf Measurement (Detailed Work)"})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 text-xs mb-4",children:[s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block",children:"Retail Price"}),s.jsxs("span",{className:"text-base font-black font-mono text-emerald-600",children:["$",((r==null?void 0:r.retailPrice)||0).toFixed(2)]})]}),s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block",children:"Ice Kick Facings"}),s.jsxs("span",{className:"text-base font-black text-slate-900",children:[(r==null?void 0:r.facingsIceKick)||0," facings"]})]}),s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block",children:"Lucozade Brand Share"}),s.jsxs("span",{className:"text-base font-black text-amber-600",children:[r!=null&&r.facingsLucozadeBrand&&r.facingsLucozadeBrand>0?((r.facingsIceKick||0)/r.facingsLucozadeBrand*100).toFixed(1):0,"%"]}),s.jsxs("span",{className:"text-[10px] text-slate-400 font-semibold block",children:["(",(r==null?void 0:r.facingsLucozadeBrand)||0," Lucozade facings)"]})]}),s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100",children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block",children:"Total Category Share"}),s.jsxs("span",{className:"text-base font-black text-sky-600",children:[r!=null&&r.facingsCategoryTotal&&r.facingsCategoryTotal>0?((r.facingsLucozadeBrand||0)/r.facingsCategoryTotal*100).toFixed(1):0,"%"]}),s.jsxs("span",{className:"text-[10px] text-slate-400 font-semibold block",children:["(",(r==null?void 0:r.facingsCategoryTotal)||0," total facings)"]})]})]}),s.jsxs("div",{className:"bg-amber-50 border border-amber-200 p-3 rounded-xl text-xs",children:[s.jsx("span",{className:"font-bold text-amber-900 block mb-0.5",children:"Space Substitution (SKU Substitution):"}),s.jsx("span",{className:"text-amber-800 font-semibold",children:(r==null?void 0:r.skuSubstitution)||"No substitution recorded"})]})]}),s.jsxs("div",{className:"border border-sky-100 rounded-2xl p-4 bg-sky-50/20 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 border-b border-sky-100 pb-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"w-6 h-6 rounded-lg bg-sky-600 text-white font-black text-xs flex items-center justify-center",children:"4"}),s.jsx("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900",children:"Step 4: Inventory & Closure (Store Manager Interview)"})]}),s.jsxs("span",{className:"text-xs font-extrabold text-emerald-700 bg-emerald-50 border border-emerald-200 px-3 py-1 rounded-full font-mono",children:["Value Sell-Out: $",(((r==null?void 0:r.totalPhysicalInventory)||0)*((r==null?void 0:r.retailPrice)||0)).toFixed(2)]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs",children:[s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100 flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block",children:"Total Physical Inventory"}),s.jsx("span",{className:"text-xs text-slate-400",children:"Sales Floor + Backroom"})]}),s.jsxs("span",{className:"text-lg font-black font-mono text-slate-900",children:[((r==null?void 0:r.totalPhysicalInventory)||0).toLocaleString()," units"]})]}),s.jsxs("div",{className:"bg-white p-3 rounded-xl border border-sky-100 flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase block",children:"Total Sell-In"}),s.jsx("span",{className:"text-xs text-slate-400",children:"Dispatched / Sold-In units"})]}),s.jsxs("span",{className:"text-lg font-black font-mono text-sky-600",children:[(x.unitsSoldIn||0).toLocaleString()," units"]})]})]})]}),f.length>0&&s.jsxs("div",{className:"border border-sky-100 rounded-2xl p-4 bg-sky-50/20 shadow-2xs",children:[s.jsxs("h3",{className:"text-xs sm:text-sm font-extrabold text-slate-900 mb-3 flex items-center gap-2",children:[s.jsx(Dp,{className:"w-4 h-4 text-sky-600"}),"Attached Photographs (",f.length,")"]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:f.map((k,U)=>s.jsxs("div",{onClick:()=>j(k.url),className:"group relative rounded-xl overflow-hidden border border-sky-100 aspect-square bg-slate-100 cursor-pointer hover:border-sky-500 hover:shadow-xs transition-all",children:[s.jsx("img",{src:k.url,alt:k.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),s.jsx("div",{className:"absolute inset-0 bg-slate-900/60 opacity-0 group-hover:opacity-100 transition-opacity p-2 flex items-end",children:s.jsx("span",{className:"text-[10px] font-bold text-white",children:k.title})})]},U))})]})]}):s.jsxs("div",{className:"p-8 text-center bg-slate-50 rounded-2xl border border-dashed border-slate-200",children:[s.jsx("p",{className:"text-sm font-bold text-slate-800",children:"Store Pending Audit"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"No form response has been recorded for this store yet."})]})]}),s.jsx("div",{className:"bg-sky-50/50 border-t border-sky-100 p-4 flex justify-end",children:s.jsx("button",{onClick:d,className:"px-5 py-2 bg-amber-400 hover:bg-amber-300 text-slate-950 font-black rounded-xl text-xs transition-all shadow-2xs cursor-pointer",children:"Close Report"})})]}),C&&s.jsx("div",{onClick:()=>j(null),className:"fixed inset-0 z-60 bg-slate-950/80 backdrop-blur-md flex items-center justify-center p-4 cursor-pointer",children:s.jsx("div",{className:"max-w-4xl max-h-[90vh] bg-white border border-sky-100 p-2 rounded-3xl shadow-2xl",children:s.jsx("img",{src:C,alt:"Zoom",className:"max-w-full max-h-[80vh] object-contain rounded-2xl mx-auto"})})})]})},jb=({isOpen:u,currentSpreadsheetId:d,source:x,error:r,onClose:g,onUpdateSpreadsheetId:b})=>{if(!u)return null;const[S,C]=oe.useState(d),j=N=>{N.preventDefault(),S.trim()&&(b(S.trim()),g())},f=d.startsWith("http")?d:`https://docs.google.com/spreadsheets/d/${d}/edit`;return s.jsx("div",{className:"fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-xs flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-white rounded-3xl max-w-lg w-full overflow-hidden shadow-2xl border border-sky-100",children:[s.jsxs("div",{className:"bg-sky-50/70 text-slate-900 p-4 sm:p-5 flex items-center justify-between border-b border-sky-100",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-1.5 rounded-xl bg-amber-100 text-amber-800 border border-amber-200/80",children:s.jsx(K0,{className:"w-4 h-4"})}),s.jsx("h3",{className:"font-extrabold text-sm text-slate-900",children:"Google Sheets Configuration"})]}),s.jsx("button",{onClick:g,className:"p-1 text-slate-400 hover:text-slate-900 rounded-xl transition-colors cursor-pointer",children:s.jsx(pa,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"p-5 space-y-4 text-slate-800",children:[s.jsxs("div",{className:"bg-amber-50 border border-amber-200 text-slate-900 p-3.5 rounded-2xl text-xs space-y-1",children:[s.jsx("p",{className:"font-extrabold text-amber-950",children:"Connected Google Sheets Database:"}),s.jsx("p",{className:"font-mono text-[11px] break-all bg-white p-2 rounded-xl border border-amber-200/80 text-amber-900 font-bold",children:d}),s.jsxs("a",{href:f,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-[11px] font-extrabold text-amber-700 hover:text-amber-950 underline pt-1",children:["Open Google Sheet in new tab ",s.jsx(X0,{className:"w-3 h-3"})]})]}),s.jsxs("form",{onSubmit:j,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-extrabold uppercase tracking-wider text-slate-400 mb-1",children:"Google Sheets ID or Published Web Link (pubhtml / URL / ID)"}),s.jsx("input",{type:"text",value:S,onChange:N=>C(N.target.value),placeholder:"https://docs.google.com/spreadsheets/d/e/2PACX-.../pubhtml",className:"w-full px-3.5 py-2.5 text-xs bg-sky-50/50 border border-sky-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-amber-400 font-mono text-slate-900 placeholder-slate-400 font-bold"})]}),s.jsxs("div",{className:"p-3.5 rounded-2xl border border-sky-100 bg-sky-50/30 text-xs",children:[s.jsx("span",{className:"font-extrabold text-slate-900 block mb-1",children:"Required Tab Structure:"}),s.jsxs("ul",{className:"list-disc list-inside text-[11px] text-slate-600 space-y-0.5",children:[s.jsxs("li",{children:[s.jsx("span",{className:"font-extrabold text-slate-900",children:"Form responses"}),": Audit form responses tab"]}),s.jsxs("li",{children:[s.jsx("span",{className:"font-extrabold text-slate-900",children:"tiendas"}),": Master stores list tab"]})]})]}),s.jsxs("div",{className:"pt-2 flex items-center justify-between",children:[s.jsx("button",{type:"button",onClick:()=>{C(Ni),b(Ni)},className:"text-xs font-bold text-slate-400 hover:text-slate-900 underline cursor-pointer",children:"Reset Default ID"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:g,className:"px-3.5 py-2 text-xs font-bold text-slate-500 hover:text-slate-900 hover:bg-sky-50 rounded-xl transition-colors cursor-pointer",children:"Cancel"}),s.jsx("button",{type:"submit",className:"px-4 py-2 text-xs font-bold text-amber-950 bg-amber-100 hover:bg-amber-200/80 border border-amber-200/80 rounded-xl shadow-2xs transition-colors cursor-pointer",children:"Sync"})]})]})]})]})]})})},Nb=({isOpen:u,onClose:d})=>{const[x,r]=oe.useState(0),g=7;if(oe.useEffect(()=>{const S=C=>{u&&(C.key==="ArrowRight"||C.key==="Space"?r(j=>Math.min(j+1,g-1)):C.key==="ArrowLeft"?r(j=>Math.max(j-1,0)):C.key==="Escape"&&d())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[u,g,d]),!u)return null;const b=[{title:"Store Audit Dashboard Overview",subtitle:"Executive POS Monitoring Platform: Lucozade Sport Ice Kick",badge:"Module 1: Overview",icon:s.jsx(_i,{className:"w-5 h-5 text-amber-800"}),content:s.jsxs("div",{className:"space-y-5 font-figtree",children:[s.jsxs("div",{className:"bg-sky-50/70 p-4 rounded-2xl border border-sky-100 flex items-start gap-3",children:[s.jsx("div",{className:"p-2 bg-sky-500 text-white rounded-xl shrink-0 mt-0.5",children:s.jsx(to,{className:"w-5 h-5"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-bold text-slate-900 text-sm font-ibm",children:"What is the Store Audit Dashboard?"}),s.jsxs("p",{className:"text-xs text-slate-600 mt-1 leading-relaxed",children:["An executive, real-time management platform designed to audit point-of-sale (POS) commercial execution for ",s.jsx("strong",{children:"Lucozade Sport Ice Kick"}),", tracking stock availability (OOS), shelf share, POP promotional material, and estimated Sell-Out sales."]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3.5",children:[s.jsxs("div",{className:"bg-white p-4 rounded-2xl border border-slate-200/80 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"p-1.5 rounded-lg bg-emerald-50 text-emerald-700",children:s.jsx(K0,{className:"w-4 h-4"})}),s.jsx("h5",{className:"font-bold text-slate-800 text-xs font-ibm",children:"1. Master Store List"})]}),s.jsxs("p",{className:"text-2xs text-slate-500 leading-relaxed",children:["Contains the official universe of registered stores, customer coding, channel type, geographic zone, and warehouse shipments (",s.jsx("strong",{children:"Sell-In"}),")."]})]}),s.jsxs("div",{className:"bg-white p-4 rounded-2xl border border-slate-200/80 shadow-2xs",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"p-1.5 rounded-lg bg-sky-50 text-sky-700",children:s.jsx(Op,{className:"w-4 h-4"})}),s.jsx("h5",{className:"font-bold text-slate-800 text-xs font-ibm",children:"2. Field Audit Responses"})]}),s.jsx("p",{className:"text-2xs text-slate-500 leading-relaxed",children:"Live field data captured directly by auditors via Google Form: retail shelf prices, OOS status, facings, POP placement, and shelf photo proof."})]})]}),s.jsxs("div",{className:"bg-amber-50/70 border border-amber-200/80 p-3.5 rounded-2xl flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-amber-100 text-amber-800 rounded-xl shrink-0",children:s.jsx(I0,{className:"w-4 h-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-bold text-amber-950 font-ibm",children:"Automated Real-Time Synchronization"}),s.jsx("p",{className:"text-2xs text-amber-800 mt-0.5",children:"Whenever a field auditor submits a store audit, data automatically syncs to this live dashboard without requiring manual consolidation or uploads."})]})]})]})},{title:"Key Performance Indicators (KPIs)",subtitle:"Executive Metrics & Commercial Performance Tracker",badge:"Module 2: Key Metrics",icon:s.jsx(Z0,{className:"w-5 h-5 text-sky-600"}),content:s.jsxs("div",{className:"space-y-4 font-figtree",children:[s.jsx("p",{className:"text-xs text-slate-600 leading-relaxed",children:"The top summary panel consolidates 11 executive metrics updated dynamically based on active filters:"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"p-3 bg-sky-50/60 rounded-xl border border-sky-100",children:[s.jsx("div",{className:"text-[10px] font-bold text-sky-800 uppercase font-ibm",children:"Store Audit Coverage"}),s.jsx("div",{className:"text-lg font-bold text-sky-700 font-geist mt-0.5",children:"% Coverage"}),s.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:"Percentage of visited stores against total assigned target."})]}),s.jsxs("div",{className:"p-3 bg-rose-50/60 rounded-xl border border-rose-100",children:[s.jsx("div",{className:"text-[10px] font-bold text-rose-800 uppercase font-ibm",children:"Out Of Stock (OOS)"}),s.jsx("div",{className:"text-lg font-bold text-rose-600 font-geist mt-0.5",children:"% OOS Rate"}),s.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:"Stores where Lucozade Ice Kick is out of stock on the shelf."})]}),s.jsxs("div",{className:"p-3 bg-emerald-50/60 rounded-xl border border-emerald-100",children:[s.jsx("div",{className:"text-[10px] font-bold text-emerald-800 uppercase font-ibm",children:"% Add. Exhibition"}),s.jsx("div",{className:"text-lg font-bold text-emerald-700 font-geist mt-0.5",children:"Extra Display %"}),s.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:"Presence across secondary displays and gondola end caps."})]}),s.jsxs("div",{className:"p-3 bg-slate-50 rounded-xl border border-slate-200/80",children:[s.jsx("div",{className:"text-[10px] font-bold text-slate-700 uppercase font-ibm",children:"Lucozade Share"}),s.jsx("div",{className:"text-lg font-bold text-slate-800 font-geist mt-0.5",children:"Facing Share %"}),s.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:"Ice Kick facings share relative to total Lucozade brand."})]}),s.jsxs("div",{className:"p-3 bg-amber-50/60 rounded-xl border border-amber-100",children:[s.jsx("div",{className:"text-[10px] font-bold text-amber-900 uppercase font-ibm",children:"Volume Sell-Out"}),s.jsx("div",{className:"text-lg font-bold text-amber-700 font-geist mt-0.5",children:"Units Sold"}),s.jsxs("p",{className:"text-[10px] text-slate-500 mt-1",children:["Rotation calculation: ",s.jsx("code",{children:"Sell-In - Physical Inventory"}),"."]})]}),s.jsxs("div",{className:"p-3 bg-emerald-50/60 rounded-xl border border-emerald-100",children:[s.jsx("div",{className:"text-[10px] font-bold text-emerald-900 uppercase font-ibm",children:"Value Sell-Out"}),s.jsx("div",{className:"text-lg font-bold text-emerald-700 font-geist mt-0.5",children:"Sales Value ($)"}),s.jsxs("p",{className:"text-[10px] text-slate-500 mt-1",children:["Monetary valuation: ",s.jsx("code",{children:"Sell-Out Units * Shelf Price"}),"."]})]})]})]})},{title:"Smart Filtering System",subtitle:"Dynamic Segmentation by Region, Channel, & Audit Status",badge:"Module 3: Filters",icon:s.jsx(J0,{className:"w-5 h-5 text-sky-600"}),content:s.jsxs("div",{className:"space-y-4 font-figtree",children:[s.jsxs("div",{className:"bg-slate-50 p-3.5 rounded-xl border border-slate-200/80 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(lb,{className:"w-4 h-4 text-sky-600"}),s.jsx("span",{className:"text-xs font-bold text-slate-800 font-ibm",children:"Multi-Criteria Segmentation"})]}),s.jsx("span",{className:"text-[10px] font-bold text-sky-700 bg-sky-100 px-2 py-0.5 rounded-md",children:"Combinable Filters"})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsxs("div",{className:"flex items-start gap-3 p-3 bg-white rounded-xl border border-slate-100 shadow-2xs",children:[s.jsx("div",{className:"w-6 h-6 rounded-lg bg-sky-100 text-sky-800 flex items-center justify-center font-bold text-xs shrink-0 font-geist",children:"1"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs font-bold text-slate-900 font-ibm",children:"Geographic Region (Zone)"}),s.jsx("p",{className:"text-2xs text-slate-500 mt-0.5",children:"Filter by country zones (e.g. West, South, Central, East, North) to measure regional performance."})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-3 bg-white rounded-xl border border-slate-100 shadow-2xs",children:[s.jsx("div",{className:"w-6 h-6 rounded-lg bg-sky-100 text-sky-800 flex items-center justify-center font-bold text-xs shrink-0 font-geist",children:"2"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs font-bold text-slate-900 font-ibm",children:"Sales Channel (Channel)"}),s.jsx("p",{className:"text-2xs text-slate-500 mt-0.5",children:"Segmentation by customer type: Supermarkets, Service Stations (Petrol/Convenience), Wholesale, etc."})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-3 bg-white rounded-xl border border-slate-100 shadow-2xs",children:[s.jsx("div",{className:"w-6 h-6 rounded-lg bg-sky-100 text-sky-800 flex items-center justify-center font-bold text-xs shrink-0 font-geist",children:"3"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs font-bold text-slate-900 font-ibm",children:"Audit Status & OOS Availability"}),s.jsxs("p",{className:"text-2xs text-slate-500 mt-0.5",children:["Compare ",s.jsx("strong",{children:"Visited vs Pending"})," stores, and immediately pinpoint PDVs with active ",s.jsx("strong",{children:"Out of Stock"})," alerts."]})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-3 bg-white rounded-xl border border-slate-100 shadow-2xs",children:[s.jsx("div",{className:"w-6 h-6 rounded-lg bg-sky-100 text-sky-800 flex items-center justify-center font-bold text-xs shrink-0 font-geist",children:"4"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs font-bold text-slate-900 font-ibm",children:"Direct Search by Store Code or Name"}),s.jsx("p",{className:"text-2xs text-slate-500 mt-0.5",children:"Use the instant search bar to find any specific customer code or store name."})]})]})]})]})},{title:"Audit Methodology (Steps 1 & 2)",subtitle:"Presence Verification, OOS, Location Mapping & POP Material",badge:"Module 4: Steps 1 & 2",icon:s.jsx(Is,{className:"w-5 h-5 text-amber-800"}),content:s.jsxs("div",{className:"space-y-4 font-figtree",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"p-4 bg-white rounded-2xl border border-slate-200/80 shadow-2xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 text-[10px] font-bold px-2 py-0.5 rounded-full font-figtree",children:"STEP 1"}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"Presence & OOS Availability"})]}),s.jsx("p",{className:"text-2xs text-slate-600 leading-relaxed",children:"First in-store check. Confirms whether Lucozade Sport Ice Kick is available for purchase."}),s.jsxs("ul",{className:"text-2xs text-slate-500 space-y-1 list-disc pl-4",children:[s.jsx("li",{children:"Immediate detection of stockouts (OOS)."}),s.jsx("li",{children:"Identification of non-availability causes."}),s.jsx("li",{children:"Mapping of effective numerical distribution."})]})]}),s.jsxs("div",{className:"p-4 bg-white rounded-2xl border border-slate-200/80 shadow-2xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 text-[10px] font-bold px-2 py-0.5 rounded-full font-figtree",children:"STEP 2"}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"Placement & POP Material"})]}),s.jsx("p",{className:"text-2xs text-slate-600 leading-relaxed",children:"Evaluation of product visibility and promotional support at the point of sale."}),s.jsxs("ul",{className:"text-2xs text-slate-500 space-y-1 list-disc pl-4",children:[s.jsx("li",{children:"Placement: Main Shelf, Chiller, Secondary Display, Gondola End."}),s.jsx("li",{children:"POP Material check: Wobblers, Shelf Talkers, Posters, Branded Coolers."}),s.jsx("li",{children:"Visual merchandising compliance audit."})]})]})]}),s.jsxs("div",{className:"p-3 bg-sky-50 rounded-xl border border-sky-100 text-2xs text-sky-900 flex items-center gap-2",children:[s.jsx(lo,{className:"w-4 h-4 text-sky-600 shrink-0"}),s.jsx("span",{children:"Dedicated tabs in the top navigation bar allow you to inspect each step individually."})]})]})},{title:"Audit Methodology (Steps 3 & 4)",subtitle:"Main Shelf Measurement, Facings, Inventory & Sell-Out",badge:"Module 5: Steps 3 & 4",icon:s.jsx(Ci,{className:"w-5 h-5 text-emerald-600"}),content:s.jsxs("div",{className:"space-y-4 font-figtree",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"p-4 bg-white rounded-2xl border border-slate-200/80 shadow-2xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 text-[10px] font-bold px-2 py-0.5 rounded-full font-figtree",children:"STEP 3"}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"Main Shelf, Facings & Price"})]}),s.jsx("p",{className:"text-2xs text-slate-600 leading-relaxed",children:"Quantification of physical shelf space and verification of retail consumer price."}),s.jsxs("ul",{className:"text-2xs text-slate-500 space-y-1 list-disc pl-4",children:[s.jsx("li",{children:"Count of Ice Kick facings vs Lucozade Brand vs Category."}),s.jsx("li",{children:"Real-time Share of Shelf (%) calculation."}),s.jsx("li",{children:"SKU substitution check when Ice Kick is missing."}),s.jsx("li",{children:"Shelf retail price ($) recording."})]})]}),s.jsxs("div",{className:"p-4 bg-white rounded-2xl border border-slate-200/80 shadow-2xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"bg-amber-100 text-amber-900 text-[10px] font-bold px-2 py-0.5 rounded-full font-figtree",children:"STEP 4"}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"Physical Inventory & Sell-Out"})]}),s.jsx("p",{className:"text-2xs text-slate-600 leading-relaxed",children:"Total store unit count and inferred Sell-Out volume/value."}),s.jsxs("ul",{className:"text-2xs text-slate-500 space-y-1 list-disc pl-4",children:[s.jsx("li",{children:"Sum of sales floor inventory + backroom warehouse stock."}),s.jsxs("li",{children:["Sell-Out Units Formula: ",s.jsx("code",{children:"Sell-In - Physical Inventory"}),"."]}),s.jsxs("li",{children:["Sell-Out Value ($) Formula: ",s.jsx("code",{children:"Units * Shelf Price"}),"."]})]})]})]}),s.jsx("div",{className:"p-3.5 bg-emerald-50/80 border border-emerald-200/80 rounded-2xl flex items-center justify-between",children:s.jsxs("div",{className:"text-2xs text-emerald-950 font-medium",children:[s.jsx("strong",{children:"Precise Inventory Control:"})," Enables real sales velocity measurement and replenishment planning before stockouts occur."]})})]})},{title:"Consolidated Directory & CSV Export",subtitle:"Complete Master Table & Individual Store Audit Reports",badge:"Module 6: Data & Export",icon:s.jsx(eo,{className:"w-5 h-5 text-amber-800"}),content:s.jsxs("div",{className:"space-y-4 font-figtree",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"p-3.5 bg-white rounded-xl border border-slate-200/80 shadow-2xs space-y-1.5",children:[s.jsx("div",{className:"p-1.5 bg-sky-50 text-sky-700 rounded-lg w-fit",children:s.jsx(Ws,{className:"w-4 h-4"})}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"14 Master Columns"}),s.jsx("p",{className:"text-2xs text-slate-500 leading-relaxed",children:"Comprehensive comparative table detailing POS, Zone, Channel, Status, OOS, Placement, POP, Price, Facings, Inventory, Sell-In, and Sell-Out."})]}),s.jsxs("div",{className:"p-3.5 bg-white rounded-xl border border-slate-200/80 shadow-2xs space-y-1.5",children:[s.jsx("div",{className:"p-1.5 bg-amber-50 text-amber-800 rounded-lg w-fit",children:s.jsx(Is,{className:"w-4 h-4"})}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"Individual Store Report (View)"}),s.jsxs("p",{className:"text-2xs text-slate-500 leading-relaxed",children:["Click ",s.jsx("strong",{children:"Report"})," to open the complete store dossier with form photo evidence and step-by-step breakdown."]})]}),s.jsxs("div",{className:"p-3.5 bg-white rounded-xl border border-slate-200/80 shadow-2xs space-y-1.5",children:[s.jsx("div",{className:"p-1.5 bg-emerald-50 text-emerald-700 rounded-lg w-fit",children:s.jsx(eo,{className:"w-4 h-4"})}),s.jsx("h5",{className:"font-bold text-slate-900 text-xs font-ibm",children:"Clean CSV Export"}),s.jsx("p",{className:"text-2xs text-slate-500 leading-relaxed",children:"Download optimized Excel/Google Sheets reports with UTF-8 BOM encoding to prevent misaligned rows."})]})]}),s.jsxs("div",{className:"p-3 bg-slate-100/80 rounded-xl border border-slate-200 text-2xs text-slate-700 flex items-center gap-2",children:[s.jsx(xa,{className:"w-4 h-4 text-emerald-600 shrink-0"}),s.jsx("span",{children:"Clicking on table headers (e.g., Sell-Out, Price, Zone) instantly sorts the store directory ascending or descending."})]})]})},{title:"Recommended Client Workflow",subtitle:"Best Practices for Daily / Weekly Management",badge:"Module 7: Client Use Case",icon:s.jsx(lo,{className:"w-5 h-5 text-amber-800"}),content:s.jsxs("div",{className:"space-y-4 font-figtree",children:[s.jsx("p",{className:"text-xs text-slate-600",children:"Recommended steps to maximize commercial value from the audit dashboard:"}),s.jsxs("div",{className:"relative border-l-2 border-sky-200 ml-3 pl-4 space-y-3.5",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-[23px] top-0 w-3 h-3 bg-sky-500 rounded-full ring-4 ring-white"}),s.jsx("h5",{className:"text-xs font-bold text-slate-900 font-ibm",children:"1. Initial Coverage Verification"}),s.jsxs("p",{className:"text-2xs text-slate-500 mt-0.5",children:["Review the ",s.jsx("strong",{children:"Store Audit Coverage"})," metric to track field team progress along planned routes."]})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-[23px] top-0 w-3 h-3 bg-rose-500 rounded-full ring-4 ring-white"}),s.jsx("h5",{className:"text-xs font-bold text-slate-900 font-ibm",children:"2. Priority Out-of-Stock (OOS) Resolution"}),s.jsxs("p",{className:"text-2xs text-slate-500 mt-0.5",children:["Filter by ",s.jsx("strong",{children:"OOS Status = Out of Stock"})," to trigger emergency replenishments for key stores."]})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-[23px] top-0 w-3 h-3 bg-amber-500 rounded-full ring-4 ring-white"}),s.jsx("h5",{className:"text-xs font-bold text-slate-900 font-ibm",children:"3. Merchandising & Display Optimization"}),s.jsxs("p",{className:"text-2xs text-slate-500 mt-0.5",children:["Analyze ",s.jsx("strong",{children:"Step 2"})," and ",s.jsx("strong",{children:"Step 3"})," tabs to negotiate extra shelf space or POP placement in low-share stores."]})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-[23px] top-0 w-3 h-3 bg-emerald-500 rounded-full ring-4 ring-white"}),s.jsx("h5",{className:"text-xs font-bold text-slate-900 font-ibm",children:"4. Management Reporting & Export"}),s.jsx("p",{className:"text-2xs text-slate-500 mt-0.5",children:"Export the consolidated CSV report for weekly performance reviews and client presentations."})]})]}),s.jsx("div",{className:"pt-2 text-center",children:s.jsxs("button",{onClick:d,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-amber-100 hover:bg-amber-200/80 text-amber-950 font-bold border border-amber-200/80 rounded-xl text-xs transition-all shadow-2xs active:scale-95 cursor-pointer font-figtree",children:[s.jsx("span",{children:"Got it! Start using the dashboard"}),s.jsx(V0,{className:"w-4 h-4 text-amber-900"})]})})]})}];return s.jsx("div",{className:"fixed inset-0 z-50 bg-slate-900/60 backdrop-blur-xs flex items-center justify-center p-3 sm:p-6 overflow-y-auto",children:s.jsxs("div",{className:"bg-white rounded-3xl border border-sky-100 max-w-3xl w-full shadow-2xl overflow-hidden flex flex-col max-h-[90vh] animate-in fade-in zoom-in-95 duration-150",children:[s.jsxs("div",{className:"bg-sky-50/80 px-6 py-4 border-b border-sky-100 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-xl bg-amber-100 text-amber-800 border border-amber-200/80 shrink-0",children:s.jsx(to,{className:"w-5 h-5"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"bg-sky-100 text-sky-800 text-[10px] font-bold px-2 py-0.5 rounded-full font-figtree",children:b[x].badge}),s.jsxs("span",{className:"text-xs font-bold text-slate-400 font-geist",children:["Slide ",x+1," of ",g]})]}),s.jsx("h2",{className:"text-sm sm:text-base font-bold text-slate-900 tracking-tight font-ibm",children:"Client Dashboard User Guide"})]})]}),s.jsx("button",{onClick:d,className:"p-2 text-slate-400 hover:text-slate-600 hover:bg-white rounded-xl transition-colors cursor-pointer",title:"Close presentation",children:s.jsx(pa,{className:"w-5 h-5"})})]}),s.jsx("div",{className:"w-full bg-slate-100 h-1.5 flex",children:b.map((S,C)=>s.jsx("div",{onClick:()=>r(C),className:`h-full flex-1 transition-all cursor-pointer ${C===x?"bg-amber-300":C<x?"bg-sky-400":"bg-slate-200"}`},C))}),s.jsx("div",{className:"p-6 sm:p-8 flex-1 overflow-y-auto bg-white flex flex-col justify-between",children:s.jsxs("div",{children:[s.jsxs("div",{className:"mb-6 border-b border-slate-100 pb-4 flex items-start gap-3",children:[s.jsx("div",{className:"p-2 bg-sky-50 rounded-xl text-sky-700 shrink-0 mt-1",children:b[x].icon}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg sm:text-xl font-bold text-slate-900 font-ibm",children:b[x].title}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5 font-figtree",children:b[x].subtitle})]})]}),b[x].content]})}),s.jsxs("div",{className:"bg-slate-50/80 px-6 py-4 border-t border-slate-200/80 flex items-center justify-between font-figtree",children:[s.jsxs("button",{onClick:()=>r(S=>Math.max(S-1,0)),disabled:x===0,className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-bold text-slate-700 bg-white border border-slate-200 rounded-xl hover:bg-slate-100 transition-all shadow-2xs disabled:opacity-30 disabled:cursor-not-allowed cursor-pointer",children:[s.jsx(Wr,{className:"w-4 h-4"}),s.jsx("span",{children:"Previous"})]}),s.jsx("div",{className:"hidden sm:flex items-center gap-1.5",children:b.map((S,C)=>s.jsx("button",{onClick:()=>r(C),className:`w-2.5 h-2.5 rounded-full transition-all cursor-pointer ${C===x?"bg-amber-300 w-6":"bg-slate-300 hover:bg-slate-400"}`},C))}),s.jsxs("button",{onClick:()=>{x<g-1?r(S=>S+1):d()},className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-bold text-amber-950 bg-amber-100 hover:bg-amber-200/80 border border-amber-200/80 rounded-xl transition-all shadow-2xs cursor-pointer",children:[s.jsx("span",{children:x===g-1?"Finish Tutorial":"Next"}),s.jsx(Pr,{className:"w-4 h-4 text-amber-900"})]})]})]})})};function yi(u){const d=u.toLowerCase();return d.includes("invalid login credentials")||d.includes("invalid authentication credentials")?"Incorrect email or password.":d.includes("email not confirmed")?"Please confirm your email before signing in.":d.includes("not authorized to access")?"This account does not have access to this application.":d.includes("verify access")?"Access could not be verified. Please try again.":d.includes("user already registered")||d.includes("account already exists")?"An account already exists for this email.":d.includes("password should be")?"Use a password with at least 8 characters.":d.includes("rate limit")||d.includes("too many attempts")?"Too many attempts. Please wait 15 minutes and try again.":u}const kb=({recoverySession:u=null,recoveryError:d="",onAuthenticated:x,onRecoveryComplete:r})=>{const g=!!u,[b,S]=oe.useState("login"),C=Ox(),[j,f]=oe.useState(""),[N,k]=oe.useState(C),[U,J]=oe.useState(!!C),[R,Z]=oe.useState(""),[se,I]=oe.useState(""),[ee,be]=oe.useState(!1),[Oe,Ne]=oe.useState(!1),[re,F]=oe.useState(d),[ne,v]=oe.useState(""),m=()=>{F(""),v("")},z=G=>{S(G),Z(""),I(""),m()},K=async G=>{G.preventDefault(),m(),Ne(!0);try{const h=await L0(N.trim(),R,U);x(h)}catch(h){F(yi((h==null?void 0:h.message)||"Unable to sign in."))}finally{Ne(!1)}},Q=async G=>{if(G.preventDefault(),m(),R.length<8){F("Use a password with at least 8 characters.");return}if(R!==se){F("Passwords do not match.");return}Ne(!0);try{const h=await Tx(j.trim(),N.trim(),R);h.session?x(h.session):(S("login"),v(h.message),Z(""),I(""))}catch(h){F(yi((h==null?void 0:h.message)||"Unable to create the account."))}finally{Ne(!1)}},te=async G=>{G.preventDefault(),m(),Ne(!0);try{const h=await Mx(N.trim());v(h)}catch(h){F(yi((h==null?void 0:h.message)||"Unable to send the recovery email."))}finally{Ne(!1)}},he=async G=>{if(G.preventDefault(),m(),!u){F("The recovery link is invalid or has expired.");return}if(R.length<8){F("Use a password with at least 8 characters.");return}if(R!==se){F("Passwords do not match.");return}Ne(!0);try{await Rx(u,R),v("Password updated successfully. You can now sign in."),Z(""),I(""),setTimeout(()=>r(),900)}catch(h){F(yi((h==null?void 0:h.message)||"Unable to update the password."))}finally{Ne(!1)}},T=b==="register",M=b==="forgot",Y=g?"Create a new password":T?"Create your account":M?"Recover your password":"Welcome back",X=g?"Enter a new secure password for your account.":T?"Register to access the audit dashboard.":M?"We will send a secure recovery link to your email.":"Sign in to access the audit dashboard.";return s.jsxs("div",{className:"min-h-screen bg-slate-50 relative overflow-hidden flex items-center justify-center p-4 sm:p-6 font-figtree",children:[s.jsx("div",{className:"absolute -top-24 -left-24 w-80 h-80 rounded-full bg-sky-200/50 blur-3xl pointer-events-none"}),s.jsx("div",{className:"absolute -bottom-28 -right-20 w-96 h-96 rounded-full bg-amber-200/45 blur-3xl pointer-events-none"}),s.jsxs("div",{className:"relative w-full max-w-md",children:[s.jsxs("div",{className:"bg-white/95 backdrop-blur-xl border border-sky-100 rounded-[28px] shadow-2xl shadow-sky-900/10 overflow-hidden",children:[s.jsx("div",{className:"h-1.5 bg-gradient-to-r from-sky-500 via-blue-600 to-amber-400"}),s.jsxs("div",{className:"px-6 sm:px-8 pt-7 pb-8",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-7",children:[s.jsx("div",{className:"w-11 h-11 rounded-2xl bg-gradient-to-br from-sky-500 to-blue-600 flex items-center justify-center shadow-lg shadow-sky-500/20 border border-sky-300/40",children:s.jsx(_i,{className:"w-5 h-5 fill-amber-300 text-amber-300"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[10px] uppercase tracking-[0.2em] font-black text-amber-700",children:"Ice Kick"}),s.jsx("div",{className:"font-ibm font-extrabold text-slate-900 leading-tight",children:"Lucozade Store Audit"})]})]}),!g&&!M&&s.jsxs("div",{className:"grid grid-cols-2 p-1 bg-sky-50 border border-sky-100 rounded-xl mb-6",children:[s.jsx("button",{type:"button",onClick:()=>z("login"),className:`py-2 rounded-lg text-xs font-extrabold transition-all cursor-pointer ${b==="login"?"bg-white text-sky-700 shadow-sm":"text-slate-500 hover:text-slate-800"}`,children:"Sign in"}),s.jsx("button",{type:"button",onClick:()=>z("register"),className:`py-2 rounded-lg text-xs font-extrabold transition-all cursor-pointer ${b==="register"?"bg-white text-sky-700 shadow-sm":"text-slate-500 hover:text-slate-800"}`,children:"Create account"})]}),(M||g)&&s.jsxs("button",{type:"button",onClick:()=>g?window.location.assign("/lucozade/"):z("login"),className:"inline-flex items-center gap-1.5 text-xs font-bold text-slate-500 hover:text-sky-700 mb-5 cursor-pointer",children:[s.jsx(ap,{className:"w-3.5 h-3.5"})," Back to sign in"]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"font-ibm text-2xl font-extrabold tracking-tight text-slate-900",children:Y}),s.jsx("p",{className:"text-sm text-slate-500 mt-1.5 leading-relaxed",children:X})]}),re&&s.jsx("div",{className:"mb-4 rounded-xl border border-rose-200 bg-rose-50 px-3.5 py-3 text-xs font-semibold text-rose-700",children:re}),ne&&s.jsxs("div",{className:"mb-4 rounded-xl border border-emerald-200 bg-emerald-50 px-3.5 py-3 text-xs font-semibold text-emerald-700 flex gap-2",children:[s.jsx(xa,{className:"w-4 h-4 shrink-0"}),s.jsx("span",{children:ne})]}),g?s.jsxs("form",{onSubmit:he,className:"space-y-4",children:[s.jsx($s,{label:"New password",value:R,onChange:Z,show:ee,onToggle:()=>be(G=>!G),autoComplete:"new-password"}),s.jsx($s,{label:"Confirm password",value:se,onChange:I,show:ee,onToggle:()=>be(G=>!G),autoComplete:"new-password"}),s.jsx(gi,{loading:Oe,label:"Update password"})]}):M?s.jsxs("form",{onSubmit:te,className:"space-y-4",children:[s.jsx(Jr,{value:N,onChange:k}),s.jsx(gi,{loading:Oe,label:"Send recovery link"})]}):T?s.jsxs("form",{onSubmit:Q,className:"space-y-4",children:[s.jsx(ah,{label:"Name",value:j,onChange:f,type:"text",autoComplete:"name",icon:s.jsx(lh,{className:"w-4 h-4"})}),s.jsx(Jr,{value:N,onChange:k}),s.jsx($s,{label:"Password",value:R,onChange:Z,show:ee,onToggle:()=>be(G=>!G),autoComplete:"new-password"}),s.jsx($s,{label:"Confirm password",value:se,onChange:I,show:ee,onToggle:()=>be(G=>!G),autoComplete:"new-password"}),s.jsx(gi,{loading:Oe,label:"Create account"})]}):s.jsxs("form",{onSubmit:K,className:"space-y-4",children:[s.jsx(Jr,{value:N,onChange:k}),s.jsx($s,{label:"Password",value:R,onChange:Z,show:ee,onToggle:()=>be(G=>!G),autoComplete:"current-password"}),s.jsxs("div",{className:"flex items-center justify-between gap-3 -mt-1",children:[s.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-bold text-slate-600 cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:U,onChange:G=>{const h=G.target.checked;J(h),h||R0("",!1)},className:"h-4 w-4 rounded border-slate-300 accent-sky-600 cursor-pointer"}),"Remember me"]}),s.jsx("button",{type:"button",onClick:()=>z("forgot"),className:"text-xs font-bold text-sky-700 hover:text-sky-900 cursor-pointer",children:"Forgot password?"})]}),s.jsx(gi,{loading:Oe,label:"Sign in"})]})]})]}),s.jsx("p",{className:"text-center text-[11px] text-slate-400 mt-4",children:"Secure access powered by encrypted authentication."})]})]})},ah=({label:u,value:d,onChange:x,type:r,autoComplete:g,icon:b})=>s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"block text-[11px] font-extrabold text-slate-600 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400",children:b}),s.jsx("input",{required:!0,type:r,value:d,onChange:S=>x(S.target.value),autoComplete:g,className:"w-full h-11 pl-10 pr-3.5 rounded-xl bg-slate-50 border border-slate-200 text-sm text-slate-900 placeholder:text-slate-400 outline-none transition focus:bg-white focus:border-sky-400 focus:ring-4 focus:ring-sky-100"})]})]}),Jr=({value:u,onChange:d})=>s.jsx(ah,{label:"User (email address)",value:u,onChange:d,type:"email",autoComplete:"email",icon:s.jsx(Zp,{className:"w-4 h-4"})}),$s=({label:u,value:d,onChange:x,show:r,onToggle:g,autoComplete:b})=>s.jsxs("label",{className:"block",children:[s.jsx("span",{className:"block text-[11px] font-extrabold text-slate-600 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx(Hp,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),s.jsx("input",{required:!0,minLength:8,type:r?"text":"password",value:d,onChange:S=>x(S.target.value),autoComplete:b,className:"w-full h-11 pl-10 pr-11 rounded-xl bg-slate-50 border border-slate-200 text-sm text-slate-900 outline-none transition focus:bg-white focus:border-sky-400 focus:ring-4 focus:ring-sky-100"}),s.jsx("button",{type:"button",onClick:g,"aria-label":r?"Hide password":"Show password",className:"absolute right-3.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-sky-700 cursor-pointer",children:r?s.jsx(Ap,{className:"w-4 h-4"}):s.jsx(Is,{className:"w-4 h-4"})})]})]}),gi=({loading:u,label:d})=>s.jsxs("button",{type:"submit",disabled:u,className:"w-full h-11 rounded-xl bg-gradient-to-r from-sky-500 to-blue-600 hover:from-sky-600 hover:to-blue-700 text-white text-sm font-extrabold shadow-lg shadow-sky-500/20 transition-all active:scale-[0.99] disabled:opacity-60 disabled:cursor-not-allowed cursor-pointer flex items-center justify-center gap-2",children:[u&&s.jsx(F0,{className:"w-4 h-4 animate-spin"}),d]});function Fr(u){const d=new Map;return u.forEach(x=>{if(!x.customer||!x.customer.trim())return;const r=x.customer.trim().toLowerCase();d.has(r)?!d.get(r).assignedDate&&x.assignedDate&&d.set(r,x):d.set(r,x)}),Array.from(d.values())}function wb(){const[u,d]=oe.useState(null),[x,r]=oe.useState(!0),[g,b]=oe.useState(null),[S,C]=oe.useState(""),[j,f]=oe.useState(Ni),[N,k]=oe.useState(!1),[U,J]=oe.useState(null),[R,Z]=oe.useState("overview"),[se,I]=oe.useState(null),[ee,be]=oe.useState(!1),[Oe,Ne]=oe.useState(!1),[re,F]=oe.useState({zone:"all",channel:"all",customer:"all",status:"all",oosStatus:"all",selectedWeek:"all",search:""});oe.useEffect(()=>{let M=!0;return(async()=>{try{const X=await Ux();if(X.session||X.error){X.error&&v0(),M&&(b(X.session),C(X.error),d(null),r(!1));return}const G=await Lx();M&&(d(G),r(!1))}catch(X){console.error("Unable to restore the authentication session:",X),M&&(d(null),b(null),C(""),r(!1))}})(),()=>{M=!1}},[]);const ne=async M=>{k(!0);try{const Y=await Jx(M,null);J(Y)}catch(Y){console.error("Error loading data:",Y)}finally{k(!1)}};oe.useEffect(()=>{u&&!g&&!U&&ne(j)},[u,g]),oe.useEffect(()=>{if(!u)return;const M=Math.max(3e4,u.expires_at*1e3-Date.now()-6e4),Y=window.setTimeout(async()=>{const X=await q0(u);X?d(X):(d(null),J(null))},M);return()=>window.clearTimeout(Y)},[u]);const v=()=>{ne(j)},m=()=>{F({zone:"all",channel:"all",customer:"all",status:"all",oosStatus:"all",selectedWeek:"all",search:""})},z=oe.useMemo(()=>U?Gx(U.stores,U.responses):[],[U]);oe.useEffect(()=>{if(z.length>0&&re.selectedWeek==="all"){const M=z.find(Y=>Y.key.includes("2026-07-20"))||z[0];F(Y=>({...Y,selectedWeek:M.key}))}},[z]);const K=oe.useMemo(()=>{if(!U)return[];const{stores:M,responses:Y}=U,X=re.selectedWeek||"all";if(X!=="all"){const G=M.filter(L=>N0(L.week,L.assignedDate,X)),h=Fr(G),_=h.length>0?h:Fr(M),V=Y.filter(L=>N0(L.week,L.submissionDate,X));return ki(_,V)}else{const G=Fr(M);return ki(G,Y)}},[U,re.selectedWeek]),Q=oe.useMemo(()=>K.filter(M=>{var Y,X;if(re.zone!=="all"&&M.store.zone!==re.zone||re.channel!=="all"&&M.store.customerChannel!==re.channel||re.customer!=="all"&&M.store.customer!==re.customer||re.status!=="all"&&M.status!==re.status||re.oosStatus==="Available"&&((Y=M.response)==null?void 0:Y.isAvailable)!=="Yes"||re.oosStatus==="OOS"&&((X=M.response)==null?void 0:X.isAvailable)!=="No")return!1;if(re.search.trim()){const G=re.search.toLowerCase().trim(),h=M.store.customerCode.toLowerCase().includes(G),_=M.store.customer.toLowerCase().includes(G);if(!h&&!_)return!1}return!0}),[K,re]),te=oe.useMemo(()=>{const M=Q.length,Y=Q.filter(ve=>ve.status==="Visited"),X=Y.length,G=M-X,h=M>0?X/M*100:0,_=re.selectedWeek&&re.selectedWeek!=="all"?((U==null?void 0:U.responses)||[]).filter(ve=>ve.submissionDate&&B0(ve.submissionDate,re.selectedWeek)):(U==null?void 0:U.responses)||[];let V=X;if(_.length>0){const ve=new Set(Q.map(Ge=>Ge.store.customer.toLowerCase().trim())),pe=_.filter(Ge=>Ge.customer&&ve.has(Ge.customer.toLowerCase().trim()));pe.length>0&&(V=pe.length)}const L=Y.filter(ve=>{var pe;return((pe=ve.response)==null?void 0:pe.isAvailable)==="Yes"}).length,le=Y.filter(ve=>{var pe;return((pe=ve.response)==null?void 0:pe.isAvailable)==="No"}).length,$=X>0?X:M,ce=$>0?le/$*100:0,He=$>0?L/$*100:0;let ae=0,me=0,Le=0,fe=0,qe=0,Ue=0,Te=0,Ce=0;const ge=Q.filter(ve=>{var pe;return ve.status==="Visited"&&((pe=ve.response)==null?void 0:pe.isAvailable)==="Yes"});Q.forEach(ve=>{me+=ve.store.unitsSoldIn||0,ve.response&&(ae+=ve.response.totalPhysicalInventory||0)}),ge.forEach(ve=>{ve.response&&(ve.response.retailPrice&&ve.response.retailPrice>0&&(Le+=ve.response.retailPrice,fe++),qe+=ve.response.facingsIceKick||0,Ue+=ve.response.facingsIceKick||0,Te+=ve.response.facingsLucozadeBrand||0,Ce+=ve.response.facingsCategoryTotal||0)});const at=fe>0?Le/fe:0,_e=X>0?qe/X:0,Be=Te>0?Ue/Te*100:0,Je=Ce>0?Te/Ce*100:0;let Ht=0,vt=0,We=0,et=0;Y.forEach(ve=>{var ba;const pe=(((ba=ve.response)==null?void 0:ba.placementLocation)||"").toLowerCase(),Ge=pe.includes("main")||pe.includes("shelf")||pe.includes("estante"),St=pe.includes("secondary")||pe.includes("secundaria")||pe.includes("exhibici")||pe.includes("display"),dt=pe.includes("gondola")||pe.includes("góndola")||pe.includes("end")||pe.includes("cabecera")||pe.includes("endcap");Ge&&Ht++,St&&vt++,dt&&We++,(St||dt)&&et++});const Nt=$>0?Ht/$*100:0,Pe=$>0?vt/$*100:0,st=$>0?We/$*100:0,Tt=$>0?et/$*100:0;let sl=0,$l=0;return Y.forEach(ve=>{var Ps,en;const pe=((Ps=ve.response)==null?void 0:Ps.totalPhysicalInventory)||0,Ge=((en=ve.response)==null?void 0:en.retailPrice)||0,St=ve.store.unitsSoldIn||0,dt=Math.max(0,St-pe),ba=dt*Ge;sl+=dt,$l+=ba}),{totalStores:M,totalResponses:V,visitedStores:X,pendingStores:G,complianceRate:h,oosStores:le,availableStores:L,oosRate:ce,numericDistribution:He,totalPhysicalInventory:ae,totalUnitsSoldIn:me,totalSellOutUnits:sl,totalSellOutValue:$l,avgRetailPrice:at,avgIceKickFacings:_e,avgBrandShelfShare:Be,avgCategoryShelfShare:Je,mainShelfStores:Ht,secondaryDisplayStores:vt,gondolaEndStores:We,additionalExhibitionStores:et,mainShelfRate:Nt,secondaryDisplayRate:Pe,gondolaEndRate:st,additionalExhibitionRate:Tt}},[Q,U]);if(x)return s.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 text-sky-700",children:[s.jsx("div",{className:"w-12 h-12 rounded-2xl bg-gradient-to-br from-sky-500 to-blue-600 flex items-center justify-center shadow-lg",children:s.jsx(_i,{className:"w-5 h-5 fill-amber-300 text-amber-300"})}),s.jsx(F0,{className:"w-5 h-5 animate-spin"})]})});if(!u||g||S)return s.jsx(kb,{recoverySession:g,recoveryError:S,onAuthenticated:M=>{d(M),b(null),C(""),J(null)},onRecoveryComplete:()=>{v0(),b(null),C(""),d(null),J(null)}});const he=(U==null?void 0:U.stores)||[],T=async()=>{await qx(u),d(null),J(null),b(null),C("")};return s.jsxs("div",{className:"min-h-screen bg-slate-50 text-slate-800 font-sans flex flex-col",children:[s.jsx(mb,{lastSynced:(U==null?void 0:U.lastSynced)||"Just now",isSyncing:N,onRefresh:v,onOpenTutorial:()=>Ne(!0),userEmail:u.user.email||"Signed in",onLogout:T}),s.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-6",children:[(U==null?void 0:U.error)&&s.jsxs("div",{className:"bg-amber-50 border border-amber-200 text-amber-900 px-4 py-3 rounded-2xl text-xs flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yp,{className:"w-4 h-4 text-amber-600 shrink-0"}),s.jsx("span",{children:U.error})]}),s.jsx("button",{onClick:()=>be(!0),className:"text-xs font-extrabold underline text-amber-800 hover:text-amber-950 cursor-pointer",children:"Configure Google Sheet"})]}),s.jsx(pb,{filters:re,stores:he,weekOptions:z,onChange:F,onReset:m}),s.jsx(bb,{kpis:te}),s.jsxs("div",{className:"bg-white/95 backdrop-blur-md rounded-2xl border border-sky-100 p-1.5 flex flex-wrap gap-1.5 shadow-xs sticky top-[172px] sm:top-[175px] z-20",children:[s.jsxs("button",{onClick:()=>Z("overview"),className:`flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all cursor-pointer ${R==="overview"?"bg-amber-100 text-amber-950 border border-amber-200/80 shadow-2xs font-figtree":"text-slate-500 hover:text-slate-900 hover:bg-sky-50"}`,children:[s.jsx(Lp,{className:"w-3.5 h-3.5 text-amber-800"}),s.jsx("span",{children:"Overview"})]}),s.jsxs("button",{onClick:()=>Z("step1"),className:`flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all cursor-pointer ${R==="step1"?"bg-amber-100 text-amber-950 border border-amber-200/80 shadow-2xs font-figtree":"text-slate-500 hover:text-slate-900 hover:bg-sky-50"}`,children:[s.jsx(Is,{className:"w-3.5 h-3.5 text-amber-800"}),s.jsx("span",{children:"Step 1: Presence (OOS)"}),te.oosStores>0&&s.jsx("span",{className:"bg-rose-600 text-white text-[10px] font-black px-2 py-0.5 rounded-full",children:te.oosStores})]}),s.jsxs("button",{onClick:()=>Z("step2"),className:`flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all cursor-pointer ${R==="step2"?"bg-amber-100 text-amber-950 border border-amber-200/80 shadow-2xs font-figtree":"text-slate-500 hover:text-slate-900 hover:bg-sky-50"}`,children:[s.jsx($0,{className:"w-3.5 h-3.5 text-amber-800"}),s.jsx("span",{children:"Step 2: Location & POP"})]}),s.jsxs("button",{onClick:()=>Z("step3"),className:`flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all cursor-pointer ${R==="step3"?"bg-amber-100 text-amber-950 border border-amber-200/80 shadow-2xs font-figtree":"text-slate-500 hover:text-slate-900 hover:bg-sky-50"}`,children:[s.jsx(Z0,{className:"w-3.5 h-3.5 text-amber-800"}),s.jsx("span",{children:"Step 3: Shelf & Share"})]}),s.jsxs("button",{onClick:()=>Z("step4"),className:`flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all cursor-pointer ${R==="step4"?"bg-amber-100 text-amber-950 border border-amber-200/80 shadow-2xs font-figtree":"text-slate-500 hover:text-slate-900 hover:bg-sky-50"}`,children:[s.jsx(Ci,{className:"w-3.5 h-3.5 text-amber-800"}),s.jsx("span",{children:"Step 4: Inventory & Backroom"})]}),s.jsxs("button",{onClick:()=>Z("table"),className:`flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-xs font-extrabold transition-all cursor-pointer ${R==="table"?"bg-sky-100 text-sky-950 shadow-2xs":"text-slate-500 hover:text-slate-900 hover:bg-sky-50"}`,children:[s.jsx(ib,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"Store Table"})]})]}),R==="overview"&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(E0,{mergedData:Q,onSelectStore:M=>I(M)}),s.jsx(z0,{mergedData:Q,onSelectStore:M=>I(M)})]}),R==="step1"&&s.jsx(E0,{mergedData:Q,onSelectStore:M=>I(M)}),R==="step2"&&s.jsx(yb,{mergedData:Q,onSelectStore:M=>I(M)}),R==="step3"&&s.jsx(gb,{mergedData:Q,onSelectStore:M=>I(M)}),R==="step4"&&s.jsx(vb,{mergedData:Q,onSelectStore:M=>I(M)}),R==="table"&&s.jsx(z0,{mergedData:Q,onSelectStore:M=>I(M)})]}),s.jsx(Sb,{item:se,onClose:()=>I(null)}),s.jsx(jb,{isOpen:ee,currentSpreadsheetId:j,source:(U==null?void 0:U.source)||"fallback_demo",error:U==null?void 0:U.error,onClose:()=>be(!1),onUpdateSpreadsheetId:M=>{f(M),ne(M)}}),s.jsx(Nb,{isOpen:Oe,onClose:()=>Ne(!1)})]})}_x.createRoot(document.getElementById("root")).render(s.jsx(oe.StrictMode,{children:s.jsx(wb,{})}));
|