(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const h of r)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&s(p)}).observe(document,{childList:!0,subtree:!0});function f(r){const h={};return r.integrity&&(h.integrity=r.integrity),r.referrerPolicy&&(h.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?h.credentials="include":r.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function s(r){if(r.ep)return;r.ep=!0;const h=f(r);fetch(r.href,h)}})();var hf={exports:{}},Nn={};/** * @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 id;function fm(){if(id)return Nn;id=1;var d=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function f(s,r,h){var p=null;if(h!==void 0&&(p=""+h),r.key!==void 0&&(p=""+r.key),"key"in r){h={};for(var E in r)E!=="key"&&(h[E]=r[E])}else h=r;return r=h.ref,{$$typeof:d,type:s,key:p,ref:r!==void 0?r:null,props:h}}return Nn.Fragment=i,Nn.jsx=f,Nn.jsxs=f,Nn}var sd;function cm(){return sd||(sd=1,hf.exports=fm()),hf.exports}var C=cm(),gf={exports:{}},P={};/** * @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 fd;function rm(){if(fd)return P;fd=1;var d=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),M=Symbol.iterator;function A(v){return v===null||typeof v!="object"?null:(v=M&&v[M]||v["@@iterator"],typeof v=="function"?v:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,Q={};function J(v,_,X){this.props=v,this.context=_,this.refs=Q,this.updater=X||L}J.prototype.isReactComponent={},J.prototype.setState=function(v,_){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,_,"setState")},J.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function xt(){}xt.prototype=J.prototype;function gt(v,_,X){this.props=v,this.context=_,this.refs=Q,this.updater=X||L}var wt=gt.prototype=new xt;wt.constructor=gt,H(wt,J.prototype),wt.isPureReactComponent=!0;var ft=Array.isArray,k={H:null,A:null,T:null,S:null},St=Object.prototype.hasOwnProperty;function mt(v,_,X,Z,w,it){return X=it.ref,{$$typeof:d,type:v,key:_,ref:X!==void 0?X:null,props:it}}function Kt(v,_){return mt(v.type,_,void 0,void 0,void 0,v.props)}function G(v){return typeof v=="object"&&v!==null&&v.$$typeof===d}function I(v){var _={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(X){return _[X]})}var Bt=/\/+/g;function De(v,_){return typeof v=="object"&&v!==null&&v.key!=null?I(""+v.key):_.toString(36)}function oe(){}function Ft(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(oe,oe):(v.status="pending",v.then(function(_){v.status==="pending"&&(v.status="fulfilled",v.value=_)},function(_){v.status==="pending"&&(v.status="rejected",v.reason=_)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function Mt(v,_,X,Z,w){var it=typeof v;(it==="undefined"||it==="boolean")&&(v=null);var tt=!1;if(v===null)tt=!0;else switch(it){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(v.$$typeof){case d:case i:tt=!0;break;case z:return tt=v._init,Mt(tt(v._payload),_,X,Z,w)}}if(tt)return w=w(v),tt=Z===""?"."+De(v,0):Z,ft(w)?(X="",tt!=null&&(X=tt.replace(Bt,"$&/")+"/"),Mt(w,_,X,"",function(Ut){return Ut})):w!=null&&(G(w)&&(w=Kt(w,X+(w.key==null||v&&v.key===w.key?"":(""+w.key).replace(Bt,"$&/")+"/")+tt)),_.push(w)),1;tt=0;var Pt=Z===""?".":Z+":";if(ft(v))for(var ot=0;ot>>1,v=j[ut];if(0>>1;ut<_;){var X=2*(ut+1)-1,Z=j[X],w=X+1,it=j[w];if(0>r(Z,q))wr(it,Z)?(j[ut]=it,j[w]=q,ut=w):(j[ut]=Z,j[X]=q,ut=X);else if(wr(it,q))j[ut]=it,j[w]=q,ut=w;else break t}}return $}function r(j,$){var q=j.sortIndex-$.sortIndex;return q!==0?q:j.id-$.id}if(d.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;d.unstable_now=function(){return h.now()}}else{var p=Date,E=p.now();d.unstable_now=function(){return p.now()-E}}var y=[],m=[],z=1,M=null,A=3,L=!1,H=!1,Q=!1,J=typeof setTimeout=="function"?setTimeout:null,xt=typeof clearTimeout=="function"?clearTimeout:null,gt=typeof setImmediate<"u"?setImmediate:null;function wt(j){for(var $=f(m);$!==null;){if($.callback===null)s(m);else if($.startTime<=j)s(m),$.sortIndex=$.expirationTime,i(y,$);else break;$=f(m)}}function ft(j){if(Q=!1,wt(j),!H)if(f(y)!==null)H=!0,Ft();else{var $=f(m);$!==null&&Mt(ft,$.startTime-j)}}var k=!1,St=-1,mt=5,Kt=-1;function G(){return!(d.unstable_now()-Ktj&&G());){var ut=M.callback;if(typeof ut=="function"){M.callback=null,A=M.priorityLevel;var v=ut(M.expirationTime<=j);if(j=d.unstable_now(),typeof v=="function"){M.callback=v,wt(j),$=!0;break e}M===f(y)&&s(y),wt(j)}else s(y);M=f(y)}if(M!==null)$=!0;else{var _=f(m);_!==null&&Mt(ft,_.startTime-j),$=!1}}break t}finally{M=null,A=q,L=!1}$=void 0}}finally{$?Bt():k=!1}}}var Bt;if(typeof gt=="function")Bt=function(){gt(I)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,oe=De.port2;De.port1.onmessage=I,Bt=function(){oe.postMessage(null)}}else Bt=function(){J(I,0)};function Ft(){k||(k=!0,Bt())}function Mt(j,$){St=J(function(){j(d.unstable_now())},$)}d.unstable_IdlePriority=5,d.unstable_ImmediatePriority=1,d.unstable_LowPriority=4,d.unstable_NormalPriority=3,d.unstable_Profiling=null,d.unstable_UserBlockingPriority=2,d.unstable_cancelCallback=function(j){j.callback=null},d.unstable_continueExecution=function(){H||L||(H=!0,Ft())},d.unstable_forceFrameRate=function(j){0>j||125ut?(j.sortIndex=q,i(m,j),f(y)===null&&j===f(m)&&(Q?(xt(St),St=-1):Q=!0,Mt(ft,q-ut))):(j.sortIndex=v,i(y,j),H||L||(H=!0,Ft())),j},d.unstable_shouldYield=G,d.unstable_wrapCallback=function(j){var $=A;return function(){var q=A;A=$;try{return j.apply(this,arguments)}finally{A=q}}}}(yf)),yf}var od;function dm(){return od||(od=1,pf.exports=om()),pf.exports}var vf={exports:{}},$t={};/** * @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 dd;function hm(){if(dd)return $t;dd=1;var d=Ef();function i(y){var m="https://react.dev/errors/"+y;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(i){console.error(i)}}return d(),vf.exports=hm(),vf.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 gd;function mm(){if(gd)return Mn;gd=1;var d=dm(),i=Ef(),f=gm();function s(t){var e="https://react.dev/errors/"+t;if(1)":-1n||g[l]!==b[n]){var D=` `+g[l].replace(" at new "," at ");return t.displayName&&D.includes("")&&(D=D.replace("",t.displayName)),D}while(1<=l&&0<=n);break}}}finally{Ft=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?oe(a):""}function j(t){switch(t.tag){case 26:case 27:case 5:return oe(t.type);case 16:return oe("Lazy");case 13:return oe("Suspense");case 19:return oe("SuspenseList");case 0:case 15:return t=Mt(t.type,!1),t;case 11:return t=Mt(t.type.render,!1),t;case 1:return t=Mt(t.type,!0),t;default:return""}}function $(t){try{var e="";do e+=j(t),t=t.return;while(t);return e}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}function q(t){var e=t,a=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(a=e.return),t=e.return;while(t)}return e.tag===3?a:null}function ut(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function v(t){if(q(t)!==t)throw Error(s(188))}function _(t){var e=t.alternate;if(!e){if(e=q(t),e===null)throw Error(s(188));return e!==t?null:t}for(var a=t,l=e;;){var n=a.return;if(n===null)break;var u=n.alternate;if(u===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===a)return v(n),t;if(u===l)return v(n),e;u=u.sibling}throw Error(s(188))}if(a.return!==l.return)a=n,l=u;else{for(var c=!1,o=n.child;o;){if(o===a){c=!0,a=n,l=u;break}if(o===l){c=!0,l=n,a=u;break}o=o.sibling}if(!c){for(o=u.child;o;){if(o===a){c=!0,a=u,l=n;break}if(o===l){c=!0,l=u,a=n;break}o=o.sibling}if(!c)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?t:e}function X(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=X(t),e!==null)return e;t=t.sibling}return null}var Z=Array.isArray,w=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,it={pending:!1,data:null,method:null,action:null},tt=[],Pt=-1;function ot(t){return{current:t}}function Ut(t){0>Pt||(t.current=tt[Pt],tt[Pt]=null,Pt--)}function bt(t,e){Pt++,tt[Pt]=t.current,t.current=e}var Ne=ot(null),Ul=ot(null),ea=ot(null),wn=ot(null);function Bn(t,e){switch(bt(ea,e),bt(Ul,t),bt(Ne,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?Lo(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=Lo(t),e=Ho(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ut(Ne),bt(Ne,e)}function ka(){Ut(Ne),Ut(Ul),Ut(ea)}function li(t){t.memoizedState!==null&&bt(wn,t);var e=Ne.current,a=Ho(e,t.type);e!==a&&(bt(Ul,t),bt(Ne,a))}function qn(t){Ul.current===t&&(Ut(Ne),Ut(Ul)),wn.current===t&&(Ut(wn),Tn._currentValue=it)}var ni=Object.prototype.hasOwnProperty,ui=d.unstable_scheduleCallback,ii=d.unstable_cancelCallback,Yd=d.unstable_shouldYield,Gd=d.unstable_requestPaint,Me=d.unstable_now,Vd=d.unstable_getCurrentPriorityLevel,Of=d.unstable_ImmediatePriority,Tf=d.unstable_UserBlockingPriority,Yn=d.unstable_NormalPriority,Qd=d.unstable_LowPriority,Af=d.unstable_IdlePriority,Xd=d.log,Zd=d.unstable_setDisableYieldValue,_l=null,ne=null;function Kd(t){if(ne&&typeof ne.onCommitFiberRoot=="function")try{ne.onCommitFiberRoot(_l,t,void 0,(t.current.flags&128)===128)}catch{}}function aa(t){if(typeof Xd=="function"&&Zd(t),ne&&typeof ne.setStrictMode=="function")try{ne.setStrictMode(_l,t)}catch{}}var ue=Math.clz32?Math.clz32:$d,kd=Math.log,Jd=Math.LN2;function $d(t){return t>>>=0,t===0?32:31-(kd(t)/Jd|0)|0}var Gn=128,Vn=4194304;function Aa(t){var e=t&42;if(e!==0)return e;switch(t&-t){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: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&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Qn(t,e){var a=t.pendingLanes;if(a===0)return 0;var l=0,n=t.suspendedLanes,u=t.pingedLanes,c=t.warmLanes;t=t.finishedLanes!==0;var o=a&134217727;return o!==0?(a=o&~n,a!==0?l=Aa(a):(u&=o,u!==0?l=Aa(u):t||(c=o&~c,c!==0&&(l=Aa(c))))):(o=a&~n,o!==0?l=Aa(o):u!==0?l=Aa(u):t||(c=a&~c,c!==0&&(l=Aa(c)))),l===0?0:e!==0&&e!==l&&!(e&n)&&(n=l&-l,c=e&-e,n>=c||n===32&&(c&4194176)!==0)?e:l}function Cl(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Wd(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64: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 e+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 zf(){var t=Gn;return Gn<<=1,!(Gn&4194176)&&(Gn=128),t}function Rf(){var t=Vn;return Vn<<=1,!(Vn&62914560)&&(Vn=4194304),t}function si(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function jl(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Fd(t,e,a,l,n,u){var c=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var o=t.entanglements,g=t.expirationTimes,b=t.hiddenUpdates;for(a=c&~a;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eh=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]*$"),Lf={},Hf={};function ah(t){return ni.call(Hf,t)?!0:ni.call(Lf,t)?!1:eh.test(t)?Hf[t]=!0:(Lf[t]=!0,!1)}function Xn(t,e,a){if(ah(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function Zn(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function Be(t,e,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+l)}}function de(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function lh(t){var e=wf(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,u.call(this,c)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Kn(t){t._valueTracker||(t._valueTracker=lh(t))}function Bf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),l="";return t&&(l=wf(t)?t.checked?"true":"false":t.value),t=l,t!==a?(e.setValue(t),!0):!1}function kn(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var nh=/[\n"\\]/g;function he(t){return t.replace(nh,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function ri(t,e,a,l,n,u,c,o){t.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?t.type=c:t.removeAttribute("type"),e!=null?c==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+de(e)):t.value!==""+de(e)&&(t.value=""+de(e)):c!=="submit"&&c!=="reset"||t.removeAttribute("value"),e!=null?oi(t,c,de(e)):a!=null?oi(t,c,de(a)):l!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+de(o):t.removeAttribute("name")}function qf(t,e,a,l,n,u,c,o){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||e!=null))return;a=a!=null?""+de(a):"",e=e!=null?""+de(e):a,o||e===t.value||(t.value=e),t.defaultValue=e}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=o?t.checked:!!l,t.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.name=c)}function oi(t,e,a){e==="number"&&kn(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Pa(t,e,a,l){if(t=t.options,e){e={};for(var n=0;n=Gl),Pf=" ",If=!1;function tc(t,e){switch(t){case"keyup":return _h.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ec(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var al=!1;function jh(t,e){switch(t){case"compositionend":return ec(e);case"keypress":return e.which!==32?null:(If=!0,Pf);case"textInput":return t=e.data,t===Pf&&If?null:t;default:return null}}function Lh(t,e){if(al)return t==="compositionend"||!Ei&&tc(t,e)?(t=Kf(),$n=yi=na=null,al=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:a,offset:e-t};t=l}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=cc(a)}}function oc(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?oc(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function dc(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=kn(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=kn(t.document)}return e}function Ai(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Qh(t,e){var a=dc(e);e=t.focusedElem;var l=t.selectionRange;if(a!==e&&e&&e.ownerDocument&&oc(e.ownerDocument.documentElement,e)){if(l!==null&&Ai(e)){if(t=l.start,a=l.end,a===void 0&&(a=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(a,e.value.length);else if(a=(t=e.ownerDocument||document)&&t.defaultView||window,a.getSelection){a=a.getSelection();var n=e.textContent.length,u=Math.min(l.start,n);l=l.end===void 0?u:Math.min(l.end,n),!a.extend&&u>l&&(n=l,l=u,u=n),n=rc(e,u);var c=rc(e,l);n&&c&&(a.rangeCount!==1||a.anchorNode!==n.node||a.anchorOffset!==n.offset||a.focusNode!==c.node||a.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),a.removeAllRanges(),u>l?(a.addRange(t),a.extend(c.node,c.offset)):(t.setEnd(c.node,c.offset),a.addRange(t)))}}for(t=[],a=e;a=a.parentNode;)a.nodeType===1&&t.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,ll=null,zi=null,Zl=null,Ri=!1;function hc(t,e,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ri||ll==null||ll!==kn(l)||(l=ll,"selectionStart"in l&&Ai(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Zl&&Xl(Zl,l)||(Zl=l,l=Hu(zi,"onSelect"),0>=c,n-=c,qe=1<<32-ue(e)+n|a<K?(Vt=V,V=null):Vt=V.sibling;var rt=T(x,V,O[K],N);if(rt===null){V===null&&(V=Vt);break}t&&V&&rt.alternate===null&&e(x,V),S=u(rt,S,K),at===null?B=rt:at.sibling=rt,at=rt,V=Vt}if(K===O.length)return a(x,V),ct&&_a(x,K),B;if(V===null){for(;KK?(Vt=V,V=null):Vt=V.sibling;var Ta=T(x,V,rt.value,N);if(Ta===null){V===null&&(V=Vt);break}t&&V&&Ta.alternate===null&&e(x,V),S=u(Ta,S,K),at===null?B=Ta:at.sibling=Ta,at=Ta,V=Vt}if(rt.done)return a(x,V),ct&&_a(x,K),B;if(V===null){for(;!rt.done;K++,rt=O.next())rt=U(x,rt.value,N),rt!==null&&(S=u(rt,S,K),at===null?B=rt:at.sibling=rt,at=rt);return ct&&_a(x,K),B}for(V=l(V);!rt.done;K++,rt=O.next())rt=R(V,x,K,rt.value,N),rt!==null&&(t&&rt.alternate!==null&&V.delete(rt.key===null?K:rt.key),S=u(rt,S,K),at===null?B=rt:at.sibling=rt,at=rt);return t&&V.forEach(function(sm){return e(x,sm)}),ct&&_a(x,K),B}function Rt(x,S,O,N){if(typeof O=="object"&&O!==null&&O.type===y&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case p:t:{for(var B=O.key;S!==null;){if(S.key===B){if(B=O.type,B===y){if(S.tag===7){a(x,S.sibling),N=n(S,O.props.children),N.return=x,x=N;break t}}else if(S.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===gt&&Mc(B)===S.type){a(x,S.sibling),N=n(S,O.props),Pl(N,O),N.return=x,x=N;break t}a(x,S);break}else e(x,S);S=S.sibling}O.type===y?(N=Qa(O.props.children,x.mode,N,O.key),N.return=x,x=N):(N=zu(O.type,O.key,O.props,null,x.mode,N),Pl(N,O),N.return=x,x=N)}return c(x);case E:t:{for(B=O.key;S!==null;){if(S.key===B)if(S.tag===4&&S.stateNode.containerInfo===O.containerInfo&&S.stateNode.implementation===O.implementation){a(x,S.sibling),N=n(S,O.children||[]),N.return=x,x=N;break t}else{a(x,S);break}else e(x,S);S=S.sibling}N=Ns(O,x.mode,N),N.return=x,x=N}return c(x);case gt:return B=O._init,O=B(O._payload),Rt(x,S,O,N)}if(Z(O))return Y(x,S,O,N);if(St(O)){if(B=St(O),typeof B!="function")throw Error(s(150));return O=B.call(O),F(x,S,O,N)}if(typeof O.then=="function")return Rt(x,S,su(O),N);if(O.$$typeof===L)return Rt(x,S,Ou(x,O),N);fu(x,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,S!==null&&S.tag===6?(a(x,S.sibling),N=n(S,O),N.return=x,x=N):(a(x,S),N=Ds(O,x.mode,N),N.return=x,x=N),c(x)):a(x,S)}return function(x,S,O,N){try{Fl=0;var B=Rt(x,S,O,N);return cl=null,B}catch(V){if(V===$l)throw V;var at=xe(29,V,null,x.mode);return at.lanes=N,at.return=x,at}finally{}}}var ja=Uc(!0),_c=Uc(!1),rl=ot(null),cu=ot(0);function Cc(t,e){t=Fe,bt(cu,t),bt(rl,e),Fe=t|e.baseLanes}function Li(){bt(cu,Fe),bt(rl,rl.current)}function Hi(){Fe=cu.current,Ut(rl),Ut(cu)}var ve=ot(null),_e=null;function ia(t){var e=t.alternate;bt(Lt,Lt.current&1),bt(ve,t),_e===null&&(e===null||rl.current!==null||e.memoizedState!==null)&&(_e=t)}function jc(t){if(t.tag===22){if(bt(Lt,Lt.current),bt(ve,t),_e===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(_e=t)}}else sa()}function sa(){bt(Lt,Lt.current),bt(ve,ve.current)}function Ge(t){Ut(ve),_e===t&&(_e=null),Ut(Lt)}var Lt=ot(0);function ru(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Jh=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},$h=d.unstable_scheduleCallback,Wh=d.unstable_NormalPriority,Ht={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wi(){return{controller:new Jh,data:new Map,refCount:0}}function Il(t){t.refCount--,t.refCount===0&&$h(Wh,function(){t.controller.abort()})}var tn=null,Bi=0,ol=0,dl=null;function Fh(t,e){if(tn===null){var a=tn=[];Bi=0,ol=Xs(),dl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Bi++,e.then(Lc,Lc),e}function Lc(){if(--Bi===0&&tn!==null){dl!==null&&(dl.status="fulfilled");var t=tn;tn=null,ol=0,dl=null;for(var e=0;eu?u:8;var c=G.T,o={};G.T=o,es(t,!1,e,a);try{var g=n(),b=G.S;if(b!==null&&b(o,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=Ph(g,l);ln(t,e,D,re(t))}else ln(t,e,l,re(t))}catch(U){ln(t,e,{then:function(){},status:"rejected",reason:U},re())}finally{w.p=u,G.T=c}}function lg(){}function Ii(t,e,a,l){if(t.tag!==5)throw Error(s(476));var n=dr(t).queue;or(t,n,e,it,a===null?lg:function(){return hr(t),a(l)})}function dr(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:it,baseState:it,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ve,lastRenderedState:it},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ve,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function hr(t){var e=dr(t).next.queue;ln(t,e,{},re())}function ts(){return Jt(Tn)}function gr(){return Ct().memoizedState}function mr(){return Ct().memoizedState}function ng(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=re();t=da(a);var l=ha(e,t,a);l!==null&&(te(l,e,a),sn(l,e,a)),e={cache:wi()},t.payload=e;return}e=e.return}}function ug(t,e,a){var l=re();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Su(t)?yr(e,a):(a=Mi(t,e,a,l),a!==null&&(te(a,t,l),vr(a,e,l)))}function pr(t,e,a){var l=re();ln(t,e,a,l)}function ln(t,e,a,l){var n={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Su(t))yr(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var c=e.lastRenderedState,o=u(c,a);if(n.hasEagerState=!0,n.eagerState=o,ie(o,c))return au(t,e,n,0),yt===null&&eu(),!1}catch{}finally{}if(a=Mi(t,e,n,l),a!==null)return te(a,t,l),vr(a,e,l),!0}return!1}function es(t,e,a,l){if(l={lane:2,revertLane:Xs(),action:l,hasEagerState:!1,eagerState:null,next:null},Su(t)){if(e)throw Error(s(479))}else e=Mi(t,a,l,2),e!==null&&te(e,t,2)}function Su(t){var e=t.alternate;return t===et||e!==null&&e===et}function yr(t,e){hl=du=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function vr(t,e,a){if(a&4194176){var l=e.lanes;l&=t.pendingLanes,a|=l,e.lanes=a,Nf(t,a)}}var Ce={readContext:Jt,use:mu,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt};Ce.useCacheRefresh=Dt,Ce.useMemoCache=Dt,Ce.useHostTransitionStatus=Dt,Ce.useFormState=Dt,Ce.useActionState=Dt,Ce.useOptimistic=Dt;var wa={readContext:Jt,use:mu,useCallback:function(t,e){return le().memoizedState=[t,e===void 0?null:e],t},useContext:Jt,useEffect:lr,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,yu(4194308,4,ir.bind(null,e,t),a)},useLayoutEffect:function(t,e){return yu(4194308,4,t,e)},useInsertionEffect:function(t,e){yu(4,2,t,e)},useMemo:function(t,e){var a=le();e=e===void 0?null:e;var l=t();if(Ha){aa(!0);try{t()}finally{aa(!1)}}return a.memoizedState=[l,e],l},useReducer:function(t,e,a){var l=le();if(a!==void 0){var n=a(e);if(Ha){aa(!0);try{a(e)}finally{aa(!1)}}}else n=e;return l.memoizedState=l.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},l.queue=t,t=t.dispatch=ug.bind(null,et,t),[l.memoizedState,t]},useRef:function(t){var e=le();return t={current:t},e.memoizedState=t},useState:function(t){t=Ji(t);var e=t.queue,a=pr.bind(null,et,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:Fi,useDeferredValue:function(t,e){var a=le();return Pi(a,t,e)},useTransition:function(){var t=Ji(!1);return t=or.bind(null,et,t.queue,!0,!1),le().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var l=et,n=le();if(ct){if(a===void 0)throw Error(s(407));a=a()}else{if(a=e(),yt===null)throw Error(s(349));st&60||Gc(l,e,a)}n.memoizedState=a;var u={value:a,getSnapshot:e};return n.queue=u,lr(Qc.bind(null,l,u,t),[t]),l.flags|=2048,ml(9,Vc.bind(null,l,u,a,e),{destroy:void 0},null),a},useId:function(){var t=le(),e=yt.identifierPrefix;if(ct){var a=Ye,l=qe;a=(l&~(1<<32-ue(l)-1)).toString(32)+a,e=":"+e+"R"+a,a=hu++,0 title"))),Zt(u,l,a),u[kt]=t,qt(u),l=u;break t;case"link":var c=Ko("link","href",n).get(l+(a.href||""));if(c){for(var o=0;o<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?n.createElement("select",{is:l.is}):n.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?n.createElement(a,{is:l.is}):n.createElement(a)}}t[kt]=e,t[ee]=l;t:for(n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.tag!==27&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;n=n.return}n.sibling.return=n.return,n=n.sibling}e.stateNode=t;t:switch(Zt(t,a,l),a){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&$e(e)}}return Et(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&$e(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(s(166));if(t=ea.current,Kl(e)){if(t=e.stateNode,a=e.memoizedProps,l=null,n=It,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}t[kt]=e,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||jo(t.nodeValue,a)),t||Ca(e)}else t=Bu(t).createTextNode(l),t[kt]=e,e.stateNode=t}return Et(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=Kl(e),l!==null&&l.dehydrated!==null){if(t===null){if(!n)throw Error(s(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));n[kt]=e}else kl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Et(e),n=!1}else Ae!==null&&(ws(Ae),Ae=null),n=!0;if(!n)return e.flags&256?(Ge(e),e):(Ge(e),null)}if(Ge(e),e.flags&128)return e.lanes=a,e;if(a=l!==null,t=t!==null&&t.memoizedState!==null,a){l=e.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool);var u=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==n&&(l.flags|=2048)}return a!==t&&a&&(e.child.flags|=8192),Ru(e,e.updateQueue),Et(e),null;case 4:return ka(),t===null&&Js(e.stateNode.containerInfo),Et(e),null;case 10:return Ze(e.type),Et(e),null;case 19:if(Ut(Lt),n=e.memoizedState,n===null)return Et(e),null;if(l=(e.flags&128)!==0,u=n.rendering,u===null)if(l)gn(n,!1);else{if(zt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(u=ru(t),u!==null){for(e.flags|=128,gn(n,!1),t=u.updateQueue,e.updateQueue=t,Ru(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)so(a,t),a=a.sibling;return bt(Lt,Lt.current&1|2),e.child}t=t.sibling}n.tail!==null&&Me()>Du&&(e.flags|=128,l=!0,gn(n,!1),e.lanes=4194304)}else{if(!l)if(t=ru(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Ru(e,t),gn(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!ct)return Et(e),null}else 2*Me()-n.renderingStartTime>Du&&a!==536870912&&(e.flags|=128,l=!0,gn(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Me(),e.sibling=null,t=Lt.current,bt(Lt,l?t&1|2:t&1),e):(Et(e),null);case 22:case 23:return Ge(e),Hi(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?a&536870912&&!(e.flags&128)&&(Et(e),e.subtreeFlags&6&&(e.flags|=8192)):Et(e),a=e.updateQueue,a!==null&&Ru(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==a&&(e.flags|=2048),t!==null&&Ut(La),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Ze(Ht),Et(e),null;case 25:return null}throw Error(s(156,e.tag))}function dg(t,e){switch(_i(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ze(Ht),ka(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return qn(e),null;case 13:if(Ge(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(s(340));kl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ut(Lt),null;case 4:return ka(),null;case 10:return Ze(e.type),null;case 22:case 23:return Ge(e),Hi(),t!==null&&Ut(La),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ze(Ht),null;case 25:return null;default:return null}}function ro(t,e){switch(_i(e),e.tag){case 3:Ze(Ht),ka();break;case 26:case 27:case 5:qn(e);break;case 4:ka();break;case 13:Ge(e);break;case 19:Ut(Lt);break;case 10:Ze(e.type);break;case 22:case 23:Ge(e),Hi(),t!==null&&Ut(La);break;case 24:Ze(Ht)}}var hg={getCacheForType:function(t){var e=Jt(Ht),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a}},gg=typeof WeakMap=="function"?WeakMap:Map,Ot=0,yt=null,lt=null,st=0,vt=0,ce=null,We=!1,Sl=!1,Ms=!1,Fe=0,zt=0,va=0,Xa=0,Us=0,Ee=0,bl=0,mn=null,je=null,_s=!1,Cs=0,Du=1/0,Nu=null,Sa=null,Mu=!1,Za=null,pn=0,js=0,Ls=null,yn=0,Hs=null;function re(){if(Ot&2&&st!==0)return st&-st;if(G.T!==null){var t=ol;return t!==0?t:Xs()}return Uf()}function oo(){Ee===0&&(Ee=!(st&536870912)||ct?zf():536870912);var t=ve.current;return t!==null&&(t.flags|=32),Ee}function te(t,e,a){(t===yt&&vt===2||t.cancelPendingCommit!==null)&&(xl(t,0),Pe(t,st,Ee,!1)),jl(t,a),(!(Ot&2)||t!==yt)&&(t===yt&&(!(Ot&2)&&(Xa|=a),zt===4&&Pe(t,st,Ee,!1)),Le(t))}function ho(t,e,a){if(Ot&6)throw Error(s(327));var l=!a&&(e&60)===0&&(e&t.expiredLanes)===0||Cl(t,e),n=l?yg(t,e):Ys(t,e,!0),u=l;do{if(n===0){Sl&&!l&&Pe(t,e,0,!1);break}else if(n===6)Pe(t,e,0,!We);else{if(a=t.current.alternate,u&&!mg(a)){n=Ys(t,e,!1),u=!1;continue}if(n===2){if(u=e,t.errorRecoveryDisabledLanes&u)var c=0;else c=t.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){e=c;t:{var o=t;n=mn;var g=o.current.memoizedState.isDehydrated;if(g&&(xl(o,c).flags|=256),c=Ys(o,c,!1),c!==2){if(Ms&&!g){o.errorRecoveryDisabledLanes|=u,Xa|=u,n=4;break t}u=je,je=n,u!==null&&ws(u)}n=c}if(u=!1,n!==2)continue}}if(n===1){xl(t,0),Pe(t,e,0,!0);break}t:{switch(l=t,n){case 0:case 1:throw Error(s(345));case 4:if((e&4194176)===e){Pe(l,e,Ee,!We);break t}break;case 2:je=null;break;case 3:case 5:break;default:throw Error(s(329))}if(l.finishedWork=a,l.finishedLanes=e,(e&62914560)===e&&(u=Cs+300-Me(),10a?32:a,G.T=null,Za===null)var u=!1;else{a=Ls,Ls=null;var c=Za,o=pn;if(Za=null,pn=0,Ot&6)throw Error(s(331));var g=Ot;if(Ot|=4,uo(c.current),ao(c,c.current,o,a),Ot=g,vn(0,!1),ne&&typeof ne.onPostCommitFiberRoot=="function")try{ne.onPostCommitFiberRoot(_l,c)}catch{}u=!0}return u}finally{w.p=n,G.T=l,Eo(t,e)}}return!1}function Oo(t,e,a){e=me(a,e),e=ns(t.stateNode,e,2),t=ha(t,e,2),t!==null&&(jl(t,2),Le(t))}function pt(t,e,a){if(t.tag===3)Oo(t,t,a);else for(;e!==null;){if(e.tag===3){Oo(e,t,a);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Sa===null||!Sa.has(l))){t=me(a,t),a=Ar(2),l=ha(e,a,2),l!==null&&(zr(a,l,e,t),jl(l,2),Le(l));break}}e=e.return}}function Gs(t,e,a){var l=t.pingCache;if(l===null){l=t.pingCache=new gg;var n=new Set;l.set(e,n)}else n=l.get(e),n===void 0&&(n=new Set,l.set(e,n));n.has(a)||(Ms=!0,n.add(a),t=bg.bind(null,t,e,a),e.then(t,t))}function bg(t,e,a){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,yt===t&&(st&a)===a&&(zt===4||zt===3&&(st&62914560)===st&&300>Me()-Cs?!(Ot&2)&&xl(t,0):Us|=a,bl===st&&(bl=0)),Le(t)}function To(t,e){e===0&&(e=Rf()),t=ua(t,e),t!==null&&(jl(t,e),Le(t))}function xg(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),To(t,a)}function Eg(t,e){var a=0;switch(t.tag){case 13:var l=t.stateNode,n=t.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(e),To(t,a)}function Og(t,e){return ui(t,e)}var Cu=null,Tl=null,Vs=!1,ju=!1,Qs=!1,Ka=0;function Le(t){t!==Tl&&t.next===null&&(Tl===null?Cu=Tl=t:Tl=Tl.next=t),ju=!0,Vs||(Vs=!0,Ag(Tg))}function vn(t,e){if(!Qs&&ju){Qs=!0;do for(var a=!1,l=Cu;l!==null;){if(t!==0){var n=l.pendingLanes;if(n===0)var u=0;else{var c=l.suspendedLanes,o=l.pingedLanes;u=(1<<31-ue(42|t)+1)-1,u&=n&~(c&~o),u=u&201326677?u&201326677|1:u?u|2:0}u!==0&&(a=!0,Ro(l,u))}else u=st,u=Qn(l,l===yt?u:0),!(u&3)||Cl(l,u)||(a=!0,Ro(l,u));l=l.next}while(a);Qs=!1}}function Tg(){ju=Vs=!1;var t=0;Ka!==0&&(Cg()&&(t=Ka),Ka=0);for(var e=Me(),a=null,l=Cu;l!==null;){var n=l.next,u=Ao(l,e);u===0?(l.next=null,a===null?Cu=n:a.next=n,n===null&&(Tl=a)):(a=l,(t!==0||u&3)&&(ju=!0)),l=n}vn(t)}function Ao(t,e){for(var a=t.suspendedLanes,l=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0"u"?null:document;function Vo(t,e,a){var l=zl;if(l&&typeof e=="string"&&e){var n=he(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),Go.has(n)||(Go.add(n),t={rel:t,crossOrigin:a,href:e},l.querySelector(n)===null&&(e=l.createElement("link"),Zt(e,"link",t),qt(e),l.head.appendChild(e)))}}function Gg(t){Ie.D(t),Vo("dns-prefetch",t,null)}function Vg(t,e){Ie.C(t,e),Vo("preconnect",t,e)}function Qg(t,e,a){Ie.L(t,e,a);var l=zl;if(l&&t&&e){var n='link[rel="preload"][as="'+he(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+he(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+he(a.imageSizes)+'"]')):n+='[href="'+he(t)+'"]';var u=n;switch(e){case"style":u=Rl(t);break;case"script":u=Dl(t)}Oe.has(u)||(t=I({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Oe.set(u,t),l.querySelector(n)!==null||e==="style"&&l.querySelector(xn(u))||e==="script"&&l.querySelector(En(u))||(e=l.createElement("link"),Zt(e,"link",t),qt(e),l.head.appendChild(e)))}}function Xg(t,e){Ie.m(t,e);var a=zl;if(a&&t){var l=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+he(l)+'"][href="'+he(t)+'"]',u=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Dl(t)}if(!Oe.has(u)&&(t=I({rel:"modulepreload",href:t},e),Oe.set(u,t),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(En(u)))return}l=a.createElement("link"),Zt(l,"link",t),qt(l),a.head.appendChild(l)}}}function Zg(t,e,a){Ie.S(t,e,a);var l=zl;if(l&&t){var n=Wa(l).hoistableStyles,u=Rl(t);e=e||"default";var c=n.get(u);if(!c){var o={loading:0,preload:null};if(c=l.querySelector(xn(u)))o.loading=5;else{t=I({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Oe.get(u))&&lf(t,a);var g=c=l.createElement("link");qt(g),Zt(g,"link",t),g._p=new Promise(function(b,D){g.onload=b,g.onerror=D}),g.addEventListener("load",function(){o.loading|=1}),g.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Yu(c,e,l)}c={type:"stylesheet",instance:c,count:1,state:o},n.set(u,c)}}}function Kg(t,e){Ie.X(t,e);var a=zl;if(a&&t){var l=Wa(a).hoistableScripts,n=Dl(t),u=l.get(n);u||(u=a.querySelector(En(n)),u||(t=I({src:t,async:!0},e),(e=Oe.get(n))&&nf(t,e),u=a.createElement("script"),qt(u),Zt(u,"link",t),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(n,u))}}function kg(t,e){Ie.M(t,e);var a=zl;if(a&&t){var l=Wa(a).hoistableScripts,n=Dl(t),u=l.get(n);u||(u=a.querySelector(En(n)),u||(t=I({src:t,async:!0,type:"module"},e),(e=Oe.get(n))&&nf(t,e),u=a.createElement("script"),qt(u),Zt(u,"link",t),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(n,u))}}function Qo(t,e,a,l){var n=(n=ea.current)?qu(n):null;if(!n)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=Rl(a.href),a=Wa(n).hoistableStyles,l=a.get(e),l||(l={type:"style",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Rl(a.href);var u=Wa(n).hoistableStyles,c=u.get(t);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,c),(u=n.querySelector(xn(t)))&&!u._p&&(c.instance=u,c.state.loading=5),Oe.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Oe.set(t,a),u||Jg(n,t,a,c.state))),e&&l===null)throw Error(s(528,""));return c}if(e&&l!==null)throw Error(s(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Dl(a),a=Wa(n).hoistableScripts,l=a.get(e),l||(l={type:"script",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Rl(t){return'href="'+he(t)+'"'}function xn(t){return'link[rel="stylesheet"]['+t+"]"}function Xo(t){return I({},t,{"data-precedence":t.precedence,precedence:null})}function Jg(t,e,a,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),Zt(e,"link",a),qt(e),t.head.appendChild(e))}function Dl(t){return'[src="'+he(t)+'"]'}function En(t){return"script[async]"+t}function Zo(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+he(a.href)+'"]');if(l)return e.instance=l,qt(l),l;var n=I({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),qt(l),Zt(l,"style",n),Yu(l,a.precedence,t),e.instance=l;case"stylesheet":n=Rl(a.href);var u=t.querySelector(xn(n));if(u)return e.state.loading|=4,e.instance=u,qt(u),u;l=Xo(a),(n=Oe.get(n))&&lf(l,n),u=(t.ownerDocument||t).createElement("link"),qt(u);var c=u;return c._p=new Promise(function(o,g){c.onload=o,c.onerror=g}),Zt(u,"link",l),e.state.loading|=4,Yu(u,a.precedence,t),e.instance=u;case"script":return u=Dl(a.src),(n=t.querySelector(En(u)))?(e.instance=n,qt(n),n):(l=a,(n=Oe.get(u))&&(l=I({},a),nf(l,n)),t=t.ownerDocument||t,n=t.createElement("script"),qt(n),Zt(n,"link",l),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(s(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(l=e.instance,e.state.loading|=4,Yu(l,a.precedence,t));return e.instance}function Yu(t,e,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,u=n,c=0;c title"):null)}function $g(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Jo(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var On=null;function Wg(){}function Fg(t,e,a){if(On===null)throw Error(s(475));var l=On;if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var n=Rl(a.href),u=t.querySelector(xn(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Vu.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=u,qt(u);return}u=t.ownerDocument||t,a=Xo(a),(n=Oe.get(n))&&lf(a,n),u=u.createElement("link"),qt(u);var c=u;c._p=new Promise(function(o,g){c.onload=o,c.onerror=g}),Zt(u,"link",a),e.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(l.count++,e=Vu.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}function Pg(){if(On===null)throw Error(s(475));var t=On;return t.stylesheets&&t.count===0&&uf(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(i){console.error(i)}}return d(),mf.exports=mm(),mf.exports}var ym=pm();/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vm=d=>d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cd=(...d)=>d.filter((i,f,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===f).join(" ").trim();/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Sm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bm=Tt.forwardRef(({color:d="currentColor",size:i=24,strokeWidth:f=2,absoluteStrokeWidth:s,className:r="",children:h,iconNode:p,...E},y)=>Tt.createElement("svg",{ref:y,...Sm,width:i,height:i,stroke:d,strokeWidth:s?Number(f)*24/Number(i):f,className:Cd("lucide",r),...E},[...p.map(([m,z])=>Tt.createElement(m,z)),...Array.isArray(h)?h:[h]]));/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ta=(d,i)=>{const f=Tt.forwardRef(({className:s,...r},h)=>Tt.createElement(bm,{ref:h,iconNode:i,className:Cd(`lucide-${vm(d)}`,s),...r}));return f.displayName=`${d}`,f};/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xm=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Em=ta("Box",xm);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Om=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Tm=ta("Check",Om);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Am=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zm=ta("ChevronDown",Am);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rm=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Dm=ta("ChevronUp",Rm);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nm=[["rect",{width:"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"}]],Mm=ta("Copy",Nm);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Um=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],_m=ta("Moon",Um);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cm=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],jm=ta("Search",Cm);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lm=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Hm=ta("Sun",Lm);/** * @license lucide-react v0.471.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wm=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],Bm=ta("Terminal",wm);function qm(){const d=()=>{const r=localStorage.getItem("theme");return r==="dark"||r==="light"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},[i,f]=Tt.useState(d);Tt.useEffect(()=>{const r=window.document.documentElement;r.classList.remove("light","dark"),r.classList.add(i),localStorage.setItem("theme",i)},[i]);const s=()=>{f(r=>r==="light"?"dark":"light")};return Tt.useEffect(()=>{const r=p=>{f(p.matches?"dark":"light")},h=window.matchMedia("(prefers-color-scheme: dark)");return h.addEventListener("change",r),()=>{h.removeEventListener("change",r)}},[]),{theme:i,toggleTheme:s}}function Ym(){const{theme:d,toggleTheme:i}=qm();return C.jsx("button",{onClick:i,className:"p-3 rounded-full bg-nord-8/10 dark:bg-nord-8/20 hover:bg-nord-8/20 dark:hover:bg-nord-8/30 transition-all ease-in-out duration-300","aria-label":"Toggle theme",children:d==="dark"?C.jsx(Hm,{className:"h-6 w-6 text-nord-4 transition-transform transform rotate-0 dark:rotate-180"}):C.jsx(_m,{className:"h-6 w-6 text-nord-4 transition-transform transform rotate-360 dark:rotate-360"})})}const W=d=>typeof d=="string",Un=()=>{let d,i;const f=new Promise((s,r)=>{d=s,i=r});return f.resolve=d,f.reject=i,f},pd=d=>d==null?"":""+d,Gm=(d,i,f)=>{d.forEach(s=>{i[s]&&(f[s]=i[s])})},Vm=/###/g,yd=d=>d&&d.indexOf("###")>-1?d.replace(Vm,"."):d,vd=d=>!d||W(d),Ln=(d,i,f)=>{const s=W(i)?i.split("."):i;let r=0;for(;r{const{obj:s,k:r}=Ln(d,i,Object);if(s!==void 0||i.length===1){s[r]=f;return}let h=i[i.length-1],p=i.slice(0,i.length-1),E=Ln(d,p,Object);for(;E.obj===void 0&&p.length;)h=`${p[p.length-1]}.${h}`,p=p.slice(0,p.length-1),E=Ln(d,p,Object),E!=null&&E.obj&&typeof E.obj[`${E.k}.${h}`]<"u"&&(E.obj=void 0);E.obj[`${E.k}.${h}`]=f},Qm=(d,i,f,s)=>{const{obj:r,k:h}=Ln(d,i,Object);r[h]=r[h]||[],r[h].push(f)},Pu=(d,i)=>{const{obj:f,k:s}=Ln(d,i);if(f&&Object.prototype.hasOwnProperty.call(f,s))return f[s]},Xm=(d,i,f)=>{const s=Pu(d,f);return s!==void 0?s:Pu(i,f)},jd=(d,i,f)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in d?W(d[s])||d[s]instanceof String||W(i[s])||i[s]instanceof String?f&&(d[s]=i[s]):jd(d[s],i[s],f):d[s]=i[s]);return d},Nl=d=>d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Km=d=>W(d)?d.replace(/[&<>"'\/]/g,i=>Zm[i]):d;class km{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const f=this.regExpMap.get(i);if(f!==void 0)return f;const s=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,s),this.regExpQueue.push(i),s}}const Jm=[" ",",","?","!",";"],$m=new km(20),Wm=(d,i,f)=>{i=i||"",f=f||"";const s=Jm.filter(p=>i.indexOf(p)<0&&f.indexOf(p)<0);if(s.length===0)return!0;const r=$m.getRegExp(`(${s.map(p=>p==="?"?"\\?":p).join("|")})`);let h=!r.test(d);if(!h){const p=d.indexOf(f);p>0&&!r.test(d.substring(0,p))&&(h=!0)}return h},bf=function(d,i){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!d)return;if(d[i])return Object.prototype.hasOwnProperty.call(d,i)?d[i]:void 0;const s=i.split(f);let r=d;for(let h=0;h-1&&yd==null?void 0:d.replace("_","-"),Fm={type:"logger",log(d){this.output("log",d)},warn(d){this.output("warn",d)},error(d){this.output("error",d)},output(d,i){var f,s;(s=(f=console==null?void 0:console[d])==null?void 0:f.apply)==null||s.call(f,console,i)}};class ti{constructor(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(i,f)}init(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=f.prefix||"i18next:",this.logger=i||Fm,this.options=f,this.debug=f.debug}log(){for(var i=arguments.length,f=new Array(i),s=0;s{this.observers[s]||(this.observers[s]=new Map);const r=this.observers[s].get(f)||0;this.observers[s].set(f,r+1)}),this}off(i,f){if(this.observers[i]){if(!f){delete this.observers[i];return}this.observers[i].delete(f)}}emit(i){for(var f=arguments.length,s=new Array(f>1?f-1:0),r=1;r{let[E,y]=p;for(let m=0;m{let[E,y]=p;for(let m=0;m1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=i||{},this.options=f,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}removeNamespaces(i){const f=this.options.ns.indexOf(i);f>-1&&this.options.ns.splice(f,1)}getResource(i,f,s){var m,z;let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const h=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,p=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let E;i.indexOf(".")>-1?E=i.split("."):(E=[i,f],s&&(Array.isArray(s)?E.push(...s):W(s)&&h?E.push(...s.split(h)):E.push(s)));const y=Pu(this.data,E);return!y&&!f&&!s&&i.indexOf(".")>-1&&(i=E[0],f=E[1],s=E.slice(2).join(".")),y||!p||!W(s)?y:bf((z=(m=this.data)==null?void 0:m[i])==null?void 0:z[f],s,h)}addResource(i,f,s,r){let h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const p=h.keySeparator!==void 0?h.keySeparator:this.options.keySeparator;let E=[i,f];s&&(E=E.concat(p?s.split(p):s)),i.indexOf(".")>-1&&(E=i.split("."),r=f,f=E[1]),this.addNamespaces(f),Sd(this.data,E,r),h.silent||this.emit("added",i,f,s,r)}addResources(i,f,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const h in s)(W(s[h])||Array.isArray(s[h]))&&this.addResource(i,f,h,s[h],{silent:!0});r.silent||this.emit("added",i,f,s)}addResourceBundle(i,f,s,r,h){let p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},E=[i,f];i.indexOf(".")>-1&&(E=i.split("."),r=s,s=f,f=E[1]),this.addNamespaces(f);let y=Pu(this.data,E)||{};p.skipCopy||(s=JSON.parse(JSON.stringify(s))),r?jd(y,s,h):y={...y,...s},Sd(this.data,E,y),p.silent||this.emit("added",i,f,s)}removeResourceBundle(i,f){this.hasResourceBundle(i,f)&&delete this.data[i][f],this.removeNamespaces(f),this.emit("removed",i,f)}hasResourceBundle(i,f){return this.getResource(i,f)!==void 0}getResourceBundle(i,f){return f||(f=this.options.defaultNS),this.getResource(i,f)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const f=this.getDataByLanguage(i);return!!(f&&Object.keys(f)||[]).find(r=>f[r]&&Object.keys(f[r]).length>0)}toJSON(){return this.data}}var Ld={processors:{},addPostProcessor(d){this.processors[d.name]=d},handle(d,i,f,s,r){return d.forEach(h=>{var p;i=((p=this.processors[h])==null?void 0:p.process(i,f,s,r))??i}),i}};const xd={};class ei extends ai{constructor(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Gm(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=f,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=He.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;const s=this.resolve(i,f);return(s==null?void 0:s.res)!==void 0}extractFromKey(i,f){let s=f.nsSeparator!==void 0?f.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const r=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let h=f.ns||this.options.defaultNS||[];const p=s&&i.indexOf(s)>-1,E=!this.options.userDefinedKeySeparator&&!f.keySeparator&&!this.options.userDefinedNsSeparator&&!f.nsSeparator&&!Wm(i,s,r);if(p&&!E){const y=i.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:i,namespaces:W(h)?[h]:h};const m=i.split(s);(s!==r||s===r&&this.options.ns.indexOf(m[0])>-1)&&(h=m.shift()),i=m.join(r)}return{key:i,namespaces:W(h)?[h]:h}}translate(i,f,s){if(typeof f!="object"&&this.options.overloadTranslationOptionHandler&&(f=this.options.overloadTranslationOptionHandler(arguments)),typeof f=="object"&&(f={...f}),f||(f={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);const r=f.returnDetails!==void 0?f.returnDetails:this.options.returnDetails,h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,{key:p,namespaces:E}=this.extractFromKey(i[i.length-1],f),y=E[E.length-1],m=f.lng||this.language,z=f.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((m==null?void 0:m.toLowerCase())==="cimode"){if(z){const ft=f.nsSeparator||this.options.nsSeparator;return r?{res:`${y}${ft}${p}`,usedKey:p,exactUsedKey:p,usedLng:m,usedNS:y,usedParams:this.getUsedParamsDetails(f)}:`${y}${ft}${p}`}return r?{res:p,usedKey:p,exactUsedKey:p,usedLng:m,usedNS:y,usedParams:this.getUsedParamsDetails(f)}:p}const M=this.resolve(i,f);let A=M==null?void 0:M.res;const L=(M==null?void 0:M.usedKey)||p,H=(M==null?void 0:M.exactUsedKey)||p,Q=Object.prototype.toString.apply(A),J=["[object Number]","[object Function]","[object RegExp]"],xt=f.joinArrays!==void 0?f.joinArrays:this.options.joinArrays,gt=!this.i18nFormat||this.i18nFormat.handleAsObject,wt=!W(A)&&typeof A!="boolean"&&typeof A!="number";if(gt&&A&&wt&&J.indexOf(Q)<0&&!(W(xt)&&Array.isArray(A))){if(!f.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ft=this.options.returnedObjectHandler?this.options.returnedObjectHandler(L,A,{...f,ns:E}):`key '${p} (${this.language})' returned an object instead of string.`;return r?(M.res=ft,M.usedParams=this.getUsedParamsDetails(f),M):ft}if(h){const ft=Array.isArray(A),k=ft?[]:{},St=ft?H:L;for(const mt in A)if(Object.prototype.hasOwnProperty.call(A,mt)){const Kt=`${St}${h}${mt}`;k[mt]=this.translate(Kt,{...f,joinArrays:!1,ns:E}),k[mt]===Kt&&(k[mt]=A[mt])}A=k}}else if(gt&&W(xt)&&Array.isArray(A))A=A.join(xt),A&&(A=this.extendTranslation(A,i,f,s));else{let ft=!1,k=!1;const St=f.count!==void 0&&!W(f.count),mt=ei.hasDefaultValue(f),Kt=St?this.pluralResolver.getSuffix(m,f.count,f):"",G=f.ordinal&&St?this.pluralResolver.getSuffix(m,f.count,{ordinal:!1}):"",I=St&&!f.ordinal&&f.count===0,Bt=I&&f[`defaultValue${this.options.pluralSeparator}zero`]||f[`defaultValue${Kt}`]||f[`defaultValue${G}`]||f.defaultValue;!this.isValidLookup(A)&&mt&&(ft=!0,A=Bt),this.isValidLookup(A)||(k=!0,A=p);const oe=(f.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:A,Ft=mt&&Bt!==A&&this.options.updateMissing;if(k||ft||Ft){if(this.logger.log(Ft?"updateKey":"missingKey",m,y,p,Ft?Bt:A),h){const q=this.resolve(p,{...f,keySeparator:!1});q&&q.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 Mt=[];const j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,f.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0])for(let q=0;q{var X;const _=mt&&v!==A?v:oe;this.options.missingKeyHandler?this.options.missingKeyHandler(q,y,ut,_,Ft,f):(X=this.backendConnector)!=null&&X.saveMissing&&this.backendConnector.saveMissing(q,y,ut,_,Ft,f),this.emit("missingKey",q,y,ut,A)};this.options.saveMissing&&(this.options.saveMissingPlurals&&St?Mt.forEach(q=>{const ut=this.pluralResolver.getSuffixes(q,f);I&&f[`defaultValue${this.options.pluralSeparator}zero`]&&ut.indexOf(`${this.options.pluralSeparator}zero`)<0&&ut.push(`${this.options.pluralSeparator}zero`),ut.forEach(v=>{$([q],p+v,f[`defaultValue${v}`]||Bt)})}):$(Mt,p,Bt))}A=this.extendTranslation(A,i,f,M,s),k&&A===p&&this.options.appendNamespaceToMissingKey&&(A=`${y}:${p}`),(k||ft)&&this.options.parseMissingKeyHandler&&(A=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${y}:${p}`:p,ft?A:void 0))}return r?(M.res=A,M.usedParams=this.getUsedParamsDetails(f),M):A}extendTranslation(i,f,s,r,h){var m,z;var p=this;if((m=this.i18nFormat)!=null&&m.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const M=W(i)&&(((z=s==null?void 0:s.interpolation)==null?void 0:z.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let A;if(M){const H=i.match(this.interpolator.nestingRegexp);A=H&&H.length}let L=s.replace&&!W(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(L={...this.options.interpolation.defaultVariables,...L}),i=this.interpolator.interpolate(i,L,s.lng||this.language||r.usedLng,s),M){const H=i.match(this.interpolator.nestingRegexp),Q=H&&H.length;A1&&arguments[1]!==void 0?arguments[1]:{},s,r,h,p,E;return W(i)&&(i=[i]),i.forEach(y=>{if(this.isValidLookup(s))return;const m=this.extractFromKey(y,f),z=m.key;r=z;let M=m.namespaces;this.options.fallbackNS&&(M=M.concat(this.options.fallbackNS));const A=f.count!==void 0&&!W(f.count),L=A&&!f.ordinal&&f.count===0,H=f.context!==void 0&&(W(f.context)||typeof f.context=="number")&&f.context!=="",Q=f.lngs?f.lngs:this.languageUtils.toResolveHierarchy(f.lng||this.language,f.fallbackLng);M.forEach(J=>{var xt,gt;this.isValidLookup(s)||(E=J,!xd[`${Q[0]}-${J}`]&&((xt=this.utils)!=null&&xt.hasLoadedNamespace)&&!((gt=this.utils)!=null&>.hasLoadedNamespace(E))&&(xd[`${Q[0]}-${J}`]=!0,this.logger.warn(`key "${r}" for languages "${Q.join(", ")}" won't get resolved as namespace "${E}" 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!!!")),Q.forEach(wt=>{var St;if(this.isValidLookup(s))return;p=wt;const ft=[z];if((St=this.i18nFormat)!=null&&St.addLookupKeys)this.i18nFormat.addLookupKeys(ft,z,wt,J,f);else{let mt;A&&(mt=this.pluralResolver.getSuffix(wt,f.count,f));const Kt=`${this.options.pluralSeparator}zero`,G=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(A&&(ft.push(z+mt),f.ordinal&&mt.indexOf(G)===0&&ft.push(z+mt.replace(G,this.options.pluralSeparator)),L&&ft.push(z+Kt)),H){const I=`${z}${this.options.contextSeparator}${f.context}`;ft.push(I),A&&(ft.push(I+mt),f.ordinal&&mt.indexOf(G)===0&&ft.push(I+mt.replace(G,this.options.pluralSeparator)),L&&ft.push(I+Kt))}}let k;for(;k=ft.pop();)this.isValidLookup(s)||(h=k,s=this.getResource(wt,J,k,f))}))})}),{res:s,usedKey:r,exactUsedKey:h,usedLng:p,usedNS:E}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,f,s){var h;let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(h=this.i18nFormat)!=null&&h.getResource?this.i18nFormat.getResource(i,f,s,r):this.resourceStore.getResource(i,f,s,r)}getUsedParamsDetails(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const f=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=i.replace&&!W(i.replace);let r=s?i.replace:i;if(s&&typeof i.count<"u"&&(r.count=i.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!s){r={...r};for(const h of f)delete r[h]}return r}static hasDefaultValue(i){const f="defaultValue";for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&f===s.substring(0,f.length)&&i[s]!==void 0)return!0;return!1}}class Ed{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=He.create("languageUtils")}getScriptPartFromCode(i){if(i=Iu(i),!i||i.indexOf("-")<0)return null;const f=i.split("-");return f.length===2||(f.pop(),f[f.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(f.join("-"))}getLanguagePartFromCode(i){if(i=Iu(i),!i||i.indexOf("-")<0)return i;const f=i.split("-");return this.formatLanguageCode(f[0])}formatLanguageCode(i){if(W(i)&&i.indexOf("-")>-1){let f;try{f=Intl.getCanonicalLocales(i)[0]}catch{}return f&&this.options.lowerCaseLng&&(f=f.toLowerCase()),f||(this.options.lowerCaseLng?i.toLowerCase():i)}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(i)>-1}getBestMatchFromCodes(i){if(!i)return null;let f;return i.forEach(s=>{if(f)return;const r=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(r))&&(f=r)}),!f&&this.options.supportedLngs&&i.forEach(s=>{if(f)return;const r=this.getLanguagePartFromCode(s);if(this.isSupportedCode(r))return f=r;f=this.options.supportedLngs.find(h=>{if(h===r)return h;if(!(h.indexOf("-")<0&&r.indexOf("-")<0)&&(h.indexOf("-")>0&&r.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===r||h.indexOf(r)===0&&r.length>1))return h})}),f||(f=this.getFallbackCodes(this.options.fallbackLng)[0]),f}getFallbackCodes(i,f){if(!i)return[];if(typeof i=="function"&&(i=i(f)),W(i)&&(i=[i]),Array.isArray(i))return i;if(!f)return i.default||[];let s=i[f];return s||(s=i[this.getScriptPartFromCode(f)]),s||(s=i[this.formatLanguageCode(f)]),s||(s=i[this.getLanguagePartFromCode(f)]),s||(s=i.default),s||[]}toResolveHierarchy(i,f){const s=this.getFallbackCodes(f||this.options.fallbackLng||[],i),r=[],h=p=>{p&&(this.isSupportedCode(p)?r.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return W(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(i))):W(i)&&h(this.formatLanguageCode(i)),s.forEach(p=>{r.indexOf(p)<0&&h(this.formatLanguageCode(p))}),r}}const Od={zero:0,one:1,two:2,few:3,many:4,other:5},Td={select:d=>d===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Pm{constructor(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=i,this.options=f,this.logger=He.create("pluralResolver"),this.pluralRulesCache={}}addRule(i,f){this.rules[i]=f}clearCache(){this.pluralRulesCache={}}getRule(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=Iu(i==="dev"?"en":i),r=f.ordinal?"ordinal":"cardinal",h=JSON.stringify({cleanedCode:s,type:r});if(h in this.pluralRulesCache)return this.pluralRulesCache[h];let p;try{p=new Intl.PluralRules(s,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Td;if(!i.match(/-|_/))return Td;const y=this.languageUtils.getLanguagePartFromCode(i);p=this.getRule(y,f)}return this.pluralRulesCache[h]=p,p}needsPlural(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(i,f);return s||(s=this.getRule("dev",f)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(i,f){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(i,s).map(r=>`${f}${r}`)}getSuffixes(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(i,f);return s||(s=this.getRule("dev",f)),s?s.resolvedOptions().pluralCategories.sort((r,h)=>Od[r]-Od[h]).map(r=>`${this.options.prepend}${f.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(i,f){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(i,s);return r?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r.select(f)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",f,s))}}const Ad=function(d,i,f){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,h=Xm(d,i,f);return!h&&r&&W(f)&&(h=bf(d,f,s),h===void 0&&(h=bf(i,f,s))),h},Sf=d=>d.replace(/\$/g,"$$$$");class Im{constructor(){var f;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=He.create("interpolator"),this.options=i,this.format=((f=i==null?void 0:i.interpolation)==null?void 0:f.format)||(s=>s),this.init(i)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.interpolation||(i.interpolation={escapeValue:!0});const{escape:f,escapeValue:s,useRawValueToEscape:r,prefix:h,prefixEscaped:p,suffix:E,suffixEscaped:y,formatSeparator:m,unescapeSuffix:z,unescapePrefix:M,nestingPrefix:A,nestingPrefixEscaped:L,nestingSuffix:H,nestingSuffixEscaped:Q,nestingOptionsSeparator:J,maxReplaces:xt,alwaysFormat:gt}=i.interpolation;this.escape=f!==void 0?f:Km,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=h?Nl(h):p||"{{",this.suffix=E?Nl(E):y||"}}",this.formatSeparator=m||",",this.unescapePrefix=z?"":M||"-",this.unescapeSuffix=this.unescapePrefix?"":z||"",this.nestingPrefix=A?Nl(A):L||Nl("$t("),this.nestingSuffix=H?Nl(H):Q||Nl(")"),this.nestingOptionsSeparator=J||",",this.maxReplaces=xt||1e3,this.alwaysFormat=gt!==void 0?gt:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(f,s)=>(f==null?void 0:f.source)===s?(f.lastIndex=0,f):new RegExp(s,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(i,f,s,r){var L;let h,p,E;const y=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=H=>{if(H.indexOf(this.formatSeparator)<0){const gt=Ad(f,y,H,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(gt,void 0,s,{...r,...f,interpolationkey:H}):gt}const Q=H.split(this.formatSeparator),J=Q.shift().trim(),xt=Q.join(this.formatSeparator).trim();return this.format(Ad(f,y,J,this.options.keySeparator,this.options.ignoreJSONStructure),xt,s,{...r,...f,interpolationkey:J})};this.resetRegExp();const z=(r==null?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,M=((L=r==null?void 0:r.interpolation)==null?void 0:L.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:H=>Sf(H)},{regex:this.regexp,safeValue:H=>this.escapeValue?Sf(this.escape(H)):Sf(H)}].forEach(H=>{for(E=0;h=H.regex.exec(i);){const Q=h[1].trim();if(p=m(Q),p===void 0)if(typeof z=="function"){const xt=z(i,h,r);p=W(xt)?xt:""}else if(r&&Object.prototype.hasOwnProperty.call(r,Q))p="";else if(M){p=h[0];continue}else this.logger.warn(`missed to pass in variable ${Q} for interpolating ${i}`),p="";else!W(p)&&!this.useRawValueToEscape&&(p=pd(p));const J=H.safeValue(p);if(i=i.replace(h[0],J),M?(H.regex.lastIndex+=p.length,H.regex.lastIndex-=h[0].length):H.regex.lastIndex=0,E++,E>=this.maxReplaces)break}}),i}nest(i,f){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,h,p;const E=(y,m)=>{const z=this.nestingOptionsSeparator;if(y.indexOf(z)<0)return y;const M=y.split(new RegExp(`${z}[ ]*{`));let A=`{${M[1]}`;y=M[0],A=this.interpolate(A,p);const L=A.match(/'/g),H=A.match(/"/g);(((L==null?void 0:L.length)??0)%2===0&&!H||H.length%2!==0)&&(A=A.replace(/'/g,'"'));try{p=JSON.parse(A),m&&(p={...m,...p})}catch(Q){return this.logger.warn(`failed parsing options string in nesting for key ${y}`,Q),`${y}${z}${A}`}return p.defaultValue&&p.defaultValue.indexOf(this.prefix)>-1&&delete p.defaultValue,y};for(;r=this.nestingRegexp.exec(i);){let y=[];p={...s},p=p.replace&&!W(p.replace)?p.replace:p,p.applyPostProcessor=!1,delete p.defaultValue;let m=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const z=r[1].split(this.formatSeparator).map(M=>M.trim());r[1]=z.shift(),y=z,m=!0}if(h=f(E.call(this,r[1].trim(),p),p),h&&r[0]===i&&!W(h))return h;W(h)||(h=pd(h)),h||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${i}`),h=""),m&&(h=y.reduce((z,M)=>this.format(z,M,s.lng,{...s,interpolationkey:r[1].trim()}),h.trim())),i=i.replace(r[0],h),this.regexp.lastIndex=0}return i}}const tp=d=>{let i=d.toLowerCase().trim();const f={};if(d.indexOf("(")>-1){const s=d.split("(");i=s[0].toLowerCase().trim();const r=s[1].substring(0,s[1].length-1);i==="currency"&&r.indexOf(":")<0?f.currency||(f.currency=r.trim()):i==="relativetime"&&r.indexOf(":")<0?f.range||(f.range=r.trim()):r.split(";").forEach(p=>{if(p){const[E,...y]=p.split(":"),m=y.join(":").trim().replace(/^'+|'+$/g,""),z=E.trim();f[z]||(f[z]=m),m==="false"&&(f[z]=!1),m==="true"&&(f[z]=!0),isNaN(m)||(f[z]=parseInt(m,10))}})}return{formatName:i,formatOptions:f}},Ml=d=>{const i={};return(f,s,r)=>{let h=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(h={...h,[r.interpolationkey]:void 0});const p=s+JSON.stringify(h);let E=i[p];return E||(E=d(Iu(s),r),i[p]=E),E(f)}};class ep{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=He.create("formatter"),this.options=i,this.formats={number:Ml((f,s)=>{const r=new Intl.NumberFormat(f,{...s});return h=>r.format(h)}),currency:Ml((f,s)=>{const r=new Intl.NumberFormat(f,{...s,style:"currency"});return h=>r.format(h)}),datetime:Ml((f,s)=>{const r=new Intl.DateTimeFormat(f,{...s});return h=>r.format(h)}),relativetime:Ml((f,s)=>{const r=new Intl.RelativeTimeFormat(f,{...s});return h=>r.format(h,s.range||"day")}),list:Ml((f,s)=>{const r=new Intl.ListFormat(f,{...s});return h=>r.format(h)})},this.init(i)}init(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=f.interpolation.formatSeparator||","}add(i,f){this.formats[i.toLowerCase().trim()]=f}addCached(i,f){this.formats[i.toLowerCase().trim()]=Ml(f)}format(i,f,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const h=f.split(this.formatSeparator);if(h.length>1&&h[0].indexOf("(")>1&&h[0].indexOf(")")<0&&h.find(E=>E.indexOf(")")>-1)){const E=h.findIndex(y=>y.indexOf(")")>-1);h[0]=[h[0],...h.splice(1,E)].join(this.formatSeparator)}return h.reduce((E,y)=>{var M;const{formatName:m,formatOptions:z}=tp(y);if(this.formats[m]){let A=E;try{const L=((M=r==null?void 0:r.formatParams)==null?void 0:M[r.interpolationkey])||{},H=L.locale||L.lng||r.locale||r.lng||s;A=this.formats[m](E,H,{...z,...r,...L})}catch(L){this.logger.warn(L)}return A}else this.logger.warn(`there was no format function for ${m}`);return E},i)}}const ap=(d,i)=>{d.pending[i]!==void 0&&(delete d.pending[i],d.pendingCount--)};class lp extends ai{constructor(i,f,s){var h,p;let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=i,this.store=f,this.services=s,this.languageUtils=s.languageUtils,this.options=r,this.logger=He.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],(p=(h=this.backend)==null?void 0:h.init)==null||p.call(h,s,r.backend,r)}queueLoad(i,f,s,r){const h={},p={},E={},y={};return i.forEach(m=>{let z=!0;f.forEach(M=>{const A=`${m}|${M}`;!s.reload&&this.store.hasResourceBundle(m,M)?this.state[A]=2:this.state[A]<0||(this.state[A]===1?p[A]===void 0&&(p[A]=!0):(this.state[A]=1,z=!1,p[A]===void 0&&(p[A]=!0),h[A]===void 0&&(h[A]=!0),y[M]===void 0&&(y[M]=!0)))}),z||(E[m]=!0)}),(Object.keys(h).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(h),pending:Object.keys(p),toLoadLanguages:Object.keys(E),toLoadNamespaces:Object.keys(y)}}loaded(i,f,s){const r=i.split("|"),h=r[0],p=r[1];f&&this.emit("failedLoading",h,p,f),!f&&s&&this.store.addResourceBundle(h,p,s,void 0,void 0,{skipCopy:!0}),this.state[i]=f?-1:2,f&&s&&(this.state[i]=0);const E={};this.queue.forEach(y=>{Qm(y.loaded,[h],p),ap(y,i),f&&y.errors.push(f),y.pendingCount===0&&!y.done&&(Object.keys(y.loaded).forEach(m=>{E[m]||(E[m]={});const z=y.loaded[m];z.length&&z.forEach(M=>{E[m][M]===void 0&&(E[m][M]=!0)})}),y.done=!0,y.errors.length?y.callback(y.errors):y.callback())}),this.emit("loaded",E),this.queue=this.queue.filter(y=>!y.done)}read(i,f,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,p=arguments.length>5?arguments[5]:void 0;if(!i.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:f,fcName:s,tried:r,wait:h,callback:p});return}this.readingCalls++;const E=(m,z)=>{if(this.readingCalls--,this.waitingReads.length>0){const M=this.waitingReads.shift();this.read(M.lng,M.ns,M.fcName,M.tried,M.wait,M.callback)}if(m&&z&&r{this.read.call(this,i,f,s,r+1,h*2,p)},h);return}p(m,z)},y=this.backend[s].bind(this.backend);if(y.length===2){try{const m=y(i,f);m&&typeof m.then=="function"?m.then(z=>E(null,z)).catch(E):E(null,m)}catch(m){E(m)}return}return y(i,f,E)}prepareLoading(i,f){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();W(i)&&(i=this.languageUtils.toResolveHierarchy(i)),W(f)&&(f=[f]);const h=this.queueLoad(i,f,s,r);if(!h.toLoad.length)return h.pending.length||r(),null;h.toLoad.forEach(p=>{this.loadOne(p)})}load(i,f,s){this.prepareLoading(i,f,{},s)}reload(i,f,s){this.prepareLoading(i,f,{reload:!0},s)}loadOne(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=i.split("|"),r=s[0],h=s[1];this.read(r,h,"read",void 0,void 0,(p,E)=>{p&&this.logger.warn(`${f}loading namespace ${h} for language ${r} failed`,p),!p&&E&&this.logger.log(`${f}loaded namespace ${h} for language ${r}`,E),this.loaded(i,p,E)})}saveMissing(i,f,s,r,h){var y,m,z,M,A;let p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},E=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((m=(y=this.services)==null?void 0:y.utils)!=null&&m.hasLoadedNamespace&&!((M=(z=this.services)==null?void 0:z.utils)!=null&&M.hasLoadedNamespace(f))){this.logger.warn(`did not save key "${s}" as the namespace "${f}" 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(!(s==null||s==="")){if((A=this.backend)!=null&&A.create){const L={...p,isUpdate:h},H=this.backend.create.bind(this.backend);if(H.length<6)try{let Q;H.length===5?Q=H(i,f,s,r,L):Q=H(i,f,s,r),Q&&typeof Q.then=="function"?Q.then(J=>E(null,J)).catch(E):E(null,Q)}catch(Q){E(Q)}else H(i,f,s,r,E,L)}!i||!i[0]||this.store.addResource(i[0],f,s,r)}}}const zd=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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:d=>{let i={};if(typeof d[1]=="object"&&(i=d[1]),W(d[1])&&(i.defaultValue=d[1]),W(d[2])&&(i.tDescription=d[2]),typeof d[2]=="object"||typeof d[3]=="object"){const f=d[3]||d[2];Object.keys(f).forEach(s=>{i[s]=f[s]})}return i},interpolation:{escapeValue:!0,format:d=>d,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Rd=d=>{var i,f;return W(d.ns)&&(d.ns=[d.ns]),W(d.fallbackLng)&&(d.fallbackLng=[d.fallbackLng]),W(d.fallbackNS)&&(d.fallbackNS=[d.fallbackNS]),((f=(i=d.supportedLngs)==null?void 0:i.indexOf)==null?void 0:f.call(i,"cimode"))<0&&(d.supportedLngs=d.supportedLngs.concat(["cimode"])),typeof d.initImmediate=="boolean"&&(d.initAsync=d.initImmediate),d},Fu=()=>{},np=d=>{Object.getOwnPropertyNames(Object.getPrototypeOf(d)).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f].bind(d))})};class Hn extends ai{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Rd(i),this.services={},this.logger=He,this.modules={external:[]},np(this),f&&!this.isInitialized&&!i.isClone){if(!this.options.initAsync)return this.init(i,f),this;setTimeout(()=>{this.init(i,f)},0)}}init(){var i=this;let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof f=="function"&&(s=f,f={}),f.defaultNS==null&&f.ns&&(W(f.ns)?f.defaultNS=f.ns:f.ns.indexOf("translation")<0&&(f.defaultNS=f.ns[0]));const r=zd();this.options={...r,...this.options,...Rd(f)},this.options.interpolation={...r.interpolation,...this.options.interpolation},f.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=f.keySeparator),f.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=f.nsSeparator);const h=z=>z?typeof z=="function"?new z:z:null;if(!this.options.isClone){this.modules.logger?He.init(h(this.modules.logger),this.options):He.init(null,this.options);let z;this.modules.formatter?z=this.modules.formatter:z=ep;const M=new Ed(this.options);this.store=new bd(this.options.resources,this.options);const A=this.services;A.logger=He,A.resourceStore=this.store,A.languageUtils=M,A.pluralResolver=new Pm(M,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),z&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(A.formatter=h(z),A.formatter.init(A,this.options),this.options.interpolation.format=A.formatter.format.bind(A.formatter)),A.interpolator=new Im(this.options),A.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},A.backendConnector=new lp(h(this.modules.backend),A.resourceStore,A,this.options),A.backendConnector.on("*",function(L){for(var H=arguments.length,Q=new Array(H>1?H-1:0),J=1;J1?H-1:0),J=1;J{L.init&&L.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Fu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const z=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);z.length>0&&z[0]!=="dev"&&(this.options.lng=z[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(z=>{this[z]=function(){return i.store[z](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(z=>{this[z]=function(){return i.store[z](...arguments),i}});const y=Un(),m=()=>{const z=(M,A)=>{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),y.resolve(A),s(M,A)};if(this.languages&&!this.isInitialized)return z(null,this.t.bind(this));this.changeLanguage(this.options.lng,z)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),y}loadResources(i){var h,p;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fu;const r=W(i)?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if((r==null?void 0:r.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const E=[],y=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(M=>{M!=="cimode"&&E.indexOf(M)<0&&E.push(M)})};r?y(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(z=>y(z)),(p=(h=this.options.preload)==null?void 0:h.forEach)==null||p.call(h,m=>y(m)),this.services.backendConnector.load(E,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(m)})}else s(null)}reloadResources(i,f,s){const r=Un();return typeof i=="function"&&(s=i,i=void 0),typeof f=="function"&&(s=f,f=void 0),i||(i=this.languages),f||(f=this.options.ns),s||(s=Fu),this.services.backendConnector.reload(i,f,h=>{r.resolve(),s(h)}),r}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Ld.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}setResolvedLanguage(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(let f=0;f-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(i,f){var s=this;this.isLanguageChangingTo=i;const r=Un();this.emit("languageChanging",i);const h=y=>{this.language=y,this.languages=this.services.languageUtils.toResolveHierarchy(y),this.resolvedLanguage=void 0,this.setResolvedLanguage(y)},p=(y,m)=>{m?(h(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,r.resolve(function(){return s.t(...arguments)}),f&&f(y,function(){return s.t(...arguments)})},E=y=>{var z,M;!i&&!y&&this.services.languageDetector&&(y=[]);const m=W(y)?y:this.services.languageUtils.getBestMatchFromCodes(y);m&&(this.language||h(m),this.translator.language||this.translator.changeLanguage(m),(M=(z=this.services.languageDetector)==null?void 0:z.cacheUserLanguage)==null||M.call(z,m)),this.loadResources(m,A=>{p(A,m)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?E(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(E):this.services.languageDetector.detect(E):E(i),r}getFixedT(i,f,s){var r=this;const h=function(p,E){let y;if(typeof E!="object"){for(var m=arguments.length,z=new Array(m>2?m-2:0),M=2;M`${y.keyPrefix}${A}${H}`):L=y.keyPrefix?`${y.keyPrefix}${A}${p}`:p,r.t(L,y)};return W(i)?h.lng=i:h.lngs=i,h.ns=f,h.keyPrefix=s,h}t(){var r;for(var i=arguments.length,f=new Array(i),s=0;s1&&arguments[1]!==void 0?arguments[1]:{};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 s=f.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,h=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const p=(E,y)=>{const m=this.services.backendConnector.state[`${E}|${y}`];return m===-1||m===0||m===2};if(f.precheck){const E=f.precheck(this,p);if(E!==void 0)return E}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(s,i)&&(!r||p(h,i)))}loadNamespaces(i,f){const s=Un();return this.options.ns?(W(i)&&(i=[i]),i.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{s.resolve(),f&&f(r)}),s):(f&&f(),Promise.resolve())}loadLanguages(i,f){const s=Un();W(i)&&(i=[i]);const r=this.options.preload||[],h=i.filter(p=>r.indexOf(p)<0&&this.services.languageUtils.isSupportedCode(p));return h.length?(this.options.preload=r.concat(h),this.loadResources(p=>{s.resolve(),f&&f(p)}),s):(f&&f(),Promise.resolve())}dir(i){var r,h;if(i||(i=this.resolvedLanguage||(((r=this.languages)==null?void 0:r.length)>0?this.languages[0]:this.language)),!i)return"rtl";const f=["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"],s=((h=this.services)==null?void 0:h.languageUtils)||new Ed(zd());return f.indexOf(s.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;return new Hn(i,f)}cloneInstance(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fu;const s=i.forkResourceStore;s&&delete i.forkResourceStore;const r={...this.options,...i,isClone:!0},h=new Hn(r);if((i.debug!==void 0||i.prefix!==void 0)&&(h.logger=h.logger.clone(i)),["store","services","language"].forEach(E=>{h[E]=this[E]}),h.services={...this.services},h.services.utils={hasLoadedNamespace:h.hasLoadedNamespace.bind(h)},s){const E=Object.keys(this.store.data).reduce((y,m)=>(y[m]={...this.store.data[m]},Object.keys(y[m]).reduce((z,M)=>(z[M]={...y[m][M]},z),{})),{});h.store=new bd(E,r),h.services.resourceStore=h.store}return h.translator=new ei(h.services,r),h.translator.on("*",function(E){for(var y=arguments.length,m=new Array(y>1?y-1:0),z=1;z{if(i)for(const f in i)d[f]===void 0&&(d[f]=i[f])}),d}const Dd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,fp=function(d,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(i);let h=`${d}=${r}`;if(s.maxAge>0){const p=s.maxAge-0;if(Number.isNaN(p))throw new Error("maxAge should be a Number");h+=`; Max-Age=${Math.floor(p)}`}if(s.domain){if(!Dd.test(s.domain))throw new TypeError("option domain is invalid");h+=`; Domain=${s.domain}`}if(s.path){if(!Dd.test(s.path))throw new TypeError("option path is invalid");h+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");h+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(h+="; HttpOnly"),s.secure&&(h+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:h+="; SameSite=Strict";break;case"lax":h+="; SameSite=Lax";break;case"strict":h+="; SameSite=Strict";break;case"none":h+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return h},Nd={create(d,i,f,s){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};f&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+f*60*1e3)),s&&(r.domain=s),document.cookie=fp(d,encodeURIComponent(i),r)},read(d){const i=`${d}=`,f=document.cookie.split(";");for(let s=0;s-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const p=r.substring(1).split("&");for(let E=0;E0&&p[E].substring(0,y)===i&&(f=p[E].substring(y+1))}}return f}};let _n=null;const Md=()=>{if(_n!==null)return _n;try{_n=window!=="undefined"&&window.localStorage!==null;const d="i18next.translate.boo";window.localStorage.setItem(d,"foo"),window.localStorage.removeItem(d)}catch{_n=!1}return _n};var op={name:"localStorage",lookup(d){let{lookupLocalStorage:i}=d;if(i&&Md())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(d,i){let{lookupLocalStorage:f}=i;f&&Md()&&window.localStorage.setItem(f,d)}};let Cn=null;const Ud=()=>{if(Cn!==null)return Cn;try{Cn=window!=="undefined"&&window.sessionStorage!==null;const d="i18next.translate.boo";window.sessionStorage.setItem(d,"foo"),window.sessionStorage.removeItem(d)}catch{Cn=!1}return Cn};var dp={name:"sessionStorage",lookup(d){let{lookupSessionStorage:i}=d;if(i&&Ud())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(d,i){let{lookupSessionStorage:f}=i;f&&Ud()&&window.sessionStorage.setItem(f,d)}},hp={name:"navigator",lookup(d){const i=[];if(typeof navigator<"u"){const{languages:f,userLanguage:s,language:r}=navigator;if(f)for(let h=0;h0?i:void 0}},gp={name:"htmlTag",lookup(d){let{htmlTag:i}=d,f;const s=i||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(f=s.getAttribute("lang")),f}},mp={name:"path",lookup(d){var r;let{lookupFromPathIndex:i}=d;if(typeof window>"u")return;const f=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?(r=f[typeof i=="number"?i:0])==null?void 0:r.replace("/",""):void 0}},pp={name:"subdomain",lookup(d){var r,h;let{lookupFromSubdomainIndex:i}=d;const f=typeof i=="number"?i+1:1,s=typeof window<"u"&&((h=(r=window.location)==null?void 0:r.hostname)==null?void 0:h.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[f]}};let Hd=!1;try{document.cookie,Hd=!0}catch{}const wd=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Hd||wd.splice(1,1);const yp=()=>({order:wd,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:d=>d});class Bd{constructor(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(i,f)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=i,this.options=sp(f,this.options||{},yp()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(cp),this.addDetector(rp),this.addDetector(op),this.addDetector(dp),this.addDetector(hp),this.addDetector(gp),this.addDetector(mp),this.addDetector(pp)}addDetector(i){return this.detectors[i.name]=i,this}detect(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,f=[];return i.forEach(s=>{if(this.detectors[s]){let r=this.detectors[s].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(f=f.concat(r))}}),f=f.map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?f:f.length>0?f[0]:null}cacheUserLanguage(i){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;f&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(i)>-1||f.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(i,this.options)}))}}Bd.type="languageDetector";const vp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Sp={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},bp=d=>Sp[d],xp=d=>d.replace(vp,bp);let _d={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xp};const Ep=(d={})=>{_d={..._d,...d}},Op={type:"3rdParty",init(d){Ep(d.options.react)}},Tp={Header:{"all-repositories":"All Repositories"},InstallGuide:{"installation-command":"Installation Command",copy:{prompt:"Copy to clipboard",success:"Copied!"}},Logo:{title:"Snigdha OS Package List",description:"Browse and search through the official Snigdha OS package repository"},PackageCard:{"show-installation":"Show Installation","hide-installation":"Hide Installation"},SearchBar:{placeholder:"Search packages..."},App:{package_count:{single:"Showing {{count}} package",multiple:"Showing {{count}} packages",plural:"Showing {{count}} packages"},error:{"fetching-packages":"An error occurred while fetching packages: {{error}}","retry-fetching-packages":"Retry"},"no-packages-found":"No packages found matching your search.",footer:"Data Source:"}},Ap={Header:{"all-repositories":"Усі репозиторії"},InstallGuide:{"installation-command":"Команда для встановлення",copy:{prompt:"Копіювати в буфер обміну",success:"Скопійовано!"}},Logo:{title:"Список пакетів Snigdha OS",description:"Переглядайте та шукайте в офіційному репозиторії пакетів Snigdha OS"},PackageCard:{"show-installation":"Показати інструкцію з встановлення","hide-installation":"Сховати інструкцію з встановлення"},SearchBar:{placeholder:"Шукати пакети..."},App:{package_count:{single:"Показано {{count}} пакет",multiple:"Показано {{count}} пакети",plural:"Показано {{count}} пакетів"},error:{"fetching-packages":"Сталася помилка при отриманні пакетів: {{error}}","retry-fetching-packages":"Спробувати ще раз"},"no-packages-found":"Не знайдено жодного пакета, що відповідає вашому запиту.",footer:"Джерело даних:"}},zp={Header:{"all-repositories":"Wszystkie repozytoria"},InstallGuide:{"installation-command":"Polecenie instalacji",copy:{prompt:"Skopiuj do schowka",success:"Skopiowano!"}},Logo:{title:"Lista pakietów Snigdha OS",description:"Przeglądaj i wyszukuj w oficjalnym repozytorium pakietów Snigdha OS"},PackageCard:{"show-installation":"Pokaż instalację","hide-installation":"Ukryj instalację"},SearchBar:{placeholder:"Szukaj pakietów..."},App:{package_count:{single:"Wyświetlanie {{count}} pakietu",multiple:"Wyświetlanie {{count}} pakietów",plural:"Wyświetlanie {{count}} pakietów"},error:{"fetching-packages":"Wystąpił błąd podczas pobierania pakietów: {{error}}","retry-fetching-packages":"Spróbuj ponownie"},"no-packages-found":"Nie znaleziono pakietów odpowiadających Twojemu wyszukiwaniu.",footer:"Źródło danych:"}},Rp={EN:Tp,UK:Ap,PL:zp},Dp=Object.fromEntries(Object.entries(Rp).map(([d,i])=>[d.toLowerCase(),{translation:i}]));Nt.use(Op).use(Bd).init({resources:Dp,fallbackLng:localStorage.getItem("selectedLanguage")||"en",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const Wt=(d,i)=>Nt.t(d,i);function Np(){return C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("div",{className:"p-3 bg-white/10 rounded-lg",children:C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:"h-10 w-10",fill:"currentColor",children:[C.jsx("circle",{cx:"50",cy:"50",r:"48",stroke:"currentColor",strokeWidth:"4",fill:"none"}),C.jsx("path",{d:"M50 20L70 50L50 80L30 50Z",fill:"currentColor",className:"text-nord-7"})]})}),C.jsxs("div",{children:[C.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:Wt("Logo.title")}),C.jsx("p",{className:"text-nord-4 text-sm mt-1",children:Wt("Logo.description")})]})]})}var jn=(d=>(d.ALL="all",d.CORE="core",d.EXTRA="extra",d.COMMUNITY="community",d.MULTILIB="multilib",d))(jn||{}),qd=(d=>(d.EN="English",d.UK="Українська",d.PL="Polski",d))(qd||{});const xf={core:{url:"https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-pkgbuilds/refs/heads/master/snigdhaos-core/packages.json",repository:"core"},extra:{url:"https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-pkgbuilds/refs/heads/master/snigdhaos-extra/packages.json",repository:"extra"}};async function Mp(d,i){return(await(await fetch(d)).json()).map(r=>({name:r.name,version:r.version,description:r.description,repository:i}))}async function Up(){let d=[];for(const i in xf){const f=xf[i];try{const s=await Mp(f.url,f.repository);d=d.concat(s)}catch(s){console.warn(`Failed to fetch from mirror ${f.url}:`,s);continue}}if(d.length===0)throw new Error("All mirrors failed to respond");return d}function _p({onRepositoryChange:d}){const i=new Set(Object.values(xf).map(r=>r.repository)),f=Object.keys(jn).reduce((r,h)=>((h==="ALL"||i.has(jn[h]))&&(r[h]=jn[h]),r),{}),s=r=>{const h=r.target.value;Nt.changeLanguage(h).then(()=>{localStorage.setItem("selectedLanguage",h),window.location.reload()})};return Tt.useEffect(()=>{const r=localStorage.getItem("selectedLanguage");r&&r!==Nt.language&&Nt.changeLanguage(r)},[]),C.jsx("header",{className:"bg-gradient-to-r from-nord-9 to-nord-8 via-nord-10 text-nord-6 shadow-lg",children:C.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("div",{className:"flex items-center gap-4",children:C.jsx(Np,{})}),C.jsx("div",{children:C.jsx("select",{onChange:r=>d(r.target.value),defaultValue:"all",className:"bg-nord-5 dark:bg-nord-1 text-black dark:text-white border-2 border-nord-4 dark:border-nord-2 rounded-lg py-2 px-4 focus:ring-2 focus:ring-nord-8",children:Object.values(f).map(r=>C.jsx("option",{value:r,children:r===jn.ALL?Wt("Header.all-repositories"):r.charAt(0).toUpperCase()+r.slice(1)},r))})}),C.jsx("div",{children:C.jsx("select",{onChange:s,defaultValue:Nt.language,className:"bg-nord-5 dark:bg-nord-1 text-black dark:text-white border-2 border-nord-4 dark:border-nord-2 rounded-lg py-2 px-4 focus:ring-2 focus:ring-nord-8",children:Object.entries(qd).map(([r,h])=>C.jsx("option",{value:r.toLowerCase(),children:h},r))})}),C.jsx(Ym,{})]})})})}function Cp({value:d,onChange:i}){return C.jsxs("div",{className:"relative w-full max-w-md mx-auto",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:C.jsx(jm,{className:"h-5 w-5 text-nord-6 dark:text-nord-5"})}),C.jsx("input",{type:"text",value:d,onChange:f=>i(f.target.value),placeholder:Wt("SearchBar.placeholder"),className:"block w-full pl-10 pr-4 py-3 border-2 border-nord-4 dark:border-nord-2 rounded-xl bg-nord-5 dark:bg-nord-1 focus:ring-2 focus:ring-nord-8 focus:border-transparent text-nord-0 dark:text-nord-6 placeholder-nord-3 dark:placeholder-nord-4 transition-all ease-in-out duration-200 shadow-md hover:shadow-lg"})]})}function jp({packageName:d}){const[i,f]=Tt.useState(!1),s=`sudo pacman -S ${d}`,r=()=>{navigator.clipboard.writeText(s),f(!0),setTimeout(()=>f(!1),2e3)};return C.jsxs("div",{className:"bg-nord-0 dark:bg-nord-3 rounded-xl p-5 shadow-md transition-all",children:[C.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[C.jsx(Bm,{className:"h-5 w-5 text-nord-9 dark:text-nord-7"}),C.jsx("span",{className:"text-nord-2 dark:text-nord-5 text-sm font-semibold uppercase tracking-wide",children:Wt("InstallGuide.installation-command")})]}),C.jsxs("div",{className:"flex items-center justify-between bg-nord-4 dark:bg-nord-2 rounded-lg px-5 py-3",children:[C.jsx("code",{className:"text-nord-8 dark:text-nord-6 font-mono text-sm truncate",children:s}),C.jsx("button",{onClick:r,className:"flex items-center justify-center w-8 h-8 rounded-full bg-nord-3 hover:bg-nord-7 dark:bg-nord-5 dark:hover:bg-nord-8 transition-colors",title:Wt(i?"InstallGuide.copy.success":"InstallGuide.copy.prompt"),children:i?C.jsx(Tm,{className:"h-4 w-4 text-nord-6 dark:text-nord-0"}):C.jsx(Mm,{className:"h-4 w-4 text-nord-6 dark:text-nord-0"})})]})]})}function Lp({package:d}){const[i,f]=Tt.useState(!1);return C.jsxs("div",{className:"bg-gradient-to-b from-nord-5 to-nord-6 dark:from-nord-1 dark:to-nord-2 rounded-xl shadow-xl border border-nord-4 dark:border-nord-2 hover:shadow-2xl transform transition-all duration-300 overflow-hidden hover:scale-105",children:[C.jsxs("div",{className:"p-6 flex items-start gap-4",children:[C.jsx("div",{className:"flex-shrink-0 p-4 bg-nord-8/10 dark:bg-nord-8/20 rounded-full shadow-lg transform transition-all duration-300 hover:scale-110",children:C.jsx(Em,{className:"h-6 w-6 text-nord-7 dark:text-nord-6"})}),C.jsxs("div",{className:"flex-1",children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("h3",{className:"text-lg font-bold text-nord-0 dark:text-nord-6 group-hover:text-nord-10 transition-colors",children:d.name}),C.jsx("span",{className:"text-sm font-medium text-nord-3 dark:text-nord-4",children:d.version})]}),C.jsx("p",{className:"mt-2 text-sm text-nord-2 dark:text-nord-4 line-clamp-2 transition-all duration-300 hover:text-nord-9 dark:hover:text-nord-7",children:d.description}),C.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[C.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-gradient-to-r from-nord-7 to-nord-8 dark:from-nord-8/30 dark:to-nord-9 text-nord-0 dark:text-nord-6 shadow-lg transform transition-all duration-300 hover:scale-105",children:d.repository}),C.jsx("button",{onClick:()=>f(!i),className:"text-nord-9 dark:text-nord-8 hover:text-nord-10 dark:hover:text-nord-7 flex items-center gap-2 text-sm font-medium transition-all duration-300 hover:scale-105",children:i?C.jsxs(C.Fragment,{children:[C.jsx(Dm,{className:"h-5 w-5 animate-bounce"}),Wt("PackageCard.hide-installation")]}):C.jsxs(C.Fragment,{children:[C.jsx(zm,{className:"h-5 w-5 animate-bounce"}),Wt("PackageCard.show-installation")]})})]})]})]}),i&&C.jsx("div",{className:"border-t border-nord-4 dark:border-nord-2 p-6 bg-nord-6 dark:bg-nord-0 transition-all duration-300",children:C.jsx(jp,{packageName:d.name})})]})}function Hp({packages:d,loading:i}){if(i)return C.jsx("div",{className:"flex items-center justify-center h-64",children:C.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})});const f=Tt.useMemo(()=>[...d].sort((s,r)=>s.name.localeCompare(r.name)),[d]);return C.jsx("div",{className:"grid gap-4",children:f.map(s=>C.jsx(Lp,{package:s},s.name))})}function wp(){const[d,i]=Tt.useState([]),[f,s]=Tt.useState(!0),[r,h]=Tt.useState(null),[p,E]=Tt.useState(0),y=Tt.useCallback(async()=>{try{s(!0),h(null);const z=await Up();i(z)}catch(z){console.error("Failed to fetch packages:",z),h("Failed to load packages. Please try again later."),p<3&&E(M=>M+1)}finally{s(!1)}},[p]);return Tt.useEffect(()=>{y()},[y]),{packages:d,loading:f,error:r,retryLoading:()=>{E(0),y()}}}function Bp(){const{packages:d,loading:i,error:f}=wp(),[s,r]=Tt.useState(""),[h,p]=Tt.useState("all"),[E,y]=Tt.useState(s);Tt.useEffect(()=>{const L=setTimeout(()=>{y(s)},300);return()=>clearTimeout(L)},[s]);const m=d.filter(L=>h!=="all"&&L.repository!==h?!1:L.name.toLowerCase().includes(E.toLowerCase())||L.description.toLowerCase().includes(E.toLowerCase())),z=L=>{r(L)},M=L=>{p(L)},A=m.length;return C.jsxs("div",{className:"min-h-screen bg-nord-6 dark:bg-nord-0 transition-colors",role:"main",children:[C.jsx(_p,{onRepositoryChange:M}),C.jsxs("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[C.jsx("div",{className:"mb-8",children:C.jsx(Cp,{value:s,onChange:z})}),C.jsx("div",{className:"mb-4 flex items-center justify-between",children:C.jsx("p",{className:"text-sm text-nord-3 dark:text-nord-4","aria-live":"polite",children:A===1?Wt("App.package_count.single",{count:A}):A>=2&&A<=4?Wt("App.package_count.multiple",{count:A}):Wt("App.package_count.plural",{count:A})})}),f?C.jsxs("div",{className:"rounded-lg bg-nord-11/10 dark:bg-nord-11/20 p-4 text-nord-11",role:"alert",children:[C.jsx("p",{children:Wt("App.error.fetching-packages",{error:f})}),C.jsx("button",{onClick:()=>window.location.reload(),className:"mt-2 inline-block text-sm text-nord-10 hover:underline",children:Wt("App.error.retry-fetching-packages")})]}):A===0?C.jsx("div",{className:"text-center text-nord-3 dark:text-nord-4 mt-12",children:C.jsx("p",{children:Wt("App.no-packages-found")})}):C.jsx(Hp,{packages:m,loading:i})]}),C.jsx("footer",{className:"bg-nord-5 dark:bg-nord-1 border-t border-nord-4 dark:border-nord-2 mt-12 transition-colors",children:C.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:C.jsxs("p",{className:"text-center text-sm text-nord-3 dark:text-nord-4",children:[Wt("App.footer")," ",C.jsx("a",{href:"https://github.com/Snigdha-OS/snigdhaos-core",className:"text-nord-10 hover:text-nord-9 dark:text-nord-8 dark:hover:text-nord-7",target:"_blank",rel:"noopener noreferrer",children:"Snigdha OS Package Repository"})]})})})]})}ym.createRoot(document.getElementById("root")).render(C.jsx(Tt.StrictMode,{children:C.jsx(Bp,{})}));