import{r as T,a as xt}from"./vendor-react-xnlkqCTC.js";const v=s=>typeof s=="string",te=()=>{let s,e;const t=new Promise((n,i)=>{s=n,e=i});return t.resolve=s,t.reject=e,t},Te=s=>s==null?"":String(s),St=(s,e,t)=>{s.forEach(n=>{e[n]&&(t[n]=e[n])})},bt=/###/g,je=s=>s&&s.includes("###")?s.replace(bt,"."):s,Ae=s=>!s||v(s),ie=(s,e,t)=>{const n=v(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Ae(s))return{};const r=je(n[i]);!s[r]&&t&&(s[r]=new t),Object.prototype.hasOwnProperty.call(s,r)?s=s[r]:s={},++i}return Ae(s)?{}:{obj:s,k:je(n[i])}},Fe=(s,e,t)=>{const{obj:n,k:i}=ie(s,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let r=e[e.length-1],o=e.slice(0,e.length-1),a=ie(s,o,Object);for(;a.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=ie(s,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${r}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=t},wt=(s,e,t,n)=>{const{obj:i,k:r}=ie(s,e,Object);i[r]=i[r]||[],i[r].push(t)},de=(s,e)=>{const{obj:t,k:n}=ie(s,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},vt=(s,e,t)=>{const n=de(s,t);return n!==void 0?n:de(e,t)},nt=(s,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(Object.prototype.hasOwnProperty.call(s,n)?v(s[n])||s[n]instanceof String||v(e[n])||e[n]instanceof String?t&&(s[n]=e[n]):nt(s[n],e[n],t):s[n]=e[n]);return s},q=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Lt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Ot=s=>v(s)?s.replace(/[&<>"'\/]/g,e=>Lt[e]):s;class Et{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const Ct=[" ",",","?","!",";"],$t=new Et(20),Nt=(s,e,t)=>{e=e||"",t=t||"";const n=Ct.filter(o=>!e.includes(o)&&!t.includes(o));if(n.length===0)return!0;const i=$t.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(s);if(!r){const o=s.indexOf(t);o>0&&!i.test(s.substring(0,o))&&(r=!0)}return r},Oe=(s,e,t=".")=>{if(!s)return;if(s[e])return Object.prototype.hasOwnProperty.call(s,e)?s[e]:void 0;const n=e.split(t);let i=s;for(let r=0;r<n.length;){if(!i||typeof i!="object")return;let o,a="";for(let l=r;l<n.length;++l)if(l!==r&&(a+=t),a+=n[l],o=i[a],o!==void 0){if(["string","number","boolean"].includes(typeof o)&&l<n.length-1)continue;r+=l-r+1;break}i=o}return i},oe=s=>s==null?void 0:s.replace(/_/g,"-"),kt={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,e){var t,n;(n=(t=console==null?void 0:console[s])==null?void 0:t.apply)==null||n.call(t,console,e)}};class he{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||kt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(e=e.map(r=>v(r)?r.replace(/[\r\n\x00-\x1F\x7F]/g," "):r),v(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new he(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new he(this.logger,e)}}var _=new he;class me{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const n=(...i)=>{t(...i),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,r])=>{for(let o=0;o<r;o++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,r])=>{for(let o=0;o<r;o++)i(e,...t)})}}class Ie extends me{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){var u,f;const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.includes(".")?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):v(n)&&r?a.push(...n.split(r)):a.push(n)));const l=de(this.data,a);return!l&&!t&&!n&&e.includes(".")&&(e=a[0],t=a[1],n=a.slice(2).join(".")),l||!o||!v(n)?l:Oe((f=(u=this.data)==null?void 0:u[e])==null?void 0:f[t],n,r)}addResource(e,t,n,i,r={silent:!1}){const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.includes(".")&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),Fe(this.data,a,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const r in n)(v(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r,o={silent:!1,skipCopy:!1}){let a=[e,t];e.includes(".")&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let l=de(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?nt(l,n,r):l={...l,...n},Fe(this.data,a,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var st={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,e,t,n,i){return s.forEach(r=>{var o;e=((o=this.processors[r])==null?void 0:o.process(e,t,n,i))??e}),e}};const it=Symbol("i18next/PATH_KEY");function Rt(){const s=[],e=Object.create(null);let t;return e.get=(n,i)=>{var r;return(r=t==null?void 0:t.revoke)==null||r.call(t),i===it?s:(s.push(i),t=Proxy.revocable(n,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Y(s,e){const{[it]:t}=s(Rt()),n=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":",r=(e==null?void 0:e.enableSelector)==="strict";if(t.length>1&&i){const o=e==null?void 0:e.ns,a=r?Array.isArray(o)?o:o?[o]:null:Array.isArray(o)?o:null;if(a&&(r?a:a.length>1?a.slice(1):[]).includes(t[0]))return`${t[0]}${i}${t.slice(1).join(n)}`}return t.join(n)}const be=s=>!v(s)&&typeof s!="boolean"&&typeof s!="number";class pe extends me{constructor(e,t={}){super(),St(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=_.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const r=be(i.res);return!(n.returnObjects===!1&&r)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const o=n&&e.includes(n),a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Nt(e,n,i);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:v(r)?[r]:r};const u=e.split(n);(n!==i||n===i&&this.options.ns.includes(u[0]))&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:v(r)?[r]:r}}translate(e,t,n){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=Y(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(N=>typeof N=="function"?Y(N,{...this.options,...i}):String(N));const r=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],i),u=l[l.length-1];let f=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=i.lng||this.language,h=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return h?r?{res:`${u}${f}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${f}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:a;const p=this.resolve(e,i);let d=p==null?void 0:p.res;const y=(p==null?void 0:p.usedKey)||a,m=(p==null?void 0:p.exactUsedKey)||a,E=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,L=i.count!==void 0&&!v(i.count),w=pe.hasDefaultValue(i),C=L?this.pluralResolver.getSuffix(c,i.count,i):"",R=i.ordinal&&L?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",O=L&&!i.ordinal&&i.count===0,b=O&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${R}`]||i.defaultValue;let g=d;x&&!d&&w&&(g=b);const I=be(g),$=Object.prototype.toString.apply(g);if(x&&g&&I&&!E.includes($)&&!(v(S)&&Array.isArray(g))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,g,{...i,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(p.res=N,p.usedParams=this.getUsedParamsDetails(i),p):N}if(o){const N=Array.isArray(g),k=N?[]:{},j=N?m:y;for(const A in g)if(Object.prototype.hasOwnProperty.call(g,A)){const P=`${j}${o}${A}`;w&&!d?k[A]=this.translate(P,{...i,defaultValue:be(b)?b[A]:void 0,joinArrays:!1,ns:l}):k[A]=this.translate(P,{...i,joinArrays:!1,ns:l}),k[A]===P&&(k[A]=g[A])}d=k}}else if(x&&v(S)&&Array.isArray(d))d=d.join(S),d&&(d=this.extendTranslation(d,e,i,n));else{let N=!1,k=!1;!this.isValidLookup(d)&&w&&(N=!0,d=b),this.isValidLookup(d)||(k=!0,d=a);const A=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:d,P=w&&b!==d&&this.options.updateMissing;if(k||N||P){if(this.logger.log(P?"updateKey":"missingKey",c,u,L&&!P?`${a}${this.pluralResolver.getSuffix(c,i.count,i)}`:a,P?b:d),o){const D=this.resolve(a,{...i,keySeparator:!1});D&&D.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 V=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let D=0;D<K.length;D++)V.push(K[D]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(i.lng||this.language):V.push(i.lng||this.language);const J=(D,F,U)=>{var X;const z=w&&U!==d?U:A;this.options.missingKeyHandler?this.options.missingKeyHandler(D,u,F,z,P,i):(X=this.backendConnector)!=null&&X.saveMissing&&this.backendConnector.saveMissing(D,u,F,z,P,i),this.emit("missingKey",D,u,F,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?V.forEach(D=>{const F=this.pluralResolver.getSuffixes(D,i);O&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!F.includes(`${this.options.pluralSeparator}zero`)&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(U=>{J([D],a+U,i[`defaultValue${U}`]||b)})}):J(V,a,b))}d=this.extendTranslation(d,e,i,p,n),k&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${u}${f}${a}`),(k||N)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${f}${a}`:a,N?d:void 0,i))}return r?(p.res=d,p.usedParams=this.getUsedParamsDetails(i),p):d}extendTranslation(e,t,n,i,r){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=v(e)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const p=e.match(this.interpolator.nestingRegexp);c=p&&p.length}let h=n.replace&&!v(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),f){const p=e.match(this.interpolator.nestingRegexp),d=p&&p.length;c<d&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...p)=>(r==null?void 0:r[0])===p[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):this.translate(...p,t),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=v(o)?[o]:o;return e!=null&&(a!=null&&a.length)&&n.applyPostProcessor!==!1&&(e=st.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,r,o,a;return v(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?Y(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,t),f=u.key;i=f;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=t.count!==void 0&&!v(t.count),p=h&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(v(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(m=>{var E,S;this.isValidLookup(n)||(a=m,!this.checkedLoadedFor[`${y[0]}-${m}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((S=this.utils)!=null&&S.hasLoadedNamespace(a))&&(this.checkedLoadedFor[`${y[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),y.forEach(x=>{var C;if(this.isValidLookup(n))return;o=x;const L=[f];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(L,f,x,m,t);else{let R;h&&(R=this.pluralResolver.getSuffix(x,t.count,t));const O=`${this.options.pluralSeparator}zero`,b=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&R.startsWith(b)&&L.push(f+R.replace(b,this.options.pluralSeparator)),L.push(f+R),p&&L.push(f+O)),d){const g=`${f}${this.options.contextSeparator||"_"}${t.context}`;L.push(g),h&&(t.ordinal&&R.startsWith(b)&&L.push(g+R.replace(b,this.options.pluralSeparator)),L.push(g+R),p&&L.push(g+O))}}let w;for(;w=L.pop();)this.isValidLookup(n)||(r=w,n=this.getResource(x,m,w,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,i={}){var r;return(r=this.i18nFormat)!=null&&r.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!v(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i={...i,count:e.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}}class De{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_.create("languageUtils")}getScriptPartFromCode(e){if(e=oe(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=oe(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(v(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return t=i;const r=this.getLanguagePartFromCode(n);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(o=>o===r?!0:!o.includes("-")&&!r.includes("-")?!1:!!(o.includes("-")&&!r.includes("-")&&o.slice(0,o.indexOf("-"))===r||o.startsWith(r)&&r.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),v(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return v(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):v(e)&&r(this.formatLanguageCode(e)),n.forEach(o=>{i.includes(o)||r(this.formatLanguageCode(o))}),i}}const Ue={zero:0,one:1,two:2,few:3,many:4,other:5},Ve={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Pt{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=_.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=oe(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Ve;if(!e.match(/-|_/))return Ve;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[r]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,r)=>Ue[i]-Ue[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const He=(s,e,t,n=".",i=!0)=>{let r=vt(s,e,t);return!r&&i&&v(t)&&(r=Oe(s,t,n),r===void 0&&(r=Oe(e,t,n))),r},Tt=s=>s.replace(/\$/g,"$$$$");class Me{constructor(e={}){var t;this.logger=_.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:d,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:E,alwaysFormat:S}=e.interpolation;this.escape=t!==void 0?t:Ot,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?q(r):o||"{{",this.suffix=a?q(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":c?q(c):"-",this.unescapeSuffix=this.unescapePrefix?"":f?q(f):"",this.nestingPrefix=h?q(h):p||q("$t("),this.nestingSuffix=d?q(d):y||q(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=E||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var p;let r,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=d=>{if(!d.includes(this.formatSeparator)){const S=He(t,l,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,n,{...i,...t,interpolationkey:d}):S}const y=d.split(this.formatSeparator),m=y.shift().trim(),E=y.join(this.formatSeparator).trim();return this.format(He(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),E,n,{...i,...t,interpolationkey:m})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const f=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>d},{regex:this.regexp,safeValue:d=>this.escapeValue?this.escape(d):d}].forEach(d=>{for(a=0;r=d.regex.exec(e);){const y=r[1].trim();if(o=u(y),o===void 0)if(typeof f=="function"){const E=f(e,r,i);o=v(E)?E:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))o="";else if(c){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else!v(o)&&!this.useRawValueToEscape&&(o=Te(o));const m=d.safeValue(o);if(e=e.replace(r[0],Tt(m)),c?(d.regex.lastIndex+=m.length,d.regex.lastIndex-=r[0].length):d.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,r,o;const a=(l,u)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const c=l.split(new RegExp(`${q(f)}[ ]*{`));let h=`{${c[1]}`;l=c[0],h=this.interpolate(h,o);const p=h.match(/'/g),d=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!d||((d==null?void 0:d.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),u&&(o={...u,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${f}${h}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!v(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/s.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(l=i[1].slice(u).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),r=t(a.call(this,i[1].trim(),o),o),r&&i[0]===e&&!v(r))return r;v(r)||(r=Te(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),l.length&&(r=l.reduce((f,c)=>this.format(f,c,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const jt=s=>{let e=s.toLowerCase().trim();const t={};if(s.includes("(")){const n=s.split("(");e=n[0].toLowerCase().trim();const i=n[1].slice(0,-1);e==="currency"&&!i.includes(":")?t.currency||(t.currency=i.trim()):e==="relativetime"&&!i.includes(":")?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=a.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},_e=s=>{const e={};return(t,n,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=n+JSON.stringify(r);let a=e[o];return a||(a=s(oe(n),i),e[o]=a),a(t)}},At=s=>(e,t,n)=>s(oe(t),n)(e);class Ft{constructor(e={}){this.logger=_.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?_e:At;this.formats={number:n((i,r)=>{const o=new Intl.NumberFormat(i,{...r});return a=>o.format(a)}),currency:n((i,r)=>{const o=new Intl.NumberFormat(i,{...r,style:"currency"});return a=>o.format(a)}),datetime:n((i,r)=>{const o=new Intl.DateTimeFormat(i,{...r});return a=>o.format(a)}),relativetime:n((i,r)=>{const o=new Intl.RelativeTimeFormat(i,{...r});return a=>o.format(a,r.range||"day")}),list:n((i,r)=>{const o=new Intl.ListFormat(i,{...r});return a=>o.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_e(t)}format(e,t,n,i={}){if(!t||e==null)return e;const r=t.split(this.formatSeparator),o=[];for(let l=0;l<r.length;l++){let u=r[l];for(;u.indexOf("(")>-1&&!u.includes(")")&&l+1<r.length;)u=`${u}${this.formatSeparator}${r[++l]}`;o.push(u)}return o.reduce((l,u)=>{var h;const{formatName:f,formatOptions:c}=jt(u);if(this.formats[f]){let p=l;try{const d=((h=i==null?void 0:i.formatParams)==null?void 0:h[i.interpolationkey])||{},y=d.locale||d.lng||i.locale||i.lng||n;p=this.formats[f](l,y,{...c,...i,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${f}`);return l},e)}}const It=(s,e)=>{s.pending[e]!==void 0&&(delete s.pending[e],s.pendingCount--)};class Dt extends me{constructor(e,t,n,i={}){var r,o;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=_.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(o=(r=this.backend)==null?void 0:r.init)==null||o.call(r,n,i.backend,i)}queueLoad(e,t,n,i){const r={},o={},a={},l={};return e.forEach(u=>{let f=!0;t.forEach(c=>{const h=`${u}|${c}`;!n.reload&&this.store.hasResourceBundle(u,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,f=!1,o[h]===void 0&&(o[h]=!0),r[h]===void 0&&(r[h]=!0),l[c]===void 0&&(l[c]=!0)))}),f||(a[u]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(l=>{wt(l.loaded,[r],o),It(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const f=l.loaded[u];f.length&&f.forEach(c=>{a[u][c]===void 0&&(a[u][c]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,i=0,r=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});return}this.readingCalls++;const a=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&f&&i<this.maxRetries){setTimeout(()=>{this.read(e,t,n,i+1,r*2,o)},r);return}o(u,f)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,t,a)}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();v(e)&&(e=this.languageUtils.toResolveHierarchy(e)),v(t)&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,i,r,o={},a=()=>{}){var l,u,f,c,h;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((h=this.backend)!=null&&h.create){const p={...o,isUpdate:r},d=this.backend.create.bind(this.backend);if(d.length<6)try{let y;d.length===5?y=d(e,t,n,i,p):y=d(e,t,n,i),y&&typeof y.then=="function"?y.then(m=>a(null,m)).catch(a):a(null,y)}catch(y){a(y)}else d(e,t,n,i,a,p)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const we=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:s=>{let e={};if(typeof s[1]=="object"&&(e=s[1]),v(s[1])&&(e.defaultValue=s[1]),v(s[2])&&(e.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const t=s[3]||s[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ke=s=>(v(s.ns)&&(s.ns=[s.ns]),v(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),v(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),s.supportedLngs&&!s.supportedLngs.includes("cimode")&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),s),ae=()=>{},Ut=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(t=>{typeof s[t]=="function"&&(s[t]=s[t].bind(s))})};class re extends me{constructor(e={},t){if(super(),this.options=Ke(e),this.services={},this.logger=_,this.modules={external:[]},Ut(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(v(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=we();this.options={...n,...this.options,...Ke(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?_.init(i(this.modules.logger),this.options):_.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Ft;const f=new De(this.options);this.store=new Ie(this.options.resources,this.options);const c=this.services;c.logger=_,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Pt(f,{prepend:this.options.pluralSeparator}),u&&(c.formatter=i(u),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Me(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Dt(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new pe(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ae),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...f)=>this.store[u](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...f)=>(this.store[u](...f),this)});const a=te(),l=()=>{const u=(f,c)=>{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),a.resolve(c),t(f,c)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=ae){var r,o;let n=t;const i=v(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(c=>{c!=="cimode"&&(a.includes(c)||a.push(c))})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(o=(r=this.options.preload)==null?void 0:r.forEach)==null||o.call(r,u=>l(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(e,t,n){const i=te();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ae),this.services.backendConnector.reload(e,t,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&st.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=te();this.emit("languageChanging",e);const i=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},r=(a,l)=>{l?this.isLanguageChangingTo===e&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),t&&t(a,(...u)=>this.t(...u))},o=a=>{var f,c;!e&&!a&&this.services.languageDetector&&(a=[]);const l=v(a)?a:a&&a[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(v(a)?[a]:a);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,u)),this.loadResources(u,h=>{r(h,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n,i){const r=i==null?void 0:i.scopeNs,o=(a,l,...u)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([a,l].concat(u)):f={...l},f.lng=f.lng||o.lng,f.lngs=f.lngs||o.lngs;const c=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||o.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||n||o.keyPrefix);const h={...this.options,...f};Array.isArray(r)&&!c&&(h.ns=r),typeof f.keyPrefix=="function"&&(f.keyPrefix=Y(f.keyPrefix,h));const p=this.options.keySeparator||".";let d;return f.keyPrefix&&Array.isArray(a)?d=a.map(y=>(typeof y=="function"&&(y=Y(y,h)),`${f.keyPrefix}${p}${y}`)):(typeof a=="function"&&(a=Y(a,h)),d=f.keyPrefix?`${f.keyPrefix}${p}${a}`:a),this.t(d,f)};return v(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(r,e)))}loadNamespaces(e,t){const n=te();return this.options.ns?(v(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=te();v(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(o=>!i.includes(o)&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(t&&t(),Promise.resolve())}dir(e){var i,r;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((r=this.services)==null?void 0:r.languageUtils)||new De(we());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new re(e,t);return n.createInstance=re.createInstance,n}cloneInstance(e={},t=ae){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new re(i);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){const a=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((f,c)=>(f[c]={...l[u][c]},f),l[u]),l),{});r.store=new Ie(a,i),r.services.resourceStore=r.store}if(e.interpolation){const l={...we().interpolation,...this.options.interpolation,...e.interpolation},u={...i,interpolation:l};r.services.interpolator=new Me(u)}return r.translator=new pe(r.services,i),r.translator.on("*",(a,...l)=>{r.emit(a,...l)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const M=re.createInstance();M.createInstance;M.dir;M.init;M.loadResources;M.reloadResources;M.use;M.changeLanguage;M.getFixedT;M.t;M.exists;M.setDefaultNamespace;M.hasLoadedNamespace;M.loadNamespaces;M.loadLanguages;const Vt={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},Ht=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function qe(s){const e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=s.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(Vt[t[1]]||s.charAt(s.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){const r=s.indexOf("-->");return{type:"comment",comment:r!==-1?s.slice(4,r):""}}const n=new RegExp(Ht);let i=null;for(;i=n.exec(s),i!==null;)if(i[0].trim())if(i[1]){const r=i[1].trim();let o=[r,null];const a=r.indexOf("=");a>-1&&(o=[r.slice(0,a),r.slice(a+1)]),e.attrs[o[0]]=o[1],n.lastIndex--}else i[2]&&(e.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return e}const le=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Mt=/<\/?([^\s]+?)[/\s>]/,_t=/^\s*$/,Kt=/^(script|style)$/i,ne="\0",qt=Object.create(null);function rt(s){s.forEach(function(e){if(e.type==="text"){e.content=e.content.split(ne).join("<");return}if(e.type==="comment"){e.comment=e.comment.split(ne).join("<");return}for(const t in e.attrs){const n=e.attrs[t];typeof n=="string"&&n.indexOf(ne)>-1&&(e.attrs[t]=n.split(ne).join("<"))}e.children.length&&rt(e.children)})}function Bt(s,e){const t=e&&e.components||qt,n=e&&e.allowedTags;let i=!1;if(n){const d=typeof n=="function"?n:function(S){return n.indexOf(S)>-1};let y="",m=0;le.lastIndex=0;let E;for(;E=le.exec(s);){const S=E[0];y+=s.slice(m,E.index);const x=S.match(Mt);S.startsWith("<!--")||x&&d(x[1])?(y+=S,m=E.index+S.length):(i=!0,y+=ne,m=E.index+1,le.lastIndex=m)}s=y+s.slice(m)}const r=[],o=[];let a,l=-1,u=!1,f=0,c;if(s.indexOf("<")!==0){const d=s.indexOf("<");r.push({type:"text",content:d===-1?s:s.substring(0,d)})}const h=[];let p;for(;p=le.exec(s);)h.push(p);return h.forEach(function(d,y){const m=d[0];if(!m||m.startsWith("<!--"))return;let E=0,S=0,x=-1,L=null;for(let C=0;C<m.length;C++){const R=m.charAt(C);L?R===L&&(L=null):R==='"'||R==="'"?L=R:R==="<"?(E++,E===2&&(x=C)):R===">"&&S++}const w=x>-1&&/[a-zA-Z0-9\-!/]/.test(m.charAt(x+1));if(E>S&&w){const C=m.substring(0,x),R=m.substring(C.length);h[y][0]=R,h[y].index+=C.length}}),h.forEach(function(d,y){const m=d[0];if(!m)return;const E=d.index;if(E<f)return;if(u){if(m!=="</"+a.name+">")return;u=!1}const S=m.charAt(1)!=="/",x=m.startsWith("<!--"),L=E+m.length,w=s.charAt(L),C=h[y+1];let R;if(w==="<"&&C){const b=s.substring(L,C.index);R=b.split("<").length>b.split(">").length}let O;if(x){const b=qe(m);if(l<0)return r.push(b),r;O=o[l],O.children.push(b);const g=s.slice(L,C?C.index:void 0);return g.length>0&&O.children.push({type:"text",content:g}),r}if(S){l++,a=qe(m),a.type==="tag"&&t[a.name]&&(a.type="component",u=!0);let b=!1;if(!u&&!a.voidElement&&Kt.test(a.name)){b=!0,c||(c=s.toLowerCase());const g=c.indexOf("</"+a.name.toLowerCase()+">",L),I=g===-1?s.length:g,$=s.slice(L,I);$&&a.children.push({type:"text",content:$}),f=I}!a.voidElement&&!u&&!b&&w&&w!=="<"&&a.children.push({type:"text",content:s.slice(L,C?C.index:void 0)}),l===0&&r.push(a),O=o[l-1],O&&O.children.push(a),o[l]=a}if((!S||a.voidElement)&&(l>-1&&(a.voidElement||a.name===m.slice(2,-1))&&(l--,a=l===-1?r:o[l]),!u&&(w!=="<"||R)&&w)){O=l===-1?r:o[l].children;const b=C?C.index:-1;let g=s.slice(L,b===-1?void 0:b);_t.test(g)&&(g=" "),(b>-1&&l+O.length>=0||g!==" ")&&O.push({type:"text",content:g})}}),i&&rt(r),r}function zt(s){const e=[];for(const t in s)s[t]===null?e.push(t):e.push(t+'="'+String(s[t]).replace(/"/g,""")+'"');return e.length?" "+e.join(" "):""}function ot(s,e){switch(e.type){case"text":return s+e.content;case"tag":{const t=e.voidElement&&e.name.toLowerCase()!=="!doctype"?"/>":">";return s+="<"+e.name+(e.attrs?zt(e.attrs):"")+t,e.voidElement?s:s+e.children.reduce(ot,"")+"</"+e.name+">"}case"comment":return s+="<!--"+e.comment+"-->",s}}function Wt(s){return s.reduce(function(e,t){return e+ot("",t)},"")}var Jt={parse:Bt,stringify:Wt};const ce=(s,e,t,n)=>{var r,o,a,l;const i=[t,{code:e,...n||{}}];if((o=(r=s==null?void 0:s.services)==null?void 0:r.logger)!=null&&o.forward)return s.services.logger.forward(i,"warn","react-i18next::",!0);H(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(l=(a=s==null?void 0:s.services)==null?void 0:a.logger)!=null&&l.warn?s.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},Be={},ee=(s,e,t,n)=>{H(t)&&Be[t]||(H(t)&&(Be[t]=new Date),ce(s,e,t,n))},at=(s,e)=>()=>{if(s.isInitialized)e();else{const t=()=>{setTimeout(()=>{s.off("initialized",t)},0),e()};s.on("initialized",t)}},Ee=(s,e,t)=>{s.loadNamespaces(e,at(s,t))},ze=(s,e,t,n)=>{if(H(t)&&(t=[t]),s.options.preload&&s.options.preload.indexOf(e)>-1)return Ee(s,t,n);t.forEach(i=>{s.options.ns.indexOf(i)<0&&s.options.ns.push(i)}),s.loadLanguages(e,at(s,n))},Xt=(s,e,t={})=>!e.languages||!e.languages.length?(ee(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(s,{lng:t.lng,precheck:(n,i)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,s))return!1}}),H=s=>typeof s=="string",B=s=>typeof s=="object"&&s!==null,Yt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Gt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"В©","©":"В©","®":"В®","®":"В®","…":"…","…":"…","/":"/","/":"/"},Qt=s=>Gt[s],lt=s=>s.replace(Yt,Qt);let Ce={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:lt,transDefaultProps:void 0};const Zt=(s={})=>{Ce={...Ce,...s}},ke=()=>Ce;let ut;const en=s=>{ut=s},Re=()=>ut,fe=(s,e)=>{var n;if(!s)return!1;const t=((n=s.props)==null?void 0:n.children)??s.children;return e?t.length>0:!!t},se=s=>{var t,n;if(!s)return[];const e=((t=s.props)==null?void 0:t.children)??s.children;return(n=s.props)!=null&&n.i18nIsDynamicList?W(e):e},tn=s=>Array.isArray(s)&&s.every(T.isValidElement),W=s=>Array.isArray(s)?s:[s],nn=(s,e)=>{const t={...e};return t.props={...e.props,...s.props},t},sn=s=>{const e={};if(!s)return e;const t=n=>{W(n).forEach(r=>{H(r)||(fe(r)?t(se(r)):B(r)&&!T.isValidElement(r)&&Object.assign(e,r))})};return t(s),e},$e=(s,e,t,n)=>{if(!s)return"";let i="";const r=W(s),o=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((a,l)=>{if(H(a)){i+=`${a}`;return}if(T.isValidElement(a)){const{props:u,type:f}=a,c=Object.keys(u).length,h=o.indexOf(f)>-1,p=u.children;if(!p&&h&&!c){i+=`<${f}/>`;return}if(!p&&(!h||c)||u.i18nIsDynamicList){i+=`<${l}></${l}>`;return}if(h&&c<=1){const y=H(p)?p:$e(p,e,t,n);i+=`<${f}>${y}</${f}>`;return}const d=$e(p,e,t,n);i+=`<${l}>${d}</${l}>`;return}if(a===null){ce(t,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:n});return}if(B(a)){const{format:u,...f}=a,c=Object.keys(f);if(c.length===1){const h=u?`${c[0]}, ${u}`:c[0];i+=`{{${h}}}`;return}ce(t,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:n,child:a});return}ce(t,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:n,child:a})}),i},rn=(s,e,t,n,i,r,o)=>{if(t==="")return[];const a=i.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(a.map(x=>`<${x}`).join("|")).test(t);if(!s&&!e&&!l&&!o)return[t];const u=e??{},f=x=>{W(x).forEach(w=>{H(w)||(fe(w)?f(se(w)):B(w)&&!T.isValidElement(w)&&Object.assign(u,w))})};f(s);const c=Object.keys(u),h=x=>/^\d+$/.test(x)||a.indexOf(x)>-1||c.indexOf(x)>-1,p=Jt.parse(`<0>${t}</0>`,{allowedTags:h}),d={...u,...r},y=(x,L,w)=>{var O;const C=se(x),R=E(C,L.children,w);return tn(C)&&R.length===0||(O=x.props)!=null&&O.i18nIsDynamicList?C:R},m=(x,L,w,C,R)=>{x.dummy?(x.children=L,w.push(T.cloneElement(x,{key:C},R?void 0:L))):w.push(...T.Children.map([x],O=>{var g;if(O.type===T.Fragment||((g=O.props)==null?void 0:g.i18nIsDynamicList)!==void 0){const I={key:C};return O&&O.props&&Object.keys(O.props).forEach($=>{$==="children"||$==="i18nIsDynamicList"||(I[$]=O.props[$])}),T.createElement(O.type,I,R?null:L)}const b={key:C};return O&&O.props&&Object.keys(O.props).forEach(I=>{I==="ref"||I==="children"||(b[I]=O.props[I])}),T.cloneElement(O,b,R?null:L)}))},E=(x,L,w)=>{const C=W(x),R=W(L),O={};return R.reduce((b,g,I)=>{var N,k;const $=((k=(N=g.children)==null?void 0:N[0])==null?void 0:k.content)&&n.services.interpolator.interpolate(g.children[0].content,d,n.language);if(g.type==="tag"){let j=C[parseInt(g.name,10)];!j&&e&&(j=e[g.name]),w.length===1&&!j&&(j=w[0][g.name]),j||(j={});const A={...g.attrs};o&&Object.keys(A).forEach(F=>{const U=A[F];H(U)&&(A[F]=lt(U))});const P=Object.keys(A).length!==0?nn({props:A},j):j,V=T.isValidElement(P),K=V&&fe(g,!0)&&!g.voidElement,J=l&&B(P)&&P.dummy&&!V,D=B(e)&&Object.hasOwnProperty.call(e,g.name);if(H(P)){const F=n.services.interpolator.interpolate(P,d,n.language);b.push(F)}else if(fe(P)||K){const F=y(P,g,w);m(P,F,b,I)}else if(J){const F=E(C,g.children,w);m(P,F,b,I)}else if(Number.isNaN(parseFloat(g.name)))if(D){const F=y(P,g,w);m(P,F,b,I,g.voidElement)}else if(i.transSupportBasicHtmlNodes&&a.indexOf(g.name)>-1)if(g.voidElement)b.push(T.createElement(g.name,{key:`${g.name}-${I}`}));else{const F=O[g.name]||0;O[g.name]=F+1;let U,z=0;for(let xe=0;xe<C.length;xe+=1){const Se=C[xe];if(T.isValidElement(Se)&&Se.type===g.name){if(z===F){U=Se;break}z+=1}}const X=U?W(se(U)):C,ye=E(X,g.children,w);b.push(T.createElement(g.name,{key:`${g.name}-${I}`},ye))}else if(g.voidElement)b.push(`<${g.name} />`);else{const F=E(C,g.children,w);b.push(`<${g.name}>${F}</${g.name}>`)}else if(B(P)&&!V){const F=g.children[0]?$:null;F&&b.push(F)}else m(P,$,b,I,g.children.length!==1||!$)}else if(g.type==="text"){const j=i.transWrapTextNodes,A=typeof i.unescape=="function"?i.unescape:ke().unescape,P=o?A(n.services.interpolator.interpolate(g.content,d,n.language)):n.services.interpolator.interpolate(g.content,d,n.language);j?b.push(T.createElement(j,{key:`${g.name}-${I}`},P)):b.push(P)}return b},[])},S=E([{dummy:!0,children:s||[]}],p,W(s||[]));return se(S[0])},ct=(s,e,t)=>{const n=s.key||e,i=T.cloneElement(s,{key:n});if(!i.props||!i.props.children||t.indexOf(`${e}/>`)<0&&t.indexOf(`${e} />`)<0)return i;function r(){return T.createElement(T.Fragment,null,i)}return T.createElement(r,{key:n})},on=(s,e)=>s.map((t,n)=>ct(t,n,e)),an=(s,e)=>{const t={};return Object.keys(s).forEach(n=>{Object.assign(t,{[n]:ct(s[n],n,e)})}),t},ln=(s,e,t,n)=>s?Array.isArray(s)?on(s,e):B(s)?an(s,e):(ee(t,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:n}),null):null,un=s=>!B(s)||Array.isArray(s)?!1:Object.keys(s).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function cn({children:s,count:e,parent:t,i18nKey:n,context:i,tOptions:r={},values:o,defaults:a,components:l,ns:u,i18n:f,t:c,shouldUnescape:h,...p}){var J,D,F,U,z,X;const d=f||Re();if(!d)return ee(d,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:n}),s;const y=c||d.t.bind(d)||(ye=>ye),m={...ke(),...(J=d.options)==null?void 0:J.react};let E=u||y.ns||((D=d.options)==null?void 0:D.defaultNS);E=H(E)?[E]:E||["translation"];const{transDefaultProps:S}=m,x=S!=null&&S.tOptions?{...S.tOptions,...r}:r,L=h??(S==null?void 0:S.shouldUnescape),w=S!=null&&S.values?{...S.values,...o}:o,C=S!=null&&S.components?{...S.components,...l}:l,R=$e(s,m,d,n),O=a||(x==null?void 0:x.defaultValue)||R||m.transEmptyNodeValue||(typeof n=="function"?Y(n):n),{hashTransKey:b}=m,g=n||(b?b(R||O):R||O);(U=(F=d.options)==null?void 0:F.interpolation)!=null&&U.defaultVariables?o=w&&Object.keys(w).length>0?{...w,...d.options.interpolation.defaultVariables}:{...d.options.interpolation.defaultVariables}:o=w;const I=sn(s);I&&typeof I.count=="number"&&e===void 0&&(e=I.count);const $=o||e!==void 0&&!((X=(z=d.options)==null?void 0:z.interpolation)!=null&&X.alwaysFormat)||!s?x.interpolation:{interpolation:{...x.interpolation,prefix:"#$?",suffix:"?$#"}},N={...x,context:i||x.context,count:e,...o,...$,defaultValue:O,ns:E};let k=g?y(g,N):O;k===g&&O&&(k=O);const j=ln(C,k,d,n);let A=j||s,P=null;un(j)&&(P=j,A=s);const V=rn(A,P,k,d,m,N,L),K=t??m.defaultTransParent;return K?T.createElement(K,p,V):V}const Wn={type:"3rdParty",init(s){Zt(s.options.react),en(s)}},Pe=T.createContext();class fn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Jn({children:s,count:e,parent:t,i18nKey:n,context:i,tOptions:r={},values:o,defaults:a,components:l,ns:u,i18n:f,t:c,shouldUnescape:h,...p}){var S;const{i18n:d,defaultNS:y}=T.useContext(Pe)||{},m=f||d||Re(),E=c||(m==null?void 0:m.t.bind(m));return cn({children:s,count:e,parent:t,i18nKey:n,context:i,tOptions:r,values:o,defaults:a,components:l,ns:u||(E==null?void 0:E.ns)||y||((S=m==null?void 0:m.options)==null?void 0:S.defaultNS),i18n:m,t:c,shouldUnescape:h,...p})}var ve={exports:{}},Le={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var We;function dn(){if(We)return Le;We=1;var s=xt();function e(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var t=typeof Object.is=="function"?Object.is:e,n=s.useState,i=s.useEffect,r=s.useLayoutEffect,o=s.useDebugValue;function a(c,h){var p=h(),d=n({inst:{value:p,getSnapshot:h}}),y=d[0].inst,m=d[1];return r(function(){y.value=p,y.getSnapshot=h,l(y)&&m({inst:y})},[c,p,h]),i(function(){return l(y)&&m({inst:y}),c(function(){l(y)&&m({inst:y})})},[c]),o(p),p}function l(c){var h=c.getSnapshot;c=c.value;try{var p=h();return!t(c,p)}catch{return!0}}function u(c,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Le.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:f,Le}var Je;function hn(){return Je||(Je=1,ve.exports=dn()),ve.exports}var pn=hn();const gn=(s,e)=>{if(H(e))return e;if(B(e)&&H(e.defaultValue))return e.defaultValue;if(typeof s=="function")return"";if(Array.isArray(s)){const t=s[s.length-1];return typeof t=="function"?"":t}return s},mn={t:gn,ready:!1},yn=()=>()=>{},Xn=(s,e={})=>{var b,g,I;const{i18n:t}=e,{i18n:n,defaultNS:i}=T.useContext(Pe)||{},r=t||n||Re();r&&!r.reportNamespaces&&(r.reportNamespaces=new fn),r||ee(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const o=T.useMemo(()=>{var $;return{...ke(),...($=r==null?void 0:r.options)==null?void 0:$.react,...e}},[r,e]),{useSuspense:a,keyPrefix:l}=o,u=i||((b=r==null?void 0:r.options)==null?void 0:b.defaultNS),f=H(u)?[u]:u||["translation"],c=T.useMemo(()=>f,f);(I=(g=r==null?void 0:r.reportNamespaces)==null?void 0:g.addUsedNamespaces)==null||I.call(g,c);const h=T.useRef(0),p=T.useCallback($=>{if(!r)return yn;const{bindI18n:N,bindI18nStore:k}=o,j=()=>{h.current+=1,$()};return N&&r.on(N,j),k&&r.store.on(k,j),()=>{N&&N.split(" ").forEach(A=>r.off(A,j)),k&&k.split(" ").forEach(A=>r.store.off(A,j))}},[r,o]),d=T.useRef(),y=T.useCallback(()=>{if(!r)return mn;const $=!!(r.isInitialized||r.initializedStoreOnce)&&c.every(V=>Xt(V,r,o)),N=e.lng||r.language,k=h.current,j=d.current;if(j&&j.ready===$&&j.lng===N&&j.keyPrefix===l&&j.revision===k)return j;const P={t:r.getFixedT(N,o.nsMode==="fallback"?c:c[0],l,{scopeNs:c}),ready:$,lng:N,keyPrefix:l,revision:k};return d.current=P,P},[r,c,l,o,e.lng]),[m,E]=T.useState(0),{t:S,ready:x}=pn.useSyncExternalStore(p,y,y);T.useEffect(()=>{if(r&&!x&&!a){const $=()=>E(N=>N+1);e.lng?ze(r,e.lng,c,$):Ee(r,c,$)}},[r,e.lng,c,x,a,m]);const L=r||{},w=T.useRef(null),C=T.useRef(),R=$=>{const N=Object.getOwnPropertyDescriptors($);N.__original&&delete N.__original;const k=Object.create(Object.getPrototypeOf($),N);if(!Object.prototype.hasOwnProperty.call(k,"__original"))try{Object.defineProperty(k,"__original",{value:$,writable:!1,enumerable:!1,configurable:!1})}catch{}return k},O=T.useMemo(()=>{const $=L,N=$==null?void 0:$.language;let k=$;$&&(w.current&&w.current.__original===$?C.current!==N?(k=R($),w.current=k,C.current=N):k=w.current:(k=R($),w.current=k,C.current=N));const j=!x&&!a?(...P)=>(ee(r,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),S(...P)):S,A=[j,k,x];return A.t=j,A.i18n=k,A.ready=x,A},[S,L,x,L.resolvedLanguage,L.language,L.languages]);if(r&&a&&!x){let $=!1;try{$=!1}catch{}throw $&&ee(r,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(N=>{const k=()=>N();e.lng?ze(r,e.lng,c,k):Ee(r,c,k)})}return O};function Yn({i18n:s,defaultNS:e,children:t}){const n=T.useMemo(()=>({i18n:s,defaultNS:e}),[s,e]);return T.createElement(Pe.Provider,{value:n},t)}const ft=["__proto__","constructor","prototype"];function dt(s){return!(typeof s!="string"||s.length===0||s.length>128||ft.indexOf(s)>-1||s.indexOf("..")>-1||s.indexOf("\\")>-1||/[?#%\s@]/.test(s)||/[\x00-\x1F\x7F]/.test(s))}function ht(s){return!(!dt(s)||s.indexOf("/")>-1)}function xn(s){return dt(s)}const Sn={lng:ht,ns:xn};function ue(s){return typeof s!="string"?s:s.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function bn(s){if(typeof s!="string"||s.length===0)return s;try{const e=new URL(s);return e.username||e.password?(e.username="",e.password="",e.toString()):s}catch{return s.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function pt(){return typeof XMLHttpRequest=="function"||typeof XMLHttpRequest=="object"}function wn(s){return!!s&&typeof s.then=="function"}function vn(s){return wn(s)?s:Promise.resolve(s)}const Ln=/\{\{(.+?)\}\}/g;function Xe(s,e){let t=!1;const n=s.replace(Ln,(i,r)=>{const o=r.trim();if(ft.indexOf(o)>-1)return i;const a=e[o];if(a==null)return i;const l=Sn[o]||ht,u=String(a).split("+");for(const f of u)if(!l(f))return t=!0,i;return u.join("+")});return t?null:n}const G=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:void 0;let ge;typeof fetch=="function"?ge=fetch:G&&typeof G.fetch=="function"&&(ge=G.fetch);const Ye=pt()&&G?G.XMLHttpRequest:void 0,On=typeof ActiveXObject=="function"&&G?G.ActiveXObject:void 0,gt=["__proto__","constructor","prototype"],Ne=(s,e)=>{if(e&&typeof e=="object"){let t="";for(const n of Object.keys(e))gt.indexOf(n)>-1||(t+="&"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]));if(!t)return s;s=s+(s.indexOf("?")!==-1?"&":"?")+t.slice(1)}return s},Ge=(s,e,t,n)=>{const i=r=>{if(!r.ok)return t(r.statusText||"Error",{status:r.status});r.text().then(o=>{t(null,{status:r.status,data:o})}).catch(t)};if(n){const r=n(s,e);if(r instanceof Promise){r.then(i).catch(t);return}}typeof fetch=="function"?fetch(s,e).then(i).catch(t):ge(s,e).then(i).catch(t)},En=(s,e,t,n)=>{s.queryStringParams&&(e=Ne(e,s.queryStringParams));const i={...typeof s.customHeaders=="function"?s.customHeaders():s.customHeaders};typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),t&&(i["Content-Type"]="application/json");const r=typeof s.requestOptions=="function"?s.requestOptions(t):s.requestOptions,o={method:t?"POST":"GET",body:t?s.stringify(t):void 0,headers:i,...s._omitFetchOptions?{}:r},a=typeof s.alternateFetch=="function"&&s.alternateFetch.length>=1?s.alternateFetch:void 0;try{Ge(e,o,n,a)}catch(l){if(!r||Object.keys(r).length===0||!l.message||l.message.indexOf("not implemented")<0)return n(l);try{Object.keys(r).forEach(u=>{delete o[u]}),Ge(e,o,n,a),s._omitFetchOptions=!0}catch(u){n(u)}}},Cn=(s,e,t,n)=>{t&&typeof t=="object"&&(t=Ne("",t).slice(1)),s.queryStringParams&&(e=Ne(e,s.queryStringParams));try{const i=Ye?new Ye:new On("MSXML2.XMLHTTP.3.0");i.open(t?"POST":"GET",e,1),s.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!s.withCredentials,t&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");let r=s.customHeaders;if(r=typeof r=="function"?r():r,r)for(const o of Object.keys(r))gt.indexOf(o)>-1||i.setRequestHeader(o,r[o]);i.onreadystatechange=()=>{i.readyState>3&&n(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(t)}catch(i){console&&console.log(i)}},$n=(s,e,t,n)=>{if(typeof t=="function"&&(n=t,t=void 0),n=n||(()=>{}),ge&&e.indexOf("file:")!==0)return En(s,e,t,n);if(pt()||typeof ActiveXObject=="function")return Cn(s,e,t,n);n(new Error("No fetch and no xhr implementation found!"))},Nn=()=>({loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:s=>JSON.parse(s),stringify:JSON.stringify,parsePayload:(s,e,t)=>({[e]:t||""}),parseLoadPayload:(s,e)=>{},request:$n,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}});var kn=class{constructor(s,e={},t={}){this.services=s,this.options=e,this.allOptions=t,this.type="backend",this.init(s,e,t)}init(s,e={},t={}){if(this.services=s,this.options={...Nn(),...this.options||{},...e},this.allOptions=t,this.services&&this.options.reloadInterval){const n=setInterval(()=>this.reload(),this.options.reloadInterval);typeof n=="object"&&typeof n.unref=="function"&&n.unref()}}readMulti(s,e,t){this._readAny(s,s,e,e,t)}read(s,e,t){this._readAny([s],s,[e],e,t)}_readAny(s,e,t,n,i){let r=this.options.loadPath;typeof this.options.loadPath=="function"&&(r=this.options.loadPath(s,t)),r=vn(r),r.then(o=>{if(!o)return i(null,{});const a=Xe(o,{lng:s.join("+"),ns:t.join("+")});if(a==null){const l=s.map(ue).join(", "),u=t.map(ue).join(", ");return i(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+l+"] namespaces=["+u+"]"),!1)}this.loadUrl(a,i,e,n)})}loadUrl(s,e,t,n){const i=typeof t=="string"?[t]:t,r=typeof n=="string"?[n]:n,o=this.options.parseLoadPayload(i,r),a=ue(bn(s));this.options.request(this.options,s,o,(l,u)=>{if(u&&(u.status>=500&&u.status<600||!u.status))return e("failed loading "+a+"; status code: "+u.status,!0);if(u&&u.status>=400&&u.status<500)return e("failed loading "+a+"; status code: "+u.status,!1);if(!u&&l&&l.message){const h=l.message.toLowerCase();if(["failed","fetch","network","load"].find(p=>h.indexOf(p)>-1))return e("failed loading "+a+": "+ue(l.message),!0)}if(l)return e(l,!1);let f,c;try{typeof u.data=="string"?f=this.options.parse(u.data,t,n):f=u.data}catch{c="failed parsing "+a+" to json"}if(c)return e(c,!1);e(null,f)})}create(s,e,t,n,i){if(!this.options.addPath)return;typeof s=="string"&&(s=[s]);const r=this.options.parsePayload(e,t,n);let o=0;const a=[],l=[];s.forEach(u=>{let f=this.options.addPath;typeof this.options.addPath=="function"&&(f=this.options.addPath(u,e));const c=Xe(f,{lng:u,ns:e});if(c==null){o+=1,i&&o===s.length&&i(a,l);return}this.options.request(this.options,c,r,(h,p)=>{o+=1,a.push(h),l.push(p),o===s.length&&typeof i=="function"&&i(a,l)})})}reload(){const{backendConnector:s,languageUtils:e,logger:t}=this.services,n=s.language;if(n&&n.toLowerCase()==="cimode")return;const i=[],r=o=>{e.toResolveHierarchy(o).forEach(a=>{i.indexOf(a)<0&&i.push(a)})};r(n),this.allOptions.preload&&this.allOptions.preload.forEach(o=>r(o)),i.forEach(o=>{this.allOptions.ns.forEach(a=>{s.read(o,a,"read",null,null,(l,u)=>{l&&t.warn(`loading namespace ${a} for language ${o} failed`,l),!l&&u&&t.log(`loaded namespace ${a} for language ${o}`,u),s.loaded(`${o}|${a}`,l,u)})})})}};kn.type="backend";const{slice:Rn,forEach:Pn}=[];function Tn(s){return Pn.call(Rn.call(arguments,1),e=>{if(e)for(const t in e)s[t]===void 0&&(s[t]=e[t])}),s}function jn(s){return typeof s!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(s))}const Qe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,An=function(s,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let r=`${s}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!Qe.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Qe.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r},Ze={create(s,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=An(s,e,i)},read(s){const e=`${s}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(s,e){this.create(s,"",-1,e)}};var Fn={name:"cookie",lookup(s){let{lookupCookie:e}=s;if(e&&typeof document<"u")return Ze.read(e)||void 0},cacheUserLanguage(s,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:r}=e;t&&typeof document<"u"&&Ze.create(t,s,n,i,r)}},In={name:"querystring",lookup(s){var n;let{lookupQuerystring:e}=s,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a<o.length;a++){const l=o[a].indexOf("=");l>0&&o[a].substring(0,l)===e&&(t=o[a].substring(l+1))}}return t}},Dn={name:"hash",lookup(s){var i;let{lookupHash:e,lookupFromHashIndex:t}=s,n;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const o=r.substring(1);if(e){const a=o.split("&");for(let l=0;l<a.length;l++){const u=a[l].indexOf("=");u>0&&a[l].substring(0,u)===e&&(n=a[l].substring(u+1))}}if(n)return n;if(!n&&t>-1){const a=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(i=a[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}}}return n}};let Q=null;const et=()=>{if(Q!==null)return Q;try{if(Q=typeof window<"u"&&window.localStorage!==null,!Q)return!1;const s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s)}catch{Q=!1}return Q};var Un={name:"localStorage",lookup(s){let{lookupLocalStorage:e}=s;if(e&&et())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(s,e){let{lookupLocalStorage:t}=e;t&&et()&&window.localStorage.setItem(t,s)}};let Z=null;const tt=()=>{if(Z!==null)return Z;try{if(Z=typeof window<"u"&&window.sessionStorage!==null,!Z)return!1;const s="i18next.translate.boo";window.sessionStorage.setItem(s,"foo"),window.sessionStorage.removeItem(s)}catch{Z=!1}return Z};var Vn={name:"sessionStorage",lookup(s){let{lookupSessionStorage:e}=s;if(e&&tt())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(s,e){let{lookupSessionStorage:t}=e;t&&tt()&&window.sessionStorage.setItem(t,s)}},Hn={name:"navigator",lookup(s){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let r=0;r<t.length;r++)e.push(t[r]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},Mn={name:"htmlTag",lookup(s){let{htmlTag:e}=s,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},_n={name:"path",lookup(s){var i;let{lookupFromPathIndex:e}=s;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},Kn={name:"subdomain",lookup(s){var i,r;let{lookupFromSubdomainIndex:e}=s;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((r=(i=window.location)==null?void 0:i.hostname)==null?void 0:r.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};let mt=!1;try{document.cookie,mt=!0}catch{}const yt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];mt||yt.splice(1,1);const qn=()=>({order:yt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:s=>s});class Bn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Tn(t,this.options||{},qn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Fn),this.addDetector(In),this.addDetector(Un),this.addDetector(Vn),this.addDetector(Hn),this.addDetector(Mn),this.addDetector(_n),this.addDetector(Kn),this.addDetector(Dn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(n=>n!=null&&!jn(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}Bn.type="languageDetector";export{kn as B,Yn as I,Jn as T,Bn as a,Wn as b,M as i,hn as r,pn as s,Xn as u};