vendor: 6,624 bytes, lines 1-2
1/*! For license information please see 332.037a904137d36c916a62.js.LICENSE.txt */ 2"use strict";(globalThis.webpackChunkukko||=[]).push([[332],{35508(e,t,s){s.d(t,{Rm:()=>N});const i=e=>"string"==typeof e,n=()=>{let e,t;const s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},o=e=>null==e?"":String(e),r=/###/g,a=e=>e&&e.includes("###")?e.replace(r,"."):e,l=e=>!e||i(e),c=(e,t,s)=>{const n=i(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(l(e))return{};const t=a(n[o]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return l(e)?{}:{obj:e,k:a(n[o])}},u=(e,t,s)=>{const{obj:i,k:n}=c(e,t,Object);if(void 0!==i||1===t.length)return void(i[n]=s);let o=t[t.length-1],r=t.slice(0,t.length-1),a=c(e,r,Object);for(;void 0===a.obj&&r.length;)o=`${r[r.length-1]}.${o}`,r=r.slice(0,r.length-1),a=c(e,r,Object),a?.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=s},h=(e,t)=>{const{obj:s,k:i}=c(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},p=(e,t,s)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(Object.prototype.hasOwnProperty.call(e,n)?i(e[n])||e[n]instanceof String||i(t[n])||t[n]instanceof String?s&&(e[n]=t[n]):p(e[n],t[n],s):e[n]=t[n]);return e},g=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},f=e=>i(e)?e.replace(/[&<>"'\/]/g,e=>d[e]):e;const m=[" ",",","?","!",";"],y=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),v=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(s);let n=e;for(let e=0;e<i.length;){if(!n||"object"!=typeof n)return;let t,o="";for(let r=e;r<i.length;++r)if(r!==e&&(o+=s),o+=i[r],t=n[o],void 0!==t){if(["string","number","boolean"].includes(typeof t)&&r<i.length-1)continue;e+=r-e+1;break}n=t}return n},b=e=>e?.replace(/_/g,"-"),x={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class S{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||x,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,s,n){return n&&!this.debug?null:(e=e.map(e=>i(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g," "):e),i(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new S(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new S(this.logger,e)}}var k=new S;class L{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}once(e,t){const s=(...i)=>{t(...i),this.off(e,s)};return this.on(e,s),this}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,s])=>{for(let i=0;i<s;i++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let n=0;n<i;n++)s(e,...t)})}}}class w extends L{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(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,s,n={}){const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.includes(".")?a=e.split("."):(a=[e,t],s&&(Array.isArray(s)?a.push(...s):i(s)&&o?a.push(...s.split(o)):a.push(s)));const l=h(this.data,a);return l||t||s||!e.includes(".")||(e=a[0],t=a[1],s=a.slice(2).join(".")),!l&&r&&i(s)?v(this.data?.[e]?.[t],s,o):l}addResource(e,t,s,i,n={silent:!1}){const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let r=[e,t];s&&(r=r.concat(o?s.split(o):s)),e.includes(".")&&(r=e.split("."),i=t,t=r[1]),this.addNamespaces(t),u(this.data,r,i),n.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,n={silent:!1}){for(const n in s)(i(s[n])||Array.isArray(s[n]))&&this.addResource(e,t,n,s[n],{silent:!0});n.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,n,o={silent:!1,skipCopy:!1}){let r=[e,t];e.includes(".")&&(r=e.split("."),i=s,s=t,t=r[1]),this.addNamespaces(t);let a=h(this.data,r)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?p(a,s,n):a={...a,...s},u(this.data,r,a),o.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}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(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var O={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,n){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,n)??t}),t}};const $=Symbol("i18next/PATH_KEY");function N(e,t){const{[$]:s}=e(function(){const e=[],t=Object.create(null);let s;return t.get=(i,n)=>(s?.revoke?.(),n===$?e:(e.push(n),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),i=t?.keySeparator??".",n=t?.nsSeparator??":",o="strict"===t?.enableSelector;if(s.length>1&&n){const e=t?.ns,r=o?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(r){if((o?r:r.length>1?r.slice(1):[]).includes(s[0]))return`${s[0]}${n}${s.slice(1).join(i)}`}}return s.join(i)}const C=e=>!i(e)&&"boolean"!=typeof e&&"number"!=typeof e;class R extends L{constructor(e,t={}){super(),((e,t,s)=>{e.forEach(e=>{t[e]&&(s[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
2i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=k.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(null==e)return!1;const i=this.resolve(e,s);if(void 0===i?.res)return!1;const n=C(i.res);return!1!==s.returnObjects||!n}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const r=s&&e.includes(s),a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,s)=>{t=t||"",s=s||"";const i=m.filter(e=>!t.includes(e)&&!s.includes(e));if(0===i.length)return!0;const n=y.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!n.test(e);if(!o){const t=e.indexOf(s);t>0&&!n.test(e.substring(0,t))&&(o=!0)}return o})(e,s,n));if(r&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i(o)?[o]:o};const r=e.split(s);(s!==n||s===n&&this.options.ns.includes(r[0]))&&(o=r.shift()),e=r.join(n)}return{key:e,namespaces:i(o)?[o]:o}}translate(e,t,s){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=N(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?N(e,{...this.options,...n}):String(e));const o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],n),c=l[l.length-1];let u=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const h=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===h?.toLowerCase())return p?o?{res:`${c}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a;const g=this.resolve(e,n);let d=g?.res;const f=g?.usedKey||a,m=g?.exactUsedKey||a,y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!i(n.count),x=R.hasDefaultValue(n),S=b?this.pluralResolver.getSuffix(h,n.count,n):"",k=n.ordinal&&b?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",L=b&&!n.ordinal&&0===n.count,w=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${S}`]||n[`defaultValue${k}`]||n.defaultValue;let O=d;v&&!d&&x&&(O=w);const $=C(O),P=Object.prototype.toString.apply(O);if(!(v&&O&&$)||["[object Number]","[object Function]","[object RegExp]"].includes(P)||i(y)&&Array.isArray(O))if(v&&i(y)&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,n,s));else{let t=!1,i=!1;!this.isValidLookup(d)&&x&&(t=!0,d=w),this.isValidLookup(d)||(i=!0,d=a);const o=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:d,l=x&&w!==d&&this.options.updateMissing;if(i||t||l){if(this.logger.log(l?"updateKey":"missingKey",h,c,b&&!l?`${a}${this.pluralResolver.getSuffix(h,n.count,n)}`:a,l?w:d),r){const e=this.resolve(a,{...n,keySeparator:!1});e&&e.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 e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const s=(e,t,s)=>{const i=x&&s!==d?s:o;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,i,l,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,i,l,n),this.emit
vendor: 9,216 bytes, line 2
2("missingKey",e,c,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],a+t,n[`defaultValue${t}`]||w)})}):s(e,a,w))}d=this.extendTranslation(d,e,n,g,s),i&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${c}${u}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${a}`:a,t?d:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,O,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(g.res=e,g.usedParams=this.getUsedParamsDetails(n),g):e}if(r){const e=Array.isArray(O),t=e?[]:{},s=e?m:f;for(const e in O)if(Object.prototype.hasOwnProperty.call(O,e)){const i=`${s}${r}${e}`;t[e]=x&&!d?this.translate(i,{...n,defaultValue:C(w)?w[e]:void 0,joinArrays:!1,ns:l}):this.translate(i,{...n,joinArrays:!1,ns:l}),t[e]===i&&(t[e]=O[e])}d=t}}return o?(g.res=d,g.usedParams=this.getUsedParamsDetails(n),g):d}extendTranslation(e,t,s,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const r=i(e)&&(void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(r){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=s.replace&&!i(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,s.lng||this.language||n.usedLng,s),r){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(s.nest=!1)}!s.lng&&n&&n.res&&(s.lng=this.language||n.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||s.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),s)),s.interpolation&&this.interpolator.reset()}const r=s.postProcess||this.options.postProcess,a=i(r)?[r]:r;return null!=e&&a?.length&&!1!==s.applyPostProcessor&&(e=O.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,n,o,r,a;return i(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?N(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(e,t),c=l.key;n=c;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const h=void 0!==t.count&&!i(t.count),p=h&&!t.ordinal&&0===t.count,g=void 0!==t.context&&(i(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(s)||(a=e,this.checkedLoadedFor[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(this.checkedLoadedFor[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${d.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!!!")),d.forEach(i=>{if(this.isValidLookup(s))return;r=i;const n=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,c,i,e,t);else{let e;h&&(e=this.pluralResolver.getSuffix(i,t.count,t));const s=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&e.startsWith(o)&&n.push(c+e.replace(o,this.options.pluralSeparator)),n.push(c+e),p&&n.push(c+s)),g){const i=`${c}${this.options.contextSeparator||"_"}${t.context}`;n.push(i),h&&(t.ordinal&&e.startsWith(o)&&n.push(i+e.replace(o,this.options.pluralSeparator)),n.push(i+e),p&&n.push(i+s))}}let a;for(;a=n.pop();)this.isValidLookup(s)||(o=a,s=this.getResource(i,e,a,t))}))})}),{res:s,usedKey:n,exactUsedKey:o,usedLng:r,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!i(e.replace);let n=s?e.replace:e;if(s&&void 0!==e.count&&(n={...n,count:e.count}),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!s){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith("defaultValue")&&void 0!==e[t])return!0;return!1}}class P{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(!(e=b(e))||!e.includes("-"))return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b(e))||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(i(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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("languageOnly"===this.options.load||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(e=>{if(t)return;const s=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(s)||(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i||!(!e.includes("-")&&!i.includes("-"))&&(!(!e.includes("-")||i.includes("-")||e.slice(0,e.indexOf("-"))!==i)||!!(e.startsWith(i)&&i.length>1)))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),i(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.options.fallbackLng,n=Array.isArray(s)?s.join("|"):s;n!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=n);const o=void 0===t||!1===t||i(t),r=void 0===t&&"function"==typeof this.options.fallbackLng;let a=null;if(i(e)&&o&&!r){let s;s=void 0===t?"undefined":!1===t?"boolean:false":`string:${t}`,a=`${e.length}:${e}|${s}`}if(null!==a){const e=this.resolveHierarchyCache[a];if(void 0!==e)return e.slice()}const l=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),c=[],u=e=>{e&&(this.isSupportedCode(e)?c.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return i(e)&&(e.includes("-")||e.includes("_"))?("languageOnly"!==this.options.load&&u(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&u(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&u(this.getLanguagePartFromCode(e))):i(e)&&u(this.formatLanguageCode(e)),l.forEach(e=>{c.includes(e)||u(this.formatLanguageCode(e))}),null!==a?(this.resolveHierarchyCache[a]=c,c.slice()):c}}const j={zero:0,one:1,two:2,few:3,many:4,other:5},E={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=k.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=b("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let o;try{o=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl pol
2yfill!"),E;if(!e.match(/-|_/))return E;const i=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(i,t)}return this.pluralRulesCache[n]=o,o}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((e,t)=>j[e]-j[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const T=(e,t,s,n=".",o=!0)=>{let r=((e,t,s)=>{const i=h(e,s);return void 0!==i?i:h(t,s)})(e,t,s);return!r&&o&&i(s)&&(r=v(e,s,n),void 0===r&&(r=v(t,s,n))),r},I=e=>e.replace(/\$/g,"$$$$");class V{constructor(e={}){this.logger=k.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:o,suffix:r,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:d,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=n?g(n):o||"{{",this.suffix=r?g(r):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u?g(u):"-",this.unescapeSuffix=this.unescapePrefix?"":c?g(c):"",this.nestingPrefix=h?g(h):p||g("$t("),this.nestingSuffix=d?g(d):m||g(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"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,s,n){let r,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){const i=T(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,s,{...n,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),r=i.join(this.formatSeparator).trim();return this.format(T(t,c,o,this.options.keySeparator,this.options.ignoreJSONStructure),r,s,{...n,...t,interpolationkey:o})};this.resetRegExp(),!this.escapeValue&&"string"==typeof e&&/\$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 h=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(l=0;r=t.regex.exec(e);){const s=r[1].trim();if(a=u(s),void 0===a)if("function"==typeof h){const t=h(e,r,n);a=i(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,s))a="";else{if(p){a=r[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),a=""}else i(a)||this.useRawValueToEscape||(a=o(a));const c=t.safeValue(a);if(e=e.replace(r[0],I(c)),p?(t.regex.lastIndex+=c.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,s={}){let n,r,a;const l=(e,t)=>
vendor: 16,170 bytes, line 2
2{const s=this.nestingOptionsSeparator;if(!e.includes(s))return e;const i=e.split(new RegExp(`${g(s)}[ ]*{`));let n=`{${i[1]}`;e=i[0],n=this.interpolate(n,a);const o=n.match(/'/g),r=n.match(/"/g);((o?.length??0)%2==0&&!r||(r?.length??0)%2!=0)&&(n=n.replace(/'/g,'"'));try{a=JSON.parse(n),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${n}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let c=[];a={...s},a=a.replace&&!i(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/s.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==u&&(c=n[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,u)),r=t(l.call(this,n[1].trim(),a),a),r&&n[0]===e&&!i(r))return r;i(r)||(r=o(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c.length&&(r=c.reduce((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const A=e=>{const t={};return(s,i,n)=>{let o=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(o={...o,[n.interpolationkey]:void 0});const r=i+JSON.stringify(o);let a=t[r];return a||(a=e(b(i),n),t[r]=a),a(s)}},D=e=>(t,s,i)=>e(b(s),i)(t);class K{constructor(e={}){this.logger=k.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?A:D;this.formats={number:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=A(t)}format(e,t,s,i={}){if(!t)return e;if(null==e)return e;const n=t.split(this.formatSeparator),o=[];for(let e=0;e<n.length;e++){let t=n[e];for(;t.indexOf("(")>-1&&!t.includes(")")&&e+1<n.length;)t=`${t}${this.formatSeparator}${n[++e]}`;o.push(t)}return o.reduce((e,t)=>{const{formatName:n,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const s={};if(e.includes("(")){const i=e.split("(");t=i[0].toLowerCase().trim();const n=i[1].slice(0,-1);"currency"!==t||n.includes(":")?"relativetime"!==t||n.includes(":")?n.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),n=i.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();s[o]||(s[o]=n),"false"===n&&(s[o]=!1),"true"===n&&(s[o]=!0),isNaN(n)||(s[o]=parseInt(n,10))}}):s.range||(s.range=n.trim()):s.currency||(s.currency=n.trim())}return{formatName:t,formatOptions:s}})(t);if(this.formats[n]){let t=e;try{const r=i?.formatParams?.[i.interpolationkey]||{},a=r.locale||r.lng||i.locale||i.lng||s;t=this.formats[n](e,a,{...o,...i,...r})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${n}`),e},e)}}class U extends L{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=k.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=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){const n={},o={},r={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const r=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===o[r]&&(o[r]=!0):(this.state[r]=1,i=!1,void 0===o[r]&&(o[r]=!0),void 0===n[r]&&(n[r]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(r[e]=!0)}),(Object.keys(n).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(o),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(e,t,s){const i=e.split("|"),n=i[0],o=i[1];t&&this.emit("failedLoading",n,o,t),!t&&s&&this.store.addResourceBundle(n,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const r={};this.queue.forEach(s=>{((e,t,s)=>{const{obj:i,k:n}=c(e,t,Object);i[n]=i[n]||[],i[n].push(s)})(s.loaded,[n],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{r[e]||(r[e]={});const t=s.loaded[e];t.length&&t.forEach(t=>{void 0===r[e][t]&&(r[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",r),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,n=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:n,callback:o});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}r&&a&&i<this.maxRetries?setTimeout(()=>{this.read(e,t,s,i+1,2*n,o)},n):o(r,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(e,t,r);try{const s=a(e,t);s&&"function"==typeof s.then?s.then(e=>r(null,e)).catch(r):r(null,s)}catch(e){r(e)}}prepareLoading(e,t,s={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();i(e)&&(e=this.languageUtils.toResolveHierarchy(e)),i(t)&&(t=[t]);const o=this.queueLoad(e,t,s,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`,s),!s&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${i}`,o),this.loaded(e,s,o)})}saveMissing(e,t,s,i,n,o={},r=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=s&&""!==s){if(this.backend?.create){const a={...o,isUpdate:n},l=this.backend.create.bind(this.backend);if(l.length<6)try{let n;n=5===l.length?l(e,t,s,i,a):l(e,t,s,i),n&&"function"==typeof n.then?n.then(e=>r(null,e)).catch(r):r(null,n)}catch(e){r(e)}else l(e,t,s,i,r,a)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}else this.logger.warn(`did not save key "${s}" 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!!!")}}const M=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),i(e[1])&&(t.defaultValue=e[1]),i(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H=e=>(i(e.ns)&&(e.ns=[e.ns]),i(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),i(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),_=()=>{};class z extends L{constructor(e={},t){var s;if(super(),this.options=H(e),this.services={},this.logger=k,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(e=>{"function"==typeof s[e]&&(s[e]=s[e].bind(s))}),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,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(i(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const s=M();this.options={...s,...this.options,...H(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?k.init(o(this.modules.logger),this.options):k.init(null,this.options),e=this.modules.formatter?this.modules.formatter:K;const t=new P(this.options);this.store=new w(this.options.resources,this.options);const s=this.services;s.logger=k,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new F(t,{prepend:this.options.pluralSeparator}),e&&(s.formatter=o(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new V(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new U(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new R(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=_),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const r=n(),a=()=>{const e=(e,s)=>{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),r.resolve(s),t(e,s)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),r}loadResources(e,t=_){let s=t;const n=i(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&(e.includes(t)||e.push(t))})};if(n)t(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)})}else s(null)}reloadResources(e,t,s){const i=n();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=_),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),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"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&O.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!["cimode","dev"].includes(e)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!["cimode","dev"].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;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 s=n();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(i,n)=>{n?this.isLanguageChangingTo===e&&(o(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,s.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const s=i(t)?t:t&&t[0],n=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(i(t)?[t]:t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,e=>{r(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),s}getFixedT(e,t,s,n){const o=n?.scopeNs,r=(e,t,...i)=>{let n;n="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},n.lng=n.lng||r.lng,n.lngs=n.lngs||r.lngs;const a=void 0!==n.ns&&null!==n.ns;n.ns=n.ns||r.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||s||r.keyPrefix);const l={...this.options,...n};Array.isArray(o)&&!a&&(l.ns=o),"function"==typeof n.keyPrefix&&(n.keyPrefix=N(n.keyPrefix,l));const c=this.options.keySeparator||".";let u;return n.keyPrefix&&Array.isArray(e)?u=e.map(e=>("function"==typeof e&&(e=N(e,l)),`${n.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=N(e,l)),u=n.keyPrefix?`${n.keyPrefix}${c}${e}`:e),this.t(u,n)};return i(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,r}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;
2if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const o=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(s,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(s,e)||i&&!o(n,e)))}loadNamespaces(e,t){const s=n();return this.options.ns?(i(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=n();i(e)&&(e=[e]);const o=this.options.preload||[],r=e.filter(e=>!o.includes(e)&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=o.concat(r),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(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 t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new P(M());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].includes(t.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new z(e,t);return s.createInstance=z.createInstance,s}cloneInstance(e={},t=_){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},n=new z(i);void 0===e.debug&&void 0===e.prefix||(n.logger=n.logger.clone(e));if(["store","services","language"].forEach(e=>{n[e]=this[e]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,i)=>(s[i]={...e[t][i]},s),e[t]),e),{});n.store=new w(e,i),n.services.resourceStore=n.store}if(e.interpolation){const t={...M().interpolation,...this.options.interpolation,...e.interpolation},s={...i,interpolation:t};n.services.interpolator=new V(s)}return n.translator=new R(n.services,i),n.translator.on("*",(e,...t)=>{n.emit(e,...t)}),n.init(i,t),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const B=z.createInstance(),J=B.createInstance;B.dir,B.init,B.loadResources,B.reloadResources,B.use,B.changeLanguage,B.getFixedT,B.t,B.exists,B.setDefaultNamespace,B.hasLoadedNamespace,B.loadNamespaces,B.loadLanguages;s.d(t,["Q_",0,J])},56508(e,t,s){s.d(t,{hz:()=>n});const i=(0,s(12888).createContext)();class n{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}s.d(t,["gJ",0,i])},44049(e,t,s){let i={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:s(89759).x,transDefaultProps:void 0};s.d(t,["r",0,()=>i])},2832(e,t,s){let i;s.d(t,["T",0,()=>i])},89759(e,t,s){const i=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,n={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},o=e=>n[e];s.d(t,["x",0,e=>e.replace(i,o)])},65241(e,t,s){s.d(t,{B:()=>p});var i=()=>s(12888),n=s.cw(function(e,t){var s=i();var n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=s.useState,r=s.useEffect,a=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!n(e,s)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),i=o({inst:{value:s,getSnapshot:t}}),n=i[0].inst,u=i[1];return a(function(){n.value=s,n.getSnapshot=t,c(n)&&u({inst:n})},[e,s,t]),r(function(){return c(n)&&u({inst:n}),e(function(){c(n)&&u({inst:n})})},[e]),l(s),s};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u}),o=s.cw(function(e,t){e.exports=n()});i(),o();var r=s(56508),a=s(2832),l=s(44049),c=s(2018);const u={t:(e,t)=>{if((0,c.Kg)(t))return t;if((0,c.Gv)(t)&&(0,c.Kg)(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){const t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},h=()=>()=>{},p=(e,t={})=>{const{i18n:s}=t,{i18n:o,defaultNS:p}=(0,i().useContext)(r.gJ)||{},g=s||o||(0,a.T)();g&&!g.reportNamespaces&&(g.reportNamespaces=new r.hz),g||(0,c.mc)(g,"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 d=(0,i().useMemo)(()=>({...(0,l.r)(),...g?.options?.react,...t}),[g,t]),{useSuspense:f,keyPrefix:m}=d,y=e||p||g?.options?.defaultNS,v=(0,c.Kg)(y)?[y]:y||["translation"],b=(0,i().useMemo)(()=>v,v);g?.reportNamespaces?.addUsedNamespaces?.(b);const x=(0,i().useRef)(0),S=(0,i().useCallback)(e=>{if(!g)return h;const{bindI18n:t,bindI18nStore:s}=d,i=()=>
2{x.current+=1,e()};return t&&g.on(t,i),s&&g.store.on(s,i),()=>{t&&t.split(" ").forEach(e=>g.off(e,i)),s&&s.split(" ").forEach(e=>g.store.off(e,i))}},[g,d]),k=(0,i().useRef)(),L=(0,i().useCallback)(()=>{if(!g)return u;const e=!(!g.isInitialized&&!g.initializedStoreOnce)&&b.every(e=>(0,c.NM)(e,g,d)),s=t.lng||g.language,i=x.current,n=k.current;if(n&&n.ready===e&&n.lng===s&&n.keyPrefix===m&&n.revision===i)return n;const o={t:g.getFixedT(s,"fallback"===d.nsMode?b:b[0],m,{scopeNs:b}),ready:e,lng:s,keyPrefix:m,revision:i};return k.current=o,o},[g,b,m,d,t.lng]),[w,O]=(0,i().useState)(0),{t:$,ready:N}=(0,n().useSyncExternalStore)(S,L,L);(0,i().useEffect)(()=>{if(g&&!N&&!f){const e=()=>O(e=>e+1);t.lng?(0,c.GA)(g,t.lng,b,e):(0,c.dM)(g,b,e)}},[g,t.lng,b,N,f,w]);const C=g||{},R=(0,i().useRef)(null),P=(0,i().useRef)(),j=e=>{const t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;const s=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(s,"__original"))try{Object.defineProperty(s,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return s},E=(0,i().useMemo)(()=>{const e=C,t=e?.language;let s=e;e&&(R.current&&R.current.__original===e?P.current!==t?(s=j(e),R.current=s,P.current=t):s=R.current:(s=j(e),R.current=s,P.current=t));const i=N||f?$:(...e)=>((0,c.mc)(g,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),$(...e)),n=[i,s,N];return n.t=i,n.i18n=s,n.ready=N,n},[$,C,N,C.resolvedLanguage,C.language,C.languages]);if(g&&f&&!N){let e=!1;try{e=!1}catch(e){}throw e&&(0,c.mc)(g,"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(e=>{const s=()=>e();t.lng?(0,c.GA)(g,t.lng,b,s):(0,c.dM)(g,b,s)})}return E}},2018(e,t,s){const i=(e,t,s,i)=>{const n=[s,{code:t,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(n,"warn","react-i18next::",!0);l(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...n):console?.warn&&console.warn(...n)},n={},o=(e,t,s,o)=>{l(s)&&n[s]||(l(s)&&(n[s]=new Date),i(e,t,s,o))},r=(e,t)=>()=>{if(e.isInitialized)t();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},a=(e,t,s)=>{e.loadNamespaces(t,r(e,s))},l=e=>"string"==typeof e;s.d(t,["GA",0,(e,t,s,i)=>{if(l(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return a(e,s,i);s.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,r(e,i))},"Gv",0,e=>"object"==typeof e&&null!==e,"Kg",0,l,"NM",0,(e,t,s={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:s.lng,precheck:(t,i)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e))return!1}}):(o(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0),"R8",0,i,"dM",0,a,"mc",0,o])}}]);
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.