1var Q={};const d=a=>typeof a=="string",A=()=>{let a,e;const t=new Promise((i,s)=>{a=i,e=s});return t.resolve=a,t.reject=e,t},re=a=>a==null?"":""+a,Le=(a,e,t)=>{a.forEach(i=>{e[i]&&(t[i]=e[i])})},we=/###/g,ne=a=>a&&a.indexOf("###")>-1?a.replace(we,"."):a,oe=a=>!a||d(a),U=(a,e,t)=>{const i=d(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(oe(a))return{};const r=ne(i[s]);!a[r]&&t&&(a[r]=new t),Object.prototype.hasOwnProperty.call(a,r)?a=a[r]:a={},++s}return oe(a)?{}:{obj:a,k:ne(i[s])}},ae=(a,e,t)=>{const{obj:i,k:s}=U(a,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let r=e[e.length-1],n=e.slice(0,e.length-1),o=U(a,n,Object);for(;o.obj===void 0&&n.length;)r=`${n[n.length-1]}.${r}`,n=n.slice(0,n.length-1),o=U(a,n,Object),o?.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},Pe=(a,e,t,i)=>{const{obj:s,k:r}=U(a,e,Object);s[r]=s[r]||[],s[r].push(t)},_=(a,e)=>{const{obj:t,k:i}=U(a,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Ce=(a,e,t)=>{const i=_(a,t);return i!==void 0?i:_(e,t)},xe=(a,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in a?d(a[i])||a[i]instanceof String||d(e[i])||e[i]instanceof String?t&&(a[i]=e[i]):xe(a[i],e[i],t):a[i]=e[i]);return a},E=a=>a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Re={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const $e=a=>d(a)?a.replace(/[&<>"'\/]/g,e=>Re[e]):a;class Ne{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 i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const ke=[" ",",","?","!",";"],je=new Ne(20),Fe=(a,e,t)=>{e=e||"",t=t||"";const i=ke.filter(n=>e.indexOf(n)<0&&t.indexOf(n)<0);if(i.length===0)return!0;const s=je.getRegExp(`(${i.map(n=>n==="?"?"\\?":n).join("|")})`);let r=!s.test(a);if(!r){const n=a.indexOf(t);n>0&&!s.test(a.substring(0,n))&&(r=!0)}return r},q=(a,e,t=".")=>{if(!a)return;if(a[e])return Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0;const i=e.split(t);let s=a;for(let r=0;r<i.length;){if(!s||typeof s!="object")return;let n,o="";for(let l=r;l<i.length;++l)if(l!==r&&(o+=t),o+=i[l],n=s[o],n!==void 0){if(["string","number","boolean"].indexOf(typeof n)>-1&&l<i.length-1)continue;r+=l-r+1;break}s=n}return s},M=a=>a?.replace(/_/g,"-"),Ee={type:"logger",log(a){this.output("log",a)},warn(a){this.output("warn",a)},error(a){this.output("error",a)},output(a,e){console?.[a]?.apply?.(console,e)}};class J{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Ee,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,i,s){return s&&!this.debug?null:(d(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new J(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new J(this.logger,e)}}var R=new J;class Y{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,r])=>{for(let n=0;n<r;n++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,r])=>{for(let n=0;n<r;n++)s.apply(s,[e,...t])})}}class le extends Y{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.indexOf(e)<0&&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,i,s={}){const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,n=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):d(i)&&r?o.push(...i.split(r)):o.push(i)));const l=_(this.data,o);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),l||!n||!d(i)?l:q(this.data?.[e]?.[t],i,r)}addResource(e,t,i,s,r={silent:!1}){const n=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];
1i&&(o=o.concat(n?i.split(n):i)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),ae(this.data,o,s),r.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const r in i)(d(i[r])||Array.isArray(i[r]))&&this.addResource(e,t,r,i[r],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,r,n={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=i,i=t,t=o[1]),this.addNamespaces(t);let l=_(this.data,o)||{};n.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?xe(l,i,r):l={...l,...i},ae(this.data,o,l),n.silent||this.emit("added",e,t,i)}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(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var ye={processors:{},addPostProcessor(a){this.processors[a.name]=a},handle(a,e,t,i,s){return a.forEach(r=>{e=this.processors[r]?.process(e,t,i,s)??e}),e}};const Se=Symbol("i18next/PATH_KEY");function Te(){const a=[],e=Object.create(null);let t;return e.get=(i,s)=>(t?.revoke?.(),s===Se?a:(a.push(s),t=Proxy.revocable(i,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function D(a,e){const{[Se]:t}=a(Te()),i=e?.keySeparator??".",s=e?.nsSeparator??":";if(t.length>1&&s){const r=e?.ns,n=Array.isArray(r)?r:null;if(n&&n.length>1&&n.slice(1).includes(t[0]))return`${t[0]}${s}${t.slice(1).join(i)}`}return t.join(i)}const ue={},G=a=>!d(a)&&typeof a!="boolean"&&typeof a!="number";class W extends Y{constructor(e,t={}){super(),Le(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=R.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if(s?.res===void 0)return!1;const r=G(s.res);return!(i.returnObjects===!1&&r)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const n=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Fe(e,i,s);if(n&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:d(r)?[r]:r};const u=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(s)}return{key:e,namespaces:d(r)?[r]:r}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=D(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]),e=e.map(S=>typeof S=="function"?D(S,{...this.options,...s}):String(S));const r=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return p?r?{res:`${u}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${o}`:r?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:o;const g=this.resolve(e,s);let h=g?.res;const m=g?.usedKey||o,y=g?.exactUsedKey||o,L=["[object Number]","[object Function]","[object RegExp]"],x=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,b=s.count!==void 0&&!d(s.count),N=W.hasDefaultValue(s),T=b?this.pluralResolver.getSuffix(f,s.count,s):"",I=s.ordinal&&b?this.pluralResolver.getSuffix(f,s.count,{ordinal:!1}):"",ee=b&&!s.ordinal&&s.count===0,k=ee&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${T}`]||s[`defaultValue${I}`]||s.defaultValue;let P=h;j&&!h&&N&&(P=k);const Oe=G(P),be=Object.prototype.toString.apply(P);if(j&&P&&Oe&&L.indexOf(be)<0&&!(d(x)&&Array.isArray(P))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,P,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(g.res=S,g.usedParams=this.getUsedParamsDetails(s),g):S}if(n){const S=Array.isArray(P),w=S?[]:{},te=S?y:m;for(const C in P)if(Object.prototype.hasOwnProperty.call(P,C)){const $=`${te}${n}${C}`;N&&!h?w[C]=this.translate($,{...s,defaultValue:G(k)?k[C]:void 0,joinArrays:!1,ns:l}):w[C]=this.translate($,{...s,joinArrays:!1,ns:l}),w[C]===$&&(w[C]=P[C])}h=w}}else if(j&&d(x)&&Array.isArray(h))h=h.join(x),h&&(h=this.extendTranslation(h,e,s,i));else{let S=!1,w=!1;!this.isValidLookup(h)&&N&&(S=!0,h=k),this.isValidLookup(h)||(w=!0,h=o);const C=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&w?void 0:h,$=N&&k!==h&&this.options.updateMissing;if(w||S||$){if(this.logger.log($?"updateKey":"missingKey",f,u,o,$?k:h),n){const O=this.resolve(o,{...s,keySeparator:!1});O&&O.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 K=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let O=0;O<z.length;O++)K.push(z[O]);else this.options.saveMissingTo==="all"?K=this.languageUtils.toResolveHierarchy(s.lng||this.language):K.push(s.lng||this.language);const se=(O,F,V)=>{const ie=N&&V!==h?V:C;this.options.missingKeyHandler?this.options.missingKeyHandler(O,u,F,ie,$,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(O,u,F,ie,$,s),this.emit
1("missingKey",O,u,F,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?K.forEach(O=>{const F=this.pluralResolver.getSuffixes(O,s);ee&&s[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(V=>{se([O],o+V,s[`defaultValue${V}`]||k)})}):se(K,o,k))}h=this.extendTranslation(h,e,s,g,i),w&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}${c}${o}`),(w||S)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${o}`:o,S?h:void 0,s))}return r?(g.res=h,g.usedParams=this.getUsedParamsDetails(s),g):h}extendTranslation(e,t,i,s,r){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=d(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let c=i.replace&&!d(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,i.lng||this.language||s.usedLng,i),l){const f=e.match(this.interpolator.nestingRegexp),p=f&&f.length;u<p&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>r?.[0]===f[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`),null):this.translate(...f,t),i)),i.interpolation&&this.interpolator.reset()}const n=i.postProcess||this.options.postProcess,o=d(n)?[n]:n;return e!=null&&o?.length&&i.applyPostProcessor!==!1&&(e=ye.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,r,n,o;return d(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?D(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,t),c=u.key;s=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=t.count!==void 0&&!d(t.count),g=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(d(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(y=>{this.isValidLookup(i)||(o=y,!ue[`${m[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(ue[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(L=>{if(this.isValidLookup(i))return;n=L;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,L,y,t);else{let b;p&&(b=this.pluralResolver.getSuffix(L,t.count,t));const N=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&b.indexOf(T)===0&&x.push(c+b.replace(T,this.options.pluralSeparator)),x.push(c+b),g&&x.push(c+N)),h){const I=`${c}${this.options.contextSeparator||"_"}${t.context}`;x.push(I),p&&(t.ordinal&&b.indexOf(T)===0&&x.push(I+b.replace(T,this.options.pluralSeparator)),x.push(I+b),g&&x.push(I+N))}}let j;for(;j=x.pop();)this.isValidLookup(i)||(r=j,i=this.getResource(L,y,j,t))}))})}),{res:i,usedKey:s,exactUsedKey:r,usedLng:n,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}
1getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!d(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const r of t)delete s[r]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class fe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=R.create("languageUtils")}getScriptPartFromCode(e){if(e=M(e),!e||e.indexOf("-")<0)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=M(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(d(e)&&e.indexOf("-")>-1){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.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(n=>{if(n===r)return n;if(!(n.indexOf("-")<0&&r.indexOf("-")<0)&&(n.indexOf("-")>0&&r.indexOf("-")<0&&n.substring(0,n.indexOf("-"))===r||n.indexOf(r)===0&&r.length>1))return n})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),d(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],r=n=>{n&&(this.isSupportedCode(n)?s.push(n):this.logger.warn(`rejecting language code not found in supportedLngs: ${n}`))};return d(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(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))):d(e)&&r(this.formatLanguageCode(e)),i.forEach(n=>{s.indexOf(n)<0&&r(this.formatLanguageCode(n))}),s}}const ce={zero:0,one:1,two:2,few:3,many:4,other:5},he={select:a=>
1a===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Ie{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=R.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=M(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:i,type:s});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let n;try{n=new Intl.PluralRules(i,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),he;if(!e.match(/-|_/))return he;const l=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(l,t)}return this.pluralRulesCache[r]=n,n}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,r)=>ce[s]-ce[r]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const de=(a,e,t,i=".",s=!0)=>{let r=Ce(a,e,t);return!r&&s&&d(t)&&(r=q(a,t,i),r===void 0&&(r=q(e,t,i))),r},Z=a=>a.replace(/\$/g,"$$$$");class pe{constructor(e={}){this.logger=R.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:r,prefixEscaped:n,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:g,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:L,alwaysFormat:
1x}=e.interpolation;this.escape=t!==void 0?t:$e,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=r?E(r):n||"{{",this.suffix=o?E(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?E(p):g||E("$t("),this.nestingSuffix=h?E(h):m||E(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=L||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"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,i,s){let r,n,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const L=de(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(L,void 0,i,{...s,...t,interpolationkey:g}):L}const h=g.split(this.formatSeparator),m=h.shift().trim(),y=h.join(this.formatSeparator).trim();return this.format(de(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...s,...t,interpolationkey:m})};this.resetRegExp();const c=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Z(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Z(this.escape(g)):Z(g)}].forEach(g=>{for(o=0;r=g.regex.exec(e);){const h=r[1].trim();if(n=u(h),n===void 0)if(typeof c=="function"){const y=c(e,r,s);n=d(y)?y:""}else if(s&&Object.prototype.hasOwnProperty.call(s,h))n="";else if(f){n=r[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${e}`),n="";else!d(n)&&!this.useRawValueToEscape&&(n=re(n));const m=g.safeValue(n);if(e=e.replace(r[0],m),f?(g.regex.lastIndex+=n.length,g.regex.lastIndex-=r[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,r,n;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${E(c)}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,n);const g=p.match(/'/g),h=p.match(/"/g);((g?.length??0)%2===0&&!h||(h?.length??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{n=JSON.parse(p),u&&(n={...u,...n})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${p}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];n={...i},n=n.replace&&!d(n.replace)?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;const u=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(u!==-1&&(l=s[1].slice(u).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),s[1]=s[1].slice(0,u)),r=t(o.call(this,s[1].trim(),n),n),r&&s[0]===e&&!d(r))return r;d(r)||(r=re(r)),r||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),r=""),l.length&&(r=l.reduce((c,f)=>this.format(c,f,i.lng,{...i,interpolationkey:s[1].trim()}),r.trim())),e=e.replace(s[0],r),this.regexp.lastIndex=0}return e}}const De=a=>{let e=a.toLowerCase().trim();const t={};if(a.indexOf("(")>-1){const i=a.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(n=>{if(n){const[o,...l]=n.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},ge=a=>{const e={};return(t,i,s)=>{let r=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(r={...r,[s.interpolationkey]:void 0});const n=i+JSON.stringify(r);let o=e[n];return o||(o=a(M(i),s),e[n]=o),o(t)}},Ke=a=>(e,t,i)=>a(M(t),i)(e);class Ve{constructor(e={}){this.logger=R.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?ge:Ke;this.formats={number:i((s,r)=>{const n=new Intl.NumberFormat(s,{...r});return o=>
1n.format(o)}),currency:i((s,r)=>{const n=new Intl.NumberFormat(s,{...r,style:"currency"});return o=>n.format(o)}),datetime:i((s,r)=>{const n=new Intl.DateTimeFormat(s,{...r});return o=>n.format(o)}),relativetime:i((s,r)=>{const n=new Intl.RelativeTimeFormat(s,{...r});return o=>n.format(o,r.range||"day")}),list:i((s,r)=>{const n=new Intl.ListFormat(s,{...r});return o=>n.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ge(t)}format(e,t,i,s={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{const{formatName:u,formatOptions:c}=De(l);if(this.formats[u]){let f=o;try{const p=s?.formatParams?.[s.interpolationkey]||{},g=p.locale||p.lng||s.locale||s.lng||i;f=this.formats[u](o,g,{...c,...s,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const Ae=(a,e)=>{a.pending[e]!==void 0&&(delete a.pending[e],a.pendingCount--)};class Ue extends Y{constructor(e,t,i,s={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=R.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(e,t,i,s){const r={},n={},o={},l={};return e.forEach(u=>{let c=!0;t.forEach(f=>{const p=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?n[p
1]===void 0&&(n[p]=!0):(this.state[p]=1,c=!1,n[p]===void 0&&(n[p]=!0),r[p]===void 0&&(r[p]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(o[u]=!0)}),(Object.keys(r).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(r),pending:Object.keys(n),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,i){const s=e.split("|"),r=s[0],n=s[1];t&&this.emit("failedLoading",r,n,t),!t&&i&&this.store.addResourceBundle(r,n,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Pe(l.loaded,[r],n),Ae(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,i,s=0,r=this.retryTimeout,n){if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:r,callback:n});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,r*2,n)},r);return}n(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();d(e)&&(e=this.languageUtils.toResolveHierarchy(e)),d(t)&&(t=[t]);const r=this.queueLoad(e,t,i,s);if(!r.toLoad.length)return r.pending.length||s(),null;r.toLoad.forEach(n=>{this.loadOne(n)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],r=i[1];this.read(s,r,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${s} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${s}`,o),this.loaded(e,n,o)})}saveMissing(e,t,i,s,r,n={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" 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(!(i==null||i==="")){if(this.backend?.create){const l={...n,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,i,s,l):c=u(e,t,i,s),c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}else u(e,t,i,s,o,l)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const X=()=>({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:a=>{let e={};if(typeof a[1]=="object"&&(e=a[1]),d(a[1])&&(e.defaultValue=a[1]),d(a[2])&&(e.tDescription=a[2]),typeof a[2]=="object"||typeof a[3]=="object"){const t=a[3]||a[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:a=>a,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),me=a=>(d(a.ns)&&(a.ns=[a.ns]),d(a.fallbackLng)&&(a.fallbackLng=[a.fallbackLng]),d(a.fallbackNS)&&(a.fallbackNS=[a.fallbackNS]),a.supportedLngs?.indexOf?.("cimode")<0&&(a.supportedLngs=a.supportedLngs.concat(["cimode"])),typeof a.initImmediate=="boolean"&&(a.initAsync=a.initImmediate),a),B=()=>{},He=a=>
1{Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(t=>{typeof a[t]=="function"&&(a[t]=a[t].bind(a))})},ve="__i18next_supportNoticeShown",Me=()=>!!(typeof globalThis<"u"&&globalThis[ve]||typeof process<"u"&&Q&&Q.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&Q),ze=()=>{typeof globalThis<"u"&&(globalThis[ve]=!0)},Be=a=>!!(a?.modules?.backend?.name?.indexOf("Locize")>0||a?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||a?.options?.backend?.backends&&a.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||a?.options?.backend?.projectId||a?.options?.backend?.backendOptions&&a.options.backend.backendOptions.some(e=>e?.projectId));class H extends Y{constructor(e={},t){if(super(),this.options=me(e),this.services={},this.logger=R,this.modules={external:[]},He(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&&(d(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=X();this.options={...i,...this.options,...me(e)},this.options.interpolation={...i.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=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Be(this)&&!Me()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("ð i18next is made possible by our own product, Locize â consider powering your project with managed localization (AI, CDN, integrations): https://locize.com ð"),ze());const s=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?R.init(s(this.modules.logger),this.options):R.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Ve;const c=new fe(this.options);this.store=new le(this.options.resources,this.options);const f=this.services;f.logger=R,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Ie(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new pe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Ue(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new W(this.services,this.options),this.translator.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,t||(t=B),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]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const o=A(),l=()=>{const u=(c,f)=>{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
1("initialized",this.options),o.resolve(f),t(c,f)};if(this.languages&&!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),o}loadResources(e,t=B){let i=t;const s=d(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const r=[],n=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};s?n(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>n(l)),this.options.preload?.forEach?.(o=>n(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,t,i){const s=A();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=B),this.services.backendConnector.reload(e,t,r=>{s.resolve(),i(r)}),s}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"&&ye.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"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=A();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},r=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...u)=>this.t(...u)),t&&t(o,(...u)=>this.t(...u))},n=o=>{!e&&!o&&this.services.languageDetector&&(o=[]);const l=d(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(d(o)?[o]:o);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,c=>{r(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?n(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(n):this.services.languageDetector.detect(n):n(e),i}getFixedT(e,t,i){const s=(r,n,...o)=>{let l;typeof n!="object"?l=this.options.overloadTranslationOptionHandler([r,n].concat(o)):l={...n},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||s.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=D(l.keyPrefix,u));const c=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(r)?f=r.map(p=>(typeof p=="function"&&(p=D(p,u)),`${l.keyPrefix}${c}${p}`)):(typeof r=="function"&&(r=D(r,u)),f=l.keyPrefix?`${l.keyPrefix}${c}${r}`:r),this.t(f,l)};return d(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.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;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const n=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,n);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||n(i,e)&&(!s||n(r,e)))}loadNamespaces(e,t){const i=A();return this.options.ns?(d(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=A();d(e)&&(e=[e]);const s=this.options.preload||[],r=e.filter(n=>s.indexOf(n)<0&&this.services.languageUtils.isSupportedCode(n));return r.length?(this.options.preload=s.concat(r),this.loadResources(n=>{i.resolve(),t&&t(n)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const r=s.getTextInfo();if(r&&r.direction)return r.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"],i=this.services?.languageUtils||new fe(X());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new H(e,t);return i.createInstance=H.createInstance,i}cloneInstance(e={},t=B){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},r=new H(s);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i){const o=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,f)=>(c[f]={...l[u][f]},c),l[u]),l),{});r.store=new le(o,s),r.services.resourceStore=r.store}if(e.interpolation){const l={...X().interpolation,...this.options.interpolation,...e.interpolation},u={...s,interpolation:l};r.services.interpolator=new pe(u)}return r.translator=new W(r.services,s),r.translator.on("*",(o,...l)=>{r.emit(o,...l)}),r.init(s,t),r.translator.options=s,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 v=H.createInstance();v.createInstance;v.dir;v.init;v.loadResources;v.reloadResources;v.use;v.changeLanguage;v.getFixedT;v.t;v.exists;v.setDefaultNamespace;v.hasLoadedNamespace;v.loadNamespaces;v.loadLanguages;export{v as i};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.