var r1=Object.defineProperty;var i1=(e,t,l)=>t in e?r1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l;var Se=(e,t,l)=>i1(e,typeof t!="symbol"?t+"":t,l);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function l(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(a){if(a.ep)return;a.ep=!0;const r=l(a);fetch(a.href,r)}})();function o1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var am={exports:{}},Bo={};/**
 * @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 s1=Symbol.for("react.transitional.element"),c1=Symbol.for("react.fragment");function rm(e,t,l){var n=null;if(l!==void 0&&(n=""+l),t.key!==void 0&&(n=""+t.key),"key"in t){l={};for(var a in t)a!=="key"&&(l[a]=t[a])}else l=t;return t=l.ref,{$$typeof:s1,type:e,key:n,ref:t!==void 0?t:null,props:l}}Bo.Fragment=c1;Bo.jsx=rm;Bo.jsxs=rm;am.exports=Bo;var s=am.exports,im={exports:{}},re={};/**
 * @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 bu=Symbol.for("react.transitional.element"),u1=Symbol.for("react.portal"),d1=Symbol.for("react.fragment"),f1=Symbol.for("react.strict_mode"),h1=Symbol.for("react.profiler"),m1=Symbol.for("react.consumer"),g1=Symbol.for("react.context"),_1=Symbol.for("react.forward_ref"),p1=Symbol.for("react.suspense"),y1=Symbol.for("react.memo"),om=Symbol.for("react.lazy"),b1=Symbol.for("react.activity"),zd=Symbol.iterator;function v1(e){return e===null||typeof e!="object"?null:(e=zd&&e[zd]||e["@@iterator"],typeof e=="function"?e:null)}var sm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cm=Object.assign,um={};function Ua(e,t,l){this.props=e,this.context=t,this.refs=um,this.updater=l||sm}Ua.prototype.isReactComponent={};Ua.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ua.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dm(){}dm.prototype=Ua.prototype;function vu(e,t,l){this.props=e,this.context=t,this.refs=um,this.updater=l||sm}var wu=vu.prototype=new dm;wu.constructor=vu;cm(wu,Ua.prototype);wu.isPureReactComponent=!0;var Md=Array.isArray;function oc(){}var Le={H:null,A:null,T:null,S:null},fm=Object.prototype.hasOwnProperty;function xu(e,t,l){var n=l.ref;return{$$typeof:bu,type:e,key:t,ref:n!==void 0?n:null,props:l}}function w1(e,t){return xu(e.type,t,e.props)}function Su(e){return typeof e=="object"&&e!==null&&e.$$typeof===bu}function x1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(l){return t[l]})}var Ld=/\/+/g;function ss(e,t){return typeof e=="object"&&e!==null&&e.key!=null?x1(""+e.key):t.toString(36)}function S1(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(oc,oc):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Wn(e,t,l,n,a){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(r){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case bu:case u1:i=!0;break;case om:return i=e._init,Wn(i(e._payload),t,l,n,a)}}if(i)return a=a(e),i=n===""?"."+ss(e,0):n,Md(a)?(l="",i!=null&&(l=i.replace(Ld,"$&/")+"/"),Wn(a,t,l,"",function(u){return u})):a!=null&&(Su(a)&&(a=w1(a,l+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Ld,"$&/")+"/")+i)),t.push(a)),1;i=0;var o=n===""?".":n+":";if(Md(e))for(var c=0;c<e.length;c++)n=e[c],r=o+ss(n,c),i+=Wn(n,t,l,r,a);else if(c=v1(e),typeof c=="function")for(e=c.call(e),c=0;!(n=e.next()).done;)n=n.value,r=o+ss(n,c++),i+=Wn(n,t,l,r,a);else if(r==="object"){if(typeof e.then=="function")return Wn(S1(e),t,l,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return i}function ui(e,t,l){if(e==null)return e;var n=[],a=0;return Wn(e,n,"","",function(r){return t.call(l,r,a++)}),n}function C1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(l){(e._status===0||e._status===-1)&&(e._status=1,e._result=l)},function(l){(e._status===0||e._status===-1)&&(e._status=2,e._result=l)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Od=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)},j1={map:ui,forEach:function(e,t,l){ui(e,function(){t.apply(this,arguments)},l)},count:function(e){var t=0;return ui(e,function(){t++}),t},toArray:function(e){return ui(e,function(t){return t})||[]},only:function(e){if(!Su(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Activity=b1;re.Children=j1;re.Component=Ua;re.Fragment=d1;re.Profiler=h1;re.PureComponent=vu;re.StrictMode=f1;re.Suspense=p1;re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Le;re.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Le.H.useMemoCache(e)}};re.cache=function(e){return function(){return e.apply(null,arguments)}};re.cacheSignal=function(){return null};re.cloneElement=function(e,t,l){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=cm({},e.props),a=e.key;if(t!=null)for(r in t.key!==void 0&&(a=""+t.key),t)!fm.call(t,r)||r==="key"||r==="__self"||r==="__source"||r==="ref"&&t.ref===void 0||(n[r]=t[r]);var r=arguments.length-2;if(r===1)n.children=l;else if(1<r){for(var i=Array(r),o=0;o<r;o++)i[o]=arguments[o+2];n.children=i}return xu(e.type,a,n)};re.createContext=function(e){return e={$$typeof:g1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:m1,_context:e},e};re.createElement=function(e,t,l){var n,a={},r=null;if(t!=null)for(n in t.key!==void 0&&(r=""+t.key),t)fm.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var i=arguments.length-2;if(i===1)a.children=l;else if(1<i){for(var o=Array(i),c=0;c<i;c++)o[c]=arguments[c+2];a.children=o}if(e&&e.defaultProps)for(n in i=e.defaultProps,i)a[n]===void 0&&(a[n]=i[n]);return xu(e,r,a)};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:_1,render:e}};re.isValidElement=Su;re.lazy=function(e){return{$$typeof:om,_payload:{_status:-1,_result:e},_init:C1}};re.memo=function(e,t){return{$$typeof:y1,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Le.T,l={};Le.T=l;try{var n=e(),a=Le.S;a!==null&&a(l,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(oc,Od)}catch(r){Od(r)}finally{t!==null&&l.types!==null&&(t.types=l.types),Le.T=t}};re.unstable_useCacheRefresh=function(){return Le.H.useCacheRefresh()};re.use=function(e){return Le.H.use(e)};re.useActionState=function(e,t,l){return Le.H.useActionState(e,t,l)};re.useCallback=function(e,t){return Le.H.useCallback(e,t)};re.useContext=function(e){return Le.H.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e,t){return Le.H.useDeferredValue(e,t)};re.useEffect=function(e,t){return Le.H.useEffect(e,t)};re.useEffectEvent=function(e){return Le.H.useEffectEvent(e)};re.useId=function(){return Le.H.useId()};re.useImperativeHandle=function(e,t,l){return Le.H.useImperativeHandle(e,t,l)};re.useInsertionEffect=function(e,t){return Le.H.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return Le.H.useLayoutEffect(e,t)};re.useMemo=function(e,t){return Le.H.useMemo(e,t)};re.useOptimistic=function(e,t){return Le.H.useOptimistic(e,t)};re.useReducer=function(e,t,l){return Le.H.useReducer(e,t,l)};re.useRef=function(e){return Le.H.useRef(e)};re.useState=function(e){return Le.H.useState(e)};re.useSyncExternalStore=function(e,t,l){return Le.H.useSyncExternalStore(e,t,l)};re.useTransition=function(){return Le.H.useTransition()};re.version="19.2.6";im.exports=re;var S=im.exports;const et=o1(S);var hm={exports:{}},Uo={},mm={exports:{}},gm={};/**
 * @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.
 */(function(e){function t(R,q){var Y=R.length;R.push(q);e:for(;0<Y;){var W=Y-1>>>1,ne=R[W];if(0<a(ne,q))R[W]=q,R[Y]=ne,Y=W;else break e}}function l(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var q=R[0],Y=R.pop();if(Y!==q){R[0]=Y;e:for(var W=0,ne=R.length,he=ne>>>1;W<he;){var Z=2*(W+1)-1,A=R[Z],H=Z+1,K=R[H];if(0>a(A,Y))H<ne&&0>a(K,A)?(R[W]=K,R[H]=Y,W=H):(R[W]=A,R[Z]=Y,W=Z);else if(H<ne&&0>a(K,Y))R[W]=K,R[H]=Y,W=H;else break e}}return q}function a(R,q){var Y=R.sortIndex-q.sortIndex;return Y!==0?Y:R.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var c=[],u=[],d=1,h=null,f=3,_=!1,y=!1,p=!1,w=!1,m=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function v(R){for(var q=l(u);q!==null;){if(q.callback===null)n(u);else if(q.startTime<=R)n(u),q.sortIndex=q.expirationTime,t(c,q);else break;q=l(u)}}function C(R){if(p=!1,v(R),!y)if(l(c)!==null)y=!0,k||(k=!0,z());else{var q=l(u);q!==null&&G(C,q.startTime-R)}}var k=!1,E=-1,D=5,M=-1;function x(){return w?!0:!(e.unstable_now()-M<D)}function O(){if(w=!1,k){var R=e.unstable_now();M=R;var q=!0;try{e:{y=!1,p&&(p=!1,g(E),E=-1),_=!0;var Y=f;try{t:{for(v(R),h=l(c);h!==null&&!(h.expirationTime>R&&x());){var W=h.callback;if(typeof W=="function"){h.callback=null,f=h.priorityLevel;var ne=W(h.expirationTime<=R);if(R=e.unstable_now(),typeof ne=="function"){h.callback=ne,v(R),q=!0;break t}h===l(c)&&n(c),v(R)}else n(c);h=l(c)}if(h!==null)q=!0;else{var he=l(u);he!==null&&G(C,he.startTime-R),q=!1}}break e}finally{h=null,f=Y,_=!1}q=void 0}}finally{q?z():k=!1}}}var z;if(typeof b=="function")z=function(){b(O)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,V=U.port2;U.port1.onmessage=O,z=function(){V.postMessage(null)}}else z=function(){m(O,0)};function G(R,q){E=m(function(){R(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(R){switch(f){case 1:case 2:case 3:var q=3;break;default:q=f}var Y=f;f=q;try{return R()}finally{f=Y}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(R,q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var Y=f;f=R;try{return q()}finally{f=Y}},e.unstable_scheduleCallback=function(R,q,Y){var W=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?W+Y:W):Y=W,R){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=Y+ne,R={id:d++,callback:q,priorityLevel:R,startTime:Y,expirationTime:ne,sortIndex:-1},Y>W?(R.sortIndex=Y,t(u,R),l(c)===null&&R===l(u)&&(p?(g(E),E=-1):p=!0,G(C,Y-W))):(R.sortIndex=ne,t(c,R),y||_||(y=!0,k||(k=!0,z()))),R},e.unstable_shouldYield=x,e.unstable_wrapCallback=function(R){var q=f;return function(){var Y=f;f=q;try{return R.apply(this,arguments)}finally{f=Y}}}})(gm);mm.exports=gm;var E1=mm.exports,_m={exports:{}},ht={};/**
 * @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 N1=S;function pm(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 $l(){}var ft={d:{f:$l,r:function(){throw Error(pm(522))},D:$l,C:$l,L:$l,m:$l,X:$l,S:$l,M:$l},p:0,findDOMNode:null},k1=Symbol.for("react.portal");function A1(e,t,l){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k1,key:n==null?null:""+n,children:e,containerInfo:t,implementation:l}}var hr=N1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ho(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ft;ht.createPortal=function(e,t){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(pm(299));return A1(e,t,null,l)};ht.flushSync=function(e){var t=hr.T,l=ft.p;try{if(hr.T=null,ft.p=2,e)return e()}finally{hr.T=t,ft.p=l,ft.d.f()}};ht.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,ft.d.C(e,t))};ht.prefetchDNS=function(e){typeof e=="string"&&ft.d.D(e)};ht.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var l=t.as,n=Ho(l,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;l==="style"?ft.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:r}):l==="script"&&ft.d.X(e,{crossOrigin:n,integrity:a,fetchPriority:r,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};ht.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var l=Ho(t.as,t.crossOrigin);ft.d.M(e,{crossOrigin:l,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&ft.d.M(e)};ht.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var l=t.as,n=Ho(l,t.crossOrigin);ft.d.L(e,l,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};ht.preloadModule=function(e,t){if(typeof e=="string")if(t){var l=Ho(t.as,t.crossOrigin);ft.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:l,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else ft.d.m(e)};ht.requestFormReset=function(e){ft.d.r(e)};ht.unstable_batchedUpdates=function(e,t){return e(t)};ht.useFormState=function(e,t,l){return hr.H.useFormState(e,t,l)};ht.useFormStatus=function(){return hr.H.useHostTransitionStatus()};ht.version="19.2.6";function ym(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ym)}catch(e){console.error(e)}}ym(),_m.exports=ht;var ul=_m.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 Je=E1,bm=S,T1=ul;function B(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 vm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wr(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function wm(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 xm(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 Bd(e){if(Wr(e)!==e)throw Error(B(188))}function D1(e){var t=e.alternate;if(!t){if(t=Wr(e),t===null)throw Error(B(188));return t!==e?null:e}for(var l=e,n=t;;){var a=l.return;if(a===null)break;var r=a.alternate;if(r===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===r.child){for(r=a.child;r;){if(r===l)return Bd(a),e;if(r===n)return Bd(a),t;r=r.sibling}throw Error(B(188))}if(l.return!==n.return)l=a,n=r;else{for(var i=!1,o=a.child;o;){if(o===l){i=!0,l=a,n=r;break}if(o===n){i=!0,n=a,l=r;break}o=o.sibling}if(!i){for(o=r.child;o;){if(o===l){i=!0,l=r,n=a;break}if(o===n){i=!0,n=r,l=a;break}o=o.sibling}if(!i)throw Error(B(189))}}if(l.alternate!==n)throw Error(B(190))}if(l.tag!==3)throw Error(B(188));return l.stateNode.current===l?e:t}function Sm(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Sm(e),t!==null)return t;e=e.sibling}return null}var Oe=Object.assign,R1=Symbol.for("react.element"),di=Symbol.for("react.transitional.element"),rr=Symbol.for("react.portal"),Pn=Symbol.for("react.fragment"),Cm=Symbol.for("react.strict_mode"),sc=Symbol.for("react.profiler"),jm=Symbol.for("react.consumer"),Dl=Symbol.for("react.context"),Cu=Symbol.for("react.forward_ref"),cc=Symbol.for("react.suspense"),uc=Symbol.for("react.suspense_list"),ju=Symbol.for("react.memo"),Yl=Symbol.for("react.lazy"),dc=Symbol.for("react.activity"),z1=Symbol.for("react.memo_cache_sentinel"),Ud=Symbol.iterator;function Xa(e){return e===null||typeof e!="object"?null:(e=Ud&&e[Ud]||e["@@iterator"],typeof e=="function"?e:null)}var M1=Symbol.for("react.client.reference");function fc(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===M1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Pn:return"Fragment";case sc:return"Profiler";case Cm:return"StrictMode";case cc:return"Suspense";case uc:return"SuspenseList";case dc:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case rr:return"Portal";case Dl:return e.displayName||"Context";case jm:return(e._context.displayName||"Context")+".Consumer";case Cu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:fc(e.type)||"Memo";case Yl:t=e._payload,e=e._init;try{return fc(e(t))}catch{}}return null}var ir=Array.isArray,te=bm.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,we=T1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Nn={pending:!1,data:null,method:null,action:null},hc=[],ea=-1;function bl(e){return{current:e}}function tt(e){0>ea||(e.current=hc[ea],hc[ea]=null,ea--)}function Re(e,t){ea++,hc[ea]=e.current,e.current=t}var yl=bl(null),Rr=bl(null),nn=bl(null),eo=bl(null);function to(e,t){switch(Re(nn,t),Re(Rr,e),Re(yl,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yf(t),e=Y_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}tt(yl),Re(yl,e)}function Ca(){tt(yl),tt(Rr),tt(nn)}function mc(e){e.memoizedState!==null&&Re(eo,e);var t=yl.current,l=Y_(t,e.type);t!==l&&(Re(Rr,e),Re(yl,l))}function lo(e){Rr.current===e&&(tt(yl),tt(Rr)),eo.current===e&&(tt(eo),$r._currentValue=Nn)}var cs,Hd;function vn(e){if(cs===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);cs=t&&t[1]||"",Hd=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+cs+e+Hd}var us=!1;function ds(e,t){if(!e||us)return"";us=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={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(_){var f=_}Reflect.construct(e,[],h)}else{try{h.call()}catch(_){f=_}e.call(h.prototype)}}else{try{throw Error()}catch(_){f=_}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(_){if(_&&f&&typeof _.stack=="string")return[_.stack,f.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=n.DetermineComponentFrameRoot(),i=r[0],o=r[1];if(i&&o){var c=i.split(`
`),u=o.split(`
`);for(a=n=0;n<c.length&&!c[n].includes("DetermineComponentFrameRoot");)n++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(n===c.length||a===u.length)for(n=c.length-1,a=u.length-1;1<=n&&0<=a&&c[n]!==u[a];)a--;for(;1<=n&&0<=a;n--,a--)if(c[n]!==u[a]){if(n!==1||a!==1)do if(n--,a--,0>a||c[n]!==u[a]){var d=`
`+c[n].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=n&&0<=a);break}}}finally{us=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?vn(l):""}function L1(e,t){switch(e.tag){case 26:case 27:case 5:return vn(e.type);case 16:return vn("Lazy");case 13:return e.child!==t&&t!==null?vn("Suspense Fallback"):vn("Suspense");case 19:return vn("SuspenseList");case 0:case 15:return ds(e.type,!1);case 11:return ds(e.type.render,!1);case 1:return ds(e.type,!0);case 31:return vn("Activity");default:return""}}function Fd(e){try{var t="",l=null;do t+=L1(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}var gc=Object.prototype.hasOwnProperty,Eu=Je.unstable_scheduleCallback,fs=Je.unstable_cancelCallback,O1=Je.unstable_shouldYield,B1=Je.unstable_requestPaint,Ut=Je.unstable_now,U1=Je.unstable_getCurrentPriorityLevel,Em=Je.unstable_ImmediatePriority,Nm=Je.unstable_UserBlockingPriority,no=Je.unstable_NormalPriority,H1=Je.unstable_LowPriority,km=Je.unstable_IdlePriority,F1=Je.log,V1=Je.unstable_setDisableYieldValue,Jr=null,Ht=null;function Jl(e){if(typeof F1=="function"&&V1(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(Jr,e)}catch{}}var Ft=Math.clz32?Math.clz32:G1,q1=Math.log,$1=Math.LN2;function G1(e){return e>>>=0,e===0?32:31-(q1(e)/$1|0)|0}var fi=256,hi=262144,mi=4194304;function wn(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 Fo(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,r=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=n&134217727;return o!==0?(n=o&~r,n!==0?a=wn(n):(i&=o,i!==0?a=wn(i):l||(l=o&~e,l!==0&&(a=wn(l))))):(o=n&~r,o!==0?a=wn(o):i!==0?a=wn(i):l||(l=n&~e,l!==0&&(a=wn(l)))),a===0?0:t!==0&&t!==a&&!(t&r)&&(r=a&-a,l=t&-t,r>=l||r===32&&(l&4194048)!==0)?t:a}function Ir(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Y1(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 Am(){var e=mi;return mi<<=1,!(mi&62914560)&&(mi=4194304),e}function hs(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Pr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function K1(e,t,l,n,a,r){var i=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var o=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(l=i&~l;0<l;){var d=31-Ft(l),h=1<<d;o[d]=0,c[d]=-1;var f=u[d];if(f!==null)for(u[d]=null,d=0;d<f.length;d++){var _=f[d];_!==null&&(_.lane&=-536870913)}l&=~h}n!==0&&Tm(e,n,0),r!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=r&~(i&~t))}function Tm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ft(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Dm(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Ft(l),a=1<<n;a&t|e[n]&t&&(e[n]|=t),l&=~a}}function Rm(e,t){var l=t&-t;return l=l&42?1:Nu(l),l&(e.suspendedLanes|t)?0:l}function Nu(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 ku(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function zm(){var e=we.p;return e!==0?e:(e=window.event,e===void 0?32:lp(e.type))}function Vd(e,t){var l=we.p;try{return we.p=e,t()}finally{we.p=l}}var pn=Math.random().toString(36).slice(2),nt="__reactFiber$"+pn,St="__reactProps$"+pn,Ha="__reactContainer$"+pn,_c="__reactEvents$"+pn,Z1="__reactListeners$"+pn,X1="__reactHandles$"+pn,qd="__reactResources$"+pn,ei="__reactMarker$"+pn;function Au(e){delete e[nt],delete e[St],delete e[_c],delete e[Z1],delete e[X1]}function ta(e){var t=e[nt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Ha]||l[nt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Wf(e);e!==null;){if(l=e[nt])return l;e=Wf(e)}return t}e=l,l=e.parentNode}return null}function Fa(e){if(e=e[nt]||e[Ha]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function or(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(B(33))}function fa(e){var t=e[qd];return t||(t=e[qd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Pe(e){e[ei]=!0}var Mm=new Set,Lm={};function Fn(e,t){ja(e,t),ja(e+"Capture",t)}function ja(e,t){for(Lm[e]=t,e=0;e<t.length;e++)Mm.add(t[e])}var Q1=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]*$"),$d={},Gd={};function W1(e){return gc.call(Gd,e)?!0:gc.call($d,e)?!1:Q1.test(e)?Gd[e]=!0:($d[e]=!0,!1)}function Mi(e,t,l){if(W1(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function gi(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 wl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Om(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J1(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(i){l=""+i,r.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(i){l=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pc(e){if(!e._valueTracker){var t=Om(e)?"checked":"value";e._valueTracker=J1(e,t,""+e[t])}}function Bm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Om(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function ao(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 I1=/[\n"\\]/g;function Qt(e){return e.replace(I1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yc(e,t,l,n,a,r,i,o){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?bc(e,i,Kt(t)):l!=null?bc(e,i,Kt(l)):n!=null&&e.removeAttribute("value"),a==null&&r!=null&&(e.defaultChecked=!!r),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Kt(o):e.removeAttribute("name")}function Um(e,t,l,n,a,r,i,o){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||l!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){pc(e);return}l=l!=null?""+Kt(l):"",t=t!=null?""+Kt(t):l,o||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=o?e.checked:!!n,e.defaultChecked=!!n,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),pc(e)}function bc(e,t,l){t==="number"&&ao(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ha(e,t,l,n){if(e=e.options,t){t={};for(var a=0;a<l.length;a++)t["$"+l[a]]=!0;for(l=0;l<e.length;l++)a=t.hasOwnProperty("$"+e[l].value),e[l].selected!==a&&(e[l].selected=a),a&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Kt(l),t=null,a=0;a<e.length;a++){if(e[a].value===l){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Hm(e,t,l){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Kt(l):""}function Fm(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(B(92));if(ir(n)){if(1<n.length)throw Error(B(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Kt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),pc(e)}function Ea(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var P1=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 Yd(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||P1.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Vm(e,t,l){if(t!=null&&typeof t!="object")throw Error(B(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var a in t)n=t[a],t.hasOwnProperty(a)&&l[a]!==n&&Yd(e,a,n)}else for(var r in t)t.hasOwnProperty(r)&&Yd(e,r,t[r])}function Tu(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 e0=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"]]),t0=/^[\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 Li(e){return t0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Rl(){}var vc=null;function Du(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var la=null,ma=null;function Kd(e){var t=Fa(e);if(t&&(e=t.stateNode)){var l=e[St]||null;e:switch(e=t.stateNode,t.type){case"input":if(yc(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="'+Qt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var a=n[St]||null;if(!a)throw Error(B(90));yc(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&Bm(n)}break e;case"textarea":Hm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ha(e,!!l.multiple,t,!1)}}}var ms=!1;function qm(e,t,l){if(ms)return e(t,l);ms=!0;try{var n=e(t);return n}finally{if(ms=!1,(la!==null||ma!==null)&&(Io(),la&&(t=la,e=ma,ma=la=null,Kd(t),e)))for(t=0;t<e.length;t++)Kd(e[t])}}function zr(e,t){var l=e.stateNode;if(l===null)return null;var n=l[St]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(B(231,t,typeof l));return l}var Bl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wc=!1;if(Bl)try{var Qa={};Object.defineProperty(Qa,"passive",{get:function(){wc=!0}}),window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{wc=!1}var Il=null,Ru=null,Oi=null;function $m(){if(Oi)return Oi;var e,t=Ru,l=t.length,n,a="value"in Il?Il.value:Il.textContent,r=a.length;for(e=0;e<l&&t[e]===a[e];e++);var i=l-e;for(n=1;n<=i&&t[l-n]===a[r-n];n++);return Oi=a.slice(e,1<n?1-n:void 0)}function Bi(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 _i(){return!0}function Zd(){return!1}function Nt(e){function t(l,n,a,r,i){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=r,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(l=e[o],this[o]=l?l(r):r[o]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?_i:Zd,this.isPropagationStopped=Zd,this}return Oe(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=_i)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=_i)},persist:function(){},isPersistent:_i}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vo=Nt(Vn),ti=Oe({},Vn,{view:0,detail:0}),l0=Nt(ti),gs,_s,Wa,qo=Oe({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zu,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!==Wa&&(Wa&&e.type==="mousemove"?(gs=e.screenX-Wa.screenX,_s=e.screenY-Wa.screenY):_s=gs=0,Wa=e),gs)},movementY:function(e){return"movementY"in e?e.movementY:_s}}),Xd=Nt(qo),n0=Oe({},qo,{dataTransfer:0}),a0=Nt(n0),r0=Oe({},ti,{relatedTarget:0}),ps=Nt(r0),i0=Oe({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0}),o0=Nt(i0),s0=Oe({},Vn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),c0=Nt(s0),u0=Oe({},Vn,{data:0}),Qd=Nt(u0),d0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f0={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"},h0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=h0[e])?!!t[e]:!1}function zu(){return m0}var g0=Oe({},ti,{key:function(e){if(e.key){var t=d0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zu,charCode:function(e){return e.type==="keypress"?Bi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_0=Nt(g0),p0=Oe({},qo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wd=Nt(p0),y0=Oe({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zu}),b0=Nt(y0),v0=Oe({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0}),w0=Nt(v0),x0=Oe({},qo,{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}),S0=Nt(x0),C0=Oe({},Vn,{newState:0,oldState:0}),j0=Nt(C0),E0=[9,13,27,32],Mu=Bl&&"CompositionEvent"in window,mr=null;Bl&&"documentMode"in document&&(mr=document.documentMode);var N0=Bl&&"TextEvent"in window&&!mr,Gm=Bl&&(!Mu||mr&&8<mr&&11>=mr),Jd=" ",Id=!1;function Ym(e,t){switch(e){case"keyup":return E0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Km(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function k0(e,t){switch(e){case"compositionend":return Km(t);case"keypress":return t.which!==32?null:(Id=!0,Jd);case"textInput":return e=t.data,e===Jd&&Id?null:e;default:return null}}function A0(e,t){if(na)return e==="compositionend"||!Mu&&Ym(e,t)?(e=$m(),Oi=Ru=Il=null,na=!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 Gm&&t.locale!=="ko"?null:t.data;default:return null}}var T0={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 Pd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!T0[e.type]:t==="textarea"}function Zm(e,t,l,n){la?ma?ma.push(n):ma=[n]:la=n,t=So(t,"onChange"),0<t.length&&(l=new Vo("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var gr=null,Mr=null;function D0(e){q_(e,0)}function $o(e){var t=or(e);if(Bm(t))return e}function ef(e,t){if(e==="change")return t}var Xm=!1;if(Bl){var ys;if(Bl){var bs="oninput"in document;if(!bs){var tf=document.createElement("div");tf.setAttribute("oninput","return;"),bs=typeof tf.oninput=="function"}ys=bs}else ys=!1;Xm=ys&&(!document.documentMode||9<document.documentMode)}function lf(){gr&&(gr.detachEvent("onpropertychange",Qm),Mr=gr=null)}function Qm(e){if(e.propertyName==="value"&&$o(Mr)){var t=[];Zm(t,Mr,e,Du(e)),qm(D0,t)}}function R0(e,t,l){e==="focusin"?(lf(),gr=t,Mr=l,gr.attachEvent("onpropertychange",Qm)):e==="focusout"&&lf()}function z0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $o(Mr)}function M0(e,t){if(e==="click")return $o(t)}function L0(e,t){if(e==="input"||e==="change")return $o(t)}function O0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qt=typeof Object.is=="function"?Object.is:O0;function Lr(e,t){if(qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!gc.call(t,a)||!qt(e[a],t[a]))return!1}return!0}function nf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function af(e,t){var l=nf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=nf(l)}}function Wm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ao(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=ao(e.document)}return t}function Lu(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 B0=Bl&&"documentMode"in document&&11>=document.documentMode,aa=null,xc=null,_r=null,Sc=!1;function rf(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Sc||aa==null||aa!==ao(n)||(n=aa,"selectionStart"in n&&Lu(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),_r&&Lr(_r,n)||(_r=n,n=So(xc,"onSelect"),0<n.length&&(t=new Vo("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=aa)))}function bn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ra={animationend:bn("Animation","AnimationEnd"),animationiteration:bn("Animation","AnimationIteration"),animationstart:bn("Animation","AnimationStart"),transitionrun:bn("Transition","TransitionRun"),transitionstart:bn("Transition","TransitionStart"),transitioncancel:bn("Transition","TransitionCancel"),transitionend:bn("Transition","TransitionEnd")},vs={},Im={};Bl&&(Im=document.createElement("div").style,"AnimationEvent"in window||(delete ra.animationend.animation,delete ra.animationiteration.animation,delete ra.animationstart.animation),"TransitionEvent"in window||delete ra.transitionend.transition);function qn(e){if(vs[e])return vs[e];if(!ra[e])return e;var t=ra[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Im)return vs[e]=t[l];return e}var Pm=qn("animationend"),eg=qn("animationiteration"),tg=qn("animationstart"),U0=qn("transitionrun"),H0=qn("transitionstart"),F0=qn("transitioncancel"),lg=qn("transitionend"),ng=new Map,Cc="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(" ");Cc.push("scrollEnd");function dl(e,t){ng.set(e,t),Fn(t,[e])}var ro=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)},Yt=[],ia=0,Ou=0;function Go(){for(var e=ia,t=Ou=ia=0;t<e;){var l=Yt[t];Yt[t++]=null;var n=Yt[t];Yt[t++]=null;var a=Yt[t];Yt[t++]=null;var r=Yt[t];if(Yt[t++]=null,n!==null&&a!==null){var i=n.pending;i===null?a.next=a:(a.next=i.next,i.next=a),n.pending=a}r!==0&&ag(l,a,r)}}function Yo(e,t,l,n){Yt[ia++]=e,Yt[ia++]=t,Yt[ia++]=l,Yt[ia++]=n,Ou|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Bu(e,t,l,n){return Yo(e,t,l,n),io(e)}function $n(e,t){return Yo(e,null,null,t),io(e)}function ag(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var a=!1,r=e.return;r!==null;)r.childLanes|=l,n=r.alternate,n!==null&&(n.childLanes|=l),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(a=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,a&&t!==null&&(a=31-Ft(l),e=r.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=l|536870912),r):null}function io(e){if(50<jr)throw jr=0,Yc=null,Error(B(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oa={};function V0(e,t,l,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,l,n){return new V0(e,t,l,n)}function Uu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ml(e,t){var l=e.alternate;return l===null?(l=Ot(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 rg(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 Ui(e,t,l,n,a,r){var i=0;if(n=e,typeof e=="function")Uu(e)&&(i=1);else if(typeof e=="string")i=Ky(e,l,yl.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case dc:return e=Ot(31,l,t,a),e.elementType=dc,e.lanes=r,e;case Pn:return kn(l.children,a,r,t);case Cm:i=8,a|=24;break;case sc:return e=Ot(12,l,t,a|2),e.elementType=sc,e.lanes=r,e;case cc:return e=Ot(13,l,t,a),e.elementType=cc,e.lanes=r,e;case uc:return e=Ot(19,l,t,a),e.elementType=uc,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Dl:i=10;break e;case jm:i=9;break e;case Cu:i=11;break e;case ju:i=14;break e;case Yl:i=16,n=null;break e}i=29,l=Error(B(130,e===null?"null":typeof e,"")),n=null}return t=Ot(i,l,t,a),t.elementType=e,t.type=n,t.lanes=r,t}function kn(e,t,l,n){return e=Ot(7,e,n,t),e.lanes=l,e}function ws(e,t,l){return e=Ot(6,e,null,t),e.lanes=l,e}function ig(e){var t=Ot(18,null,null,0);return t.stateNode=e,t}function xs(e,t,l){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var of=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var l=of.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Fd(t)},of.set(e,t),t)}return{value:e,source:t,stack:Fd(t)}}var sa=[],ca=0,oo=null,Or=0,Zt=[],Xt=0,hn=null,ml=1,gl="";function kl(e,t){sa[ca++]=Or,sa[ca++]=oo,oo=e,Or=t}function og(e,t,l){Zt[Xt++]=ml,Zt[Xt++]=gl,Zt[Xt++]=hn,hn=e;var n=ml;e=gl;var a=32-Ft(n)-1;n&=~(1<<a),l+=1;var r=32-Ft(t)+a;if(30<r){var i=a-a%5;r=(n&(1<<i)-1).toString(32),n>>=i,a-=i,ml=1<<32-Ft(t)+a|l<<a|n,gl=r+e}else ml=1<<r|l<<a|n,gl=e}function Hu(e){e.return!==null&&(kl(e,1),og(e,1,0))}function Fu(e){for(;e===oo;)oo=sa[--ca],sa[ca]=null,Or=sa[--ca],sa[ca]=null;for(;e===hn;)hn=Zt[--Xt],Zt[Xt]=null,gl=Zt[--Xt],Zt[Xt]=null,ml=Zt[--Xt],Zt[Xt]=null}function sg(e,t){Zt[Xt++]=ml,Zt[Xt++]=gl,Zt[Xt++]=hn,ml=t.id,gl=t.overflow,hn=e}var at=null,Me=null,me=!1,an=null,Jt=!1,jc=Error(B(519));function mn(e){var t=Error(B(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Br(Wt(t,e)),jc}function sf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[nt]=e,t[St]=n,l){case"dialog":ue("cancel",t),ue("close",t);break;case"iframe":case"object":case"embed":ue("load",t);break;case"video":case"audio":for(l=0;l<Vr.length;l++)ue(Vr[l],t);break;case"source":ue("error",t);break;case"img":case"image":case"link":ue("error",t),ue("load",t);break;case"details":ue("toggle",t);break;case"input":ue("invalid",t),Um(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":ue("invalid",t);break;case"textarea":ue("invalid",t),Fm(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||G_(t.textContent,l)?(n.popover!=null&&(ue("beforetoggle",t),ue("toggle",t)),n.onScroll!=null&&ue("scroll",t),n.onScrollEnd!=null&&ue("scrollend",t),n.onClick!=null&&(t.onclick=Rl),t=!0):t=!1,t||mn(e,!0)}function cf(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:at=at.return}}function Zn(e){if(e!==at)return!1;if(!me)return cf(e),me=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Wc(e.type,e.memoizedProps)),l=!l),l&&Me&&mn(e),cf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));Me=Qf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));Me=Qf(e)}else t===27?(t=Me,yn(e.type)?(e=eu,eu=null,Me=e):Me=t):Me=at?el(e.stateNode.nextSibling):null;return!0}function Rn(){Me=at=null,me=!1}function Ss(){var e=an;return e!==null&&(wt===null?wt=e:wt.push.apply(wt,e),an=null),e}function Br(e){an===null?an=[e]:an.push(e)}var Ec=bl(null),Gn=null,zl=null;function Zl(e,t,l){Re(Ec,t._currentValue),t._currentValue=l}function Ll(e){e._currentValue=Ec.current,tt(Ec)}function Nc(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function kc(e,t,l,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var r=a.dependencies;if(r!==null){var i=a.child;r=r.firstContext;e:for(;r!==null;){var o=r;r=a;for(var c=0;c<t.length;c++)if(o.context===t[c]){r.lanes|=l,o=r.alternate,o!==null&&(o.lanes|=l),Nc(r.return,l,e),n||(i=null);break e}r=o.next}}else if(a.tag===18){if(i=a.return,i===null)throw Error(B(341));i.lanes|=l,r=i.alternate,r!==null&&(r.lanes|=l),Nc(i,l,e),i=null}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===e){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}}function Va(e,t,l,n){e=null;for(var a=t,r=!1;a!==null;){if(!r){if(a.flags&524288)r=!0;else if(a.flags&262144)break}if(a.tag===10){var i=a.alternate;if(i===null)throw Error(B(387));if(i=i.memoizedProps,i!==null){var o=a.type;qt(a.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(a===eo.current){if(i=a.alternate,i===null)throw Error(B(387));i.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push($r):e=[$r])}a=a.return}e!==null&&kc(t,e,l,n),t.flags|=262144}function so(e){for(e=e.firstContext;e!==null;){if(!qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zn(e){Gn=e,zl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function it(e){return cg(Gn,e)}function pi(e,t){return Gn===null&&zn(e),cg(e,t)}function cg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},zl===null){if(e===null)throw Error(B(308));zl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zl=zl.next=t;return l}var q0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},$0=Je.unstable_scheduleCallback,G0=Je.unstable_NormalPriority,Ze={$$typeof:Dl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vu(){return{controller:new q0,data:new Map,refCount:0}}function li(e){e.refCount--,e.refCount===0&&$0(G0,function(){e.controller.abort()})}var pr=null,Ac=0,Na=0,ga=null;function Y0(e,t){if(pr===null){var l=pr=[];Ac=0,Na=fd(),ga={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Ac++,t.then(uf,uf),t}function uf(){if(--Ac===0&&pr!==null){ga!==null&&(ga.status="fulfilled");var e=pr;pr=null,Na=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function K0(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<l.length;a++)(0,l[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var df=te.S;te.S=function(e,t){S_=Ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Y0(e,t),df!==null&&df(e,t)};var An=bl(null);function qu(){var e=An.current;return e!==null?e:Te.pooledCache}function Hi(e,t){t===null?Re(An,An.current):Re(An,t.pool)}function ug(){var e=qu();return e===null?null:{parent:Ze._currentValue,pool:e}}var qa=Error(B(460)),$u=Error(B(474)),Ko=Error(B(542)),co={then:function(){}};function ff(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Rl,Rl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mf(e),e;default:if(typeof t.status=="string")t.then(Rl,Rl);else{if(e=Te,e!==null&&100<e.shellSuspendCounter)throw Error(B(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mf(e),e}throw Tn=t,qa}}function xn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Tn=l,qa):l}}var Tn=null;function hf(){if(Tn===null)throw Error(B(459));var e=Tn;return Tn=null,e}function mf(e){if(e===qa||e===Ko)throw Error(B(483))}var _a=null,Ur=0;function yi(e){var t=Ur;return Ur+=1,_a===null&&(_a=[]),dg(_a,e,t)}function Ja(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function bi(e,t){throw t.$$typeof===R1?Error(B(525)):(e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fg(e){function t(m,g){if(e){var b=m.deletions;b===null?(m.deletions=[g],m.flags|=16):b.push(g)}}function l(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function n(m){for(var g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function a(m,g){return m=Ml(m,g),m.index=0,m.sibling=null,m}function r(m,g,b){return m.index=b,e?(b=m.alternate,b!==null?(b=b.index,b<g?(m.flags|=67108866,g):b):(m.flags|=67108866,g)):(m.flags|=1048576,g)}function i(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function o(m,g,b,v){return g===null||g.tag!==6?(g=ws(b,m.mode,v),g.return=m,g):(g=a(g,b),g.return=m,g)}function c(m,g,b,v){var C=b.type;return C===Pn?d(m,g,b.props.children,v,b.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Yl&&xn(C)===g.type)?(g=a(g,b.props),Ja(g,b),g.return=m,g):(g=Ui(b.type,b.key,b.props,null,m.mode,v),Ja(g,b),g.return=m,g)}function u(m,g,b,v){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=xs(b,m.mode,v),g.return=m,g):(g=a(g,b.children||[]),g.return=m,g)}function d(m,g,b,v,C){return g===null||g.tag!==7?(g=kn(b,m.mode,v,C),g.return=m,g):(g=a(g,b),g.return=m,g)}function h(m,g,b){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=ws(""+g,m.mode,b),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case di:return b=Ui(g.type,g.key,g.props,null,m.mode,b),Ja(b,g),b.return=m,b;case rr:return g=xs(g,m.mode,b),g.return=m,g;case Yl:return g=xn(g),h(m,g,b)}if(ir(g)||Xa(g))return g=kn(g,m.mode,b,null),g.return=m,g;if(typeof g.then=="function")return h(m,yi(g),b);if(g.$$typeof===Dl)return h(m,pi(m,g),b);bi(m,g)}return null}function f(m,g,b,v){var C=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return C!==null?null:o(m,g,""+b,v);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case di:return b.key===C?c(m,g,b,v):null;case rr:return b.key===C?u(m,g,b,v):null;case Yl:return b=xn(b),f(m,g,b,v)}if(ir(b)||Xa(b))return C!==null?null:d(m,g,b,v,null);if(typeof b.then=="function")return f(m,g,yi(b),v);if(b.$$typeof===Dl)return f(m,g,pi(m,b),v);bi(m,b)}return null}function _(m,g,b,v,C){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return m=m.get(b)||null,o(g,m,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case di:return m=m.get(v.key===null?b:v.key)||null,c(g,m,v,C);case rr:return m=m.get(v.key===null?b:v.key)||null,u(g,m,v,C);case Yl:return v=xn(v),_(m,g,b,v,C)}if(ir(v)||Xa(v))return m=m.get(b)||null,d(g,m,v,C,null);if(typeof v.then=="function")return _(m,g,b,yi(v),C);if(v.$$typeof===Dl)return _(m,g,b,pi(g,v),C);bi(g,v)}return null}function y(m,g,b,v){for(var C=null,k=null,E=g,D=g=0,M=null;E!==null&&D<b.length;D++){E.index>D?(M=E,E=null):M=E.sibling;var x=f(m,E,b[D],v);if(x===null){E===null&&(E=M);break}e&&E&&x.alternate===null&&t(m,E),g=r(x,g,D),k===null?C=x:k.sibling=x,k=x,E=M}if(D===b.length)return l(m,E),me&&kl(m,D),C;if(E===null){for(;D<b.length;D++)E=h(m,b[D],v),E!==null&&(g=r(E,g,D),k===null?C=E:k.sibling=E,k=E);return me&&kl(m,D),C}for(E=n(E);D<b.length;D++)M=_(E,m,D,b[D],v),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?D:M.key),g=r(M,g,D),k===null?C=M:k.sibling=M,k=M);return e&&E.forEach(function(O){return t(m,O)}),me&&kl(m,D),C}function p(m,g,b,v){if(b==null)throw Error(B(151));for(var C=null,k=null,E=g,D=g=0,M=null,x=b.next();E!==null&&!x.done;D++,x=b.next()){E.index>D?(M=E,E=null):M=E.sibling;var O=f(m,E,x.value,v);if(O===null){E===null&&(E=M);break}e&&E&&O.alternate===null&&t(m,E),g=r(O,g,D),k===null?C=O:k.sibling=O,k=O,E=M}if(x.done)return l(m,E),me&&kl(m,D),C;if(E===null){for(;!x.done;D++,x=b.next())x=h(m,x.value,v),x!==null&&(g=r(x,g,D),k===null?C=x:k.sibling=x,k=x);return me&&kl(m,D),C}for(E=n(E);!x.done;D++,x=b.next())x=_(E,m,D,x.value,v),x!==null&&(e&&x.alternate!==null&&E.delete(x.key===null?D:x.key),g=r(x,g,D),k===null?C=x:k.sibling=x,k=x);return e&&E.forEach(function(z){return t(m,z)}),me&&kl(m,D),C}function w(m,g,b,v){if(typeof b=="object"&&b!==null&&b.type===Pn&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case di:e:{for(var C=b.key;g!==null;){if(g.key===C){if(C=b.type,C===Pn){if(g.tag===7){l(m,g.sibling),v=a(g,b.props.children),v.return=m,m=v;break e}}else if(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Yl&&xn(C)===g.type){l(m,g.sibling),v=a(g,b.props),Ja(v,b),v.return=m,m=v;break e}l(m,g);break}else t(m,g);g=g.sibling}b.type===Pn?(v=kn(b.props.children,m.mode,v,b.key),v.return=m,m=v):(v=Ui(b.type,b.key,b.props,null,m.mode,v),Ja(v,b),v.return=m,m=v)}return i(m);case rr:e:{for(C=b.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){l(m,g.sibling),v=a(g,b.children||[]),v.return=m,m=v;break e}else{l(m,g);break}else t(m,g);g=g.sibling}v=xs(b,m.mode,v),v.return=m,m=v}return i(m);case Yl:return b=xn(b),w(m,g,b,v)}if(ir(b))return y(m,g,b,v);if(Xa(b)){if(C=Xa(b),typeof C!="function")throw Error(B(150));return b=C.call(b),p(m,g,b,v)}if(typeof b.then=="function")return w(m,g,yi(b),v);if(b.$$typeof===Dl)return w(m,g,pi(m,b),v);bi(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,g!==null&&g.tag===6?(l(m,g.sibling),v=a(g,b),v.return=m,m=v):(l(m,g),v=ws(b,m.mode,v),v.return=m,m=v),i(m)):l(m,g)}return function(m,g,b,v){try{Ur=0;var C=w(m,g,b,v);return _a=null,C}catch(E){if(E===qa||E===Ko)throw E;var k=Ot(29,E,null,m.mode);return k.lanes=v,k.return=m,k}finally{}}}var Mn=fg(!0),hg=fg(!1),Kl=!1;function Gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function rn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function on(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ve&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=io(e),ag(e,null,l),t}return Yo(e,n,t,l),io(e)}function yr(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Dm(e,l)}}function Cs(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,r=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};r===null?a=r=i:r=r.next=i,l=l.next}while(l!==null);r===null?a=r=t:r=r.next=t}else a=r=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:r,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Dc=!1;function br(){if(Dc){var e=ga;if(e!==null)throw e}}function vr(e,t,l,n){Dc=!1;var a=e.updateQueue;Kl=!1;var r=a.firstBaseUpdate,i=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,u=c.next;c.next=null,i===null?r=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==i&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(r!==null){var h=a.baseState;i=0,d=u=c=null,o=r;do{var f=o.lane&-536870913,_=f!==o.lane;if(_?(fe&f)===f:(n&f)===f){f!==0&&f===Na&&(Dc=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var y=e,p=o;f=t;var w=l;switch(p.tag){case 1:if(y=p.payload,typeof y=="function"){h=y.call(w,h,f);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,f=typeof y=="function"?y.call(w,h,f):y,f==null)break e;h=Oe({},h,f);break e;case 2:Kl=!0}}f=o.callback,f!==null&&(e.flags|=64,_&&(e.flags|=8192),_=a.callbacks,_===null?a.callbacks=[f]:_.push(f))}else _={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=_,c=h):d=d.next=_,i|=f;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;_=o,o=_.next,_.next=null,a.lastBaseUpdate=_,a.shared.pending=null}}while(!0);d===null&&(c=h),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,r===null&&(a.shared.lanes=0),_n|=i,e.lanes=i,e.memoizedState=h}}function mg(e,t){if(typeof e!="function")throw Error(B(191,e));e.call(t)}function gg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)mg(l[e],t)}var ka=bl(null),uo=bl(0);function gf(e,t){e=Vl,Re(uo,e),Re(ka,t),Vl=e|t.baseLanes}function Rc(){Re(uo,Vl),Re(ka,ka.current)}function Yu(){Vl=uo.current,tt(ka),tt(uo)}var $t=bl(null),Pt=null;function Xl(e){var t=e.alternate;Re(qe,qe.current&1),Re($t,e),Pt===null&&(t===null||ka.current!==null||t.memoizedState!==null)&&(Pt=e)}function zc(e){Re(qe,qe.current),Re($t,e),Pt===null&&(Pt=e)}function _g(e){e.tag===22?(Re(qe,qe.current),Re($t,e),Pt===null&&(Pt=e)):Ql()}function Ql(){Re(qe,qe.current),Re($t,$t.current)}function Mt(e){tt($t),Pt===e&&(Pt=null),tt(qe)}var qe=bl(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Ic(l)||Pc(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)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 Ul=0,oe=null,ke=null,Ye=null,ho=!1,pa=!1,Ln=!1,mo=0,Hr=0,ya=null,Z0=0;function He(){throw Error(B(321))}function Ku(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!qt(e[l],t[l]))return!1;return!0}function Zu(e,t,l,n,a,r){return Ul=r,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,te.H=e===null||e.memoizedState===null?Zg:ad,Ln=!1,r=l(n,a),Ln=!1,pa&&(r=yg(t,l,n,a)),pg(e),r}function pg(e){te.H=Fr;var t=ke!==null&&ke.next!==null;if(Ul=0,Ye=ke=oe=null,ho=!1,Hr=0,ya=null,t)throw Error(B(300));e===null||Xe||(e=e.dependencies,e!==null&&so(e)&&(Xe=!0))}function yg(e,t,l,n){oe=e;var a=0;do{if(pa&&(ya=null),Hr=0,pa=!1,25<=a)throw Error(B(301));if(a+=1,Ye=ke=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}te.H=Xg,r=t(l,n)}while(pa);return r}function X0(){var e=te.H,t=e.useState()[0];return t=typeof t.then=="function"?ni(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(oe.flags|=1024),t}function Xu(){var e=mo!==0;return mo=0,e}function Qu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Wu(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}Ul=0,Ye=ke=oe=null,pa=!1,Hr=mo=0,ya=null}function dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?oe.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function $e(){if(ke===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=Ye===null?oe.memoizedState:Ye.next;if(t!==null)Ye=t,ke=e;else{if(e===null)throw oe.alternate===null?Error(B(467)):Error(B(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Ye===null?oe.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function Zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ni(e){var t=Hr;return Hr+=1,ya===null&&(ya=[]),e=dg(ya,e,t),t=oe,(Ye===null?t.memoizedState:Ye.next)===null&&(t=t.alternate,te.H=t===null||t.memoizedState===null?Zg:ad),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ni(e);if(e.$$typeof===Dl)return it(e)}throw Error(B(438,String(e)))}function Ju(e){var t=null,l=oe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=oe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Zo(),oe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=z1;return t.index++,l}function Hl(e,t){return typeof t=="function"?t(e):t}function Fi(e){var t=$e();return Iu(t,ke,e)}function Iu(e,t,l){var n=e.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=l;var a=e.baseQueue,r=n.pending;if(r!==null){if(a!==null){var i=a.next;a.next=r.next,r.next=i}t.baseQueue=a=r,n.pending=null}if(r=e.baseState,a===null)e.memoizedState=r;else{t=a.next;var o=i=null,c=null,u=t,d=!1;do{var h=u.lane&-536870913;if(h!==u.lane?(fe&h)===h:(Ul&h)===h){var f=u.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Na&&(d=!0);else if((Ul&f)===f){u=u.next,f===Na&&(d=!0);continue}else h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=h,i=r):c=c.next=h,oe.lanes|=f,_n|=f;h=u.action,Ln&&l(r,h),r=u.hasEagerState?u.eagerState:l(r,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=f,i=r):c=c.next=f,oe.lanes|=h,_n|=h;u=u.next}while(u!==null&&u!==t);if(c===null?i=r:c.next=o,!qt(r,e.memoizedState)&&(Xe=!0,d&&(l=ga,l!==null)))throw l;e.memoizedState=r,e.baseState=i,e.baseQueue=c,n.lastRenderedState=r}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function js(e){var t=$e(),l=t.queue;if(l===null)throw Error(B(311));l.lastRenderedReducer=e;var n=l.dispatch,a=l.pending,r=t.memoizedState;if(a!==null){l.pending=null;var i=a=a.next;do r=e(r,i.action),i=i.next;while(i!==a);qt(r,t.memoizedState)||(Xe=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),l.lastRenderedState=r}return[r,n]}function bg(e,t,l){var n=oe,a=$e(),r=me;if(r){if(l===void 0)throw Error(B(407));l=l()}else l=t();var i=!qt((ke||a).memoizedState,l);if(i&&(a.memoizedState=l,Xe=!0),a=a.queue,Pu(xg.bind(null,n,a,e),[e]),a.getSnapshot!==t||i||Ye!==null&&Ye.memoizedState.tag&1){if(n.flags|=2048,Aa(9,{destroy:void 0},wg.bind(null,n,a,l,t),null),Te===null)throw Error(B(349));r||Ul&127||vg(n,t,l)}return l}function vg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=oe.updateQueue,t===null?(t=Zo(),oe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function wg(e,t,l,n){t.value=l,t.getSnapshot=n,Sg(t)&&Cg(e)}function xg(e,t,l){return l(function(){Sg(t)&&Cg(e)})}function Sg(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!qt(e,l)}catch{return!0}}function Cg(e){var t=$n(e,2);t!==null&&xt(t,e,2)}function Mc(e){var t=dt();if(typeof e=="function"){var l=e;if(e=l(),Ln){Jl(!0);try{l()}finally{Jl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:e},t}function jg(e,t,l,n){return e.baseState=l,Iu(e,ke,typeof n=="function"?n:Hl)}function Q0(e,t,l,n,a){if(Wo(e))throw Error(B(485));if(e=t.action,e!==null){var r={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){r.listeners.push(i)}};te.T!==null?l(!0):r.isTransition=!1,n(r),l=t.pending,l===null?(r.next=t.pending=r,Eg(t,r)):(r.next=l.next,t.pending=l.next=r)}}function Eg(e,t){var l=t.action,n=t.payload,a=e.state;if(t.isTransition){var r=te.T,i={};te.T=i;try{var o=l(a,n),c=te.S;c!==null&&c(i,o),_f(e,t,o)}catch(u){Lc(e,t,u)}finally{r!==null&&i.types!==null&&(r.types=i.types),te.T=r}}else try{r=l(a,n),_f(e,t,r)}catch(u){Lc(e,t,u)}}function _f(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){pf(e,t,n)},function(n){return Lc(e,t,n)}):pf(e,t,l)}function pf(e,t,l){t.status="fulfilled",t.value=l,Ng(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Eg(e,l)))}function Lc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,Ng(t),t=t.next;while(t!==n)}e.action=null}function Ng(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kg(e,t){return t}function yf(e,t){if(me){var l=Te.formState;if(l!==null){e:{var n=oe;if(me){if(Me){t:{for(var a=Me,r=Jt;a.nodeType!==8;){if(!r){a=null;break t}if(a=el(a.nextSibling),a===null){a=null;break t}}r=a.data,a=r==="F!"||r==="F"?a:null}if(a){Me=el(a.nextSibling),n=a.data==="F!";break e}}mn(n)}n=!1}n&&(t=l[0])}}return l=dt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kg,lastRenderedState:t},l.queue=n,l=Gg.bind(null,oe,n),n.dispatch=l,n=Mc(!1),r=nd.bind(null,oe,!1,n.queue),n=dt(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,l=Q0.bind(null,oe,a,r,l),a.dispatch=l,n.memoizedState=e,[t,l,!1]}function bf(e){var t=$e();return Ag(t,ke,e)}function Ag(e,t,l){if(t=Iu(e,t,kg)[0],e=Fi(Hl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=ni(t)}catch(i){throw i===qa?Ko:i}else n=t;t=$e();var a=t.queue,r=a.dispatch;return l!==t.memoizedState&&(oe.flags|=2048,Aa(9,{destroy:void 0},W0.bind(null,a,l),null)),[n,r,e]}function W0(e,t){e.action=t}function vf(e){var t=$e(),l=ke;if(l!==null)return Ag(t,l,e);$e(),t=t.memoizedState,l=$e();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Aa(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=oe.updateQueue,t===null&&(t=Zo(),oe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function Tg(){return $e().memoizedState}function Vi(e,t,l,n){var a=dt();oe.flags|=e,a.memoizedState=Aa(1|t,{destroy:void 0},l,n===void 0?null:n)}function Qo(e,t,l,n){var a=$e();n=n===void 0?null:n;var r=a.memoizedState.inst;ke!==null&&n!==null&&Ku(n,ke.memoizedState.deps)?a.memoizedState=Aa(t,r,l,n):(oe.flags|=e,a.memoizedState=Aa(1|t,r,l,n))}function wf(e,t){Vi(8390656,8,e,t)}function Pu(e,t){Qo(2048,8,e,t)}function J0(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=Zo(),oe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Dg(e){var t=$e().memoizedState;return J0({ref:t,nextImpl:e}),function(){if(ve&2)throw Error(B(440));return t.impl.apply(void 0,arguments)}}function Rg(e,t){return Qo(4,2,e,t)}function zg(e,t){return Qo(4,4,e,t)}function Mg(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 Lg(e,t,l){l=l!=null?l.concat([e]):null,Qo(4,4,Mg.bind(null,t,e),l)}function ed(){}function Og(e,t){var l=$e();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Ku(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function Bg(e,t){var l=$e();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Ku(t,n[1]))return n[0];if(n=e(),Ln){Jl(!0);try{e()}finally{Jl(!1)}}return l.memoizedState=[n,t],n}function td(e,t,l){return l===void 0||Ul&1073741824&&!(fe&261930)?e.memoizedState=t:(e.memoizedState=l,e=j_(),oe.lanes|=e,_n|=e,l)}function Ug(e,t,l,n){return qt(l,t)?l:ka.current!==null?(e=td(e,l,n),qt(e,t)||(Xe=!0),e):!(Ul&42)||Ul&1073741824&&!(fe&261930)?(Xe=!0,e.memoizedState=l):(e=j_(),oe.lanes|=e,_n|=e,t)}function Hg(e,t,l,n,a){var r=we.p;we.p=r!==0&&8>r?r:8;var i=te.T,o={};te.T=o,nd(e,!1,t,l);try{var c=a(),u=te.S;if(u!==null&&u(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=K0(c,n);wr(e,t,d,Vt(e))}else wr(e,t,n,Vt(e))}catch(h){wr(e,t,{then:function(){},status:"rejected",reason:h},Vt())}finally{we.p=r,i!==null&&o.types!==null&&(i.types=o.types),te.T=i}}function I0(){}function Oc(e,t,l,n){if(e.tag!==5)throw Error(B(476));var a=Fg(e).queue;Hg(e,a,t,Nn,l===null?I0:function(){return Vg(e),l(n)})}function Fg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Nn,baseState:Nn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:Nn},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 Vg(e){var t=Fg(e);t.next===null&&(t=e.alternate.memoizedState),wr(e,t.next.queue,{},Vt())}function ld(){return it($r)}function qg(){return $e().memoizedState}function $g(){return $e().memoizedState}function P0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Vt();e=rn(l);var n=on(t,e,l);n!==null&&(xt(n,t,l),yr(n,t,l)),t={cache:Vu()},e.payload=t;return}t=t.return}}function ey(e,t,l){var n=Vt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Wo(e)?Yg(t,l):(l=Bu(e,t,l,n),l!==null&&(xt(l,e,n),Kg(l,t,n)))}function Gg(e,t,l){var n=Vt();wr(e,t,l,n)}function wr(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Wo(e))Yg(t,a);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var i=t.lastRenderedState,o=r(i,l);if(a.hasEagerState=!0,a.eagerState=o,qt(o,i))return Yo(e,t,a,0),Te===null&&Go(),!1}catch{}finally{}if(l=Bu(e,t,a,n),l!==null)return xt(l,e,n),Kg(l,t,n),!0}return!1}function nd(e,t,l,n){if(n={lane:2,revertLane:fd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Wo(e)){if(t)throw Error(B(479))}else t=Bu(e,l,n,2),t!==null&&xt(t,e,2)}function Wo(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function Yg(e,t){pa=ho=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Kg(e,t,l){if(l&4194048){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Dm(e,l)}}var Fr={readContext:it,use:Xo,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useLayoutEffect:He,useInsertionEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useSyncExternalStore:He,useId:He,useHostTransitionStatus:He,useFormState:He,useActionState:He,useOptimistic:He,useMemoCache:He,useCacheRefresh:He};Fr.useEffectEvent=He;var Zg={readContext:it,use:Xo,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:wf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Vi(4194308,4,Mg.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Vi(4194308,4,e,t)},useInsertionEffect:function(e,t){Vi(4,2,e,t)},useMemo:function(e,t){var l=dt();t=t===void 0?null:t;var n=e();if(Ln){Jl(!0);try{e()}finally{Jl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=dt();if(l!==void 0){var a=l(t);if(Ln){Jl(!0);try{l(t)}finally{Jl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=ey.bind(null,oe,e),[n.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=Mc(e);var t=e.queue,l=Gg.bind(null,oe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ed,useDeferredValue:function(e,t){var l=dt();return td(l,e,t)},useTransition:function(){var e=Mc(!1);return e=Hg.bind(null,oe,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=oe,a=dt();if(me){if(l===void 0)throw Error(B(407));l=l()}else{if(l=t(),Te===null)throw Error(B(349));fe&127||vg(n,t,l)}a.memoizedState=l;var r={value:l,getSnapshot:t};return a.queue=r,wf(xg.bind(null,n,r,e),[e]),n.flags|=2048,Aa(9,{destroy:void 0},wg.bind(null,n,r,l,t),null),l},useId:function(){var e=dt(),t=Te.identifierPrefix;if(me){var l=gl,n=ml;l=(n&~(1<<32-Ft(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=mo++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Z0++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ld,useFormState:yf,useActionState:yf,useOptimistic:function(e){var t=dt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=nd.bind(null,oe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Ju,useCacheRefresh:function(){return dt().memoizedState=P0.bind(null,oe)},useEffectEvent:function(e){var t=dt(),l={impl:e};return t.memoizedState=l,function(){if(ve&2)throw Error(B(440));return l.impl.apply(void 0,arguments)}}},ad={readContext:it,use:Xo,useCallback:Og,useContext:it,useEffect:Pu,useImperativeHandle:Lg,useInsertionEffect:Rg,useLayoutEffect:zg,useMemo:Bg,useReducer:Fi,useRef:Tg,useState:function(){return Fi(Hl)},useDebugValue:ed,useDeferredValue:function(e,t){var l=$e();return Ug(l,ke.memoizedState,e,t)},useTransition:function(){var e=Fi(Hl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:ni(e),t]},useSyncExternalStore:bg,useId:qg,useHostTransitionStatus:ld,useFormState:bf,useActionState:bf,useOptimistic:function(e,t){var l=$e();return jg(l,ke,e,t)},useMemoCache:Ju,useCacheRefresh:$g};ad.useEffectEvent=Dg;var Xg={readContext:it,use:Xo,useCallback:Og,useContext:it,useEffect:Pu,useImperativeHandle:Lg,useInsertionEffect:Rg,useLayoutEffect:zg,useMemo:Bg,useReducer:js,useRef:Tg,useState:function(){return js(Hl)},useDebugValue:ed,useDeferredValue:function(e,t){var l=$e();return ke===null?td(l,e,t):Ug(l,ke.memoizedState,e,t)},useTransition:function(){var e=js(Hl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:ni(e),t]},useSyncExternalStore:bg,useId:qg,useHostTransitionStatus:ld,useFormState:vf,useActionState:vf,useOptimistic:function(e,t){var l=$e();return ke!==null?jg(l,ke,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ju,useCacheRefresh:$g};Xg.useEffectEvent=Dg;function Es(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:Oe({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Bc={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Vt(),a=rn(n);a.payload=t,l!=null&&(a.callback=l),t=on(e,a,n),t!==null&&(xt(t,e,n),yr(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Vt(),a=rn(n);a.tag=1,a.payload=t,l!=null&&(a.callback=l),t=on(e,a,n),t!==null&&(xt(t,e,n),yr(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Vt(),n=rn(l);n.tag=2,t!=null&&(n.callback=t),t=on(e,n,l),t!==null&&(xt(t,e,l),yr(t,e,l))}};function xf(e,t,l,n,a,r,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,r,i):t.prototype&&t.prototype.isPureReactComponent?!Lr(l,n)||!Lr(a,r):!0}function Sf(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&Bc.enqueueReplaceState(t,t.state,null)}function On(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=Oe({},l));for(var a in e)l[a]===void 0&&(l[a]=e[a])}return l}function Qg(e){ro(e)}function Wg(e){console.error(e)}function Jg(e){ro(e)}function go(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Cf(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Uc(e,t,l){return l=rn(l),l.tag=3,l.payload={element:null},l.callback=function(){go(e,t)},l}function Ig(e){return e=rn(e),e.tag=3,e}function Pg(e,t,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var r=n.value;e.payload=function(){return a(r)},e.callback=function(){Cf(t,l,n)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Cf(t,l,n),typeof a!="function"&&(sn===null?sn=new Set([this]):sn.add(this));var o=n.stack;this.componentDidCatch(n.value,{componentStack:o!==null?o:""})})}function ty(e,t,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Va(t,l,a,!0),l=$t.current,l!==null){switch(l.tag){case 31:case 13:return Pt===null?vo():l.alternate===null&&Fe===0&&(Fe=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===co?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Bs(e,n,a)),!1;case 22:return l.flags|=65536,n===co?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Bs(e,n,a)),!1}throw Error(B(435,l.tag))}return Bs(e,n,a),vo(),!1}if(me)return t=$t.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==jc&&(e=Error(B(422),{cause:n}),Br(Wt(e,l)))):(n!==jc&&(t=Error(B(423),{cause:n}),Br(Wt(t,l))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Wt(n,l),a=Uc(e.stateNode,n,a),Cs(e,a),Fe!==4&&(Fe=2)),!1;var r=Error(B(520),{cause:n});if(r=Wt(r,l),Cr===null?Cr=[r]:Cr.push(r),Fe!==4&&(Fe=2),t===null)return!0;n=Wt(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=a&-a,l.lanes|=e,e=Uc(l.stateNode,n,e),Cs(l,e),!1;case 1:if(t=l.type,r=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(sn===null||!sn.has(r))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Ig(a),Pg(a,e,l,n),Cs(l,a),!1}l=l.return}while(l!==null);return!1}var rd=Error(B(461)),Xe=!1;function lt(e,t,l,n){t.child=e===null?hg(t,null,l,n):Mn(t,e.child,l,n)}function jf(e,t,l,n,a){l=l.render;var r=t.ref;if("ref"in n){var i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}else i=n;return zn(t),n=Zu(e,t,l,i,r,a),o=Xu(),e!==null&&!Xe?(Qu(e,t,a),Fl(e,t,a)):(me&&o&&Hu(t),t.flags|=1,lt(e,t,n,a),t.child)}function Ef(e,t,l,n,a){if(e===null){var r=l.type;return typeof r=="function"&&!Uu(r)&&r.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=r,e_(e,t,r,n,a)):(e=Ui(l.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!id(e,a)){var i=r.memoizedProps;if(l=l.compare,l=l!==null?l:Lr,l(i,n)&&e.ref===t.ref)return Fl(e,t,a)}return t.flags|=1,e=Ml(r,n),e.ref=t.ref,e.return=t,t.child=e}function e_(e,t,l,n,a){if(e!==null){var r=e.memoizedProps;if(Lr(r,n)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=n=r,id(e,a))e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,Fl(e,t,a)}return Hc(e,t,l,n,a)}function t_(e,t,l,n){var a=n.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if(t.flags&128){if(r=r!==null?r.baseLanes|l:l,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~r}else n=0,t.child=null;return Nf(e,t,r,l,n)}if(l&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hi(t,r!==null?r.cachePool:null),r!==null?gf(t,r):Rc(),_g(t);else return n=t.lanes=536870912,Nf(e,t,r!==null?r.baseLanes|l:l,l,n)}else r!==null?(Hi(t,r.cachePool),gf(t,r),Ql(),t.memoizedState=null):(e!==null&&Hi(t,null),Rc(),Ql());return lt(e,t,a,l),t.child}function sr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nf(e,t,l,n,a){var r=qu();return r=r===null?null:{parent:Ze._currentValue,pool:r},t.memoizedState={baseLanes:l,cachePool:r},e!==null&&Hi(t,null),Rc(),_g(t),e!==null&&Va(e,t,n,!0),t.childLanes=a,null}function qi(e,t){return t=_o({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kf(e,t,l){return Mn(t,e.child,null,l),e=qi(t,t.pendingProps),e.flags|=2,Mt(t),t.memoizedState=null,e}function ly(e,t,l){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(me){if(n.mode==="hidden")return e=qi(t,n),t.lanes=536870912,sr(null,e);if(zc(t),(e=Me)?(e=Z_(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hn!==null?{id:ml,overflow:gl}:null,retryLane:536870912,hydrationErrors:null},l=ig(e),l.return=t,t.child=l,at=t,Me=null)):e=null,e===null)throw mn(t);return t.lanes=536870912,null}return qi(t,n)}var r=e.memoizedState;if(r!==null){var i=r.dehydrated;if(zc(t),a)if(t.flags&256)t.flags&=-257,t=kf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(B(558));else if(Xe||Va(e,t,l,!1),a=(l&e.childLanes)!==0,Xe||a){if(n=Te,n!==null&&(i=Rm(n,l),i!==0&&i!==r.retryLane))throw r.retryLane=i,$n(e,i),xt(n,e,i),rd;vo(),t=kf(e,t,l)}else e=r.treeContext,Me=el(i.nextSibling),at=t,me=!0,an=null,Jt=!1,e!==null&&sg(t,e),t=qi(t,n),t.flags|=4096;return t}return e=Ml(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $i(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(B(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Hc(e,t,l,n,a){return zn(t),l=Zu(e,t,l,n,void 0,a),n=Xu(),e!==null&&!Xe?(Qu(e,t,a),Fl(e,t,a)):(me&&n&&Hu(t),t.flags|=1,lt(e,t,l,a),t.child)}function Af(e,t,l,n,a,r){return zn(t),t.updateQueue=null,l=yg(t,n,l,a),pg(e),n=Xu(),e!==null&&!Xe?(Qu(e,t,r),Fl(e,t,r)):(me&&n&&Hu(t),t.flags|=1,lt(e,t,l,r),t.child)}function Tf(e,t,l,n,a){if(zn(t),t.stateNode===null){var r=oa,i=l.contextType;typeof i=="object"&&i!==null&&(r=it(i)),r=new l(n,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Bc,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=n,r.state=t.memoizedState,r.refs={},Gu(t),i=l.contextType,r.context=typeof i=="object"&&i!==null?it(i):oa,r.state=t.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(Es(t,l,i,n),r.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(i=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),i!==r.state&&Bc.enqueueReplaceState(r,r.state,null),vr(t,n,r,a),br(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){r=t.stateNode;var o=t.memoizedProps,c=On(l,o);r.props=c;var u=r.context,d=l.contextType;i=oa,typeof d=="object"&&d!==null&&(i=it(d));var h=l.getDerivedStateFromProps;d=typeof h=="function"||typeof r.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,d||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o||u!==i)&&Sf(t,r,n,i),Kl=!1;var f=t.memoizedState;r.state=f,vr(t,n,r,a),br(),u=t.memoizedState,o||f!==u||Kl?(typeof h=="function"&&(Es(t,l,h,n),u=t.memoizedState),(c=Kl||xf(t,l,c,n,f,u,i))?(d||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),r.props=n,r.state=u,r.context=i,n=c):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{r=t.stateNode,Tc(e,t),i=t.memoizedProps,d=On(l,i),r.props=d,h=t.pendingProps,f=r.context,u=l.contextType,c=oa,typeof u=="object"&&u!==null&&(c=it(u)),o=l.getDerivedStateFromProps,(u=typeof o=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(i!==h||f!==c)&&Sf(t,r,n,c),Kl=!1,f=t.memoizedState,r.state=f,vr(t,n,r,a),br();var _=t.memoizedState;i!==h||f!==_||Kl||e!==null&&e.dependencies!==null&&so(e.dependencies)?(typeof o=="function"&&(Es(t,l,o,n),_=t.memoizedState),(d=Kl||xf(t,l,d,n,f,_,c)||e!==null&&e.dependencies!==null&&so(e.dependencies))?(u||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(n,_,c),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(n,_,c)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=_),r.props=n,r.state=_,r.context=c,n=d):(typeof r.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return r=n,$i(e,t),n=(t.flags&128)!==0,r||n?(r=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&n?(t.child=Mn(t,e.child,null,a),t.child=Mn(t,null,l,a)):lt(e,t,l,a),t.memoizedState=r.state,e=t.child):e=Fl(e,t,a),e}function Df(e,t,l,n){return Rn(),t.flags|=256,lt(e,t,l,n),t.child}var Ns={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ks(e){return{baseLanes:e,cachePool:ug()}}function As(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Bt),e}function l_(e,t,l){var n=t.pendingProps,a=!1,r=(t.flags&128)!==0,i;if((i=r)||(i=e!==null&&e.memoizedState===null?!1:(qe.current&2)!==0),i&&(a=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(a?Xl(t):Ql(),(e=Me)?(e=Z_(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hn!==null?{id:ml,overflow:gl}:null,retryLane:536870912,hydrationErrors:null},l=ig(e),l.return=t,t.child=l,at=t,Me=null)):e=null,e===null)throw mn(t);return Pc(e)?t.lanes=32:t.lanes=536870912,null}var o=n.children;return n=n.fallback,a?(Ql(),a=t.mode,o=_o({mode:"hidden",children:o},a),n=kn(n,a,l,null),o.return=t,n.return=t,o.sibling=n,t.child=o,n=t.child,n.memoizedState=ks(l),n.childLanes=As(e,i,l),t.memoizedState=Ns,sr(null,n)):(Xl(t),Fc(t,o))}var c=e.memoizedState;if(c!==null&&(o=c.dehydrated,o!==null)){if(r)t.flags&256?(Xl(t),t.flags&=-257,t=Ts(e,t,l)):t.memoizedState!==null?(Ql(),t.child=e.child,t.flags|=128,t=null):(Ql(),o=n.fallback,a=t.mode,n=_o({mode:"visible",children:n.children},a),o=kn(o,a,l,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,Mn(t,e.child,null,l),n=t.child,n.memoizedState=ks(l),n.childLanes=As(e,i,l),t.memoizedState=Ns,t=sr(null,n));else if(Xl(t),Pc(o)){if(i=o.nextSibling&&o.nextSibling.dataset,i)var u=i.dgst;i=u,n=Error(B(419)),n.stack="",n.digest=i,Br({value:n,source:null,stack:null}),t=Ts(e,t,l)}else if(Xe||Va(e,t,l,!1),i=(l&e.childLanes)!==0,Xe||i){if(i=Te,i!==null&&(n=Rm(i,l),n!==0&&n!==c.retryLane))throw c.retryLane=n,$n(e,n),xt(i,e,n),rd;Ic(o)||vo(),t=Ts(e,t,l)}else Ic(o)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Me=el(o.nextSibling),at=t,me=!0,an=null,Jt=!1,e!==null&&sg(t,e),t=Fc(t,n.children),t.flags|=4096);return t}return a?(Ql(),o=n.fallback,a=t.mode,c=e.child,u=c.sibling,n=Ml(c,{mode:"hidden",children:n.children}),n.subtreeFlags=c.subtreeFlags&65011712,u!==null?o=Ml(u,o):(o=kn(o,a,l,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,sr(null,n),n=t.child,o=e.child.memoizedState,o===null?o=ks(l):(a=o.cachePool,a!==null?(c=Ze._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=ug(),o={baseLanes:o.baseLanes|l,cachePool:a}),n.memoizedState=o,n.childLanes=As(e,i,l),t.memoizedState=Ns,sr(e.child,n)):(Xl(t),l=e.child,e=l.sibling,l=Ml(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=l,t.memoizedState=null,l)}function Fc(e,t){return t=_o({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _o(e,t){return e=Ot(22,e,null,t),e.lanes=0,e}function Ts(e,t,l){return Mn(t,e.child,null,l),e=Fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rf(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Nc(e.return,t,l)}function Ds(e,t,l,n,a,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=l,i.tailMode=a,i.treeForkCount=r)}function n_(e,t,l){var n=t.pendingProps,a=n.revealOrder,r=n.tail;n=n.children;var i=qe.current,o=(i&2)!==0;if(o?(i=i&1|2,t.flags|=128):i&=1,Re(qe,i),lt(e,t,n,l),n=me?Or:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rf(e,l,t);else if(e.tag===19)Rf(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(a){case"forwards":for(l=t.child,a=null;l!==null;)e=l.alternate,e!==null&&fo(e)===null&&(a=l),l=l.sibling;l=a,l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null),Ds(t,!1,a,l,r,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&fo(e)===null){t.child=a;break}e=a.sibling,a.sibling=l,l=a,a=e}Ds(t,!0,l,null,r,n);break;case"together":Ds(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Fl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),_n|=t.lanes,!(l&t.childLanes))if(e!==null){if(Va(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,l=Ml(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ml(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function id(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&so(e)))}function ny(e,t,l){switch(t.tag){case 3:to(t,t.stateNode.containerInfo),Zl(t,Ze,e.memoizedState.cache),Rn();break;case 27:case 5:mc(t);break;case 4:to(t,t.stateNode.containerInfo);break;case 10:Zl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Xl(t),t.flags|=128,null):l&t.child.childLanes?l_(e,t,l):(Xl(t),e=Fl(e,t,l),e!==null?e.sibling:null);Xl(t);break;case 19:var a=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Va(e,t,l,!1),n=(l&t.childLanes)!==0),a){if(n)return n_(e,t,l);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Re(qe,qe.current),n)break;return null;case 22:return t.lanes=0,t_(e,t,l,t.pendingProps);case 24:Zl(t,Ze,e.memoizedState.cache)}return Fl(e,t,l)}function a_(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!id(e,l)&&!(t.flags&128))return Xe=!1,ny(e,t,l);Xe=!!(e.flags&131072)}else Xe=!1,me&&t.flags&1048576&&og(t,Or,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=xn(t.elementType),t.type=e,typeof e=="function")Uu(e)?(n=On(e,n),t.tag=1,t=Tf(null,t,e,n,l)):(t.tag=0,t=Hc(null,t,e,n,l));else{if(e!=null){var a=e.$$typeof;if(a===Cu){t.tag=11,t=jf(null,t,e,n,l);break e}else if(a===ju){t.tag=14,t=Ef(null,t,e,n,l);break e}}throw t=fc(e)||e,Error(B(306,t,""))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,a=On(n,t.pendingProps),Tf(e,t,n,a,l);case 3:e:{if(to(t,t.stateNode.containerInfo),e===null)throw Error(B(387));n=t.pendingProps;var r=t.memoizedState;a=r.element,Tc(e,t),vr(t,n,null,l);var i=t.memoizedState;if(n=i.cache,Zl(t,Ze,n),n!==r.cache&&kc(t,[Ze],l,!0),br(),n=i.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Df(e,t,n,l);break e}else if(n!==a){a=Wt(Error(B(424)),t),Br(a),t=Df(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Me=el(e.firstChild),at=t,me=!0,an=null,Jt=!0,l=hg(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Rn(),n===a){t=Fl(e,t,l);break e}lt(e,t,n,l)}t=t.child}return t;case 26:return $i(e,t),e===null?(l=If(t.type,null,t.pendingProps,null))?t.memoizedState=l:me||(l=t.type,e=t.pendingProps,n=Co(nn.current).createElement(l),n[nt]=t,n[St]=e,st(n,l,e),Pe(n),t.stateNode=n):t.memoizedState=If(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return mc(t),e===null&&me&&(n=t.stateNode=X_(t.type,t.pendingProps,nn.current),at=t,Jt=!0,a=Me,yn(t.type)?(eu=a,Me=el(n.firstChild)):Me=a),lt(e,t,t.pendingProps.children,l),$i(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((a=n=Me)&&(n=zy(n,t.type,t.pendingProps,Jt),n!==null?(t.stateNode=n,at=t,Me=el(n.firstChild),Jt=!1,a=!0):a=!1),a||mn(t)),mc(t),a=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,n=r.children,Wc(a,r)?n=null:i!==null&&Wc(a,i)&&(t.flags|=32),t.memoizedState!==null&&(a=Zu(e,t,X0,null,null,l),$r._currentValue=a),$i(e,t),lt(e,t,n,l),t.child;case 6:return e===null&&me&&((e=l=Me)&&(l=My(l,t.pendingProps,Jt),l!==null?(t.stateNode=l,at=t,Me=null,e=!0):e=!1),e||mn(t)),null;case 13:return l_(e,t,l);case 4:return to(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Mn(t,null,n,l):lt(e,t,n,l),t.child;case 11:return jf(e,t,t.type,t.pendingProps,l);case 7:return lt(e,t,t.pendingProps,l),t.child;case 8:return lt(e,t,t.pendingProps.children,l),t.child;case 12:return lt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,Zl(t,t.type,n.value),lt(e,t,n.children,l),t.child;case 9:return a=t.type._context,n=t.pendingProps.children,zn(t),a=it(a),n=n(a),t.flags|=1,lt(e,t,n,l),t.child;case 14:return Ef(e,t,t.type,t.pendingProps,l);case 15:return e_(e,t,t.type,t.pendingProps,l);case 19:return n_(e,t,l);case 31:return ly(e,t,l);case 22:return t_(e,t,l,t.pendingProps);case 24:return zn(t),n=it(Ze),e===null?(a=qu(),a===null&&(a=Te,r=Vu(),a.pooledCache=r,r.refCount++,r!==null&&(a.pooledCacheLanes|=l),a=r),t.memoizedState={parent:n,cache:a},Gu(t),Zl(t,Ze,a)):(e.lanes&l&&(Tc(e,t),vr(t,null,null,l),br()),a=e.memoizedState,r=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zl(t,Ze,n)):(n=r.cache,Zl(t,Ze,n),n!==a.cache&&kc(t,[Ze],l,!0))),lt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(B(156,t.tag))}function xl(e){e.flags|=4}function Rs(e,t,l,n,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(k_())e.flags|=8192;else throw Tn=co,$u}else e.flags&=-16777217}function zf(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!J_(t))if(k_())e.flags|=8192;else throw Tn=co,$u}function vi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Am():536870912,e.lanes|=t,Ta|=t)}function Ia(e,t){if(!me)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 n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function ay(e,t,l){var n=t.pendingProps;switch(Fu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ll(Ze),Ca(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Zn(t)?xl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ss())),ze(t),null;case 26:var a=t.type,r=t.memoizedState;return e===null?(xl(t),r!==null?(ze(t),zf(t,r)):(ze(t),Rs(t,a,null,n,l))):r?r!==e.memoizedState?(xl(t),ze(t),zf(t,r)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&xl(t),ze(t),Rs(t,a,e,n,l)),null;case 27:if(lo(t),l=nn.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&xl(t);else{if(!n){if(t.stateNode===null)throw Error(B(166));return ze(t),null}e=yl.current,Zn(t)?sf(t):(e=X_(a,n,l),t.stateNode=e,xl(t))}return ze(t),null;case 5:if(lo(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&xl(t);else{if(!n){if(t.stateNode===null)throw Error(B(166));return ze(t),null}if(r=yl.current,Zn(t))sf(t);else{var i=Co(nn.current);switch(r){case 1:r=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:r=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":r=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":r=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":r=i.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?i.createElement(a,{is:n.is}):i.createElement(a)}}r[nt]=t,r[St]=n;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)r.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=r;e:switch(st(r,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&xl(t)}}return ze(t),Rs(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&xl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(B(166));if(e=nn.current,Zn(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=at,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||G_(e.nodeValue,l)),e||mn(t,!0)}else e=Co(e).createTextNode(n),e[nt]=t,t.stateNode=e}return ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Zn(t),l!==null){if(e===null){if(!n)throw Error(B(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(557));e[nt]=t}else Rn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else l=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Mt(t),t):(Mt(t),null);if(t.flags&128)throw Error(B(558))}return ze(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Zn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(B(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(B(317));a[nt]=t}else Rn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),a=!1}else a=Ss(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Mt(t),t):(Mt(t),null)}return Mt(t),t.flags&128?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),vi(t,t.updateQueue),ze(t),null);case 4:return Ca(),e===null&&hd(t.stateNode.containerInfo),ze(t),null;case 10:return Ll(t.type),ze(t),null;case 19:if(tt(qe),n=t.memoizedState,n===null)return ze(t),null;if(a=(t.flags&128)!==0,r=n.rendering,r===null)if(a)Ia(n,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=fo(e),r!==null){for(t.flags|=128,Ia(n,!1),e=r.updateQueue,t.updateQueue=e,vi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)rg(l,e),l=l.sibling;return Re(qe,qe.current&1|2),me&&kl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ut()>yo&&(t.flags|=128,a=!0,Ia(n,!1),t.lanes=4194304)}else{if(!a)if(e=fo(r),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,vi(t,e),Ia(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!me)return ze(t),null}else 2*Ut()-n.renderingStartTime>yo&&l!==536870912&&(t.flags|=128,a=!0,Ia(n,!1),t.lanes=4194304);n.isBackwards?(r.sibling=t.child,t.child=r):(e=n.last,e!==null?e.sibling=r:t.child=r,n.last=r)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ut(),e.sibling=null,l=qe.current,Re(qe,a?l&1|2:l&1),me&&kl(t,n.treeForkCount),e):(ze(t),null);case 22:case 23:return Mt(t),Yu(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?l&536870912&&!(t.flags&128)&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),l=t.updateQueue,l!==null&&vi(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&tt(An),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ll(Ze),ze(t),null;case 25:return null;case 30:return null}throw Error(B(156,t.tag))}function ry(e,t){switch(Fu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ll(Ze),Ca(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return lo(t),null;case 31:if(t.memoizedState!==null){if(Mt(t),t.alternate===null)throw Error(B(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(qe),null;case 4:return Ca(),null;case 10:return Ll(t.type),null;case 22:case 23:return Mt(t),Yu(),e!==null&&tt(An),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ll(Ze),null;case 25:return null;default:return null}}function r_(e,t){switch(Fu(t),t.tag){case 3:Ll(Ze),Ca();break;case 26:case 27:case 5:lo(t);break;case 4:Ca();break;case 31:t.memoizedState!==null&&Mt(t);break;case 13:Mt(t);break;case 19:tt(qe);break;case 10:Ll(t.type);break;case 22:case 23:Mt(t),Yu(),e!==null&&tt(An);break;case 24:Ll(Ze)}}function ai(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var r=l.create,i=l.inst;n=r(),i.destroy=n}l=l.next}while(l!==a)}}catch(o){je(t,t.return,o)}}function gn(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){var i=n.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,a=t;var c=l,u=o;try{u()}catch(d){je(a,c,d)}}}n=n.next}while(n!==r)}}catch(d){je(t,t.return,d)}}function i_(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{gg(t,l)}catch(n){je(e,e.return,n)}}}function o_(e,t,l){l.props=On(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){je(e,t,n)}}function xr(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(a){je(e,t,a)}}function _l(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){je(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){je(e,t,a)}else l.current=null}function s_(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){je(e,e.return,a)}}function zs(e,t,l){try{var n=e.stateNode;Ny(n,e.type,l,t),n[St]=t}catch(a){je(e,e.return,a)}}function c_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&yn(e.type)||e.tag===4}function Ms(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||c_(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&&yn(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 Vc(e,t,l){var n=e.tag;if(n===5||n===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=Rl));else if(n!==4&&(n===27&&yn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Vc(e,t,l),e=e.sibling;e!==null;)Vc(e,t,l),e=e.sibling}function po(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&yn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(po(e,t,l),e=e.sibling;e!==null;)po(e,t,l),e=e.sibling}function u_(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);st(t,n,l),t[nt]=e,t[St]=l}catch(r){je(e,e.return,r)}}var Tl=!1,Ke=!1,Ls=!1,Mf=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function iy(e,t){if(e=e.containerInfo,Xc=ko,e=Jm(e),Lu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{l.nodeType,r.nodeType}catch{l=null;break e}var i=0,o=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var _;h!==l||a!==0&&h.nodeType!==3||(o=i+a),h!==r||n!==0&&h.nodeType!==3||(c=i+n),h.nodeType===3&&(i+=h.nodeValue.length),(_=h.firstChild)!==null;)f=h,h=_;for(;;){if(h===e)break t;if(f===l&&++u===a&&(o=i),f===r&&++d===n&&(c=i),(_=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=_}l=o===-1||c===-1?null:{start:o,end:c}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qc={focusedElem:e,selectionRange:l},ko=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,r=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)a=e[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&r!==null){e=void 0,l=t,a=r.memoizedProps,r=r.memoizedState,n=l.stateNode;try{var y=On(l.type,a);e=n.getSnapshotBeforeUpdate(y,r),n.__reactInternalSnapshotBeforeUpdate=e}catch(p){je(l,l.return,p)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Jc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Jc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(B(163))}if(e=t.sibling,e!==null){e.return=t.return,Ie=e;break}Ie=t.return}}function d_(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:Cl(e,l),n&4&&ai(5,l);break;case 1:if(Cl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(i){je(l,l.return,i)}else{var a=On(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){je(l,l.return,i)}}n&64&&i_(l),n&512&&xr(l,l.return);break;case 3:if(Cl(e,l),n&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{gg(e,t)}catch(i){je(l,l.return,i)}}break;case 27:t===null&&n&4&&u_(l);case 26:case 5:Cl(e,l),t===null&&n&4&&s_(l),n&512&&xr(l,l.return);break;case 12:Cl(e,l);break;case 31:Cl(e,l),n&4&&m_(e,l);break;case 13:Cl(e,l),n&4&&g_(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=gy.bind(null,l),Ly(e,l))));break;case 22:if(n=l.memoizedState!==null||Tl,!n){t=t!==null&&t.memoizedState!==null||Ke,a=Tl;var r=Ke;Tl=n,(Ke=t)&&!r?El(e,l,(l.subtreeFlags&8772)!==0):Cl(e,l),Tl=a,Ke=r}break;case 30:break;default:Cl(e,l)}}function f_(e){var t=e.alternate;t!==null&&(e.alternate=null,f_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Au(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 Be=null,vt=!1;function Sl(e,t,l){for(l=l.child;l!==null;)h_(e,t,l),l=l.sibling}function h_(e,t,l){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Jr,l)}catch{}switch(l.tag){case 26:Ke||_l(l,t),Sl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ke||_l(l,t);var n=Be,a=vt;yn(l.type)&&(Be=l.stateNode,vt=!1),Sl(e,t,l),Er(l.stateNode),Be=n,vt=a;break;case 5:Ke||_l(l,t);case 6:if(n=Be,a=vt,Be=null,Sl(e,t,l),Be=n,vt=a,Be!==null)if(vt)try{(Be.nodeType===9?Be.body:Be.nodeName==="HTML"?Be.ownerDocument.body:Be).removeChild(l.stateNode)}catch(r){je(l,t,r)}else try{Be.removeChild(l.stateNode)}catch(r){je(l,t,r)}break;case 18:Be!==null&&(vt?(e=Be,Zf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ma(e)):Zf(Be,l.stateNode));break;case 4:n=Be,a=vt,Be=l.stateNode.containerInfo,vt=!0,Sl(e,t,l),Be=n,vt=a;break;case 0:case 11:case 14:case 15:gn(2,l,t),Ke||gn(4,l,t),Sl(e,t,l);break;case 1:Ke||(_l(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&o_(l,t,n)),Sl(e,t,l);break;case 21:Sl(e,t,l);break;case 22:Ke=(n=Ke)||l.memoizedState!==null,Sl(e,t,l),Ke=n;break;default:Sl(e,t,l)}}function m_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ma(e)}catch(l){je(t,t.return,l)}}}function g_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ma(e)}catch(l){je(t,t.return,l)}}function oy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Mf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Mf),t;default:throw Error(B(435,e.tag))}}function wi(e,t){var l=oy(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var a=_y.bind(null,e,n);n.then(a,a)}})}function _t(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],r=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 27:if(yn(o.type)){Be=o.stateNode,vt=!1;break e}break;case 5:Be=o.stateNode,vt=!1;break e;case 3:case 4:Be=o.stateNode.containerInfo,vt=!0;break e}o=o.return}if(Be===null)throw Error(B(160));h_(r,i,a),Be=null,vt=!1,r=a.alternate,r!==null&&(r.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)__(t,e),t=t.sibling}var rl=null;function __(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_t(t,e),pt(e),n&4&&(gn(3,e,e.return),ai(3,e),gn(5,e,e.return));break;case 1:_t(t,e),pt(e),n&512&&(Ke||l===null||_l(l,l.return)),n&64&&Tl&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=rl;if(_t(t,e),pt(e),n&512&&(Ke||l===null||_l(l,l.return)),n&4){var r=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,a=a.ownerDocument||a;t:switch(n){case"title":r=a.getElementsByTagName("title")[0],(!r||r[ei]||r[nt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=a.createElement(n),a.head.insertBefore(r,a.querySelector("head > title"))),st(r,n,l),r[nt]=e,Pe(r),n=r;break e;case"link":var i=eh("link","href",a).get(n+(l.href||""));if(i){for(var o=0;o<i.length;o++)if(r=i[o],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(o,1);break t}}r=a.createElement(n),st(r,n,l),a.head.appendChild(r);break;case"meta":if(i=eh("meta","content",a).get(n+(l.content||""))){for(o=0;o<i.length;o++)if(r=i[o],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(o,1);break t}}r=a.createElement(n),st(r,n,l),a.head.appendChild(r);break;default:throw Error(B(468,n))}r[nt]=e,Pe(r),n=r}e.stateNode=n}else th(a,e.type,e.stateNode);else e.stateNode=Pf(a,n,e.memoizedProps);else r!==n?(r===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):r.count--,n===null?th(a,e.type,e.stateNode):Pf(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&zs(e,e.memoizedProps,l.memoizedProps)}break;case 27:_t(t,e),pt(e),n&512&&(Ke||l===null||_l(l,l.return)),l!==null&&n&4&&zs(e,e.memoizedProps,l.memoizedProps);break;case 5:if(_t(t,e),pt(e),n&512&&(Ke||l===null||_l(l,l.return)),e.flags&32){a=e.stateNode;try{Ea(a,"")}catch(y){je(e,e.return,y)}}n&4&&e.stateNode!=null&&(a=e.memoizedProps,zs(e,a,l!==null?l.memoizedProps:a)),n&1024&&(Ls=!0);break;case 6:if(_t(t,e),pt(e),n&4){if(e.stateNode===null)throw Error(B(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(y){je(e,e.return,y)}}break;case 3:if(Ki=null,a=rl,rl=jo(t.containerInfo),_t(t,e),rl=a,pt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Ma(t.containerInfo)}catch(y){je(e,e.return,y)}Ls&&(Ls=!1,p_(e));break;case 4:n=rl,rl=jo(e.stateNode.containerInfo),_t(t,e),pt(e),rl=n;break;case 12:_t(t,e),pt(e);break;case 31:_t(t,e),pt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,wi(e,n)));break;case 13:_t(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Jo=Ut()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,wi(e,n)));break;case 22:a=e.memoizedState!==null;var c=l!==null&&l.memoizedState!==null,u=Tl,d=Ke;if(Tl=u||a,Ke=d||c,_t(t,e),Ke=d,Tl=u,pt(e),n&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(l===null||c||Tl||Ke||Sn(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){c=l=t;try{if(r=c.stateNode,a)i=r.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{o=c.stateNode;var h=c.memoizedProps.style,f=h!=null&&h.hasOwnProperty("display")?h.display:null;o.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(y){je(c,c.return,y)}}}else if(t.tag===6){if(l===null){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(y){je(c,c.return,y)}}}else if(t.tag===18){if(l===null){c=t;try{var _=c.stateNode;a?Xf(_,!0):Xf(c.stateNode,!1)}catch(y){je(c,c.return,y)}}}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}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,wi(e,l))));break;case 19:_t(t,e),pt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,wi(e,n)));break;case 30:break;case 21:break;default:_t(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(c_(n)){l=n;break}n=n.return}if(l==null)throw Error(B(160));switch(l.tag){case 27:var a=l.stateNode,r=Ms(e);po(e,r,a);break;case 5:var i=l.stateNode;l.flags&32&&(Ea(i,""),l.flags&=-33);var o=Ms(e);po(e,o,i);break;case 3:case 4:var c=l.stateNode.containerInfo,u=Ms(e);Vc(e,u,c);break;default:throw Error(B(161))}}catch(d){je(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function p_(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;p_(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)d_(e,t.alternate,t),t=t.sibling}function Sn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gn(4,t,t.return),Sn(t);break;case 1:_l(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&o_(t,t.return,l),Sn(t);break;case 27:Er(t.stateNode);case 26:case 5:_l(t,t.return),Sn(t);break;case 22:t.memoizedState===null&&Sn(t);break;case 30:Sn(t);break;default:Sn(t)}e=e.sibling}}function El(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,a=e,r=t,i=r.flags;switch(r.tag){case 0:case 11:case 15:El(a,r,l),ai(4,r);break;case 1:if(El(a,r,l),n=r,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){je(n,n.return,u)}if(n=r,a=n.updateQueue,a!==null){var o=n.stateNode;try{var c=a.shared.hiddenCallbacks;if(c!==null)for(a.shared.hiddenCallbacks=null,a=0;a<c.length;a++)mg(c[a],o)}catch(u){je(n,n.return,u)}}l&&i&64&&i_(r),xr(r,r.return);break;case 27:u_(r);case 26:case 5:El(a,r,l),l&&n===null&&i&4&&s_(r),xr(r,r.return);break;case 12:El(a,r,l);break;case 31:El(a,r,l),l&&i&4&&m_(a,r);break;case 13:El(a,r,l),l&&i&4&&g_(a,r);break;case 22:r.memoizedState===null&&El(a,r,l),xr(r,r.return);break;case 30:break;default:El(a,r,l)}t=t.sibling}}function od(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&&li(l))}function sd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&li(e))}function nl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)y_(e,t,l,n),t=t.sibling}function y_(e,t,l,n){var a=t.flags;switch(t.tag){case 0:case 11:case 15:nl(e,t,l,n),a&2048&&ai(9,t);break;case 1:nl(e,t,l,n);break;case 3:nl(e,t,l,n),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&li(e)));break;case 12:if(a&2048){nl(e,t,l,n),e=t.stateNode;try{var r=t.memoizedProps,i=r.id,o=r.onPostCommit;typeof o=="function"&&o(i,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){je(t,t.return,c)}}else nl(e,t,l,n);break;case 31:nl(e,t,l,n);break;case 13:nl(e,t,l,n);break;case 23:break;case 22:r=t.stateNode,i=t.alternate,t.memoizedState!==null?r._visibility&2?nl(e,t,l,n):Sr(e,t):r._visibility&2?nl(e,t,l,n):(r._visibility|=2,Jn(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),a&2048&&od(i,t);break;case 24:nl(e,t,l,n),a&2048&&sd(t.alternate,t);break;default:nl(e,t,l,n)}}function Jn(e,t,l,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,i=t,o=l,c=n,u=i.flags;switch(i.tag){case 0:case 11:case 15:Jn(r,i,o,c,a),ai(8,i);break;case 23:break;case 22:var d=i.stateNode;i.memoizedState!==null?d._visibility&2?Jn(r,i,o,c,a):Sr(r,i):(d._visibility|=2,Jn(r,i,o,c,a)),a&&u&2048&&od(i.alternate,i);break;case 24:Jn(r,i,o,c,a),a&&u&2048&&sd(i.alternate,i);break;default:Jn(r,i,o,c,a)}t=t.sibling}}function Sr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,a=n.flags;switch(n.tag){case 22:Sr(l,n),a&2048&&od(n.alternate,n);break;case 24:Sr(l,n),a&2048&&sd(n.alternate,n);break;default:Sr(l,n)}t=t.sibling}}var cr=8192;function Xn(e,t,l){if(e.subtreeFlags&cr)for(e=e.child;e!==null;)b_(e,t,l),e=e.sibling}function b_(e,t,l){switch(e.tag){case 26:Xn(e,t,l),e.flags&cr&&e.memoizedState!==null&&Zy(l,rl,e.memoizedState,e.memoizedProps);break;case 5:Xn(e,t,l);break;case 3:case 4:var n=rl;rl=jo(e.stateNode.containerInfo),Xn(e,t,l),rl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=cr,cr=16777216,Xn(e,t,l),cr=n):Xn(e,t,l));break;default:Xn(e,t,l)}}function v_(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 Pa(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Ie=n,x_(n,e)}v_(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)w_(e),e=e.sibling}function w_(e){switch(e.tag){case 0:case 11:case 15:Pa(e),e.flags&2048&&gn(9,e,e.return);break;case 3:Pa(e);break;case 12:Pa(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gi(e)):Pa(e);break;default:Pa(e)}}function Gi(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Ie=n,x_(n,e)}v_(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gn(8,t,t.return),Gi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Gi(t));break;default:Gi(t)}e=e.sibling}}function x_(e,t){for(;Ie!==null;){var l=Ie;switch(l.tag){case 0:case 11:case 15:gn(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:li(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Ie=n;else e:for(l=e;Ie!==null;){n=Ie;var a=n.sibling,r=n.return;if(f_(n),n===l){Ie=null;break e}if(a!==null){a.return=r,Ie=a;break e}Ie=r}}}var sy={getCacheForType:function(e){var t=it(Ze),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return it(Ze).controller.signal}},cy=typeof WeakMap=="function"?WeakMap:Map,ve=0,Te=null,de=null,fe=0,Ce=0,zt=null,Pl=!1,$a=!1,cd=!1,Vl=0,Fe=0,_n=0,Dn=0,ud=0,Bt=0,Ta=0,Cr=null,wt=null,qc=!1,Jo=0,S_=0,yo=1/0,bo=null,sn=null,Qe=0,cn=null,Da=null,Ol=0,$c=0,Gc=null,C_=null,jr=0,Yc=null;function Vt(){return ve&2&&fe!==0?fe&-fe:te.T!==null?fd():zm()}function j_(){if(Bt===0)if(!(fe&536870912)||me){var e=hi;hi<<=1,!(hi&3932160)&&(hi=262144),Bt=e}else Bt=536870912;return e=$t.current,e!==null&&(e.flags|=32),Bt}function xt(e,t,l){(e===Te&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ra(e,0),en(e,fe,Bt,!1)),Pr(e,l),(!(ve&2)||e!==Te)&&(e===Te&&(!(ve&2)&&(Dn|=l),Fe===4&&en(e,fe,Bt,!1)),vl(e))}function E_(e,t,l){if(ve&6)throw Error(B(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ir(e,t),a=n?fy(e,t):Os(e,t,!0),r=n;do{if(a===0){$a&&!n&&en(e,t,0,!1);break}else{if(l=e.current.alternate,r&&!uy(l)){a=Os(e,t,!1),r=!1;continue}if(a===2){if(r=t,e.errorRecoveryDisabledLanes&r)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var o=e;a=Cr;var c=o.current.memoizedState.isDehydrated;if(c&&(Ra(o,i).flags|=256),i=Os(o,i,!1),i!==2){if(cd&&!c){o.errorRecoveryDisabledLanes|=r,Dn|=r,a=4;break e}r=wt,wt=a,r!==null&&(wt===null?wt=r:wt.push.apply(wt,r))}a=i}if(r=!1,a!==2)continue}}if(a===1){Ra(e,0),en(e,t,0,!0);break}e:{switch(n=e,r=a,r){case 0:case 1:throw Error(B(345));case 4:if((t&4194048)!==t)break;case 6:en(n,t,Bt,!Pl);break e;case 2:wt=null;break;case 3:case 5:break;default:throw Error(B(329))}if((t&62914560)===t&&(a=Jo+300-Ut(),10<a)){if(en(n,t,Bt,!Pl),Fo(n,0,!0)!==0)break e;Ol=t,n.timeoutHandle=K_(Lf.bind(null,n,l,wt,bo,qc,t,Bt,Dn,Ta,Pl,r,"Throttled",-0,0),a);break e}Lf(n,l,wt,bo,qc,t,Bt,Dn,Ta,Pl,r,null,-0,0)}}break}while(!0);vl(e)}function Lf(e,t,l,n,a,r,i,o,c,u,d,h,f,_){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:Rl},b_(t,r,h);var y=(r&62914560)===r?Jo-Ut():(r&4194048)===r?S_-Ut():0;if(y=Xy(h,y),y!==null){Ol=r,e.cancelPendingCommit=y(Bf.bind(null,e,t,r,l,n,a,i,o,c,d,h,null,f,_)),en(e,r,i,!u);return}}Bf(e,t,r,l,n,a,i,o,c)}function uy(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 n=0;n<l.length;n++){var a=l[n],r=a.getSnapshot;a=a.value;try{if(!qt(r(),a))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 en(e,t,l,n){t&=~ud,t&=~Dn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var r=31-Ft(a),i=1<<r;n[r]=-1,a&=~i}l!==0&&Tm(e,l,t)}function Io(){return ve&6?!0:(ri(0),!1)}function dd(){if(de!==null){if(Ce===0)var e=de.return;else e=de,zl=Gn=null,Wu(e),_a=null,Ur=0,e=de;for(;e!==null;)r_(e.alternate,e),e=e.return;de=null}}function Ra(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Ty(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ol=0,dd(),Te=e,de=l=Ml(e.current,null),fe=t,Ce=0,zt=null,Pl=!1,$a=Ir(e,t),cd=!1,Ta=Bt=ud=Dn=_n=Fe=0,wt=Cr=null,qc=!1,t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Ft(n),r=1<<a;t|=e[a],n&=~r}return Vl=t,Go(),l}function N_(e,t){oe=null,te.H=Fr,t===qa||t===Ko?(t=hf(),Ce=3):t===$u?(t=hf(),Ce=4):Ce=t===rd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,de===null&&(Fe=1,go(e,Wt(t,e.current)))}function k_(){var e=$t.current;return e===null?!0:(fe&4194048)===fe?Pt===null:(fe&62914560)===fe||fe&536870912?e===Pt:!1}function A_(){var e=te.H;return te.H=Fr,e===null?Fr:e}function T_(){var e=te.A;return te.A=sy,e}function vo(){Fe=4,Pl||(fe&4194048)!==fe&&$t.current!==null||($a=!0),!(_n&134217727)&&!(Dn&134217727)||Te===null||en(Te,fe,Bt,!1)}function Os(e,t,l){var n=ve;ve|=2;var a=A_(),r=T_();(Te!==e||fe!==t)&&(bo=null,Ra(e,t)),t=!1;var i=Fe;e:do try{if(Ce!==0&&de!==null){var o=de,c=zt;switch(Ce){case 8:dd(),i=6;break e;case 3:case 2:case 9:case 6:$t.current===null&&(t=!0);var u=Ce;if(Ce=0,zt=null,ua(e,o,c,u),l&&$a){i=0;break e}break;default:u=Ce,Ce=0,zt=null,ua(e,o,c,u)}}dy(),i=Fe;break}catch(d){N_(e,d)}while(!0);return t&&e.shellSuspendCounter++,zl=Gn=null,ve=n,te.H=a,te.A=r,de===null&&(Te=null,fe=0,Go()),i}function dy(){for(;de!==null;)D_(de)}function fy(e,t){var l=ve;ve|=2;var n=A_(),a=T_();Te!==e||fe!==t?(bo=null,yo=Ut()+500,Ra(e,t)):$a=Ir(e,t);e:do try{if(Ce!==0&&de!==null){t=de;var r=zt;t:switch(Ce){case 1:Ce=0,zt=null,ua(e,t,r,1);break;case 2:case 9:if(ff(r)){Ce=0,zt=null,Of(t);break}t=function(){Ce!==2&&Ce!==9||Te!==e||(Ce=7),vl(e)},r.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:ff(r)?(Ce=0,zt=null,Of(t)):(Ce=0,zt=null,ua(e,t,r,7));break;case 5:var i=null;switch(de.tag){case 26:i=de.memoizedState;case 5:case 27:var o=de;if(i?J_(i):o.stateNode.complete){Ce=0,zt=null;var c=o.sibling;if(c!==null)de=c;else{var u=o.return;u!==null?(de=u,Po(u)):de=null}break t}}Ce=0,zt=null,ua(e,t,r,5);break;case 6:Ce=0,zt=null,ua(e,t,r,6);break;case 8:dd(),Fe=6;break e;default:throw Error(B(462))}}hy();break}catch(d){N_(e,d)}while(!0);return zl=Gn=null,te.H=n,te.A=a,ve=l,de!==null?0:(Te=null,fe=0,Go(),Fe)}function hy(){for(;de!==null&&!O1();)D_(de)}function D_(e){var t=a_(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Po(e):de=t}function Of(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Af(l,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=Af(l,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:Wu(t);default:r_(l,t),t=de=rg(t,Vl),t=a_(l,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Po(e):de=t}function ua(e,t,l,n){zl=Gn=null,Wu(t),_a=null,Ur=0;var a=t.return;try{if(ty(e,a,t,l,fe)){Fe=1,go(e,Wt(l,e.current)),de=null;return}}catch(r){if(a!==null)throw de=a,r;Fe=1,go(e,Wt(l,e.current)),de=null;return}t.flags&32768?(me||n===1?e=!0:$a||fe&536870912?e=!1:(Pl=e=!0,(n===2||n===9||n===3||n===6)&&(n=$t.current,n!==null&&n.tag===13&&(n.flags|=16384))),R_(t,e)):Po(t)}function Po(e){var t=e;do{if(t.flags&32768){R_(t,Pl);return}e=t.return;var l=ay(t.alternate,t,Vl);if(l!==null){de=l;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Fe===0&&(Fe=5)}function R_(e,t){do{var l=ry(e.alternate,e);if(l!==null){l.flags&=32767,de=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=l}while(e!==null);Fe=6,de=null}function Bf(e,t,l,n,a,r,i,o,c){e.cancelPendingCommit=null;do es();while(Qe!==0);if(ve&6)throw Error(B(327));if(t!==null){if(t===e.current)throw Error(B(177));if(r=t.lanes|t.childLanes,r|=Ou,K1(e,l,r,i,o,c),e===Te&&(de=Te=null,fe=0),Da=t,cn=e,Ol=l,$c=r,Gc=a,C_=n,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,py(no,function(){return B_(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,t.subtreeFlags&13878||n){n=te.T,te.T=null,a=we.p,we.p=2,i=ve,ve|=4;try{iy(e,t,l)}finally{ve=i,we.p=a,te.T=n}}Qe=1,z_(),M_(),L_()}}function z_(){if(Qe===1){Qe=0;var e=cn,t=Da,l=(t.flags&13878)!==0;if(t.subtreeFlags&13878||l){l=te.T,te.T=null;var n=we.p;we.p=2;var a=ve;ve|=4;try{__(t,e);var r=Qc,i=Jm(e.containerInfo),o=r.focusedElem,c=r.selectionRange;if(i!==o&&o&&o.ownerDocument&&Wm(o.ownerDocument.documentElement,o)){if(c!==null&&Lu(o)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(d,o.value.length);else{var h=o.ownerDocument||document,f=h&&h.defaultView||window;if(f.getSelection){var _=f.getSelection(),y=o.textContent.length,p=Math.min(c.start,y),w=c.end===void 0?p:Math.min(c.end,y);!_.extend&&p>w&&(i=w,w=p,p=i);var m=af(o,p),g=af(o,w);if(m&&g&&(_.rangeCount!==1||_.anchorNode!==m.node||_.anchorOffset!==m.offset||_.focusNode!==g.node||_.focusOffset!==g.offset)){var b=h.createRange();b.setStart(m.node,m.offset),_.removeAllRanges(),p>w?(_.addRange(b),_.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),_.addRange(b))}}}}for(h=[],_=o;_=_.parentNode;)_.nodeType===1&&h.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<h.length;o++){var v=h[o];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}ko=!!Xc,Qc=Xc=null}finally{ve=a,we.p=n,te.T=l}}e.current=t,Qe=2}}function M_(){if(Qe===2){Qe=0;var e=cn,t=Da,l=(t.flags&8772)!==0;if(t.subtreeFlags&8772||l){l=te.T,te.T=null;var n=we.p;we.p=2;var a=ve;ve|=4;try{d_(e,t.alternate,t)}finally{ve=a,we.p=n,te.T=l}}Qe=3}}function L_(){if(Qe===4||Qe===3){Qe=0,B1();var e=cn,t=Da,l=Ol,n=C_;t.subtreeFlags&10256||t.flags&10256?Qe=5:(Qe=0,Da=cn=null,O_(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(sn=null),ku(l),t=t.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(Jr,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=te.T,a=we.p,we.p=2,te.T=null;try{for(var r=e.onRecoverableError,i=0;i<n.length;i++){var o=n[i];r(o.value,{componentStack:o.stack})}}finally{te.T=t,we.p=a}}Ol&3&&es(),vl(e),a=e.pendingLanes,l&261930&&a&42?e===Yc?jr++:(jr=0,Yc=e):jr=0,ri(0)}}function O_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,li(t)))}function es(){return z_(),M_(),L_(),B_()}function B_(){if(Qe!==5)return!1;var e=cn,t=$c;$c=0;var l=ku(Ol),n=te.T,a=we.p;try{we.p=32>l?32:l,te.T=null,l=Gc,Gc=null;var r=cn,i=Ol;if(Qe=0,Da=cn=null,Ol=0,ve&6)throw Error(B(331));var o=ve;if(ve|=4,w_(r.current),y_(r,r.current,i,l),ve=o,ri(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(Jr,r)}catch{}return!0}finally{we.p=a,te.T=n,O_(e,t)}}function Uf(e,t,l){t=Wt(l,t),t=Uc(e.stateNode,t,2),e=on(e,t,2),e!==null&&(Pr(e,2),vl(e))}function je(e,t,l){if(e.tag===3)Uf(e,e,l);else for(;t!==null;){if(t.tag===3){Uf(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(sn===null||!sn.has(n))){e=Wt(l,e),l=Ig(2),n=on(t,l,2),n!==null&&(Pg(l,n,t,e),Pr(n,2),vl(n));break}}t=t.return}}function Bs(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new cy;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(cd=!0,a.add(l),e=my.bind(null,e,t,l),t.then(e,e))}function my(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Te===e&&(fe&l)===l&&(Fe===4||Fe===3&&(fe&62914560)===fe&&300>Ut()-Jo?!(ve&2)&&Ra(e,0):ud|=l,Ta===fe&&(Ta=0)),vl(e)}function U_(e,t){t===0&&(t=Am()),e=$n(e,t),e!==null&&(Pr(e,t),vl(e))}function gy(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),U_(e,l)}function _y(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(B(314))}n!==null&&n.delete(t),U_(e,l)}function py(e,t){return Eu(e,t)}var wo=null,In=null,Kc=!1,xo=!1,Us=!1,tn=0;function vl(e){e!==In&&e.next===null&&(In===null?wo=In=e:In=In.next=e),xo=!0,Kc||(Kc=!0,by())}function ri(e,t){if(!Us&&xo){Us=!0;do for(var l=!1,n=wo;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var r=0;else{var i=n.suspendedLanes,o=n.pingedLanes;r=(1<<31-Ft(42|e)+1)-1,r&=a&~(i&~o),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(l=!0,Hf(n,r))}else r=fe,r=Fo(n,n===Te?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),!(r&3)||Ir(n,r)||(l=!0,Hf(n,r));n=n.next}while(l);Us=!1}}function yy(){H_()}function H_(){xo=Kc=!1;var e=0;tn!==0&&Ay()&&(e=tn);for(var t=Ut(),l=null,n=wo;n!==null;){var a=n.next,r=F_(n,t);r===0?(n.next=null,l===null?wo=a:l.next=a,a===null&&(In=l)):(l=n,(e!==0||r&3)&&(xo=!0)),n=a}Qe!==0&&Qe!==5||ri(e),tn!==0&&(tn=0)}function F_(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var i=31-Ft(r),o=1<<i,c=a[i];c===-1?(!(o&l)||o&n)&&(a[i]=Y1(o,t)):c<=t&&(e.expiredLanes|=o),r&=~o}if(t=Te,l=fe,l=Fo(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&fs(n),e.callbackNode=null,e.callbackPriority=0;if(!(l&3)||Ir(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&fs(n),ku(l)){case 2:case 8:l=Nm;break;case 32:l=no;break;case 268435456:l=km;break;default:l=no}return n=V_.bind(null,e),l=Eu(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&fs(n),e.callbackPriority=2,e.callbackNode=null,2}function V_(e,t){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(es()&&e.callbackNode!==l)return null;var n=fe;return n=Fo(e,e===Te?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(E_(e,n,t),F_(e,Ut()),e.callbackNode!=null&&e.callbackNode===l?V_.bind(null,e):null)}function Hf(e,t){if(es())return null;E_(e,t,!0)}function by(){Dy(function(){ve&6?Eu(Em,yy):H_()})}function fd(){if(tn===0){var e=Na;e===0&&(e=fi,fi<<=1,!(fi&261888)&&(fi=256)),tn=e}return tn}function Ff(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Li(""+e)}function Vf(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 vy(e,t,l,n,a){if(t==="submit"&&l&&l.stateNode===a){var r=Ff((a[St]||null).action),i=n.submitter;i&&(t=(t=i[St]||null)?Ff(t.formAction):i.getAttribute("formAction"),t!==null&&(r=t,i=null));var o=new Vo("action","action",null,n,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(tn!==0){var c=i?Vf(a,i):new FormData(a);Oc(l,{pending:!0,data:c,method:a.method,action:r},null,c)}}else typeof r=="function"&&(o.preventDefault(),c=i?Vf(a,i):new FormData(a),Oc(l,{pending:!0,data:c,method:a.method,action:r},r,c))},currentTarget:a}]})}}for(var Hs=0;Hs<Cc.length;Hs++){var Fs=Cc[Hs],wy=Fs.toLowerCase(),xy=Fs[0].toUpperCase()+Fs.slice(1);dl(wy,"on"+xy)}dl(Pm,"onAnimationEnd");dl(eg,"onAnimationIteration");dl(tg,"onAnimationStart");dl("dblclick","onDoubleClick");dl("focusin","onFocus");dl("focusout","onBlur");dl(U0,"onTransitionRun");dl(H0,"onTransitionStart");dl(F0,"onTransitionCancel");dl(lg,"onTransitionEnd");ja("onMouseEnter",["mouseout","mouseover"]);ja("onMouseLeave",["mouseout","mouseover"]);ja("onPointerEnter",["pointerout","pointerover"]);ja("onPointerLeave",["pointerout","pointerover"]);Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="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(" "),Sy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vr));function q_(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],a=n.event;n=n.listeners;e:{var r=void 0;if(t)for(var i=n.length-1;0<=i;i--){var o=n[i],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==r&&a.isPropagationStopped())break e;r=o,a.currentTarget=u;try{r(a)}catch(d){ro(d)}a.currentTarget=null,r=c}else for(i=0;i<n.length;i++){if(o=n[i],c=o.instance,u=o.currentTarget,o=o.listener,c!==r&&a.isPropagationStopped())break e;r=o,a.currentTarget=u;try{r(a)}catch(d){ro(d)}a.currentTarget=null,r=c}}}}function ue(e,t){var l=t[_c];l===void 0&&(l=t[_c]=new Set);var n=e+"__bubble";l.has(n)||($_(t,e,2,!1),l.add(n))}function Vs(e,t,l){var n=0;t&&(n|=4),$_(l,e,n,t)}var xi="_reactListening"+Math.random().toString(36).slice(2);function hd(e){if(!e[xi]){e[xi]=!0,Mm.forEach(function(l){l!=="selectionchange"&&(Sy.has(l)||Vs(l,!1,e),Vs(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xi]||(t[xi]=!0,Vs("selectionchange",!1,t))}}function $_(e,t,l,n){switch(lp(t)){case 2:var a=Jy;break;case 8:a=Iy;break;default:a=pd}l=a.bind(null,t,l,e),a=void 0,!wc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,l,{capture:!0,passive:a}):e.addEventListener(t,l,!0):a!==void 0?e.addEventListener(t,l,{passive:a}):e.addEventListener(t,l,!1)}function qs(e,t,l,n,a){var r=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var o=n.stateNode.containerInfo;if(o===a)break;if(i===4)for(i=n.return;i!==null;){var c=i.tag;if((c===3||c===4)&&i.stateNode.containerInfo===a)return;i=i.return}for(;o!==null;){if(i=ta(o),i===null)return;if(c=i.tag,c===5||c===6||c===26||c===27){n=r=i;continue e}o=o.parentNode}}n=n.return}qm(function(){var u=r,d=Du(l),h=[];e:{var f=ng.get(e);if(f!==void 0){var _=Vo,y=e;switch(e){case"keypress":if(Bi(l)===0)break e;case"keydown":case"keyup":_=_0;break;case"focusin":y="focus",_=ps;break;case"focusout":y="blur",_=ps;break;case"beforeblur":case"afterblur":_=ps;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":_=Xd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=a0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=b0;break;case Pm:case eg:case tg:_=o0;break;case lg:_=w0;break;case"scroll":case"scrollend":_=l0;break;case"wheel":_=S0;break;case"copy":case"cut":case"paste":_=c0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Wd;break;case"toggle":case"beforetoggle":_=j0}var p=(t&4)!==0,w=!p&&(e==="scroll"||e==="scrollend"),m=p?f!==null?f+"Capture":null:f;p=[];for(var g=u,b;g!==null;){var v=g;if(b=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||b===null||m===null||(v=zr(g,m),v!=null&&p.push(qr(g,v,b))),w)break;g=g.return}0<p.length&&(f=new _(f,y,null,l,d),h.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",f&&l!==vc&&(y=l.relatedTarget||l.fromElement)&&(ta(y)||y[Ha]))break e;if((_||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,_?(y=l.relatedTarget||l.toElement,_=u,y=y?ta(y):null,y!==null&&(w=Wr(y),p=y.tag,y!==w||p!==5&&p!==27&&p!==6)&&(y=null)):(_=null,y=u),_!==y)){if(p=Xd,v="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(p=Wd,v="onPointerLeave",m="onPointerEnter",g="pointer"),w=_==null?f:or(_),b=y==null?f:or(y),f=new p(v,g+"leave",_,l,d),f.target=w,f.relatedTarget=b,v=null,ta(d)===u&&(p=new p(m,g+"enter",y,l,d),p.target=b,p.relatedTarget=w,v=p),w=v,_&&y)t:{for(p=Cy,m=_,g=y,b=0,v=m;v;v=p(v))b++;v=0;for(var C=g;C;C=p(C))v++;for(;0<b-v;)m=p(m),b--;for(;0<v-b;)g=p(g),v--;for(;b--;){if(m===g||g!==null&&m===g.alternate){p=m;break t}m=p(m),g=p(g)}p=null}else p=null;_!==null&&qf(h,f,_,p,!1),y!==null&&w!==null&&qf(h,w,y,p,!0)}}e:{if(f=u?or(u):window,_=f.nodeName&&f.nodeName.toLowerCase(),_==="select"||_==="input"&&f.type==="file")var k=ef;else if(Pd(f))if(Xm)k=L0;else{k=z0;var E=R0}else _=f.nodeName,!_||_.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Tu(u.elementType)&&(k=ef):k=M0;if(k&&(k=k(e,u))){Zm(h,k,l,d);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&bc(f,"number",f.value)}switch(E=u?or(u):window,e){case"focusin":(Pd(E)||E.contentEditable==="true")&&(aa=E,xc=u,_r=null);break;case"focusout":_r=xc=aa=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,rf(h,l,d);break;case"selectionchange":if(B0)break;case"keydown":case"keyup":rf(h,l,d)}var D;if(Mu)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else na?Ym(e,l)&&(M="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(M="onCompositionStart");M&&(Gm&&l.locale!=="ko"&&(na||M!=="onCompositionStart"?M==="onCompositionEnd"&&na&&(D=$m()):(Il=d,Ru="value"in Il?Il.value:Il.textContent,na=!0)),E=So(u,M),0<E.length&&(M=new Qd(M,e,null,l,d),h.push({event:M,listeners:E}),D?M.data=D:(D=Km(l),D!==null&&(M.data=D)))),(D=N0?k0(e,l):A0(e,l))&&(M=So(u,"onBeforeInput"),0<M.length&&(E=new Qd("onBeforeInput","beforeinput",null,l,d),h.push({event:E,listeners:M}),E.data=D)),vy(h,e,u,l,d)}q_(h,t)})}function qr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function So(e,t){for(var l=t+"Capture",n=[];e!==null;){var a=e,r=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||r===null||(a=zr(e,l),a!=null&&n.unshift(qr(e,a,r)),a=zr(e,t),a!=null&&n.push(qr(e,a,r))),e.tag===3)return n;e=e.return}return[]}function Cy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qf(e,t,l,n,a){for(var r=t._reactName,i=[];l!==null&&l!==n;){var o=l,c=o.alternate,u=o.stateNode;if(o=o.tag,c!==null&&c===n)break;o!==5&&o!==26&&o!==27||u===null||(c=u,a?(u=zr(l,r),u!=null&&i.unshift(qr(l,u,c))):a||(u=zr(l,r),u!=null&&i.push(qr(l,u,c)))),l=l.return}i.length!==0&&e.push({event:t,listeners:i})}var jy=/\r\n?/g,Ey=/\u0000|\uFFFD/g;function $f(e){return(typeof e=="string"?e:""+e).replace(jy,`
`).replace(Ey,"")}function G_(e,t){return t=$f(t),$f(e)===t}function Ne(e,t,l,n,a,r){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Ea(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Ea(e,""+n);break;case"className":gi(e,"class",n);break;case"tabIndex":gi(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":gi(e,l,n);break;case"style":Vm(e,n,r);break;case"data":if(t!=="object"){gi(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Li(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(l==="formAction"?(t!=="input"&&Ne(e,t,"name",a.name,a,null),Ne(e,t,"formEncType",a.formEncType,a,null),Ne(e,t,"formMethod",a.formMethod,a,null),Ne(e,t,"formTarget",a.formTarget,a,null)):(Ne(e,t,"encType",a.encType,a,null),Ne(e,t,"method",a.method,a,null),Ne(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Li(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=Rl);break;case"onScroll":n!=null&&ue("scroll",e);break;case"onScrollEnd":n!=null&&ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(B(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(B(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=Li(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":ue("beforetoggle",e),ue("toggle",e),Mi(e,"popover",n);break;case"xlinkActuate":wl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":wl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":wl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":wl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":wl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":wl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":wl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":wl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":wl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Mi(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=e0.get(l)||l,Mi(e,l,n))}}function Zc(e,t,l,n,a,r){switch(l){case"style":Vm(e,n,r);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(B(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(B(60));e.innerHTML=l}}break;case"children":typeof n=="string"?Ea(e,n):(typeof n=="number"||typeof n=="bigint")&&Ea(e,""+n);break;case"onScroll":n!=null&&ue("scroll",e);break;case"onScrollEnd":n!=null&&ue("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Rl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),t=l.slice(2,a?l.length-7:void 0),r=e[St]||null,r=r!=null?r[l]:null,typeof r=="function"&&e.removeEventListener(t,r,a),typeof n=="function")){typeof r!="function"&&r!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,a);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Mi(e,l,n)}}}function st(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ue("error",e),ue("load",e);var n=!1,a=!1,r;for(r in l)if(l.hasOwnProperty(r)){var i=l[r];if(i!=null)switch(r){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(B(137,t));default:Ne(e,t,r,i,l,null)}}a&&Ne(e,t,"srcSet",l.srcSet,l,null),n&&Ne(e,t,"src",l.src,l,null);return;case"input":ue("invalid",e);var o=r=i=a=null,c=null,u=null;for(n in l)if(l.hasOwnProperty(n)){var d=l[n];if(d!=null)switch(n){case"name":a=d;break;case"type":i=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(B(137,t));break;default:Ne(e,t,n,d,l,null)}}Um(e,r,o,c,u,i,a,!1);return;case"select":ue("invalid",e),n=i=r=null;for(a in l)if(l.hasOwnProperty(a)&&(o=l[a],o!=null))switch(a){case"value":r=o;break;case"defaultValue":i=o;break;case"multiple":n=o;default:Ne(e,t,a,o,l,null)}t=r,l=i,e.multiple=!!n,t!=null?ha(e,!!n,t,!1):l!=null&&ha(e,!!n,l,!0);return;case"textarea":ue("invalid",e),r=a=n=null;for(i in l)if(l.hasOwnProperty(i)&&(o=l[i],o!=null))switch(i){case"value":n=o;break;case"defaultValue":a=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(B(91));break;default:Ne(e,t,i,o,l,null)}Fm(e,n,a,r);return;case"option":for(c in l)if(l.hasOwnProperty(c)&&(n=l[c],n!=null))switch(c){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Ne(e,t,c,n,l,null)}return;case"dialog":ue("beforetoggle",e),ue("toggle",e),ue("cancel",e),ue("close",e);break;case"iframe":case"object":ue("load",e);break;case"video":case"audio":for(n=0;n<Vr.length;n++)ue(Vr[n],e);break;case"image":ue("error",e),ue("load",e);break;case"details":ue("toggle",e);break;case"embed":case"source":case"link":ue("error",e),ue("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(u in l)if(l.hasOwnProperty(u)&&(n=l[u],n!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(B(137,t));default:Ne(e,t,u,n,l,null)}return;default:if(Tu(t)){for(d in l)l.hasOwnProperty(d)&&(n=l[d],n!==void 0&&Zc(e,t,d,n,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(n=l[o],n!=null&&Ne(e,t,o,n,l,null))}function Ny(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,r=null,i=null,o=null,c=null,u=null,d=null;for(_ in l){var h=l[_];if(l.hasOwnProperty(_)&&h!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":c=h;default:n.hasOwnProperty(_)||Ne(e,t,_,null,n,h)}}for(var f in n){var _=n[f];if(h=l[f],n.hasOwnProperty(f)&&(_!=null||h!=null))switch(f){case"type":r=_;break;case"name":a=_;break;case"checked":u=_;break;case"defaultChecked":d=_;break;case"value":i=_;break;case"defaultValue":o=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(B(137,t));break;default:_!==h&&Ne(e,t,f,_,n,h)}}yc(e,i,o,c,u,d,r,a);return;case"select":_=i=o=f=null;for(r in l)if(c=l[r],l.hasOwnProperty(r)&&c!=null)switch(r){case"value":break;case"multiple":_=c;default:n.hasOwnProperty(r)||Ne(e,t,r,null,n,c)}for(a in n)if(r=n[a],c=l[a],n.hasOwnProperty(a)&&(r!=null||c!=null))switch(a){case"value":f=r;break;case"defaultValue":o=r;break;case"multiple":i=r;default:r!==c&&Ne(e,t,a,r,n,c)}t=o,l=i,n=_,f!=null?ha(e,!!l,f,!1):!!n!=!!l&&(t!=null?ha(e,!!l,t,!0):ha(e,!!l,l?[]:"",!1));return;case"textarea":_=f=null;for(o in l)if(a=l[o],l.hasOwnProperty(o)&&a!=null&&!n.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ne(e,t,o,null,n,a)}for(i in n)if(a=n[i],r=l[i],n.hasOwnProperty(i)&&(a!=null||r!=null))switch(i){case"value":f=a;break;case"defaultValue":_=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(B(91));break;default:a!==r&&Ne(e,t,i,a,n,r)}Hm(e,f,_);return;case"option":for(var y in l)if(f=l[y],l.hasOwnProperty(y)&&f!=null&&!n.hasOwnProperty(y))switch(y){case"selected":e.selected=!1;break;default:Ne(e,t,y,null,n,f)}for(c in n)if(f=n[c],_=l[c],n.hasOwnProperty(c)&&f!==_&&(f!=null||_!=null))switch(c){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Ne(e,t,c,f,n,_)}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 p in l)f=l[p],l.hasOwnProperty(p)&&f!=null&&!n.hasOwnProperty(p)&&Ne(e,t,p,null,n,f);for(u in n)if(f=n[u],_=l[u],n.hasOwnProperty(u)&&f!==_&&(f!=null||_!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(B(137,t));break;default:Ne(e,t,u,f,n,_)}return;default:if(Tu(t)){for(var w in l)f=l[w],l.hasOwnProperty(w)&&f!==void 0&&!n.hasOwnProperty(w)&&Zc(e,t,w,void 0,n,f);for(d in n)f=n[d],_=l[d],!n.hasOwnProperty(d)||f===_||f===void 0&&_===void 0||Zc(e,t,d,f,n,_);return}}for(var m in l)f=l[m],l.hasOwnProperty(m)&&f!=null&&!n.hasOwnProperty(m)&&Ne(e,t,m,null,n,f);for(h in n)f=n[h],_=l[h],!n.hasOwnProperty(h)||f===_||f==null&&_==null||Ne(e,t,h,f,n,_)}function Gf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ky(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],r=a.transferSize,i=a.initiatorType,o=a.duration;if(r&&o&&Gf(i)){for(i=0,o=a.responseEnd,n+=1;n<l.length;n++){var c=l[n],u=c.startTime;if(u>o)break;var d=c.transferSize,h=c.initiatorType;d&&Gf(h)&&(c=c.responseEnd,i+=d*(c<o?1:(o-u)/(c-u)))}if(--n,t+=8*(r+i)/(a.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 Xc=null,Qc=null;function Co(e){return e.nodeType===9?e:e.ownerDocument}function Yf(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 Y_(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 Wc(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 $s=null;function Ay(){var e=window.event;return e&&e.type==="popstate"?e===$s?!1:($s=e,!0):($s=null,!1)}var K_=typeof setTimeout=="function"?setTimeout:void 0,Ty=typeof clearTimeout=="function"?clearTimeout:void 0,Kf=typeof Promise=="function"?Promise:void 0,Dy=typeof queueMicrotask=="function"?queueMicrotask:typeof Kf<"u"?function(e){return Kf.resolve(null).then(e).catch(Ry)}:K_;function Ry(e){setTimeout(function(){throw e})}function yn(e){return e==="head"}function Zf(e,t){var l=t,n=0;do{var a=l.nextSibling;if(e.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(a),Ma(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Er(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Er(l);for(var r=l.firstChild;r;){var i=r.nextSibling,o=r.nodeName;r[ei]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&r.rel.toLowerCase()==="stylesheet"||l.removeChild(r),r=i}}else l==="body"&&Er(e.ownerDocument.body);l=a}while(l);Ma(t)}function Xf(e,t){var l=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Jc(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":Jc(l),Au(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function zy(e,t,l,n){for(;e.nodeType===1;){var a=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ei])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=el(e.nextSibling),e===null)break}return null}function My(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=el(e.nextSibling),e===null))return null;return e}function Z_(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=el(e.nextSibling),e===null))return null;return e}function Ic(e){return e.data==="$?"||e.data==="$~"}function Pc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ly(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function el(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 eu=null;function Qf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return el(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Wf(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 X_(e,t,l){switch(t=Co(l),e){case"html":if(e=t.documentElement,!e)throw Error(B(452));return e;case"head":if(e=t.head,!e)throw Error(B(453));return e;case"body":if(e=t.body,!e)throw Error(B(454));return e;default:throw Error(B(451))}}function Er(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Au(e)}var tl=new Map,Jf=new Set;function jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ql=we.d;we.d={f:Oy,r:By,D:Uy,C:Hy,L:Fy,m:Vy,X:$y,S:qy,M:Gy};function Oy(){var e=ql.f(),t=Io();return e||t}function By(e){var t=Fa(e);t!==null&&t.tag===5&&t.type==="form"?Vg(t):ql.r(e)}var Ga=typeof document>"u"?null:document;function Q_(e,t,l){var n=Ga;if(n&&typeof t=="string"&&t){var a=Qt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Jf.has(a)||(Jf.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),st(t,"link",e),Pe(t),n.head.appendChild(t)))}}function Uy(e){ql.D(e),Q_("dns-prefetch",e,null)}function Hy(e,t){ql.C(e,t),Q_("preconnect",e,t)}function Fy(e,t,l){ql.L(e,t,l);var n=Ga;if(n&&e&&t){var a='link[rel="preload"][as="'+Qt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Qt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Qt(l.imageSizes)+'"]')):a+='[href="'+Qt(e)+'"]';var r=a;switch(t){case"style":r=za(e);break;case"script":r=Ya(e)}tl.has(r)||(e=Oe({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),tl.set(r,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(ii(r))||t==="script"&&n.querySelector(oi(r))||(t=n.createElement("link"),st(t,"link",e),Pe(t),n.head.appendChild(t)))}}function Vy(e,t){ql.m(e,t);var l=Ga;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Qt(n)+'"][href="'+Qt(e)+'"]',r=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Ya(e)}if(!tl.has(r)&&(e=Oe({rel:"modulepreload",href:e},t),tl.set(r,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(oi(r)))return}n=l.createElement("link"),st(n,"link",e),Pe(n),l.head.appendChild(n)}}}function qy(e,t,l){ql.S(e,t,l);var n=Ga;if(n&&e){var a=fa(n).hoistableStyles,r=za(e);t=t||"default";var i=a.get(r);if(!i){var o={loading:0,preload:null};if(i=n.querySelector(ii(r)))o.loading=5;else{e=Oe({rel:"stylesheet",href:e,"data-precedence":t},l),(l=tl.get(r))&&md(e,l);var c=i=n.createElement("link");Pe(c),st(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Yi(i,t,n)}i={type:"stylesheet",instance:i,count:1,state:o},a.set(r,i)}}}function $y(e,t){ql.X(e,t);var l=Ga;if(l&&e){var n=fa(l).hoistableScripts,a=Ya(e),r=n.get(a);r||(r=l.querySelector(oi(a)),r||(e=Oe({src:e,async:!0},t),(t=tl.get(a))&&gd(e,t),r=l.createElement("script"),Pe(r),st(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(a,r))}}function Gy(e,t){ql.M(e,t);var l=Ga;if(l&&e){var n=fa(l).hoistableScripts,a=Ya(e),r=n.get(a);r||(r=l.querySelector(oi(a)),r||(e=Oe({src:e,async:!0,type:"module"},t),(t=tl.get(a))&&gd(e,t),r=l.createElement("script"),Pe(r),st(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(a,r))}}function If(e,t,l,n){var a=(a=nn.current)?jo(a):null;if(!a)throw Error(B(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=za(l.href),l=fa(a).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=za(l.href);var r=fa(a).hoistableStyles,i=r.get(e);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,i),(r=a.querySelector(ii(e)))&&!r._p&&(i.instance=r,i.state.loading=5),tl.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},tl.set(e,l),r||Yy(a,e,l,i.state))),t&&n===null)throw Error(B(528,""));return i}if(t&&n!==null)throw Error(B(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ya(l),l=fa(a).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(B(444,e))}}function za(e){return'href="'+Qt(e)+'"'}function ii(e){return'link[rel="stylesheet"]['+e+"]"}function W_(e){return Oe({},e,{"data-precedence":e.precedence,precedence:null})}function Yy(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),st(t,"link",l),Pe(t),e.head.appendChild(t))}function Ya(e){return'[src="'+Qt(e)+'"]'}function oi(e){return"script[async]"+e}function Pf(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Qt(l.href)+'"]');if(n)return t.instance=n,Pe(n),n;var a=Oe({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Pe(n),st(n,"style",a),Yi(n,l.precedence,e),t.instance=n;case"stylesheet":a=za(l.href);var r=e.querySelector(ii(a));if(r)return t.state.loading|=4,t.instance=r,Pe(r),r;n=W_(l),(a=tl.get(a))&&md(n,a),r=(e.ownerDocument||e).createElement("link"),Pe(r);var i=r;return i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),st(r,"link",n),t.state.loading|=4,Yi(r,l.precedence,e),t.instance=r;case"script":return r=Ya(l.src),(a=e.querySelector(oi(r)))?(t.instance=a,Pe(a),a):(n=l,(a=tl.get(r))&&(n=Oe({},l),gd(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),Pe(a),st(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(B(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(n=t.instance,t.state.loading|=4,Yi(n,l.precedence,e));return t.instance}function Yi(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,r=a,i=0;i<n.length;i++){var o=n[i];if(o.dataset.precedence===t)r=o;else if(r!==a)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function md(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ki=null;function eh(e,t,l){if(Ki===null){var n=new Map,a=Ki=new Map;a.set(l,n)}else a=Ki,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),a=0;a<l.length;a++){var r=l[a];if(!(r[ei]||r[nt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var i=r.getAttribute(t)||"";i=e+i;var o=n.get(i);o?o.push(r):n.set(i,[r])}}return n}function th(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Ky(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 J_(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function Zy(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(l.state.loading&4)){if(l.instance===null){var a=za(n.href),r=t.querySelector(ii(a));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Eo.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=r,Pe(r);return}r=t.ownerDocument||t,n=W_(n),(a=tl.get(a))&&md(n,a),r=r.createElement("link"),Pe(r);var i=r;i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),st(r,"link",n),l.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&!(l.state.loading&3)&&(e.count++,l=Eo.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Gs=0;function Xy(e,t){return e.stylesheets&&e.count===0&&Zi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&Zi(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Gs===0&&(Gs=62500*ky());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zi(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Gs?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Eo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var No=null;function Zi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,No=new Map,t.forEach(Qy,e),No=null,Eo.call(e))}function Qy(e,t){if(!(t.state.loading&4)){var l=No.get(e);if(l)var n=l.get(null);else{l=new Map,No.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<a.length;r++){var i=a[r];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),n=i)}n&&l.set(null,n)}a=t.instance,i=a.getAttribute("data-precedence"),r=l.get(i)||n,r===n&&l.set(null,a),l.set(i,a),this.count++,n=Eo.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),r?r.parentNode.insertBefore(a,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var $r={$$typeof:Dl,Provider:null,Consumer:null,_currentValue:Nn,_currentValue2:Nn,_threadCount:0};function Wy(e,t,l,n,a,r,i,o,c){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=hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hs(0),this.hiddenUpdates=hs(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=r,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function I_(e,t,l,n,a,r,i,o,c,u,d,h){return e=new Wy(e,t,l,i,c,u,d,h,o),t=1,r===!0&&(t|=24),r=Ot(3,null,null,t),e.current=r,r.stateNode=e,t=Vu(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:n,isDehydrated:l,cache:t},Gu(r),e}function P_(e){return e?(e=oa,e):oa}function ep(e,t,l,n,a,r){a=P_(a),n.context===null?n.context=a:n.pendingContext=a,n=rn(t),n.payload={element:l},r=r===void 0?null:r,r!==null&&(n.callback=r),l=on(e,n,t),l!==null&&(xt(l,e,t),yr(l,e,t))}function lh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function _d(e,t){lh(e,t),(e=e.alternate)&&lh(e,t)}function tp(e){if(e.tag===13||e.tag===31){var t=$n(e,67108864);t!==null&&xt(t,e,67108864),_d(e,67108864)}}function nh(e){if(e.tag===13||e.tag===31){var t=Vt();t=Nu(t);var l=$n(e,t);l!==null&&xt(l,e,t),_d(e,t)}}var ko=!0;function Jy(e,t,l,n){var a=te.T;te.T=null;var r=we.p;try{we.p=2,pd(e,t,l,n)}finally{we.p=r,te.T=a}}function Iy(e,t,l,n){var a=te.T;te.T=null;var r=we.p;try{we.p=8,pd(e,t,l,n)}finally{we.p=r,te.T=a}}function pd(e,t,l,n){if(ko){var a=tu(n);if(a===null)qs(e,t,n,Ao,l),ah(e,n);else if(eb(a,e,t,l,n))n.stopPropagation();else if(ah(e,n),t&4&&-1<Py.indexOf(e)){for(;a!==null;){var r=Fa(a);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var i=wn(r.pendingLanes);if(i!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var c=1<<31-Ft(i);o.entanglements[1]|=c,i&=~c}vl(r),!(ve&6)&&(yo=Ut()+500,ri(0))}}break;case 31:case 13:o=$n(r,2),o!==null&&xt(o,r,2),Io(),_d(r,2)}if(r=tu(n),r===null&&qs(e,t,n,Ao,l),r===a)break;a=r}a!==null&&n.stopPropagation()}else qs(e,t,n,null,l)}}function tu(e){return e=Du(e),yd(e)}var Ao=null;function yd(e){if(Ao=null,e=ta(e),e!==null){var t=Wr(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=wm(t),e!==null)return e;e=null}else if(l===31){if(e=xm(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 Ao=e,null}function lp(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(U1()){case Em:return 2;case Nm:return 8;case no:case H1:return 32;case km:return 268435456;default:return 32}default:return 32}}var lu=!1,un=null,dn=null,fn=null,Gr=new Map,Yr=new Map,Wl=[],Py="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 ah(e,t){switch(e){case"focusin":case"focusout":un=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":Gr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yr.delete(t.pointerId)}}function er(e,t,l,n,a,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:r,targetContainers:[a]},t!==null&&(t=Fa(t),t!==null&&tp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function eb(e,t,l,n,a){switch(t){case"focusin":return un=er(un,e,t,l,n,a),!0;case"dragenter":return dn=er(dn,e,t,l,n,a),!0;case"mouseover":return fn=er(fn,e,t,l,n,a),!0;case"pointerover":var r=a.pointerId;return Gr.set(r,er(Gr.get(r)||null,e,t,l,n,a)),!0;case"gotpointercapture":return r=a.pointerId,Yr.set(r,er(Yr.get(r)||null,e,t,l,n,a)),!0}return!1}function np(e){var t=ta(e.target);if(t!==null){var l=Wr(t);if(l!==null){if(t=l.tag,t===13){if(t=wm(l),t!==null){e.blockedOn=t,Vd(e.priority,function(){nh(l)});return}}else if(t===31){if(t=xm(l),t!==null){e.blockedOn=t,Vd(e.priority,function(){nh(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 Xi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=tu(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);vc=n,l.target.dispatchEvent(n),vc=null}else return t=Fa(l),t!==null&&tp(t),e.blockedOn=l,!1;t.shift()}return!0}function rh(e,t,l){Xi(e)&&l.delete(t)}function tb(){lu=!1,un!==null&&Xi(un)&&(un=null),dn!==null&&Xi(dn)&&(dn=null),fn!==null&&Xi(fn)&&(fn=null),Gr.forEach(rh),Yr.forEach(rh)}function Si(e,t){e.blockedOn===t&&(e.blockedOn=null,lu||(lu=!0,Je.unstable_scheduleCallback(Je.unstable_NormalPriority,tb)))}var Ci=null;function ih(e){Ci!==e&&(Ci=e,Je.unstable_scheduleCallback(Je.unstable_NormalPriority,function(){Ci===e&&(Ci=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(yd(n||l)===null)continue;break}var r=Fa(l);r!==null&&(e.splice(t,3),t-=3,Oc(r,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Ma(e){function t(c){return Si(c,e)}un!==null&&Si(un,e),dn!==null&&Si(dn,e),fn!==null&&Si(fn,e),Gr.forEach(t),Yr.forEach(t);for(var l=0;l<Wl.length;l++){var n=Wl[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Wl.length&&(l=Wl[0],l.blockedOn===null);)np(l),l.blockedOn===null&&Wl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],r=l[n+1],i=a[St]||null;if(typeof r=="function")i||ih(l);else if(i){var o=null;if(r&&r.hasAttribute("formAction")){if(a=r,i=r[St]||null)o=i.formAction;else if(yd(a)!==null)continue}else o=i.action;typeof o=="function"?l[n+1]=o:(l.splice(n,3),n-=3),ih(l)}}}function ap(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(i){return a=i})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function bd(e){this._internalRoot=e}ts.prototype.render=bd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));var l=t.current,n=Vt();ep(l,n,e,t,null,null)};ts.prototype.unmount=bd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ep(e.current,2,null,e,null,null),Io(),t[Ha]=null}};function ts(e){this._internalRoot=e}ts.prototype.unstable_scheduleHydration=function(e){if(e){var t=zm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Wl.length&&t!==0&&t<Wl[l].priority;l++);Wl.splice(l,0,e),l===0&&np(e)}};var oh=bm.version;if(oh!=="19.2.6")throw Error(B(527,oh,"19.2.6"));we.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=D1(t),e=e!==null?Sm(e):null,e=e===null?null:e.stateNode,e};var lb={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:te,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ji=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ji.isDisabled&&ji.supportsFiber)try{Jr=ji.inject(lb),Ht=ji}catch{}}Uo.createRoot=function(e,t){if(!vm(e))throw Error(B(299));var l=!1,n="",a=Qg,r=Wg,i=Jg;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=I_(e,1,!1,null,null,l,n,null,a,r,i,ap),e[Ha]=t.current,hd(e),new bd(t)};Uo.hydrateRoot=function(e,t,l){if(!vm(e))throw Error(B(299));var n=!1,a="",r=Qg,i=Wg,o=Jg,c=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(r=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(c=l.formState)),t=I_(e,1,!0,t,l??null,n,a,c,r,i,o,ap),t.context=P_(null),l=t.current,n=Vt(),n=Nu(n),a=rn(n),a.callback=null,on(l,a,n),l=n,t.current.lanes=l,Pr(t,l),vl(t),e[Ha]=t.current,hd(e),new ts(t)};Uo.version="19.2.6";function rp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rp)}catch(e){console.error(e)}}rp(),hm.exports=Uo;var nb=hm.exports;const sh=new Map;function ip(e){let t=sh.get(e);return t||(t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),sh.set(e,t)),t}function op(e){try{return ip(e),!0}catch{return!1}}function ab(){try{const e=Intl.supportedValuesOf("timeZone"),t=new Set(e),l=["UTC","GMT"];for(const n of l)t.add(n);return Array.from(t)}catch(e){return console.log(e),[]}}function sp(e,t){const l={};for(const n of ip(t).formatToParts(new Date(e)))l[n.type]=n.value|0;return[l.year,l.month,l.day,l.hour,l.minute,l.second]}const rb=Object.freeze(Object.defineProperty({__proto__:null,ic_tz_all:ab,ic_tz_parts:sp,ic_tz_validate:op},Symbol.toStringTag,{value:"Module"}));var Ge;(function(e){e.All="All",e.Inner="Inner",e.Outer="Outer",e.Top="Top",e.Right="Right",e.Bottom="Bottom",e.Left="Left",e.CenterH="CenterH",e.CenterV="CenterV",e.None="None"})(Ge||(Ge={}));var Rt;(function(e){e.Thin="thin",e.Medium="medium",e.Thick="thick",e.Double="double",e.Dotted="dotted",e.SlantDashDot="slantdashdot",e.MediumDashed="mediumdashed",e.MediumDashDotDot="mediumdashdotdot",e.MediumDashDot="mediumdashdot"})(Rt||(Rt={}));class La{static __wrap(t){t=t>>>0;const l=Object.create(La.prototype);return l.__wbg_ptr=t,Ys.register(l,l.__wbg_ptr,l),l}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ys.unregister(this),t}free(){const t=this.__destroy_into_raw();j.__wbg_model_free(t,0)}addConditionalFormatting(t,l,n){const a=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae,i=j.model_addConditionalFormatting(this.__wbg_ptr,t,a,r,n);if(i[1])throw F(i[0])}applyExternalDiffs(t){const l=ch(t,j.__wbindgen_malloc),n=ae,a=j.model_applyExternalDiffs(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}autoFillColumns(t,l){const n=j.model_autoFillColumns(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}autoFillRows(t,l){const n=j.model_autoFillRows(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}canRedo(){return j.model_canRedo(this.__wbg_ptr)!==0}canUndo(){return j.model_canUndo(this.__wbg_ptr)!==0}copyToClipboard(){const t=j.model_copyToClipboard(this.__wbg_ptr);if(t[2])throw F(t[1]);return F(t[0])}createNamedStyle(t,l){const n=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),a=ae,r=j.model_createNamedStyle(this.__wbg_ptr,n,a,l);if(r[1])throw F(r[0])}deleteColumns(t,l,n){const a=j.model_deleteColumns(this.__wbg_ptr,t,l,n);if(a[1])throw F(a[0])}deleteConditionalFormatting(t,l){const n=j.model_deleteConditionalFormatting(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}deleteDefinedName(t,l){const n=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),a=ae,r=j.model_deleteDefinedName(this.__wbg_ptr,n,a,il(l)?4294967297:l>>>0);if(r[1])throw F(r[0])}deleteNamedStyle(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_deleteNamedStyle(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}deleteRows(t,l,n){const a=j.model_deleteRows(this.__wbg_ptr,t,l,n);if(a[1])throw F(a[0])}deleteSheet(t){const l=j.model_deleteSheet(this.__wbg_ptr,t);if(l[1])throw F(l[0])}evaluate(){j.model_evaluate(this.__wbg_ptr)}flushSendQueue(){const t=j.model_flushSendQueue(this.__wbg_ptr);var l=au(t[0],t[1]).slice();return j.__wbindgen_free(t[0],t[1]*1,1),l}static from_bytes(t,l){const n=ch(t,j.__wbindgen_malloc),a=ae,r=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),i=ae,o=j.model_from_bytes(n,a,r,i);if(o[2])throw F(o[1]);return La.__wrap(o[0])}getBuiltinNamedStyles(){const t=j.model_getBuiltinNamedStyles(this.__wbg_ptr);if(t[2])throw F(t[1]);return F(t[0])}getCellArrayStructure(t,l,n){const a=j.model_getCellArrayStructure(this.__wbg_ptr,t,l,n);if(a[2])throw F(a[1]);return F(a[0])}getCellContent(t,l,n){let a,r;try{const c=j.model_getCellContent(this.__wbg_ptr,t,l,n);var i=c[0],o=c[1];if(c[3])throw i=0,o=0,F(c[2]);return a=i,r=o,Lt(i,o)}finally{j.__wbindgen_free(a,r,1)}}getCellStyle(t,l,n){const a=j.model_getCellStyle(this.__wbg_ptr,t,l,n);if(a[2])throw F(a[1]);return F(a[0])}getCellType(t,l,n){const a=j.model_getCellType(this.__wbg_ptr,t,l,n);if(a[2])throw F(a[1]);return a[0]}getColumnWidth(t,l){const n=j.model_getColumnWidth(this.__wbg_ptr,t,l);if(n[2])throw F(n[1]);return n[0]}getColumnsWithData(t,l){const n=j.model_getColumnsWithData(this.__wbg_ptr,t,l);if(n[3])throw F(n[2]);var a=Ks(n[0],n[1]).slice();return j.__wbindgen_free(n[0],n[1]*4,4),a}getConditionalFormattingList(t){const l=j.model_getConditionalFormattingList(this.__wbg_ptr,t);if(l[2])throw F(l[1]);return F(l[0])}getDefinedNameList(){const t=j.model_getDefinedNameList(this.__wbg_ptr);if(t[2])throw F(t[1]);return F(t[0])}getDxfForConditionalFormatting(t,l){const n=j.model_getDxfForConditionalFormatting(this.__wbg_ptr,t,l);if(n[2])throw F(n[1]);return F(n[0])}getFirstNonEmptyInRowAfterColumn(t,l,n){const a=j.model_getFirstNonEmptyInRowAfterColumn(this.__wbg_ptr,t,l,n);if(a[2])throw F(a[1]);return a[0]===4294967297?void 0:a[0]}getFmtSettings(){const t=j.model_getFmtSettings(this.__wbg_ptr);if(t[2])throw F(t[1]);return F(t[0])}getFormattedCellValue(t,l,n){let a,r;try{const c=j.model_getFormattedCellValue(this.__wbg_ptr,t,l,n);var i=c[0],o=c[1];if(c[3])throw i=0,o=0,F(c[2]);return a=i,r=o,Lt(i,o)}finally{j.__wbindgen_free(a,r,1)}}getFrozenColumnsCount(t){const l=j.model_getFrozenColumnsCount(this.__wbg_ptr,t);if(l[2])throw F(l[1]);return l[0]}getFrozenRowsCount(t){const l=j.model_getFrozenRowsCount(this.__wbg_ptr,t);if(l[2])throw F(l[1]);return l[0]}getLanguage(){let t,l;try{const n=j.model_getLanguage(this.__wbg_ptr);return t=n[0],l=n[1],Lt(n[0],n[1])}finally{j.__wbindgen_free(t,l,1)}}getLastNonEmptyInRowBeforeColumn(t,l,n){const a=j.model_getLastNonEmptyInRowBeforeColumn(this.__wbg_ptr,t,l,n);if(a[2])throw F(a[1]);return a[0]===4294967297?void 0:a[0]}getLocale(){let t,l;try{const n=j.model_getLocale(this.__wbg_ptr);return t=n[0],l=n[1],Lt(n[0],n[1])}finally{j.__wbindgen_free(t,l,1)}}getName(){let t,l;try{const n=j.model_getName(this.__wbg_ptr);return t=n[0],l=n[1],Lt(n[0],n[1])}finally{j.__wbindgen_free(t,l,1)}}getNamedStyle(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_getNamedStyle(this.__wbg_ptr,l,n);if(a[2])throw F(a[1]);return F(a[0])}getNamedStyleList(){const t=j.model_getNamedStyleList(this.__wbg_ptr);var l=wd(t[0],t[1]).slice();return j.__wbindgen_free(t[0],t[1]*4,4),l}getRowHeight(t,l){const n=j.model_getRowHeight(this.__wbg_ptr,t,l);if(n[2])throw F(n[1]);return n[0]}getRowsWithData(t,l){const n=j.model_getRowsWithData(this.__wbg_ptr,t,l);if(n[3])throw F(n[2]);var a=Ks(n[0],n[1]).slice();return j.__wbindgen_free(n[0],n[1]*4,4),a}getScrollX(){const t=j.model_getScrollX(this.__wbg_ptr);if(t[2])throw F(t[1]);return t[0]}getScrollY(){const t=j.model_getScrollY(this.__wbg_ptr);if(t[2])throw F(t[1]);return t[0]}getSelectedCell(){const t=j.model_getSelectedCell(this.__wbg_ptr);var l=Ks(t[0],t[1]).slice();return j.__wbindgen_free(t[0],t[1]*4,4),l}getSelectedSheet(){return j.model_getSelectedSheet(this.__wbg_ptr)>>>0}getSelectedView(){return j.model_getSelectedView(this.__wbg_ptr)}getShowGridLines(t){const l=j.model_getShowGridLines(this.__wbg_ptr,t);if(l[2])throw F(l[1]);return l[0]!==0}getTimezone(){let t,l;try{const n=j.model_getTimezone(this.__wbg_ptr);return t=n[0],l=n[1],Lt(n[0],n[1])}finally{j.__wbindgen_free(t,l,1)}}getWorksheetsProperties(){return j.model_getWorksheetsProperties(this.__wbg_ptr)}hideSheet(t){const l=j.model_hideSheet(this.__wbg_ptr,t);if(l[1])throw F(l[0])}insertColumns(t,l,n){const a=j.model_insertColumns(this.__wbg_ptr,t,l,n);if(a[1])throw F(a[0])}insertRows(t,l,n){const a=j.model_insertRows(this.__wbg_ptr,t,l,n);if(a[1])throw F(a[0])}isValidDefinedName(t,l,n){const a=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae,i=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),o=ae,c=j.model_isValidDefinedName(this.__wbg_ptr,a,r,il(l)?4294967297:l>>>0,i,o);if(c[1])throw F(c[0])}moveColumns(t,l,n,a){const r=j.model_moveColumns(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}moveRows(t,l,n,a){const r=j.model_moveRows(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}constructor(t,l,n,a){const r=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),i=ae,o=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),c=ae,u=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),d=ae,h=se(a,j.__wbindgen_malloc,j.__wbindgen_realloc),f=ae,_=j.model_new(r,i,o,c,u,d,h,f);if(_[2])throw F(_[1]);return this.__wbg_ptr=_[0]>>>0,Ys.register(this,this.__wbg_ptr,this),this}newDefinedName(t,l,n){const a=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae,i=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),o=ae,c=j.model_newDefinedName(this.__wbg_ptr,a,r,il(l)?4294967297:l>>>0,i,o);if(c[1])throw F(c[0])}newSheet(){const t=j.model_newSheet(this.__wbg_ptr);if(t[1])throw F(t[0])}onApplyNamedStyle(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_onApplyNamedStyle(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}onAreaSelecting(t,l){const n=j.model_onAreaSelecting(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}onArrowDown(){const t=j.model_onArrowDown(this.__wbg_ptr);if(t[1])throw F(t[0])}onArrowLeft(){const t=j.model_onArrowLeft(this.__wbg_ptr);if(t[1])throw F(t[0])}onArrowRight(){const t=j.model_onArrowRight(this.__wbg_ptr);if(t[1])throw F(t[0])}onArrowUp(){const t=j.model_onArrowUp(this.__wbg_ptr);if(t[1])throw F(t[0])}onExpandSelectedRange(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_onExpandSelectedRange(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}onNavigateToEdgeInDirection(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_onNavigateToEdgeInDirection(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}onPageDown(){const t=j.model_onPageDown(this.__wbg_ptr);if(t[1])throw F(t[0])}onPageUp(){const t=j.model_onPageUp(this.__wbg_ptr);if(t[1])throw F(t[0])}onPasteStyles(t){const l=j.model_onPasteStyles(this.__wbg_ptr,t);if(l[1])throw F(l[0])}pasteCsvText(t,l){const n=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),a=ae,r=j.model_pasteCsvText(this.__wbg_ptr,t,n,a);if(r[1])throw F(r[0])}pasteFromClipboard(t,l,n,a){const r=j.model_pasteFromClipboard(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}pauseEvaluation(){j.model_pauseEvaluation(this.__wbg_ptr)}rangeClearAll(t,l,n,a,r){const i=j.model_rangeClearAll(this.__wbg_ptr,t,l,n,a,r);if(i[1])throw F(i[0])}rangeClearContents(t,l,n,a,r){const i=j.model_rangeClearContents(this.__wbg_ptr,t,l,n,a,r);if(i[1])throw F(i[0])}rangeClearFormatting(t,l,n,a,r){const i=j.model_rangeClearFormatting(this.__wbg_ptr,t,l,n,a,r);if(i[1])throw F(i[0])}redo(){const t=j.model_redo(this.__wbg_ptr);if(t[1])throw F(t[0])}renameSheet(t,l){const n=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),a=ae,r=j.model_renameSheet(this.__wbg_ptr,t,n,a);if(r[1])throw F(r[0])}resumeEvaluation(){j.model_resumeEvaluation(this.__wbg_ptr)}setAreaWithBorder(t,l){const n=j.model_setAreaWithBorder(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}setColumnsHidden(t,l,n,a){const r=j.model_setColumnsHidden(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}setColumnsWidth(t,l,n,a){const r=j.model_setColumnsWidth(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}setFrozenColumnsCount(t,l){const n=j.model_setFrozenColumnsCount(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}setFrozenRowsCount(t,l){const n=j.model_setFrozenRowsCount(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}setLanguage(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_setLanguage(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}setLocale(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_setLocale(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}setName(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae;j.model_setName(this.__wbg_ptr,l,n)}setRowsHeight(t,l,n,a){const r=j.model_setRowsHeight(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}setRowsHidden(t,l,n,a){const r=j.model_setRowsHidden(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}setSelectedCell(t,l){const n=j.model_setSelectedCell(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}setSelectedRange(t,l,n,a){const r=j.model_setSelectedRange(this.__wbg_ptr,t,l,n,a);if(r[1])throw F(r[0])}setSelectedSheet(t){const l=j.model_setSelectedSheet(this.__wbg_ptr,t);if(l[1])throw F(l[0])}setSheetColor(t,l){const n=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),a=ae,r=j.model_setSheetColor(this.__wbg_ptr,t,n,a);if(r[1])throw F(r[0])}setShowGridLines(t,l){const n=j.model_setShowGridLines(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}setTimezone(t){const l=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),n=ae,a=j.model_setTimezone(this.__wbg_ptr,l,n);if(a[1])throw F(a[0])}setTopLeftVisibleCell(t,l){const n=j.model_setTopLeftVisibleCell(this.__wbg_ptr,t,l);if(n[1])throw F(n[0])}setUserArrayFormula(t,l,n,a,r,i){const o=se(i,j.__wbindgen_malloc,j.__wbindgen_realloc),c=ae,u=j.model_setUserArrayFormula(this.__wbg_ptr,t,l,n,a,r,o,c);if(u[1])throw F(u[0])}setUserInput(t,l,n,a){const r=se(a,j.__wbindgen_malloc,j.__wbindgen_realloc),i=ae,o=j.model_setUserInput(this.__wbg_ptr,t,l,n,r,i);if(o[1])throw F(o[0])}setWindowHeight(t){j.model_setWindowHeight(this.__wbg_ptr,t)}setWindowWidth(t){j.model_setWindowWidth(this.__wbg_ptr,t)}toBytes(){const t=j.model_toBytes(this.__wbg_ptr);var l=au(t[0],t[1]).slice();return j.__wbindgen_free(t[0],t[1]*1,1),l}undo(){const t=j.model_undo(this.__wbg_ptr);if(t[1])throw F(t[0])}unhideSheet(t){const l=j.model_unhideSheet(this.__wbg_ptr,t);if(l[1])throw F(l[0])}updateConditionalFormatting(t,l,n,a){const r=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),i=ae,o=j.model_updateConditionalFormatting(this.__wbg_ptr,t,l,r,i,a);if(o[1])throw F(o[0])}updateDefinedName(t,l,n,a,r){const i=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),o=ae,c=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),u=ae,d=se(r,j.__wbindgen_malloc,j.__wbindgen_realloc),h=ae,f=j.model_updateDefinedName(this.__wbg_ptr,i,o,il(l)?4294967297:l>>>0,c,u,il(a)?4294967297:a>>>0,d,h);if(f[1])throw F(f[0])}updateNamedStyle(t,l,n){const a=se(t,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae,i=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),o=ae,c=j.model_updateNamedStyle(this.__wbg_ptr,a,r,i,o,n);if(c[1])throw F(c[0])}updateRangeStyle(t,l,n){const a=se(l,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae,i=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),o=ae,c=j.model_updateRangeStyle(this.__wbg_ptr,t,a,r,i,o);if(c[1])throw F(c[0])}}Symbol.dispose&&(La.prototype[Symbol.dispose]=La.prototype.free);function rt(e){let t,l;try{const r=j.columnNameFromNumber(e);var n=r[0],a=r[1];if(r[3])throw n=0,a=0,F(r[2]);return t=n,l=a,Lt(n,a)}finally{j.__wbindgen_free(t,l,1)}}function ib(){const e=j.getAllTimezones();var t=wd(e[0],e[1]).slice();return j.__wbindgen_free(e[0],e[1]*4,4),t}function ob(){const e=j.getSupportedLocales();var t=wd(e[0],e[1]).slice();return j.__wbindgen_free(e[0],e[1]*4,4),t}function vd(e){const t=se(e,j.__wbindgen_malloc,j.__wbindgen_realloc),l=ae,n=j.getTokens(t,l);if(n[2])throw F(n[1]);return F(n[0])}function cp(e){let t,l;try{const n=se(e,j.__wbindgen_malloc,j.__wbindgen_realloc),a=ae,r=j.quoteName(n,a);return t=r[0],l=r[1],Lt(r[0],r[1])}finally{j.__wbindgen_free(t,l,1)}}function sb(){return{__proto__:null,"./wasm_bg.js":{__proto__:null,__wbg_Error_8c4e43fe74559d73:function(t,l){return Error(Lt(t,l))},__wbg_String_fed4d24b68977888:function(t,l){const n=String(l),a=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae;al().setInt32(t+4,r,!0),al().setInt32(t+0,a,!0)},__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2:function(t,l){const n=l,a=typeof n=="bigint"?n:void 0;al().setBigInt64(t+8,il(a)?BigInt(0):a,!0),al().setInt32(t+0,!il(a),!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(t){const l=t,n=typeof l=="boolean"?l:void 0;return il(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(t,l){const n=nu(l),a=se(n,j.__wbindgen_malloc,j.__wbindgen_realloc),r=ae;al().setInt32(t+4,r,!0),al().setInt32(t+0,a,!0)},__wbg___wbindgen_in_47fa6863be6f2f25:function(t,l){return t in l},__wbg___wbindgen_is_bigint_31b12575b56f32fc:function(t){return typeof t=="bigint"},__wbg___wbindgen_is_function_0095a73b8b156f76:function(t){return typeof t=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(t){const l=t;return typeof l=="object"&&l!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(t){return typeof t=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(t){return t===void 0},__wbg___wbindgen_jsval_eq_11888390b0186270:function(t,l){return t===l},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(t,l){return t==l},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(t,l){const n=l,a=typeof n=="number"?n:void 0;al().setFloat64(t+8,il(a)?0:a,!0),al().setInt32(t+0,!il(a),!0)},__wbg___wbindgen_string_get_72fb696202c56729:function(t,l){const n=l,a=typeof n=="string"?n:void 0;var r=il(a)?0:se(a,j.__wbindgen_malloc,j.__wbindgen_realloc),i=ae;al().setInt32(t+4,i,!0),al().setInt32(t+0,r,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(t,l){throw new Error(Lt(t,l))},__wbg_call_389efe28435a9388:function(){return Zs(function(t,l){return t.call(l)},arguments)},__wbg_done_57b39ecd9addfe81:function(t){return t.done},__wbg_entries_58c7934c745daac7:function(t){return Object.entries(t)},__wbg_get_9b94d73e6221f75c:function(t,l){return t[l>>>0]},__wbg_get_b3ed3ad4be2bc8ac:function(){return Zs(function(t,l){return Reflect.get(t,l)},arguments)},__wbg_get_with_ref_key_bb8f74a92cb2e784:function(t,l){return t[l]},__wbg_ic_tz_parts_1233457b3914b1fe:function(t,l,n){return sp(t,Lt(l,n))},__wbg_ic_tz_validate_7018a9939d5bef43:function(t,l){return op(Lt(t,l))},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(t){let l;try{l=t instanceof ArrayBuffer}catch{l=!1}return l},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(t){let l;try{l=t instanceof Uint8Array}catch{l=!1}return l},__wbg_isArray_d314bb98fcf08331:function(t){return Array.isArray(t)},__wbg_isSafeInteger_bfbc7332a9768d2a:function(t){return Number.isSafeInteger(t)},__wbg_iterator_6ff6560ca1568e55:function(){return Symbol.iterator},__wbg_length_32ed9a279acd054c:function(t){return t.length},__wbg_length_35a7bace40f36eac:function(t){return t.length},__wbg_new_361308b2356cecd0:function(){return new Object},__wbg_new_3eb36ae241fe6f44:function(){return new Array},__wbg_new_dca287b076112a51:function(){return new Map},__wbg_new_dd2b680c8bf6ae29:function(t){return new Uint8Array(t)},__wbg_next_3482f54c49e8af19:function(){return Zs(function(t){return t.next()},arguments)},__wbg_next_418f80d8f5303233:function(t){return t.next},__wbg_now_a3af9a2f4bbaa4d1:function(){return Date.now()},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(t,l,n){Uint8Array.prototype.set.call(au(t,l),n)},__wbg_random_912284dbf636f269:function(){return Math.random()},__wbg_set_1eb0999cf5d27fc8:function(t,l,n){return t.set(l,n)},__wbg_set_3fda3bac07393de4:function(t,l,n){t[l]=n},__wbg_set_f43e577aea94465b:function(t,l,n){t[l>>>0]=n},__wbg_value_0546255b415e96c1:function(t){return t.value},__wbindgen_cast_0000000000000001:function(t){return t},__wbindgen_cast_0000000000000002:function(t){return t},__wbindgen_cast_0000000000000003:function(t,l){return Lt(t,l)},__wbindgen_cast_0000000000000004:function(t){return BigInt.asUintN(64,t)},__wbindgen_init_externref_table:function(){const t=j.__wbindgen_externrefs,l=t.grow(4);t.set(0,void 0),t.set(l+0,void 0),t.set(l+1,null),t.set(l+2,!0),t.set(l+3,!1)}},"./snippets/ironcalc_base-89b4f49381e1e289/inline0.js":rb}}const Ys=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>j.__wbg_model_free(e>>>0,1));function cb(e){const t=j.__externref_table_alloc();return j.__wbindgen_externrefs.set(t,e),t}function nu(e){const t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){const a=e.description;return a==null?"Symbol":`Symbol(${a})`}if(t=="function"){const a=e.name;return typeof a=="string"&&a.length>0?`Function(${a})`:"Function"}if(Array.isArray(e)){const a=e.length;let r="[";a>0&&(r+=nu(e[0]));for(let i=1;i<a;i++)r+=", "+nu(e[i]);return r+="]",r}const l=/\[object ([^\]]+)\]/.exec(toString.call(e));let n;if(l&&l.length>1)n=l[1];else return toString.call(e);if(n=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
${e.stack}`:n}function Ks(e,t){return e=e>>>0,ub().subarray(e/4,e/4+t)}function wd(e,t){e=e>>>0;const l=al(),n=[];for(let a=e;a<e+4*t;a+=4)n.push(j.__wbindgen_externrefs.get(l.getUint32(a,!0)));return j.__externref_drop_slice(e,t),n}function au(e,t){return e=e>>>0,ba().subarray(e/1,e/1+t)}let Cn=null;function al(){return(Cn===null||Cn.buffer.detached===!0||Cn.buffer.detached===void 0&&Cn.buffer!==j.memory.buffer)&&(Cn=new DataView(j.memory.buffer)),Cn}let ur=null;function ub(){return(ur===null||ur.byteLength===0)&&(ur=new Int32Array(j.memory.buffer)),ur}function Lt(e,t){return e=e>>>0,fb(e,t)}let dr=null;function ba(){return(dr===null||dr.byteLength===0)&&(dr=new Uint8Array(j.memory.buffer)),dr}function Zs(e,t){try{return e.apply(this,t)}catch(l){const n=cb(l);j.__wbindgen_exn_store(n)}}function il(e){return e==null}function ch(e,t){const l=t(e.length*1,1)>>>0;return ba().set(e,l/1),ae=e.length,l}function se(e,t,l){if(l===void 0){const o=Nr.encode(e),c=t(o.length,1)>>>0;return ba().subarray(c,c+o.length).set(o),ae=o.length,c}let n=e.length,a=t(n,1)>>>0;const r=ba();let i=0;for(;i<n;i++){const o=e.charCodeAt(i);if(o>127)break;r[a+i]=o}if(i!==n){i!==0&&(e=e.slice(i)),a=l(a,n,n=i+e.length*3,1)>>>0;const o=ba().subarray(a+i,a+n),c=Nr.encodeInto(e,o);i+=c.written,a=l(a,n,i,1)>>>0}return ae=i,a}function F(e){const t=j.__wbindgen_externrefs.get(e);return j.__externref_table_dealloc(e),t}let Qi=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Qi.decode();const db=2146435072;let Xs=0;function fb(e,t){return Xs+=t,Xs>=db&&(Qi=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Qi.decode(),Xs=t),Qi.decode(ba().subarray(e,e+t))}const Nr=new TextEncoder;"encodeInto"in Nr||(Nr.encodeInto=function(e,t){const l=Nr.encode(e);return t.set(l),{read:e.length,written:l.length}});let ae=0,j;function hb(e,t){return j=e.exports,Cn=null,ur=null,dr=null,j.__wbindgen_start(),j}async function mb(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(a){if(e.ok&&l(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",a);else throw a}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function l(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}}async function gb(e){if(j!==void 0)return j;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL(""+new URL("wasm_bg-CmFmbsdH.wasm",import.meta.url).href,import.meta.url));const t=sb();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:l,module:n}=await mb(await e,t);return hb(l)}const le=e=>typeof e=="string",tr=()=>{let e,t;const l=new Promise((n,a)=>{e=n,t=a});return l.resolve=e,l.reject=t,l},uh=e=>e==null?"":String(e),_b=(e,t,l)=>{e.forEach(n=>{t[n]&&(l[n]=t[n])})},pb=/###/g,dh=e=>e&&e.includes("###")?e.replace(pb,"."):e,fh=e=>!e||le(e),kr=(e,t,l)=>{const n=le(t)?t.split("."):t;let a=0;for(;a<n.length-1;){if(fh(e))return{};const r=dh(n[a]);!e[r]&&l&&(e[r]=new l),Object.prototype.hasOwnProperty.call(e,r)?e=e[r]:e={},++a}return fh(e)?{}:{obj:e,k:dh(n[a])}},hh=(e,t,l)=>{const{obj:n,k:a}=kr(e,t,Object);if(n!==void 0||t.length===1){n[a]=l;return}let r=t[t.length-1],i=t.slice(0,t.length-1),o=kr(e,i,Object);for(;o.obj===void 0&&i.length;)r=`${i[i.length-1]}.${r}`,i=i.slice(0,i.length-1),o=kr(e,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=l},yb=(e,t,l,n)=>{const{obj:a,k:r}=kr(e,t,Object);a[r]=a[r]||[],a[r].push(l)},To=(e,t)=>{const{obj:l,k:n}=kr(e,t);if(l&&Object.prototype.hasOwnProperty.call(l,n))return l[n]},bb=(e,t,l)=>{const n=To(e,l);return n!==void 0?n:To(t,l)},up=(e,t,l)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?le(e[n])||e[n]instanceof String||le(t[n])||t[n]instanceof String?l&&(e[n]=t[n]):up(e[n],t[n],l):e[n]=t[n]);return e},jl=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),vb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},wb=e=>le(e)?e.replace(/[&<>"'\/]/g,t=>vb[t]):e;class xb{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const l=this.regExpMap.get(t);if(l!==void 0)return l;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const Sb=[" ",",","?","!",";"],Cb=new xb(20),jb=(e,t,l)=>{t=t||"",l=l||"";const n=Sb.filter(i=>!t.includes(i)&&!l.includes(i));if(n.length===0)return!0;const a=Cb.getRegExp(`(${n.map(i=>i==="?"?"\\?":i).join("|")})`);let r=!a.test(e);if(!r){const i=e.indexOf(l);i>0&&!a.test(e.substring(0,i))&&(r=!0)}return r},ru=(e,t,l=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(l);let a=e;for(let r=0;r<n.length;){if(!a||typeof a!="object")return;let i,o="";for(let c=r;c<n.length;++c)if(c!==r&&(o+=l),o+=n[c],i=a[o],i!==void 0){if(["string","number","boolean"].includes(typeof i)&&c<n.length-1)continue;r+=c-r+1;break}a=i}return a},Kr=e=>e==null?void 0:e.replace(/_/g,"-"),Eb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var l,n;(n=(l=console==null?void 0:console[e])==null?void 0:l.apply)==null||n.call(l,console,t)}};class Do{constructor(t,l={}){this.init(t,l)}init(t,l={}){this.prefix=l.prefix||"i18next:",this.logger=t||Eb,this.options=l,this.debug=l.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,l,n,a){return a&&!this.debug?null:(t=t.map(r=>le(r)?r.replace(/[\r\n\x00-\x1F\x7F]/g," "):r),le(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[l](t))}create(t){return new Do(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Do(this.logger,t)}}var pl=new Do;class ls{constructor(){this.observers={}}on(t,l){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const a=this.observers[n].get(l)||0;this.observers[n].set(l,a+1)}),this}off(t,l){if(this.observers[t]){if(!l){delete this.observers[t];return}this.observers[t].delete(l)}}once(t,l){const n=(...a)=>{l(...a),this.off(t,n)};return this.on(t,n),this}emit(t,...l){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,r])=>{for(let i=0;i<r;i++)a(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,r])=>{for(let i=0;i<r;i++)a(t,...l)})}}class mh extends ls{constructor(t,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const l=this.options.ns.indexOf(t);l>-1&&this.options.ns.splice(l,1)}getResource(t,l,n,a={}){var u,d;const r=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,i=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.includes(".")?o=t.split("."):(o=[t,l],n&&(Array.isArray(n)?o.push(...n):le(n)&&r?o.push(...n.split(r)):o.push(n)));const c=To(this.data,o);return!c&&!l&&!n&&t.includes(".")&&(t=o[0],l=o[1],n=o.slice(2).join(".")),c||!i||!le(n)?c:ru((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[l],n,r)}addResource(t,l,n,a,r={silent:!1}){const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[t,l];n&&(o=o.concat(i?n.split(i):n)),t.includes(".")&&(o=t.split("."),a=l,l=o[1]),this.addNamespaces(l),hh(this.data,o,a),r.silent||this.emit("added",t,l,n,a)}addResources(t,l,n,a={silent:!1}){for(const r in n)(le(n[r])||Array.isArray(n[r]))&&this.addResource(t,l,r,n[r],{silent:!0});a.silent||this.emit("added",t,l,n)}addResourceBundle(t,l,n,a,r,i={silent:!1,skipCopy:!1}){let o=[t,l];t.includes(".")&&(o=t.split("."),a=n,n=l,l=o[1]),this.addNamespaces(l);let c=To(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),a?up(c,n,r):c={...c,...n},hh(this.data,o,c),i.silent||this.emit("added",t,l,n)}removeResourceBundle(t,l){this.hasResourceBundle(t,l)&&delete this.data[t][l],this.removeNamespaces(l),this.emit("removed",t,l)}hasResourceBundle(t,l){return this.getResource(t,l)!==void 0}getResourceBundle(t,l){return l||(l=this.options.defaultNS),this.getResource(t,l)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const l=this.getDataByLanguage(t);return!!(l&&Object.keys(l)||[]).find(a=>l[a]&&Object.keys(l[a]).length>0)}toJSON(){return this.data}}var dp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,l,n,a){return e.forEach(r=>{var i;t=((i=this.processors[r])==null?void 0:i.process(t,l,n,a))??t}),t}};const fp=Symbol("i18next/PATH_KEY");function Nb(){const e=[],t=Object.create(null);let l;return t.get=(n,a)=>{var r;return(r=l==null?void 0:l.revoke)==null||r.call(l),a===fp?e:(e.push(a),l=Proxy.revocable(n,t),l.proxy)},Proxy.revocable(Object.create(null),t).proxy}function va(e,t){const{[fp]:l}=e(Nb()),n=(t==null?void 0:t.keySeparator)??".",a=(t==null?void 0:t.nsSeparator)??":",r=(t==null?void 0:t.enableSelector)==="strict";if(l.length>1&&a){const i=t==null?void 0:t.ns,o=r?Array.isArray(i)?i:i?[i]:null:Array.isArray(i)?i:null;if(o&&(r?o:o.length>1?o.slice(1):[]).includes(l[0]))return`${l[0]}${a}${l.slice(1).join(n)}`}return l.join(n)}const Qs=e=>!le(e)&&typeof e!="boolean"&&typeof e!="number";class Ro extends ls{constructor(t,l={}){super(),_b(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=pl.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,l={interpolation:{}}){const n={...l};if(t==null)return!1;const a=this.resolve(t,n);if((a==null?void 0:a.res)===void 0)return!1;const r=Qs(a.res);return!(n.returnObjects===!1&&r)}extractFromKey(t,l){let n=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const a=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let r=l.ns||this.options.defaultNS||[];const i=n&&t.includes(n),o=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!jb(t,n,a);if(i&&!o){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:le(r)?[r]:r};const u=t.split(n);(n!==a||n===a&&this.options.ns.includes(u[0]))&&(r=u.shift()),t=u.join(a)}return{key:t,namespaces:le(r)?[r]:r}}translate(t,l,n){let a=typeof l=="object"?{...l}:l;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=va(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(U=>typeof U=="function"?va(U,{...this.options,...a}):String(U));const r=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(t[t.length-1],a),u=c[c.length-1];let d=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return f?r?{res:`${u}${d}${o}`,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:`${u}${d}${o}`:r?{res:o,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:o;const _=this.resolve(t,a);let y=_==null?void 0:_.res;const p=(_==null?void 0:_.usedKey)||o,w=(_==null?void 0:_.exactUsedKey)||o,m=["[object Number]","[object Function]","[object RegExp]"],g=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,v=a.count!==void 0&&!le(a.count),C=Ro.hasDefaultValue(a),k=v?this.pluralResolver.getSuffix(h,a.count,a):"",E=a.ordinal&&v?this.pluralResolver.getSuffix(h,a.count,{ordinal:!1}):"",D=v&&!a.ordinal&&a.count===0,M=D&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${k}`]||a[`defaultValue${E}`]||a.defaultValue;let x=y;b&&!y&&C&&(x=M);const O=Qs(x),z=Object.prototype.toString.apply(x);if(b&&x&&O&&!m.includes(z)&&!(le(g)&&Array.isArray(x))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const U=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,x,{...a,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(_.res=U,_.usedParams=this.getUsedParamsDetails(a),_):U}if(i){const U=Array.isArray(x),V=U?[]:{},G=U?w:p;for(const R in x)if(Object.prototype.hasOwnProperty.call(x,R)){const q=`${G}${i}${R}`;C&&!y?V[R]=this.translate(q,{...a,defaultValue:Qs(M)?M[R]:void 0,joinArrays:!1,ns:c}):V[R]=this.translate(q,{...a,joinArrays:!1,ns:c}),V[R]===q&&(V[R]=x[R])}y=V}}else if(b&&le(g)&&Array.isArray(y))y=y.join(g),y&&(y=this.extendTranslation(y,t,a,n));else{let U=!1,V=!1;!this.isValidLookup(y)&&C&&(U=!0,y=M),this.isValidLookup(y)||(V=!0,y=o);const R=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&V?void 0:y,q=C&&M!==y&&this.options.updateMissing;if(V||U||q){if(this.logger.log(q?"updateKey":"missingKey",h,u,v&&!q?`${o}${this.pluralResolver.getSuffix(h,a.count,a)}`:o,q?M:y),i){const he=this.resolve(o,{...a,keySeparator:!1});he&&he.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Y=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let he=0;he<W.length;he++)Y.push(W[he]);else this.options.saveMissingTo==="all"?Y=this.languageUtils.toResolveHierarchy(a.lng||this.language):Y.push(a.lng||this.language);const ne=(he,Z,A)=>{var K;const H=C&&A!==y?A:R;this.options.missingKeyHandler?this.options.missingKeyHandler(he,u,Z,H,q,a):(K=this.backendConnector)!=null&&K.saveMissing&&this.backendConnector.saveMissing(he,u,Z,H,q,a),this.emit("missingKey",he,u,Z,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?Y.forEach(he=>{const Z=this.pluralResolver.getSuffixes(he,a);D&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!Z.includes(`${this.options.pluralSeparator}zero`)&&Z.push(`${this.options.pluralSeparator}zero`),Z.forEach(A=>{ne([he],o+A,a[`defaultValue${A}`]||M)})}):ne(Y,o,M))}y=this.extendTranslation(y,t,a,_,n),V&&y===o&&this.options.appendNamespaceToMissingKey&&(y=`${u}${d}${o}`),(V||U)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${o}`:o,U?y:void 0,a))}return r?(_.res=y,_.usedParams=this.getUsedParamsDetails(a),_):y}extendTranslation(t,l,n,a,r){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=le(t)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const _=t.match(this.interpolator.nestingRegexp);h=_&&_.length}let f=n.replace&&!le(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,n.lng||this.language||a.usedLng,n),d){const _=t.match(this.interpolator.nestingRegexp),y=_&&_.length;h<y&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(..._)=>(r==null?void 0:r[0])===_[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${_[0]} in key: ${l[0]}`),null):this.translate(..._,l),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=le(i)?[i]:i;return t!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(t=dp.handle(o,t,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,l={}){let n,a,r,i,o;return le(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(c=>typeof c=="function"?va(c,{...this.options,...l}):c)),t.forEach(c=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(c,l),d=u.key;a=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const f=l.count!==void 0&&!le(l.count),_=f&&!l.ordinal&&l.count===0,y=l.context!==void 0&&(le(l.context)||typeof l.context=="number")&&l.context!=="",p=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);h.forEach(w=>{var m,g;this.isValidLookup(n)||(o=w,!this.checkedLoadedFor[`${p[0]}-${w}`]&&((m=this.utils)!=null&&m.hasLoadedNamespace)&&!((g=this.utils)!=null&&g.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${p[0]}-${w}`]=!0,this.logger.warn(`key "${a}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(b=>{var k;if(this.isValidLookup(n))return;i=b;const v=[d];if((k=this.i18nFormat)!=null&&k.addLookupKeys)this.i18nFormat.addLookupKeys(v,d,b,w,l);else{let E;f&&(E=this.pluralResolver.getSuffix(b,l.count,l));const D=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(l.ordinal&&E.startsWith(M)&&v.push(d+E.replace(M,this.options.pluralSeparator)),v.push(d+E),_&&v.push(d+D)),y){const x=`${d}${this.options.contextSeparator||"_"}${l.context}`;v.push(x),f&&(l.ordinal&&E.startsWith(M)&&v.push(x+E.replace(M,this.options.pluralSeparator)),v.push(x+E),_&&v.push(x+D))}}let C;for(;C=v.pop();)this.isValidLookup(n)||(r=C,n=this.getResource(b,w,C,l))}))})}),{res:n,usedKey:a,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,l,n,a={}){var r;return(r=this.i18nFormat)!=null&&r.getResource?this.i18nFormat.getResource(t,l,n,a):this.resourceStore.getResource(t,l,n,a)}getUsedParamsDetails(t={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!le(t.replace);let a=n?t.replace:t;if(n&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(const r of l)delete a[r]}return a}static hasDefaultValue(t){const l="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&n.startsWith(l)&&t[n]!==void 0)return!0;return!1}}class gh{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pl.create("languageUtils")}getScriptPartFromCode(t){if(t=Kr(t),!t||!t.includes("-"))return null;const l=t.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(t){if(t=Kr(t),!t||!t.includes("-"))return t;const l=t.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(t){if(le(t)&&t.includes("-")){let l;try{l=Intl.getCanonicalLocales(t)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let l;return t.forEach(n=>{if(l)return;const a=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(a))&&(l=a)}),!l&&this.options.supportedLngs&&t.forEach(n=>{if(l)return;const a=this.getScriptPartFromCode(n);if(this.isSupportedCode(a))return l=a;const r=this.getLanguagePartFromCode(n);if(this.isSupportedCode(r))return l=r;l=this.options.supportedLngs.find(i=>i===r?!0:!i.includes("-")&&!r.includes("-")?!1:!!(i.includes("-")&&!r.includes("-")&&i.slice(0,i.indexOf("-"))===r||i.startsWith(r)&&r.length>1))}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(t,l){if(!t)return[];if(typeof t=="function"&&(t=t(l)),le(t)&&(t=[t]),Array.isArray(t))return t;if(!l)return t.default||[];let n=t[l];return n||(n=t[this.getScriptPartFromCode(l)]),n||(n=t[this.formatLanguageCode(l)]),n||(n=t[this.getLanguagePartFromCode(l)]),n||(n=t.default),n||[]}toResolveHierarchy(t,l){const n=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],t),a=[],r=i=>{i&&(this.isSupportedCode(i)?a.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return le(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(t))):le(t)&&r(this.formatLanguageCode(t)),n.forEach(i=>{a.includes(i)||r(this.formatLanguageCode(i))}),a}}const _h={zero:0,one:1,two:2,few:3,many:4,other:5},ph={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class kb{constructor(t,l={}){this.languageUtils=t,this.options=l,this.logger=pl.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,l={}){const n=Kr(t==="dev"?"en":t),a=l.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:a});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let i;try{i=new Intl.PluralRules(n,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),ph;if(!t.match(/-|_/))return ph;const c=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(c,l)}return this.pluralRulesCache[r]=i,i}needsPlural(t,l={}){let n=this.getRule(t,l);return n||(n=this.getRule("dev",l)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,l,n={}){return this.getSuffixes(t,n).map(a=>`${l}${a}`)}getSuffixes(t,l={}){let n=this.getRule(t,l);return n||(n=this.getRule("dev",l)),n?n.resolvedOptions().pluralCategories.sort((a,r)=>_h[a]-_h[r]).map(a=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,l,n={}){const a=this.getRule(t,n);return a?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a.select(l)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",l,n))}}const yh=(e,t,l,n=".",a=!0)=>{let r=bb(e,t,l);return!r&&a&&le(l)&&(r=ru(e,l,n),r===void 0&&(r=ru(t,l,n))),r},Ws=e=>e.replace(/\$/g,"$$$$");class bh{constructor(t={}){var l;this.logger=pl.create("interpolator"),this.options=t,this.format=((l=t==null?void 0:t.interpolation)==null?void 0:l.format)||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:l,escapeValue:n,useRawValueToEscape:a,prefix:r,prefixEscaped:i,suffix:o,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:f,nestingPrefixEscaped:_,nestingSuffix:y,nestingSuffixEscaped:p,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:g}=t.interpolation;this.escape=l!==void 0?l:wb,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=r?jl(r):i||"{{",this.suffix=o?jl(o):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h?jl(h):"-",this.unescapeSuffix=this.unescapePrefix?"":d?jl(d):"",this.nestingPrefix=f?jl(f):_||jl("$t("),this.nestingSuffix=y?jl(y):p||jl(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(l,n)=>(l==null?void 0:l.source)===n?(l.lastIndex=0,l):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,l,n,a){var _;let r,i,o;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=y=>{if(!y.includes(this.formatSeparator)){const g=yh(l,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,n,{...a,...l,interpolationkey:y}):g}const p=y.split(this.formatSeparator),w=p.shift().trim(),m=p.join(this.formatSeparator).trim();return this.format(yh(l,c,w,this.options.keySeparator,this.options.ignoreJSONStructure),m,n,{...a,...l,interpolationkey:w})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((_=a==null?void 0:a.interpolation)==null?void 0:_.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>Ws(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Ws(this.escape(y)):Ws(y)}].forEach(y=>{for(o=0;r=y.regex.exec(t);){const p=r[1].trim();if(i=u(p),i===void 0)if(typeof d=="function"){const m=d(t,r,a);i=le(m)?m:""}else if(a&&Object.prototype.hasOwnProperty.call(a,p))i="";else if(h){i=r[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),i="";else!le(i)&&!this.useRawValueToEscape&&(i=uh(i));const w=y.safeValue(i);if(t=t.replace(r[0],w),h?(y.regex.lastIndex+=i.length,y.regex.lastIndex-=r[0].length):y.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,l,n={}){let a,r,i;const o=(c,u)=>{const d=this.nestingOptionsSeparator;if(!c.includes(d))return c;const h=c.split(new RegExp(`${jl(d)}[ ]*{`));let f=`{${h[1]}`;c=h[0],f=this.interpolate(f,i);const _=f.match(/'/g),y=f.match(/"/g);(((_==null?void 0:_.length)??0)%2===0&&!y||((y==null?void 0:y.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{i=JSON.parse(f),u&&(i={...u,...i})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${c}${d}${f}`}return i.defaultValue&&i.defaultValue.includes(this.prefix)&&delete i.defaultValue,c};for(;a=this.nestingRegexp.exec(t);){let c=[];i={...n},i=i.replace&&!le(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(u!==-1&&(c=a[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),a[1]=a[1].slice(0,u)),r=l(o.call(this,a[1].trim(),i),i),r&&a[0]===t&&!le(r))return r;le(r)||(r=uh(r)),r||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),r=""),c.length&&(r=c.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:a[1].trim()}),r.trim())),t=t.replace(a[0],r),this.regexp.lastIndex=0}return t}}const Ab=e=>{let t=e.toLowerCase().trim();const l={};if(e.includes("(")){const n=e.split("(");t=n[0].toLowerCase().trim();const a=n[1].slice(0,-1);t==="currency"&&!a.includes(":")?l.currency||(l.currency=a.trim()):t==="relativetime"&&!a.includes(":")?l.range||(l.range=a.trim()):a.split(";").forEach(i=>{if(i){const[o,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=o.trim();l[d]||(l[d]=u),u==="false"&&(l[d]=!1),u==="true"&&(l[d]=!0),isNaN(u)||(l[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:l}},vh=e=>{const t={};return(l,n,a)=>{let r=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(r={...r,[a.interpolationkey]:void 0});const i=n+JSON.stringify(r);let o=t[i];return o||(o=e(Kr(n),a),t[i]=o),o(l)}},Tb=e=>(t,l,n)=>e(Kr(l),n)(t);class Db{constructor(t={}){this.logger=pl.create("formatter"),this.options=t,this.init(t)}init(t,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const n=l.cacheInBuiltFormats?vh:Tb;this.formats={number:n((a,r)=>{const i=new Intl.NumberFormat(a,{...r});return o=>i.format(o)}),currency:n((a,r)=>{const i=new Intl.NumberFormat(a,{...r,style:"currency"});return o=>i.format(o)}),datetime:n((a,r)=>{const i=new Intl.DateTimeFormat(a,{...r});return o=>i.format(o)}),relativetime:n((a,r)=>{const i=new Intl.RelativeTimeFormat(a,{...r});return o=>i.format(o,r.range||"day")}),list:n((a,r)=>{const i=new Intl.ListFormat(a,{...r});return o=>i.format(o)})}}add(t,l){this.formats[t.toLowerCase().trim()]=l}addCached(t,l){this.formats[t.toLowerCase().trim()]=vh(l)}format(t,l,n,a={}){if(!l||t==null)return t;const r=l.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&!r[0].includes(")")&&r.find(o=>o.includes(")"))){const o=r.findIndex(c=>c.includes(")"));r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,c)=>{var h;const{formatName:u,formatOptions:d}=Ab(c);if(this.formats[u]){let f=o;try{const _=((h=a==null?void 0:a.formatParams)==null?void 0:h[a.interpolationkey])||{},y=_.locale||_.lng||a.locale||a.lng||n;f=this.formats[u](o,y,{...d,...a,..._})}catch(_){this.logger.warn(_)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},t)}}const Rb=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class zb extends ls{constructor(t,l,n,a={}){var r,i;super(),this.backend=t,this.store=l,this.services=n,this.languageUtils=n.languageUtils,this.options=a,this.logger=pl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(i=(r=this.backend)==null?void 0:r.init)==null||i.call(r,n,a.backend,a)}queueLoad(t,l,n,a){const r={},i={},o={},c={};return t.forEach(u=>{let d=!0;l.forEach(h=>{const f=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?i[f]===void 0&&(i[f]=!0):(this.state[f]=1,d=!1,i[f]===void 0&&(i[f]=!0),r[f]===void 0&&(r[f]=!0),c[h]===void 0&&(c[h]=!0)))}),d||(o[u]=!0)}),(Object.keys(r).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(r),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}loaded(t,l,n){const a=t.split("|"),r=a[0],i=a[1];l&&this.emit("failedLoading",r,i,l),!l&&n&&this.store.addResourceBundle(r,i,n,void 0,void 0,{skipCopy:!0}),this.state[t]=l?-1:2,l&&n&&(this.state[t]=0);const o={};this.queue.forEach(c=>{yb(c.loaded,[r],i),Rb(c,t),l&&c.errors.push(l),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{o[u]||(o[u]={});const d=c.loaded[u];d.length&&d.forEach(h=>{o[u][h]===void 0&&(o[u][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(c=>!c.done)}read(t,l,n,a=0,r=this.retryTimeout,i){if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:l,fcName:n,tried:a,wait:r,callback:i});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read(t,l,n,a+1,r*2,i)},r);return}i(u,d)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const u=c(t,l);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return c(t,l,o)}prepareLoading(t,l,n={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();le(t)&&(t=this.languageUtils.toResolveHierarchy(t)),le(l)&&(l=[l]);const r=this.queueLoad(t,l,n,a);if(!r.toLoad.length)return r.pending.length||a(),null;r.toLoad.forEach(i=>{this.loadOne(i)})}load(t,l,n){this.prepareLoading(t,l,{},n)}reload(t,l,n){this.prepareLoading(t,l,{reload:!0},n)}loadOne(t,l=""){const n=t.split("|"),a=n[0],r=n[1];this.read(a,r,"read",void 0,void 0,(i,o)=>{i&&this.logger.warn(`${l}loading namespace ${r} for language ${a} failed`,i),!i&&o&&this.logger.log(`${l}loaded namespace ${r} for language ${a}`,o),this.loaded(t,i,o)})}saveMissing(t,l,n,a,r,i={},o=()=>{}){var c,u,d,h,f;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(l))){this.logger.warn(`did not save key "${n}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((f=this.backend)!=null&&f.create){const _={...i,isUpdate:r},y=this.backend.create.bind(this.backend);if(y.length<6)try{let p;y.length===5?p=y(t,l,n,a,_):p=y(t,l,n,a),p&&typeof p.then=="function"?p.then(w=>o(null,w)).catch(o):o(null,p)}catch(p){o(p)}else y(t,l,n,a,o,_)}!t||!t[0]||this.store.addResource(t[0],l,n,a)}}}const Js=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),le(e[1])&&(t.defaultValue=e[1]),le(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const l=e[3]||e[2];Object.keys(l).forEach(n=>{t[n]=l[n]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),wh=e=>(le(e.ns)&&(e.ns=[e.ns]),le(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),le(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ei=()=>{},Mb=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(l=>{typeof e[l]=="function"&&(e[l]=e[l].bind(e))})};class Ar extends ls{constructor(t={},l){if(super(),this.options=wh(t),this.services={},this.logger=pl,this.modules={external:[]},Mb(this),l&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,l),this;setTimeout(()=>{this.init(t,l)},0)}}init(t={},l){this.isInitializing=!0,typeof t=="function"&&(l=t,t={}),t.defaultNS==null&&t.ns&&(le(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const n=Js();this.options={...n,...this.options,...wh(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const a=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?pl.init(a(this.modules.logger),this.options):pl.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Db;const d=new gh(this.options);this.store=new mh(this.options.resources,this.options);const h=this.services;h.logger=pl,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new kb(d,{prepend:this.options.pluralSeparator}),u&&(h.formatter=a(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new bh(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new zb(a(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(f,..._)=>{this.emit(f,..._)}),this.modules.languageDetector&&(h.languageDetector=a(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=a(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Ro(this.services,this.options),this.translator.on("*",(f,..._)=>{this.emit(f,..._)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Ei),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const o=tr(),c=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(h),l(d,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),o}loadResources(t,l=Ei){var r,i;let n=l;const a=le(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const o=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(h=>{h!=="cimode"&&(o.includes(h)||o.push(h))})};a?c(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(i=(r=this.options.preload)==null?void 0:r.forEach)==null||i.call(r,u=>c(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(t,l,n){const a=tr();return typeof t=="function"&&(n=t,t=void 0),typeof l=="function"&&(n=l,l=void 0),t||(t=this.languages),l||(l=this.options.ns),n||(n=Ei),this.services.backendConnector.reload(t,l,r=>{a.resolve(),n(r)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&dp.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let l=0;l<this.languages.length;l++){const n=this.languages[l];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,l){this.isLanguageChangingTo=t;const n=tr();this.emit("languageChanging",t);const a=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},r=(o,c)=>{c?this.isLanguageChangingTo===t&&(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),l&&l(o,(...u)=>this.t(...u))},i=o=>{var d,h;!t&&!o&&this.services.languageDetector&&(o=[]);const c=le(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(le(o)?[o]:o);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,u)),this.loadResources(u,f=>{r(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),n}getFixedT(t,l,n,a){const r=a==null?void 0:a.scopeNs,i=(o,c,...u)=>{let d;typeof c!="object"?d=this.options.overloadTranslationOptionHandler([o,c].concat(u)):d={...c},d.lng=d.lng||i.lng,d.lngs=d.lngs||i.lngs;const h=d.ns!==void 0&&d.ns!==null;d.ns=d.ns||i.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||n||i.keyPrefix);const f={...this.options,...d};Array.isArray(r)&&!h&&(f.ns=r),typeof d.keyPrefix=="function"&&(d.keyPrefix=va(d.keyPrefix,f));const _=this.options.keySeparator||".";let y;return d.keyPrefix&&Array.isArray(o)?y=o.map(p=>(typeof p=="function"&&(p=va(p,f)),`${d.keyPrefix}${_}${p}`)):(typeof o=="function"&&(o=va(o,f)),y=d.keyPrefix?`${d.keyPrefix}${_}${o}`:o),this.t(y,d)};return le(t)?i.lng=t:i.lngs=t,i.ns=l,i.keyPrefix=n,i}t(...t){var l;return(l=this.translator)==null?void 0:l.translate(...t)}exists(...t){var l;return(l=this.translator)==null?void 0:l.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,l={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=l.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const i=(o,c)=>{const u=this.services.backendConnector.state[`${o}|${c}`];return u===-1||u===0||u===2};if(l.precheck){const o=l.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,t)&&(!a||i(r,t)))}loadNamespaces(t,l){const n=tr();return this.options.ns?(le(t)&&(t=[t]),t.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{n.resolve(),l&&l(a)}),n):(l&&l(),Promise.resolve())}loadLanguages(t,l){const n=tr();le(t)&&(t=[t]);const a=this.options.preload||[],r=t.filter(i=>!a.includes(i)&&this.services.languageUtils.isSupportedCode(i));return r.length?(this.options.preload=a.concat(r),this.loadResources(i=>{n.resolve(),l&&l(i)}),n):(l&&l(),Promise.resolve())}dir(t){var a,r;if(t||(t=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const o=i.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const l=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((r=this.services)==null?void 0:r.languageUtils)||new gh(Js());return t.toLowerCase().indexOf("-latn")>1?"ltr":l.includes(n.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},l){const n=new Ar(t,l);return n.createInstance=Ar.createInstance,n}cloneInstance(t={},l=Ei){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},r=new Ar(a);if((t.debug!==void 0||t.prefix!==void 0)&&(r.logger=r.logger.clone(t)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){const o=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,h)=>(d[h]={...c[u][h]},d),c[u]),c),{});r.store=new mh(o,a),r.services.resourceStore=r.store}if(t.interpolation){const c={...Js().interpolation,...this.options.interpolation,...t.interpolation},u={...a,interpolation:c};r.services.interpolator=new bh(u)}return r.translator=new Ro(r.services,a),r.translator.on("*",(o,...c)=>{r.emit(o,...c)}),r.init(a,l),r.translator.options=a,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const mt=Ar.createInstance();mt.createInstance;mt.dir;mt.init;mt.loadResources;mt.reloadResources;mt.use;mt.changeLanguage;mt.getFixedT;mt.t;mt.exists;mt.setDefaultNamespace;mt.hasLoadedNamespace;mt.loadNamespaces;mt.loadLanguages;const Lb=(e,t,l,n)=>{var r,i,o,c;const a=[l,{code:t,...n||{}}];if((i=(r=e==null?void 0:e.services)==null?void 0:r.logger)!=null&&i.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);Bn(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(c=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&c.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},xh={},iu=(e,t,l,n)=>{Bn(l)&&xh[l]||(Bn(l)&&(xh[l]=new Date),Lb(e,t,l,n))},hp=(e,t)=>()=>{if(e.isInitialized)t();else{const l=()=>{setTimeout(()=>{e.off("initialized",l)},0),t()};e.on("initialized",l)}},ou=(e,t,l)=>{e.loadNamespaces(t,hp(e,l))},Sh=(e,t,l,n)=>{if(Bn(l)&&(l=[l]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ou(e,l,n);l.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,hp(e,n))},Ob=(e,t,l={})=>!t.languages||!t.languages.length?(iu(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:l.lng,precheck:(n,a)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e))return!1}}),Bn=e=>typeof e=="string",Bb=e=>typeof e=="object"&&e!==null,Ub=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hb={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Fb=e=>Hb[e],Vb=e=>e.replace(Ub,Fb);let qb={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Vb,transDefaultProps:void 0};const $b=()=>qb;let Gb;const Yb=()=>Gb,mp=S.createContext();class Kb{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var gp={exports:{}},_p={};/**
 * @license React
 * use-sync-external-store-shim.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 Oa=S;function Zb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xb=typeof Object.is=="function"?Object.is:Zb,Qb=Oa.useState,Wb=Oa.useEffect,Jb=Oa.useLayoutEffect,Ib=Oa.useDebugValue;function Pb(e,t){var l=t(),n=Qb({inst:{value:l,getSnapshot:t}}),a=n[0].inst,r=n[1];return Jb(function(){a.value=l,a.getSnapshot=t,Is(a)&&r({inst:a})},[e,l,t]),Wb(function(){return Is(a)&&r({inst:a}),e(function(){Is(a)&&r({inst:a})})},[e]),Ib(l),l}function Is(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Xb(e,l)}catch{return!0}}function ev(e,t){return t()}var tv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ev:Pb;_p.useSyncExternalStore=Oa.useSyncExternalStore!==void 0?Oa.useSyncExternalStore:tv;gp.exports=_p;var lv=gp.exports;const nv=(e,t)=>{if(Bn(t))return t;if(Bb(t)&&Bn(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const l=e[e.length-1];return typeof l=="function"?"":l}return e},av={t:nv,ready:!1},rv=()=>()=>{},be=(e,t={})=>{var M,x,O;const{i18n:l}=t,{i18n:n,defaultNS:a}=S.useContext(mp)||{},r=l||n||Yb();r&&!r.reportNamespaces&&(r.reportNamespaces=new Kb),r||iu(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=S.useMemo(()=>{var z;return{...$b(),...(z=r==null?void 0:r.options)==null?void 0:z.react,...t}},[r,t]),{useSuspense:o,keyPrefix:c}=i,u=a||((M=r==null?void 0:r.options)==null?void 0:M.defaultNS),d=Bn(u)?[u]:u||["translation"],h=S.useMemo(()=>d,d);(O=(x=r==null?void 0:r.reportNamespaces)==null?void 0:x.addUsedNamespaces)==null||O.call(x,h);const f=S.useRef(0),_=S.useCallback(z=>{if(!r)return rv;const{bindI18n:U,bindI18nStore:V}=i,G=()=>{f.current+=1,z()};return U&&r.on(U,G),V&&r.store.on(V,G),()=>{U&&U.split(" ").forEach(R=>r.off(R,G)),V&&V.split(" ").forEach(R=>r.store.off(R,G))}},[r,i]),y=S.useRef(),p=S.useCallback(()=>{if(!r)return av;const z=!!(r.isInitialized||r.initializedStoreOnce)&&h.every(Y=>Ob(Y,r,i)),U=t.lng||r.language,V=f.current,G=y.current;if(G&&G.ready===z&&G.lng===U&&G.keyPrefix===c&&G.revision===V)return G;const q={t:r.getFixedT(U,i.nsMode==="fallback"?h:h[0],c,{scopeNs:h}),ready:z,lng:U,keyPrefix:c,revision:V};return y.current=q,q},[r,h,c,i,t.lng]),[w,m]=S.useState(0),{t:g,ready:b}=lv.useSyncExternalStore(_,p,p);S.useEffect(()=>{if(r&&!b&&!o){const z=()=>m(U=>U+1);t.lng?Sh(r,t.lng,h,z):ou(r,h,z)}},[r,t.lng,h,b,o,w]);const v=r||{},C=S.useRef(null),k=S.useRef(),E=z=>{const U=Object.getOwnPropertyDescriptors(z);U.__original&&delete U.__original;const V=Object.create(Object.getPrototypeOf(z),U);if(!Object.prototype.hasOwnProperty.call(V,"__original"))try{Object.defineProperty(V,"__original",{value:z,writable:!1,enumerable:!1,configurable:!1})}catch{}return V},D=S.useMemo(()=>{const z=v,U=z==null?void 0:z.language;let V=z;z&&(C.current&&C.current.__original===z?k.current!==U?(V=E(z),C.current=V,k.current=U):V=C.current:(V=E(z),C.current=V,k.current=U));const G=!b&&!o?(...q)=>(iu(r,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),g(...q)):g,R=[G,V,b];return R.t=G,R.i18n=V,R.ready=b,R},[g,v,b,v.resolvedLanguage,v.language,v.languages]);if(r&&o&&!b)throw new Promise(z=>{const U=()=>z();t.lng?Sh(r,t.lng,h,U):ou(r,h,U)});return D};function iv({i18n:e,defaultNS:t,children:l}){const n=S.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return S.createElement(mp.Provider,{value:n},l)}/**
 * @license lucide-react v1.16.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=(...e)=>e.filter((t,l,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===l).join(" ").trim();/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ov=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,l,n)=>n?n.toUpperCase():l.toLowerCase());/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ch=e=>{const t=sv(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Ps={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 v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cv=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},uv=S.createContext({}),dv=()=>S.useContext(uv),fv=S.forwardRef(({color:e,size:t,strokeWidth:l,absoluteStrokeWidth:n,className:a="",children:r,iconNode:i,...o},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:h=!1,color:f="currentColor",className:_=""}=dv()??{},y=n??h?Number(l??d)*24/Number(t??u):l??d;return S.createElement("svg",{ref:c,...Ps,width:t??u??Ps.width,height:t??u??Ps.height,stroke:e??f,strokeWidth:y,className:pp("lucide",_,a),...!r&&!cv(o)&&{"aria-hidden":"true"},...o},[...i.map(([p,w])=>S.createElement(p,w)),...Array.isArray(r)?r:[r]])});/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q=(e,t)=>{const l=S.forwardRef(({className:n,...a},r)=>S.createElement(fv,{ref:r,iconNode:t,className:pp(`lucide-${ov(Ch(e))}`,`lucide-${e}`,n),...a}));return l.displayName=Ch(e),l};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hv=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],su=Q("arrow-down-right",hv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mv=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],gv=Q("arrow-down-to-line",mv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _v=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],wa=Q("arrow-down",_v);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pv=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ns=Q("arrow-left",pv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yv=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],zo=Q("arrow-right",yv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bv=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],cu=Q("arrow-up-right",bv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vv=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],wv=Q("arrow-up-to-line",vv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],xa=Q("arrow-up",xv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sv=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],yp=Q("bold",Sv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cv=[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]],jv=Q("brush",Cv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ev=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ct=Q("check",Ev);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Un=Q("chevron-down",Nv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Av=Q("chevron-left",kv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mo=Q("chevron-right",Tv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dv=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xd=Q("chevron-up",Dv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rv=[["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"}]],bp=Q("circle-alert",Rv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],At=Q("circle",zv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mv=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],Lv=Q("clipboard",Mv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ov=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Bv=Q("copy",Ov);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uv=[["path",{d:"m13 21-3-3 3-3",key:"s3o1nf"}],["path",{d:"M20 18H10",key:"14r3mt"}],["path",{d:"M3 11h.01",key:"1eifu7"}],["rect",{x:"6",y:"3",width:"5",height:"8",rx:"2.5",key:"v9paqo"}]],Hv=Q("decimals-arrow-left",Uv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fv=[["path",{d:"M10 18h10",key:"1y5s8o"}],["path",{d:"m17 21 3-3-3-3",key:"1ammt0"}],["path",{d:"M3 11h.01",key:"1eifu7"}],["rect",{x:"15",y:"3",width:"5",height:"8",rx:"2.5",key:"76md6a"}],["rect",{x:"6",y:"3",width:"5",height:"8",rx:"2.5",key:"v9paqo"}]],Vv=Q("decimals-arrow-right",Fv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qv=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]],vp=Q("diamond",qv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $v=[["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"}]],Gv=Q("dollar-sign",$v);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yv=[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]],Kv=Q("euro",Yv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zv=[["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"}]],Sd=Q("eye-off",Zv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xv=[["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"}]],wp=Q("eye",Xv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qv=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],Wi=Q("flag",Qv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wv=[["path",{d:"M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",key:"11za1p"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],Jv=Q("grid-2x2-check",Wv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Iv=[["path",{d:"M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",key:"11za1p"}],["path",{d:"m16 16 5 5",key:"8tpb07"}],["path",{d:"m16 21 5-5",key:"193jll"}]],Pv=Q("grid-2x2-x",Iv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e2=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],xp=Q("grid-2x2",e2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t2=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Tt=Q("heart",t2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const l2=[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19 3 3v-5.5",key:"9ldu5r"}],["path",{d:"m17 22 3-3",key:"1nkfve"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],n2=Q("image-down",l2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a2=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Sp=Q("italic",a2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const r2=[["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"}]],i2=Q("layers",r2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const o2=[["path",{d:"M11 5h2",key:"1s6z07"}],["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M19 5h2",key:"fjylsg"}],["path",{d:"M3 12h6",key:"ra68u1"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"M3 5h2",key:"1qgu90"}]],s2=Q("line-style",o2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],u2=Q("menu",c2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const d2=[["path",{d:"M5 12h14",key:"1ays0h"}]],Cd=Q("minus",d2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f2=[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]],Cp=Q("package-open",f2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const h2=[["path",{d:"M11 7 6 2",key:"1jwth8"}],["path",{d:"M18.992 12H2.041",key:"xw1gg"}],["path",{d:"M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595",key:"1nkol4"}],["path",{d:"m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33",key:"1nk1rd"}]],jd=Q("paint-bucket",h2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m2=[["rect",{width:"16",height:"6",x:"2",y:"2",rx:"2",key:"jcyz7m"}],["path",{d:"M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2",key:"1b9h7c"}],["rect",{width:"4",height:"6",x:"8",y:"16",rx:"1",key:"d6e7yl"}]],g2=Q("paint-roller",m2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _2=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],as=Q("pencil-line",_2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p2=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],y2=Q("percent",p2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sl=Q("plus",b2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v2=[["path",{d:"M18 7c0-5.333-8-5.333-8 0",key:"1prm2n"}],["path",{d:"M10 7v14",key:"18tmcs"}],["path",{d:"M6 21h12",key:"4dkmi1"}],["path",{d:"M6 13h10",key:"ybwr4a"}]],w2=Q("pound-sterling",v2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x2=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],S2=Q("redo-2",x2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C2=[["path",{d:"M4 7V4h16v3",key:"9msm58"}],["path",{d:"M5 20h6",key:"1h6pxn"}],["path",{d:"M13 4 8 20",key:"kqq6aj"}],["path",{d:"m15 15 5 5",key:"me55sn"}],["path",{d:"m20 15-5 5",key:"11p7ol"}]],jp=Q("remove-formatting",C2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j2=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],E2=Q("scissors",j2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N2=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ep=Q("search-x",N2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Np=Q("search",k2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A2=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],T2=Q("settings-2",A2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D2=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],Lo=Q("snowflake",D2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R2=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],Hn=Q("square-mouse-pointer",R2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z2=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Dt=Q("star",z2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M2=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],kp=Q("strikethrough",M2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L2=[["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"}]],Ap=Q("tag",L2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O2=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],B2=Q("text-align-end",O2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U2=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],H2=Q("text-align-center",U2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F2=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],V2=Q("text-align-start",F2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q2=[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]],$2=Q("text-cursor-input",q2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G2=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],Y2=Q("text-wrap",G2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K2=[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]],Tp=Q("thumbs-down",K2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z2=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],Dp=Q("thumbs-up",Z2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Yn=Q("trash-2",X2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q2=[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]],Oo=Q("triangle",Q2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W2=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],Rp=Q("type",W2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J2=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],zp=Q("underline",J2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I2=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],P2=Q("undo-2",I2);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ew=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jt=Q("x",ew);var jh=()=>new Date().toISOString(),Ni="IronCalc-Clipboard",tw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{id:"arrow-middle-from-line",clipPath:"url(#clip0_107_4135)",children:[s.jsx("path",{id:"Vector",d:"M8 14.6667V10.6667",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{id:"Vector_2",d:"M8 5.33333V1.33333",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{id:"Vector_3",d:"M14.6667 8H1.33334",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{id:"Vector_4",d:"M10 12.6667L8 10.6667L6 12.6667",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{id:"Vector_5",d:"M10 3.33333L8 5.33333L6 3.33333",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_107_4135",children:s.jsx("rect",{width:16,height:16,fill:"white"})})})]}),lw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M2 14H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 8H14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 2V11.3333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M14 11.3333V3.33333C14 2.59695 13.403 2 12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V11.3333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"})]}),nw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M14 5.33333V3.33333C14 2.59695 13.403 2 12.6667 2H8M14 10.6667V12.6667C14 13.403 13.403 14 12.6667 14H8M2 10.6667V12.6667C2 13.403 2.59695 14 3.33333 14H8M2 5.33333V3.33333C2 2.59695 2.59695 2 3.33333 2H8M8 14V10.6667M8 2V5.33333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 8H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),aw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M10.6667 2H12.6667C13.403 2 14 2.59695 14 3.33333V8M5.33333 2H3.33333C2.59695 2 2 2.59695 2 3.33333V8M5.33333 14H3.33333C2.59695 14 2 13.403 2 12.6667V8M10.6667 14H12.6667C13.403 14 14 13.403 14 12.6667V8M2 8H5.33333M14 8H10.6667",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 2V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),rw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M14 5.33333V3.33333C14 2.59695 13.403 2 12.6667 2H10.6667M14 10.6667V12.6667C14 13.403 13.403 14 12.6667 14H10.6667M2 10.6667V12.6667C2 13.403 2.59695 14 3.33333 14H5.33333M2 5.33333V3.33333C2 2.59695 2.59695 2 3.33333 2H5.33333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 8H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 2V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),iw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M4.66667 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H4.66667",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M4.66667 8H14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 2V14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 2V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),ow=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2Z",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 8H14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 2V14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"})]}),sw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M12.6667 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14H12.6667C13.403 14 14 13.403 14 12.6667V3.33333C14 2.59695 13.403 2 12.6667 2Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M4.66667 8H11.3333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 4.66667L8 11.3333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"})]}),cw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M11.3333 2H3.33333C2.59695 2 2 2.59695 2 3.33333V12.6667C2 13.403 2.59695 14 3.33333 14H11.3333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 8H11.3333",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 2V14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M14 2V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),uw=e=>s.jsxs("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M14 4.66667V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V4.66667",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 2H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2 8H14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M8 4.66667V14",stroke:"#B2B2B2",strokeLinecap:"round",strokeLinejoin:"round"})]}),dw=e=>s.jsx("svg",{width:12,height:14,viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.182 13.305C0.303333 13.3917 0.468 13.435 0.676 13.435C0.962 13.435 1.24367 13.3483 1.521 13.175C1.79833 13.0103 2.05833 12.7937 2.301 12.525C2.55233 12.2563 2.77333 11.9703 2.964 11.667C3.16333 11.3637 3.32367 11.069 3.445 10.783C3.575 10.5057 3.653 10.276 3.679 10.094L4.459 5.011H5.954V4.439H4.537L4.706 3.36C4.80133 2.75334 4.96167 2.281 5.187 1.943C5.421 1.59634 5.73733 1.423 6.136 1.423C6.422 1.423 6.67767 1.488 6.903 1.618L7.189 1.787H7.293L7.566 1.28C7.592 1.23667 7.61367 1.189 7.631 1.137C7.657 1.085 7.67 1.04167 7.67 1.007C7.67 0.93767 7.64833 0.881336 7.605 0.838003C7.57033 0.786003 7.49233 0.72967 7.371 0.669003C7.30167 0.643003 7.22367 0.621336 7.137 0.604003C7.05033 0.578003 6.95933 0.565002 6.864 0.565002C6.53467 0.565002 6.20967 0.651669 5.889 0.825003C5.56833 0.98967 5.265 1.21067 4.979 1.488C4.693 1.75667 4.43733 2.047 4.212 2.359C3.98667 2.66234 3.80033 2.957 3.653 3.243C3.51433 3.52034 3.432 3.75434 3.406 3.945L3.328 4.439H2.249V5.011H3.25L2.405 10.692C2.31833 11.2813 2.17533 11.745 1.976 12.083C1.77667 12.4297 1.508 12.603 1.17 12.603C0.953333 12.603 0.788667 12.564 0.676 12.486L0.39 12.278H0.312L0.0779999 12.746C0.026 12.85 0 12.9367 0 13.006C0 13.1187 0.0606667 13.2183 0.182 13.305ZM5.90545 9.98999C5.82745 10.1027 5.78845 10.211 5.78845 10.315H6.65945C6.70279 10.211 6.75045 10.1113 6.80245 10.016C6.85445 9.91199 6.93245 9.78199 7.03645 9.62599C7.14045 9.46132 7.30079 9.23166 7.51745 8.93699C7.73412 8.64232 8.03312 8.25232 8.41445 7.76699L9.45445 10.341H9.49345L11.2745 9.92499V9.82099L10.3385 9.44399L9.37645 6.98699C9.80112 6.50166 10.1521 6.11166 10.4295 5.81699C10.7068 5.52232 10.9235 5.29266 11.0795 5.12799C11.2441 4.96332 11.3568 4.83332 11.4175 4.73799C11.4868 4.63399 11.5215 4.53432 11.5215 4.43899H10.7025C10.6678 4.52566 10.6288 4.61666 10.5855 4.71199C10.5421 4.79866 10.4728 4.91566 10.3775 5.06299C10.2908 5.20166 10.1565 5.39666 9.97445 5.64799C9.79245 5.89932 9.54545 6.22866 9.23345 6.63599L8.31045 4.30899H8.27145L6.43845 4.72499V4.82899L7.38745 5.21899L8.27145 7.40299C7.78612 7.95766 7.38312 8.40399 7.06245 8.74199C6.74179 9.07999 6.48612 9.34432 6.29545 9.53499C6.11345 9.72566 5.98345 9.87732 5.90545 9.98999Z",fill:"#828282"})}),ye=S.forwardRef(function({variant:e="primary",size:t="md",pressed:l=!1,disabled:n=!1,children:a,startIcon:r,endIcon:i,style:o,className:c,...u},d){return s.jsxs("button",{ref:d,disabled:n,"aria-pressed":l,className:["ic-button",`ic-button--${e}`,`ic-button--${t}`,c].filter(Boolean).join(" "),style:o,...u,children:[r&&s.jsx("span",{className:"ic-button__icon",children:r}),a,i&&s.jsx("span",{className:"ic-button__icon",children:i})]})});ye.displayName="Button";var X=S.forwardRef(function({icon:e,variant:t="ghost",size:l="sm",pressed:n=!1,disabled:a=!1,style:r,className:i,...o},c){return s.jsx("button",{ref:c,className:["ic-button","ic-button--icon-only",`ic-button--${t}`,`ic-button--${l}`,i].filter(Boolean).join(" "),disabled:a,"aria-pressed":n,style:r,...o,children:s.jsx("span",{className:"ic-button__icon",children:e})})});X.displayName="IconButton";function Ed(e){let t=S.useRef(null),l=S.useRef(null);S.useEffect(()=>{e&&(l.current=document.activeElement,requestAnimationFrame(()=>{var a,r;(a=t.current)!=null&&a.contains(document.activeElement)||((r=t.current)==null||r.focus())}))},[e]);function n(){var a;(a=l.current)==null||a.focus()}return{modalRef:t,restoreFocus:n}}function Nd({focusableElements:e,onClose:t,onConfirm:l}){return{onKeyDown:S.useCallback(n=>{var a,r;if(n.key==="Escape"){n.stopPropagation(),t();return}if(n.key==="Enter"&&(n.metaKey||n.ctrlKey)){n.preventDefault(),l==null||l();return}if(n.key==="Tab"){let i=(a=e[0])==null?void 0:a.current,o=(r=e[e.length-1])==null?void 0:r.current;if(!i||!o)return;n.shiftKey?document.activeElement===i&&(n.preventDefault(),o.focus()):document.activeElement===o&&(n.preventDefault(),i.focus())}},[e,t,l])}}function rs({open:e,onClose:t,title:l,message:n,confirmLabel:a="OK",closeLabel:r="Close"}){let i=`${S.useId()}-title`,{modalRef:o,restoreFocus:c}=Ed(e),u=S.useRef(null),d=S.useRef(null),h=()=>{t(),c()},{onKeyDown:f}=Nd({focusableElements:[u,d],onClose:h,onConfirm:h});return e?ul.createPortal(s.jsx("div",{className:"ic-modal-dialog-backdrop",onClick:h,role:"none",children:s.jsxs("div",{ref:o,className:"ic-modal-dialog",onClick:_=>_.stopPropagation(),onKeyDown:f,role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,children:[s.jsxs("div",{className:"ic-modal-dialog-header",children:[s.jsx("h2",{id:i,children:l}),s.jsx(X,{ref:u,icon:s.jsx(jt,{}),"aria-label":r,onClick:h})]}),s.jsx("div",{className:"ic-modal-dialog-body",children:typeof n=="string"?s.jsx("p",{children:n}):n}),s.jsx("div",{className:"ic-modal-dialog-footer",children:s.jsx(ye,{ref:d,size:"md",onClick:h,autoFocus:!0,children:a})})]})}),document.body):null}rs.displayName="Alert";function Mp({open:e,onClose:t,onConfirm:l,title:n,message:a,confirmLabel:r="OK",cancelLabel:i="Cancel",closeLabel:o="Close",variant:c="default"}){let u=`${S.useId()}-title`,{modalRef:d,restoreFocus:h}=Ed(e),f=S.useRef(null),_=S.useRef(null),y=()=>{t(),h()},p=()=>{l(),y()},{onKeyDown:w}=Nd({focusableElements:[f,_],onClose:y,onConfirm:p});return e?ul.createPortal(s.jsx("div",{className:"ic-modal-dialog-backdrop",onClick:y,role:"none",children:s.jsxs("div",{ref:d,className:"ic-modal-dialog",onClick:m=>m.stopPropagation(),onKeyDown:w,role:"dialog","aria-modal":"true","aria-labelledby":u,tabIndex:-1,children:[s.jsxs("div",{className:"ic-modal-dialog-header",children:[s.jsx("h2",{id:u,children:n}),s.jsx(X,{ref:f,icon:s.jsx(jt,{}),"aria-label":o,onClick:y})]}),s.jsx("div",{className:"ic-modal-dialog-body",children:typeof a=="string"?s.jsx("p",{children:a}):a}),s.jsxs("div",{className:"ic-modal-dialog-footer",children:[s.jsx(ye,{size:"md",variant:"secondary",onClick:y,children:i}),s.jsx(ye,{ref:_,size:"md",autoFocus:!0,variant:c==="destructive"?"destructive":void 0,onClick:p,children:r})]})]})}),document.body):null}Mp.displayName="Confirm";var Ue=S.forwardRef(function({size:e="md",label:t,helperText:l,error:n=!1,disabled:a=!1,startAdornment:r,endAdornment:i,required:o,id:c,className:u,style:d,...h},f){let _=S.useId(),y=c??_,p=`${y}-helper`,w=["ic-input-control",`${e}`,n&&"is-error",a&&"is-disabled",r&&"has-start",i&&"has-end"].filter(Boolean).join(" ");return s.jsxs("div",{className:["ic-input",u].filter(Boolean).join(" "),style:d,children:[t&&s.jsx("label",{htmlFor:y,"data-required":o||void 0,children:t}),s.jsxs("div",{className:w,children:[r&&s.jsx("span",{children:r}),s.jsx("input",{ref:f,id:y,disabled:a,required:o,"aria-invalid":n||void 0,"aria-describedby":l?p:void 0,onKeyDown:m=>m.stopPropagation(),onClick:m=>m.stopPropagation(),onPaste:m=>m.stopPropagation(),onCopy:m=>m.stopPropagation(),onCut:m=>m.stopPropagation(),onFocus:m=>m.target.select(),spellCheck:!1,...h}),i&&s.jsx("span",{children:i})]}),l&&s.jsx("p",{id:p,children:l})]})});Ue.displayName="Input";function Lp({open:e,onClose:t,onSubmit:l,title:n,message:a,defaultValue:r="",confirmLabel:i="OK",cancelLabel:o="Cancel",closeLabel:c="Close",className:u,inputProps:d}){let h=`${S.useId()}-title`,{modalRef:f,restoreFocus:_}=Ed(e),y=S.useRef(null),p=S.useRef(null),[w,m]=S.useState(r);S.useEffect(()=>{e&&m(r)},[e,r]);let g=()=>{t(),_()},b=()=>{l(w),g()},{onKeyDown:v}=Nd({focusableElements:[y,p],onClose:g,onConfirm:b});return e?ul.createPortal(s.jsx("div",{className:"ic-modal-dialog-backdrop",onClick:g,role:"none",children:s.jsxs("div",{ref:f,className:["ic-modal-dialog",u].filter(Boolean).join(" "),onClick:C=>C.stopPropagation(),onKeyDown:v,role:"dialog","aria-modal":"true","aria-labelledby":h,tabIndex:-1,children:[s.jsxs("div",{className:"ic-modal-dialog-header",children:[s.jsx("h2",{id:h,children:n}),s.jsx(X,{ref:y,icon:s.jsx(jt,{}),"aria-label":c,onClick:g})]}),s.jsxs("div",{className:"ic-modal-dialog-body",children:[a&&(typeof a=="string"?s.jsx("p",{children:a}):a),s.jsx(Ue,{autoFocus:!0,...d,value:w,onChange:C=>m(C.target.value),onKeyDown:C=>{var k,E;C.stopPropagation(),C.key==="Escape"?(C.preventDefault(),g()):C.key==="Enter"&&(C.preventDefault(),(k=p.current)==null||k.focus()),(E=d==null?void 0:d.onKeyDown)==null||E.call(d,C)},onClick:C=>{var k;C.stopPropagation(),(k=d==null?void 0:d.onClick)==null||k.call(d,C)}})]}),s.jsxs("div",{className:"ic-modal-dialog-footer",children:[s.jsx(ye,{size:"md",variant:"secondary",onClick:g,children:o}),s.jsx(ye,{ref:p,size:"md",onClick:b,children:i})]})]})}),document.body):null}Lp.displayName="Prompt";var It=16384,ol=1048576;function fw(e){if(e.length!==1)return!1;let t=e.codePointAt(0)??0;return t>0&&t<255}var hw=e=>["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End"].includes(e),mw=(e,t)=>e.rowStart===e.rowEnd&&e.columnEnd===e.columnStart?`${rt(t.column)}${t.row}`:e.rowStart===1&&e.rowEnd===1048576?`${rt(e.columnStart)}:${rt(e.columnEnd)}`:e.columnStart===1&&e.columnEnd===16384?`${e.rowStart}:${e.rowEnd}`:`${rt(e.columnStart)}${e.rowStart}:${rt(e.columnEnd)}${e.rowEnd}`;function hl(e,t,l){let{sheet:n,rowStart:a,rowEnd:r,columnStart:i,columnEnd:o}=e,c=n===t?"":`${cp(l)}!`;return a===r&&i===o?`${c}${rt(i)}${a}`:`${c}${rt(i)}${a}:${rt(o)}${r}`}function Op(e,t){let[l,n,a,r]=e.range,i=cp(t[e.sheet]);return l===a&&n===r?`${i}!$${rt(n)}$${l}`:`${i}!$${rt(n)}$${l}:$${rt(r)}$${a}`}function Bp(e){return e?Array.from(e.querySelectorAll('button, input, [href], [tabindex]:not([tabindex="-1"])')).filter(t=>!t.hasAttribute("disabled")&&t.getAttribute("aria-hidden")!=="true"&&t.tabIndex!==-1):[]}function ec(e,t,l){return Array.from(e).slice(t,l).join("")}function Up(e){return typeof e=="object"&&"Reference"in e}function Hp(e){return typeof e=="object"&&"Range"in e}function da(e,t){if(!e.startsWith("="))return!1;if(e==="=")return!0;let l=e.length;return!!(t===l&&[",","(","+","*","-","/","<",">","=","&",";"].includes(e[l-1]))}function uu(e,t=1){let l=[{name:"Cyan",rgba:[89,185,188,1],hex:"#59B9BC"},{name:"Flamingo",rgba:[236,87,83,1],hex:"#EC5753"},{hex:"#3358B7",rgba:[51,88,183,1],name:"Blue"},{hex:"#F8CD3C",rgba:[248,205,60,1],name:"Yellow"},{hex:"#3BB68A",rgba:[59,182,138,1],name:"Emerald"},{hex:"#523E93",rgba:[82,62,147,1],name:"Violet"},{hex:"#A23C52",rgba:[162,60,82,1],name:"Burgundy"},{hex:"#8CB354",rgba:[162,60,82,1],name:"Wasabi"},{hex:"#D03627",rgba:[208,54,39,1],name:"Red"},{hex:"#1B717E",rgba:[27,113,126,1],name:"Teal"}];if(t===1)return l[e%10].hex;let{rgba:n}=l[e%10];return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t})`}function Eh(e,t){let l=[],n=[],a=0;if(t.startsWith("=")){let r=t.slice(1),i=vd(r),o=i.length,c={},u=e.getSelectedSheet(),d=e.getWorksheetsProperties().map(h=>h.name);for(let h=0;h<o;h+=1){let{token:f,start:_,end:y}=i[h];if(Up(f)){let{sheet:p,row:w,column:m}=f.Reference,g=p?d.indexOf(p):u,b=`${g}-${w}-${m}`,v=c[b];v||(v=uu(a),c[b]=v,a+=1),l.push(s.jsx("span",{style:{color:v},children:ec(r,_,y)},h)),n.push({sheet:g,rowStart:w,columnStart:m,rowEnd:w,columnEnd:m,color:v})}else if(Hp(f)){let{sheet:p,left:{row:w,column:m},right:{row:g,column:b}}=f.Range,v=p?d.indexOf(p):u,C=`${v}-${w}-${m}:${g}-${b}`,k=c[C];k||(k=uu(a),c[C]=k,a+=1),w>g&&([w,g]=[g,w]),m>b&&([m,b]=[b,m]),l.push(s.jsx("span",{style:{color:k},children:ec(r,_,y)},h)),a+=1,n.push({sheet:v,rowStart:w,columnStart:m,rowEnd:g,columnEnd:b,color:k})}else l.push(s.jsx("span",{children:ec(r,_,y)},h))}l=[s.jsx("span",{children:"="},"equals")].concat(l)}else l=[s.jsx("span",{children:t},"single")];return t.endsWith(`
`)&&l.push(s.jsx("span",{children:`
`},"trailing-newline")),{html:l,activeRanges:n}}function Al(e,t){let l=e.getWorksheetsProperties(),{token:n}=vd(t)[0];if(Hp(n)){let{sheet:a,left:{row:r,column:i},right:{row:o,column:c}}=n.Range;if(a!==null){let u=l.findIndex(d=>d.name===a);if(u>=0)return[u,r,i,o,c]}}else if(Up(n)){let{sheet:a,row:r,column:i}=n.Reference;if(a!==null){let o=l.findIndex(c=>c.name===a);if(o>=0)return[o,r,i,r,i]}}return null}function ki(e){let{rowStart:t,rowEnd:l,columnStart:n,columnEnd:a}=e;return!(t<1||t>1048576||l<1||l>1048576||n<1||n>16384||a<1||a>16384)}var gw=e=>{let{model:t,onEditEnd:l,onTextUpdated:n,workbookState:a,textareaRef:r}=e;return{onKeyDown:S.useCallback(i=>{var _,y,p;let{key:o,shiftKey:c,altKey:u,ctrlKey:d}=i,h=r.current,f=a.getEditingCell();if(!(!h||!f))switch(o){case"Enter":if(u){let w=h.selectionStart,m=h.selectionEnd,g=h.value;f.text=`${g.slice(0,w)}
${g.slice(m)}`,a.setEditingCell(f),setTimeout(()=>{h.setSelectionRange(w+1,w+1)},0),i.stopPropagation(),i.preventDefault(),n();return}if(i.stopPropagation(),i.preventDefault(),d&&c){let[w,m,g,b]=t.getSelectedView().range,v=b-m+1,C=g-w+1;t.setUserArrayFormula(f.sheet,f.row,f.column,v,C,f.text+(((_=f.referencedRange)==null?void 0:_.str)||"")),t.onArrowDown()}else t.setUserInput(f.sheet,f.row,f.column,f.text+(((y=f.referencedRange)==null?void 0:y.str)||"")),c?t.onArrowUp():t.onArrowDown();a.clearEditingCell(),l();return;case"Tab":a.clearEditingCell(),t.setUserInput(f.sheet,f.row,f.column,f.text+(((p=f.referencedRange)==null?void 0:p.str)||"")),c?t.onArrowLeft():t.onArrowRight(),r.current&&(r.current.value=""),i.stopPropagation(),i.preventDefault(),l();return;case"Escape":{let w=a.getEditingCell();w&&t.setSelectedSheet(w.sheet),a.clearEditingCell(),l();return}case"ArrowRight":if(f.mode==="edit")return;if(i.stopPropagation(),i.preventDefault(),f.referencedRange){let w=t.getWorksheetsProperties().map(v=>v.name),m=f.referencedRange.range,{anchorRow:g,anchorColumn:b}=f.referencedRange;if(c){let v=(b===m.columnStart?m.columnEnd:m.columnStart)+1;if(v>16384)return;m.columnStart=Math.min(b,v),m.columnEnd=Math.max(b,v)}else{let v=g===m.rowStart?m.rowEnd:m.rowStart,C=(b===m.columnStart?m.columnEnd:m.columnStart)+1;if(C>16384)return;m.columnStart=C,m.columnEnd=C,m.rowStart=v,m.rowEnd=v,g=v,b=C}f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:g,anchorColumn:b},a.setEditingCell(f),n();return}if(da(f.text,f.cursorStart)){let w=t.getWorksheetsProperties().map(g=>g.name),m={sheet:f.sheet,rowStart:f.row,rowEnd:f.row,columnStart:f.column+1,columnEnd:f.column+1};if(!ki(m))return;f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:m.rowStart,anchorColumn:m.columnStart},a.setEditingCell(f),n();return}a.clearEditingCell(),t.setUserInput(f.sheet,f.row,f.column,f.text),t.setSelectedSheet(f.sheet),c||t.onArrowRight(),r.current&&(r.current.value=""),l();return;case"ArrowLeft":if(f.mode==="edit")return;if(i.stopPropagation(),i.preventDefault(),f.referencedRange){let w=t.getWorksheetsProperties().map(v=>v.name),m=f.referencedRange.range,{anchorRow:g,anchorColumn:b}=f.referencedRange;if(c){let v=(b===m.columnStart?m.columnEnd:m.columnStart)-1;if(v<1)return;m.columnStart=Math.min(b,v),m.columnEnd=Math.max(b,v)}else{let v=g===m.rowStart?m.rowEnd:m.rowStart,C=(b===m.columnStart?m.columnEnd:m.columnStart)-1;if(C<1)return;m.columnStart=C,m.columnEnd=C,m.rowStart=v,m.rowEnd=v,g=v,b=C}f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:g,anchorColumn:b},a.setEditingCell(f),n();return}if(da(f.text,f.cursorStart)){let w=t.getWorksheetsProperties().map(g=>g.name),m={sheet:f.sheet,rowStart:f.row,rowEnd:f.row,columnStart:f.column-1,columnEnd:f.column-1};if(!ki(m))return;f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:m.rowStart,anchorColumn:m.columnStart},a.setEditingCell(f),n();return}a.clearEditingCell(),t.setUserInput(f.sheet,f.row,f.column,f.text),t.setSelectedSheet(f.sheet),c||t.onArrowLeft(),r.current&&(r.current.value=""),l();return;case"ArrowUp":if(f.mode==="edit")return;if(i.stopPropagation(),i.preventDefault(),f.referencedRange){let w=t.getWorksheetsProperties().map(v=>v.name),m=f.referencedRange.range,{anchorRow:g,anchorColumn:b}=f.referencedRange;if(c){let v=(g===m.rowStart?m.rowEnd:m.rowStart)-1;if(v<1)return;m.rowStart=Math.min(g,v),m.rowEnd=Math.max(g,v)}else{let v=g===m.rowStart?m.rowEnd:m.rowStart,C=b===m.columnStart?m.columnEnd:m.columnStart,k=v-1;if(k<1)return;m.columnStart=C,m.columnEnd=C,m.rowStart=k,m.rowEnd=k,g=k,b=C}f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:g,anchorColumn:b},a.setEditingCell(f),n();return}if(da(f.text,f.cursorStart)){let w=t.getWorksheetsProperties().map(g=>g.name),m={sheet:f.sheet,rowStart:f.row-1,rowEnd:f.row-1,columnStart:f.column,columnEnd:f.column};if(!ki(m))return;f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:m.rowStart,anchorColumn:m.columnStart},a.setEditingCell(f),n();return}a.clearEditingCell(),t.setUserInput(f.sheet,f.row,f.column,f.text),t.setSelectedSheet(f.sheet),c||t.onArrowUp(),r.current&&(r.current.value=""),l();return;case"ArrowDown":if(f.mode==="edit")return;if(i.stopPropagation(),i.preventDefault(),f.referencedRange){let w=t.getWorksheetsProperties().map(v=>v.name),m=f.referencedRange.range,{anchorRow:g,anchorColumn:b}=f.referencedRange;if(c){let v=(g===m.rowStart?m.rowEnd:m.rowStart)+1;if(v>1048576)return;m.rowStart=Math.min(g,v),m.rowEnd=Math.max(g,v)}else{let v=g===m.rowStart?m.rowEnd:m.rowStart,C=b===m.columnStart?m.columnEnd:m.columnStart,k=v+1;if(k>1048576)return;m.columnStart=C,m.columnEnd=C,m.rowStart=k,m.rowEnd=k,g=k,b=C}f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:g,anchorColumn:b},a.setEditingCell(f),n();return}if(da(f.text,f.cursorStart)){let w=t.getWorksheetsProperties().map(g=>g.name),m={sheet:f.sheet,rowStart:f.row+1,rowEnd:f.row+1,columnStart:f.column,columnEnd:f.column};if(!ki(m))return;f.referencedRange={range:m,str:hl(m,f.sheet,w[m.sheet]),anchorRow:m.rowStart,anchorColumn:m.columnStart},a.setEditingCell(f),n();return}a.clearEditingCell(),t.setUserInput(f.sheet,f.row,f.column,f.text),t.setSelectedSheet(f.sheet),c||t.onArrowDown(),r.current&&(r.current.value=""),l();return;case"Shift":return;case"PageDown":case"PageUp":i.stopPropagation(),i.preventDefault();return;case"End":case"Home":f.mode="edit",a.setEditingCell(f);return}},[t,l,n,a,r.current])}},Nh={fontWeight:"inherit",fontFamily:"inherit",fontSize:"inherit",position:"absolute",left:0,top:0,whiteSpace:"pre",width:"100%",padding:0,lineHeight:"22px"},_w="rgb(242, 153, 74)",Fp=e=>{let{canEdit:t,model:l,onEditEnd:n,onTextUpdated:a,originalText:r,workbookState:i,type:o}=e,{t:c}=be(),[u,d]=S.useState(r),[h,f]=S.useState(null),_=S.useRef(null),y=S.useRef(null),p=S.useRef(null);S.useEffect(()=>{d(r),p.current&&(p.current.value=r)},[r]);let{onKeyDown:w}=gw({model:l,onEditEnd:n,onTextUpdated:a,workbookState:i,textareaRef:p});S.useEffect(()=>{var M;let k=i.getEditingCell();if(!k)return;let{editorWidth:E,editorHeight:D}=k;if(_.current){let x=_.current.scrollWidth;x>E-5&&(k.editorWidth=x+10);let O=_.current.scrollHeight;O>D&&(k.editorHeight=O)}o===k.focus&&((M=p.current)==null||M.focus({preventScroll:!0}))});let m=S.useCallback(()=>{let k=p.current,E=i.getEditingCell();if(!k||!E)return;let D=k.value;E.text=D,E.referencedRange=null,E.cursorStart=k.selectionStart,E.cursorEnd=k.selectionEnd;let M=Eh(l,D);D===""&&o==="cell"&&(E.mode="accept"),i.setEditingCell(E),i.setActiveRanges(M.activeRanges),d(E.text),a()},[i,l,a,o]),g=S.useCallback(()=>{let k=i.getEditingCell();o===(k==null?void 0:k.focus)&&(p.current&&(p.current.value=""),k&&(l.setUserInput(k.sheet,k.row,k.column,i.getEditingText()),i.clearEditingCell()),n())},[l,i,n,o]),b=i.getEditingCell(),v=b!==null||o==="formula-bar"?"block":"none",C=Eh(l,b?i.getEditingText():r).html;return s.jsxs(s.Fragment,{children:[s.jsx(rs,{open:h!==null,onClose:()=>f(null),title:c("error_dialog.error_editing_formula"),message:h??void 0}),s.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",display:v,background:"#FFF",fontFamily:"var(--palette-sheet-default-cell-font-family)",fontSize:"13px"},children:[s.jsx("div",{ref:y,style:{...Nh,textAlign:"left",pointerEvents:"none",height:"100%"},children:s.jsx("div",{style:{display:"inline-block"},ref:_,children:C})}),s.jsx("textarea",{ref:p,rows:1,style:{...Nh,color:"transparent",backgroundColor:"transparent",caretColor:_w,outline:"none",resize:"none",border:"none",height:"100%",overflow:"hidden",alignContent:"baseline"},defaultValue:u,spellCheck:"false",onKeyDown:k=>{try{w(k)}catch(E){let D=i.getEditingCell();D&&l.setSelectedSheet(D.sheet),i.clearEditingCell(),n(),f(String(E))}},disabled:!t,onChange:m,onBlur:g,onPointerDown:k=>{if(!t)return;let E=i.getEditingCell();E&&(E.mode="edit",E.focus=o,i.setEditingCell(E),k.stopPropagation())},onScroll:()=>{y.current&&p.current&&(y.current.style.left=`-${p.current.scrollLeft}px`,y.current.style.top=`-${p.current.scrollTop}px`)},onPaste:k=>k.stopPropagation(),onCopy:k=>k.stopPropagation(),onDoubleClick:k=>k.stopPropagation(),onCut:k=>k.stopPropagation()})]})]})},pw=e=>{let{t}=be(),[l,n]=S.useState(!1),a=S.useRef(null),r=S.useRef(null),i=S.useId(),o=e.model.getDefinedNameList(),c=S.useCallback(()=>{n(!0),e.onMenuOpenChange(!0)},[e.onMenuOpenChange]),u=S.useCallback(()=>{var h;n(!1),e.onMenuOpenChange(!1),(h=r.current)==null||h.focus()},[e.onMenuOpenChange]),d=S.useCallback(()=>{l?u():c()},[u,l,c]);return S.useEffect(()=>{if(!l)return;function h(_){var y;(y=a.current)!=null&&y.contains(_.target)||u()}function f(_){_.key==="Escape"&&u()}return document.addEventListener("pointerdown",h,!0),document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("pointerdown",h,!0),document.removeEventListener("keydown",f,!0)}},[u,l]),s.jsxs("div",{className:"ic-formula-bar-menu",ref:a,children:[s.jsx("div",{ref:r,className:"ic-formula-bar-menu-trigger",onClick:d,children:e.children}),l?s.jsxs("div",{id:i,className:"ic-formula-bar-menu-popover",role:"menu",children:[o.length>0?s.jsxs(s.Fragment,{children:[o.map(h=>s.jsxs("button",{type:"button",className:"ic-formula-bar-menu-item",role:"menuitem",onClick:()=>{let f=h.formula,_=Al(e.model,f);if(_){let[y,p,w,m,g]=_;e.model.setSelectedSheet(y),e.model.setSelectedCell(p,w),e.model.setSelectedRange(p,w,m,g)}e.onUpdate(),u()},children:[s.jsx(Ap,{className:"ic-formula-bar-menu-item-icon"}),s.jsx("span",{className:"ic-formula-bar-menu-item-text",children:h.name}),s.jsx("span",{className:"ic-formula-bar-menu-item-example",children:h.formula})]},`${h.name}-${h.scope}`)),s.jsx("div",{className:"ic-formula-bar-menu-divider"})]}):null,s.jsx("button",{type:"button",className:"ic-formula-bar-menu-item",role:"menuitem",disabled:!e.canEdit,onClick:()=>{e.openDrawer(),u()},children:s.jsx("span",{className:"ic-formula-bar-menu-item-text",children:t("formula_bar.manage_named_ranges")})})]}):null]})};function yw(e){let{cellAddress:t,formulaValue:l,model:n,onChange:a,onTextUpdated:r,workbookState:i}=e,[o,c]=S.useState(!1);return s.jsxs("div",{className:"ic-formula-bar-root",children:[s.jsx("div",{className:`${o?"ic-formula-bar-address ic-formula-bar-address--active":"ic-formula-bar-address"}`,children:s.jsx(pw,{onMenuOpenChange:u=>{c(u)},openDrawer:e.openDrawer,canEdit:e.canEdit,model:n,onUpdate:a,children:s.jsx(ye,{variant:"ghost",size:"sm",pressed:o,endIcon:s.jsx(Un,{}),children:t})})}),s.jsx("div",{className:"ic-formula-bar-divider"}),s.jsxs("div",{className:"ic-formula-bar-formula-container",children:[s.jsx("div",{className:"ic-formula-bar-button",children:s.jsx(dw,{})}),s.jsx("div",{className:"ic-formula-bar-editor-wrapper",onClick:u=>{if(!e.canEdit)return;let[d,h,f]=n.getSelectedCell(),_=n.getColumnWidth(d,f)*1,y=n.getRowHeight(d,h)*1;i.setEditingCell({sheet:d,row:h,column:f,text:l,referencedRange:null,cursorStart:l.length,cursorEnd:l.length,focus:"formula-bar",activeRanges:[],mode:"edit",editorWidth:_,editorHeight:y}),u.stopPropagation(),u.preventDefault()},children:s.jsx(Fp,{originalText:l,model:n,workbookState:i,onEditEnd:()=>{a()},onTextUpdated:r,type:"formula-bar",canEdit:e.canEdit})})]})]})}var Vp=[{Icon:xa,name:"ArrowUp"},{Icon:cu,name:"ArrowAngleUp"},{Icon:zo,name:"ArrowRight"},{Icon:su,name:"ArrowAngleDown"},{Icon:wa,name:"ArrowDown"},{Icon:xd,name:"TriangleUp"},{Icon:Cd,name:"FlatRectangle"},{Icon:Un,name:"TriangleDown"},{Icon:Ct,name:"Check"},{Icon:bp,name:"Exclamation"},{Icon:jt,name:"Cross"},{Icon:Dp,name:"ThumbsUp"},{Icon:Tp,name:"ThumbsDown"},{Icon:At,name:"Circle",filled:!0},{Icon:vp,name:"Rhombus",filled:!0},{Icon:Oo,name:"Triangle",filled:!0},{Icon:Wi,name:"Flag",filled:!0},{Icon:Dt,name:"Star",filled:!0},{Icon:Tt,name:"Heart",filled:!0}];function kd(e){return Vp.find(t=>t.name===e)||(console.warn(`Unknown icon name: ${e}`),{Icon:jt,filled:!1})}var kh=({value:e,color:t,onChange:l})=>{let[n,a]=S.useState(!1),r=S.useRef(null),i=S.useRef(null),[o,c]=S.useState({top:-9999,left:-9999}),u=kd(e);return S.useLayoutEffect(()=>{if(!n||!r.current||!i.current)return;let d=r.current.getBoundingClientRect(),h=i.current,f=h.offsetWidth,_=h.offsetHeight,y=window.innerWidth,p=window.innerHeight,w=d.left,m=d.bottom+4;w+f>y-8&&(w=y-f-8),m+_>p-8&&(m=d.top-_-4),c({top:m,left:w})},[n]),S.useEffect(()=>{if(!n)return;let d=h=>{var f,_;!((f=r.current)!=null&&f.contains(h.target))&&!((_=i.current)!=null&&_.contains(h.target))&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[n]),s.jsxs(s.Fragment,{children:[s.jsx("button",{ref:r,type:"button",className:"ic-icon-picker-trigger","aria-label":"Pick icon",onClick:()=>a(d=>!d),children:s.jsx(u.Icon,{size:16,color:t,fill:u.filled?t:"none"})}),n&&ul.createPortal(s.jsx("div",{ref:i,className:"ic-icon-picker-panel",style:{top:o.top,left:o.left},children:Vp.map(({Icon:d,name:h,filled:f})=>s.jsx("button",{type:"button",className:`ic-icon-picker-item${h===e?" ic-icon-picker-item--selected":""}`,"aria-label":h,onClick:()=>{l(h),a(!1)},children:s.jsx(d,{size:16,color:t,fill:f?t:"none"})},h))}),document.body)]})};function bw(e,t){let l=e.getBoundingClientRect(),n=Math.max(t.offsetWidth,l.width),a=t.offsetHeight,r=window.innerWidth,i=window.innerHeight,o=i-l.bottom-8,c=l.top-8,u=o>=a+4||o>=c,d=l.left,h=d+n>r-8?l.right-n:d,f=u?l.bottom+4:l.top-a-4;return h+n>r-8&&(h=r-n-8),h<8&&(h=8),f+a>i-8&&(f=i-a-8),f<8&&(f=8),{top:f,left:h,minWidth:l.width}}function Et({value:e,options:t,onChange:l,id:n,name:a,size:r="md",variant:i="default",label:o,helperText:c,error:u=!1,required:d,disabled:h=!1,className:f,hideCheck:_=!1}){let y=S.useId(),p=n??y,w=`${p}-helper`,m=`${p}-label`,g=`${p}-value`,b=`${p}-listbox`,v=S.useRef(null),C=S.useRef(null),k=S.useRef(null),E=S.useRef([]),D=t.findIndex(Z=>Z.value===e),M=t[D],[x,O]=S.useState(!1),[z,U]=S.useState(D),[V,G]=S.useState({});S.useEffect(()=>{x||U(Math.max(0,D))},[x,D]),S.useEffect(()=>{function Z(A){let H=A.target,K=v.current,xe=k.current;!H||!K||K.contains(H)||xe&&xe.contains(H)||O(!1)}return document.addEventListener("pointerdown",Z),()=>{document.removeEventListener("pointerdown",Z)}},[]),S.useEffect(()=>{var Z;x&&((Z=E.current[z])==null||Z.focus())},[x,z]),S.useLayoutEffect(()=>{if(!x)return;function Z(){let A=C.current,H=k.current;if(!A||!H)return;let{top:K,left:xe,minWidth:N}=bw(A,H);G({top:K,left:xe,minWidth:N})}return Z(),window.addEventListener("resize",Z),window.addEventListener("scroll",Z,!0),()=>{window.removeEventListener("resize",Z),window.removeEventListener("scroll",Z,!0)}},[x]);let R=S.useMemo(()=>["ic-select-control",r,i!=="default"&&`variant-${i}`,x&&"is-open",u&&"is-error",h&&"disabled"].filter(Boolean).join(" "),[h,u,x,r,i]);function q(){var Z;O(!1),(Z=C.current)==null||Z.focus()}function Y(){h||t.length===0||O(Z=>!Z)}function W(Z){var H;let A=t[Z];A&&(l(A.value),O(!1),(H=C.current)==null||H.focus())}function ne(Z){if(!(h||t.length===0||x))switch(Z.key){case"ArrowDown":case"ArrowUp":case"Enter":case" ":Z.preventDefault(),U(Math.max(0,D)),O(!0);break}}function he(Z,A){switch(Z.key){case"ArrowDown":Z.preventDefault(),U((A+1)%t.length);break;case"ArrowUp":Z.preventDefault(),U((A-1+t.length)%t.length);break;case"Home":Z.preventDefault(),U(0);break;case"End":Z.preventDefault(),U(t.length-1);break;case"Enter":case" ":Z.preventDefault(),W(A);break;case"Escape":Z.preventDefault(),q();break}}return s.jsxs("div",{ref:v,className:["ic-select",f].filter(Boolean).join(" "),children:[o&&s.jsx("label",{id:m,htmlFor:p,"data-required":d||void 0,children:o}),s.jsxs("div",{className:R,children:[a?s.jsx("input",{type:"hidden",name:a,value:e}):null,s.jsxs("button",{ref:C,id:p,type:"button",className:"ic-select-trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x?"true":"false","aria-controls":b,"aria-labelledby":o?`${m} ${g}`:void 0,"aria-required":d||void 0,"aria-invalid":u||void 0,"aria-describedby":c?w:void 0,disabled:h,onClick:Y,onKeyDown:ne,children:[s.jsx("span",{id:g,className:"ic-select-trigger-value",children:(M==null?void 0:M.triggerLabel)??(M==null?void 0:M.label)}),s.jsx("span",{className:"ic-select-trigger-icon","aria-hidden":"true",children:s.jsx(x?xd:Un,{size:16})})]}),x?ul.createPortal(s.jsx("div",{ref:k,className:"ic-dropdown-menu-wrapper",style:V,children:s.jsx("div",{id:b,className:"ic-dropdown-menu",role:"listbox","aria-labelledby":o?m:g,children:t.map((Z,A)=>{let H=Z.value===e;return s.jsxs("button",{ref:K=>{E.current[A]=K},type:"button",role:"option","aria-selected":H?"true":"false",className:["ic-dropdown-menu-option",H&&"is-selected",A===z&&"is-active"].filter(Boolean).join(" "),onClick:()=>W(A),onMouseEnter:()=>U(A),onKeyDown:K=>he(K,A),children:[!_&&s.jsx("span",{className:"ic-dropdown-menu-option-check","aria-hidden":"true",children:H?s.jsx(Ct,{size:16}):null}),s.jsx("span",{className:"ic-dropdown-menu-option-content",children:Z.label})]},Z.value)})})}),document.body):null]}),c&&s.jsx("p",{id:w,children:c})]})}Et.displayName="Select";function vw(e,t){let l=e.getBoundingClientRect(),n=t.offsetWidth,a=t.offsetHeight,r=window.innerWidth,i=l.left+l.width/2-n/2,o=l.top-a-6;return o<8&&(o=l.bottom+6),i+n>r-8&&(i=r-n-8),i<8&&(i=8),{top:o,left:i}}function ww(e){let t=S.useRef(null),l=S.useRef(null),[n,a]=S.useState({});return S.useLayoutEffect(()=>{if(!e)return;function r(){let i=t.current,o=l.current;if(!i||!o)return;let{top:c,left:u}=vw(i,o);a({top:c,left:u})}return r(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[e]),{triggerRef:t,tooltipRef:l,position:n}}function I({title:e,children:t}){let l=S.useId(),[n,a]=S.useState(!1),{triggerRef:r,tooltipRef:i,position:o}=ww(n);function c(){var u;return!!((u=r.current)!=null&&u.querySelector('[aria-expanded="true"]'))}return s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:r,role:"none",className:"ic-tooltip-trigger","aria-describedby":n?l:void 0,onPointerEnter:u=>{u.pointerType==="mouse"&&!c()&&a(!0)},onPointerLeave:()=>a(!1),onPointerDown:()=>a(!1),onFocus:()=>{c()||a(!0)},onBlur:()=>a(!1),children:t}),ul.createPortal(s.jsx("div",{ref:i,id:l,role:"tooltip",className:"ic-tooltip","data-visible":n,style:o,children:e}),document.body)]})}I.displayName="Tooltip";function Ka(){return(Ka=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(this,arguments)}function is(e,t){if(e==null)return{};var l,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)t.indexOf(l=r[n])>=0||(a[l]=e[l]);return a}function Zr(e){var t=S.useRef(e),l=S.useRef(function(n){t.current&&t.current(n)});return t.current=e,l.current}var Xr=function(e,t,l){return t===void 0&&(t=0),l===void 0&&(l=1),e>l?l:e<t?t:e},Tr=function(e){return"touches"in e},du=function(e){return e&&e.ownerDocument.defaultView||self},Ah=function(e,t,l){var n=e.getBoundingClientRect(),a=Tr(t)?function(r,i){for(var o=0;o<r.length;o++)if(r[o].identifier===i)return r[o];return r[0]}(t.touches,l):t;return{left:Xr((a.pageX-(n.left+du(e).pageXOffset))/n.width),top:Xr((a.pageY-(n.top+du(e).pageYOffset))/n.height)}},Th=function(e){!Tr(e)&&e.preventDefault()},qp=et.memo(function(e){var t=e.onMove,l=e.onKey,n=is(e,["onMove","onKey"]),a=S.useRef(null),r=Zr(t),i=Zr(l),o=S.useRef(null),c=S.useRef(!1),u=S.useMemo(function(){var _=function(w){Th(w),(Tr(w)?w.touches.length>0:w.buttons>0)&&a.current?r(Ah(a.current,w,o.current)):p(!1)},y=function(){return p(!1)};function p(w){var m=c.current,g=du(a.current),b=w?g.addEventListener:g.removeEventListener;b(m?"touchmove":"mousemove",_),b(m?"touchend":"mouseup",y)}return[function(w){var m=w.nativeEvent,g=a.current;if(g&&(Th(m),!function(v,C){return C&&!Tr(v)}(m,c.current)&&g)){if(Tr(m)){c.current=!0;var b=m.changedTouches||[];b.length&&(o.current=b[0].identifier)}g.focus(),r(Ah(g,m,o.current)),p(!0)}},function(w){var m=w.which||w.keyCode;m<37||m>40||(w.preventDefault(),i({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},p]},[i,r]),d=u[0],h=u[1],f=u[2];return S.useEffect(function(){return f},[f]),et.createElement("div",Ka({},n,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:a,onKeyDown:h,tabIndex:0,role:"slider"}))}),Ad=function(e){return e.filter(Boolean).join(" ")},$p=function(e){var t=e.color,l=e.left,n=e.top,a=n===void 0?.5:n,r=Ad(["react-colorful__pointer",e.className]);return et.createElement("div",{className:r,style:{top:100*a+"%",left:100*l+"%"}},et.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},ot=function(e,t,l){return t===void 0&&(t=0),l===void 0&&(l=10**t),Math.round(l*e)/l},xw=function(e){return Nw(fu(e))},fu=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ot(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ot(parseInt(e.substring(6,8),16)/255,2):1}},Sw=function(e){return Ew(jw(e))},Cw=function(e){var t=e.s,l=e.v,n=e.a,a=(200-t)*l/100;return{h:ot(e.h),s:ot(a>0&&a<200?t*l/100/(a<=100?a:200-a)*100:0),l:ot(a/2),a:ot(n,2)}},hu=function(e){var t=Cw(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},jw=function(e){var t=e.h,l=e.s,n=e.v,a=e.a;t=t/360*6,l/=100,n/=100;var r=Math.floor(t),i=n*(1-l),o=n*(1-(t-r)*l),c=n*(1-(1-t+r)*l),u=r%6;return{r:ot(255*[n,o,i,i,c,n][u]),g:ot(255*[c,n,n,o,i,i][u]),b:ot(255*[i,i,c,n,n,o][u]),a:ot(a,2)}},Ai=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ew=function(e){var t=e.r,l=e.g,n=e.b,a=e.a,r=a<1?Ai(ot(255*a)):"";return"#"+Ai(t)+Ai(l)+Ai(n)+r},Nw=function(e){var t=e.r,l=e.g,n=e.b,a=e.a,r=Math.max(t,l,n),i=r-Math.min(t,l,n),o=i?r===t?(l-n)/i:r===l?2+(n-t)/i:4+(t-l)/i:0;return{h:ot(60*(o<0?o+6:o)),s:ot(r?i/r*100:0),v:ot(r/255*100),a}},kw=et.memo(function(e){var t=e.hue,l=e.onChange,n=Ad(["react-colorful__hue",e.className]);return et.createElement("div",{className:n},et.createElement(qp,{onMove:function(a){l({h:360*a.left})},onKey:function(a){l({h:Xr(t+360*a.left,0,360)})},"aria-label":"Hue","aria-valuenow":ot(t),"aria-valuemax":"360","aria-valuemin":"0"},et.createElement($p,{className:"react-colorful__hue-pointer",left:t/360,color:hu({h:t,s:100,v:100,a:1})})))}),Aw=et.memo(function(e){var t=e.hsva,l=e.onChange,n={backgroundColor:hu({h:t.h,s:100,v:100,a:1})};return et.createElement("div",{className:"react-colorful__saturation",style:n},et.createElement(qp,{onMove:function(a){l({s:100*a.left,v:100-100*a.top})},onKey:function(a){l({s:Xr(t.s+100*a.left,0,100),v:Xr(t.v-100*a.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ot(t.s)+"%, Brightness "+ot(t.v)+"%"},et.createElement($p,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:hu(t)})))}),Gp=function(e,t){if(e===t)return!0;for(var l in e)if(e[l]!==t[l])return!1;return!0},Tw=function(e,t){return e.toLowerCase()===t.toLowerCase()||Gp(fu(e),fu(t))};function Dw(e,t,l){var n=Zr(l),a=S.useState(function(){return e.toHsva(t)}),r=a[0],i=a[1],o=S.useRef({color:t,hsva:r});return S.useEffect(function(){if(!e.equal(t,o.current.color)){var c=e.toHsva(t);o.current={hsva:c,color:t},i(c)}},[t,e]),S.useEffect(function(){var c;Gp(r,o.current.hsva)||e.equal(c=e.fromHsva(r),o.current.color)||(o.current={hsva:r,color:c},n(c))},[r,e,n]),[r,S.useCallback(function(c){i(function(u){return Object.assign({},u,c)})},[])]}var Rw=typeof window<"u"?S.useLayoutEffect:S.useEffect,zw=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Dh=new Map,Mw=function(e){Rw(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Dh.has(t)){var l=t.createElement("style");l.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Dh.set(t,l);var n=zw();n&&l.setAttribute("nonce",n),t.head.appendChild(l)}},[])},Lw=function(e){var t=e.className,l=e.colorModel,n=e.color,a=n===void 0?l.defaultColor:n,r=e.onChange,i=is(e,["className","colorModel","color","onChange"]),o=S.useRef(null);Mw(o);var c=Dw(l,a,r),u=c[0],d=c[1],h=Ad(["react-colorful",t]);return et.createElement("div",Ka({},i,{ref:o,className:h}),et.createElement(Aw,{hsva:u,onChange:d}),et.createElement(kw,{hue:u.h,onChange:d,className:"react-colorful__last-control"}))},Ow={defaultColor:"000",toHsva:xw,fromHsva:function(e){return Sw({h:e.h,s:e.s,v:e.v,a:1})},equal:Tw},Bw=function(e){return et.createElement(Lw,Ka({},e,{colorModel:Ow}))},Uw=/^#?([0-9A-F]{3,8})$/i,Hw=function(e){var t=e.color,l=t===void 0?"":t,n=e.onChange,a=e.onBlur,r=e.escape,i=e.validate,o=e.format,c=e.process,u=is(e,["color","onChange","onBlur","escape","validate","format","process"]),d=S.useState(function(){return r(l)}),h=d[0],f=d[1],_=Zr(n),y=Zr(a),p=S.useCallback(function(m){var g=r(m.target.value);f(g),i(g)&&_(c?c(g):g)},[r,c,i,_]),w=S.useCallback(function(m){i(m.target.value)||f(r(l)),y(m)},[l,r,i,y]);return S.useEffect(function(){f(r(l))},[l,r]),et.createElement("input",Ka({},u,{value:o?o(h):h,spellCheck:"false",onChange:p,onBlur:w}))},Rh=function(e){return"#"+e},Fw=function(e){var t=e.prefixed,l=e.alpha,n=is(e,["prefixed","alpha"]),a=S.useCallback(function(i){return i.replace(/([^0-9A-F]+)/gi,"").substring(0,l?8:6)},[l]),r=S.useCallback(function(i){return function(o,c){var u=Uw.exec(o),d=u?u[1].length:0;return d===3||d===6||!!c&&d===4||!!c&&d===8}(i,l)},[l]);return et.createElement(Hw,Ka({},n,{escape:a,format:t?Rh:void 0,process:Rh,validate:r}))},Vw=e=>{let{onEscape:t,getFocusableElements:l}=e;return{onKeyDown:S.useCallback(n=>{if(n.key==="Escape"){n.preventDefault(),t();return}if(n.key!=="Tab")return;let a=l();if(a.length===0)return;let r=a[0],i=a[a.length-1],o=document.activeElement;!n.shiftKey&&o===i&&(n.preventDefault(),r.focus()),n.shiftKey&&o===r&&(n.preventDefault(),i.focus())},[l,t])}},qw=14,$w=({color:e,onAccept:t,onCancel:l,anchorEl:n,open:a})=>{let[r,i]=S.useState(e),[o,c]=S.useState({top:0,left:0}),u=S.useRef([]),d=S.useRef(null),h=S.useId(),{t:f}=be();S.useEffect(()=>{i(e)},[e]),S.useEffect(()=>{var w,m;a&&((m=(w=d.current)==null?void 0:w.querySelector("input, button"))==null||m.focus())},[a]),S.useLayoutEffect(()=>{if(!a||!n.current)return;let w=()=>{let m=n.current,g=d.current;if(!m||!g)return;let b=m.getBoundingClientRect(),v=g.offsetWidth,C=g.offsetHeight,k=window.innerWidth,E=window.innerHeight,D=b.left-4,M=b.bottom+4;D+v>k-8&&(D=k-v-8),D<8&&(D=8),M+C>E-8&&(M=b.top-C-4),M<8&&(M=8),c({top:M,left:D})};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,!0),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}},[a,n]);let{onKeyDown:_}=Vw({onEscape:l,getFocusableElements:()=>Bp(d.current)}),y=w=>{u.current.includes(w)||(u.current=[w,...u.current].slice(0,qw)),i(w),t(w)},p=r.toUpperCase()==="#FFFFFF";return a?ul.createPortal(s.jsxs("div",{className:"ic-menu-layer",children:[s.jsx("div",{className:"ic-menu-backdrop",onClick:l,"aria-hidden":"true"}),s.jsx("div",{ref:d,className:"ic-advanced-color-picker-panel",style:{top:`${o.top}px`,left:`${o.left}px`},role:"dialog","aria-modal":"true","aria-label":f("color_picker.title"),onKeyDown:_,children:s.jsxs("div",{className:"ic-advanced-color-picker",onClick:w=>{w.stopPropagation()},children:[s.jsx(Bw,{color:r,onChange:w=>{i(w)}}),s.jsx("div",{className:"ic-advanced-color-picker-divider"}),s.jsxs("div",{className:"ic-advanced-color-picker-input-row",children:[s.jsxs("div",{className:"ic-advanced-color-picker-hex-wrapper",children:[s.jsx("label",{className:"ic-advanced-color-picker-hex-label",htmlFor:h,children:"Hex"}),s.jsxs("div",{className:"ic-advanced-color-picker-hex-input-box",children:[s.jsx("div",{className:"ic-advanced-color-picker-hash-label",children:"#"}),s.jsx(Fw,{id:h,className:"ic-advanced-color-picker-hex-input",color:r,onChange:w=>{i(w)}})]})]}),s.jsx("div",{className:["ic-advanced-color-picker-swatch",p?"ic-advanced-color-picker-swatch--white":""].filter(Boolean).join(" "),style:{backgroundColor:r,borderColor:p?"var(--palette-grey-300)":r},"aria-hidden":"true"})]}),s.jsx("div",{className:"ic-advanced-color-picker-divider"}),s.jsxs("div",{className:"ic-advanced-color-picker-buttons",children:[s.jsx(ye,{size:"sm",variant:"secondary",onClick:l,children:f("color_picker.cancel")}),s.jsx(ye,{size:"sm",startIcon:s.jsx(Ct,{}),onClick:()=>{y(r),l()},children:f("color_picker.apply")})]})]})})]}),document.body):null};function En(e){let t=Number(e.dataset.navRow),l=Number(e.dataset.navCol);return Number.isNaN(t)||Number.isNaN(l)?null:{row:t,col:l}}function Gw(e,t){return e.filter(l=>{var n;return((n=En(l))==null?void 0:n.row)===t})}function Yw(e,t){let l=Gw(e,t);return l.length===0?null:Math.max(...l.map(n=>{var a;return(a=En(n))==null?void 0:a.col}).filter(n=>n!==void 0))}var Kw=e=>{let{onEscape:t,getFocusableElements:l}=e;return{onKeyDown:S.useCallback(n=>{var _,y;let{key:a,shiftKey:r}=n,i=l();if(i.length===0)return;let o=document.activeElement,c=o?i.indexOf(o):-1;if(a==="Escape"){n.preventDefault(),t();return}if(a==="Tab"){if(n.preventDefault(),c===-1){(_=i[0])==null||_.focus();return}(y=i[r?(c-1+i.length)%i.length:(c+1)%i.length])==null||y.focus();return}if(a!=="ArrowLeft"&&a!=="ArrowRight"&&a!=="ArrowUp"&&a!=="ArrowDown"||!o)return;let u=En(o);if(!u)return;let d=u.row,h=u.col;a==="ArrowLeft"?--h:a==="ArrowRight"?h+=1:a==="ArrowUp"?--d:a==="ArrowDown"&&(d+=1);let f=i.find(p=>{let w=En(p);return(w==null?void 0:w.row)===d&&(w==null?void 0:w.col)===h});if(!f&&a==="ArrowLeft"){let p=u.row-1,w=Yw(i,p);w!==null&&(f=i.find(m=>{let g=En(m);return(g==null?void 0:g.row)===p&&(g==null?void 0:g.col)===w}))}if(!f&&a==="ArrowRight"){let p=u.row+1;f=i.find(w=>{let m=En(w);return(m==null?void 0:m.row)===p&&(m==null?void 0:m.col)===0})}!f&&(a==="ArrowUp"||a==="ArrowDown")&&(f=i.find(p=>{let w=En(p);return(w==null?void 0:w.row)===d&&(w==null?void 0:w.col)===u.col})),f&&(n.preventDefault(),f.focus())},[l,t])}},Zw=["#FFFFFF","#272525","#1B717E","#3BB68A","#8CB354","#F8CD3C","#F2994A","#EC5753","#523E93","#3358B7"],Xw=[["#F5F5F5","#F2F2F2","#EEEEEE","#E0E0E0","#BDBDBD"],["#9E9E9E","#757575","#616161","#424242","#333333"],["#BBD4D8","#82B1B8","#498D98","#1E5A63","#224348"],["#C4E9DC","#93D7BF","#62C5A1","#358A6C","#2F5F4D"],["#DDE8CC","#C0D5A1","#A3C276","#6E8846","#4F5E38"],["#FDF0C5","#FBE394","#F9D764","#B99A36","#7A682E"],["#FBE0C9","#F8C79B","#F5AD6E","#B5763F","#785334"],["#F9CDCB","#F5A3A0","#F07975","#B14845","#763937"],["#CBC5DF","#A095C4","#7565A9","#453672","#382F51"],["#C2CDE9","#8FA3D7","#5D79C5","#30498B","#2C395F"]],Qw=e=>{if(!e.startsWith("#"))return!1;let t=e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e,l=parseInt(t.slice(1),16),n=l>>16&255,a=l>>8&255,r=l&255;return .2126*n+.7152*a+.0722*r>160},zh=e=>{let t=e.toUpperCase();return t==="#FFF"||t==="#FFFFFF"},Ww=e=>Qw(e)?"#272525":"#FFFFFF",Jw="#272525";function Iw(e,t,l){let n=e.getBoundingClientRect(),a=t.offsetWidth,r=t.offsetHeight,i=window.innerWidth,o=window.innerHeight,c=0,u=0;return l==="bottom"?(c=n.left,u=n.bottom+4):l==="top"?(c=n.left,u=n.top-r-4):l==="right"?(c=n.right,u=n.top):(c=n.left-a-4,u=n.top),c+a>i-8&&(c=i-a-8),c<8&&(c=8),u+r>o-8&&(u=o-r-8),u<8&&(u=8),{top:u,left:c}}var cl=({color:e,defaultColor:t,title:l,onChange:n,onClose:a,anchorEl:r,open:i,placement:o="bottom"})=>{let[c,u]=S.useState(e),[d,h]=S.useState(!1),[f,_]=S.useState({top:0,left:0}),y=S.useRef([]),p=S.useRef(null),{t:w}=be();S.useEffect(()=>{u(e)},[e]);let{onKeyDown:m}=Kw({onEscape:()=>{h(!1),a()},getFocusableElements:()=>Bp(p.current)});S.useEffect(()=>{var C,k;i&&!d&&((k=(C=p.current)==null?void 0:C.querySelector("button"))==null||k.focus())},[i,d]),S.useLayoutEffect(()=>{if(!i||d)return;let C=r.current,k=p.current;if(!C||!k)return;let E=()=>{_(Iw(C,k,o))};return E(),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[r,i,d,o]);let g=S.useCallback(C=>{let k=C.target,E=p.current,D=r.current;!k||!E||E.contains(k)||D!=null&&D.contains(k)||a()},[a,r]),b=C=>{y.current.includes(C)||(y.current=[C,...y.current].slice(0,14)),u(C||Jw),n(C),h(!1)},v=(C,k,E)=>{let D=c.toUpperCase()===C.toUpperCase();return s.jsx("button",{type:"button",className:["ic-color-picker__swatch","ic-color-picker__swatch--selectable",zh(C)?"ic-color-picker__swatch--white":""].filter(Boolean).join(" "),style:{backgroundColor:C},onClick:()=>b(C),"aria-label":C,"data-nav-row":k,"data-nav-col":E,children:D?s.jsx(Ct,{className:"ic-color-picker__check-icon",style:{color:Ww(C)}}):null},C)};return i?d?s.jsx($w,{color:c,onAccept:b,onCancel:()=>h(!1),anchorEl:r,open:!0}):ul.createPortal(s.jsxs("div",{className:"ic-menu-layer",children:[s.jsx("div",{className:"ic-menu-backdrop",onPointerDown:a,"aria-hidden":"true"}),s.jsxs("div",{ref:p,className:"ic-color-picker",style:{top:`${f.top}px`,left:`${f.left}px`},role:"dialog","aria-modal":"true","aria-label":w("color_picker.add"),onKeyDown:m,onPointerDown:g,onClick:C=>{C.stopPropagation()},children:[s.jsxs("button",{type:"button",className:"ic-color-picker__menu-item",onClick:()=>b(t),"data-nav-row":0,"data-nav-col":0,children:[s.jsx("span",{className:"ic-color-picker__menu-item-square",style:{backgroundColor:t},"aria-hidden":"true"}),s.jsx("span",{className:"ic-color-picker__menu-item-text",children:l})]}),s.jsx("div",{className:"ic-color-picker__divider"}),s.jsxs("div",{className:"ic-color-picker__colors-wrapper",children:[s.jsx("div",{className:"ic-color-picker__color-list",children:Zw.map((C,k)=>v(C,1,k))}),s.jsx("div",{className:"ic-color-picker__color-grid",children:Xw.map((C,k)=>s.jsx("div",{className:"ic-color-picker__color-grid-col",children:C.map((E,D)=>v(E,2+D,k))},C.join("-")))})]}),s.jsx("div",{className:"ic-color-picker__divider"}),s.jsx("div",{className:"ic-color-picker__recent-label",children:w("color_picker.recent")}),s.jsxs("div",{className:"ic-color-picker__recent-colors-list",children:[y.current.length>0?y.current.map((C,k)=>s.jsx("button",{type:"button",className:["ic-color-picker__swatch",zh(C)?"ic-color-picker__swatch--white":""].filter(Boolean).join(" "),style:{backgroundColor:C},onClick:()=>{u(C),b(C)},"aria-label":C,"data-nav-row":7,"data-nav-col":k},C)):s.jsx("div",{className:"ic-color-picker__empty"}),s.jsx("button",{type:"button",className:"ic-color-picker__plus-button",onClick:()=>h(!0),title:w("color_picker.add"),"aria-label":w("color_picker.add"),"data-nav-row":7,"data-nav-col":y.current.length,children:s.jsx(sl,{})})]})]})]}),document.body):null},si=["number","percent","formula","percentile"],Pw=[...si,"none"],ex=["min",...si],tx=["max",...si];[...si];var lr=[{id:"r-y-g",colors:["#EC5753","#F8CD3D","#8CB354"]},{id:"g-y-r",colors:["#8CB354","#F8CD3D","#EC5753"]},{id:"r-w-g",colors:["#EC5753","#FFFFFF","#8CB354"]},{id:"g-w-r",colors:["#8CB354","#FFFFFF","#EC5753"]},{id:"r-w-b",colors:["#EC5753","#FFFFFF","#3458B7"]},{id:"b-w-r",colors:["#3458B7","#FFFFFF","#EC5753"]},{id:"g-w-p",colors:["#8CB354","#FFFFFF","#523E93"]},{id:"p-w-g",colors:["#523E93","#FFFFFF","#8CB354"]},{id:"g-lg",colors:["#8CB354","#E8F0DD"]},{id:"lg-g",colors:["#E8F0DD","#8CB354"]},{id:"r-lr",colors:["#EC5753","#FBDDDD"]},{id:"lr-r",colors:["#FBDDDD","#EC5753"]},{id:"r-y-b",colors:["#EC5753","#F2994A","#F8CD3D","#8CB354","#3458B7"]},{id:"b-y-r",colors:["#3458B7","#8CB354","#F8CD3D","#F2994A","#EC5753"]},{id:"dp-m-r",colors:["#35193E","#AC0070","#E13342","#F37651","#F6B48F"]},{id:"r-m-dp",colors:["#F6B48F","#F37651","#E13342","#AC0070","#35193E"]}],tc=5;function Mh(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}function lx(e,t,l){return`#${[e,t,l].map(n=>Math.round(n).toString(16).padStart(2,"0")).join("")}`}function Td(e,t,l){let[n,a,r]=Mh(e),[i,o,c]=Mh(t);return lx(n+(i-n)*l,a+(o-a)*l,r+(c-r)*l)}function Qn(e,t){let l=t*(e.length-1),n=Math.floor(l),a=Math.min(n+1,e.length-1);return Td(e[n],e[a],l-n)}function Dd(e){let t=Array.from({length:tc},(n,a)=>{let r=a/(tc-1)*(e.length-1),i=Math.floor(r),o=Math.min(i+1,e.length-1);return Td(e[i],e[o],r-i)}),l=100/tc;return`linear-gradient(to bottom, ${t.map((n,a)=>`${n} ${a*l}%, ${n} ${(a+1)*l}%`).join(", ")})`}function nx(e){switch(e){case"min":return ex;case"midpoint":return Pw;case"max":return tx;default:return si}}var lc=({label:e,stop:t,onChange:l,getSelectedArea:n,type:a})=>{let{t:r}=be(),[i,o]=S.useState(!1),c=S.useRef(null),u=nx(a).map(h=>({value:h,label:r(`conditional_formatting.color_scale_type_${h}`)})),d=t.type==="none";return s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:e}),s.jsxs("div",{className:"ic-cs-settings-row",children:[s.jsx(Et,{value:t.type,options:u,onChange:h=>l({...t,type:h}),hideCheck:!0}),!d&&t.type!=="min"&&t.type!=="max"&&s.jsx(Ue,{type:"text",value:t.value,onChange:h=>l({...t,value:h.target.value}),endAdornment:s.jsx(I,{title:r("conditional_formatting.use_selection"),children:s.jsx(X,{size:"sm",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":r("conditional_formatting.use_selection"),onClick:()=>l({...t,value:n()}),className:"ic-edit-rule-range-button"})})}),!d&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ic-input-control md ic-cs-color-swatch-wrapper",children:s.jsx("button",{ref:c,type:"button",className:"ic-cs-color-swatch",style:{backgroundColor:t.color},onClick:()=>o(!0),"aria-label":e})}),s.jsx(cl,{color:t.color,defaultColor:t.color,title:r("color_picker.default"),onChange:h=>{l({...t,color:h}),o(!1)},onClose:()=>o(!1),anchorEl:c,open:i})]})]})]})},ax=({onSave:e,onCancel:t,applyTo:l,onApplyToChange:n,initialValues:a,onPreviewChange:r,getSelectedArea:i})=>{let{t:o}=be(),[c,u]=S.useState(lr[0].id),[d,h]=S.useState((a==null?void 0:a.minimum)??{type:"min",value:"",color:Qn(lr[0].colors,0)}),[f,_]=S.useState((a==null?void 0:a.midpoint)??{type:"percentile",value:"50",color:Qn(lr[0].colors,.5)}),[y,p]=S.useState((a==null?void 0:a.maximum)??{type:"max",value:"",color:Qn(lr[0].colors,1)}),w=b=>{let v=b.length===2;h(C=>({...C,color:Qn(b,0)})),_(C=>({color:Qn(b,.5),type:v?"none":C.type==="none"?"percentile":C.type,value:v?"":C.type==="none"?"50":C.value})),p(C=>({...C,color:Qn(b,1)}))};S.useEffect(()=>{let b=f.type==="none"?Td(d.color,y.color,.5):f.color;r==null||r([d.color,b,y.color])},[d.color,f.color,f.type,y.color,r]);let m=b=>b.type==="min"||b.type==="max"||b.type==="none"||b.value.trim()!=="",g=l.trim()!==""&&m(d)&&m(f)&&m(y);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ic-edit-rule-content",children:[s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.apply_to")}),s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.apply_to_range")}),s.jsx(Ue,{type:"text",placeholder:o("conditional_formatting.apply_to_placeholder"),value:l,onChange:b=>n(b.target.value),endAdornment:s.jsx(I,{title:o("conditional_formatting.use_selection"),children:s.jsx(X,{size:"sm",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":o("conditional_formatting.use_selection"),onClick:()=>n(i()),className:"ic-edit-rule-range-button"})})})]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.tab_color_scale")}),s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:o("conditional_formatting.default_styles")}),s.jsx("div",{className:"ic-fsp-presets",children:lr.map(b=>s.jsx("button",{type:"button","aria-pressed":c===b.id,className:"ic-fsp-preset",style:{background:Dd(b.colors)},onClick:()=>{u(b.id),w(b.colors)}},b.id))})]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.color_scale_settings")}),s.jsx(lc,{label:o("conditional_formatting.color_scale_minimum"),stop:d,onChange:h,getSelectedArea:i,type:"min"}),s.jsx(lc,{label:o("conditional_formatting.color_scale_midpoint"),stop:f,onChange:_,getSelectedArea:i,type:"midpoint"}),s.jsx(lc,{label:o("conditional_formatting.color_scale_maximum"),stop:y,onChange:p,getSelectedArea:i,type:"max"})]})]}),s.jsxs("div",{className:"ic-edit-rule-footer",children:[s.jsx(ye,{variant:"secondary",onClick:t,children:o("conditional_formatting.cancel")}),s.jsx(ye,{startIcon:s.jsx(Ct,{}),disabled:!g,onClick:()=>e({minimum:d,midpoint:f,maximum:y}),children:o("conditional_formatting.apply")})]})]})},rx={between:"Between",not_between:"NotBetween",less_than:"LessThan",less_than_or_equal:"LessThanOrEqual",greater_than:"GreaterThan",greater_than_or_equal:"GreaterThanOrEqual",equals:"Equal",does_not_equal:"NotEqual"},ix={Between:"between",NotBetween:"not_between",LessThan:"less_than",LessThanOrEqual:"less_than_or_equal",GreaterThan:"greater_than",GreaterThanOrEqual:"greater_than_or_equal",Equal:"equals",NotEqual:"does_not_equal"},ox={contains:"Contains",does_not_contain:"DoesNotContain",begins_with:"BeginsWith",ends_with:"EndsWith",equals:"Equals"},sx={Contains:"contains",DoesNotContain:"does_not_contain",BeginsWith:"begins_with",EndsWith:"ends_with",Equals:"equals"},cx={between:"Between",not_between:"NotBetween",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",in_last_7_days:"Last7Days",in_next_7_days:"Next7Days",last_week:"LastWeek",this_week:"ThisWeek",next_week:"NextWeek",last_month:"LastMonth",this_month:"ThisMonth",next_month:"NextMonth",last_year:"LastYear",this_year:"ThisYear",next_year:"NextYear"},ux={Between:"between",NotBetween:"not_between",Yesterday:"yesterday",Today:"today",Tomorrow:"tomorrow",Last7Days:"in_last_7_days",Next7Days:"in_next_7_days",LastWeek:"last_week",ThisWeek:"this_week",NextWeek:"next_week",LastMonth:"last_month",ThisMonth:"this_month",NextMonth:"next_month",LastYear:"last_year",ThisYear:"this_year",NextYear:"next_year"},dx=new Set(["cell_value","text","date","formula","duplicate_values","unique_values","blanks","no_blanks","errors","no_errors"]);function fx(e){return dx.has(e)}function fl(e){let t={};if(e.bold||e.italic||e.underline||e.strike||e.fontColor){let l={};e.bold&&(l.b=!0),e.italic&&(l.i=!0),e.underline&&(l.u=!0),e.strike&&(l.strike=!0),e.fontColor&&(l.color=e.fontColor),t.font=l}return e.fillColor&&(t.fill={pattern_type:"solid",fg_color:e.fillColor}),t}function hx(e){var t,l,n,a,r,i;return{bold:((t=e==null?void 0:e.font)==null?void 0:t.b)??!1,italic:((l=e==null?void 0:e.font)==null?void 0:l.i)??!1,underline:((n=e==null?void 0:e.font)==null?void 0:n.u)??!1,strike:((a=e==null?void 0:e.font)==null?void 0:a.strike)??!1,fontColor:((r=e==null?void 0:e.font)==null?void 0:r.color)??"#000000",fillColor:((i=e==null?void 0:e.fill)==null?void 0:i.fg_color)??""}}function nr(e){switch(e.type){case"min":return"Min";case"max":return"Max";case"number":return{Number:parseFloat(e.value)};case"percent":return{Percent:parseFloat(e.value)};case"percentile":return{Percentile:parseFloat(e.value)};case"formula":return{Formula:e.value};case"none":return{Percent:50}}}function ar(e,t){return e==="Min"?{type:"min",value:"",color:t}:e==="Max"?{type:"max",value:"",color:t}:"Number"in e?{type:"number",value:`${e.Number}`,color:t}:"Percent"in e?{type:"percent",value:`${e.Percent}`,color:t}:"Percentile"in e?{type:"percentile",value:`${e.Percentile}`,color:t}:{type:"formula",value:e.Formula,color:t}}var Yp={"dir-3-arrows-color":["ArrowUp","ArrowRight","ArrowDown"],"dir-3-chevrons-color":["TriangleUp","FlatRectangle","TriangleDown"],"dir-4-arrows-color":["ArrowUp","ArrowAngleUp","ArrowAngleDown","ArrowDown"],"dir-5-arrows-color":["ArrowUp","ArrowAngleUp","ArrowRight","ArrowAngleDown","ArrowDown"],"shapes-3-circles-color":["Circle","Circle","Circle"],"shapes-4-circles-color":["Circle","Circle","Circle","Circle"],"shapes-3-multiple":["Rhombus","TriangleUpFilled","Circle"],"shapes-4-circles":["Circle","Circle","Circle","Circle"],"ind-2-triangles":["TriangleUpFilled","TriangleDownFilled"],"ind-2-arrows":["ArrowUp","ArrowDown"],"ind-2-thumbs":["ThumbsUp","ThumbsDown"],"ind-3-checkx":["Check","Cross"],"ind-3-check-exclaim-x":["Check","Exclamation","Cross"],"ind-4-flags":["Flag","Flag","Flag"]},mx={2:"ind-3-checkx",3:"dir-3-arrows-color",4:"dir-4-arrows-color",5:"dir-5-arrows-color"};function gx(e){let t=e.length;for(let[l,n]of Object.entries(Yp))if(n.length===t&&n.every((a,r)=>a===e[r]))return l;return mx[t]??"dir-3-arrows-color"}function Lh(e){switch(e.type){case"percent":return{Percent:parseFloat(e.value)||0};case"number":return{Number:parseFloat(e.value)||0};case"percentile":return{Percentile:parseFloat(e.value)||0};case"formula":return{Formula:e.value};case"min":return{Percent:0};case"max":return{Percent:100}}}function _x(e,t){return e==="Min"||e==="Max"?{operator:"<=",value:"",type:e==="Min"?"min":"max",color:t}:"Percent"in e?{operator:"<=",value:`${e.Percent}`,type:"percent",color:t}:"Number"in e?{operator:"<=",value:`${e.Number}`,type:"number",color:t}:"Percentile"in e?{operator:"<=",value:`${e.Percentile}`,type:"percentile",color:t}:{operator:"<=",value:e.Formula,type:"formula",color:t}}function Oh(e,t,l,n,a){return Array.from({length:a},(r,i)=>{let o=a-1-i,c=t[o]??"#808080",u=l[o]??"ArrowUp",d=n[o]??!0?">=":">";if(i===a-1)return{operator:d,value:"",type:"percent",color:c,iconName:u};let h=e[o];if(!h||h==="Min")return{operator:d,value:String(Math.round((a-1-i)*100/a)),type:"percent",color:c,iconName:u};let f=_x(h,c);return{operator:d,value:f.value,type:f.type,color:c,iconName:u}})}function Bh(e){switch(e.type){case"automatic":return null;case"min":return"Min";case"max":return"Max";case"number":return{Number:parseFloat(e.value)||0};case"percent":return{Percent:parseFloat(e.value)||0};case"percentile":return{Percentile:parseFloat(e.value)||0};case"formula":return{Formula:e.value}}}function Uh(e){return e===null?{type:"automatic",value:""}:e==="Min"?{type:"min",value:""}:e==="Max"?{type:"max",value:""}:"Number"in e?{type:"number",value:`${e.Number}`}:"Percent"in e?{type:"percent",value:`${e.Percent}`}:"Percentile"in e?{type:"percentile",value:`${e.Percentile}`}:{type:"formula",value:e.Formula}}function px(e){switch(e.ruleType){case"color_scale":{if(!e.colorScale)return null;let{minimum:t,midpoint:l,maximum:n}=e.colorScale;return{type:"ColorScale",thresholds:l.type==="none"?[{cfvo:nr(t),color:t.color},{cfvo:nr(n),color:n.color}]:[{cfvo:nr(t),color:t.color},{cfvo:nr(l),color:l.color},{cfvo:nr(n),color:n.color}]}}case"data_bars":return e.dataBars?{type:"DataBar",min:Bh(e.dataBars.minBound),max:Bh(e.dataBars.maxBound),positive_color:e.dataBars.positiveColor,negative_color:e.dataBars.negativeColor,is_gradient:e.dataBars.gradient,show_value:!e.dataBars.hideCellContent}:null;case"icon_sets":{if(!e.iconSets)return null;let{presetId:t,rating:l,thresholds:n,showValue:a}=e.iconSets,r=a??!0;if(l){let c=[[{Percent:0},!0],...n.slice(0,-1).reverse().map(u=>[Lh(u),u.operator===">="])];return{type:"IconRating",icon:l.icon,color:l.color,thresholds:c,show_value:r}}let i=Yp[t];if(!i)return null;let o=i.length;return n.length===o?{type:"IconSet",thresholds:i.map((c,u)=>{var h;let d=o-1-u;return{icon:((h=n[d])==null?void 0:h.iconName)??i[d],cfvo:u===0?"Min":Lh(n[d]),color:n[d].color,is_strict:u===0?!0:n[d].operator===">="}}),show_value:r}:null}case"cell_value":{let t=rx[e.ruleOperator];if(!t)return null;let l=e.ruleOperator==="between"||e.ruleOperator==="not_between";return{type:"CellIs",operator:t,formula:e.ruleValue,formula2:l?e.ruleValue2:null,format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1}}case"text":{let t=ox[e.ruleOperator];return t?{type:"Text",operator:t,value:e.ruleValue,format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1}:null}case"date":{let t=cx[e.ruleOperator];if(!t)return null;let l=e.ruleOperator==="between"||e.ruleOperator==="not_between";return{type:"TimePeriod",time_period:t,date1:l?e.ruleValue:null,date2:l?e.ruleValue2:null,format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1}}case"duplicate_values":return{type:"DuplicateValues",format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};case"unique_values":return{type:"UniqueValues",format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};case"blanks":return{type:"Blanks",format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};case"no_blanks":return{type:"NotBlanks",format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};case"errors":return{type:"Errors",format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};case"no_errors":return{type:"NoErrors",format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};case"formula":return{type:"Formula",formula:e.ruleValue,format:fl(e.formatStyle),stop_if_true:e.stopIfTrue??!1};default:return null}}function yx(e){let{cf_rule:t}=e;switch(t.type){case"ColorScale":{let l=t.thresholds.length;return l<2||l>3?null:{ruleType:"color_scale",ruleOperator:"",ruleValue:"",ruleValue2:"",colorScale:l===2?{minimum:ar(t.thresholds[0].cfvo,t.thresholds[0].color),midpoint:{type:"none",value:"",color:""},maximum:ar(t.thresholds[1].cfvo,t.thresholds[1].color)}:{minimum:ar(t.thresholds[0].cfvo,t.thresholds[0].color),midpoint:ar(t.thresholds[1].cfvo,t.thresholds[1].color),maximum:ar(t.thresholds[2].cfvo,t.thresholds[2].color)}}}case"DataBar":return{ruleType:"data_bars",ruleOperator:"",ruleValue:"",ruleValue2:"",dataBars:{color:t.positive_color,gradient:t.is_gradient,positiveColor:t.positive_color,negativeColor:t.negative_color,hideCellContent:!t.show_value,minBound:Uh(t.min||null),maxBound:Uh(t.max||null)}};case"IconSet":{let l=t.thresholds.map(o=>o.icon),n=t.thresholds.map(o=>o.cfvo),a=t.thresholds.map(o=>o.color),r=t.thresholds.map(o=>o.is_strict),i=l.length;return{ruleType:"icon_sets",ruleOperator:"",ruleValue:"",ruleValue2:"",iconSets:{presetId:gx([...l].reverse()),thresholds:Oh(n,a,l,r,i),showValue:t.show_value}}}case"IconRating":{let l=t.thresholds.length,n=t.thresholds.map(([i])=>i),a=t.thresholds.map(([,i])=>i),r=Oh(n,Array(l).fill(t.color),Array(l).fill(t.icon),a,l);return{ruleType:"icon_sets",ruleOperator:"",ruleValue:"",ruleValue2:"",iconSets:{presetId:"dir-3-arrows-color",rating:{count:l,icon:t.icon,color:t.color},thresholds:r,showValue:t.show_value}}}case"CellIs":{let l=ix[t.operator];return l?{ruleType:"cell_value",ruleOperator:l,ruleValue:t.formula,ruleValue2:t.formula2??"",stopIfTrue:t.stop_if_true}:null}case"Text":{let l=sx[t.operator];return l?{ruleType:"text",ruleOperator:l,ruleValue:t.value,ruleValue2:"",stopIfTrue:t.stop_if_true}:null}case"TimePeriod":{let l=ux[t.time_period];return l?{ruleType:"date",ruleOperator:l,ruleValue:t.date1??"",ruleValue2:t.date2??"",stopIfTrue:t.stop_if_true}:null}case"DuplicateValues":return{ruleType:"duplicate_values",ruleOperator:"",ruleValue:"",ruleValue2:"",stopIfTrue:t.stop_if_true};case"UniqueValues":return{ruleType:"unique_values",ruleOperator:"",ruleValue:"",ruleValue2:"",stopIfTrue:t.stop_if_true};case"Blanks":return{ruleType:"blanks",ruleOperator:"",ruleValue:"",ruleValue2:"",stopIfTrue:t.stop_if_true};case"NotBlanks":return{ruleType:"no_blanks",ruleOperator:"",ruleValue:"",ruleValue2:"",stopIfTrue:t.stop_if_true};case"Errors":return{ruleType:"errors",ruleOperator:"",ruleValue:"",ruleValue2:"",stopIfTrue:t.stop_if_true};case"NoErrors":return{ruleType:"no_errors",ruleOperator:"",ruleValue:"",ruleValue2:"",stopIfTrue:t.stop_if_true};case"Formula":return{ruleType:"formula",ruleOperator:"",ruleValue:t.formula,ruleValue2:"",stopIfTrue:t.stop_if_true};default:return null}}var nc=["#8CB354","#EC5753","#3458B7","#F2994A","#F8CD3D","#523E93","#FF2D55","#333333"],Kp=[.6,.85,.35,.55],Zp=({color:e,gradient:t})=>{let l=t?`linear-gradient(to right, ${e}, ${e}1a)`:e;return s.jsx("div",{className:"ic-db-mini-chart",children:Kp.map((n,a)=>s.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",borderTop:a>0?"1px solid #e0e0e0":void 0},children:s.jsx("div",{style:{width:`${n*100}%`,height:"100%",background:l}})},n))})},Hh=({color:e,gradient:t,selected:l,onClick:n,label:a})=>{let r={background:t?`linear-gradient(to right, ${e}, ${e}1a)`:e};return s.jsx("button",{type:"button",onClick:n,"aria-pressed":l,className:"ic-fsp-preset ic-db-swatch","aria-label":a,children:s.jsx("div",{className:"ic-db-swatch-inner",children:Kp.map(i=>s.jsx("div",{className:"ic-db-swatch-row",children:s.jsx("div",{className:"ic-db-swatch-bar",style:{width:`${i*100}%`,...r}})},i))})})},Fh=["automatic","min","max"],bx=({onSave:e,onCancel:t,applyTo:l,onApplyToChange:n,getSelectedArea:a,initialValues:r,onPreviewChange:i})=>{let{t:o}=be(),[c,u]=S.useState(!1),[d,h]=S.useState(!1),f=S.useRef(null),_=S.useRef(null),[y,p]=S.useState(r??{color:nc[0],gradient:!1,positiveColor:"#6AAB42",negativeColor:"#E05C53",hideCellContent:!1,minBound:{type:"automatic",value:""},maxBound:{type:"automatic",value:""}});S.useEffect(()=>{i==null||i(y)},[y,i]);let w=[{value:"automatic",label:o("conditional_formatting.data_bars_type_automatic")},{value:"min",label:o("conditional_formatting.color_scale_type_min")},{value:"number",label:o("conditional_formatting.color_scale_type_number")},{value:"percent",label:o("conditional_formatting.color_scale_type_percent")},{value:"percentile",label:o("conditional_formatting.color_scale_type_percentile")},{value:"formula",label:o("conditional_formatting.color_scale_type_formula")}],m=[{value:"automatic",label:o("conditional_formatting.data_bars_type_automatic")},{value:"max",label:o("conditional_formatting.color_scale_type_max")},{value:"number",label:o("conditional_formatting.color_scale_type_number")},{value:"percent",label:o("conditional_formatting.color_scale_type_percent")},{value:"percentile",label:o("conditional_formatting.color_scale_type_percentile")},{value:"formula",label:o("conditional_formatting.color_scale_type_formula")}];return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ic-edit-rule-content",children:[s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.apply_to")}),s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.apply_to_range")}),s.jsx(Ue,{type:"text",placeholder:o("conditional_formatting.apply_to_placeholder"),value:l,onChange:g=>n(g.target.value),endAdornment:s.jsx(I,{title:o("conditional_formatting.use_selection"),children:s.jsx(X,{size:"sm",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":o("conditional_formatting.use_selection"),onClick:()=>n(a()),className:"ic-edit-rule-range-button"})})})]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.tab_data_bars")}),s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_solid_fill")}),s.jsx("div",{className:"ic-fsp-presets",children:nc.map(g=>s.jsx(Hh,{color:g,gradient:!1,selected:y.color===g&&!y.gradient,onClick:()=>p(b=>({...b,color:g,gradient:!1,positiveColor:g})),label:g},`solid-${g}`))})]}),s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_gradient_fill")}),s.jsx("div",{className:"ic-fsp-presets",children:nc.map(g=>s.jsx(Hh,{color:g,gradient:!0,selected:y.color===g&&y.gradient,onClick:()=>p(b=>({...b,color:g,gradient:!0,positiveColor:g})),label:g},`gradient-${g}`))})]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.data_bars_settings")}),s.jsxs("div",{className:"ic-edit-rule-values-row",children:[s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_minimum")}),s.jsx(Et,{value:y.minBound.type,options:w,onChange:g=>p(b=>({...b,minBound:{type:g,value:""}})),hideCheck:!0}),s.jsx(Ue,{type:"text",value:y.minBound.value,disabled:Fh.includes(y.minBound.type),onChange:g=>p(b=>({...b,minBound:{...b.minBound,value:g.target.value}}))})]}),s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_maximum")}),s.jsx(Et,{value:y.maxBound.type,options:m,onChange:g=>p(b=>({...b,maxBound:{type:g,value:""}})),hideCheck:!0}),s.jsx(Ue,{type:"text",value:y.maxBound.value,disabled:Fh.includes(y.maxBound.type),onChange:g=>p(b=>({...b,maxBound:{...b.maxBound,value:g.target.value}}))})]})]}),s.jsxs("div",{className:"ic-edit-rule-values-row",children:[s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_positive")}),s.jsxs("div",{className:"ic-cs-settings-row",children:[s.jsx(Ue,{type:"text",value:y.positiveColor,onChange:g=>p(b=>({...b,positiveColor:g.target.value}))}),s.jsx("div",{className:"ic-input-control md ic-cs-color-swatch-wrapper",children:s.jsx("button",{ref:f,type:"button",className:"ic-cs-color-swatch",style:{backgroundColor:y.positiveColor},onClick:()=>u(!0),"aria-label":o("conditional_formatting.data_bars_positive")})}),s.jsx(cl,{color:y.positiveColor,defaultColor:y.positiveColor,title:o("color_picker.default"),onChange:g=>{p(b=>({...b,positiveColor:g})),u(!1)},onClose:()=>u(!1),anchorEl:f,open:c})]})]}),s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_negative")}),s.jsxs("div",{className:"ic-cs-settings-row",children:[s.jsx(Ue,{type:"text",value:y.negativeColor,onChange:g=>p(b=>({...b,negativeColor:g.target.value}))}),s.jsx("div",{className:"ic-input-control md ic-cs-color-swatch-wrapper",children:s.jsx("button",{ref:_,type:"button",className:"ic-cs-color-swatch",style:{backgroundColor:y.negativeColor},onClick:()=>h(!0),"aria-label":o("conditional_formatting.data_bars_negative")})}),s.jsx(cl,{color:y.negativeColor,defaultColor:y.negativeColor,title:o("color_picker.default"),onChange:g=>{p(b=>({...b,negativeColor:g})),h(!1)},onClose:()=>h(!1),anchorEl:_,open:d})]})]})]}),s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_preferences")}),s.jsxs("label",{className:"ic-edit-rule-checkbox-row",children:[s.jsx("input",{type:"checkbox",checked:!y.hideCellContent,onChange:g=>p(b=>({...b,hideCellContent:!g.target.checked}))}),o("conditional_formatting.data_bars_show_value")]})]})]})]}),s.jsxs("div",{className:"ic-edit-rule-footer",children:[s.jsx(ye,{variant:"secondary",onClick:t,children:o("conditional_formatting.cancel")}),s.jsx(ye,{startIcon:s.jsx(Ct,{}),disabled:!l.trim(),onClick:()=>e(y),children:o("conditional_formatting.apply")})]})]})},Nl={bold:!1,italic:!1,underline:!1,strike:!1,fontColor:"#000000",fillColor:""},vx=[{...Nl,fontColor:"#D21D21",fillColor:"#FBE7E8"},{...Nl,fontColor:"#D21D21",fillColor:""},{...Nl,fontColor:"#8B6F00",fillColor:"#FEF9E8"},{...Nl,fontColor:"#8B6F00",fillColor:""},{...Nl,fontColor:"#A5530A",fillColor:"#FCE7D4"},{...Nl,fontColor:"#A5530A",fillColor:""},{...Nl,fontColor:"#008121",fillColor:"#F1F6EA"},{...Nl,fontColor:"#008121",fillColor:""}],Xp=({value:e,onChange:t})=>{let{t:l}=be(),[n,a]=S.useState(!1),[r,i]=S.useState(!1),o=S.useRef(null),c=S.useRef(null),u=d=>t({...e,[d]:!e[d]});return s.jsxs("div",{className:"ic-fsp-wrapper",children:[s.jsxs("div",{className:"ic-fsp-editor",children:[s.jsx("div",{className:"ic-fsp-preview",style:{fontWeight:e.bold?"bold":"normal",fontStyle:e.italic?"italic":"normal",textDecoration:[e.underline?"underline":"",e.strike?"line-through":""].filter(Boolean).join(" ")||"none",color:e.fontColor||"#000000",backgroundColor:e.fillColor||"transparent"},children:"AaBbCc"}),s.jsxs("div",{className:"ic-fsp-toolbar",children:[s.jsxs("div",{className:"ic-fsp-toolbar-left",children:[s.jsx(X,{icon:s.jsx(yp,{}),pressed:e.bold,"aria-label":l("toolbar.bold"),onClick:()=>u("bold")}),s.jsx(X,{icon:s.jsx(Sp,{}),pressed:e.italic,"aria-label":l("toolbar.italic"),onClick:()=>u("italic")}),s.jsx(X,{icon:s.jsx(zp,{}),pressed:e.underline,"aria-label":l("toolbar.underline"),onClick:()=>u("underline")}),s.jsx(X,{icon:s.jsx(kp,{}),pressed:e.strike,"aria-label":l("toolbar.strike_through"),onClick:()=>u("strike")}),s.jsx(X,{ref:o,"aria-label":l("toolbar.font_color"),onClick:()=>a(!0),icon:s.jsxs(s.Fragment,{children:[s.jsx(Rp,{}),s.jsx("div",{className:"ic-fsp-color-bar",style:{backgroundColor:e.fontColor||"#000000"}})]})}),s.jsx(X,{ref:c,"aria-label":l("toolbar.fill_color"),onClick:()=>i(!0),icon:s.jsxs(s.Fragment,{children:[s.jsx(jd,{}),s.jsx("div",{className:"ic-fsp-color-bar",style:{backgroundColor:e.fillColor||"transparent"}})]})})]}),s.jsx(X,{icon:s.jsx(jp,{}),"aria-label":l("toolbar.clear_formatting"),onClick:()=>t(Nl)})]})]}),s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-fsp-presets-label",children:l("conditional_formatting.default_styles")}),s.jsx("div",{className:"ic-fsp-presets",children:vx.map((d,h)=>s.jsx("button",{type:"button",className:"ic-fsp-preset",style:{color:d.fontColor,backgroundColor:d.fillColor||"#FFFFFF",borderColor:d.fontColor},onClick:()=>t(d),"aria-label":l("conditional_formatting.apply_preset"),children:"Aa"},h))})]}),s.jsx(cl,{color:e.fontColor,defaultColor:"#000000",title:l("color_picker.default"),onChange:d=>{t({...e,fontColor:d}),a(!1)},onClose:()=>a(!1),anchorEl:o,open:n}),s.jsx(cl,{color:e.fillColor||"#FFFFFF",defaultColor:"",title:l("color_picker.default"),onChange:d=>{t({...e,fillColor:d}),i(!1)},onClose:()=>i(!1),anchorEl:c,open:r})]})},wx=["between","not_between"];function mu({ruleType:e,ruleOperator:t,ruleValue:l,ruleValue2:n,resolveValue:a}){let r=a??(u=>u),i=r(l),o=n&&r(n),c=wx.includes(t);if(e==="cell_value"){let u={less_than:"<",less_than_or_equal:"≤",greater_than:">",greater_than_or_equal:"≥",equals:"=",does_not_equal:"≠",between:"is between",not_between:"is not between"}[t]??t;return c?i&&o?`Cell value ${u} ${i} and ${o}`:`Cell value ${u}`:i?`Cell value ${u} ${i}`:`Cell value ${u}`}if(e==="text"){let u={contains:"contains",does_not_contain:"doesn't contain",begins_with:"starts with",ends_with:"ends with",equals:"is exactly"}[t]??t;return i?`Text ${u} '${i}'`:`Text ${u}`}if(e==="date"){let u={between:"is between",not_between:"is not between",yesterday:"is Yesterday",today:"is Today",tomorrow:"is Tomorrow",in_last_7_days:"is in Last 7 Days",in_next_7_days:"is in Next 7 Days",last_week:"is in Last Week",this_week:"is in This Week",next_week:"is in Next Week",last_month:"is in Last Month",this_month:"is in This Month",next_month:"is in Next Month",last_year:"is in Last Year",this_year:"is in This Year",next_year:"is in Next Year"};return c&&i&&o?`Date ${u[t]} ${i} and ${o}`:`Date ${u[t]??t}`}return e==="formula"?i?`Formula: ${i}`:"Formula":e==="color_scale"?"Color Scale":e==="data_bars"?"Data Bars":e==="icon_sets"?"Icon Sets":{duplicate_values:"Duplicated Values",unique_values:"Unique Values",blanks:"Blanks",no_blanks:"No Blanks",errors:"Errors",no_errors:"No Errors"}[e]??e}var xx=["cell_value","text","date"],Sx=({onSave:e,onCancel:t,initialValues:l,getSelectedArea:n,applyTo:a,onApplyToChange:r,formatStyle:i,onFormatStyleChange:o,onDescriptionChange:c,resolveValue:u})=>{var V;let{t:d}=be(),[h,f]=S.useState((l==null?void 0:l.ruleType)??"cell_value"),[_,y]=S.useState((l==null?void 0:l.ruleOperator)??"between"),[p,w]=S.useState((l==null?void 0:l.ruleValue)??""),[m,g]=S.useState((l==null?void 0:l.ruleValue2)??""),[b,v]=S.useState((l==null?void 0:l.stopIfTrue)??!1),C=[{value:"cell_value",label:d("conditional_formatting.rule_type_cell_value")},{value:"text",label:d("conditional_formatting.rule_type_text")},{value:"date",label:d("conditional_formatting.rule_type_date")},{value:"formula",label:d("conditional_formatting.rule_type_formula")},{value:"duplicate_values",label:d("conditional_formatting.rule_type_duplicate_values")},{value:"unique_values",label:d("conditional_formatting.rule_type_unique_values")},{value:"blanks",label:d("conditional_formatting.rule_type_blanks")},{value:"no_blanks",label:d("conditional_formatting.rule_type_no_blanks")},{value:"errors",label:d("conditional_formatting.rule_type_errors")},{value:"no_errors",label:d("conditional_formatting.rule_type_no_errors")}],k={cell_value:[{value:"between",label:d("conditional_formatting.op_between")},{value:"not_between",label:d("conditional_formatting.op_not_between")},{value:"less_than",label:d("conditional_formatting.op_less_than")},{value:"less_than_or_equal",label:d("conditional_formatting.op_less_than_or_equal")},{value:"greater_than",label:d("conditional_formatting.op_greater_than")},{value:"greater_than_or_equal",label:d("conditional_formatting.op_greater_than_or_equal")},{value:"equals",label:d("conditional_formatting.op_equals")},{value:"does_not_equal",label:d("conditional_formatting.op_does_not_equal")}],text:[{value:"contains",label:d("conditional_formatting.op_contains")},{value:"does_not_contain",label:d("conditional_formatting.op_does_not_contain")},{value:"begins_with",label:d("conditional_formatting.op_begins_with")},{value:"ends_with",label:d("conditional_formatting.op_ends_with")},{value:"equals",label:d("conditional_formatting.op_equals")}],date:[{value:"between",label:d("conditional_formatting.op_between")},{value:"not_between",label:d("conditional_formatting.op_not_between")},{value:"yesterday",label:d("conditional_formatting.op_yesterday")},{value:"today",label:d("conditional_formatting.op_today")},{value:"tomorrow",label:d("conditional_formatting.op_tomorrow")},{value:"in_last_7_days",label:d("conditional_formatting.op_in_last_7_days")},{value:"in_next_7_days",label:d("conditional_formatting.op_in_next_7_days")},{value:"last_week",label:d("conditional_formatting.op_last_week")},{value:"this_week",label:d("conditional_formatting.op_this_week")},{value:"next_week",label:d("conditional_formatting.op_next_week")},{value:"last_month",label:d("conditional_formatting.op_last_month")},{value:"this_month",label:d("conditional_formatting.op_this_month")},{value:"next_month",label:d("conditional_formatting.op_next_month")},{value:"last_year",label:d("conditional_formatting.op_last_year")},{value:"this_year",label:d("conditional_formatting.op_this_year")},{value:"next_year",label:d("conditional_formatting.op_next_year")}]},E=xx.includes(h),D=k[h]??[],M=E&&["between","not_between"].includes(_),x=E&&!(h==="date"&&!["between","not_between"].includes(_)),O=h==="formula",z=!O||!p.trim()?null:p.trim().startsWith("=")?vd(p.trim().slice(1)).some(G=>G.token==="Illegal")?d("conditional_formatting.formula_error_invalid"):null:d("conditional_formatting.formula_error_must_start_with_equals"),U=S.useRef(!0);return S.useEffect(()=>{var G;if(U.current){U.current=!1;return}y(((G=D[0])==null?void 0:G.value)??"")},[(V=D[0])==null?void 0:V.value]),S.useEffect(()=>{c==null||c(mu({ruleType:h,ruleOperator:_,ruleValue:p,ruleValue2:m,resolveValue:u}))},[h,_,p,m,u,c]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ic-edit-rule-content",children:[s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:d("conditional_formatting.apply_to")}),s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:d("conditional_formatting.apply_to_range")}),s.jsx(Ue,{type:"text",placeholder:d("conditional_formatting.apply_to_placeholder"),value:a,onChange:G=>r(G.target.value),endAdornment:s.jsx(I,{title:d("conditional_formatting.use_selection"),children:s.jsx(X,{size:"sm",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":d("conditional_formatting.use_selection"),onClick:()=>r(n()),className:"ic-edit-rule-range-button"})})})]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:d("conditional_formatting.format_rules")}),s.jsxs("div",{className:"ic-edit-rule-condition",children:[s.jsx("span",{className:"ic-edit-rule-label",children:d("conditional_formatting.highlight_cells_if")}),s.jsxs("div",{className:"ic-edit-rule-dropdowns-row",children:[s.jsx(Et,{value:h,options:C,onChange:f,hideCheck:!0}),E&&s.jsx(Et,{value:_,options:D,onChange:y,hideCheck:!0})]}),O&&s.jsx(Ue,{type:"text",placeholder:d("conditional_formatting.formula_placeholder"),value:p,error:!!z,helperText:z??void 0,onChange:G=>w(G.target.value)}),x&&(M?s.jsxs("div",{className:"ic-edit-rule-values-row",children:[s.jsx(Ue,{type:"text",placeholder:d("conditional_formatting.rule_value_placeholder"),value:p,onChange:G=>w(G.target.value)}),s.jsx(Ue,{type:"text",placeholder:d("conditional_formatting.rule_value_placeholder"),value:m,onChange:G=>g(G.target.value)})]}):s.jsx(Ue,{type:"text",placeholder:d("conditional_formatting.rule_value_placeholder"),value:p,onChange:G=>w(G.target.value),endAdornment:s.jsx(I,{title:d("conditional_formatting.use_selection"),children:s.jsx(X,{size:"sm",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":d("conditional_formatting.use_selection"),onClick:()=>w(n()),className:"ic-edit-rule-range-button"})})}))]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:d("conditional_formatting.format_style")}),s.jsx(Xp,{value:i,onChange:o})]}),s.jsx("div",{className:"ic-edit-rule-section",children:s.jsxs("label",{className:"ic-edit-rule-checkbox-row",children:[s.jsx("input",{type:"checkbox",checked:b,onChange:G=>v(G.target.checked)}),d("conditional_formatting.stop_if_true")]})})]}),s.jsxs("div",{className:"ic-edit-rule-footer",children:[s.jsx(ye,{variant:"secondary",onClick:t,children:d("conditional_formatting.cancel")}),s.jsx(ye,{startIcon:s.jsx(Ct,{}),disabled:!a.trim()||O&&(!p.trim()||!!z)||x&&(!p.trim()||M&&!m.trim()),onClick:()=>e({applyTo:a,ruleType:h,ruleOperator:_,ruleValue:p,ruleValue2:m,formatStyle:i,stopIfTrue:b}),children:d("conditional_formatting.apply")})]})]})},Ji=[{id:"dir-3-arrows-color",icons:[{Icon:xa,color:"#8CB354",backendName:"ArrowUp"},{Icon:zo,color:"#F8CD3D",backendName:"ArrowRight"},{Icon:wa,color:"#EC5753",backendName:"ArrowDown"}]},{id:"dir-3-chevrons-color",icons:[{Icon:xd,color:"#8CB354",backendName:"TriangleUp"},{Icon:Cd,color:"#F8CD3D",backendName:"FlatRectangle"},{Icon:Un,color:"#EC5753",backendName:"TriangleDown"}]},{id:"dir-4-arrows-color",icons:[{Icon:xa,color:"#8CB354",backendName:"ArrowUp"},{Icon:cu,color:"#F8CD3D",backendName:"ArrowAngleUp"},{Icon:su,color:"#F8CD3D",backendName:"ArrowAngleDown"},{Icon:wa,color:"#EC5753",backendName:"ArrowDown"}]},{id:"dir-5-arrows-color",icons:[{Icon:xa,color:"#8CB354",backendName:"ArrowUp"},{Icon:cu,color:"#B4D67E",backendName:"ArrowAngleUp"},{Icon:zo,color:"#F8CD3D",backendName:"ArrowRight"},{Icon:su,color:"#FC9F6E",backendName:"ArrowAngleDown"},{Icon:wa,color:"#EC5753",backendName:"ArrowDown"}]}],Cx=[{id:"shapes-3-circles-color",icons:[{Icon:At,color:"#EC5753",filled:!0,backendName:"Circle"},{Icon:At,color:"#F8CD3D",filled:!0,backendName:"Circle"},{Icon:At,color:"#8CB354",filled:!0,backendName:"Circle"}]},{id:"shapes-4-circles-color",icons:[{Icon:At,color:"#333333",filled:!0,backendName:"Circle"},{Icon:At,color:"#404040",filled:!0,backendName:"Circle"},{Icon:At,color:"#808080",filled:!0,backendName:"Circle"},{Icon:At,color:"#D9D9D9",filled:!0,backendName:"Circle"}]},{id:"shapes-3-multiple",icons:[{Icon:vp,color:"#EC5753",filled:!0,backendName:"Rhombus"},{Icon:Oo,color:"#F8CD3D",filled:!0,backendName:"TriangleUpFilled"},{Icon:At,color:"#8CB354",filled:!0,backendName:"Circle"}]},{id:"shapes-4-circles",icons:[{Icon:At,color:"#333333",filled:!0,backendName:"Circle"},{Icon:At,color:"#757575",filled:!0,backendName:"Circle"},{Icon:At,color:"#EC5753",filled:!0,backendName:"Circle"},{Icon:At,color:"#FF888A",filled:!0,backendName:"Circle"}]}],jx=[{id:"ind-2-arrows",icons:[{Icon:xa,color:"#8CB354",backendName:"ArrowUp"},{Icon:wa,color:"#EC5753",backendName:"ArrowDown"}]},{id:"ind-2-thumbs",icons:[{Icon:Dp,color:"#8CB354",backendName:"ThumbsUp"},{Icon:Tp,color:"#EC5753",backendName:"ThumbsDown"}]},{id:"ind-3-checkx",icons:[{Icon:Ct,color:"#8CB354",backendName:"Check"},{Icon:jt,color:"#EC5753",backendName:"Cross"}]},{id:"ind-2-triangles",icons:[{Icon:Oo,color:"#8CB354",filled:!0,backendName:"TriangleUpFilled"},{Icon:Oo,color:"#EC5753",filled:!0,backendName:"TriangleDownFilled",style:{transform:"rotate(180deg)"}}]},{id:"ind-3-check-exclaim-x",icons:[{Icon:Ct,color:"#8CB354",backendName:"Check"},{Icon:bp,color:"#F8CD3D",backendName:"Exclamation"},{Icon:jt,color:"#EC5753",backendName:"Cross"}]},{id:"ind-4-flags",icons:[{Icon:Wi,color:"#8CB354",filled:!0,backendName:"Flag"},{Icon:Wi,color:"#F8CD3D",filled:!0,backendName:"Flag"},{Icon:Wi,color:"#EC5753",filled:!0,backendName:"Flag"}]}],Vh="#FFD700",Gt="#EC5753",Ex=[{id:"rating-3-stars",icons:[{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"}]},{id:"rating-4-stars",icons:[{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"}]},{id:"rating-5-stars",icons:[{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"},{Icon:Dt,color:"#FFD700",filled:!0,backendName:"Star"}]},{id:"rating-3-hearts",icons:[{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"}]},{id:"rating-4-hearts",icons:[{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"}]},{id:"rating-5-hearts",icons:[{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"},{Icon:Tt,color:Gt,filled:!0,backendName:"Heart"}]}],gu=[...Ji,...Cx,...jx],Nx=["min","max","percent","number","percentile","formula"];function qh(e){let t=e.length;return e.map((l,n)=>({operator:">=",value:n<t-1?`${Math.round((t-1-n)*100/t)}`:"",type:"percent",color:l.color,iconName:l.backendName}))}function $h(e,t,l="Star"){return Array.from({length:e},(n,a)=>({operator:">=",value:a<e-1?`${Math.round((e-1-a)*100/e)}`:"",type:"percent",color:t,iconName:l}))}var Gh=({preset:e,selected:t,onClick:l})=>{let n=e.icons.length>=5?12:14;return s.jsx("button",{type:"button",onClick:l,"aria-pressed":t,className:"ic-fsp-preset ic-is-swatch","aria-label":e.id,children:s.jsx("div",{className:"ic-is-swatch-icons",children:e.icons.map(({Icon:a,color:r,filled:i,style:o},c)=>s.jsx(a,{size:n,color:r,fill:i?r:"none",style:o},r+String(c)))})})},kx=({onSave:e,onCancel:t,applyTo:l,onApplyToChange:n,getSelectedArea:a,initialValues:r,onPreviewChange:i})=>{var Z,A,H,K,xe,N;let{t:o}=be(),c=r!=null&&r.rating?"rating":"preset",[u,d]=S.useState(c),[h,f]=S.useState((r==null?void 0:r.presetId)??Ji[0].id),[_,y]=S.useState(((Z=r==null?void 0:r.rating)==null?void 0:Z.count)??3),[p,w]=S.useState(((A=r==null?void 0:r.rating)==null?void 0:A.color)??Vh),[m,g]=S.useState(((H=r==null?void 0:r.rating)==null?void 0:H.icon)??"Star"),[b,v]=S.useState(!1),C=S.useRef(null),[k,E]=S.useState((r==null?void 0:r.thresholds)??(c==="rating"?$h(((K=r==null?void 0:r.rating)==null?void 0:K.count)??3,((xe=r==null?void 0:r.rating)==null?void 0:xe.color)??Vh,((N=r==null?void 0:r.rating)==null?void 0:N.icon)??"Star"):qh(Ji[0].icons))),[D,M]=S.useState((r==null?void 0:r.showValue)??!0),x=S.useRef(new Map),[O,z]=S.useState(null),U=gu.find(T=>T.id===h)??Ji[0];S.useEffect(()=>{if(u==="preset")i==null||i(U.icons[0]);else{let T=kd(m);i==null||i({Icon:T.Icon,color:p,filled:T.filled})}},[U,u,p,m,i]);let V=Nx.map(T=>({value:T,label:o(`conditional_formatting.color_scale_type_${T}`)})),G=T=>{d("preset"),f(T.id),E(qh(T.icons))},R=T=>{let L=T.icons.length,$=T.icons[0].color,J=T.icons[0].backendName;d("rating"),y(L),w($),g(J),E($h(L,$,J))},q=T=>{w(T),E(L=>L.map($=>({...$,color:T}))),v(!1)},Y=(T,L)=>{E($=>$.map((J,P)=>P===T?{...J,...L}:J))},W=u==="rating"?_:U.icons.length,ne=T=>T===W-1?o("conditional_formatting.icon_sets_else"):o("conditional_formatting.icon_sets_when_value_is"),he=[2,3,4,5].map(T=>({key:`count-${T}`,label:`${T} ${o("conditional_formatting.icon_sets_icons")}`,presets:gu.filter(L=>L.icons.length===T)}));return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ic-edit-rule-content",children:[s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.apply_to")}),s.jsxs("div",{className:"ic-edit-rule-field-wrapper",children:[s.jsx("span",{className:"ic-edit-rule-label",children:o("conditional_formatting.apply_to_range")}),s.jsx(Ue,{type:"text",placeholder:o("conditional_formatting.apply_to_placeholder"),value:l,onChange:T=>n(T.target.value),endAdornment:s.jsx(I,{title:o("conditional_formatting.use_selection"),children:s.jsx(X,{size:"md",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":o("conditional_formatting.use_selection"),onClick:()=>n(a()),className:"ic-edit-rule-range-button"})})})]})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsxs("div",{className:"ic-is-operator-group--compact ic-is-mode-toggle",children:[s.jsx(ye,{variant:u==="preset"?"secondary":"ghost",size:"sm",onClick:()=>d("preset"),children:o("conditional_formatting.icon_sets_mode_preset")}),s.jsx(ye,{variant:u==="rating"?"secondary":"ghost",size:"sm",onClick:()=>d("rating"),children:o("conditional_formatting.icon_sets_ratings")})]}),u==="preset"&&he.map(T=>s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:T.label}),s.jsx("div",{className:"ic-is-presets",children:T.presets.map(L=>s.jsx(Gh,{preset:L,selected:h===L.id,onClick:()=>G(L)},L.id))})]},T.key)),u==="rating"&&[3,4,5].map(T=>{let L=Ex.filter($=>$.icons.length===T);return L.length===0?null:s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:`${T} ${o("conditional_formatting.icon_sets_icons")}`}),s.jsx("div",{className:"ic-is-presets",children:L.map($=>s.jsx(Gh,{preset:$,selected:_===$.icons.length&&p===$.icons[0].color,onClick:()=>R($)},$.id))})]},T)})]}),s.jsxs("div",{className:"ic-edit-rule-section",children:[s.jsx("div",{className:"ic-edit-rule-section-title",children:o("conditional_formatting.icon_sets_settings")}),u==="preset"&&s.jsx("div",{className:"ic-is-threshold-rows",children:k.map((T,L)=>{let $=L===k.length-1,J=T.color,P=V;return P=L===0?V.filter(ee=>ee.value!=="max"):$?V.filter(ee=>ee.value!=="min"):V.filter(ee=>ee.value!=="min"&&ee.value!=="max"),s.jsxs("div",{className:"ic-is-threshold-row",children:[s.jsx("div",{className:"ic-edit-rule-label",children:ne(L)}),s.jsxs("div",{className:"ic-is-threshold-controls",children:[s.jsxs("div",{className:"ic-is-operator-group--compact",children:[s.jsx(X,{size:"sm",variant:T.operator===">="?"secondary":"ghost",icon:s.jsx("span",{className:"ic-is-op-text",children:"≥"}),"aria-label":"Greater than or equal",onClick:()=>Y(L,{operator:">="})}),s.jsx(X,{size:"sm",variant:T.operator===">"?"secondary":"ghost",icon:s.jsx("span",{className:"ic-is-op-text",children:">"}),"aria-label":"Greater than",onClick:()=>Y(L,{operator:">"})})]}),s.jsx("div",{className:"ic-is-threshold-value-wrap",children:s.jsx(Ue,{type:"text",value:$?"":T.value,onChange:ee=>Y(L,{value:ee.target.value}),disabled:$})}),s.jsx("div",{className:"ic-is-threshold-type-wrap",children:s.jsx(Et,{value:T.type,options:P,onChange:ee=>Y(L,{type:ee}),hideCheck:!0,disabled:$})}),s.jsx("div",{className:"ic-input-control md ic-cs-color-swatch-wrapper",children:s.jsx(kh,{value:T.iconName,color:J,onChange:ee=>Y(L,{iconName:ee})})}),s.jsx("div",{className:"ic-input-control md ic-cs-color-swatch-wrapper",children:s.jsx("button",{ref:ee=>{x.current.set(L,ee)},type:"button",className:"ic-cs-color-swatch",style:{backgroundColor:T.color},onClick:()=>z(L),"aria-label":o("color_picker.title")})}),s.jsx(cl,{color:T.color,defaultColor:T.color,title:o("color_picker.default"),onChange:ee=>{Y(L,{color:ee}),z(null)},onClose:()=>z(null),anchorEl:{current:x.current.get(L)??null},open:O===L})]})]},U.id+String(L))})}),u==="rating"&&s.jsx("div",{className:"ic-is-threshold-rows",children:k.map((T,L)=>{if(L===k.length-1)return null;let $=V;return $=L===0?V.filter(J=>J.value!=="max"):V.filter(J=>J.value!=="min"&&J.value!=="max"),s.jsxs("div",{className:"ic-is-threshold-row",children:[s.jsx("div",{className:"ic-edit-rule-label",children:ne(L)}),s.jsxs("div",{className:"ic-is-threshold-controls",children:[s.jsxs("div",{className:"ic-is-operator-group--compact",children:[s.jsx(X,{size:"sm",variant:T.operator===">="?"secondary":"ghost",icon:s.jsx("span",{className:"ic-is-op-text",children:"≥"}),"aria-label":"Greater than or equal",onClick:()=>Y(L,{operator:">="})}),s.jsx(X,{size:"sm",variant:T.operator===">"?"secondary":"ghost",icon:s.jsx("span",{className:"ic-is-op-text",children:">"}),"aria-label":"Greater than",onClick:()=>Y(L,{operator:">"})})]}),s.jsx("div",{className:"ic-is-threshold-value-wrap",children:s.jsx(Ue,{type:"text",value:T.value,onChange:J=>Y(L,{value:J.target.value})})}),s.jsx("div",{className:"ic-is-threshold-type-wrap",children:s.jsx(Et,{value:T.type,options:$,onChange:J=>Y(L,{type:J}),hideCheck:!0})}),s.jsx("div",{className:`ic-input-control md ic-cs-color-swatch-wrapper${L===0?"":" ic-is-picker-disabled"}`,children:s.jsx(kh,{value:m,color:p,onChange:g})}),s.jsx("div",{className:`ic-input-control md ic-cs-color-swatch-wrapper${L===0?"":" ic-is-picker-disabled"}`,children:s.jsx("button",{ref:L===0?C:null,type:"button",className:"ic-cs-color-swatch",style:{backgroundColor:p},onClick:L===0?()=>v(!0):void 0,"aria-label":o("color_picker.title")})}),L===0&&s.jsx(cl,{color:p,defaultColor:p,title:o("color_picker.default"),onChange:q,onClose:()=>v(!1),anchorEl:{current:C.current},open:b})]})]},`rating${String(L)}`)})}),s.jsxs("div",{className:"ic-fsp-presets-section",children:[s.jsx("div",{className:"ic-edit-rule-label",children:o("conditional_formatting.data_bars_preferences")}),s.jsxs("label",{className:"ic-edit-rule-checkbox-row",children:[s.jsx("input",{type:"checkbox",checked:D,onChange:T=>M(T.target.checked)}),o("conditional_formatting.icon_sets_show_value")]})]})]})]}),s.jsxs("div",{className:"ic-edit-rule-footer",children:[s.jsx(ye,{variant:"secondary",onClick:t,children:o("conditional_formatting.cancel")}),s.jsx(ye,{startIcon:s.jsx(Ct,{}),disabled:!l.trim(),onClick:()=>{e({presetId:h,rating:u==="rating"?{count:_,icon:m,color:p}:void 0,thresholds:k,showValue:D})},children:o("conditional_formatting.apply")})]})]})},Ti={bold:!1,italic:!1,underline:!1,strike:!1,fontColor:"#D21D21",fillColor:"#FBE7E8"},Ax=({onSave:e,onCancel:t,initialValues:l,getSelectedArea:n,resolveValue:a})=>{var k;let{t:r}=be(),[i,o]=S.useState((l==null?void 0:l.ruleType)==="color_scale"?"color_scale":(l==null?void 0:l.ruleType)==="data_bars"?"data_bars":(l==null?void 0:l.ruleType)==="icon_sets"?"icon_sets":"classic"),[c,u]=S.useState((l==null?void 0:l.applyTo)??""),[d,h]=S.useState((l==null?void 0:l.formatStyle)??Ti),[f,_]=S.useState(""),[y,p]=S.useState((l==null?void 0:l.dataBars)??{color:"#6AAB42",gradient:!1,positiveColor:"#6AAB42",negativeColor:"#E05C53",hideCellContent:!1,minBound:{type:"automatic",value:""},maxBound:{type:"automatic",value:""}}),[w,m]=S.useState(null),[g,b]=S.useState(l!=null&&l.colorScale?[l.colorScale.minimum.color,l.colorScale.midpoint.color,l.colorScale.maximum.color]:["#8CB354","#F8CD3D","#EC5753"]),v={fontWeight:d.bold?"bold":"normal",fontStyle:d.italic?"italic":"normal",textDecoration:[d.underline?"underline":"",d.strike?"line-through":""].filter(Boolean).join(" ")||"none",color:d.fontColor||"#000000",backgroundColor:d.fillColor||"transparent"},C=[{id:"classic",label:r("conditional_formatting.tab_classic")},{id:"color_scale",label:r("conditional_formatting.tab_color_scale")},{id:"data_bars",label:r("conditional_formatting.tab_data_bars")},{id:"icon_sets",label:r("conditional_formatting.tab_icon_sets")}];return s.jsxs("div",{className:"ic-edit-rule-container",children:[s.jsxs("div",{className:"ic-edit-rule-header-box",children:[s.jsx("div",{className:"ic-edit-rule-header-preview",style:i==="color_scale"?{background:Dd(g)}:i==="data_bars"?{position:"relative"}:i==="icon_sets"?{background:"var(--palette-common-white)"}:v,children:i==="data_bars"?s.jsx(Zp,{color:y.color,gradient:y.gradient}):i==="icon_sets"&&w?s.jsx(w.Icon,{size:18,color:w.color,fill:w.filled?w.color:"none"}):i!=="color_scale"&&"Aa"}),s.jsx("span",{className:"ic-edit-rule-header-box-text",children:i==="classic"&&f?f:(k=C.find(E=>E.id===i))==null?void 0:k.label})]}),s.jsx("div",{className:"ic-edit-rule-tabs",children:C.map(({id:E,label:D})=>s.jsx(ye,{variant:"ghost",size:"sm",className:`ic-edit-rule-tab${i===E?" ic-edit-rule-tab--active":""}`,onClick:()=>o(E),children:D},E))}),i==="classic"&&s.jsx(Sx,{onSave:e,onCancel:t,initialValues:l,getSelectedArea:n,applyTo:c,onApplyToChange:u,formatStyle:d,onFormatStyleChange:h,onDescriptionChange:_,resolveValue:a}),i==="color_scale"&&s.jsx(ax,{onSave:E=>e({applyTo:c,ruleType:"color_scale",ruleOperator:"",ruleValue:"",ruleValue2:"",formatStyle:Ti,colorScale:E}),onCancel:t,applyTo:c,onApplyToChange:u,initialValues:l==null?void 0:l.colorScale,onPreviewChange:b,getSelectedArea:n}),i==="data_bars"&&s.jsx(bx,{onSave:E=>e({applyTo:c,ruleType:"data_bars",ruleOperator:"",ruleValue:"",ruleValue2:"",formatStyle:Ti,dataBars:E}),onCancel:t,applyTo:c,onApplyToChange:u,getSelectedArea:n,initialValues:l==null?void 0:l.dataBars,onPreviewChange:p}),i==="icon_sets"&&s.jsx(kx,{onSave:E=>e({applyTo:c,ruleType:"icon_sets",ruleOperator:"",ruleValue:"",ruleValue2:"",formatStyle:Ti,iconSets:E}),applyTo:c,onApplyToChange:u,getSelectedArea:n,initialValues:l==null?void 0:l.iconSets,onCancel:t,onPreviewChange:m})]})};function Tx(e){let t=e.split("!");return t.length===2?t[1]:e}function Yh(e,t){let[l,n,a,r,i]=e,[o,c,u,d,h]=t;return l===o?Math.min(n,r)<=d&&c<=Math.max(n,r)&&Math.min(a,i)<=h&&u<=Math.max(a,i):!1}var Dx=({onClose:e,getSelectedArea:t,sheet:l,onUpdate:n,model:a})=>{var M;let[r,i]=S.useState(null),[o,c]=S.useState(!1),[u,d]=S.useState(""),[h,f]=S.useState("sheet"),{t:_}=be(),y=[{value:"sheet",label:_("conditional_formatting.filter_this_sheet")},{value:"selection",label:_("conditional_formatting.filter_selection")}],p=x=>{if(!x.trim())return x;let O=Al(a,x);if(O){let[z,U,V]=O,G=a.getFormattedCellValue(z,U,V);return G===""?'""':G}return x},w=a.getConditionalFormattingList(l).flatMap((x,O)=>{let z=yx(x);if(!z)return[];let U=z.ruleType??"cell_value",V=hx(fx(U)?a.getDxfForConditionalFormatting(l,O):null);return[{...z,id:String(O),applyTo:x.range,ruleType:U,ruleOperator:z.ruleOperator??"",ruleValue:z.ruleValue??"",ruleValue2:z.ruleValue2??"",formatStyle:V}]}),m=((M=a.getWorksheetsProperties()[l])==null?void 0:M.name)??"",g=x=>x.applyTo.includes("!")?x.applyTo:`${m}!${x.applyTo}`,b=x=>{let O=Al(a,g(x));if(O){let[z,U,V,G,R]=O;a.setSelectedSheet(z),a.setSelectedCell(U,V),a.setSelectedRange(U,V,G,R)}n()},v=o||r!==null,C=()=>{c(!1),i(null)},k=x=>{let O=px(x);if(!O)return;let z=Tx(x.applyTo);r?(a.updateConditionalFormatting(l,parseInt(r.id,10),z,O),i(null)):(a.addConditionalFormatting(l,z,O),c(!1)),n()},E=x=>{a.deleteConditionalFormatting(l,parseInt(x,10)),n()};if(v){let x=_(r?"conditional_formatting.edit_rule":"conditional_formatting.add_new_rule");return s.jsxs("div",{className:"ic-cf-container",children:[s.jsxs("div",{className:"ic-cf-edit-header",children:[s.jsx(I,{title:_("conditional_formatting.back_to_list"),children:s.jsx(X,{icon:s.jsx(ns,{}),onClick:C,"aria-label":_("conditional_formatting.back_to_list")})}),s.jsx("div",{className:"ic-cf-edit-header-title",children:x}),s.jsx(I,{title:_("right_drawer.close"),children:s.jsx(X,{icon:s.jsx(jt,{}),onClick:e,"aria-label":_("right_drawer.close")})})]}),s.jsx("div",{className:"ic-cf-content",children:s.jsx(Ax,{onSave:k,onCancel:C,getSelectedArea:t,resolveValue:p,initialValues:r??{applyTo:t(),ruleType:"cell_value",ruleOperator:"between",ruleValue:"",ruleValue2:"",formatStyle:{bold:!1,italic:!1,underline:!1,strike:!1,fontColor:"#D21D21",fillColor:"#FBE7E8"}}})})]})}let D=w.filter(x=>{if(h==="selection"){let z=Al(a,t());if(!z)return!1;let U=Al(a,g(x));if(!U||!Yh(z,U))return!1}if(!u.trim())return!0;let O=u.trim().toLowerCase();return x.applyTo.toLowerCase().includes(O)||mu({...x,resolveValue:p}).toLowerCase().includes(O)});return s.jsxs("div",{className:"ic-cf-container",children:[s.jsxs("div",{className:"ic-cf-header",children:[s.jsx("div",{className:"ic-cf-header-title",children:_("conditional_formatting.title")}),s.jsx(I,{title:_("right_drawer.close"),children:s.jsx(X,{icon:s.jsx(jt,{}),onClick:e,"aria-label":_("right_drawer.close")})})]}),s.jsx("div",{className:"ic-cf-content",children:w.length===0?s.jsxs("div",{className:"ic-cf-empty-state",children:[s.jsx("div",{className:"ic-cf-icon-wrapper",children:s.jsx(Cp,{})}),_("conditional_formatting.empty_message1"),s.jsx("br",{}),_("conditional_formatting.empty_message2")]}):s.jsxs("div",{className:"ic-cf-list-container",children:[s.jsxs("div",{className:"ic-cf-search-container",children:[s.jsx(Ue,{type:"text",size:"sm",value:u,onChange:x=>d(x.target.value),placeholder:_("conditional_formatting.search_placeholder"),startAdornment:s.jsx(Np,{})}),s.jsxs("div",{className:"ic-cf-filter",children:[s.jsx("span",{children:_("conditional_formatting.filter_label")}),s.jsx(Et,{size:"sm",variant:"ghost",value:h,options:y,onChange:f})]})]}),s.jsx("div",{className:"ic-cf-list-body",onMouseDown:x=>x.preventDefault(),children:D.length===0?s.jsxs("div",{className:"ic-cf-empty-state",children:[s.jsx("div",{className:"ic-cf-icon-wrapper",children:s.jsx(Ep,{})}),_("conditional_formatting.no_search_results")]}):D.map(x=>{var he;let O=Al(a,t()),z=Al(a,g(x)),U=O!==null&&z!==null&&Yh(O,z),V={color:x.formatStyle.fontColor||"#000000",backgroundColor:x.formatStyle.fillColor||"transparent",fontWeight:x.formatStyle.bold?"bold":"normal",fontStyle:x.formatStyle.italic?"italic":"normal",textDecoration:[x.formatStyle.underline?"underline":"",x.formatStyle.strike?"line-through":""].filter(Boolean).join(" ")||"none"},G=x.ruleType==="color_scale",R=G&&x.colorScale?Dd(x.colorScale.midpoint.type==="none"?[x.colorScale.minimum.color,x.colorScale.maximum.color]:[x.colorScale.minimum.color,x.colorScale.midpoint.color,x.colorScale.maximum.color]):void 0,q=x.ruleType==="data_bars",Y=x.ruleType==="icon_sets",W=Y&&!!((he=x.iconSets)!=null&&he.rating),ne=(()=>{var Z;if(!(!Y||!x.iconSets)){if(x.iconSets.rating){let A=kd(x.iconSets.rating.icon);return{Icon:A.Icon,color:x.iconSets.rating.color,filled:A.filled,backendName:x.iconSets.rating.icon}}return(Z=gu.find(A=>{var H;return A.id===((H=x.iconSets)==null?void 0:H.presetId)}))==null?void 0:Z.icons[0]}})();return s.jsxs("div",{className:`ic-cf-list-item${U?" ic-cf-list-item--selected":""}`,tabIndex:0,onClick:()=>b(x),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),b(x))},children:[s.jsx("div",{className:"ic-cf-list-item-preview",style:G?{background:R}:q?{position:"relative",overflow:"hidden"}:Y?{background:"var(--palette-common-white)"}:V,children:q&&x.dataBars?s.jsx(Zp,{color:x.dataBars.color,gradient:x.dataBars.gradient}):Y&&ne?s.jsx(ne.Icon,{size:16,color:ne.color,fill:ne.filled?ne.color:"none"}):!G&&"Aa"}),s.jsxs("div",{className:"ic-cf-list-item-text",children:[s.jsx("div",{className:"ic-cf-list-item-rule",children:W?_("conditional_formatting.icon_sets_ratings"):mu({...x,resolveValue:p})}),s.jsx("div",{className:"ic-cf-list-item-range",children:x.applyTo||"—"})]}),s.jsxs("div",{className:"ic-cf-list-item-icons",children:[s.jsx(I,{title:_("conditional_formatting.edit_rule"),children:s.jsx(X,{icon:s.jsx(as,{}),onClick:Z=>{Z.stopPropagation(),i(x)},"aria-label":_("conditional_formatting.edit_rule")})}),s.jsx(I,{title:_("conditional_formatting.delete_rule"),children:s.jsx(X,{icon:s.jsx(Yn,{}),onClick:Z=>{Z.stopPropagation(),E(x.id)},"aria-label":_("conditional_formatting.delete_rule")})})]})]},x.id)})})]})}),s.jsx("div",{className:"ic-cf-footer",children:s.jsx(ye,{startIcon:s.jsx(sl,{}),onClick:()=>c(!0),children:_("conditional_formatting.new")})})]})};function _u(e){return e.startsWith("Name: ")?{formulaError:"",nameError:e.slice(6)}:e.startsWith("Formula: ")?{formulaError:e.slice(9),nameError:""}:e.startsWith("Scope: ")?{formulaError:"",nameError:e.slice(7)}:{formulaError:e,nameError:""}}var Rx=({name:e,scope:t,formula:l,onSave:n,onCancel:a,editingDefinedName:r,model:i})=>{let{t:o}=be(),[c,u]=S.useState((()=>{if(e)return e;let E=o("name_manager_dialog.default_range_prefix"),D=1,M=`${E}${D}`,x=i.getWorksheetsProperties().findIndex(U=>U.name===t),O=x>=0?x:void 0,z=i.getDefinedNameList();for(;z.some(U=>U.name===M&&U.scope===O);)D++,M=`${E}${D}`;return M})()),[d,h]=S.useState(t),[f,_]=S.useState(l),[y,p]=S.useState(""),[w,m]=S.useState(""),g=E=>d===E,b=S.useId();S.useEffect(()=>{let E=setTimeout(()=>{let D=i.getWorksheetsProperties().findIndex(x=>x.name===d),M=D>=0?D:null;try{i.isValidDefinedName(c,M,f)}catch(x){let O=x.message;if(r&&O.includes("already exists")){p(""),m("");return}let{nameError:z,formulaError:U}=_u(O);p(z),m(U);return}p(""),m("")},300);return()=>clearTimeout(E)},[c,d,f,i,r]);let v=y!==""||w!=="",C=()=>{if(v)return;let E=n(c.trim(),d,f);E.nameError&&p(E.nameError),E.formulaError&&m(E.formulaError)},k=E=>{E.stopPropagation(),(E.metaKey||E.ctrlKey)&&E.key==="Enter"&&(E.preventDefault(),C())};return s.jsxs("div",{className:"ic-edit-range-container",onKeyDown:k,children:[s.jsxs("div",{className:"ic-edit-range-content-area",children:[s.jsxs("div",{className:"ic-edit-range-header-box",children:[s.jsx("div",{className:"ic-edit-range-header-icon",children:s.jsx(Ap,{})}),s.jsx("span",{className:"ic-edit-range-header-box-text",children:c||o("name_manager_dialog.new_named_range")})]}),s.jsxs("div",{className:"ic-edit-range-styled-box",children:[s.jsx(Ue,{id:b,autoFocus:!0,type:"text",label:o("name_manager_dialog.range_name"),placeholder:o("name_manager_dialog.enter_range_name"),value:c,error:!!y,helperText:y,onChange:E=>u(E.target.value),onKeyDown:k}),s.jsx(Et,{label:o("name_manager_dialog.scope_label"),helperText:o("name_manager_dialog.scope_helper"),value:d,onChange:h,options:[{value:"[Global]",label:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:g("[Global]")?"ic-edit-range-menu-span ic-edit-range-menu-span--selected":"ic-edit-range-menu-span",children:o("name_manager_dialog.workbook")}),s.jsx("span",{className:"ic-edit-range-menu-span-grey",children:` ${o("name_manager_dialog.global")}`})]}),triggerLabel:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ic-edit-range-menu-span",children:o("name_manager_dialog.workbook")}),s.jsx("span",{className:"ic-edit-range-menu-span-grey",children:` ${o("name_manager_dialog.global")}`})]})},...i.getWorksheetsProperties().map(E=>({value:E.name,label:s.jsx("span",{className:g(E.name)?"ic-edit-range-menu-span ic-edit-range-menu-span--selected":"ic-edit-range-menu-span",children:E.name}),triggerLabel:s.jsx("span",{children:E.name})}))]}),s.jsx(Ue,{label:o("name_manager_dialog.refers_to"),placeholder:o("name_manager_dialog.enter_formula"),value:f,error:!!w,helperText:w||void 0,onChange:E=>{_(E.target.value),m("")},onKeyDown:k,endAdornment:s.jsx(I,{title:o("name_manager_dialog.use_selection"),children:s.jsx(X,{size:"sm",variant:"secondary",icon:s.jsx(Hn,{}),"aria-label":o("name_manager_dialog.use_selection"),className:"ic-edit-range-range-button",onClick:()=>{let E=i.getWorksheetsProperties().map(D=>D.name);_(Op(i.getSelectedView(),E))}})})})]})]}),s.jsxs("div",{className:"ic-edit-range-footer",children:[s.jsx(ye,{variant:"secondary",onClick:a,children:o("name_manager_dialog.cancel")}),s.jsx(ye,{startIcon:s.jsx(Ct,{}),disabled:v,onClick:C,children:o("name_manager_dialog.apply")})]})]})},Kh=e=>e.trim().replace(/['"]/g,""),zx=({onClose:e,getSelectedArea:t,model:l,onUpdate:n})=>{var M;let[a,r]=S.useState(null),[i,o]=S.useState(!1),[c,u]=S.useState("[all]"),[d,h]=S.useState(""),f=S.useRef(null),{t:_}=be(),y=!a&&!i;S.useEffect(()=>{var x;y&&((x=f.current)==null||x.focus())},[y]);let p=x=>{r(x),o(!1)},w=()=>{o(!0),r(null)},m=()=>{r(null),o(!1)},g=(x,O,z)=>{let U=l.getWorksheetsProperties();if(i){let V=U.findIndex(R=>R.name===O),G=V>=0?V:null;try{return l.newDefinedName(x,G,z),o(!1),n(),{formulaError:"",nameError:""}}catch(R){return R instanceof Error?_u(R.message):{formulaError:"",nameError:`${R}`}}}else{if(!a)return{formulaError:"",nameError:""};let V=U.findIndex(R=>R.name===O),G=V>=0?V:null;try{return l.updateDefinedName(a.name,a.scope??null,x,G,z),r(null),n(),{formulaError:"",nameError:""}}catch(R){return R instanceof Error?_u(R.message):{formulaError:"",nameError:`${R}`}}}};if(a||i){let x="",O="[Global]",z="";if(a){x=a.name;let V=l.getWorksheetsProperties();O=a.scope==null?"[Global]":((M=V[a.scope])==null?void 0:M.name)||"[unknown]",z=a.formula}else i&&(z=t());let U=_(i?"name_manager_dialog.add_new_range":"name_manager_dialog.edit_range");return s.jsxs("div",{className:"ic-named-ranges-container",children:[s.jsxs("div",{className:"ic-named-ranges-edit-header",children:[s.jsx(I,{title:_("name_manager_dialog.back_to_list"),children:s.jsx(X,{icon:s.jsx(ns,{}),onClick:m,"aria-label":_("name_manager_dialog.back_to_list")})}),s.jsx("div",{className:"ic-named-ranges-edit-header-title",children:U}),s.jsx(I,{title:_("right_drawer.close"),children:s.jsx(X,{icon:s.jsx(jt,{}),onClick:e,"aria-label":_("right_drawer.close")})})]}),s.jsx("div",{className:"ic-named-ranges-content",children:s.jsx(Rx,{name:x,scope:O,formula:z,onSave:g,onCancel:m,editingDefinedName:a,model:l})})]})}let b=t(),v=l.getDefinedNameList(),C=l.getSelectedView().sheet,k=[{value:"[all]",label:_("name_manager_dialog.scope_filter_all")},{value:"[global]",label:_("name_manager_dialog.scope_filter_global")},{value:"[current]",label:_("name_manager_dialog.scope_filter_current")}],E=v.filter(x=>{var O;if(c==="[global]"&&x.scope!=null||c==="[current]"&&x.scope!==C)return!1;if(d.trim()){let z=d.trim().toLowerCase(),U=l.getWorksheetsProperties(),V=x.scope==null?_("name_manager_dialog.scope_filter_global"):((O=U[x.scope])==null?void 0:O.name)??"";return x.name.toLowerCase().includes(z)||V.toLowerCase().includes(z)}return!0}),D=x=>{let O=Al(l,x);if(O){let[z,U,V,G,R]=O;l.setSelectedSheet(z),l.setSelectedCell(U,V),l.setSelectedRange(U,V,G,R)}n()};return s.jsxs("div",{className:"ic-named-ranges-container",children:[s.jsxs("div",{className:"ic-named-ranges-header",children:[s.jsx("div",{className:"ic-named-ranges-header-title",children:_("name_manager_dialog.title")}),s.jsx(I,{title:_("right_drawer.close"),children:s.jsx(X,{icon:s.jsx(jt,{}),onClick:e,"aria-label":_("right_drawer.close")})})]}),s.jsx("div",{className:"ic-named-ranges-content",children:v.length===0?s.jsxs("div",{className:"ic-named-ranges-empty-state-message",children:[s.jsx("div",{className:"ic-named-ranges-icon-wrapper",children:s.jsx(Cp,{})}),_("name_manager_dialog.empty_message1"),s.jsx("br",{}),_("name_manager_dialog.empty_message2")]}):s.jsxs("div",{className:"ic-named-ranges-list-container",children:[s.jsxs("div",{className:"ic-named-ranges-search-container",children:[s.jsx(Ue,{ref:f,type:"text",size:"sm",value:d,onChange:x=>h(x.target.value),placeholder:_("name_manager_dialog.search_placeholder"),startAdornment:s.jsx(Np,{})}),s.jsxs("div",{className:"ic-named-ranges-scope-filter",children:[s.jsx("span",{children:_("name_manager_dialog.scope_label")}),s.jsx(Et,{size:"sm",variant:"ghost",value:c,options:k,onChange:u})]})]}),s.jsxs("div",{className:"ic-named-ranges-list-body",onMouseDown:x=>x.preventDefault(),children:[E.length===0?s.jsxs("div",{className:"ic-named-ranges-empty-state-message",children:[s.jsx("div",{className:"ic-named-ranges-icon-wrapper",children:s.jsx(Ep,{})}),_("name_manager_dialog.no_search_results")]}):null,E.map(x=>{var U;let O=l.getWorksheetsProperties(),z=x.scope==null?"[Global]":((U=O[x.scope])==null?void 0:U.name)||"[Unknown]";return s.jsxs("div",{className:`ic-named-ranges-list-item ${b!==null&&Kh(x.formula)===Kh(b)?"ic-named-ranges-list-item--selected":""}`,tabIndex:0,onClick:()=>{let V=x.formula,G=Al(l,V);if(G){let[R,q,Y,W,ne]=G;l.setSelectedSheet(R),l.setSelectedCell(q,Y),l.setSelectedRange(q,Y,W,ne)}n()},onKeyDown:V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),D(x.formula))},children:[s.jsxs("div",{className:"ic-named-ranges-list-item-text",children:[s.jsx("div",{className:"ic-named-ranges-name-text",children:x.name}),s.jsx("div",{className:"ic-named-ranges-scope-text",children:z}),s.jsx("div",{className:"ic-named-ranges-formula-text",children:x.formula})]}),s.jsxs("div",{className:"ic-named-ranges-icons-wrapper",children:[s.jsx(I,{title:_("name_manager_dialog.edit"),children:s.jsx(X,{icon:s.jsx(as,{}),onClick:V=>{V.stopPropagation(),p(x)},"aria-label":_("name_manager_dialog.edit")})}),s.jsx(I,{title:_("name_manager_dialog.delete"),children:s.jsx(X,{icon:s.jsx(Yn,{}),onClick:V=>{V.stopPropagation(),l.deleteDefinedName(x.name,x.scope??null),n()},"aria-label":_("name_manager_dialog.delete")})})]})]},`${x.name}-${x.scope}`)})]})]})}),s.jsx("div",{className:"ic-named-ranges-footer",children:s.jsx(ye,{startIcon:s.jsx(sl,{}),onClick:w,children:_("name_manager_dialog.new")})})]})};function Mx(e){if(e==="general")return"#,##0.000";let t=e.replace(/\.0/g,".00");return t.includes(".")?t:t.includes("0")?t.replace(/0/g,"0.0"):t.includes("#")?t.replace(/#([^#,]|$)/g,"0.0$1"):e}function Lx(e){if(e==="general")return"#,##0.0";let t=e.replace(/\.0/g,".");return t=t.replace(/0\.([^0]|$)/,"0$1"),t}var Ve=function(e){return e.AUTO="general",e.CURRENCY_EUR='"€"#,##0.00',e.CURRENCY_USD='"$"#,##0.00',e.CURRENCY_GBP='"£"#,##0.00',e.PERCENTAGE="0.00%",e}({});function Ox(e){let t=[];return e.underline&&t.push("underline"),e.strike&&t.push("line-through"),{backgroundColor:e.fillColor||void 0,color:e.fontColor||void 0,fontWeight:e.bold?"bold":void 0,fontStyle:e.italic?"italic":void 0,textDecoration:t.length>0?t.join(" "):void 0}}function Bx(e){return{bold:e.font.b,italic:e.font.i,underline:e.font.u,strike:e.font.strike,fontColor:e.font.color??"",fillColor:e.fill.fg_color??""}}var ac="__custom__",Zh=({name:e,style:t,formatOptions:l,existingStyleNames:n,onSave:a,onClose:r})=>{let{t:i}=be(),[o,c]=S.useState(()=>{if(e)return e;let D=new Set(n.map(O=>O.toLowerCase())),M=1,x=`Style${M}`;for(;D.has(x.toLowerCase());)M++,x=`Style${M}`;return x}),[u,d]=S.useState(""),[h,f]=S.useState(()=>Bx(t)),[_,y]=S.useState(t.num_fmt),[p,w]=S.useState(""),m=![Ve.AUTO,l.number_fmt,Ve.PERCENTAGE,Ve.CURRENCY_EUR,Ve.CURRENCY_USD,Ve.CURRENCY_GBP,l.short_date,l.long_date].includes(_),g=[{value:Ve.AUTO,label:i("toolbar.format_menu.auto")},{value:l.number_fmt,label:i("toolbar.format_menu.number")},{value:Ve.PERCENTAGE,label:i("toolbar.format_menu.percentage")},{value:Ve.CURRENCY_EUR,label:i("toolbar.format_menu.currency_eur")},{value:Ve.CURRENCY_USD,label:i("toolbar.format_menu.currency_usd")},{value:Ve.CURRENCY_GBP,label:i("toolbar.format_menu.currency_gbp")},{value:l.short_date,label:i("toolbar.format_menu.date_short")},{value:l.long_date,label:i("toolbar.format_menu.date_long")},{value:ac,label:i("toolbar.format_menu.custom")}],b=D=>{y(D===ac?p||"":D)},v=m?ac:_,C=!!u||!o.trim(),k=()=>{if(C)return;let D={...t,num_fmt:_,fill:{...t.fill,pattern_type:h.fillColor?"solid":"none",fg_color:h.fillColor||void 0},font:{...t.font,b:h.bold,i:h.italic,u:h.underline,strike:h.strike,color:h.fontColor||void 0}},M=a({name:o.trim(),style:D});M.nameError?d(M.nameError):r()},E=D=>{D.stopPropagation(),(D.metaKey||D.ctrlKey)&&D.key==="Enter"&&(D.preventDefault(),k())};return s.jsxs("div",{className:"ic-edit-style-container",onKeyDown:E,children:[s.jsxs("div",{className:"ic-edit-style-content-area",children:[s.jsxs("div",{className:"ic-edit-style-header-box",children:[s.jsx("div",{className:"ic-edit-style-preview",style:Ox(h),children:"Aa"}),s.jsx("span",{className:"ic-edit-style-header-box-text",children:o.trim()||i("named_styles.new_style")})]}),s.jsxs("div",{className:"ic-edit-style-styled-box",children:[s.jsx(Ue,{autoFocus:!0,type:"text",label:"Name",placeholder:"Style name",value:o,error:!!u,helperText:u,onChange:D=>{c(D.target.value),d("")},onKeyDown:E}),s.jsxs("div",{className:"ic-edit-style-format-group",children:[s.jsx(Et,{label:"Format",value:v,options:g,onChange:b}),m&&s.jsx(Ue,{type:"text",placeholder:'e.g. #,##0.00 or "€"#,##0',value:p,onChange:D=>{w(D.target.value),y(D.target.value)},onKeyDown:E})]}),s.jsxs("div",{className:"ic-edit-style-format-group",children:[s.jsx("span",{className:"ic-edit-style-label",children:"Style"}),s.jsx(Xp,{value:h,onChange:f})]})]})]}),s.jsxs("div",{className:"ic-edit-style-footer",children:[s.jsx(ye,{variant:"secondary",onClick:r,children:i("named_styles.cancel")}),s.jsx(ye,{startIcon:s.jsx(Ct,{}),disabled:C,onClick:k,children:i("named_styles.apply")})]})]})},Ux={thin:"1px",medium:"2px",thick:"3px",double:"3px",dotted:"1px",slantdashdot:"1px",mediumdashed:"2px",mediumdashdotdot:"2px",mediumdashdot:"2px"},Hx={thin:"solid",medium:"solid",thick:"solid",double:"double",dotted:"dotted",slantdashdot:"dashed",mediumdashed:"dashed",mediumdashdotdot:"dashed",mediumdashdot:"dashed"};function Di(e){if(e!=null&&e.style)return`${Ux[e.style]??"1px"} ${Hx[e.style]??"solid"} ${e.color||"currentColor"}`}function Qp(e){var l,n,a,r;let t=[];return e.font.u&&t.push("underline"),e.font.strike&&t.push("line-through"),{backgroundColor:e.fill.fg_color||void 0,color:e.font.color||void 0,fontWeight:e.font.b?"bold":void 0,fontStyle:e.font.i?"italic":void 0,textDecoration:t.length>0?t.join(" "):void 0,borderTop:Di((l=e.border)==null?void 0:l.top),borderRight:Di((n=e.border)==null?void 0:n.right),borderBottom:Di((a=e.border)==null?void 0:a.bottom),borderLeft:Di((r=e.border)==null?void 0:r.left)}}var Fx=({customStyles:e,onEdit:t,onDelete:l})=>{let{t:n}=be();return s.jsx("div",{className:"ic-named-styles-manage-list",children:e.map(a=>s.jsxs("div",{className:"ic-named-styles-manage-item",children:[s.jsx("div",{className:"ic-named-styles-manage-item-preview",style:Qp(a.style),children:"Aa"}),s.jsx("div",{className:"ic-named-styles-manage-item-name",children:a.name}),s.jsxs("div",{className:"ic-named-styles-manage-item-icons",children:[s.jsx(I,{title:n("named_styles.update_style"),children:s.jsx(X,{icon:s.jsx(as,{size:16}),onClick:()=>t(a),"aria-label":n("named_styles.update_style")})}),s.jsx(I,{title:n("named_styles.delete_style"),children:s.jsx(X,{icon:s.jsx(Yn,{size:16}),onClick:()=>l(a),"aria-label":n("named_styles.delete_style")})})]})]},a.name))})},Vx=[{label:"Good, Bad and Neutral",type:"grid",names:["normal","bad","good","neutral"]},{label:"Data and Model",type:"grid",names:["calculation","check cell","explanatory text","input","linked cell","note","output","warning text"]},{label:"Titles and Headings",type:"grid",names:["heading 1","heading 2","heading 3","heading 4","title","total"]},{label:"Themed Cell Styles",type:"themed",names:"20% - accent1.40% - accent1.60% - accent1.80% - accent1.accent1.20% - accent2.40% - accent2.60% - accent2.80% - accent2.accent2.20% - accent3.40% - accent3.60% - accent3.80% - accent3.accent3.20% - accent4.40% - accent4.60% - accent4.80% - accent4.accent4.20% - accent5.40% - accent5.60% - accent5.80% - accent5.accent5.20% - accent6.40% - accent6.60% - accent6.80% - accent6.accent6".split(".")},{label:"Number Format",type:"grid",names:["comma","comma [0]","currency","currency [0]","percent"]}];function qx(e){let t=new Map(e.map(l=>[l.name.toLowerCase(),l]));return Vx.map(l=>({label:l.label,type:l.type,styles:l.names.map(n=>t.get(n)).filter(n=>n!==void 0)})).filter(l=>l.styles.length>0)}var $x=["Accent 1","Accent 2","Accent 3","Accent 4","Accent 5","Accent 6"],Gx=({customStyles:e,builtinStyles:t,formatOptions:l,onApplyNamedStyle:n,onAddNamedStyle:a,onUpdateNamedStyle:r,onDeleteNamedStyle:i,onClose:o})=>{let{t:c}=be(),[u,d]=S.useState({mode:"list"}),h=t.find(m=>m.name.toLowerCase()==="normal"),f=qx(t),_=[...e.map(m=>m.name),...t.map(m=>m.name)],y=({name:m,style:g},b)=>s.jsx("button",{type:"button",className:"ic-named-styles-tile",style:Qp(g),onClick:()=>n(m),children:s.jsx("span",{className:"ic-named-styles-tile-text",children:b??m})},m),p=m=>m.type==="themed"?s.jsx("div",{className:"ic-named-styles-rows",children:$x.map((g,b)=>{let v=`accent${b+1}`,C=m.styles.filter(k=>k.name.toLowerCase().endsWith(v));return C.length===0?null:s.jsx("div",{className:"ic-named-styles-row",children:C.map(k=>{let E=k.name.match(/^(\d+%)/);return y(k,E?E[1]:g)})},g)})}):s.jsx("div",{className:"ic-named-styles-grid",children:m.styles.map(g=>y(g))}),w=(m,g)=>s.jsxs("div",{className:"ic-named-styles-edit-header",children:[s.jsx(I,{title:c("named_styles.back_to_list"),children:s.jsx(X,{icon:s.jsx(ns,{}),onClick:g??(()=>d({mode:"list"})),"aria-label":c("named_styles.back_to_list")})}),s.jsx("div",{className:"ic-named-styles-edit-header-title",children:m}),s.jsx(I,{title:c("right_drawer.close"),children:s.jsx(X,{icon:s.jsx(jt,{}),onClick:o,"aria-label":c("right_drawer.close")})})]});if(u.mode==="create"&&h)return s.jsxs("div",{className:"ic-named-styles-container",children:[w(c("named_styles.add_new_style")),s.jsx("div",{className:"ic-named-styles-content",children:s.jsx(Zh,{name:"",style:h.style,formatOptions:l,existingStyleNames:_,onSave:m=>_.some(g=>g.toLowerCase()===m.name.toLowerCase())?{nameError:c("named_styles.name_already_exists")}:a(m),onClose:()=>d({mode:"list"})})})]});if(u.mode==="manage")return s.jsxs("div",{className:"ic-named-styles-container",children:[w(c("named_styles.manage_styles")),s.jsx("div",{className:"ic-named-styles-content",children:s.jsx(Fx,{customStyles:e,onEdit:m=>d({mode:"editing",style:m}),onDelete:m=>d({mode:"delete-confirm",style:m})})})]});if(u.mode==="editing"){let{style:m}=u,g=_.filter(b=>b.toLowerCase()!==m.name.toLowerCase());return s.jsxs("div",{className:"ic-named-styles-container",children:[w(c("named_styles.update_style"),()=>d({mode:"manage"})),s.jsx("div",{className:"ic-named-styles-content",children:s.jsx(Zh,{name:m.name,style:m.style,formatOptions:l,existingStyleNames:_,onSave:b=>g.some(v=>v.toLowerCase()===b.name.toLowerCase())?{nameError:c("named_styles.name_already_exists")}:r(m.name,b),onClose:()=>d({mode:"manage"})})})]})}if(u.mode==="delete-confirm"){let{style:m}=u;return s.jsxs("div",{className:"ic-named-styles-container",children:[w(c("named_styles.delete_style"),()=>d({mode:"manage"})),s.jsxs("div",{className:"ic-named-styles-confirm",children:[s.jsxs("p",{className:"ic-named-styles-confirm-message",children:[c("named_styles.confirm_delete_message")," ",s.jsx("strong",{children:m.name}),"?"]}),s.jsxs("div",{className:"ic-named-styles-confirm-actions",children:[s.jsx(ye,{variant:"secondary",onClick:()=>d({mode:"manage"}),children:c("named_styles.cancel")}),s.jsx(ye,{variant:"destructive",onClick:()=>{i(m.name),d({mode:"list"})},children:c("named_styles.delete_style")})]})]})]})}return s.jsxs("div",{className:"ic-named-styles-container",children:[s.jsxs("div",{className:"ic-named-styles-header",children:[s.jsx("div",{className:"ic-named-styles-header-title",children:c("named_styles.panel_title")}),s.jsx(I,{title:c("right_drawer.close"),children:s.jsx(X,{icon:s.jsx(jt,{}),onClick:o,"aria-label":c("right_drawer.close")})})]}),s.jsxs("div",{className:"ic-named-styles-content",children:[e.length>0&&s.jsxs("div",{className:"ic-named-styles-section",children:[s.jsxs("div",{className:"ic-named-styles-section-title",style:{height:"17px"},children:["Custom",s.jsx("div",{className:"ic-named-styles-section-title-actions",children:s.jsx(I,{title:c("named_styles.manage_styles"),children:s.jsx(X,{icon:s.jsx(T2,{size:14}),onClick:()=>d({mode:"manage"}),"aria-label":c("named_styles.manage_styles")})})})]}),s.jsx("div",{className:"ic-named-styles-grid",children:e.map(m=>y(m))})]}),s.jsxs("div",{className:"ic-named-styles-section",children:[s.jsx("div",{className:"ic-named-styles-section-title",children:"Theme"}),f.map(m=>s.jsxs("div",{className:"ic-named-styles-category",children:[s.jsx("div",{className:"ic-named-styles-category-label",children:m.label}),p(m)]},m.label))]})]}),s.jsx("div",{className:"ic-named-styles-footer",children:s.jsx(ye,{startIcon:s.jsx(sl,{}),onClick:()=>d({mode:"create"}),children:c("named_styles.add_new_style")})})]})},Yx={en:"en-US",es:"es-ES",fr:"fr-FR",de:"de-DE",it:"it-IT"},Ri={en:{number:"1,234.56",dateTime:"10/17/2026 09:21:06 PM",delimiterType:"comma",delimiterChar:","},es:{number:"1.234,56",dateTime:"17/10/2026 21:21:06",delimiterType:"semicolon",delimiterChar:";"},fr:{number:"1 234,56",dateTime:"17/10/2026 21:21:06",delimiterType:"semicolon",delimiterChar:";"},de:{number:"1.234,56",dateTime:"17.10.2026 21:21:06",delimiterType:"semicolon",delimiterChar:";"},it:{number:"1.234,56",dateTime:"17/10/2026 21:21:06",delimiterType:"semicolon",delimiterChar:";"}},pu=e=>Yx[e]??e,Kx=e=>{var d,h;let{t}=be(),l=ob(),n=ib(),[a,r]=S.useState(e.initialLocale),[i,o]=S.useState(e.initialTimezone),[c,u]=S.useState(e.initialLanguage);return S.useEffect(()=>{r(e.initialLocale),o(e.initialTimezone),u(e.initialLanguage)},[e.initialLocale,e.initialTimezone,e.initialLanguage]),s.jsxs("div",{className:"ic-regional-settings-container",children:[s.jsxs("div",{className:"ic-regional-settings-header",children:[s.jsx("div",{className:"ic-regional-settings-header-title",children:t("regional_settings.title")}),s.jsx(X,{variant:"ghost",size:"xs",icon:s.jsx(jt,{}),onClick:e.onClose,"aria-label":t("right_drawer.close")})]}),s.jsxs("div",{className:"ic-regional-settings-content",children:[s.jsxs("div",{className:"ic-regional-settings-section",children:[s.jsx("div",{className:"ic-regional-settings-section-title",children:t("regional_settings.locale.title")}),s.jsxs("div",{className:"ic-regional-settings-field-wrapper",children:[s.jsx(Et,{label:t("regional_settings.locale.locale_label"),value:a,onChange:r,options:l.map(f=>({value:f,label:pu(f),triggerLabel:pu(f)}))}),s.jsxs("div",{className:"ic-regional-settings-helper-box",children:[s.jsxs("div",{className:"ic-regional-settings-row",children:[t("regional_settings.locale.locale_example1"),s.jsx("span",{className:"ic-regional-settings-row-value",children:((d=Ri[a])==null?void 0:d.number)??"1,234.56"})]}),s.jsxs("div",{className:"ic-regional-settings-row",children:[t("regional_settings.locale.locale_example2"),s.jsx("span",{className:"ic-regional-settings-row-value",children:((h=Ri[a])==null?void 0:h.dateTime)??"10/17/2026 09:21:06 PM"})]}),s.jsxs("div",{className:"ic-regional-settings-row",children:[t("regional_settings.locale.locale_example3"),s.jsx("span",{className:"ic-regional-settings-row-value",children:(()=>{var y,p;let f=((y=Ri[a])==null?void 0:y.delimiterType)??"comma",_=((p=Ri[a])==null?void 0:p.delimiterChar)??",";return`${t(`regional_settings.locale.delimiter_${f}`)} (${_})`})()})]})]})]})]}),s.jsxs("div",{className:"ic-regional-settings-section",children:[s.jsx("div",{className:"ic-regional-settings-section-title",children:t("regional_settings.timezone.title")}),s.jsx("div",{className:"ic-regional-settings-field-wrapper",children:s.jsx(Et,{label:t("regional_settings.timezone.timezone_label"),helperText:t("regional_settings.timezone.timezone_helper"),value:i,onChange:o,options:n.map(f=>({value:f,label:f,triggerLabel:f}))})})]})]}),s.jsx("div",{className:"ic-regional-settings-footer",children:s.jsx(ye,{startIcon:s.jsx(Ct,{}),onClick:()=>{e.onSave(a,i,c),e.onClose()},children:t("num_fmt.save")})})]})},Xh=16,Zx=({isOpen:e,onClose:t,width:l,onWidthChange:n,getSelectedArea:a,model:r,onUpdate:i,drawerType:o,customStyles:c,builtinStyles:u,formatOptions:d,onApplyNamedStyle:h,onAddNamedStyle:f,onUpdateNamedStyle:_,onDeleteNamedStyle:y,initialLocale:p,initialTimezone:w,initialLanguage:m,onSettingsSave:g})=>{let[b,v]=S.useState(l),[C,k]=S.useState(!1),{t:E}=be(),D=S.useCallback(x=>{x.preventDefault(),k(!0)},[]),M=S.useCallback(x=>{let O=b;if(x.key==="ArrowLeft")O=Math.min(500,b+Xh);else if(x.key==="ArrowRight")O=Math.max(300,b-Xh);else if(x.key==="Home")O=300;else if(x.key==="End")O=500;else return;v(O),n(O)},[b,n]);return S.useEffect(()=>{if(!C)return;document.body.style.userSelect="none",document.body.style.cursor="col-resize";let x=z=>{let U=window.innerWidth-z.clientX,V=Math.max(300,Math.min(500,U));v(V),n(V)},O=()=>{k(!1),document.body.style.userSelect="",document.body.style.cursor=""};return document.addEventListener("mousemove",x),document.addEventListener("mouseup",O),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",O),document.body.style.userSelect="",document.body.style.cursor=""}},[C,n]),e?s.jsxs("div",{className:"ic-drawer-container",style:{"--ic-runtime-drawer-width":`${b}px`},children:[s.jsx("hr",{className:`ic-drawer-resize-handle ${C?"ic-drawer-resize-handle--resizing":""}`,tabIndex:0,"aria-label":E("right_drawer.resize_drawer"),"aria-orientation":"vertical",onMouseDown:D,onKeyDown:M}),s.jsx("div",{className:"ic-drawer-divider"}),s.jsx("div",{className:"ic-drawer-content",children:(()=>{switch(o){case"namedStyles":return s.jsx(Gx,{onClose:t,customStyles:c,builtinStyles:u,formatOptions:d,onApplyNamedStyle:h,onAddNamedStyle:f,onUpdateNamedStyle:_,onDeleteNamedStyle:y});case"regionalSettings":return s.jsx(Kx,{onClose:t,initialLocale:p,initialTimezone:w,initialLanguage:m,onSave:g});case"conditionalFormatting":return s.jsx(Dx,{onClose:t,getSelectedArea:a,sheet:r.getSelectedView().sheet,onUpdate:i,model:r});default:return s.jsx(zx,{onClose:t,model:r,onUpdate:i,getSelectedArea:a})}})()})]}):null};function Wp(e,t){let l=S.useRef(null),[n,a]=S.useState({});return S.useLayoutEffect(()=>{if(!e||!t)return;function r(){let i=l.current;if(!i||!t)return;let o=i.offsetWidth,c=i.offsetHeight,u=window.innerWidth,d=window.innerHeight,h=t.x,f=t.y;f+c>d-8&&(t.flipY===void 0?t.y-c>8&&(f=t.y-c):f=t.flipY-c),h+o>u-8&&(h=t.flipX===void 0?u-o-8:t.flipX-o),h<8&&(h=8),f+c>d-8&&(f=d-c-8),f<8&&(f=8),a({top:f,left:h})}return r(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[e,t]),{menuRef:l,position:n}}function Jp(e,t,l=!1){function n(a){var o,c,u,d,h;let r=Array.from(((o=e.current)==null?void 0:o.querySelectorAll(':is([role="menuitem"],[role="menuitemradio"],[role="menuitemcheckbox"]):not([disabled])'))??[]);if(r.length===0)return;let i=r.indexOf(document.activeElement);switch(a.key){case"ArrowDown":a.preventDefault(),(c=r[(i+1)%r.length])==null||c.focus();break;case"ArrowUp":a.preventDefault(),(u=r[i<=0?r.length-1:i-1])==null||u.focus();break;case"Home":a.preventDefault(),(d=r[0])==null||d.focus();break;case"End":a.preventDefault(),(h=r[r.length-1])==null||h.focus();break;case"ArrowLeft":l&&(a.preventDefault(),t());break;case"Escape":a.preventDefault(),t();break;case"Tab":t();break}}return{handleMenuKeyDown:n}}function Xx(e,t){let l=e.getBoundingClientRect(),n=t.offsetWidth,a=t.offsetHeight,r=window.innerWidth,i=window.innerHeight,o=i-l.bottom-8,c=l.top-8,u=o>=a+4||o>=c,d=l.left,h=d+n>r-8?l.right-n:d,f=u?l.bottom+4:l.top-a-4;return h+n>r-8&&(h=r-n-8),h<8&&(h=8),f+a>i-8&&(f=i-a-8),f<8&&(f=8),{top:f,left:h}}function Qx(e){let t=S.useRef(null),l=S.useRef(null),[n,a]=S.useState({});return S.useLayoutEffect(()=>{if(!e)return;function r(){let i=t.current,o=l.current;if(!i||!o)return;let{top:c,left:u}=Xx(i,o);a({top:c,left:u})}return r(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[e]),{triggerRef:t,menuRef:l,position:n}}var Qh='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',Qr=S.createContext(null);function Kn(e){let t=e.trigger!==void 0,[l,n]=S.useState(!1),a=t?l:e.open,r=Qx(t?a:!1),i=Wp(t?!1:a,t?void 0:e.anchorPosition),o=t?r.menuRef:i.menuRef,c=t?r.position:i.position,u=S.useRef(null),d=t?void 0:e.onClose,h=S.useCallback(()=>{var p;if(t){n(!1);let w=r.triggerRef.current;w&&((p=w.matches(Qh)?w:w.querySelector(Qh))==null||p.focus())}else d==null||d()},[t,d,r.triggerRef]);S.useEffect(()=>{if(!a)return;function p(w){var v;let m=w.target;if(!m)return;let g=t?((v=r.triggerRef.current)==null?void 0:v.contains(m))??!1:!1,b=m instanceof Element&&m.closest(".ic-menu-wrapper")!==null;!g&&!b&&h()}return document.addEventListener("pointerdown",p,!0),()=>{document.removeEventListener("pointerdown",p,!0)}},[a,h,t,r.triggerRef]);let{handleMenuKeyDown:f}=Jp(o,h);S.useEffect(()=>{var p,w;a&&((w=(p=o.current)==null?void 0:p.querySelector(':is([role="menuitem"],[role="menuitemradio"],[role="menuitemcheckbox"]):not([disabled])'))==null||w.focus())},[a,o]);let _=a?ul.createPortal(s.jsx("div",{ref:o,role:"presentation",className:"ic-menu-wrapper",style:c,children:s.jsx("div",{role:"menu",className:"ic-menu",onKeyDown:f,children:e.children})}),document.body):null;if(!t)return s.jsx(Qr.Provider,{value:{close:h,activeSetOpenRef:u},children:_});let y=S.cloneElement(e.trigger,{ref:r.triggerRef,onClick:p=>{var w,m,g;(g=(m=(w=e.trigger)==null?void 0:w.props).onClick)==null||g.call(m,p),n(b=>!b)},"aria-haspopup":"menu","aria-expanded":a?"true":"false"});return s.jsxs(Qr.Provider,{value:{close:h,activeSetOpenRef:u},children:[y,_]})}Kn.displayName="Menu";function ie({onClick:e,disabled:t=!1,destructive:l=!1,icon:n,secondaryText:a,checked:r,children:i}){let o=S.useContext(Qr),c=r!==void 0;function u(){e==null||e(),o==null||o.close()}return s.jsxs("button",{type:"button",role:c?"menuitemradio":"menuitem",...c&&{"aria-checked":r},className:["ic-menu-item",l&&"destructive",t&&"disabled"].filter(Boolean).join(" "),disabled:t,onClick:u,children:[c&&s.jsx("span",{className:"ic-menu-item-icon","aria-hidden":"true",style:{visibility:r?"visible":"hidden"},children:s.jsx(Ct,{})}),n&&s.jsx("span",{className:"ic-menu-item-icon","aria-hidden":"true",children:n}),s.jsx("span",{className:"ic-menu-item-label",children:i}),a?s.jsx("span",{className:"ic-menu-item-secondary",children:a}):null]})}ie.displayName="MenuItem";function yu({icon:e,children:t,submenu:l}){let n=S.useContext(Qr),a=(n==null?void 0:n.activeSetOpenRef)??null,[r,i]=S.useState(!1),[o,c]=S.useState(),u=S.useRef(null),d=S.useRef(null),h=S.useRef(!1),f=S.useRef(null),{menuRef:_,position:y}=Wp(r,o),{handleMenuKeyDown:p}=Jp(_,()=>{var v;i(!1),(v=u.current)==null||v.focus()},!0);S.useEffect(()=>{var v,C;!r||!h.current||(h.current=!1,(C=(v=_.current)==null?void 0:v.querySelector(':is([role="menuitem"],[role="menuitemradio"],[role="menuitemcheckbox"]):not([disabled])'))==null||C.focus())},[r,_]),S.useEffect(()=>()=>{d.current&&clearTimeout(d.current),(a==null?void 0:a.current)===i&&(a.current=null)},[a]);function w(){var C;d.current&&clearTimeout(d.current),a!=null&&a.current&&a.current!==i&&a.current(!1),a&&(a.current=i);let v=(C=u.current)==null?void 0:C.getBoundingClientRect();v&&c({x:v.right+4,y:v.top-4,flipX:v.left-4,flipY:v.bottom+4}),i(!0)}function m(){d.current=setTimeout(()=>{i(!1),(a==null?void 0:a.current)===i&&(a.current=null)},150)}function g(){d.current&&clearTimeout(d.current)}function b(){i(!1),n==null||n.close()}return s.jsxs(s.Fragment,{children:[s.jsxs("button",{ref:u,type:"button",role:"menuitem",className:"ic-menu-item",onMouseEnter:w,onMouseLeave:m,onKeyDown:v=>{(v.key==="ArrowRight"||v.key==="Enter")&&(v.preventDefault(),h.current=!0,w())},"aria-haspopup":"menu","aria-expanded":r,children:[e?s.jsx("span",{className:"ic-menu-item-icon","aria-hidden":"true",children:e}):null,s.jsx("span",{className:"ic-menu-item-label",children:t}),s.jsx("span",{className:"ic-menu-item-icon","aria-hidden":"true",children:s.jsx(Mo,{})})]}),r?ul.createPortal(s.jsx(Qr.Provider,{value:{close:b,activeSetOpenRef:f},children:s.jsx("div",{ref:_,role:"presentation",className:"ic-menu-wrapper",style:y,children:s.jsx("div",{role:"menu",className:"ic-menu",onMouseEnter:g,onMouseLeave:m,onKeyDown:v=>{v.stopPropagation(),p(v)},children:l})})}),document.body):null]})}yu.displayName="MenuItemWithSubmenu";function Wx(e){return["#FFF","#FFFFFF"].includes(e)}var Jx=({onSheetSelected:e,sheetOptionsList:t,selectedIndex:l})=>{let n=S.useRef(null),a=t.some(r=>!Wx(r.color));return S.useEffect(()=>{let r=requestAnimationFrame(()=>{var i,o,c;(c=(o=(i=n.current)==null?void 0:i.querySelectorAll('[role="menuitemradio"]'))==null?void 0:o[l])==null||c.focus()});return()=>cancelAnimationFrame(r)},[l]),s.jsx("div",{ref:n,children:t.map((r,i)=>s.jsx(ie,{checked:i===l,icon:a?s.jsx("span",{className:"ic-sheet-list-menu-color",style:{backgroundColor:r.color}}):void 0,onClick:()=>e(i),children:s.jsx("span",{className:[i===l&&"ic-sheet-list-menu-name--selected",r.state!=="visible"&&"ic-sheet-list-menu-name--hidden"].filter(Boolean).join(" ")||void 0,children:r.name})},r.sheetId))})};function Ix({open:e,onClose:t,onDelete:l,sheetName:n}){let{t:a}=be();return s.jsx(Mp,{open:e,onClose:t,onConfirm:l,title:a("sheet_delete.title"),message:a("sheet_delete.message",{sheetName:n}),confirmLabel:a("sheet_delete.confirm"),cancelLabel:a("sheet_delete.cancel"),variant:"destructive"})}function ut(){return s.jsx("hr",{className:"ic-menu-divider"})}ut.displayName="MenuDivider";function Px({canDelete:e,onStartEditing:t,onOpenColorPicker:l,onHideSheet:n,onDeleteSheet:a}){let{t:r}=be();return s.jsxs(s.Fragment,{children:[s.jsx(ie,{icon:s.jsx($2,{}),onClick:t,children:r("sheet_tab.rename")}),s.jsx(ie,{icon:s.jsx(jd,{}),onClick:l,children:r("sheet_tab.change_color")}),s.jsx(ie,{icon:s.jsx(Sd,{}),disabled:!e,onClick:n,children:r("sheet_tab.hide_sheet")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Yn,{}),disabled:!e,destructive:!0,onClick:a,children:r("sheet_tab.delete")})]})}function eS(e){let{name:t,color:l,selected:n,workbookState:a,onSelected:r}=e,{t:i}=be(),[o,c]=S.useState(!1),[u,d]=S.useState({x:0,y:0}),[h,f]=S.useState(!1),[_,y]=S.useState(!1),[p,w]=S.useState(!1),[m,g]=S.useState(t),[b,v]=S.useState(0),C=S.useRef(null),k=S.useRef(null),E=S.useRef(null),D=S.useRef(null);S.useEffect(()=>{p&&E.current&&(E.current.focus(),E.current.select())},[p]),S.useEffect(()=>{p||g(t)},[t,p]),S.useLayoutEffect(()=>{if(p&&D.current){let R=D.current.offsetWidth;v(Math.max(R+8,6))}},[m,p]);function M(){var q;let R=(q=C.current)==null?void 0:q.getBoundingClientRect();return R?{x:R.right-24,y:R.top}:{x:0,y:0}}let x=R=>{R.stopPropagation(),R.preventDefault(),o?(c(!1),requestAnimationFrame(()=>{var q;return(q=k.current)==null?void 0:q.focus()})):(r(),d(M()),c(!0))},O=R=>{R.preventDefault(),R.stopPropagation(),r(),d(M()),c(!0)},z=()=>{c(!1),requestAnimationFrame(()=>{var R;return(R=k.current)==null?void 0:R.focus()})},U=()=>{g(t),v(Math.max(t.length*7+8,6)),w(!0)},V=()=>{m.trim()===""?(g(t),w(!1)):(e.onRenamed(m.trim()),w(!1))},G=()=>{g(t),w(!1)};return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:`ic-sheet-tab${n?" ic-sheet-tab--selected":""}`,style:{borderBottomColor:l},role:"tab",tabIndex:n?0:-1,"aria-selected":n,onClick:R=>{p||r(),R.stopPropagation(),R.preventDefault()},onKeyDown:R=>{},onDoubleClick:R=>{R.stopPropagation(),R.preventDefault(),U()},onContextMenu:O,onPointerDown:R=>{let q=a.getEditingCell();q&&da(q.text,q.cursorStart)&&(R.stopPropagation(),R.preventDefault())},ref:C,children:p?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ic-sheet-tab-hidden-measure",ref:D,children:m||" "}),s.jsx("input",{ref:E,value:m,onChange:R=>g(R.target.value),style:{width:`${b}px`},className:"ic-sheet-tab-input","aria-label":i("sheet_tab.rename"),onKeyDown:R=>{R.key==="Enter"?(R.preventDefault(),V()):R.key==="Escape"&&(R.preventDefault(),G()),R.stopPropagation()},onBlur:()=>{V()},onClick:R=>R.stopPropagation(),spellCheck:!1}),s.jsx("button",{className:"ic-sheet-tab-menu-button",disabled:!0,type:"button","aria-hidden":"true",children:s.jsx(Un,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ic-sheet-tab-name",children:t}),s.jsx("button",{ref:k,className:`ic-sheet-tab-menu-button${o?" ic-sheet-tab-menu-button--active":""}`,onClick:x,type:"button","aria-label":i("sheet_tab.open_menu"),"aria-haspopup":"menu","aria-expanded":o,children:s.jsx(Un,{})})]})}),s.jsx(Kn,{open:o,onClose:z,anchorPosition:u,children:s.jsx(Px,{canDelete:e.canDelete,onStartEditing:U,onOpenColorPicker:()=>f(!0),onHideSheet:e.onHideSheet,onDeleteSheet:()=>y(!0)})}),s.jsx(cl,{color:l,defaultColor:"#FFFFFF",title:i("color_picker.no_fill"),onChange:R=>{e.onColorChanged(R),f(!1)},onClose:()=>{f(!1)},anchorEl:C,open:h,placement:"top"}),s.jsx(Ix,{open:_,onClose:()=>y(!1),onDelete:()=>{e.onDeleted(),y(!1)},sheetName:t})]})}function tS(e){let{t}=be(),{workbookState:l,onSheetSelected:n,sheets:a,selectedIndex:r}=e,i=a.map((o,c)=>({state:o.state,index:c,name:o.name,color:o.color,sheetId:o.sheetId})).filter(o=>o.state==="visible");return s.jsxs("div",{className:"ic-sheet-tab-bar-container",children:[s.jsxs("div",{className:"ic-sheet-tab-bar-left-buttons-container",children:[s.jsx(I,{title:t("navigation.add_sheet"),children:s.jsx(X,{"aria-label":t("navigation.add_sheet"),icon:s.jsx(sl,{}),onClick:e.onAddBlankSheet})}),s.jsx(I,{title:t("navigation.sheet_list"),children:s.jsx(Kn,{trigger:s.jsx(X,{"aria-label":t("navigation.sheet_list"),icon:s.jsx(u2,{})}),children:s.jsx(Jx,{sheetOptionsList:a,onSheetSelected:n,selectedIndex:r})})})]}),s.jsx("div",{className:"ic-sheet-tab-bar-vertical-divider"}),s.jsx("div",{className:"ic-sheet-tab-bar-sheets",children:s.jsx("div",{className:"ic-sheet-tab-bar-sheet-inner",children:i.map(o=>s.jsx(eS,{name:o.name,color:o.color,selected:o.index===r,onSelected:()=>n(o.index),onColorChanged:c=>{e.onSheetColorChanged(c)},onRenamed:c=>{e.onSheetRenamed(c)},canDelete:i.length>1,onDeleted:()=>{e.onSheetDeleted()},onHideSheet:e.onHideSheet,workbookState:l},o.sheetId))})}),s.jsx("div",{className:"ic-sheet-tab-bar-right-container",children:s.jsx(I,{title:t("regional_settings.open_regional_settings"),children:s.jsxs(ye,{style:{color:"var(--palette-grey-600)"},variant:"ghost",size:"sm",onClick:()=>{e.onOpenRegionalSettings()},children:[pu(e.model.getLocale()),s.jsx("div",{className:"ic-sheet-tab-bar-text-divider"}),t(`regional_settings.language.display_language.${e.model.getLanguage()}`)]})})})]})}var lS=[{value:Rt.Thin,previewClassName:"thin"},{value:Rt.Medium,previewClassName:"medium"},{value:Rt.Thick,previewClassName:"thick"},{value:Rt.Double,previewClassName:"double"},{value:Rt.Dotted,previewClassName:"dotted"},{value:Rt.MediumDashed,previewClassName:"medium-dashed"},{value:Rt.SlantDashDot,previewClassName:"slant-dash-dot"},{value:Rt.MediumDashDot,previewClassName:"medium-dash-dot"},{value:Rt.MediumDashDotDot,previewClassName:"medium-dash-dot-dot"}];function nS({value:e,onSelect:t}){return s.jsx("div",{className:"ic-line-style-picker",children:lS.map(l=>s.jsx("button",{type:"button",className:e===l.value?"ic-border-picker__button selected":"ic-border-picker__button",onClick:()=>t(l.value),children:s.jsx("span",{className:l.previewClassName})},l.value))})}var rc="#272525",Wh=[{value:Ge.All,labelKey:"toolbar.borders.all",icon:xp,offValue:null},{value:Ge.Inner,labelKey:"toolbar.borders.inner",icon:rw,offValue:null},{value:Ge.CenterH,labelKey:"toolbar.borders.horizontal",icon:nw,offValue:null},{value:Ge.CenterV,labelKey:"toolbar.borders.vertical",icon:aw,offValue:null},{value:Ge.Outer,labelKey:"toolbar.borders.outer",icon:sw,offValue:Ge.None},{value:Ge.None,labelKey:"toolbar.borders.clear",icon:ow,offValue:Ge.None},{value:Ge.Top,labelKey:"toolbar.borders.top",icon:uw,offValue:Ge.None},{value:Ge.Right,labelKey:"toolbar.borders.right",icon:cw,offValue:Ge.None},{value:Ge.Bottom,labelKey:"toolbar.borders.bottom",icon:lw,offValue:Ge.None},{value:Ge.Left,labelKey:"toolbar.borders.left",icon:iw,offValue:Ge.None}];function aS({onChange:e,onClose:t,anchorEl:l,open:n}){let{t:a}=be(),r=S.useRef(null),i=S.useRef(null),[o,c]=S.useState(null),[u,d]=S.useState(null),[h,f]=S.useState(rc),[_,y]=S.useState(Rt.Thin),[p,w]=S.useState(!1),[m,g]=S.useState(!1);S.useLayoutEffect(()=>{if(!n||!l.current)return;let v=()=>{if(!l.current)return;let C=l.current.getBoundingClientRect();c({top:C.bottom+4,left:C.left-4})};return v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0)}},[l,n]),S.useEffect(()=>{u&&e({color:h,style:_,border:u})},[h,_,u,e]),S.useEffect(()=>{if(!n)return;let v=C=>{if(C.key==="Escape"){if(C.preventDefault(),C.stopPropagation(),p){w(!1);return}if(m){g(!1);return}t()}C.preventDefault(),C.stopPropagation()};return document.addEventListener("keydown",v,!0),()=>{document.removeEventListener("keydown",v,!0)}},[n,t,p,m]),S.useEffect(()=>{n||(d(null),f(rc),y(Rt.Thin),w(!1),g(!1))},[n]),S.useEffect(()=>{if(!n)return;let v=C=>{var E;let k=C.target;k&&((E=r.current)!=null&&E.contains(k))||p||t()};return document.addEventListener("pointerdown",v,!0),()=>{document.removeEventListener("pointerdown",v,!0)}},[n,t,p]);let b=(v,C)=>{d(k=>k===v?C:v)};return!n||!l.current?null:s.jsxs("div",{ref:r,className:"ic-border-picker",style:o?{top:`${o.top}px`,left:`${o.left}px`}:void 0,children:[s.jsxs("div",{className:"ic-border-picker__borders",children:[s.jsx("div",{className:"row",children:Wh.slice(0,5).map(v=>{let C=v.icon,k=v.value;return s.jsx(X,{pressed:u===k,"aria-label":a(v.labelKey),title:a(v.labelKey),icon:s.jsx(C,{}),onClick:()=>b(k,v.offValue)},k)})}),s.jsx("div",{className:"row",children:Wh.slice(5).map(v=>{let C=v.icon,k=v.value;return s.jsx(X,{pressed:u===k,"aria-label":a(v.labelKey),title:a(v.labelKey),icon:s.jsx(C,{}),onClick:()=>{if(k===Ge.None){d(Ge.None);return}b(k,v.offValue)}},k)})})]}),s.jsx("div",{className:"divider"}),s.jsxs("div",{className:"ic-border-picker__menu",children:[s.jsxs("div",{className:"ic-border-picker__submenu-anchor",onClick:()=>w(v=>!v),children:[s.jsxs("button",{ref:i,type:"button",className:"ic-border-picker__button",children:[s.jsx(as,{}),s.jsx("span",{children:a("toolbar.borders.color")}),s.jsx(Mo,{})]}),s.jsx(cl,{color:h,defaultColor:rc,title:a("color_picker.default"),onChange:v=>{f(v),w(!1)},onClose:()=>{w(!1)},anchorEl:i,open:p,placement:"right"})]}),s.jsxs("div",{className:"ic-border-picker__submenu-anchor",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[s.jsxs("button",{type:"button",className:"ic-border-picker__button",children:[s.jsx(s2,{}),s.jsx("span",{children:a("toolbar.borders.style")}),s.jsx(Mo,{})]}),m&&s.jsx(nS,{value:_,onSelect:v=>{y(v),g(!1)}})]})]})]})}var rS=e=>{let{t}=be();return s.jsx(Lp,{open:e.open,onClose:e.onClose,onSubmit:e.onChange,title:t("num_fmt.title"),className:e.className,defaultValue:e.numFmt,cancelLabel:t("num_fmt.cancel"),confirmLabel:t("num_fmt.save"),closeLabel:t("num_fmt.close")})};function iS({numFmt:e,onChange:t,formatOptions:l,onOpenPicker:n,previousFocusedElementRef:a}){let{t:r}=be();function i(w){t(w);let m=a.current;requestAnimationFrame(()=>m==null?void 0:m.focus())}let o=e===Ve.AUTO,c=e===l.number_fmt,u=e===Ve.PERCENTAGE,d=e===Ve.CURRENCY_EUR,h=e===Ve.CURRENCY_USD,f=e===Ve.CURRENCY_GBP,_=e===l.short_date,y=e===l.long_date,p=!(o||c||u||d||h||f||_||y);return s.jsxs(s.Fragment,{children:[s.jsx(ie,{checked:o,onClick:()=>i(Ve.AUTO),children:r("toolbar.format_menu.auto")}),s.jsx(ut,{}),s.jsx(ie,{checked:c,onClick:()=>i(l.number_fmt),secondaryText:l.number_example,children:r("toolbar.format_menu.number")}),s.jsx(ie,{checked:u,onClick:()=>i(Ve.PERCENTAGE),secondaryText:r("toolbar.format_menu.percentage_example"),children:r("toolbar.format_menu.percentage")}),s.jsx(ut,{}),s.jsx(ie,{checked:d,onClick:()=>i(Ve.CURRENCY_EUR),secondaryText:r("toolbar.format_menu.currency_eur_example"),children:r("toolbar.format_menu.currency_eur")}),s.jsx(ie,{checked:h,onClick:()=>i(Ve.CURRENCY_USD),secondaryText:r("toolbar.format_menu.currency_usd_example"),children:r("toolbar.format_menu.currency_usd")}),s.jsx(ie,{checked:f,onClick:()=>i(Ve.CURRENCY_GBP),secondaryText:r("toolbar.format_menu.currency_gbp_example"),children:r("toolbar.format_menu.currency_gbp")}),s.jsx(ut,{}),s.jsx(ie,{checked:_,onClick:()=>i(l.short_date),secondaryText:l.short_date_example,children:r("toolbar.format_menu.date_short")}),s.jsx(ie,{checked:y,onClick:()=>i(l.long_date),secondaryText:l.long_date_example,children:r("toolbar.format_menu.date_long")}),s.jsx(ut,{}),s.jsx(ie,{checked:p,onClick:n,children:r("toolbar.format_menu.custom")})]})}var oS=e=>{let[t,l]=S.useState(!1),n=S.useRef(null);return s.jsxs("div",{className:"ic-format-menu-root",children:[s.jsx(Kn,{trigger:s.jsx("div",{className:"ic-format-menu-anchor",onMouseDownCapture:()=>{n.current=document.activeElement},children:e.children}),children:s.jsx(iS,{numFmt:e.numFmt,onChange:e.onChange,formatOptions:e.formatOptions,onOpenPicker:()=>l(!0),previousFocusedElementRef:n})}),s.jsx(rS,{numFmt:e.numFmt,onChange:a=>{e.onChange(a),requestAnimationFrame(()=>{var r;return(r=n.current)==null?void 0:r.focus()})},open:t,onClose:()=>l(!1)})]})};function sS(e){let[t,l]=S.useState(!1),[n,a]=S.useState(!1),[r,i]=S.useState(!1),[o,c]=S.useState(!1),[u,d]=S.useState(!1),h=S.useRef(null),f=S.useRef(null),_=S.useRef(null),y=S.useRef(null),{t:p}=be(),{canEdit:w}=e,m=()=>{var C;return(C=y.current)==null?void 0:C.scrollBy({left:-200,behavior:"smooth"})},g=()=>{var C;return(C=y.current)==null?void 0:C.scrollBy({left:200,behavior:"smooth"})},b=S.useCallback(()=>{if(!y.current)return;let{scrollLeft:C,scrollWidth:k,clientWidth:E}=y.current;c(C>0),d(C<k-E)},[]);S.useEffect(()=>{let C=y.current;if(C)return b(),C.addEventListener("scroll",b),()=>C.removeEventListener("scroll",b)},[b]);let v;switch(e.formatOptions.currency){case"EUR":v=s.jsx(Kv,{});break;case"USD":v=s.jsx(Gv,{});break;case"GBP":v=s.jsx(w2,{});break}return s.jsxs("div",{className:"ic-toolbar-wrapper",children:[s.jsxs("div",{className:"ic-toolbar-container",ref:y,children:[s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.undo"),children:s.jsx(X,{icon:s.jsx(P2,{}),"aria-label":p("toolbar.undo"),onClick:e.onUndo,disabled:!e.canUndo})}),s.jsx(I,{title:p("toolbar.redo"),children:s.jsx(X,{icon:s.jsx(S2,{}),"aria-label":p("toolbar.redo"),onClick:e.onRedo,disabled:!e.canRedo})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.copy_styles"),children:s.jsx(X,{icon:s.jsx(g2,{}),"aria-label":p("toolbar.copy_styles"),onClick:e.onCopyStyles})}),s.jsx(I,{title:p("toolbar.clear_formatting"),children:s.jsx(X,{icon:s.jsx(jp,{}),"aria-label":p("toolbar.clear_formatting"),onClick:()=>{e.onClearFormatting()},disabled:!w})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.currency"),children:s.jsx(X,{icon:v,"aria-label":p("toolbar.currency"),onClick:()=>{e.onNumberFormatPicked(e.formatOptions.currency_format)},disabled:!w})}),s.jsx(I,{title:p("toolbar.percentage"),children:s.jsx(X,{icon:s.jsx(y2,{}),"aria-label":p("toolbar.percentage"),onClick:()=>{e.onNumberFormatPicked(Ve.PERCENTAGE)},disabled:!w})}),s.jsx(I,{title:p("toolbar.decimal_places_decrease"),children:s.jsx(X,{icon:s.jsx(Hv,{}),"aria-label":p("toolbar.decimal_places_decrease"),onClick:()=>{e.onNumberFormatPicked(Lx(e.numFmt))},disabled:!w})}),s.jsx(I,{title:p("toolbar.decimal_places_increase"),children:s.jsx(X,{icon:s.jsx(Vv,{}),"aria-label":p("toolbar.decimal_places_increase"),onClick:()=>{e.onNumberFormatPicked(Mx(e.numFmt))},disabled:!w})}),s.jsx(oS,{numFmt:e.numFmt,onChange:C=>{e.onNumberFormatPicked(C)},formatOptions:e.formatOptions,children:s.jsx(I,{title:p("toolbar.format_number"),children:s.jsx(ye,{variant:"ghost",size:"sm",disabled:!w,style:{gap:0,paddingLeft:4,paddingRight:2},endIcon:s.jsx(Un,{size:12}),children:"123"})})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.decrease_font_size"),children:s.jsx(X,{icon:s.jsx(Cd,{}),"aria-label":p("toolbar.decrease_font_size"),onClick:()=>{e.onIncreaseFontSize(-1)},disabled:!w})}),s.jsx("div",{className:"ic-toolbar-font-size-box",children:e.fontSize}),s.jsx(I,{title:p("toolbar.increase_font_size"),children:s.jsx(X,{icon:s.jsx(sl,{}),"aria-label":p("toolbar.increase_font_size"),onClick:()=>{e.onIncreaseFontSize(1)},disabled:!w})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.bold"),children:s.jsx(X,{icon:s.jsx(yp,{}),"aria-label":p("toolbar.bold"),pressed:e.bold,onClick:()=>e.onToggleBold(!e.bold),disabled:!w})}),s.jsx(I,{title:p("toolbar.italic"),children:s.jsx(X,{icon:s.jsx(Sp,{}),"aria-label":p("toolbar.italic"),pressed:e.italic,onClick:()=>e.onToggleItalic(!e.italic),disabled:!w})}),s.jsx(I,{title:p("toolbar.underline"),children:s.jsx(X,{icon:s.jsx(zp,{}),"aria-label":p("toolbar.underline"),pressed:e.underline,onClick:()=>e.onToggleUnderline(!e.underline),disabled:!w})}),s.jsx(I,{title:p("toolbar.strike_through"),children:s.jsx(X,{icon:s.jsx(kp,{}),"aria-label":p("toolbar.strike_through"),pressed:e.strike,onClick:()=>e.onToggleStrike(!e.strike),disabled:!w})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.font_color"),children:s.jsx(X,{type:"button",pressed:!1,disabled:!w,ref:h,"aria-label":p("toolbar.font_color"),onClick:()=>l(!0),icon:s.jsxs(s.Fragment,{children:[s.jsx(Rp,{}),s.jsx("div",{className:"ic-toolbar-color-line",style:{backgroundColor:e.fontColor}})]})})}),s.jsx(I,{title:p("toolbar.fill_color"),children:s.jsx(X,{type:"button",pressed:!1,disabled:!w,ref:f,"aria-label":p("toolbar.fill_color"),onClick:()=>a(!0),icon:s.jsxs(s.Fragment,{children:[s.jsx(jd,{}),s.jsx("div",{className:"ic-toolbar-color-line",style:{backgroundColor:e.fillColor}})]})})}),s.jsx(I,{title:p("toolbar.borders.title"),children:s.jsx(X,{type:"button",pressed:r,ref:_,"aria-label":p("toolbar.borders.title"),onClick:()=>i(!0),disabled:!w,icon:s.jsx(xp,{})})}),s.jsx(I,{title:p("toolbar.conditional_formatting"),children:s.jsx(X,{icon:s.jsx(jv,{}),"aria-label":p("toolbar.conditional_formatting"),pressed:e.isConditionalFormattingOpen,onClick:e.onOpenConditionalFormatting,disabled:!w})}),s.jsx(I,{title:p("toolbar.named_styles"),children:s.jsx(X,{icon:s.jsx(i2,{}),"aria-label":p("toolbar.named_styles"),pressed:e.isNamedStylesOpen,onClick:e.onOpenNamedStyles,disabled:!w})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.align_left"),children:s.jsx(X,{icon:s.jsx(V2,{}),"aria-label":p("toolbar.align_left"),pressed:e.horizontalAlign==="left",onClick:()=>e.onToggleHorizontalAlign(e.horizontalAlign==="left"?"general":"left"),disabled:!w})}),s.jsx(I,{title:p("toolbar.align_center"),children:s.jsx(X,{icon:s.jsx(H2,{}),"aria-label":p("toolbar.align_center"),pressed:e.horizontalAlign==="center",onClick:()=>e.onToggleHorizontalAlign(e.horizontalAlign==="center"?"general":"center"),disabled:!w})}),s.jsx(I,{title:p("toolbar.align_right"),children:s.jsx(X,{icon:s.jsx(B2,{}),"aria-label":p("toolbar.align_right"),pressed:e.horizontalAlign==="right",onClick:()=>e.onToggleHorizontalAlign(e.horizontalAlign==="right"?"general":"right"),disabled:!w})}),s.jsx(I,{title:p("toolbar.vertical_align_top"),children:s.jsx(X,{icon:s.jsx(wv,{}),"aria-label":p("toolbar.vertical_align_top"),pressed:e.verticalAlign==="top",onClick:()=>e.onToggleVerticalAlign("top"),disabled:!w})}),s.jsx(I,{title:p("toolbar.vertical_align_middle"),children:s.jsx(X,{icon:s.jsx(tw,{}),"aria-label":p("toolbar.vertical_align_middle"),pressed:e.verticalAlign==="center",onClick:()=>e.onToggleVerticalAlign("center"),disabled:!w})}),s.jsx(I,{title:p("toolbar.vertical_align_bottom"),children:s.jsx(X,{icon:s.jsx(gv,{}),"aria-label":p("toolbar.vertical_align_bottom"),pressed:e.verticalAlign==="bottom",onClick:()=>e.onToggleVerticalAlign("bottom"),disabled:!w})}),s.jsx(I,{title:p("toolbar.wrap_text"),children:s.jsx(X,{icon:s.jsx(Y2,{}),"aria-label":p("toolbar.wrap_text"),pressed:e.wrapText,onClick:()=>e.onToggleWrapText(!e.wrapText),disabled:!w})})]}),s.jsx("div",{className:"ic-toolbar-divider"}),s.jsxs("div",{className:"ic-toolbar-button-group",children:[s.jsx(I,{title:p("toolbar.selected_png"),children:s.jsx(X,{icon:s.jsx(n2,{}),"aria-label":p("toolbar.download_png"),onClick:()=>e.onDownloadPNG(),disabled:!w})}),s.jsx(I,{title:p("toolbar.show_hide_grid_lines"),children:s.jsx(X,{icon:e.showGridLines?s.jsx(Jv,{}):s.jsx(Pv,{}),"aria-label":p("toolbar.show_hide_grid_lines"),onClick:()=>e.onToggleShowGridLines(!e.showGridLines),disabled:!w})})]}),s.jsx(cl,{color:e.fontColor,defaultColor:"#000000",title:p("color_picker.default"),onChange:C=>{e.onTextColorPicked(C),l(!1)},onClose:()=>{l(!1)},anchorEl:h,open:t}),s.jsx(cl,{color:e.fillColor,defaultColor:"",title:p("color_picker.default"),onChange:C=>{C!==null&&e.onFillColorPicked(C),a(!1)},onClose:()=>{a(!1)},anchorEl:f,open:n}),s.jsx(aS,{onChange:C=>{e.onBorderChanged(C)},onClose:()=>{i(!1)},anchorEl:_,open:r})]}),o&&s.jsx("div",{className:"ic-toolbar-scroll-arrow ic-toolbar-scroll-arrow--left",onClick:m,children:s.jsx(I,{title:p("toolbar.scroll_left"),children:s.jsx(Av,{})})}),u&&s.jsx("div",{className:"ic-toolbar-scroll-arrow ic-toolbar-scroll-arrow--right",onClick:g,children:s.jsx(I,{title:p("toolbar.scroll_right"),children:s.jsx(Mo,{})})})]})}var cS={ArrowUp:{paths:["m5 12 7-7 7 7","M12 19V5"],stroke:!0},ArrowRight:{paths:["M5 12h14","m12 5 7 7-7 7"],stroke:!0},ArrowDown:{paths:["M12 5v14","m19 12-7 7-7-7"],stroke:!0},ArrowAngleUp:{paths:["M7 7h10v10","M7 17 17 7"],stroke:!0},ArrowAngleDown:{paths:["m7 7 10 10","M17 7v10H7"],stroke:!0},TriangleUp:{paths:["m18 15-6-6-6 6"],stroke:!0,strokeWidth:2},TriangleDown:{paths:["m6 9 6 6 6-6"],stroke:!0,strokeWidth:2},TriangleUpFilled:{paths:["M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"],fill:!0},TriangleDownFilled:{paths:["M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"],fill:!0,flipY:!0},FlatRectangle:{paths:["M5 12h14"],stroke:!0,strokeWidth:3},Circle:{paths:["M2 12a10 10 0 1 0 20 0a10 10 0 1 0-20 0"],fill:!0},Rhombus:{paths:["M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0Z"],fill:!0},Flag:{paths:["M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2a8 8 0 0 1 4 1 8 8 0 0 0 4 1 6 6 0 0 0 2.8-.7 1 1 0 0 1 1.2.15 1 1 0 0 1 0 .85V13a1 1 0 0 1-.6.9A6 6 0 0 1 16 14a8 8 0 0 1-4-1 8 8 0 0 0-4-1 6 6 0 0 0-4 1.4"],fill:!0,stroke:!0},Check:{paths:["M20 6 9 17l-5-5"],stroke:!0,strokeWidth:2},Cross:{paths:["M18 6 6 18","m6 6 12 12"],stroke:!0,strokeWidth:2},Exclamation:{paths:["M2 12a10 10 0 1 0 20 0a10 10 0 1 0-20 0","M12 8v4","M12 16h.01"],stroke:!0},Heart:{paths:["M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"],fill:!0},ThumbsUp:{paths:["M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z","M7 10v12"],stroke:!0},ThumbsDown:{paths:["M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z","M17 14V2"],stroke:!0},Star:{paths:["M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"],stroke:!1}},Ip=3;function yt(e,t,l,n,a){e.beginPath(),e.moveTo(t,l),e.lineTo(n,a),e.stroke()}function Jh(e,t,l,n,a,r,i,o){switch(e.save(),e.strokeStyle=l,t){case"thin":e.lineWidth=1,yt(e,n,a,r,i);break;case"medium":e.lineWidth=2,yt(e,n,a,r,i);break;case"thick":e.lineWidth=3,yt(e,n,a,r,i);break;case"double":e.lineWidth=1,o?(yt(e,n-1,a,n-1,i),yt(e,n+1,a,n+1,i)):(yt(e,n,a-1,r,a-1),yt(e,n,a+1,r,a+1));break;case"dotted":e.lineWidth=1,e.setLineDash([1,2]),yt(e,n,a,r,i),e.setLineDash([]);break;case"mediumdashed":e.lineWidth=2,e.setLineDash([4,2]),yt(e,n,a,r,i),e.setLineDash([]);break;case"slantdashdot":e.lineWidth=1,e.setLineDash([4,2,1,2]),yt(e,n,a,r,i),e.setLineDash([]);break;case"mediumdashdot":e.lineWidth=2,e.setLineDash([4,2,1,2]),yt(e,n,a,r,i),e.setLineDash([]);break;case"mediumdashdotdot":e.lineWidth=2,e.setLineDash([4,2,1,2,1,2]),yt(e,n,a,r,i),e.setLineDash([]);break;case"dashed":e.lineWidth=1,e.setLineDash([4,2]),yt(e,n,a,r,i),e.setLineDash([]);break;default:e.lineWidth=1,yt(e,n,a,r,i)}e.restore()}function Ih(e,t){let l=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16),r=Math.round(l+(255-l)*t),i=Math.round(n+(255-n)*t),o=Math.round(a+(255-a)*t);return`#${r.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}`}function uS(e,t,l,n,a,r){let{value:i,axis_position:o,positive_color:c,negative_color:u,is_gradient:d}=r,h=Math.max(2,Math.round(a*.15)),f=l+h,_=a-2*h,y=t+Math.round(o*n);if(e.save(),i>=o){let p=y,w=t+Math.round(i*n),m=Math.max(0,w-p);if(m>0){if(d&&m>1){let g=e.createLinearGradient(p,0,w,0);g.addColorStop(0,Ih(c,.6)),g.addColorStop(1,c),e.fillStyle=g}else e.fillStyle=c;e.fillRect(p,f,m,_)}}else{let p=t+Math.round(i*n),w=y,m=Math.max(0,w-p);if(m>0){if(d&&m>1){let g=e.createLinearGradient(p,0,w,0);g.addColorStop(0,u),g.addColorStop(1,Ih(u,.6)),e.fillStyle=g}else e.fillStyle=u;e.fillRect(p,f,m,_)}}e.restore()}function Pp(e,t,l,n,a,r){let i=cS[t];if(!i)return;let o=r/24;e.save(),e.translate(n-r/2,a-r/2),e.scale(o,o),i.flipY&&(e.translate(0,24),e.scale(1,-1)),e.strokeStyle=l,e.fillStyle=l,e.lineWidth=(i.strokeWidth??1.5)/o,e.lineCap="round",e.lineJoin="round";for(let c of i.paths){let u=new Path2D(c);(i.fill??!i.stroke)&&e.fill(u),i.stroke&&e.stroke(u)}e.restore()}function dS(e,t,l,n,a,r){e.save(),Pp(e,a.icon,a.color,t+Ip+r/2,l+n/2,r),e.restore()}function fS(e,t,l,n,a,r){e.save();for(let i=0;i<a.count;i++)Pp(e,a.icon,a.color,t+Ip+r/2+i*r,l+n/2,r);e.restore()}var Gl=function(e){return e[e.rowsDown=0]="rowsDown",e[e.columnsRight=1]="columnsRight",e[e.rowsUp=2]="rowsUp",e[e.columnsLeft=3]="columnsLeft",e}({}),hS=class{constructor(){Se(this,"extendToArea");Se(this,"copyStyles");Se(this,"cell");Se(this,"cutRange");Se(this,"selecting");this.extendToArea=null,this.copyStyles=null,this.cell=null,this.cutRange=null,this.selecting=!1}isSelecting(){return this.selecting}setSelecting(e){this.selecting=e}getExtendToArea(){return this.extendToArea}clearExtendToArea(){this.extendToArea=null}setExtendToArea(e){this.extendToArea=e}setCopyStyles(e){this.copyStyles=e}getCopyStyles(){return this.copyStyles}setActiveRanges(e){this.cell&&(this.cell.activeRanges=e)}getActiveRanges(){var e;return((e=this.cell)==null?void 0:e.activeRanges)||[]}getEditingCell(){return this.cell}setEditingCell(e){this.cell=e}clearEditingCell(){this.cell=null}isCellEditorActive(){return this.cell?this.cell.focus==="cell":!1}isFormulaEditorActive(){return this.cell?this.cell.focus==="formula-bar":!1}getEditingText(){var t;let e=this.cell;return e?e.text+(((t=e.referencedRange)==null?void 0:t.str)||""):""}setCutRange(e){this.cutRange=e}clearCutRange(){this.cutRange=null}getCutRange(){return this.cutRange}};function mS(e){let t=e.canvas.parentElement;for(let r of t.querySelectorAll(".ironcalc-cell-handle"))r.remove();let l=document.createElement("div");l.className="ironcalc-cell-handle",t.appendChild(l),e.cellOutlineHandle=l;let n=r=>{let i=e.canvas.getBoundingClientRect(),o=r.clientX-i.x,c=r.clientY-i.y,u=e.getCellByCoordinates(o,c);if(!u)return;let{row:d,column:h}=u,{range:[f,_,y,p]}=e.model.getSelectedView();if(d>y&&(h<=p&&h>=_||h<_&&_-h<d-y||h>p&&h-p<d-y)){let w={type:Gl.rowsDown,rowStart:y+1,rowEnd:d,columnStart:_,columnEnd:p};e.workbookState.setExtendToArea(w),e.renderSheet()}else if(d<f&&(h<=p&&h>=_||h<_&&_-h<f-d||h>p&&h-p<f-d)){let w={type:Gl.rowsUp,rowStart:d,rowEnd:f,columnStart:_,columnEnd:p};e.workbookState.setExtendToArea(w),e.renderSheet()}else if(h>p&&(d<=y&&d>=f||d<f&&f-d<h-p||d>y&&d-y<h-p)){let w={type:Gl.columnsRight,rowStart:f,rowEnd:y,columnStart:p+1,columnEnd:h};e.workbookState.setExtendToArea(w),e.renderSheet()}else if(h<_&&(d<=y&&d>=f||d<f&&f-d<_-h||d>y&&d-y<_-h)){let w={type:Gl.columnsLeft,rowStart:f,rowEnd:y,columnStart:h,columnEnd:_};e.workbookState.setExtendToArea(w),e.renderSheet()}},a=r=>{document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",a);let{sheet:i,range:o}=e.model.getSelectedView(),c=e.workbookState.getExtendToArea();if(!c)return;let u=Math.min(o[0],o[2]),d=Math.abs(o[2]-o[0])+1,h=Math.abs(o[3]-o[1])+1,f=Math.min(o[1],o[3]),_={sheet:i,row:u,column:f,width:h,height:d};switch(c.type){case Gl.rowsDown:e.model.autoFillRows(_,c.rowEnd);break;case Gl.rowsUp:e.model.autoFillRows(_,c.rowStart);break;case Gl.columnsRight:e.model.autoFillColumns(_,c.columnEnd);break;case Gl.columnsLeft:e.model.autoFillColumns(_,c.columnStart);break}let y=Math.min(u,c.rowStart),p=Math.min(f,c.columnStart),w=Math.max(u+d-1,c.rowEnd),m=Math.max(f+h-1,c.columnEnd);e.model.setSelectedCell(y,p),e.model.setSelectedRange(y,p,w,m),e.workbookState.clearExtendToArea(),e.renderSheet()};return l.addEventListener("pointerdown",()=>{document.addEventListener("pointermove",n),document.addEventListener("pointerup",a)}),l.addEventListener("dblclick",r=>{r.stopPropagation(),r.preventDefault();let{sheet:i,range:o}=e.model.getSelectedView(),c=Math.min(o[0],o[2]),u=Math.max(o[0],o[2]),d=Math.min(o[1],o[3]),h=Math.max(o[1],o[3]),f=h-d+1,_=u-c+1,y=u,p=d-1;if((p<1||e.model.getFormattedCellValue(i,c,p)==="")&&(p=h+1,p>16384||e.model.getFormattedCellValue(i,c,p)===""))return;for(let m=u+1;m<=ol&&e.model.getFormattedCellValue(i,m,p)!=="";m+=1)y=m;for(let m=u+1;m<=y;m+=1){let g=!1;for(let b=d;b<=h;b+=1)if(e.model.getFormattedCellValue(i,m,b)!==""){g=!0;break}if(g){y=m-1;break}}if(y<=u)return;let w={sheet:i,row:c,column:d,width:f,height:_};e.model.autoFillRows(w,y),e.model.setSelectedRange(c,d,y,h),e.renderSheet()}),l}function gS(e){let t=e.replace(/^#/,"");return`rgba(${Number.parseInt(t.substring(0,2),16)}, ${Number.parseInt(t.substring(2,4),16)}, ${Number.parseInt(t.substring(4,6),16)}, 0.1)`}function Ph(e,t,l,n){let a=e.split(`
`);if(!t)return a;let r=[];for(let i of a){let o=i.split(" "),c=o[0];for(let u=1;u<o.length;u+=1){let d=o[u],h=`${c} ${d}`;l.measureText(h).width<n?c=h:(r.push(c),c=d)}r.push(c)}return r}function bt(e,t){return t.getPropertyValue(e).trim()}function _S(e){let t=getComputedStyle(e);return{backgroundColor:bt("--palette-common-white",t),commonWhite:bt("--palette-common-white",t),gridColor:bt("--palette-sheet-grid-color",t),cellFontFamily:bt("--palette-sheet-default-cell-font-family",t),primaryMain:bt("--palette-primary-main",t),headerTextColor:bt("--palette-sheet-header-text-color",t),headerBackground:bt("--palette-sheet-header-background",t),headerSelectedBackground:bt("--palette-sheet-header-selected-background",t),headerBorderColor:bt("--palette-sheet-header-border-color",t),outlineColor:bt("--palette-sheet-outline-color",t),headerFont:bt("--palette-sheet-header-font",t),gridSeparatorColor:bt("--palette-sheet-grid-separator-color",t),defaultTextColor:bt("--palette-sheet-default-text-color",t),headerSelectedColor:bt("--palette-sheet-header-selected-color",t)}}var ln=window.devicePixelRatio||1,pS=class{constructor(e){Se(this,"sheetWidth");Se(this,"sheetHeight");Se(this,"width");Se(this,"height");Se(this,"ctx");Se(this,"canvas");Se(this,"editor");Se(this,"areaOutline");Se(this,"cellArrayStructure");Se(this,"cellOutline");Se(this,"cellOutlineHandle");Se(this,"extendToOutline");Se(this,"workbookState");Se(this,"model");Se(this,"rowGuide");Se(this,"columnHeaders");Se(this,"columnGuide");Se(this,"onColumnWidthChanges");Se(this,"onRowHeightChanges");Se(this,"refresh");Se(this,"cells");Se(this,"spills");Se(this,"theme");this.model=e.model,this.sheetWidth=0,this.sheetHeight=0,this.canvas=e.elements.canvas,this.width=e.width,this.height=e.height,this.ctx=this.setContext(),this.workbookState=e.workbookState,this.editor=e.elements.editor,this.refresh=e.refresh;let t=this.canvas.closest(".ic-root")??document.documentElement;this.theme=_S(t),this.cellOutline=e.elements.cellOutline,this.cellArrayStructure=e.elements.cellArrayStructure,this.areaOutline=e.elements.areaOutline,this.extendToOutline=e.elements.extendToOutline,this.rowGuide=e.elements.rowGuide,this.columnGuide=e.elements.columnGuide,this.columnHeaders=e.elements.columnHeaders,this.onColumnWidthChanges=e.onColumnWidthChanges,this.onRowHeightChanges=e.onRowHeightChanges,this.resetHeaders(),this.cellOutlineHandle=mS(this),this.spills=new Map,this.cells=[]}setScrollPosition(e){let{column:t}=this.getBoundedColumn(e.left),{row:l}=this.getBoundedRow(e.top);this.model.setTopLeftVisibleCell(l,t)}resetHeaders(){for(let e of this.columnHeaders.querySelectorAll(".column-resize-handle"))e.remove();for(let e of this.columnHeaders.querySelectorAll(".frozen-column-separator"))e.remove();for(let e of this.columnHeaders.children)e.classList.add("column-header")}setContext(){let{canvas:e,width:t,height:l}=this,n=e.getContext("2d");if(!n)throw Error("This browser does not support 2-dimensional canvas rendering contexts.");return e.width=t*ln,e.height=l*ln,e.style.width=`${t}px`,e.style.height=`${l}px`,n.scale(ln,ln),n}setSize(e){this.width=e.width,this.height=e.height,this.ctx=this.setContext()}getFrozenRowsHeight(){let e=this.model.getFrozenRowsCount(this.model.getSelectedSheet());if(e===0)return 0;let t=0;for(let l=1;l<=e;l+=1)t+=this.getRowHeight(this.model.getSelectedSheet(),l);return t+3}getFrozenColumnsWidth(){let e=this.model.getFrozenColumnsCount(this.model.getSelectedSheet());if(e===0)return 0;let t=0;for(let l=1;l<=e;l+=1)t+=this.getColumnWidth(this.model.getSelectedSheet(),l);return t+3}getVisibleCells(){let e=this.model.getSelectedView(),t=e.sheet,l=this.model.getFrozenRowsCount(t),n=this.model.getFrozenColumnsCount(t),a=Math.max(l+1,e.top_row),r=a,i=Math.max(n+1,e.left_column),o=i,c=this.getFrozenColumnsWidth(),u=28+this.getFrozenRowsHeight();for(let h=a;h<=ol;h+=1){let f=this.getRowHeight(t,h);if(u>=this.height-f||h===1048576){r=h;break}u+=f}let d=30+c;for(let h=i;h<=It;h+=1){let f=this.getColumnWidth(t,h);if(d>=this.width-f||h===16384){o=h;break}d+=f}return{topLeftCell:{row:a,column:i},bottomRightCell:{row:r,column:o}}}getBoundedRow(e){let t=this.model.getSelectedSheet(),l=0,n=1+this.model.getFrozenRowsCount(t);for(;n<=1048576&&l<=e;){let a=this.getRowHeight(t,n);if(l+a<=e)l+=a;else break;n+=1}return{row:n,top:l}}getBoundedColumn(e){let t=0,l=this.model.getSelectedSheet(),n=1+this.model.getFrozenColumnsCount(l);for(;t<=e&&n<=16384;){let a=this.getColumnWidth(l,n);if(a+t<=e)t+=a;else break;n+=1}return{column:n,left:t}}getMinScrollLeft(e){let t=1+this.model.getFrozenColumnsCount(this.model.getSelectedSheet()),l=0;for(let r=t;r<=e;r+=1){let i=this.getColumnWidth(this.model.getSelectedSheet(),r);l+=i}let n=l-this.width+this.getFrozenColumnsWidth()+30,a=0;for(let r=t;r<=It;r+=1){let i=this.getColumnWidth(this.model.getSelectedSheet(),r);if(a<n)a+=i;else break}return a}getFontStyle(e){var a;let t=((a=e.font)==null?void 0:a.sz)||13,l=`${t}px ${this.theme.cellFontFamily}`,n=this.theme.defaultTextColor;return e.font&&(e.font.color&&(n=e.font.color),l=e.font.b?`bold ${l}`:`400 ${l}`,e.font.i&&(l=`italic ${l}`)),{font:l,color:n,fontSize:t}}getAlignment(e,t){var a,r;let l=((a=e.alignment)==null?void 0:a.horizontal)||"general",n=((r=e.alignment)==null?void 0:r.vertical)||"bottom";return l==="general"&&(l=t===1?"right":t===4?"center":"left"),{horizontal:l,vertical:n}}computeCellTextLeftRight(e,t,l,n,a){let r=this.model.getFrozenColumnsCount(e),i=this.model.getLastNonEmptyInRowBeforeColumn(e,t,n.column);if(i&&i>r){let c=this.getColumnWidth(e,i),[u,d]=this.getCoordinatesByCell(t,i);this.computeCellText(t,i,u,d,c,l)}let o=this.model.getFirstNonEmptyInRowAfterColumn(e,t,a.column);if(o){let c=this.getColumnWidth(e,o),[u,d]=this.getCoordinatesByCell(t,o);this.computeCellText(t,o,u,d,c,l)}}computeCellsText(){let{topLeftCell:e,bottomRightCell:t}=this.getVisibleCells(),l=this.model.getSelectedSheet();this.cells=[];let n=this.model.getFrozenColumnsCount(l),a=this.model.getFrozenRowsCount(l),r=30.5,i=28.5;for(let u=1;u<=a;u+=1){let d=this.getRowHeight(l,u);this.computeCellTextLeftRight(l,u,d,e,t),r=30.5;for(let h=1;h<=n;h+=1){let f=this.getColumnWidth(l,h);this.computeCellText(u,h,r,i,f,d),r+=f}i+=d}if(a===0&&n!==0){r=30.5;for(let u=1;u<=n;u+=1)r+=this.getColumnWidth(l,u)}a&&(i+=3),n&&(r+=3);let o=r,c=i;i=28.5;for(let u=1;u<=a;u+=1){r=o;let d=this.getRowHeight(l,u);for(let{column:h}=e;h<=t.column;h+=1){let f=this.getColumnWidth(l,h);this.computeCellText(u,h,r,i,f,d),r+=f}i+=d}i=c;for(let{row:u}=e;u<=t.row;u+=1){r=30;let d=this.getRowHeight(l,u);this.computeCellTextLeftRight(l,u,d,e,t);for(let h=1;h<=n;h+=1){let f=this.getColumnWidth(l,h);this.computeCellText(u,h,r,i,f,d),r+=f}i+=d}i=c;for(let{row:u}=e;u<=t.row;u+=1){r=o;let d=this.getRowHeight(l,u);for(let{column:h}=e;h<=t.column;h+=1){let f=this.getColumnWidth(l,h);this.computeCellText(u,h,r,i,f,d),r+=f}i+=d}}computeCellText(e,t,l,n,a,r){var U,V,G,R,q,Y;if(a<=0||r<=0)return;let i=this.model.getSelectedSheet(),o=this.model.getCellStyle(i,e,t),c=o.style;if(o.icon&&!o.icon.show_value||o.data_bar&&!o.data_bar.show_value||o.rating&&!o.rating.show_value)return;let{font:u,color:d,fontSize:h}=this.getFontStyle(c),f=this.model.getCellType(i,e,t),{horizontal:_,vertical:y}=this.getAlignment(c,f),p=((U=c.alignment)==null?void 0:U.wrap_text)||!1,w=this.ctx;w.font=u,w.fillStyle=d;let m=this.model.getFormattedCellValue(i,e,t),g=h*1.5,b=Ph(m,p,w,a-4),v=b.length,C=(V=o.rating)!=null&&V.show_value?o.rating.count*((G=c.font)!=null&&G.sz?c.font.sz*1.2:16):0,k=(R=o.icon)!=null&&R.show_value?20:C,E=l+k,D=l+a,M={row:e,column:t,x:E,y:n,width:a-k,height:r,fontSize:h,textColor:d,font:u,underlined:((q=c.font)==null?void 0:q.u)||!1,strike:((Y=c.font)==null?void 0:Y.strike)||!1,lines:[]};b.forEach((W,ne)=>{let he=w.measureText(W).width,Z,A;Z=_==="right"?a-4+l-he/2:_==="center"?l+a/2:4+l+he/2,A=y==="bottom"?n+r-h/2-4+(ne-v+1)*g:y==="center"?n+r/2+(ne+(1-v)/2)*g:n+h/2+4+ne*g,M.lines.push([W,Z,A,he]),E=Math.min(E,Z-he/2),D=Math.max(D,Z+he/2)});let x=l,O=l+a;if(D>O&&t<16384&&(this.model.getFormattedCellValue(i,e,t+1)===""||this.getColumnWidth(i,t+1)===0)){let W=t+1,ne=this.model.getFrozenColumnsCount(i);for(;O<D&&(this.model.getFormattedCellValue(i,e,W)===""||this.getColumnWidth(i,W)===0)&&W<=16384&&(t<ne&&W<=ne||t>ne);)O+=this.model.getColumnWidth(i,W),this.spills.set(`${e}-${W}`,1),W+=1}let z=this.model.getFrozenColumnsCount(i);if(E<x&&t>1&&(this.model.getFormattedCellValue(i,e,t-1)===""||this.getColumnWidth(i,t-1)===0)){let W=t-1;for(;x>E&&(this.model.getFormattedCellValue(i,e,W)===""||this.getColumnWidth(i,W)===0)&&W>=1&&(t<=z&&W<=z||t>z);)x-=this.getColumnWidth(i,W),this.spills.set(`${e}-${W+1}`,1),--W}if(z>0){let W=this.getCoordinatesByCell(e,z)[0]+this.getColumnWidth(i,z);t>z?x=Math.max(x,W):O=Math.min(O,W)}M.x=x,M.width=O-x,this.cells.push(M)}renderCellStyle(e,t,l,n,a,r){var p,w;if(a<=0||r<=0)return;let i=this.model.getSelectedSheet(),o=this.model.getCellStyle(i,e,t),c=o.style,u=this.theme.backgroundColor;c.fill.fg_color?u=c.fill.fg_color:c.fill.pattern_type==="solid"&&c.fill.bg_color&&(u=c.fill.bg_color);let d=this.model.getShowGridLines(i)?this.theme.gridColor:u,h=this.ctx;if(h.fillStyle=u,h.fillRect(l,n,a,r),o.data_bar&&uS(h,l,n,a,r,o.data_bar),o.icon){let m=(p=c.font)!=null&&p.sz?c.font.sz*1.2:16;dS(h,l,n,r,o.icon,m)}if(o.rating){let m=(w=c.font)!=null&&w.sz?c.font.sz*1.2:16;fS(h,l,n,r,o.rating,m)}let f=c.border;if(this.spills.get(`${e}-${t}`)!==1){let m=d,g="thin";if(f.left)m=f.left.color,g=f.left.style;else{let b=this.model.getCellStyle(i,e,t-1).style;b.border.right?(m=b.border.right.color,g=b.border.right.style):c.fill.fg_color?m=c.fill.fg_color:b.fill.fg_color&&(m=b.fill.fg_color)}Jh(h,g,m,l,n,l,n+r,!0)}let _=d,y="thin";if(f.top)_=f.top.color,y=f.top.style;else{let m=this.model.getCellStyle(i,e-1,t).style;m.border.bottom?(_=m.border.bottom.color,y=m.border.bottom.style):c.fill.fg_color?_=c.fill.fg_color:m.fill.fg_color&&(_=m.fill.fg_color)}Jh(h,y,_,l,n,l+a,n,!1)}renderCellText(e){let{x:t,y:l,width:n,height:a,font:r,underlined:i,strike:o,fontSize:c,textColor:u,lines:d}=e,h=this.ctx;h.font=r,h.fillStyle=u,h.save(),h.beginPath(),h.rect(t,l,n,a),h.clip(),d.forEach((f,_)=>{let[y,p,w,m]=f;if(h.fillText(y,p,w),i){let g=Math.floor(c/2);h.beginPath(),h.strokeStyle=u,h.lineWidth=1,h.moveTo(p-m/2,w+g),h.lineTo(p+m/2,w+g),h.stroke()}o&&(h.beginPath(),h.strokeStyle=u,h.lineWidth=1,h.moveTo(p-m/2,w),h.lineTo(p+m/2,w),h.stroke())}),h.restore()}addColumnResizeHandle(e,t,l){let n=document.createElement("div");n.className="column-resize-handle",n.style.left=`${e-1}px`,n.style.height="28px",this.columnHeaders.insertBefore(n,null);let a=0,r=o=>{l+o.pageX-a>0&&(n.style.left=`${e+o.pageX-a-1}px`,this.columnGuide.style.left=`${30+e+o.pageX-a}px`)},i=o=>{n.style.opacity="0",this.columnGuide.style.display="none",document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",i);let c=l+o.pageX-a;c!==l&&this.onColumnWidthChanges(this.model.getSelectedSheet(),t,c)};i=i.bind(this),n.addEventListener("pointerdown",o=>{n.style.opacity="1",this.columnGuide.style.display="block",this.columnGuide.style.left=`${30+e}px`,a=o.pageX,document.addEventListener("pointermove",r),document.addEventListener("pointerup",i)}),n.addEventListener("dblclick",o=>{let c=this.model.getSelectedSheet(),u=this.model.getRowsWithData(c,t),d=0;for(let h of u){let f=this.model.getFormattedCellValue(c,h,t);if(f==="")continue;let{style:_}=this.model.getCellStyle(c,h,t),y=`${_.font.sz}px ${this.theme.cellFontFamily}`;y=_.font.b?`bold ${y}`:`400 ${y}`,this.ctx.font=y;let p=f.split(`
`);for(let w of p){let m=this.ctx.measureText(w).width;d=Math.max(d,m)}}d!==0&&(this.model.setColumnsWidth(c,t,t,d+8),this.refresh()),o.stopPropagation()})}addRowResizeHandle(e,t,l){var c;let n=document.createElement("div");n.className="row-resize-handle",n.style.top=`${e-1}px`,n.style.width="30px";let a=this.model.getSelectedSheet();(c=this.canvas.parentElement)==null||c.insertBefore(n,null);let r=0,i=u=>{l+u.pageY-r>0&&(n.style.top=`${e+u.pageY-r-1}px`,this.rowGuide.style.top=`${e+u.pageY-r}px`)},o=u=>{n.style.opacity="0",this.rowGuide.style.display="none",document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o);let d=l+u.pageY-r;d!==l&&this.onRowHeightChanges(a,t,d)};o=o.bind(this),n.addEventListener("pointerdown",u=>{u.stopPropagation(),n.style.opacity="1",this.rowGuide.style.display="block",this.rowGuide.style.top=`${e}px`,r=u.pageY,document.addEventListener("pointermove",i),document.addEventListener("pointerup",o)}),n.addEventListener("dblclick",u=>{var _;let d=this.model.getSelectedSheet(),h=this.model.getColumnsWithData(d,t),f=0;for(let y of h){let p=this.model.getFormattedCellValue(d,t,y);if(p==="")continue;let w=this.getColumnWidth(d,y),{style:m}=this.model.getCellStyle(d,t,y),g=m.font.sz,b=g*1.5,v=`${g}px ${this.theme.cellFontFamily}`;v=m.font.b?`bold ${v}`:`400 ${v}`,this.ctx.font=v;let C=(Ph(p,((_=m.alignment)==null?void 0:_.wrap_text)||!1,this.ctx,w).length-1)*b+8+g;f=Math.max(f,C)}f!==0&&(this.model.setRowsHeight(d,t,t,f),this.refresh()),u.stopPropagation()})}styleColumnHeader(e,t,l,n){t.style.boxSizing="border-box",t.style.width=`${e}px`,t.style.height="28px",t.style.backgroundColor=l?n?this.theme.primaryMain:this.theme.headerSelectedBackground:this.theme.headerBackground,t.style.color=l?n?this.theme.commonWhite:this.theme.headerSelectedColor:this.theme.headerTextColor,t.style.fontWeight="bold",t.style.borderLeft=`1px solid ${this.theme.headerBorderColor}`,t.style.borderTop=`1px solid ${this.theme.headerBorderColor}`,l?(t.style.borderBottom=`1px solid ${this.theme.outlineColor}`,t.classList.add("selected")):t.classList.remove("selected")}removeHandles(){let e=this.canvas.parentElement;if(e)for(let t of e.querySelectorAll(".row-resize-handle"))t.remove()}renderRowHeaders(e,t,l){let{sheet:n,range:a}=this.model.getSelectedView(),r=a[0],i=a[2],o=a[1],c=a[3];r>i&&([r,i]=[i,r]),o>c&&([o,c]=[c,o]);let u=o===1&&c===16384,d=this.ctx,h=28.5,f=e===0?t.row:1;for(let _=f;_<=l.row;_+=1){let y=this.getRowHeight(n,_);if(y<=0)continue;let p=_>=r&&_<=i;d.fillStyle=this.theme.headerBorderColor,d.fillRect(.5,h,30,y),d.fillStyle=p?u?this.theme.primaryMain:this.theme.headerSelectedBackground:this.theme.headerBackground,d.fillRect(.5,h+.5,30,y-1),p&&(d.fillStyle=this.theme.outlineColor,d.fillRect(29,h,1,y)),d.fillStyle=p?u?this.theme.commonWhite:this.theme.headerSelectedColor:this.theme.headerTextColor,d.font=this.theme.headerFont,d.fillText(`${_}`,30/2,h+y/2,30),h+=y,this.addRowResizeHandle(h,_,y),_===e&&(h+=3,_=t.row-1)}}renderColumnHeaders(e,t,l){let{columnHeaders:n}=this,a=0,{range:r}=this.model.getSelectedView(),i=r[0],o=r[2],c=r[1],u=r[3];c>u&&([c,u]=[u,c]),i>o&&([i,o]=[o,i]);let d=i===1&&o===1048576;for(let h of n.querySelectorAll(".column-header"))h.remove();for(let h of n.querySelectorAll(".column-resize-handle"))h.remove();for(let h of n.querySelectorAll(".frozen-column-separator"))h.remove();n.style.font=this.theme.headerFont,n.style.height="28px",n.style.lineHeight="28px",n.style.left="30px";for(let h=1;h<=e;h+=1){let f=h>=c&&h<=u;a+=this.addColumnHeader(a,h,f,d)}if(e!==0){let h=document.createElement("div");h.className="frozen-column-separator",h.style.width="3px",h.style.height="28px",h.style.display="inline-block",h.style.backgroundColor=this.theme.gridSeparatorColor,this.columnHeaders.insertBefore(h,null),a+=3}for(let h=t;h<=l;h+=1){let f=h>=c&&h<=u;a+=this.addColumnHeader(a,h,f,d)}n.style.width=`${a}px`}addColumnHeader(e,t,l,n){let a=this.getColumnWidth(this.model.getSelectedSheet(),t);if(a<=0)return 0;let r=document.createElement("div");return r.className="column-header",r.textContent=rt(t),this.columnHeaders.insertBefore(r,null),this.styleColumnHeader(a,r,l,n),this.addColumnResizeHandle(e+a,t,a),a}getSheetDimensions(){let e=30;for(let l=1;l<It+1;l+=1)e+=this.getColumnWidth(this.model.getSelectedSheet(),l);let t=28;for(let l=1;l<ol+1;l+=1)t+=this.getRowHeight(this.model.getSelectedSheet(),l);return this.sheetWidth=Math.floor(e+this.getColumnWidth(this.model.getSelectedSheet(),It)),this.sheetHeight=Math.floor(t+2*this.getRowHeight(this.model.getSelectedSheet(),ol)),[this.sheetWidth,this.sheetHeight]}getClipCSS(e,t,l,n,a,r){if(!a&&!r)return"";let i=r?this.getFrozenColumnsWidth():0,o=a?this.getFrozenRowsHeight():0,c=28+o,u=30+i,d=u+this.width-30-i,h=c+this.height-28-o,f=t<c?c-t:0,_=e<u?u-e:0;return`rect(${f}px ${e+l>d?d-e:l+4}px ${t+n>h?h-t:n+4}px ${_}px)`}getAreaDimensions(e,t,l,n){let[a,r]=this.getCoordinatesByCell(e,t),[i,o]=this.getCoordinatesByCell(l,n);i+=this.getColumnWidth(this.model.getSelectedSheet(),n),o+=this.getRowHeight(this.model.getSelectedSheet(),l);let c=this.model.getFrozenRowsCount(this.model.getSelectedSheet()),u=this.model.getFrozenColumnsCount(this.model.getSelectedSheet());if(c!==0||u!==0){let[d,h]=this.getCoordinatesByCell(c,u);u>0&&(d+=this.getColumnWidth(this.model.getSelectedSheet(),u)),c>0&&(h+=this.getRowHeight(this.model.getSelectedSheet(),c)),e<=c&&l>c&&(o=Math.max(o,h)),t<=u&&n>u&&(i=Math.max(i,d))}return[Math.abs(i-a),Math.abs(o-r)]}getCoordinatesByCell(e,t){let l=this.model.getSelectedSheet(),n=this.model.getFrozenColumnsCount(l),a=this.getFrozenColumnsWidth(),r=this.model.getFrozenRowsCount(l),i=this.getFrozenRowsHeight(),{topLeftCell:o}=this.getVisibleCells(),c,u;if(e<=r){u=28;for(let d=1;d<e;d+=1)u+=this.getRowHeight(l,d)}else if(e>=o.row){u=28+i;for(let d=o.row;d<e;d+=1)u+=this.getRowHeight(l,d)}else{u=28+i;for(let d=o.row;d>e;--d)u-=this.getRowHeight(l,d-1)}if(t<=n){c=30;for(let d=1;d<t;d+=1)c+=this.getColumnWidth(l,d)}else if(t>=o.column){c=30+a;for(let d=o.column;d<t;d+=1)c+=this.getColumnWidth(l,d)}else{c=30+a;for(let d=o.column;d>t;--d)c-=this.getColumnWidth(l,d-1)}return[Math.floor(c),Math.floor(u)]}getCellByCoordinates(e,t){let l=this.model.getFrozenColumnsCount(this.model.getSelectedSheet()),n=this.getFrozenColumnsWidth(),a=this.model.getFrozenRowsCount(this.model.getSelectedSheet()),r=this.getFrozenRowsHeight(),i=0,o=30,{topLeftCell:c}=this.getVisibleCells();if(e<30)for(i=c.column;o>=e;){if(--i,i<1){i=1;break}o-=this.getColumnWidth(this.model.getSelectedSheet(),i)}else if(e<30+n){for(;o<=e;)if(i+=1,o+=this.getColumnWidth(this.model.getSelectedSheet(),i),i>l)return null}else for(o=30+n,i=c.column-1;o<=e;){if(i+=1,i>16384)return null;o+=this.getColumnWidth(this.model.getSelectedSheet(),i)}let u=28,d=0;if(t<28)for(d=c.row;u>=t;){if(--d,d<1){d=1;break}u-=this.getRowHeight(this.model.getSelectedSheet(),d)}else if(t<28+r){for(;u<=t;)if(d+=1,u+=this.getRowHeight(this.model.getSelectedSheet(),d),d>a)return null}else for(u=28+r,d=c.row-1;u<=t;){if(d+=1,d>1048576){d=ol;break}u+=this.getRowHeight(this.model.getSelectedSheet(),d)}return d<1&&(d=1),i<1&&(i=1),{row:d,column:i}}drawExtendToArea(){let{extendToOutline:e}=this,t=this.workbookState.getExtendToArea();if(t===null){e.style.visibility="hidden";return}e.style.visibility="visible";let{rowStart:l,rowEnd:n,columnStart:a,columnEnd:r}=t;l>n&&([l,n]=[n,l]),a>r&&([a,r]=[r,a]);let[i,o]=this.getCoordinatesByCell(l,a),[c,u]=this.getAreaDimensions(l,a,n,r);e.style.border=`1px dashed ${this.theme.outlineColor}`,e.style.borderRadius="3px",e.style.left=`${i}px`,e.style.top=`${o}px`,e.style.width=`${c-1}px`,e.style.height=`${u-1}px`}getColumnWidth(e,t){return Math.round(this.model.getColumnWidth(e,t)*1)}getRowHeight(e,t){return Math.round(this.model.getRowHeight(e,t)*1)}drawCellEditor(){let e=this.workbookState.getEditingCell(),t=this.model.getSelectedSheet(),{editor:l}=this;if(!e||e.sheet!==t){l.style.left="-9999px",l.style.top="-9999px";return}let{row:n,column:a}=e,[r,i]=this.getCoordinatesByCell(n,a),o=e.editorWidth+-2,c=e.editorHeight+-2;l.style.left=`${r}px`,l.style.top=`${i}px`,l.style.width=`${o-1}px`,l.style.height=`${c-1}px`}drawCellOutline(){let{cellArrayStructure:e,cellOutline:t,areaOutline:l,cellOutlineHandle:n}=this;this.workbookState.getEditingCell()?(t.style.visibility="hidden",n.style.visibility="hidden"):(t.style.visibility="visible",n.style.visibility=this.workbookState.isSelecting()?"hidden":"visible"),l.style.visibility="visible",e.style.visibility="hidden";let[a,r,i]=this.model.getSelectedCell(),{topLeftCell:o}=this.getVisibleCells(),c=this.model.getFrozenRowsCount(a),u=this.model.getFrozenColumnsCount(a),[d,h]=this.getCoordinatesByCell(r,i),f=this.getColumnWidth(a,i)+-2,_=this.getRowHeight(a,r)+-2;(r<o.row&&r>c||i<o.column&&i>u)&&(t.style.visibility="hidden",n.style.visibility="hidden"),t.style.left=`${d- -1-2}px`,t.style.top=`${h- -1-2}px`,t.style.minWidth="",t.style.minHeight="",t.style.maxWidth="",t.style.maxHeight="",t.style.overflow="hidden",t.style.width=`${f+1}px`,t.style.height=`${_+1}px`,t.style.background="none",t.style.lineHeight=`${_-4}px`;let{range:[y,p,w,m]}=this.model.getSelectedView();y>w&&([y,w]=[w,y]),p>m&&([p,m]=[m,p]);let g=this.model.getCellArrayStructure(a,r,i),b=null;if(g!=="SingleCell")if("DynamicAnchor"in g){e.style.visibility="visible";let[M,x]=g.DynamicAnchor;b=[r,i,M,x]}else if("DynamicChild"in g)e.style.visibility="visible",b=g.DynamicChild;else if("ArrayAnchor"in g){e.style.visibility="visible";let[M,x]=g.ArrayAnchor;b=[r,i,M,x]}else"ArrayChild"in g&&(e.style.visibility="visible",b=g.ArrayChild);if(b!==null){let[M,x]=this.getCoordinatesByCell(b[0],b[1]),[O,z]=this.getCoordinatesByCell(b[0]+b[3],b[1]+b[2]);e.style.left=`${M}px`,e.style.top=`${x}px`,e.style.width=`${O-M}px`,e.style.height=`${z-x}px`}let v,C;if(p===m&&y===w)l.style.visibility="hidden",[v,C]=this.getCoordinatesByCell(y,p),v+=this.getColumnWidth(a,p),C+=this.getRowHeight(a,y);else{let[M,x]=this.getCoordinatesByCell(y,p),[O,z]=this.getAreaDimensions(y,p,w,m);v=M+O,C=x+z;let U=this.workbookState.isSelecting(),V=+!!U;l.style.left=`${M- -1-1}px`,l.style.top=`${x- -1-1}px`,l.style.width=`${O+-2+1+V}px`,l.style.height=`${z+-2+1+V}px`;let G=y<o.row&&y>c,R=p<o.column&&p>u;l.style.clip=this.getClipCSS(M,x,O+-2,z+-2,G,R),l.style.border=U?"none":`1px solid ${this.theme.outlineColor}`,(w>c&&w<o.row-1||m>u&&m<o.column-1)&&(n.style.visibility="hidden"),y<=c&&w>c&&w<o.row-1&&(l.style.borderBottom="None",n.style.visibility="hidden"),p<=u&&m>u&&m<o.column-1&&(l.style.borderRight="None",n.style.visibility="hidden")}let k=n.getBoundingClientRect(),E=k.width,D=k.height;n.style.left=`${v-E/2-1}px`,n.style.top=`${C-D/2-1}px`}drawCutRange(){let e=this.workbookState.getCutRange()||null;if(!e)return;let t=this.model.getSelectedSheet();if(e.sheet!==t)return;let l=this.ctx;l.setLineDash([2,2]);let[n,a]=this.getCoordinatesByCell(e.rowStart,e.columnStart),[r,i]=this.getCoordinatesByCell(e.rowEnd+1,e.columnEnd+1);l.strokeStyle="red",l.lineWidth=1,l.strokeRect(n,a,r-n,i-a),l.setLineDash([])}drawActiveRanges(e,t){var o;let l=this.workbookState.getActiveRanges(),n=this.ctx;n.setLineDash([2,2]);let a=((o=this.workbookState.getEditingCell())==null?void 0:o.referencedRange)||null;a&&(l=l.concat([{...a.range,color:uu(l.length)}]));let r=this.model.getSelectedSheet(),i=l.length;for(let c=0;c<i;c+=1){let u=l[c];if(u.sheet!==r)continue;let d=e.row-1,h=t.row+1,f=e.column-1,_=t.column+1;if(d<=u.rowEnd&&u.rowStart<=h&&f<=u.columnEnd&&u.columnStart<_){let y={...u,rowStart:Math.max(d,u.rowStart),rowEnd:Math.min(h,u.rowEnd),columnStart:Math.max(f,u.columnStart),columnEnd:Math.min(_,u.columnEnd)},[p,w]=this.getCoordinatesByCell(y.rowStart,y.columnStart),[m,g]=this.getCoordinatesByCell(y.rowEnd+1,y.columnEnd+1);n.strokeStyle=u.color,n.lineWidth=1,n.strokeRect(p,w,m-p,g-w),n.fillStyle=gS(u.color),n.fillRect(p,w,m-p,g-w)}}n.setLineDash([])}renderSheet(){let e=this.ctx,{canvas:t}=this,l=this.model.getSelectedSheet();e.lineWidth=1,e.textAlign="center",e.textBaseline="middle",e.clearRect(0,0,t.width,t.height),this.removeHandles();let{topLeftCell:n,bottomRightCell:a}=this.getVisibleCells();this.computeCellsText();let r=this.model.getFrozenColumnsCount(l),i=this.model.getFrozenRowsCount(l),o=30.5,c=28.5;for(let f=1;f<=i;f+=1){let _=this.getRowHeight(l,f);o=30.5;for(let y=1;y<=r;y+=1){let p=this.getColumnWidth(l,y);this.renderCellStyle(f,y,o,c,p,_),o+=p}c+=_}if(i===0&&r!==0){o=30.5;for(let f=1;f<=r;f+=1)o+=this.getColumnWidth(l,f)}let u=3/2;i&&(e.beginPath(),e.lineWidth=3,e.strokeStyle=this.theme.gridSeparatorColor,e.moveTo(0,c+u),e.lineTo(this.width,c+u),c+=3,e.stroke(),e.lineWidth=1),r&&(e.beginPath(),e.lineWidth=3,e.strokeStyle=this.theme.gridSeparatorColor,e.moveTo(o+u,0),e.lineTo(o+u,this.height),o+=3,e.stroke(),e.lineWidth=1);let d=o,h=c;c=28.5;for(let f=1;f<=i;f+=1){o=d;let _=this.getRowHeight(l,f);for(let{column:y}=n;y<=a.column;y+=1){let p=this.getColumnWidth(l,y);this.renderCellStyle(f,y,o,c,p,_),o+=p}c+=_}c=h;for(let{row:f}=n;f<=a.row;f+=1){o=30;let _=this.getRowHeight(l,f);for(let y=1;y<=r;y+=1){let p=this.getColumnWidth(l,y);this.renderCellStyle(f,y,o,c,p,_),o+=p}c+=_}c=h;for(let{row:f}=n;f<=a.row;f+=1){o=d;let _=this.getRowHeight(l,f);for(let{column:y}=n;y<=a.column;y+=1){let p=this.getColumnWidth(l,y);this.renderCellStyle(f,y,o,c,p,_),o+=p}c+=_}for(let f of this.cells)this.renderCellText(f);this.renderColumnHeaders(r,n.column,a.column),this.renderRowHeaders(i,n,a),e.beginPath(),e.strokeStyle=this.theme.gridSeparatorColor,e.moveTo(0,.5),e.lineTo(o+30,.5),e.stroke(),this.drawCellOutline(),this.drawCellEditor(),this.drawExtendToArea(),this.drawActiveRanges(n,a),this.drawCutRange()}},yS=e=>{let{t}=be(),{open:l,onClose:n,anchorPosition:a,column:r,row:i,onInsertColumnLeft:o,onInsertColumnRight:c,onInsertRowAbove:u,onInsertRowBelow:d,onDeleteColumn:h,onDeleteRow:f,onCut:_,onCopy:y,onPaste:p}=e;return a?s.jsxs(Kn,{open:l,onClose:n,anchorPosition:a,children:[s.jsx(ie,{icon:s.jsx(E2,{}),onClick:_,children:t("context_menu.cell.cut")}),s.jsx(ie,{icon:s.jsx(Bv,{}),onClick:y,children:t("context_menu.cell.copy")}),s.jsx(ie,{icon:s.jsx(Lv,{}),onClick:p,children:t("context_menu.cell.paste")}),s.jsx(ut,{}),s.jsx(yu,{icon:s.jsx(sl,{}),submenu:s.jsxs(s.Fragment,{children:[s.jsx(ie,{onClick:o,children:t("context_menu.cell.insert_column_left")}),s.jsx(ie,{onClick:c,children:t("context_menu.cell.insert_column_right")}),s.jsx(ut,{}),s.jsx(ie,{onClick:u,children:t("context_menu.cell.insert_row_above")}),s.jsx(ie,{onClick:d,children:t("context_menu.cell.insert_row_below")})]}),children:t("context_menu.cell.insert")}),s.jsx(yu,{icon:s.jsx(Yn,{}),submenu:s.jsxs(s.Fragment,{children:[s.jsx(ie,{onClick:h,children:t("context_menu.cell.delete_column",{column:r})}),s.jsx(ie,{onClick:f,children:t("context_menu.cell.delete_row",{row:i})})]}),children:t("context_menu.cell.delete")})]}):null},bS=e=>{let{t}=be(),{open:l,onClose:n,anchorPosition:a,onInsertColumnsLeft:r,onInsertColumnsRight:i,onFreezeColumns:o,onUnfreezeColumns:c,onDeleteColumns:u,onMoveColumnsLeft:d,onMoveColumnsRight:h,onHideColumns:f,onShowHiddenColumns:_,range:y,frozenColumnsCount:p,hiddenColumnsCount:w}=e,{columnStart:m,columnEnd:g,columnCount:b}=y;return a?s.jsxs(Kn,{open:l,onClose:n,anchorPosition:a,children:[s.jsx(ie,{icon:s.jsx(sl,{}),onClick:r,children:t("context_menu.column_header.insert_columns_before",{count:b})}),s.jsx(ie,{icon:s.jsx(sl,{}),onClick:i,children:t("context_menu.column_header.insert_columns_after",{count:b})}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(ns,{}),onClick:d,children:t("context_menu.column_header.move_columns_left")}),s.jsx(ie,{icon:s.jsx(zo,{}),onClick:h,children:t("context_menu.column_header.move_columns_right")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Sd,{}),onClick:f,children:b===1?t("context_menu.column_header.hide_column",{column:m}):t("context_menu.column_header.hide_columns",{columnStart:m,columnEnd:g})}),w>0&&s.jsx(ie,{icon:s.jsx(wp,{}),onClick:_,children:t("context_menu.column_header.show_hidden_columns")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Lo,{}),onClick:o,children:t("context_menu.column_header.freeze_columns",{column:m})}),p>0&&s.jsx(ie,{icon:s.jsx(Lo,{}),onClick:c,children:t("context_menu.column_header.unfreeze_columns")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Yn,{}),destructive:!0,onClick:u,children:b===1?t("context_menu.column_header.delete_column",{column:m}):t("context_menu.column_header.delete_columns",{columnStart:m,columnEnd:g})})]}):null},vS=e=>{let{t}=be(),{open:l,onClose:n,anchorPosition:a,onInsertRowsAbove:r,onInsertRowsBelow:i,onFreezeRows:o,onUnfreezeRows:c,onDeleteRows:u,onMoveRowsUp:d,onMoveRowsDown:h,onHideRows:f,onShowHiddenRows:_,range:y,frozenRowsCount:p}=e,{rowStart:w,rowEnd:m}=y,g=m-w+1;return a?s.jsxs(Kn,{open:l,onClose:n,anchorPosition:a,children:[s.jsx(ie,{icon:s.jsx(sl,{}),onClick:r,children:t("context_menu.row_header.insert_rows_above",{count:g})}),s.jsx(ie,{icon:s.jsx(sl,{}),onClick:i,children:t("context_menu.row_header.insert_rows_below",{count:g})}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(xa,{}),onClick:d,children:t("context_menu.row_header.move_rows_up")}),s.jsx(ie,{icon:s.jsx(wa,{}),onClick:h,children:t("context_menu.row_header.move_rows_down")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Sd,{}),onClick:f,children:g===1?t("context_menu.row_header.hide_row",{row:w}):t("context_menu.row_header.hide_rows",{rowStart:w,rowEnd:m})}),s.jsx(ie,{icon:s.jsx(wp,{}),onClick:_,children:t("context_menu.row_header.show_hidden_rows")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Lo,{}),onClick:o,children:t("context_menu.row_header.freeze_rows",{row:w})}),p>0&&s.jsx(ie,{icon:s.jsx(Lo,{}),onClick:c,children:t("context_menu.row_header.unfreeze_rows")}),s.jsx(ut,{}),s.jsx(ie,{icon:s.jsx(Yn,{}),destructive:!0,onClick:u,children:g===1?t("context_menu.row_header.delete_row",{row:w}):t("context_menu.row_header.delete_rows",{rowStart:w,rowEnd:m})})]}):null},wS=e=>{let t=S.useRef(!1),l=S.useRef(!1),n=S.useRef(!1),a=S.useRef(null),r=S.useRef(!1),i=S.useRef(null),o=S.useCallback(u=>{if(u.pointerType!=="mouse"||!(t.current||l.current||n.current||r.current))return;let{canvasElement:d,model:h,worksheetCanvas:f,refresh:_}=e,y=d.current,p=f.current;if(!p||!y)return;let w=y.getBoundingClientRect(),m=u.clientX-w.x,g=u.clientY-w.y;if(n.current){if(u.preventDefault(),a.current===null)return;let v=null;if(m>=0&&m<30&&g>=28){let C=p.getCellByCoordinates(30,g);C&&(v=C.row)}else if(m>=30&&g>=28){let C=p.getCellByCoordinates(m,g);C&&(v=C.row)}if(v!==null){let C=a.current;h.setSelectedCell(Math.min(C,v),1),h.setSelectedRange(Math.min(C,v),1,Math.max(C,v),It),_()}return}if(r.current){if(u.preventDefault(),i.current===null)return;let v=null;if(m>=30&&g>=0&&g<28){let C=p.getCellByCoordinates(m,28);C&&(v=C.column)}else if(m>=30&&g>=28){let C=p.getCellByCoordinates(m,g);C&&(v=C.column)}if(v!==null){let C=i.current;h.setSelectedCell(1,Math.min(C,v)),h.setSelectedRange(1,Math.min(C,v),ol,Math.max(C,v)),_()}return}let b=p.getCellByCoordinates(m,g);if(b){if(t.current)e.onAreaSelecting(b);else if(l.current){let{workbookState:v}=e,C=v.getEditingCell();if(!(C!=null&&C.referencedRange))return;let k=C.referencedRange.range;k.rowEnd=b.row,k.columnEnd=b.column;let E=h.getWorksheetsProperties().map(D=>D.name);C.referencedRange.str=hl(k,C.sheet,E[k.sheet]),v.setEditingCell(C),_()}}},[e]),c=S.useCallback(u=>{var d,h,f,_;if(t.current){let{worksheetElement:y}=e;t.current=!1,(d=y.current)==null||d.releasePointerCapture(u.pointerId),e.onAreaSelected()}else if(l.current){let{worksheetElement:y}=e;l.current=!1,(h=y.current)==null||h.releasePointerCapture(u.pointerId)}else if(n.current){let{worksheetElement:y}=e;n.current=!1,a.current=null,(f=y.current)==null||f.releasePointerCapture(u.pointerId)}else if(r.current){let{worksheetElement:y}=e;r.current=!1,i.current=null,(_=y.current)==null||_.releasePointerCapture(u.pointerId)}},[e]);return{onPointerDown:S.useCallback(u=>{let d=u.target;if(d.className==="column-resize-handle"||d.className.includes("ironcalc-cell-handle")||u.button===2)return;let h=u.clientX,f=u.clientY,{canvasElement:_,model:y,refresh:p,worksheetElement:w,worksheetCanvas:m,workbookState:g,onRowSelected:b,onColumnSelected:v,onAllSheetSelected:C}=e,k=m.current,E=_.current,D=w.current;if(!E||!k||!D)return;let M=E.getBoundingClientRect();if(h-=M.x,f-=M.y,h>M.width||h<30||f<28||f>M.height){if(h<30&&f<28)C();else if(h>0&&h<30&&f>28&&f<M.height){let z=k.getCellByCoordinates(30,f);z&&(u.shiftKey?b(z.row,!0):(u.preventDefault(),a.current=z.row,n.current=!0,D.setPointerCapture(u.pointerId),b(z.row,!1)))}else if(h>30&&h<M.width&&f>0&&f<28){let z=k.getCellByCoordinates(h,28);z&&(u.shiftKey?v(z.column,!0):(u.preventDefault(),i.current=z.column,r.current=!0,D.setPointerCapture(u.pointerId),v(z.column,!1)))}return}let x=g.getEditingCell(),O=k.getCellByCoordinates(h,f);if(O){if(x){if(y.getSelectedSheet()===x.sheet&&O.row===x.row&&O.column===x.column)return;let z=x.text;if(da(z,x.cursorEnd)){let U={sheet:y.getSelectedSheet(),rowStart:O.row,rowEnd:O.row,columnStart:O.column,columnEnd:O.column},V=y.getWorksheetsProperties().map(G=>G.name);x.referencedRange={range:U,str:hl(U,x.sheet,V[U.sheet]),anchorRow:U.rowStart,anchorColumn:U.columnStart},g.setEditingCell(x),u.stopPropagation(),u.preventDefault(),l.current=!0,D.setPointerCapture(u.pointerId),p();return}g.clearEditingCell(),y.setUserInput(x.sheet,x.row,x.column,x.text)}u.shiftKey?(e.onAreaSelecting(O),e.onAreaSelected()):(e.onCellSelected(O,u),t.current=!0,D.setPointerCapture(u.pointerId))}},[e]),onPointerMove:o,onPointerUp:c}};function xS(){let[e,t]=S.useState([0,0]);return S.useLayoutEffect(()=>{function l(){t([window.innerWidth,window.innerHeight])}return window.addEventListener("resize",l),l(),()=>window.removeEventListener("resize",l)},[]),e}var SS=S.forwardRef((e,t)=>{let l=S.useRef(null),n=S.useRef(null),a=S.useRef(null),r=S.useRef(null),i=S.useRef(null),o=S.useRef(null),c=S.useRef(null),u=S.useRef(null),d=S.useRef(null),h=S.useRef(null),f=S.useRef(null),_=S.useRef(null),y=S.useRef(null),[p,w]=S.useState(!1),[m,g]=S.useState(!1),[b,v]=S.useState(!1),[C,k]=S.useState(null),[E,D]=S.useState(null),M=S.useRef(!1),{model:x,workbookState:O,refresh:z,canEdit:U,onCut:V,onCopy:G,onPaste:R}=e,{t:q}=be(),[Y,W]=xS();S.useImperativeHandle(t,()=>({getCanvas:()=>y.current})),S.useEffect(()=>{let A=l.current,H=h.current,K=f.current,xe=_.current,N=n.current,T=o.current,L=c.current,$=u.current,J=d.current,P=r.current;if(!A||!H||!K||!xe||!N||!T||!L||!J||!a.current||!P||!$)return;x.setWindowWidth(Y-37),x.setWindowHeight(W-190);let ee=new pS({width:N.clientWidth,height:N.clientHeight,model:x,workbookState:O,elements:{canvas:A,columnGuide:H,rowGuide:K,columnHeaders:xe,cellOutline:T,cellArrayStructure:$,areaOutline:L,extendToOutline:J,editor:P},onColumnWidthChanges(ct,De,ll){var Rd;if(ll<0)return;let{range:_e}=x.getSelectedView(),kt=De,Za=De,os=_e[0]===1&&_e[2]===1048576,ci=_e[1]===1&&_e[3]===16384;os&&De>=_e[1]&&De<=_e[3]&&!ci&&(kt=Math.min(_e[1],De,_e[3]),Za=Math.max(_e[1],De,_e[3])),x.setColumnsWidth(ct,kt,Za,ll),(Rd=y.current)==null||Rd.renderSheet()},onRowHeightChanges(ct,De,ll){var ci;if(ll<0)return;let{range:_e}=x.getSelectedView(),kt=De,Za=De,os=_e[0]===1&&_e[2]===1048576;_e[1]===1&&_e[3]===16384&&De>=_e[0]&&De<=_e[2]&&!os&&(kt=Math.min(_e[0],De,_e[2]),Za=Math.max(_e[0],De,_e[2])),x.setRowsHeight(ct,kt,Za,ll),(ci=y.current)==null||ci.renderSheet()},refresh:z}),Ee=x.getScrollX(),ce=x.getScrollY(),[pe,Ae]=[Ee+1e5,ce+5e5];i.current&&(i.current.style.height=`${Ae}px`,i.current.style.width=`${pe}px`);let ge=a.current.scrollLeft,gt=a.current.scrollTop;Ee!==ge&&(M.current=!0,a.current.scrollLeft=Ee,setTimeout(()=>{M.current=!1},0)),ce!==gt&&(M.current=!0,a.current.scrollTop=ce,setTimeout(()=>{M.current=!1},0)),ee.renderSheet(),y.current=ee});let{onPointerMove:ne,onPointerDown:he,onPointerUp:Z}=wS({model:x,workbookState:O,refresh:z,onColumnSelected:(A,H)=>{let K=A,xe=A;if(H){let{range:N}=x.getSelectedView();K=Math.min(N[1],A,N[3]),xe=Math.max(N[3],A,N[1])}x.setSelectedCell(1,K),x.setSelectedRange(1,K,ol,xe),z()},onRowSelected:(A,H)=>{let K=A,xe=A;if(H){let{range:N}=x.getSelectedView();K=Math.min(N[0],A,N[2]),xe=Math.max(N[2],A,N[0])}x.setSelectedCell(K,1),x.setSelectedRange(K,1,xe,It),z()},onAllSheetSelected:()=>{x.setSelectedCell(1,1),x.setSelectedRange(1,1,ol,It),z()},onCellSelected:(A,H)=>{H.preventDefault(),H.stopPropagation(),x.setSelectedCell(A.row,A.column),z()},onAreaSelecting:A=>{let H=y.current;if(!H)return;O.setSelecting(!0);let{row:K,column:xe}=A;x.onAreaSelecting(K,xe),H.renderSheet(),z()},onAreaSelected:()=>{O.setSelecting(!1);let A=O.getCopyStyles();if(A!=null&&A.length){x.onPasteStyles(A);let H=y.current;if(!H)return;H.renderSheet()}O.setCopyStyles(null),n.current&&(n.current.style.cursor="auto"),z()},canvasElement:l,worksheetElement:n,worksheetCanvas:y});return s.jsxs("div",{ref:a,onScroll:()=>{if(!a.current||!y.current||M.current)return;let A=a.current.scrollLeft,H=a.current.scrollTop;y.current.setScrollPosition({left:A,top:H}),y.current.renderSheet()},className:"ic-worksheet-wrapper scroll",children:[s.jsx("div",{className:"ic-worksheet-spacer",ref:i}),s.jsxs("div",{className:"ic-worksheet-sheet-container",ref:n,onPointerDown:he,onPointerMove:ne,onPointerUp:Z,onContextMenu:A=>{var K,xe,N,T,L,$,J,P,ee;A.preventDefault(),A.stopPropagation(),k({top:A.clientY,left:A.clientX});let H=l.current;if(H){let Ee=H.getBoundingClientRect(),ce=A.clientX-Ee.x,pe=A.clientY-Ee.y;if(ce>30&&ce<Ee.width&&pe>0&&pe<28){let ge=x.getSelectedView(),gt=ge.range[0],ct=ge.range[1],De=ge.range[2],ll=ge.range[3],_e=((xe=(K=y.current)==null?void 0:K.getCellByCoordinates(ce,28))==null?void 0:xe.column)??ge.column;if(gt===1&&De===1048576||(x.setSelectedCell(1,_e),x.setSelectedRange(1,_e,ol,_e),z()),!(ct<=_e&&_e<=ll)){let kt=((T=(N=y.current)==null?void 0:N.getCellByCoordinates(ce,28))==null?void 0:T.column)??ge.column;x.setSelectedCell(1,kt),x.setSelectedRange(1,kt,ol,kt),z()}g(!0);return}if(ce>0&&ce<30&&pe>28&&pe<Ee.height){let ge=x.getSelectedView(),gt=ge.range[0],ct=ge.range[1],De=ge.range[2],ll=ge.range[3],_e=(($=(L=y.current)==null?void 0:L.getCellByCoordinates(30,pe))==null?void 0:$.row)??ge.row;if(ct===1&&ll===16384||(x.setSelectedCell(_e,1),x.setSelectedRange(_e,1,_e,It),z()),!(gt<=_e&&_e<=De)){let kt=((P=(J=y.current)==null?void 0:J.getCellByCoordinates(30,pe))==null?void 0:P.row)??ge.row;x.setSelectedCell(kt,1),x.setSelectedRange(kt,1,kt,It),z()}v(!0);return}let Ae=(ee=y.current)==null?void 0:ee.getCellByCoordinates(ce,pe);if(Ae){let{range:ge}=x.getSelectedView(),[gt,ct,De,ll]=ge;gt<=Ae.row&&Ae.row<=De&&ct<=Ae.column&&Ae.column<=ll||(x.setSelectedCell(Ae.row,Ae.column),z())}}w(!0)},onDoubleClick:A=>{if(!U)return;let{sheet:H,row:K,column:xe}=x.getSelectedView(),N=x.getCellContent(H,K,xe),T=x.getColumnWidth(H,xe)*1,L=x.getRowHeight(H,K)*1;O.setEditingCell({sheet:H,row:K,column:xe,text:N,cursorStart:N.length,cursorEnd:N.length,focus:"cell",referencedRange:null,activeRanges:[],mode:"accept",editorWidth:T,editorHeight:L}),A.stopPropagation(),e.refresh()},children:[s.jsx("canvas",{className:"ic-worksheet-sheet-canvas",ref:l}),s.jsx("div",{className:"ic-worksheet-cell-array-structure",ref:u}),s.jsx("div",{className:"ic-worksheet-cell-outline",ref:o}),s.jsx("div",{className:"ic-worksheet-editor-wrapper",ref:r,children:s.jsx(Fp,{originalText:O.getEditingText(),onEditEnd:()=>{e.refresh()},onTextUpdated:()=>{e.refresh()},model:x,workbookState:O,type:"cell",canEdit:U})}),s.jsx("div",{className:"ic-worksheet-area-outline",ref:c}),s.jsx("div",{className:"ic-worksheet-extend-to-outline",ref:d}),s.jsx("div",{className:"ic-worksheet-column-resize-guide",ref:h}),s.jsx("div",{className:"ic-worksheet-row-resize-guide",ref:f}),s.jsx("div",{className:"ic-worksheet-column-headers",ref:_})]}),s.jsx(yS,{open:p,onClose:()=>w(!1),anchorPosition:C?{x:C.left,y:C.top}:null,column:rt(x.getSelectedView().column),row:x.getSelectedView().row,onCut:V,onCopy:G,onPaste:R,onInsertColumnLeft:()=>{let A=x.getSelectedView();try{x.insertColumns(A.sheet,A.column,1)}catch{D(q("error_dialog.error_inserting_columns"))}w(!1),z()},onInsertColumnRight:()=>{let A=x.getSelectedView();try{x.insertColumns(A.sheet,A.range[3]+1,1)}catch{D(q("error_dialog.error_inserting_columns"))}w(!1),z()},onInsertRowAbove:()=>{let A=x.getSelectedView();try{x.insertRows(A.sheet,A.row,1)}catch{D(q("error_dialog.error_inserting_rows"))}w(!1),z()},onInsertRowBelow:()=>{let A=x.getSelectedView();try{x.insertRows(A.sheet,A.range[2]+1,1)}catch{D(q("error_dialog.error_inserting_rows"))}w(!1),z()},onDeleteColumn:()=>{let A=x.getSelectedView();try{x.deleteColumns(A.sheet,A.column,1)}catch{D(q("error_dialog.error_deleting_columns"))}w(!1),z()},onDeleteRow:()=>{let A=x.getSelectedView();try{x.deleteRows(A.sheet,A.row,1)}catch{D(q("error_dialog.error_deleting_rows"))}w(!1),z()}}),s.jsx(bS,{open:m,onClose:()=>g(!1),anchorPosition:C?{x:C.left,y:C.top}:null,onInsertColumnsLeft:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];try{x.insertColumns(A.sheet,A.column,K-H+1)}catch{D(q("error_dialog.error_inserting_columns"))}g(!1)},onInsertColumnsRight:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];try{x.insertColumns(A.sheet,K+1,K-H+1)}catch{D(q("error_dialog.error_inserting_columns"))}g(!1)},onMoveColumnsLeft:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];try{x.moveColumns(A.sheet,H,K-H+1,-1)}catch{D(q("error_dialog.error_moving_columns"))}g(!1)},onMoveColumnsRight:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];try{x.moveColumns(A.sheet,H,K-H+1,1)}catch{D(q("error_dialog.error_moving_columns"))}g(!1)},onFreezeColumns:()=>{let A=x.getSelectedView();x.setFrozenColumnsCount(A.sheet,A.column),g(!1)},onUnfreezeColumns:()=>{let A=x.getSelectedSheet();x.setFrozenColumnsCount(A,0),g(!1)},onDeleteColumns:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];try{x.deleteColumns(A.sheet,H,K-H+1)}catch{D(q("error_dialog.error_deleting_columns"))}g(!1)},range:(()=>{let A=x.getSelectedView().range;return{rowStart:A[0],columnStart:rt(A[1]),rowEnd:A[2],columnEnd:rt(A[3]),columnCount:A[3]-A[1]+1}})(),frozenColumnsCount:x.getFrozenColumnsCount(x.getSelectedSheet()),onHideColumns:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];x.setColumnsHidden(A.sheet,H,K,!0),g(!1)},onShowHiddenColumns:()=>{let A=x.getSelectedView(),H=A.range[1],K=A.range[3];x.setColumnsHidden(A.sheet,H,K,!1),g(!1)},hiddenColumnsCount:(()=>{let A=[],H=x.getSelectedView(),K=H.range[1],xe=H.range[3];for(let N=K;N<=xe;N++)x.getColumnWidth(H.sheet,N)===0&&A.push(N);return A.length})()}),s.jsx(vS,{open:b,onClose:()=>v(!1),anchorPosition:C?{x:C.left,y:C.top}:null,onInsertRowsAbove:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];try{x.insertRows(A.sheet,A.row,K-H+1)}catch{D(q("error_dialog.error_inserting_rows"))}v(!1)},onInsertRowsBelow:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];try{x.insertRows(A.sheet,A.row+1,K-H+1)}catch{D(q("error_dialog.error_inserting_rows"))}v(!1)},onMoveRowsUp:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];try{x.moveRows(A.sheet,H,K-H+1,-1)}catch{D(q("error_dialog.error_moving_rows"))}v(!1)},onMoveRowsDown:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];try{x.moveRows(A.sheet,H,K-H+1,1)}catch{D(q("error_dialog.error_moving_rows"))}v(!1)},onFreezeRows:()=>{let A=x.getSelectedView();x.setFrozenRowsCount(A.sheet,A.row),v(!1)},onUnfreezeRows:()=>{let A=x.getSelectedSheet();x.setFrozenRowsCount(A,0),v(!1)},onDeleteRows:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];try{x.deleteRows(A.sheet,H,K-H+1)}catch{D(q("error_dialog.error_deleting_rows"))}v(!1)},onHideRows:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];x.setRowsHidden(A.sheet,H,K,!0),v(!1)},onShowHiddenRows:()=>{let A=x.getSelectedView(),H=A.range[0],K=A.range[2];x.setRowsHidden(A.sheet,H,K,!1),v(!1)},range:(()=>{let A=x.getSelectedView().range;return{rowStart:A[0],columnStart:rt(A[1]),rowEnd:A[2],columnEnd:rt(A[3]),columnCount:A[3]-A[1]+1}})(),frozenRowsCount:x.getFrozenRowsCount(x.getSelectedSheet())}),s.jsx(rs,{open:E!==null,onClose:()=>D(null),title:E??"",message:E??""})]})}),CS=e=>({onKeyDown:S.useCallback(t=>{let{key:l}=t,n=l.toLowerCase(),{root:a}=e;if(!a.current||t.target!==a.current)return;let r=t.metaKey||t.ctrlKey,i=t.shiftKey,o=t.altKey;if(r&&!i&&!o){switch(n){case"z":e.onUndo(),t.stopPropagation(),t.preventDefault();break;case"y":e.onRedo(),t.stopPropagation(),t.preventDefault();break;case"b":e.onBold(),t.stopPropagation(),t.preventDefault();break;case"i":e.onItalic(),t.stopPropagation(),t.preventDefault();break;case"u":e.onUnderline(),t.stopPropagation(),t.preventDefault();break;case"a":t.stopPropagation(),t.preventDefault();break;case" ":e.onSelectColumn(),t.stopPropagation(),t.preventDefault();break}hw(l)&&(e.onNavigationToEdge(l),t.stopPropagation(),t.preventDefault());return}if(r&&i&&!o){switch(n){case"z":e.onRedo(),t.stopPropagation(),t.preventDefault();break}return}if(i&&!o&&!r)switch(l){case" ":e.onSelectRow(),t.stopPropagation(),t.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"ArrowUp":case"ArrowDown":e.onExpandAreaSelectedKeyboard(l);break;case"Tab":e.onArrowLeft(),t.stopPropagation(),t.preventDefault();break}if(o&&!r&&!i){switch(l){case"ArrowDown":e.onNextSheet(),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":e.onPreviousSheet(),t.stopPropagation(),t.preventDefault();break}return}if(!(r||o)){if(fw(l)||l==="Backspace"){let c=l==="Backspace"?"":l;e.onEditKeyPressStart(c),t.stopPropagation(),t.preventDefault();return}if(!i){if(l==="F2"){e.onCellEditStart(),t.stopPropagation(),t.preventDefault();return}switch(l){case"ArrowRight":case"Tab":e.onArrowRight();break;case"ArrowLeft":e.onArrowLeft();break;case"ArrowDown":case"Enter":e.onArrowDown();break;case"ArrowUp":e.onArrowUp();break;case"End":e.onKeyEnd();break;case"Home":e.onKeyHome();break;case"Delete":e.onCellsDeleted();break;case"PageDown":e.onPageDown();break;case"PageUp":e.onPageUp();break;case"Escape":e.onEscape()}t.stopPropagation(),t.preventDefault()}}},[e])}),jS=e=>{var K,xe;let{model:t,workbookState:l}=e,{t:n}=be(),a=S.useRef(null),r=S.useRef(null),i=S.useRef(null),o=S.useState(0)[1],[c,u]=S.useState(null),[d,h]=S.useState(!1),[f,_]=S.useState(360),[y,p]=S.useState("namedRanges"),w=S.useCallback(N=>{p(N),h(!0)},[]),m=t.getWorksheetsProperties().map(({name:N,color:T,sheet_id:L,state:$})=>({name:N,color:T||"#FFF",sheetId:L,state:$})),g=S.useCallback(()=>{var N;if(!((N=document.activeElement)!=null&&N.closest(".ic-color-picker, .ic-advanced-color-picker-panel, .ic-border-picker"))&&a.current){a.current.focus({preventScroll:!0});let T=window.getSelection();if(T){T.empty();let L=new Range;L.setStart(a.current.firstChild,0),L.setEnd(a.current.firstChild,0),T.addRange(L)}}},[]),b=()=>{t.redo(),o(N=>N+1)},v=()=>{t.undo(),o(N=>N+1)},C=(N,T)=>{let{sheet:L,range:[$,J,P,ee]}=t.getSelectedView(),Ee={sheet:L,row:Math.min($,P),column:Math.min(J,ee),width:Math.abs(ee-J)+1,height:Math.abs(P-$)+1};t.updateRangeStyle(Ee,N,T),o(ce=>ce+1)},k=N=>{C("font.u",`${N}`)},E=N=>{C("font.i",`${N}`)},D=N=>{C("font.b",`${N}`)},M=N=>{C("font.strike",`${N}`)},x=N=>{C("alignment.horizontal",N)},O=N=>{C("alignment.vertical",N)},z=N=>{C("alignment.wrap_text",`${N}`)},U=N=>{C("font.color",N)},V=N=>{C("fill.fg_color",N)},G=N=>{C("num_fmt",N)},R=N=>{C("font.size_delta",`${N}`)},q=S.useCallback(async()=>{var N,T;g();try{let L=await navigator.clipboard.read(),$=new DataTransfer;for(let J of L)for(let P of J.types)$.setData(P,await(await J.getType(P)).text());!$.getData("application/json")&&i.current&&$.setData("application/json",i.current),(N=a.current)==null||N.dispatchEvent(new ClipboardEvent("paste",{clipboardData:$,bubbles:!0,cancelable:!0}))}catch{try{let L=await navigator.clipboard.readText(),$=new DataTransfer;$.setData("text/plain",L),i.current&&$.setData("application/json",i.current),(T=a.current)==null||T.dispatchEvent(new ClipboardEvent("paste",{clipboardData:$,bubbles:!0,cancelable:!0}))}catch{u(n("error_dialog.error_clipboard_paste"))}}},[g,n]),Y=()=>{var ge;let{sheet:N,range:[T,L,$,J]}=t.getSelectedView(),P=Math.min(T,$),ee=Math.min(L,J),Ee=Math.max(T,$),ce=Math.max(L,J),pe=[];for(let gt=P;gt<=Ee;gt++){let ct=[];for(let De=ee;De<=ce;De++)ct.push(t.getCellStyle(N,gt,De).style);pe.push(ct)}l.setCopyStyles(pe);let Ae=(ge=a.current)==null?void 0:ge.getElementsByClassName("ic-worksheet-sheet-container")[0];Ae&&(Ae.style.cursor="url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-paint-roller%22%20style%3D%22transform%3Arotate(-8deg)%22%3E%3Crect%20width%3D%2216%22%20height%3D%226%22%20x%3D%222%22%20y%3D%222%22%20rx%3D%222%22%3E%3C%2Frect%3E%3Cpath%20d%3D%22M10%2016v-2a2%202%200%200%201%202-2h8a2%202%200%200%200%202-2V7a2%202%200%200%200-2-2h-2%22%3E%3C%2Fpath%3E%3Crect%20width%3D%224%22%20height%3D%226%22%20x%3D%228%22%20y%3D%2216%22%20rx%3D%221%22%3E%3C%2Frect%3E%3C%2Fsvg%3E'), auto")},W=t.getFmtSettings(),{onKeyDown:ne}=CS({onCellsDeleted:()=>{let{sheet:N,range:[T,L,$,J]}=t.getSelectedView(),P=Math.min(T,$),ee=Math.min(L,J),Ee=Math.abs(J-L),ce=Math.abs($-T);try{t.rangeClearContents(N,P,ee,P+ce,ee+Ee)}catch(pe){u(`${pe}`)}o(pe=>pe+1)},onExpandAreaSelectedKeyboard:N=>{t.onExpandSelectedRange(N),o(T=>T+1)},onEditKeyPressStart:N=>{let{sheet:T,row:L,column:$}=t.getSelectedView(),J=t.getColumnWidth(T,$)*1,P=t.getRowHeight(T,L)*1;l.setEditingCell({sheet:T,row:L,column:$,text:N,cursorStart:N.length,cursorEnd:N.length,focus:"cell",referencedRange:null,activeRanges:[],mode:"accept",editorWidth:J,editorHeight:P}),o(ee=>ee+1)},onCellEditStart:()=>{let{sheet:N,row:T,column:L}=t.getSelectedView(),$=t.getCellContent(N,T,L),J=t.getColumnWidth(N,L)*1,P=t.getRowHeight(N,T)*1;l.setEditingCell({sheet:N,row:T,column:L,text:$,cursorStart:$.length,cursorEnd:$.length,referencedRange:null,focus:"cell",activeRanges:[],mode:"edit",editorWidth:J,editorHeight:P}),o(ee=>ee+1)},onBold:()=>{let{sheet:N,row:T,column:L}=t.getSelectedView(),$=t.getCellStyle(N,T,L).style.font.b;D(!$)},onItalic:()=>{let{sheet:N,row:T,column:L}=t.getSelectedView(),$=t.getCellStyle(N,T,L).style.font.i;E(!$)},onUnderline:()=>{let{sheet:N,row:T,column:L}=t.getSelectedView(),$=t.getCellStyle(N,T,L).style.font.u;k(!$)},onNavigationToEdge:N=>{t.onNavigateToEdgeInDirection(N),o(T=>T+1)},onPageDown:()=>{t.onPageDown(),o(N=>N+1)},onPageUp:()=>{t.onPageUp(),o(N=>N+1)},onArrowDown:()=>{t.onArrowDown(),o(N=>N+1)},onArrowUp:()=>{t.onArrowUp(),o(N=>N+1)},onArrowLeft:()=>{t.onArrowLeft(),o(N=>N+1)},onArrowRight:()=>{t.onArrowRight(),o(N=>N+1)},onKeyHome:()=>{let N=t.getSelectedView(),T=t.getSelectedCell();t.setSelectedCell(T[1],1),t.setTopLeftVisibleCell(N.top_row,1),o(L=>L+1)},onKeyEnd:()=>{let N=t.getSelectedView(),T=t.getSelectedCell();t.setSelectedCell(T[1],It),t.setTopLeftVisibleCell(N.top_row,It-5),o(L=>L+1)},onUndo:()=>{t.undo(),o(N=>N+1)},onRedo:()=>{t.redo(),o(N=>N+1)},onNextSheet:()=>{let N=t.getSelectedSheet()+1;N>=t.getWorksheetsProperties().length?t.setSelectedSheet(0):t.setSelectedSheet(N)},onPreviousSheet:()=>{let N=t.getSelectedSheet()-1;N<0?t.setSelectedSheet(t.getWorksheetsProperties().length-1):t.setSelectedSheet(N)},onEscape:()=>{var T;l.clearCutRange(),l.setCopyStyles(null);let N=(T=a.current)==null?void 0:T.getElementsByClassName("ic-worksheet-sheet-container")[0];N&&(N.style.cursor="auto"),o(L=>L+1)},onSelectColumn:()=>{let{column:N}=t.getSelectedView();t.setSelectedRange(1,N,ol,N),o(T=>T+1)},onSelectRow:()=>{let{row:N}=t.getSelectedView();t.setSelectedRange(N,1,N,It),o(T=>T+1)},root:a});S.useEffect(()=>{a.current&&(l.getEditingCell()||g())});let he=S.useCallback(()=>{let{row:N,column:T,range:[L,$,J,P]}=t.getSelectedView();return mw({rowStart:L,rowEnd:J,columnStart:$,columnEnd:P},{row:N,column:T})},[t]),[Z,A]=(()=>{if(l.getEditingCell())return[l.getEditingText(),!0];let{sheet:N,row:T,column:L}=t.getSelectedView(),$=t.getCellArrayStructure(N,T,L);if($!=="SingleCell"&&!("DynamicAnchor"in $)&&!("DynamicChild"in $)){if("ArrayAnchor"in $)return[`{${t.getCellContent(N,T,L)}}`,!1];if("ArrayChild"in $){let J=$.ArrayChild;return[`{${t.getCellContent(N,J[0],J[1])}}`,!1]}}return[t.getCellContent(N,T,L),!0]})(),H=S.useCallback(()=>{let{sheet:N,row:T,column:L}=t.getSelectedView();return t.getCellStyle(N,T,L).style},[t])();return s.jsxs("div",{className:"ic-workbook-container",ref:a,onKeyDown:ne,tabIndex:0,onClick:N=>{l.getEditingCell()?N.stopPropagation():g()},onPaste:N=>{l.clearCutRange();let{items:T}=N.clipboardData;if(!T)return;let L=["application/json","text/plain","text/csv","text/html"],$=null,J=null;for(let P=0;P<L.length&&($=L[P],J=N.clipboardData.getData($),!J);P+=1);if(!(!$||!J)){if($==="application/json"){let P=JSON.parse(J),ee=new Map,Ee=P.sheetData;for(let ce of Object.keys(Ee)){let pe=Ee[ce],Ae=new Map;for(let ge of Object.keys(pe))Ae.set(Number.parseInt(ge,10),pe[ge]);ee.set(Number.parseInt(ce,10),Ae)}try{t.pasteFromClipboard(P.sheet,P.area,ee,P.type==="cut"),o(ce=>ce+1)}catch(ce){u(`${ce}`)}}else if($==="text/plain"){let{sheet:P,range:[ee,Ee,ce,pe]}=t.getSelectedView(),Ae={sheet:P,row:Math.min(ee,ce),column:Math.min(Ee,pe),width:Math.abs(pe-Ee)+1,height:Math.abs(ce-ee)+1};try{t.pasteCsvText(Ae,J),o(ge=>ge+1)}catch(ge){u(`${ge}`)}}N.preventDefault(),N.stopPropagation()}},onCopy:N=>{let T=t.copyToClipboard(),L=t.getSelectedSheet(),$=sessionStorage.getItem(Ni);$||($=jh(),sessionStorage.setItem(Ni,$));let J={};T.data.forEach((ee,Ee)=>{let ce={};ee.forEach((pe,Ae)=>{ce[Ae]=pe}),J[Ee]=ce});let P=JSON.stringify({type:"copy",area:T.range,sheetData:J,sheet:L,clipboardId:$});i.current=P,N.clipboardData.setData("text/plain",T.csv.trim()),N.clipboardData.setData("application/json",P),N.preventDefault(),N.stopPropagation()},onCut:N=>{let T=t.copyToClipboard(),L=t.getSelectedSheet(),$=sessionStorage.getItem(Ni);$||($=jh(),sessionStorage.setItem(Ni,$));let J={};T.data.forEach((ee,Ee)=>{let ce={};ee.forEach((pe,Ae)=>{ce[Ae]=pe}),J[Ee]=ce});let P=JSON.stringify({type:"cut",area:T.range,sheetData:J,sheet:L,clipboardId:$});i.current=P,N.clipboardData.setData("text/plain",T.csv),N.clipboardData.setData("application/json",P),l.setCutRange({sheet:t.getSelectedSheet(),rowStart:T.range[0],rowEnd:T.range[2],columnStart:T.range[1],columnEnd:T.range[3]}),N.preventDefault(),N.stopPropagation(),o(ee=>ee+1)},children:[s.jsx(sS,{canUndo:t.canUndo(),canRedo:t.canRedo(),onRedo:b,onUndo:v,onToggleUnderline:k,onToggleBold:D,onToggleItalic:E,onToggleStrike:M,onToggleHorizontalAlign:x,onToggleVerticalAlign:O,onToggleWrapText:z,onCopyStyles:Y,onTextColorPicked:U,onFillColorPicked:V,onNumberFormatPicked:G,onClearFormatting:()=>{let{sheet:N,range:[T,L,$,J]}=t.getSelectedView();t.rangeClearFormatting(N,T,L,$,J),o(P=>P+1)},onIncreaseFontSize:N=>{R(N)},onDownloadPNG:()=>{var De;let N=(De=r.current)==null?void 0:De.getCanvas();if(!N)return;let{range:[T,L,$,J]}=t.getSelectedView(),[P,ee]=N.getCoordinatesByCell(T,L),[Ee,ce]=N.getCoordinatesByCell($+1,J+1),pe=(Ee-P)*ln,Ae=(ce-ee)*ln;P*=ln,ee*=ln;let ge=document.createElement("canvas");ge.width=pe,ge.height=Ae;let gt=ge.getContext("2d");if(!gt)return;gt.drawImage(N.canvas,P,ee,pe,Ae,0,0,pe,Ae);let ct=document.createElement("a");ct.href=ge.toDataURL("image/png"),ct.download="ironcalc.png",ct.click()},onBorderChanged:N=>{let{sheet:T,range:[L,$,J,P]}=t.getSelectedView(),ee=Math.min(L,J),Ee=Math.min($,P),ce=Math.abs(P-$)+1,pe=Math.abs(J-L)+1,Ae={type:N.border,item:N};t.setAreaWithBorder({sheet:T,row:ee,column:Ee,width:ce,height:pe},Ae),o(ge=>ge+1)},fillColor:H.fill.fg_color||"#FFFFFF",fontColor:H.font.color||"#000000",fontSize:H.font.sz,bold:H.font.b,underline:H.font.u,italic:H.font.i,strike:H.font.strike,horizontalAlign:H.alignment?H.alignment.horizontal:"general",verticalAlign:(K=H.alignment)!=null&&K.vertical?H.alignment.vertical:"bottom",wrapText:((xe=H.alignment)==null?void 0:xe.wrap_text)||!1,canEdit:!0,numFmt:H.num_fmt,showGridLines:t.getShowGridLines(t.getSelectedSheet()),onToggleShowGridLines:N=>{let T=t.getSelectedSheet();t.setShowGridLines(T,N),o(L=>L+1)},formatOptions:W,onOpenConditionalFormatting:()=>w("conditionalFormatting"),isConditionalFormattingOpen:d&&y==="conditionalFormatting",onOpenNamedStyles:()=>w("namedStyles"),isNamedStylesOpen:d&&y==="namedStyles"}),s.jsxs("div",{className:"ic-workbook-worksheet-area-left",style:{width:d?`calc(100% - ${f}px)`:"100%"},children:[s.jsx(yw,{cellAddress:he(),formulaValue:Z,onChange:()=>{o(N=>N+1),g()},onTextUpdated:()=>{o(N=>N+1)},model:t,workbookState:l,openDrawer:()=>{w("namedRanges")},canEdit:A}),s.jsx(SS,{model:t,workbookState:l,refresh:()=>{o(N=>N+1)},ref:r,canEdit:A,onCut:()=>{g(),document.execCommand("cut")},onCopy:()=>{g(),document.execCommand("copy")},onPaste:q}),s.jsx(tS,{sheets:m,selectedIndex:t.getSelectedSheet(),workbookState:l,onSheetSelected:N=>{m[N].state!=="visible"&&t.unhideSheet(N),t.setSelectedSheet(N),o(T=>T+1)},onAddBlankSheet:()=>{t.newSheet(),o(N=>N+1)},onSheetColorChanged:N=>{try{t.setSheetColor(t.getSelectedSheet(),N),o(T=>T+1)}catch(T){alert(`${T}`)}},onSheetRenamed:N=>{try{t.renameSheet(t.getSelectedSheet(),N),o(T=>T+1)}catch(T){alert(`${T}`)}},onSheetDeleted:()=>{let N=t.getSelectedSheet();t.deleteSheet(N),o(T=>T+1)},onHideSheet:()=>{let N=t.getSelectedSheet();t.hideSheet(N),o(T=>T+1)},onOpenRegionalSettings:()=>{w("regionalSettings")},model:t})]}),s.jsx(Zx,{isOpen:d,onClose:()=>h(!1),width:f,onWidthChange:_,model:t,onUpdate:()=>{o(N=>N+1)},getSelectedArea:()=>{let N=t.getWorksheetsProperties().map(T=>T.name);return Op(t.getSelectedView(),N)},drawerType:y,customStyles:(()=>{let N=new Set(t.getBuiltinNamedStyles().map(T=>T.name.toLowerCase()));return t.getNamedStyleList().filter(T=>!N.has(T.toLowerCase())).map(T=>({name:T,style:t.getNamedStyle(T)}))})(),builtinStyles:t.getBuiltinNamedStyles(),formatOptions:W,onApplyNamedStyle:N=>{t.onApplyNamedStyle(N),o(T=>T+1)},onAddNamedStyle:N=>{try{return t.createNamedStyle(N.name,N.style),o(T=>T+1),{nameError:""}}catch(T){return{nameError:T instanceof Error?T.message:String(T)}}},onUpdateNamedStyle:(N,T)=>{try{return t.updateNamedStyle(N,T.name,T.style),o(L=>L+1),{nameError:""}}catch(L){return{nameError:L instanceof Error?L.message:String(L)}}},onDeleteNamedStyle:N=>{t.deleteNamedStyle(N),o(T=>T+1)},initialLocale:t.getLocale(),initialTimezone:t.getTimezone(),initialLanguage:t.getLanguage(),onSettingsSave:(N,T,L)=>{t.setLocale(N),t.setTimezone(T),t.setLanguage(L),o($=>$+1)}}),s.jsx(rs,{open:c!==null,onClose:()=>u(null),title:n("error_dialog.error_deleting_cells"),message:c})]})},ES={color_picker:{add:"Neue Farbe hinzufügen",apply:"Farbe hinzufügen",cancel:"Abbrechen",default:"Standardfarbe",no_fill:"Keine Füllung",recent:"Zuletzt verwendet",title:"Farbwähler"},conditional_formatting:{add_new_rule:"Neue Regel hinzufügen",apply:"Änderungen übernehmen",apply_preset:"Vordefinierter Stil anwenden",apply_to:"Anwenden auf",apply_to_placeholder:"z.B. A1:B10",apply_to_range:"Bereich",back_to_list:"Zurück zur Liste",cancel:"Abbrechen",color_scale_maximum:"Maximum",color_scale_midpoint:"Mittelpunkt",color_scale_minimum:"Minimum",color_scale_settings:"Einstellungen",color_scale_type_formula:"Formel",color_scale_type_max:"Max",color_scale_type_min:"Min",color_scale_type_none:"Keine",color_scale_type_number:"Zahl",color_scale_type_percent:"Prozent",color_scale_type_percentile:"Perzentil",data_bars_gradient_fill:"Verlaufsfüllung",data_bars_maximum:"Maximum",data_bars_minimum:"Minimum",data_bars_negative:"Negativ",data_bars_positive:"Positiv",data_bars_preferences:"Einstellungen",data_bars_settings:"Einstellungen",data_bars_show_value:"Zellenwert anzeigen",data_bars_solid_fill:"Einfarbige Füllung",data_bars_type_automatic:"Automatisch",default_styles:"Voreinstellungen",delete_rule:"Regel löschen",edit_rule:"Regel bearbeiten",empty_message1:"Noch keine Regeln für bedingte Formatierung.",empty_message2:"Klicke auf 'Neu hinzufügen', um eine anzulegen.",filter_label:"Zeigen",filter_selection:"Auswahl",filter_this_sheet:"Dieses Blatt",format_rules:"Formatierungsregeln",format_style:"Formatierungsstil",formula_error_invalid:"Ungültige Formel",formula_error_must_start_with_equals:"Formel muss mit = beginnen",formula_placeholder:"z.B. =A1>0",highlight_cells_if:"Zellen hervorheben, wenn...",icon_sets_else:"Sonst",icon_sets_icons:"Symbole",icon_sets_mode_preset:"Symbolsätze",icon_sets_ratings:"Bewertungen",icon_sets_settings:"Einstellungen",icon_sets_show_value:"Zellenwert anzeigen",icon_sets_when_value_is:"Wenn der Wert",new:"Neu hinzufügen",no_search_results:"Keine Regeln entsprechen Ihrer Suche.",op_begins_with:"Beginnt mit",op_between:"Zwischen",op_contains:"Enthält",op_does_not_contain:"Enthält nicht",op_does_not_equal:"Ungleich",op_ends_with:"Endet mit",op_equals:"Gleich",op_greater_than:"Größer als",op_greater_than_or_equal:"Größer oder gleich",op_in_last_7_days:"Letzte 7 Tage",op_in_next_7_days:"Nächste 7 Tage",op_last_month:"Letzter Monat",op_last_week:"Letzte Woche",op_last_year:"Letztes Jahr",op_less_than:"Kleiner als",op_less_than_or_equal:"Kleiner oder gleich",op_next_month:"Nächster Monat",op_next_week:"Nächste Woche",op_next_year:"Nächstes Jahr",op_not_between:"Nicht zwischen",op_this_month:"Dieser Monat",op_this_week:"Diese Woche",op_this_year:"Dieses Jahr",op_today:"Heute",op_tomorrow:"Morgen",op_yesterday:"Gestern",rule_type_blanks:"Leerzellen",rule_type_cell_value:"Zellenwert...",rule_type_date:"Datum...",rule_type_duplicate_values:"Doppelte Werte",rule_type_errors:"Fehler",rule_type_formula:"Formel",rule_type_no_blanks:"Nicht-Leerzellen",rule_type_no_errors:"Keine Fehler",rule_type_text:"Text...",rule_type_unique_values:"Eindeutige Werte",rule_value_placeholder:"Wert",search_placeholder:"Suchen...",stop_if_true:"Anhalten, wenn wahr",tab_classic:"Werte",tab_color_scale:"Farbskala",tab_data_bars:"Datenbalken",tab_icon_sets:"Symbole",title:"Bedingte Formatierung",use_selection:"Auswahl übernehmen"},context_menu:{cell:{copy:"Kopieren",cut:"Ausschneiden",delete:"Löschen...",delete_column:"Spalte '{{column}}'",delete_row:"Zeile '{{row}}'",insert:"Einfügen...",insert_column_left:"Spalte links",insert_column_right:"Spalte rechts",insert_row_above:"Zeile oben",insert_row_below:"Zeile unten",paste:"Einfügen"},column_header:{delete_column:"Spalte '{{column}}' löschen",delete_columns:"Spalten {{columnStart}} - {{columnEnd}} löschen",freeze_columns:"Bis Spalte '{{column}}' fixieren",hide_column:"Spalte '{{column}}' ausblenden",hide_columns:"Spalten {{columnStart}} - {{columnEnd}} ausblenden",insert_columns_after:"{{count}} Spalte(n) rechts einfügen",insert_columns_before:"{{count}} Spalte(n) links einfügen",move_columns_left:"Spalten nach links verschieben",move_columns_right:"Spalten nach rechts verschieben",show_hidden_columns:"Ausgeblendete Spalten einblenden",unfreeze_columns:"Fixierung der Spalten aufheben"},row_header:{delete_row:"Zeile '{{row}}' löschen",delete_rows:"Zeilen {{rowStart}} - {{rowEnd}} löschen",freeze_rows:"Bis Zeile '{{row}}' fixieren",hide_row:"Zeile '{{row}}' ausblenden",hide_rows:"Zeilen {{rowStart}} - {{rowEnd}} ausblenden",insert_rows_above:"{{count}} Zeile(n) oberhalb einfügen",insert_rows_below:"{{count}} Zeile(n) unterhalb einfügen",move_rows_down:"Zeilen nach unten verschieben",move_rows_up:"Zeilen nach oben verschieben",show_hidden_rows:"Ausgeblendete Zeilen einblenden",unfreeze_rows:"Fixierung der Zeilen aufheben"}},error_dialog:{error_clipboard_paste:"Zugriff auf die Zwischenablage verweigert. Bitte erlauben Sie Zwischenablage-Berechtigungen in Ihrem Browser.",error_deleting_cells:"Zellen konnten nicht gelöscht werden",error_deleting_columns:"Spalten konnten nicht gelöscht werden",error_deleting_rows:"Zeilen konnten nicht gelöscht werden",error_editing_formula:"Fehler beim Bearbeiten der Formel",error_inserting_columns:"Spalten konnten nicht eingefügt werden",error_inserting_rows:"Zeilen konnten nicht eingefügt werden",error_moving_columns:"Spalten konnten nicht verschoben werden",error_moving_rows:"Zeilen konnten nicht verschoben werden"},formula_bar:{manage_named_ranges:"Benannte Bereiche verwalten"},name_manager_dialog:{add_new_range:"Neuen Bereich hinzufügen",apply:"Änderungen übernehmen",back_to_list:"Zurück zur Liste",cancel:"Abbrechen",default_range_prefix:"Bereich",delete:"Bereich löschen",edit:"Bereich bearbeiten",edit_range:"Bereich bearbeiten",empty_message1:"Es wurden noch keine benannten Bereiche hinzugefügt.",empty_message2:"Klicke auf „Neu hinzufügen“, um einen anzulegen.",enter_formula:"Formel eingeben",enter_range_name:"Bereichsnamen eingeben",global:"(Global)",new:"Neu hinzufügen",new_named_range:"Neuer benannter Bereich",no_search_results:"Keine benannten Bereiche entsprechen Ihrer Suche.",range_name:"Bereichsname",refers_to:"Bezieht sich auf",scope_filter_all:"Alle",scope_filter_current:"Aktuelles Blatt",scope_filter_global:"Global",scope_helper:"Der Geltungsbereich bestimmt, wo der benannte Bereich verfügbar ist.",scope_label:"Scope",search_placeholder:"Suchen...",title:"Benannte Bereiche",use_selection:"Auswahl übernehmen",workbook:"Arbeitsmappe"},named_styles:{add_new_style:"Neu hinzufügen",apply:"Anwenden",back_to_list:"Zurück zur Liste",cancel:"Abbrechen",confirm_delete_message:"Möchten Sie wirklich löschen",delete_style:"Stil löschen",manage_styles:"Stile verwalten",name_already_exists:"Ein Stil mit diesem Namen existiert bereits",new_style:"Neuer Stil",panel_title:"Zellformate",update_style:"Stil bearbeiten"},navigation:{add_sheet:"Tabellenblatt hinzufügen",sheet_list:"Tabellenblattliste"},num_fmt:{cancel:"Abbrechen",close:"Dialog schließen",save:"Speichern",title:"Benutzerdefiniertes Zahlenformat"},regional_settings:{language:{display_language:{de:"Deutsch",en:"English",es:"Español",fr:"Français",it:"Italiano"}},locale:{delimiter_comma:"Komma",delimiter_semicolon:"Semikolon",locale_example1:"Zahl",locale_example2:"Datum und Uhrzeit",locale_example3:"Formeltrennzeichen",locale_label:"Regionaleinstellung",title:"Regionaleinstellung"},open_regional_settings:"Regionaleinstellungen öffnen",timezone:{timezone_helper:"Das Ändern dieser Einstellung wirkt sich auf datums- und zeitbezogene Funktionen aus, einschließlich HEUTE() und JETZT().",timezone_label:"Zeitzone",title:"Zeitzone"},title:"Regionaleinstellungen"},right_drawer:{close:"Schließen",resize_drawer:"Größe der Seitenleiste ändern"},sheet_delete:{cancel:"Abbrechen",confirm:"Ja, Tabellenblatt löschen",message:"Das Tabellenblatt '{{sheetName}}' wird gelöscht.",title:"Bist du sicher?"},sheet_tab:{change_color:"Farbe ändern",delete:"Löschen",hide_sheet:"Tabellenblatt ausblenden",open_menu:"Tabellenblattmenü öffnen",rename:"Umbenennen"},toolbar:{align_center:"Zentrieren",align_left:"Links ausrichten",align_right:"Rechts ausrichten",bold:"Fett",borders:{all:"Alle Rahmen",bottom:"Unterer Rahmen",clear:"Rahmen entfernen",color:"Rahmenfarbe",horizontal:"Horizontale Rahmen",inner:"Innere Rahmen",left:"Linker Rahmen",outer:"Äußere Rahmen",right:"Rechter Rahmen",style:"Rahmenstil",title:"Rahmen",top:"Oberer Rahmen",vertical:"Vertikale Rahmen"},clear_formatting:"Formatierung löschen",conditional_formatting:"Bedingte Formatierung",copy_styles:"Formatierung kopieren",currency:"Als Währung formatieren",decimal_places_decrease:"Dezimalstellen verringern",decimal_places_increase:"Dezimalstellen erhöhen",decrease_font_size:"Schriftgröße verringern",download_png:"Als PNG herunterladen",fill_color:"Füllfarbe",font_color:"Schriftfarbe",format_menu:{auto:"Automatisch",currency_eur:"Euro (EUR)",currency_eur_example:"€",currency_gbp:"Britisches Pfund (GBP)",currency_gbp_example:"£",currency_usd:"Dollar (USD)",currency_usd_example:"$",custom:"Benutzerdefiniert",date_long:"Langes Datum",date_short:"Kurzes Datum",number:"Zahl",percentage:"Prozent",percentage_example:"10%"},format_number:"Zahlenformat",increase_font_size:"Schriftgröße erhöhen",italic:"Kursiv",named_styles:"Zellformate",percentage:"Als Prozent formatieren",redo:"Wiederholen",scroll_left:"Nach links scrollen",scroll_right:"Nach rechts scrollen",selected_png:"Ausgewählten Bereich als PNG exportieren",show_hide_grid_lines:"Gitternetzlinien ein-/ausblenden",strike_through:"Durchgestrichen",underline:"Unterstrichen",undo:"Rückgängig",vertical_align_bottom:"Unten ausrichten",vertical_align_middle:"Mittig ausrichten",vertical_align_top:"Oben ausrichten",wrap_text:"Text umbrechen"}},em={color_picker:{add:"Add new color",apply:"Add color",cancel:"Cancel",default:"Default color",no_fill:"No fill",recent:"Recent",title:"Color Picker"},conditional_formatting:{add_new_rule:"Add a new rule",apply:"Apply changes",apply_preset:"Apply preset style",apply_to:"Apply to",apply_to_placeholder:"e.g. A1:B10",apply_to_range:"Range",back_to_list:"Back to list",cancel:"Cancel",color_scale_maximum:"Maximum",color_scale_midpoint:"Midpoint",color_scale_minimum:"Minimum",color_scale_settings:"Settings",color_scale_type_formula:"Formula",color_scale_type_max:"Max",color_scale_type_min:"Min",color_scale_type_none:"None",color_scale_type_number:"Number",color_scale_type_percent:"Percent",color_scale_type_percentile:"Percentile",data_bars_gradient_fill:"Gradient fill",data_bars_maximum:"Maximum",data_bars_minimum:"Minimum",data_bars_negative:"Negative",data_bars_positive:"Positive",data_bars_preferences:"Preferences",data_bars_settings:"Settings",data_bars_show_value:"Show cell value",data_bars_solid_fill:"Solid fill",data_bars_type_automatic:"Automatic",default_styles:"Presets",delete_rule:"Delete rule",edit_rule:"Edit rule",empty_message1:"No conditional formatting rules yet.",empty_message2:"Click on 'Add new' to add one.",filter_label:"Show",filter_selection:"Selection",filter_this_sheet:"This sheet",format_rules:"Format rules",format_style:"Format style",formula_error_invalid:"Invalid formula",formula_error_must_start_with_equals:"Formula must start with =",formula_placeholder:"e.g. =A1>0",highlight_cells_if:"Highlight cells if...",icon_sets_else:"Else",icon_sets_icons:"icons",icon_sets_mode_preset:"Icon Sets",icon_sets_ratings:"Ratings",icon_sets_settings:"Settings",icon_sets_show_value:"Show cell value",icon_sets_when_value_is:"When value is",new:"Add new",no_search_results:"No rules match your search.",op_begins_with:"Begins With",op_between:"Between",op_contains:"Contains",op_does_not_contain:"Does Not Contain",op_does_not_equal:"Does Not Equal",op_ends_with:"Ends With",op_equals:"Equals",op_greater_than:"Greater Than",op_greater_than_or_equal:"Greater Than or Equal To",op_in_last_7_days:"Last 7 Days",op_in_next_7_days:"Next 7 Days",op_last_month:"Last Month",op_last_week:"Last Week",op_last_year:"Last Year",op_less_than:"Less Than",op_less_than_or_equal:"Less Than or Equal To",op_next_month:"Next Month",op_next_week:"Next Week",op_next_year:"Next Year",op_not_between:"Not Between",op_this_month:"This Month",op_this_week:"This Week",op_this_year:"This Year",op_today:"Today",op_tomorrow:"Tomorrow",op_yesterday:"Yesterday",rule_type_blanks:"Blanks",rule_type_cell_value:"Cell value...",rule_type_date:"Date...",rule_type_duplicate_values:"Duplicated Values",rule_type_errors:"Errors",rule_type_formula:"Formula",rule_type_no_blanks:"No Blanks",rule_type_no_errors:"No Errors",rule_type_text:"Text...",rule_type_unique_values:"Unique Values",rule_value_placeholder:"Value",search_placeholder:"Search...",stop_if_true:"Stop if true",tab_classic:"Rule based",tab_color_scale:"Color Scale",tab_data_bars:"Data Bars",tab_icon_sets:"Icons",title:"Conditional Formatting",use_selection:"Use selected range"},context_menu:{cell:{copy:"Copy",cut:"Cut",delete:"Delete...",delete_column:"Column '{{column}}'",delete_row:"Row '{{row}}'",insert:"Insert...",insert_column_left:"Column left",insert_column_right:"Column right",insert_row_above:"Row above",insert_row_below:"Row below",paste:"Paste"},column_header:{delete_column:"Delete column '{{column}}'",delete_columns:"Delete columns {{columnStart}} - {{columnEnd}}",freeze_columns:"Freeze up to column '{{column}}'",hide_column:"Hide column '{{column}}'",hide_columns:"Hide columns {{columnStart}} - {{columnEnd}}",insert_columns_after:"Insert {{count}} column(s) right",insert_columns_before:"Insert {{count}} column(s) left",move_columns_left:"Move columns left",move_columns_right:"Move columns right",show_hidden_columns:"Show hidden columns",unfreeze_columns:"Unfreeze columns"},row_header:{delete_row:"Delete row '{{row}}'",delete_rows:"Delete rows {{rowStart}} - {{rowEnd}}",freeze_rows:"Freeze up to row '{{row}}'",hide_row:"Hide row '{{row}}'",hide_rows:"Hide rows {{rowStart}} - {{rowEnd}}",insert_rows_above:"Insert {{count}} row(s) above",insert_rows_below:"Insert {{count}} row(s) below",move_rows_down:"Move rows down",move_rows_up:"Move rows up",show_hidden_rows:"Show hidden rows",unfreeze_rows:"Unfreeze rows"}},error_dialog:{error_clipboard_paste:"Clipboard access denied. Please allow clipboard permissions in your browser.",error_deleting_cells:"Failed to delete cells",error_deleting_columns:"Failed to delete columns",error_deleting_rows:"Failed to delete rows",error_editing_formula:"Error editing formula",error_inserting_columns:"Failed to insert columns",error_inserting_rows:"Failed to insert rows",error_moving_columns:"Failed to move columns",error_moving_rows:"Failed to move rows"},formula_bar:{manage_named_ranges:"Manage Named Ranges"},name_manager_dialog:{add_new_range:"Add a new range",apply:"Apply changes",back_to_list:"Back to list",cancel:"Cancel",default_range_prefix:"Range",delete:"Delete Range",edit:"Edit Range",edit_range:"Edit range",empty_message1:"No named ranges added yet.",empty_message2:"Click on 'Add new' to add one.",enter_formula:"Enter formula",enter_range_name:"Enter range name",global:"(Global)",new:"Add new",new_named_range:"New Named Range",no_search_results:"No named ranges match your search.",range_name:"Range name",refers_to:"Refers to",scope_filter_all:"All",scope_filter_current:"Current sheet",scope_filter_global:"Global",scope_helper:"The scope of the named range determines where it is available.",scope_label:"Scope",search_placeholder:"Search...",title:"Named Ranges",use_selection:"Use selected range",workbook:"Workbook"},named_styles:{add_new_style:"Add new",apply:"Apply",back_to_list:"Back to list",cancel:"Cancel",confirm_delete_message:"Are you sure you want to delete",delete_style:"Delete style",manage_styles:"Manage styles",name_already_exists:"A style with this name already exists",new_style:"New style",panel_title:"Cell styles",update_style:"Edit style"},navigation:{add_sheet:"Add sheet",sheet_list:"Sheet list"},num_fmt:{cancel:"Cancel",close:"Close dialog",save:"Save",title:"Custom number format"},regional_settings:{language:{display_language:{de:"Deutsch",en:"English",es:"Español",fr:"Français",it:"Italiano"}},locale:{delimiter_comma:"Comma",delimiter_semicolon:"Semicolon",locale_example1:"Number",locale_example2:"Date and Time",locale_example3:"Formula delimiter",locale_label:"Locale",title:"Locale"},open_regional_settings:"Open regional settings",timezone:{timezone_helper:"Modifying this setting will impact date- and time-related functions, including TODAY() and NOW().",timezone_label:"Timezone",title:"Timezone"},title:"Regional Settings"},right_drawer:{close:"Close",resize_drawer:"Resize drawer"},sheet_delete:{cancel:"Cancel",confirm:"Yes, delete sheet",message:"The sheet '{{sheetName}}' will be deleted.",title:"Are you sure?"},sheet_tab:{change_color:"Change Color",delete:"Delete",hide_sheet:"Hide sheet",open_menu:"Open sheet menu",rename:"Rename"},toolbar:{align_center:"Align center",align_left:"Align left",align_right:"Align right",bold:"Bold",borders:{all:"All borders",bottom:"Bottom borders",clear:"Clear borders",color:"Border color",horizontal:"Horizontal borders",inner:"Inner borders",left:"Left borders",outer:"Outer borders",right:"Right borders",style:"Border style",title:"Borders",top:"Top borders",vertical:"Vertical borders"},clear_formatting:"Clear formatting",conditional_formatting:"Conditional formatting",copy_styles:"Copy styles",currency:"Format as currency",decimal_places_decrease:"Decrease decimal places",decimal_places_increase:"Increase decimal places",decrease_font_size:"Decrease font size",download_png:"Download as PNG",fill_color:"Fill color",font_color:"Font color",format_menu:{auto:"Auto",currency_eur:"Euro (EUR)",currency_eur_example:"€",currency_gbp:"British Pound (GBP)",currency_gbp_example:"£",currency_usd:"Dollar (USD)",currency_usd_example:"$",custom:"Custom",date_long:"Long date",date_short:"Short date",number:"Number",percentage:"Percentage",percentage_example:"10%"},format_number:"Format number",increase_font_size:"Increase font size",italic:"Italic",named_styles:"Cell styles",percentage:"Format as percentage",redo:"Redo",scroll_left:"Scroll left",scroll_right:"Scroll right",selected_png:"Export selected area as PNG",show_hide_grid_lines:"Show/hide grid lines",strike_through:"Strikethrough",underline:"Underline",undo:"Undo",vertical_align_bottom:"Align bottom",vertical_align_middle:"Align middle",vertical_align_top:"Align top",wrap_text:"Wrap text"}},NS={"en-US":{translation:em},"en-GB":{translation:em},"es-ES":{translation:{color_picker:{add:"Añadir nuevo color",apply:"Añadir color",cancel:"Cancelar",default:"Color predeterminado",no_fill:"Sin relleno",recent:"Recientes",title:"Selector de color"},conditional_formatting:{add_new_rule:"Añadir una nueva regla",apply:"Aplicar cambios",apply_preset:"Aplicar estilo predefinido",apply_to:"Aplicar a",apply_to_placeholder:"ej. A1:B10",apply_to_range:"Rango",back_to_list:"Volver a la lista",cancel:"Cancelar",color_scale_maximum:"Máximo",color_scale_midpoint:"Punto medio",color_scale_minimum:"Mínimo",color_scale_settings:"Configuración",color_scale_type_formula:"Fórmula",color_scale_type_max:"Máx",color_scale_type_min:"Mín",color_scale_type_none:"Ninguno",color_scale_type_number:"Número",color_scale_type_percent:"Porcentaje",color_scale_type_percentile:"Percentil",data_bars_gradient_fill:"Relleno degradado",data_bars_maximum:"Máximo",data_bars_minimum:"Mínimo",data_bars_negative:"Negativo",data_bars_positive:"Positivo",data_bars_preferences:"Preferencias",data_bars_settings:"Configuración",data_bars_show_value:"Mostrar valor de celda",data_bars_solid_fill:"Relleno sólido",data_bars_type_automatic:"Automático",default_styles:"Presets",delete_rule:"Eliminar regla",edit_rule:"Editar regla",empty_message1:"Aún no hay reglas de formato condicional.",empty_message2:"Haz clic en 'Añadir nuevo' para agregar una.",filter_label:"Ver",filter_selection:"Selección",filter_this_sheet:"Esta hoja",format_rules:"Reglas de formato",format_style:"Estilo de formato",formula_error_invalid:"Fórmula no válida",formula_error_must_start_with_equals:"La fórmula debe empezar con =",formula_placeholder:"ej. =A1>0",highlight_cells_if:"Resaltar celdas si...",icon_sets_else:"En caso contrario",icon_sets_icons:"iconos",icon_sets_mode_preset:"Conjuntos de iconos",icon_sets_ratings:"Valoraciones",icon_sets_settings:"Configuración",icon_sets_show_value:"Mostrar valor de celda",icon_sets_when_value_is:"Cuando el valor es",new:"Añadir nuevo",no_search_results:"Ninguna regla coincide con tu búsqueda.",op_begins_with:"Comienza con",op_between:"Entre",op_contains:"Contiene",op_does_not_contain:"No contiene",op_does_not_equal:"Distinto de",op_ends_with:"Termina con",op_equals:"Igual a",op_greater_than:"Mayor que",op_greater_than_or_equal:"Mayor o igual que",op_in_last_7_days:"Últimos 7 días",op_in_next_7_days:"Próximos 7 días",op_last_month:"Mes pasado",op_last_week:"Semana pasada",op_last_year:"Año pasado",op_less_than:"Menor que",op_less_than_or_equal:"Menor o igual que",op_next_month:"Próximo mes",op_next_week:"Próxima semana",op_next_year:"Próximo año",op_not_between:"No entre",op_this_month:"Este mes",op_this_week:"Esta semana",op_this_year:"Este año",op_today:"Hoy",op_tomorrow:"Mañana",op_yesterday:"Ayer",rule_type_blanks:"Celdas vacías",rule_type_cell_value:"Valor de celda...",rule_type_date:"Fecha...",rule_type_duplicate_values:"Valores duplicados",rule_type_errors:"Errores",rule_type_formula:"Fórmula",rule_type_no_blanks:"Celdas no vacías",rule_type_no_errors:"Sin errores",rule_type_text:"Texto...",rule_type_unique_values:"Valores únicos",rule_value_placeholder:"Valor",search_placeholder:"Buscar...",stop_if_true:"Detener si es verdadero",tab_classic:"Valores",tab_color_scale:"Escalas",tab_data_bars:"Barras",tab_icon_sets:"Iconos",title:"Formato condicional",use_selection:"Usar rango seleccionado"},context_menu:{cell:{copy:"Copiar",cut:"Cortar",delete:"Eliminar...",delete_column:"Columna '{{column}}'",delete_row:"Fila '{{row}}'",insert:"Insertar...",insert_column_left:"Columna a la izquierda",insert_column_right:"Columna a la derecha",insert_row_above:"Fila encima",insert_row_below:"Fila debajo",paste:"Pegar"},column_header:{delete_column:"Eliminar la columna '{{column}}'",delete_columns:"Eliminar las columnas {{columnStart}} - {{columnEnd}}",freeze_columns:"Fijar hasta la columna '{{column}}'",hide_column:"Ocultar la columna '{{column}}'",hide_columns:"Ocultar las columnas {{columnStart}} - {{columnEnd}}",insert_columns_after:"Insertar {{count}} columna(s) a la derecha",insert_columns_before:"Insertar {{count}} columna(s) a la izquierda",move_columns_left:"Mover columnas a la izquierda",move_columns_right:"Mover columnas a la derecha",show_hidden_columns:"Mostrar columnas ocultas",unfreeze_columns:"Quitar fijación de columnas"},row_header:{delete_row:"Eliminar la fila '{{row}}'",delete_rows:"Eliminar las filas {{rowStart}} - {{rowEnd}}",freeze_rows:"Fijar hasta la fila '{{row}}'",hide_row:"Ocultar la fila '{{row}}'",hide_rows:"Ocultar las filas {{rowStart}} - {{rowEnd}}",insert_rows_above:"Insertar {{count}} fila(s) encima",insert_rows_below:"Insertar {{count}} fila(s) debajo",move_rows_down:"Mover filas hacia abajo",move_rows_up:"Mover filas hacia arriba",show_hidden_rows:"Mostrar filas ocultas",unfreeze_rows:"Quitar fijación de filas"}},error_dialog:{error_clipboard_paste:"Acceso al portapapeles denegado. Por favor, permite el acceso al portapapeles en tu navegador.",error_deleting_cells:"Error al eliminar las celdas",error_deleting_columns:"Error al eliminar las columnas",error_deleting_rows:"Error al eliminar las filas",error_editing_formula:"Error al editar la fórmula",error_inserting_columns:"Error al insertar las columnas",error_inserting_rows:"Error al insertar las filas",error_moving_columns:"Error al mover las columnas",error_moving_rows:"Error al mover las filas"},formula_bar:{manage_named_ranges:"Gestionar rangos con nombre"},name_manager_dialog:{add_new_range:"Añadir un nuevo rango",apply:"Aplicar cambios",back_to_list:"Volver a la lista",cancel:"Cancelar",default_range_prefix:"Rango",delete:"Eliminar rango",edit:"Editar rango",edit_range:"Editar rango",empty_message1:"Aún no se han añadido rangos con nombre.",empty_message2:"Haz clic en 'Añadir nuevo' para agregar uno.",enter_formula:"Introduce la fórmula",enter_range_name:"Introduce el nombre del rango",global:"(Global)",new:"Añadir nuevo",new_named_range:"Nuevo rango con nombre",no_search_results:"Ningún rango con nombre coincide con tu búsqueda.",range_name:"Nombre del rango",refers_to:"Hace referencia a",scope_filter_all:"Todo",scope_filter_current:"Hoja actual",scope_filter_global:"Global",scope_helper:"El ámbito del rango con nombre determina dónde está disponible.",scope_label:"Ámbito",search_placeholder:"Buscar...",title:"Rangos con nombre",use_selection:"Usar rango seleccionado",workbook:"Libro"},named_styles:{add_new_style:"Añadir nuevo",apply:"Aplicar",back_to_list:"Volver a la lista",cancel:"Cancelar",confirm_delete_message:"¿Seguro que desea eliminar",delete_style:"Eliminar estilo",manage_styles:"Gestionar estilos",name_already_exists:"Ya existe un estilo con este nombre",new_style:"Nuevo estilo",panel_title:"Estilos de celda",update_style:"Editar estilo"},navigation:{add_sheet:"Añadir hoja",sheet_list:"Lista de hojas"},num_fmt:{cancel:"Cancelar",close:"Cerrar diálogo",save:"Guardar",title:"Formato de número personalizado"},regional_settings:{language:{display_language:{de:"Deutsch",en:"English",es:"Español",fr:"Français",it:"Italiano"}},locale:{delimiter_comma:"Coma",delimiter_semicolon:"Punto y coma",locale_example1:"Número",locale_example2:"Fecha y hora",locale_example3:"Delimitador de fórmulas",locale_label:"Configuración regional",title:"Configuración regional"},open_regional_settings:"Abrir configuración regional",timezone:{timezone_helper:"Modificar esta configuración afectará a las funciones relacionadas con fecha y hora, incluyendo HOY() y AHORA().",timezone_label:"Zona horaria",title:"Zona horaria"},title:"Configuración regional"},right_drawer:{close:"Cerrar",resize_drawer:"Cambiar tamaño del panel"},sheet_delete:{cancel:"Cancelar",confirm:"Sí, eliminar hoja",message:"La hoja '{{sheetName}}' será eliminada.",title:"¿Estás seguro?"},sheet_tab:{change_color:"Cambiar color",delete:"Eliminar",hide_sheet:"Ocultar hoja",open_menu:"Abrir menú de hoja",rename:"Renombrar"},toolbar:{align_center:"Alinear al centro",align_left:"Alinear a la izquierda",align_right:"Alinear a la derecha",bold:"Negrita",borders:{all:"Todos los bordes",bottom:"Bordes inferiores",clear:"Quitar bordes",color:"Color del borde",horizontal:"Bordes horizontales",inner:"Bordes internos",left:"Bordes izquierdos",outer:"Bordes externos",right:"Bordes derechos",style:"Estilo del borde",title:"Bordes",top:"Bordes superiores",vertical:"Bordes verticales"},clear_formatting:"Borrar formato",conditional_formatting:"Formato condicional",copy_styles:"Copiar estilos",currency:"Formato moneda",decimal_places_decrease:"Disminuir decimales",decimal_places_increase:"Aumentar decimales",decrease_font_size:"Disminuir tamaño de fuente",download_png:"Descargar como PNG",fill_color:"Color de relleno",font_color:"Color de fuente",format_menu:{auto:"Automático",currency_eur:"Euro (EUR)",currency_eur_example:"€",currency_gbp:"Libra esterlina (GBP)",currency_gbp_example:"£",currency_usd:"Dólar (USD)",currency_usd_example:"$",custom:"Personalizado",date_long:"Fecha larga",date_short:"Fecha corta",number:"Número",percentage:"Porcentaje",percentage_example:"10%"},format_number:"Formato de número",increase_font_size:"Aumentar tamaño de fuente",italic:"Cursiva",named_styles:"Estilos de celda",percentage:"Formato porcentaje",redo:"Rehacer",scroll_left:"Desplazar a la izquierda",scroll_right:"Desplazar a la derecha",selected_png:"Exportar área seleccionada como PNG",show_hide_grid_lines:"Mostrar/ocultar líneas de cuadrícula",strike_through:"Tachado",underline:"Subrayado",undo:"Deshacer",vertical_align_bottom:"Alinear abajo",vertical_align_middle:"Alinear al medio",vertical_align_top:"Alinear arriba",wrap_text:"Ajustar texto"}}},"fr-FR":{translation:{color_picker:{add:"Ajouter une nouvelle couleur",apply:"Ajouter la couleur",cancel:"Annuler",default:"Couleur par défaut",no_fill:"Sans remplissage",recent:"Récentes",title:"Sélecteur de couleur"},conditional_formatting:{add_new_rule:"Ajouter une nouvelle règle",apply:"Appliquer les modifications",apply_preset:"Appliquer un style prédéfini",apply_to:"Appliquer à",apply_to_placeholder:"ex. A1:B10",apply_to_range:"Plage",back_to_list:"Retour à la liste",cancel:"Annuler",color_scale_maximum:"Maximum",color_scale_midpoint:"Point médian",color_scale_minimum:"Minimum",color_scale_settings:"Paramètres",color_scale_type_formula:"Formule",color_scale_type_max:"Max",color_scale_type_min:"Min",color_scale_type_none:"Aucun",color_scale_type_number:"Nombre",color_scale_type_percent:"Pourcentage",color_scale_type_percentile:"Centile",data_bars_gradient_fill:"Remplissage dégradé",data_bars_maximum:"Maximum",data_bars_minimum:"Minimum",data_bars_negative:"Négatif",data_bars_positive:"Positif",data_bars_preferences:"Préférences",data_bars_settings:"Paramètres",data_bars_show_value:"Afficher la valeur de la cellule",data_bars_solid_fill:"Remplissage uni",data_bars_type_automatic:"Automatique",default_styles:"Préréglages",delete_rule:"Supprimer la règle",edit_rule:"Modifier la règle",empty_message1:"Aucune règle de mise en forme conditionnelle.",empty_message2:"Cliquez sur « Ajouter » pour en créer une.",filter_label:"Voir",filter_selection:"Sélection",filter_this_sheet:"Cette feuille",format_rules:"Règles de mise en forme",format_style:"Style de mise en forme",formula_error_invalid:"Formule invalide",formula_error_must_start_with_equals:"La formule doit commencer par =",formula_placeholder:"ex. =A1>0",highlight_cells_if:"Mettre en surbrillance si...",icon_sets_else:"Sinon",icon_sets_icons:"icônes",icon_sets_mode_preset:"Jeux d'icônes",icon_sets_ratings:"Évaluations",icon_sets_settings:"Paramètres",icon_sets_show_value:"Afficher la valeur de la cellule",icon_sets_when_value_is:"Quand la valeur est",new:"Ajouter",no_search_results:"Aucune règle ne correspond à votre recherche.",op_begins_with:"Commence par",op_between:"Entre",op_contains:"Contient",op_does_not_contain:"Ne contient pas",op_does_not_equal:"Différent de",op_ends_with:"Se termine par",op_equals:"Égal à",op_greater_than:"Supérieur à",op_greater_than_or_equal:"Supérieur ou égal à",op_in_last_7_days:"7 derniers jours",op_in_next_7_days:"7 prochains jours",op_last_month:"Mois dernier",op_last_week:"Semaine dernière",op_last_year:"L'année dernière",op_less_than:"Inférieur à",op_less_than_or_equal:"Inférieur ou égal à",op_next_month:"Mois prochain",op_next_week:"Semaine prochaine",op_next_year:"L'année prochaine",op_not_between:"Pas entre",op_this_month:"Ce mois-ci",op_this_week:"Cette semaine",op_this_year:"Cette année",op_today:"Aujourd'hui",op_tomorrow:"Demain",op_yesterday:"Hier",rule_type_blanks:"Cellules vides",rule_type_cell_value:"Valeur de la cellule...",rule_type_date:"Date...",rule_type_duplicate_values:"Valeurs en double",rule_type_errors:"Erreurs",rule_type_formula:"Formule",rule_type_no_blanks:"Cellules non vides",rule_type_no_errors:"Sans erreurs",rule_type_text:"Texte...",rule_type_unique_values:"Valeurs uniques",rule_value_placeholder:"Valeur",search_placeholder:"Rechercher...",stop_if_true:"Arrêter si vrai",tab_classic:"Valeurs",tab_color_scale:"Nuances",tab_data_bars:"Barres",tab_icon_sets:"Icônes",title:"Mise en forme conditionnelle",use_selection:"Utiliser la plage sélectionnée"},context_menu:{cell:{copy:"Copier",cut:"Couper",delete:"Supprimer...",delete_column:"Colonne '{{column}}'",delete_row:"Ligne '{{row}}'",insert:"Insérer...",insert_column_left:"Colonne à gauche",insert_column_right:"Colonne à droite",insert_row_above:"Ligne au-dessus",insert_row_below:"Ligne en-dessous",paste:"Coller"},column_header:{delete_column:"Supprimer la colonne '{{column}}'",delete_columns:"Supprimer les colonnes {{columnStart}} - {{columnEnd}}",freeze_columns:"Figer jusqu’à la colonne '{{column}}'",hide_column:"Masquer la colonne '{{column}}'",hide_columns:"Masquer les colonnes {{columnStart}} - {{columnEnd}}",insert_columns_after:"Insérer {{count}} colonne(s) à droite",insert_columns_before:"Insérer {{count}} colonne(s) à gauche",move_columns_left:"Déplacer les colonnes vers la gauche",move_columns_right:"Déplacer les colonnes vers la droite",show_hidden_columns:"Afficher les colonnes masquées",unfreeze_columns:"Annuler le figeage des colonnes"},row_header:{delete_row:"Supprimer la ligne '{{row}}'",delete_rows:"Supprimer les lignes {{rowStart}} - {{rowEnd}}",freeze_rows:"Figer jusqu’à la ligne '{{row}}'",hide_row:"Masquer la ligne '{{row}}'",hide_rows:"Masquer les lignes {{rowStart}} - {{rowEnd}}",insert_rows_above:"Insérer {{count}} ligne(s) au-dessus",insert_rows_below:"Insérer {{count}} ligne(s) en dessous",move_rows_down:"Déplacer les lignes vers le bas",move_rows_up:"Déplacer les lignes vers le haut",show_hidden_rows:"Afficher les lignes masquées",unfreeze_rows:"Annuler le figeage des lignes"}},error_dialog:{error_clipboard_paste:"Accès au presse-papiers refusé. Veuillez autoriser les permissions du presse-papiers dans votre navigateur.",error_deleting_cells:"Échec de la suppression des cellules",error_deleting_columns:"Échec de la suppression des colonnes",error_deleting_rows:"Échec de la suppression des lignes",error_editing_formula:"Erreur lors de la modification de la formule",error_inserting_columns:"Échec de l'insertion des colonnes",error_inserting_rows:"Échec de l'insertion des lignes",error_moving_columns:"Échec du déplacement des colonnes",error_moving_rows:"Échec du déplacement des lignes"},formula_bar:{manage_named_ranges:"Gérer les plages nommées"},name_manager_dialog:{add_new_range:"Ajouter une nouvelle plage",apply:"Appliquer les modifications",back_to_list:"Retour à la liste",cancel:"Annuler",default_range_prefix:"Plage",delete:"Supprimer la plage",edit:"Modifier la plage",edit_range:"Modifier la plage",empty_message1:"Aucune plage nommée n’a encore été ajoutée.",empty_message2:"Cliquez sur « Ajouter » pour en créer une.",enter_formula:"Saisir la formule",enter_range_name:"Saisir le nom de la plage",global:"(Global)",new:"Ajouter",new_named_range:"Nouvelle plage nommée",no_search_results:"Aucune plage nommée ne correspond à votre recherche.",range_name:"Nom de la plage",refers_to:"Fait référence à",scope_filter_all:"Tous",scope_filter_current:"Feuille actuelle",scope_filter_global:"Global",scope_helper:"La portée de la plage nommée détermine où elle est disponible.",scope_label:"Portée",search_placeholder:"Rechercher...",title:"Plages nommées",use_selection:"Utiliser la plage sélectionnée",workbook:"Classeur"},named_styles:{add_new_style:"Ajouter",apply:"Appliquer",back_to_list:"Retour à la liste",cancel:"Annuler",confirm_delete_message:"Voulez-vous vraiment supprimer",delete_style:"Supprimer le style",manage_styles:"Gérer les styles",name_already_exists:"Un style avec ce nom existe déjà",new_style:"Nouveau style",panel_title:"Styles de cellule",update_style:"Modifier le style"},navigation:{add_sheet:"Ajouter une feuille",sheet_list:"Liste des feuilles"},num_fmt:{cancel:"Annuler",close:"Fermer la boîte de dialogue",save:"Enregistrer",title:"Format de nombre personnalisé"},regional_settings:{language:{display_language:{de:"Deutsch",en:"English",es:"Español",fr:"Français",it:"Italiano"}},locale:{delimiter_comma:"Virgule",delimiter_semicolon:"Point-virgule",locale_example1:"Nombre",locale_example2:"Date et heure",locale_example3:"Délimiteur de formule",locale_label:"Paramètres régionaux",title:"Paramètres régionaux"},open_regional_settings:"Ouvrir les paramètres régionaux",timezone:{timezone_helper:"Modifier ce paramètre aura un impact sur les fonctions liées à la date et à l’heure, y compris AUJOURDHUI() et MAINTENANT().",timezone_label:"Fuseau horaire",title:"Fuseau horaire"},title:"Paramètres régionaux"},right_drawer:{close:"Fermer",resize_drawer:"Redimensionner le panneau"},sheet_delete:{cancel:"Annuler",confirm:"Oui, supprimer la feuille",message:"La feuille « {{sheetName}} » sera supprimée.",title:"Êtes-vous sûr ?"},sheet_tab:{change_color:"Changer la couleur",delete:"Supprimer",hide_sheet:"Masquer la feuille",open_menu:"Ouvrir le menu de la feuille",rename:"Renommer"},toolbar:{align_center:"Centrer",align_left:"Aligner à gauche",align_right:"Aligner à droite",bold:"Gras",borders:{all:"Toutes les bordures",bottom:"Bordures inférieures",clear:"Supprimer les bordures",color:"Couleur de bordure",horizontal:"Bordures horizontales",inner:"Bordures intérieures",left:"Bordures gauches",outer:"Bordures extérieures",right:"Bordures droites",style:"Style de bordure",title:"Bordures",top:"Bordures supérieures",vertical:"Bordures verticales"},clear_formatting:"Effacer la mise en forme",conditional_formatting:"Mise en forme conditionnelle",copy_styles:"Copier les styles",currency:"Formater monnaie",decimal_places_decrease:"Diminuer les décimales",decimal_places_increase:"Augmenter les décimales",decrease_font_size:"Diminuer la taille de la police",download_png:"Télécharger en PNG",fill_color:"Couleur de remplissage",font_color:"Couleur de police",format_menu:{auto:"Automatique",currency_eur:"Euro (EUR)",currency_eur_example:"€",currency_gbp:"Livre sterling (GBP)",currency_gbp_example:"£",currency_usd:"Dollar (USD)",currency_usd_example:"$",custom:"Personnalisé",date_long:"Date longue",date_short:"Date courte",number:"Nombre",percentage:"Pourcentage",percentage_example:"10 %"},format_number:"Format de nombre",increase_font_size:"Augmenter la taille de la police",italic:"Italique",named_styles:"Styles de cellule",percentage:"Formater pourcentage",redo:"Rétablir",scroll_left:"Faire défiler vers la gauche",scroll_right:"Faire défiler vers la droite",selected_png:"Exporter la zone sélectionnée en PNG",show_hide_grid_lines:"Afficher/masquer le quadrillage",strike_through:"Barré",underline:"Souligné",undo:"Annuler",vertical_align_bottom:"Aligner en bas",vertical_align_middle:"Aligner au milieu",vertical_align_top:"Aligner en haut",wrap_text:"Renvoyer à la ligne"}}},"de-DE":{translation:ES},"it-IT":{translation:{color_picker:{add:"Aggiungi nuovo colore",apply:"Aggiungi colore",cancel:"Annulla",default:"Colore predefinito",no_fill:"Nessun riempimento",recent:"Recenti",title:"Selettore di colore"},conditional_formatting:{add_new_rule:"Aggiungi una nuova regola",apply:"Applica modifiche",apply_preset:"Applica stile predefinito",apply_to:"Applica a",apply_to_placeholder:"es. A1:B10",apply_to_range:"Intervallo",back_to_list:"Torna alla lista",cancel:"Annulla",color_scale_maximum:"Massimo",color_scale_midpoint:"Punto medio",color_scale_minimum:"Minimo",color_scale_settings:"Impostazioni",color_scale_type_formula:"Formula",color_scale_type_max:"Max",color_scale_type_min:"Min",color_scale_type_none:"Nessuno",color_scale_type_number:"Numero",color_scale_type_percent:"Percentuale",color_scale_type_percentile:"Percentile",data_bars_gradient_fill:"Riempimento sfumato",data_bars_maximum:"Massimo",data_bars_minimum:"Minimo",data_bars_negative:"Negativo",data_bars_positive:"Positivo",data_bars_preferences:"Preferenze",data_bars_settings:"Impostazioni",data_bars_show_value:"Mostra valore cella",data_bars_solid_fill:"Riempimento uniforme",data_bars_type_automatic:"Automatico",default_styles:"Preset",delete_rule:"Elimina regola",edit_rule:"Modifica regola",empty_message1:"Nessuna regola di formattazione condizionale.",empty_message2:'Fai clic su "Aggiungi nuovo" per crearne una.',filter_label:"Mostra",filter_selection:"Selezione",filter_this_sheet:"Questo foglio",format_rules:"Regole di formattazione",format_style:"Stile di formattazione",formula_error_invalid:"Formula non valida",formula_error_must_start_with_equals:"La formula deve iniziare con =",formula_placeholder:"es. =A1>0",highlight_cells_if:"Evidenzia celle se...",icon_sets_else:"Altrimenti",icon_sets_icons:"icone",icon_sets_mode_preset:"Set di icone",icon_sets_ratings:"Valutazioni",icon_sets_settings:"Impostazioni",icon_sets_show_value:"Mostra valore cella",icon_sets_when_value_is:"Quando il valore è",new:"Aggiungi nuovo",no_search_results:"Nessuna regola corrisponde alla tua ricerca.",op_begins_with:"Inizia con",op_between:"Tra",op_contains:"Contiene",op_does_not_contain:"Non contiene",op_does_not_equal:"Diverso da",op_ends_with:"Termina con",op_equals:"Uguale a",op_greater_than:"Maggiore di",op_greater_than_or_equal:"Maggiore o uguale a",op_in_last_7_days:"Ultimi 7 giorni",op_in_next_7_days:"Prossimi 7 giorni",op_last_month:"Mese scorso",op_last_week:"Settimana scorsa",op_last_year:"Anno scorso",op_less_than:"Minore di",op_less_than_or_equal:"Minore o uguale a",op_next_month:"Prossimo mese",op_next_week:"Prossima settimana",op_next_year:"Prossimo anno",op_not_between:"Non tra",op_this_month:"Questo mese",op_this_week:"Questa settimana",op_this_year:"Quest'anno",op_today:"Oggi",op_tomorrow:"Domani",op_yesterday:"Ieri",rule_type_blanks:"Celle vuote",rule_type_cell_value:"Valore cella...",rule_type_date:"Data...",rule_type_duplicate_values:"Valori duplicati",rule_type_errors:"Errori",rule_type_formula:"Formula",rule_type_no_blanks:"Celle non vuote",rule_type_no_errors:"Nessun errore",rule_type_text:"Testo...",rule_type_unique_values:"Valori univoci",rule_value_placeholder:"Valore",search_placeholder:"Cerca...",stop_if_true:"Interrompi se vero",tab_classic:"Valori",tab_color_scale:"Scale",tab_data_bars:"Barre",tab_icon_sets:"Icone",title:"Formattazione condizionale",use_selection:"Usa intervallo selezionato"},context_menu:{cell:{copy:"Copia",cut:"Taglia",delete:"Elimina...",delete_column:"Colonna '{{column}}'",delete_row:"Riga '{{row}}'",insert:"Inserisci...",insert_column_left:"Colonna a sinistra",insert_column_right:"Colonna a destra",insert_row_above:"Riga sopra",insert_row_below:"Riga sotto",paste:"Incolla"},column_header:{delete_column:"Elimina la colonna '{{column}}'",delete_columns:"Elimina le colonne {{columnStart}} - {{columnEnd}}",freeze_columns:"Blocca fino alla colonna '{{column}}'",hide_column:"Nascondi la colonna '{{column}}'",hide_columns:"Nascondi le colonne {{columnStart}} - {{columnEnd}}",insert_columns_after:"Inserisci {{count}} colonna(e) a destra",insert_columns_before:"Inserisci {{count}} colonna(e) a sinistra",move_columns_left:"Sposta le colonne a sinistra",move_columns_right:"Sposta le colonne a destra",show_hidden_columns:"Mostra colonne nascoste",unfreeze_columns:"Rimuovi blocco delle colonne"},row_header:{delete_row:"Elimina la riga '{{row}}'",delete_rows:"Elimina le righe {{rowStart}} - {{rowEnd}}",freeze_rows:"Blocca fino alla riga '{{row}}'",hide_row:"Nascondi la riga '{{row}}'",hide_rows:"Nascondi le righe {{rowStart}} - {{rowEnd}}",insert_rows_above:"Inserisci {{count}} riga(e) sopra",insert_rows_below:"Inserisci {{count}} riga(e) sotto",move_rows_down:"Sposta le righe verso il basso",move_rows_up:"Sposta le righe verso l’alto",show_hidden_rows:"Mostra righe nascoste",unfreeze_rows:"Rimuovi blocco delle righe"}},error_dialog:{error_clipboard_paste:"Accesso agli appunti negato. Consenti le autorizzazioni per gli appunti nel tuo browser.",error_deleting_cells:"Impossibile eliminare le celle",error_deleting_columns:"Impossibile eliminare le colonne",error_deleting_rows:"Impossibile eliminare le righe",error_editing_formula:"Errore durante la modifica della formula",error_inserting_columns:"Impossibile inserire le colonne",error_inserting_rows:"Impossibile inserire le righe",error_moving_columns:"Impossibile spostare le colonne",error_moving_rows:"Impossibile spostare le righe"},formula_bar:{manage_named_ranges:"Gestisci intervalli denominati"},name_manager_dialog:{add_new_range:"Aggiungi nuovo intervallo",apply:"Applica modifiche",back_to_list:"Torna alla lista",cancel:"Annulla",default_range_prefix:"Intervallo",delete:"Elimina intervallo",edit:"Modifica intervallo",edit_range:"Modifica intervallo",empty_message1:"Non sono ancora stati aggiunti intervalli denominati.",empty_message2:'Fai clic su "Aggiungi nuovo" per crearne uno.',enter_formula:"Inserisci formula",enter_range_name:"Inserisci nome intervallo",global:"(Globale)",new:"Aggiungi nuovo",new_named_range:"Nuovo intervallo denominato",no_search_results:"Nessun intervallo denominato corrisponde alla tua ricerca.",range_name:"Nome intervallo",refers_to:"Fa riferimento a",scope_filter_all:"Tutti",scope_filter_current:"Foglio corrente",scope_filter_global:"Globale",scope_helper:"L'ambito dell'intervallo denominato determina dove è disponibile.",scope_label:"Ambito",search_placeholder:"Cerca...",title:"Intervalli denominati",use_selection:"Usa intervallo selezionato",workbook:"Cartella di lavoro"},named_styles:{add_new_style:"Aggiungi nuovo",apply:"Applica",back_to_list:"Torna all'elenco",cancel:"Annulla",confirm_delete_message:"Sei sicuro di voler eliminare",delete_style:"Elimina stile",manage_styles:"Gestisci stili",name_already_exists:"Esiste già uno stile con questo nome",new_style:"Nuovo stile",panel_title:"Stili di cella",update_style:"Modifica stile"},navigation:{add_sheet:"Aggiungi foglio",sheet_list:"Elenco fogli"},num_fmt:{cancel:"Annulla",close:"Chiudi finestra",save:"Salva",title:"Formato numero personalizzato"},regional_settings:{language:{display_language:{de:"Deutsch",en:"English",es:"Español",fr:"Français",it:"Italiano"}},locale:{delimiter_comma:"Virgola",delimiter_semicolon:"Punto e virgola",locale_example1:"Numero",locale_example2:"Data e ora",locale_example3:"Separatore formule",locale_label:"Impostazioni locali",title:"Impostazioni locali"},open_regional_settings:"Apri impostazioni regionali",timezone:{timezone_helper:"La modifica di questa impostazione influirà sulle funzioni relative a data e ora, incluse ADESSO() e OGGI().",timezone_label:"Fuso orario",title:"Fuso orario"},title:"Impostazioni regionali"},right_drawer:{close:"Chiudi",resize_drawer:"Ridimensiona pannello"},sheet_delete:{cancel:"Annulla",confirm:"Sì, elimina foglio",message:"Il foglio '{{sheetName}}' verrà eliminato.",title:"Sei sicuro?"},sheet_tab:{change_color:"Cambia colore",delete:"Elimina",hide_sheet:"Nascondi foglio",open_menu:"Apri menu del foglio",rename:"Rinomina"},toolbar:{align_center:"Allinea al centro",align_left:"Allinea a sinistra",align_right:"Allinea a destra",bold:"Grassetto",borders:{all:"Tutti i bordi",bottom:"Bordi inferiori",clear:"Rimuovi bordi",color:"Colore bordo",horizontal:"Bordi orizzontali",inner:"Bordi interni",left:"Bordi sinistri",outer:"Bordi esterni",right:"Bordi destri",style:"Stile bordo",title:"Bordi",top:"Bordi superiori",vertical:"Bordi verticali"},clear_formatting:"Cancella formattazione",conditional_formatting:"Formattazione condizionale",copy_styles:"Copia stili",currency:"Formato valuta",decimal_places_decrease:"Riduci decimali",decimal_places_increase:"Aumenta decimali",decrease_font_size:"Riduci dimensione carattere",download_png:"Scarica come PNG",fill_color:"Colore riempimento",font_color:"Colore carattere",format_menu:{auto:"Automatico",currency_eur:"Euro (EUR)",currency_eur_example:"€",currency_gbp:"Sterlina britannica (GBP)",currency_gbp_example:"£",currency_usd:"Dollaro (USD)",currency_usd_example:"$",custom:"Personalizzato",date_long:"Data lunga",date_short:"Data breve",number:"Numero",percentage:"Percentuale",percentage_example:"10%"},format_number:"Formato numero",increase_font_size:"Aumenta dimensione carattere",italic:"Corsivo",named_styles:"Stili di cella",percentage:"Formato percentuale",redo:"Ripeti",scroll_left:"Scorri a sinistra",scroll_right:"Scorri a destra",selected_png:"Esporta area selezionata come PNG",show_hide_grid_lines:"Mostra/nascondi griglia",strike_through:"Barrato",underline:"Sottolineato",undo:"Annulla",vertical_align_bottom:"Allinea in basso",vertical_align_middle:"Allinea al centro",vertical_align_top:"Allinea in alto",wrap_text:"Testo a capo"}}}},Ii=mt.createInstance({resources:NS,lng:"en-US",interpolation:{escapeValue:!1},showSupportNotice:!1});function kS(e,t=document.documentElement){for(let[l,n]of Object.entries(e))n==null?t.style.removeProperty(l):t.style.setProperty(l,n)}var e1=S.forwardRef(({themeVariables:e,model:t},l)=>{let n=S.useRef(null);return S.useEffect(()=>{n.current&&e&&kS(e,n.current)},[e]),S.useImperativeHandle(l,()=>({setLanguage(a){if(Ii.language!==a){Ii.changeLanguage(a);let r=a.split("-")[0];t.setLanguage(r)}}})),s.jsx("div",{ref:n,className:"ic-root",children:s.jsx(iv,{i18n:Ii,children:s.jsx(jS,{model:t,workbookState:new hS})})})});e1.displayName="IronCalc";var AS=async e=>{let t=gb(e);return await Ii.init(),await t};const tm=new Map;function t1(e){let t=tm.get(e);return t||(t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),tm.set(e,t)),t}function TS(e){try{return t1(e),!0}catch{return!1}}function DS(e,t){const l={};for(const n of t1(t).formatToParts(new Date(e)))l[n.type]=n.value|0;return[l.year,l.month,l.day,l.hour,l.minute,l.second]}function RS(e){const t=n1(e,We.__wbindgen_malloc),l=Ba,n=We.ironcalc_to_xlsx(t,l);if(n[3])throw a1(n[2]);var a=l1(n[0],n[1]).slice();return We.__wbindgen_free(n[0],n[1]*1,1),a}function zS(e,t){const l=n1(e,We.__wbindgen_malloc),n=Ba,a=LS(t,We.__wbindgen_malloc,We.__wbindgen_realloc),r=Ba,i=We.xlsx_to_ironcalc(l,n,a,r);if(i[3])throw a1(i[2]);var o=l1(i[0],i[1]).slice();return We.__wbindgen_free(i[0],i[1]*1,1),o}function MS(){return{__proto__:null,"./convert_bg.js":{__proto__:null,__wbg_Error_ef53bc310eb298a0:function(t,l){return Error(zi(t,l))},__wbg___wbindgen_number_get_9bb1761122181af2:function(t,l){const n=l,a=typeof n=="number"?n:void 0;lm().setFloat64(t+8,nm(a)?0:a,!0),lm().setInt32(t+0,!nm(a),!0)},__wbg___wbindgen_throw_1506f2235d1bdba0:function(t,l){throw new Error(zi(t,l))},__wbg_get_2b48c7d0d006a781:function(t,l){return t[l>>>0]},__wbg_ic_tz_parts_7a8f3f490ae2f177:function(t,l,n){return DS(t,zi(l,n))},__wbg_ic_tz_validate_b18df67ee1109d4d:function(t,l){return TS(zi(t,l))},__wbg_length_66f1a4b2e9026940:function(t){return t.length},__wbg_now_190933fa139cc119:function(){return Date.now()},__wbg_random_33cfffca5c784d5e:function(){return Math.random()},__wbindgen_init_externref_table:function(){const t=We.__wbindgen_externrefs,l=t.grow(4);t.set(0,void 0),t.set(l+0,void 0),t.set(l+1,null),t.set(l+2,!0),t.set(l+3,!1)}}}}function l1(e,t){return e=e>>>0,Sa().subarray(e/1,e/1+t)}let jn=null;function lm(){return(jn===null||jn.buffer.detached===!0||jn.buffer.detached===void 0&&jn.buffer!==We.memory.buffer)&&(jn=new DataView(We.memory.buffer)),jn}function zi(e,t){return BS(e>>>0,t)}let fr=null;function Sa(){return(fr===null||fr.byteLength===0)&&(fr=new Uint8Array(We.memory.buffer)),fr}function nm(e){return e==null}function n1(e,t){const l=t(e.length*1,1)>>>0;return Sa().set(e,l/1),Ba=e.length,l}function LS(e,t,l){if(l===void 0){const o=Dr.encode(e),c=t(o.length,1)>>>0;return Sa().subarray(c,c+o.length).set(o),Ba=o.length,c}let n=e.length,a=t(n,1)>>>0;const r=Sa();let i=0;for(;i<n;i++){const o=e.charCodeAt(i);if(o>127)break;r[a+i]=o}if(i!==n){i!==0&&(e=e.slice(i)),a=l(a,n,n=i+e.length*3,1)>>>0;const o=Sa().subarray(a+i,a+n),c=Dr.encodeInto(e,o);i+=c.written,a=l(a,n,i,1)>>>0}return Ba=i,a}function a1(e){const t=We.__wbindgen_externrefs.get(e);return We.__externref_table_dealloc(e),t}let Pi=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Pi.decode();const OS=2146435072;let ic=0;function BS(e,t){return ic+=t,ic>=OS&&(Pi=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Pi.decode(),ic=t),Pi.decode(Sa().subarray(e,e+t))}const Dr=new TextEncoder;"encodeInto"in Dr||(Dr.encodeInto=function(e,t){const l=Dr.encode(e);return t.set(l),{read:e.length,written:l.length}});let Ba=0,We;function US(e,t){return We=e.exports,jn=null,fr=null,We.__wbindgen_start(),We}async function HS(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(a){if(e.ok&&l(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",a);else throw a}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function l(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}}async function FS(e){if(We!==void 0)return We;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL(""+new URL("convert_bg-CS3cq3To.wasm",import.meta.url).href,import.meta.url));const t=MS();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:l,module:n}=await HS(await e,t);return US(l)}function VS(){const[e,t]=S.useState(null),[l,n]=S.useState(!1);return S.useEffect(()=>{let a=null;const r=async({data:i})=>{switch(i==null?void 0:i.type){case"xlsx:load":{a=La.from_bytes(zS(new Uint8Array(i.buffer),i.name||"workbook.xlsx"),"en"),n(!!i.readOnly),t(a);break}case"xlsx:save:request":const o=RS(a.toBytes());window.parent.postMessage({type:"xlsx:save:response",buffer:o.buffer},"*",[o.buffer]);break}};return Promise.all([AS(),FS()]).then(()=>{window.addEventListener("message",r),window.parent.postMessage({type:"xlsx:ready"},"*")}),()=>window.removeEventListener("message",r)},[]),e?s.jsx("div",{style:{height:"100%"},onKeyDownCapture:()=>window.parent.postMessage({type:"xlsx:change"},"*"),onPaste:()=>window.parent.postMessage({type:"xlsx:change"},"*"),children:s.jsx(e1,{model:e})}):null}nb.createRoot(document.getElementById("root")).render(s.jsx(VS,{}));
