(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[965],{27648:function(e,t,s){"use strict";s.d(t,{default:function(){return r.a}});var i=s(72972),r=s.n(i)},48049:function(e,t,s){"use strict";var i=s(14397);function r(){}function n(){}n.resetWarningCache=r,e.exports=function(){function e(e,t,s,r,n,o){if(o!==i){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:r};return s.PropTypes=s,s}},40718:function(e,t,s){e.exports=s(48049)()},14397:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},69917:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},1119:function(e,t,s){"use strict";function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=1?e.alternateFetch:void 0;try{g(t,a,i,l)}catch(e){if(!n||0===Object.keys(n).length||!e.message||0>e.message.indexOf("not implemented"))return i(e);try{Object.keys(n).forEach(function(e){delete a[e]}),g(t,a,i,l),f=!0}catch(e){i(e)}}},m=function(e,t,s,i){s&&"object"===a(s)&&(s=d("",s).slice(1)),e.queryStringParams&&(t=d(t,e.queryStringParams));try{var r=p?new p:new c("MSXML2.XMLHTTP.3.0");r.open(s?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,s&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var n=e.customHeaders;if(n="function"==typeof n?n():n)for(var o in n)r.setRequestHeader(o,n[o]);r.onreadystatechange=function(){r.readyState>3&&i(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(s)}catch(e){console&&console.log(e)}},b=function(e,t,s,i){return("function"==typeof s&&(i=s,s=void 0),i=i||function(){},h&&0!==t.indexOf("file:"))?y(e,t,s,i):r()||"function"==typeof ActiveXObject?m(e,t,s,i):void i(Error("No fetch and no xhr implementation found!"))};function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,i)}return s}function O(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.services=t,this.options=s,this.allOptions=i,this.type="backend",this.init(t,s,i)},u=[{key:"init",value:function(e){var t=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=O(O(O({},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,s){return S({},t,s||"")},parseLoadPayload:function(e,t){},request:b,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.options||{}),s),this.allOptions=i,this.services&&this.options.reloadInterval){var r=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===v(r)&&"function"==typeof r.unref&&r.unref()}}},{key:"readMulti",value:function(e,t,s){this._readAny(e,e,t,t,s)}},{key:"read",value:function(e,t,s){this._readAny([e],e,[t],t,s)}},{key:"_readAny",value:function(e,t,s,i,r){var n,o,a=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,s)),(l=(o=n=l)&&"function"==typeof o.then?n:Promise.resolve(n)).then(function(n){if(!n)return r(null,{});var o=a.services.interpolator.interpolate(n,{lng:e.join("+"),ns:s.join("+")});a.loadUrl(o,r,t,i)})}},{key:"loadUrl",value:function(e,t,s,i){var r=this,n=this.options.parseLoadPayload("string"==typeof s?[s]:s,"string"==typeof i?[i]:i);this.options.request(this.options,e,n,function(n,o){if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+e+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+e+"; status code: "+o.status,!1);if(!o&&n&&n.message){var a,l,u=n.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return u.indexOf(e)>-1}))return t("failed loading "+e+": "+n.message,!0)}if(n)return t(n,!1);try{a="string"==typeof o.data?r.options.parse(o.data,s,i):o.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,a)})}},{key:"create",value:function(e,t,s,i,r){var n=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,s,i),a=0,l=[],u=[];e.forEach(function(s){var i=n.options.addPath;"function"==typeof n.options.addPath&&(i=n.options.addPath(s,t));var p=n.services.interpolator.interpolate(i,{lng:s,ns:t});n.options.request(n.options,p,o,function(t,s){a+=1,l.push(t),u.push(s),a===e.length&&"function"==typeof r&&r(l,u)})})}}},{key:"reload",value:function(){var e=this,t=this.services,s=t.backendConnector,i=t.languageUtils,r=t.logger,n=s.language;if(!n||"cimode"!==n.toLowerCase()){var o=[],a=function(e){i.toResolveHierarchy(e).forEach(function(e){0>o.indexOf(e)&&o.push(e)})};a(n),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){s.read(t,e,"read",null,null,function(i,n){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&n&&r.log("loaded namespace ".concat(e," for language ").concat(t),n),s.loaded("".concat(t,"|").concat(e),i,n)})})})}}}],function(e,t){for(var s=0;s"string"==typeof e,r=()=>{let e,t;let s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},n=e=>null==e?"":""+e,o=(e,t,s)=>{e.forEach(e=>{t[e]&&(s[e]=t[e])})},a=/###/g,l=e=>e&&e.indexOf("###")>-1?e.replace(a,"."):e,u=e=>!e||i(e),p=(e,t,s)=>{let r=i(t)?t.split("."):t,n=0;for(;n{let{obj:i,k:r}=p(e,t,Object);if(void 0!==i||1===t.length){i[r]=s;return}let n=t[t.length-1],o=t.slice(0,t.length-1),a=p(e,o,Object);for(;void 0===a.obj&&o.length;)n=`${o[o.length-1]}.${n}`,a=p(e,o=o.slice(0,o.length-1),Object),a?.obj&&void 0!==a.obj[`${a.k}.${n}`]&&(a.obj=void 0);a.obj[`${a.k}.${n}`]=s},h=(e,t,s,i)=>{let{obj:r,k:n}=p(e,t,Object);r[n]=r[n]||[],r[n].push(s)},d=(e,t)=>{let{obj:s,k:i}=p(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},g=(e,t,s)=>{let i=d(e,s);return void 0!==i?i:d(t,s)},f=(e,t,s)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?i(e[r])||e[r]instanceof String||i(t[r])||t[r]instanceof String?s&&(e[r]=t[r]):f(e[r],t[r],s):e[r]=t[r]);return e},y=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var m={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let b=e=>i(e)?e.replace(/[&<>"'\/]/g,e=>m[e]):e;class v{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let 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}}let x=[" ",",","?","!",";"],O=new v(20),S=(e,t,s)=>{t=t||"",s=s||"";let i=x.filter(e=>0>t.indexOf(e)&&0>s.indexOf(e));if(0===i.length)return!0;let r=O.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),n=!r.test(e);if(!n){let t=e.indexOf(s);t>0&&!r.test(e.substring(0,t))&&(n=!0)}return n},k=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let i=t.split(s),r=e;for(let e=0;e-1&&oe?.replace("_","-"),L={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 P{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||L,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,r){return r&&!this.debug?null:(i(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new P(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new P(this.logger,e)}}var j=new P;class R{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let s=this.observers[e].get(t)||0;this.observers[e].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(([e,s])=>{for(let i=0;i{for(let r=0;rthis.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,r={}){let n;let o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?n=e.split("."):(n=[e,t],s&&(Array.isArray(s)?n.push(...s):i(s)&&o?n.push(...s.split(o)):n.push(s)));let l=d(this.data,n);return(!l&&!t&&!s&&e.indexOf(".")>-1&&(e=n[0],t=n[1],s=n.slice(2).join(".")),!l&&a&&i(s))?k(this.data?.[e]?.[t],s,o):l}addResource(e,t,s,i,r={silent:!1}){let n=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];s&&(o=o.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),c(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,r={silent:!1}){for(let r in s)(i(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});r.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r,n={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let a=d(this.data,o)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?f(a,s,r):a={...a,...s},c(this.data,o,a),n.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){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var N={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,r){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,r)??t}),t}};let $={},E=e=>!i(e)&&"boolean"!=typeof e&&"number"!=typeof e;class T extends R{constructor(e,t={}){super(),o(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=j.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let s={...t};if(null==e)return!1;let i=this.resolve(e,s);return i?.res!==void 0}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,n=t.ns||this.options.defaultNS||[],o=s&&e.indexOf(s)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!S(e,s,r);if(o&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i(n)?[n]:n};let o=e.split(s);(s!==r||s===r&&this.options.ns.indexOf(o[0])>-1)&&(n=o.shift()),e=o.join(r)}return{key:e,namespaces:i(n)?[n]:n}}translate(e,t,s){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof options&&(r={...r}),r||(r={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let n=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],r),u=l[l.length-1],p=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===p&&(p=":");let c=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return h?n?{res:`${u}${p}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${p}${a}`:n?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:a;let d=this.resolve(e,r),g=d?.res,f=d?.usedKey||a,y=d?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!i(r.count),x=T.hasDefaultValue(r),O=v?this.pluralResolver.getSuffix(c,r.count,r):"",S=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",k=v&&!r.ordinal&&0===r.count,w=k&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${O}`]||r[`defaultValue${S}`]||r.defaultValue,L=g;b&&!g&&x&&(L=w);let P=E(L),j=Object.prototype.toString.apply(L);if(b&&L&&P&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(j)&&!(i(m)&&Array.isArray(L))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,L,{...r,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return n?(d.res=e,d.usedParams=this.getUsedParamsDetails(r),d):e}if(o){let e=Array.isArray(L),t=e?[]:{},s=e?y:f;for(let e in L)if(Object.prototype.hasOwnProperty.call(L,e)){let i=`${s}${o}${e}`;x&&!g?t[e]=this.translate(i,{...r,defaultValue:E(w)?w[e]:void 0,joinArrays:!1,ns:l}):t[e]=this.translate(i,{...r,joinArrays:!1,ns:l}),t[e]===i&&(t[e]=L[e])}g=t}}else if(b&&i(m)&&Array.isArray(g))(g=g.join(m))&&(g=this.extendTranslation(g,e,r,s));else{let t=!1,i=!1;!this.isValidLookup(g)&&x&&(t=!0,g=w),this.isValidLookup(g)||(i=!0,g=a);let n=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:g,l=x&&w!==g&&this.options.updateMissing;if(i||t||l){if(this.logger.log(l?"updateKey":"missingKey",c,u,a,l?w:g),o){let e=this.resolve(a,{...r,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=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s{let i=x&&s!==g?s:n;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,i,l,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,i,l,r),this.emit("missingKey",e,u,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);k&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],a+t,r[`defaultValue${t}`]||w)})}):s(e,a,w))}g=this.extendTranslation(g,e,r,d,s),i&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${u}${p}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${p}${a}`:a,t?g:void 0,r))}return n?(d.res=g,d.usedParams=this.getUsedParamsDetails(r),d):g}extendTranslation(e,t,s,r,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!s.skipInterpolation){let o;s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});let a=i(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);o=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||r.usedLng,s),a){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(s.nest=!1)}!s.lng&&r&&r.res&&(s.lng=this.language||r.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,(...e)=>n?.[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()}let o=s.postProcess||this.options.postProcess,a=i(o)?[o]:o;return null!=e&&a?.length&&!1!==s.applyPostProcessor&&(e=N.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,r,n,o,a;return i(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(s))return;let l=this.extractFromKey(e,t),u=l.key;r=u;let p=l.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));let c=void 0!==t.count&&!i(t.count),h=c&&!t.ordinal&&0===t.count,d=void 0!==t.context&&(i(t.context)||"number"==typeof t.context)&&""!==t.context,g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(e=>{this.isValidLookup(s)||(a=e,!$[`${g[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&($[`${g[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${g.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!!!")),g.forEach(i=>{let r;if(this.isValidLookup(s))return;o=i;let a=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,u,i,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(i,t.count,t));let s=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(a.push(u+e),t.ordinal&&0===e.indexOf(r)&&a.push(u+e.replace(r,this.options.pluralSeparator)),h&&a.push(u+s)),d){let i=`${u}${this.options.contextSeparator}${t.context}`;a.push(i),c&&(a.push(i+e),t.ordinal&&0===e.indexOf(r)&&a.push(i+e.replace(r,this.options.pluralSeparator)),h&&a.push(i+s))}}for(;r=a.pop();)this.isValidLookup(s)||(n=r,s=this.getResource(i,e,r,t))}))})}),{res:s,usedKey:r,exactUsedKey:n,usedLng:o,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={}){let t=e.replace&&!i(e.replace),s=t?e.replace:e;if(t&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!t)for(let e of(s={...s},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete s[e];return s}static hasDefaultValue(e){let t="defaultValue";for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&void 0!==e[s])return!0;return!1}}class I{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=j.create("languageUtils")}getScriptPartFromCode(e){if(!(e=w(e))||0>e.indexOf("-"))return null;let 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=w(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(i(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?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.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let s=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;let i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>{if(e===i||!(0>e.indexOf("-")&&0>i.indexOf("-"))&&(e.indexOf("-")>0&&0>i.indexOf("-")&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}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){let s=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],n=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return i(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(e))):i(e)&&n(this.formatLanguageCode(e)),s.forEach(e=>{0>r.indexOf(e)&&n(this.formatLanguageCode(e))}),r}}let F={zero:0,one:1,two:2,few:3,many:4,other:5},D={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class V{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=j.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let s;let i=w("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:r});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];try{s=new Intl.PluralRules(i,{type:r})}catch(r){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),D;if(!e.match(/-|_/))return D;let i=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(i,t)}return this.pluralRulesCache[n]=s,s}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)=>F[e]-F[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){let 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))}}let A=(e,t,s,r=".",n=!0)=>{let o=g(e,t,s);return!o&&n&&i(s)&&void 0===(o=k(e,s,r))&&(o=k(t,s,r)),o},M=e=>e.replace(/\$/g,"$$$$");class H{constructor(e={}){this.logger=j.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:r,prefixEscaped:n,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:c,nestingPrefixEscaped:h,nestingSuffix:d,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:b,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=r?y(r):n||"{{",this.suffix=o?y(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=c?y(c):h||y("$t("),this.nestingSuffix=d?y(d):g||y(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):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,r){let o,a,l;let u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=e=>{if(0>e.indexOf(this.formatSeparator)){let i=A(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,s,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),n=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(A(t,u,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,s,{...r,...t,interpolationkey:n})};this.resetRegExp();let c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>M(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?M(this.escape(e)):M(e)}].forEach(t=>{for(l=0;o=t.regex.exec(e);){let s=o[1].trim();if(void 0===(a=p(s))){if("function"==typeof c){let t=c(e,o,r);a=i(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,s))a="";else if(h){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),a=""}else i(a)||this.useRawValueToEscape||(a=n(a));let u=t.safeValue(a);if(e=e.replace(o[0],u),h?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++l>=this.maxReplaces)break}}),e}nest(e,t,s={}){let r,o,a;let l=(e,t)=>{let s=this.nestingOptionsSeparator;if(0>e.indexOf(s))return e;let i=e.split(RegExp(`${s}[ ]*{`)),r=`{${i[1]}`;e=i[0];let n=(r=this.interpolate(r,a)).match(/'/g),o=r.match(/"/g);((n?.length??0)%2!=0||o)&&o.length%2==0||(r=r.replace(/'/g,'"'));try{a=JSON.parse(r),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${r}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let u=[];(a=(a={...s}).replace&&!i(a.replace)?a.replace:a).applyPostProcessor=!1,delete a.defaultValue;let p=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){let e=r[1].split(this.formatSeparator).map(e=>e.trim());r[1]=e.shift(),u=e,p=!0}if((o=t(l.call(this,r[1].trim(),a),a))&&r[0]===e&&!i(o))return o;i(o)||(o=n(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),p&&(o=u.reduce((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}let U=e=>{let t=e.toLowerCase().trim(),s={};if(e.indexOf("(")>-1){let i=e.split("(");t=i[0].toLowerCase().trim();let r=i[1].substring(0,i[1].length-1);"currency"===t&&0>r.indexOf(":")?s.currency||(s.currency=r.trim()):"relativetime"===t&&0>r.indexOf(":")?s.range||(s.range=r.trim()):r.split(";").forEach(e=>{if(e){let[t,...i]=e.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,""),n=t.trim();s[n]||(s[n]=r),"false"===r&&(s[n]=!1),"true"===r&&(s[n]=!0),isNaN(r)||(s[n]=parseInt(r,10))}})}return{formatName:t,formatOptions:s}},q=e=>{let t={};return(s,i,r)=>{let n=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(n={...n,[r.interpolationkey]:void 0});let o=i+JSON.stringify(n),a=t[o];return a||(a=e(w(i),r),t[o]=a),a(s)}},_=e=>(t,s,i)=>e(w(s),i)(t);class K{constructor(e={}){this.logger=j.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let s=t.cacheInBuiltFormats?q:_;this.formats={number:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{let s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{let s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{let s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{let 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()]=q(t)}format(e,t,s,i={}){let r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&0>r[0].indexOf(")")&&r.find(e=>e.indexOf(")")>-1)){let e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{let{formatName:r,formatOptions:n}=U(t);if(this.formats[r]){let t=e;try{let o=i?.formatParams?.[i.interpolationkey]||{},a=o.locale||o.lng||i.locale||i.lng||s;t=this.formats[r](e,a,{...n,...i,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}let z=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class B extends R{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=j.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){let r={},n={},o={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{let o=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===n[o]&&(n[o]=!0):(this.state[o]=1,i=!1,void 0===n[o]&&(n[o]=!0),void 0===r[o]&&(r[o]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(o[e]=!0)}),(Object.keys(r).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(n),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,s){let i=e.split("|"),r=i[0],n=i[1];t&&this.emit("failedLoading",r,n,t),!t&&s&&this.store.addResourceBundle(r,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);let o={};this.queue.forEach(s=>{h(s.loaded,[r],n),z(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{o[e]||(o[e]={});let t=s.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,r=this.retryTimeout,n){if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:n});return}this.readingCalls++;let o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&a&&i{this.read.call(this,e,t,s,i+1,2*r,n)},r);return}n(o,a)},a=this.backend[s].bind(this.backend);if(2===a.length){try{let s=a(e,t);s&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}return}return a(e,t,o)}prepareLoading(e,t,s={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();i(e)&&(e=this.languageUtils.toResolveHierarchy(e)),i(t)&&(t=[t]);let n=this.queueLoad(e,t,s,r);if(!n.toLoad.length)return n.pending.length||r(),null;n.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=""){let s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(s,n)=>{s&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,n),this.loaded(e,s,n)})}saveMissing(e,t,s,i,r,n={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){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!!!");return}if(null!=s&&""!==s){if(this.backend?.create){let a={...n,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,s,i,a):l(e,t,s,i))&&"function"==typeof r.then?r.then(e=>o(null,e)).catch(o):o(null,r)}catch(e){o(e)}else l(e,t,s,i,o,a)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}}let 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: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]){let s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),J=e=>(i(e.ns)&&(e.ns=[e.ns]),i(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),i(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),W=()=>{},G=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})};class Y extends R{constructor(e={},t){if(super(),this.options=J(e),this.services={},this.logger=j,this.modules={external:[]},G(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,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(i(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let s=X();this.options={...s,...this.options,...J(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);let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?j.init(n(this.modules.logger),this.options):j.init(null,this.options),e=this.modules.formatter?this.modules.formatter:K;let t=new I(this.options);this.store=new C(this.options.resources,this.options);let i=this.services;i.logger=j,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new V(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),e&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(i.formatter=n(e),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new H(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new B(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=n(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new T(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=W),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let 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)});let o=r(),a=()=>{let 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),o.resolve(s),t(e,s)};if(this.languages&&!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),o}loadResources(e,t=W){let s=t,r=i(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return s();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):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){let i=r();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=W),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&N.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"].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let s=r();this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(i,r)=>{r?this.isLanguageChangingTo===e&&(n(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):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=[]);let s=i(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(i(t)?[t]:t);r&&(this.language||n(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,e=>{o(e,r)})};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){let r=(e,t,...i)=>{let n,o;(n="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t}).lng=n.lng||r.lng,n.lngs=n.lngs||r.lngs,n.ns=n.ns||r.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||s||r.keyPrefix);let a=this.options.keySeparator||".";return o=n.keyPrefix&&Array.isArray(e)?e.map(e=>`${n.keyPrefix}${a}${e}`):n.keyPrefix?`${n.keyPrefix}${a}${e}`:e,this.t(o,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;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;let n=(e,t)=>{let s=this.services.backendConnector.state[`${e}|${t}`];return -1===s||0===s||2===s};if(t.precheck){let e=t.precheck(this,n);if(void 0!==e)return e}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||n(s,e)&&(!i||n(r,e)))}loadNamespaces(e,t){let s=r();return this.options.ns?(i(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){let s=r();i(e)&&(e=[e]);let n=this.options.preload||[],o=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){return(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),e)?["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"].indexOf((this.services?.languageUtils||new I(X())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}static createInstance(e={},t){return new Y(e,t)}cloneInstance(e={},t=W){let s=e.forkResourceStore;s&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},r=new Y(i);if((void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s){let 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),{});r.store=new C(e,i),r.services.resourceStore=r.store}return r.translator=new T(r.services,i),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let Q=Y.createInstance();Q.createInstance=Y.createInstance,Q.createInstance,Q.dir,Q.init,Q.loadResources,Q.reloadResources,Q.use,Q.changeLanguage,Q.getFixedT,Q.t,Q.exists,Q.setDefaultNamespace,Q.hasLoadedNamespace,Q.loadNamespaces,Q.loadLanguages},43949:function(e,t,s){"use strict";let i;s.d(t,{Db:function(){return S},$G:function(){return R}});var r=s(2265);s(69917),Object.create(null);let n=(e,t,s,i)=>{let r=[s,{code:t,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);h(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},o={},a=(e,t,s,i)=>{h(s)&&o[s]||(h(s)&&(o[s]=new Date),n(e,t,s,i))},l=(e,t)=>()=>{if(e.isInitialized)t();else{let s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},u=(e,t,s)=>{e.loadNamespaces(t,l(e,s))},p=(e,t,s,i)=>{if(h(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return u(e,s,i);s.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,l(e,i))},c=(e,t,s={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:s.lng,precheck:(t,i)=>{if(s.bindI18n?.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e))return!1}}):(a(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0),h=e=>"string"==typeof e,d=e=>"object"==typeof e&&null!==e,g=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,f={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xa9","©":"\xa9","®":"\xae","®":"\xae","…":"…","…":"…","/":"/","/":"/"},y=e=>f[e],m={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(g,y)},b=(e={})=>{m={...m,...e}},v=()=>m,x=e=>{i=e},O=()=>i,S={type:"3rdParty",init(e){b(e.options.react),x(e)}},k=(0,r.createContext)();class w{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}let L=(e,t)=>{let s=(0,r.useRef)();return(0,r.useEffect)(()=>{s.current=t?s.current:e},[e,t]),s.current},P=(e,t,s,i)=>e.getFixedT(t,s,i),j=(e,t,s,i)=>(0,r.useCallback)(P(e,t,s,i),[e,t,s,i]),R=(e,t={})=>{let{i18n:s}=t,{i18n:i,defaultNS:n}=(0,r.useContext)(k)||{},o=s||i||O();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new w),!o){a(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");let e=(e,t)=>h(t)?t:d(t)&&h(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}o.options.react?.wait&&a(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");let l={...v(),...o.options.react,...t},{useSuspense:g,keyPrefix:f}=l,y=e||n||o.options?.defaultNS;y=h(y)?[y]:y||["translation"],o.reportNamespaces.addUsedNamespaces?.(y);let m=(o.isInitialized||o.initializedStoreOnce)&&y.every(e=>c(e,o,l)),b=j(o,t.lng||null,"fallback"===l.nsMode?y:y[0],f),x=()=>b,S=()=>P(o,t.lng||null,"fallback"===l.nsMode?y:y[0],f),[R,C]=(0,r.useState)(x),N=y.join();t.lng&&(N=`${t.lng}${N}`);let $=L(N),E=(0,r.useRef)(!0);(0,r.useEffect)(()=>{let{bindI18n:e,bindI18nStore:s}=l;E.current=!0,m||g||(t.lng?p(o,t.lng,y,()=>{E.current&&C(S)}):u(o,y,()=>{E.current&&C(S)})),m&&$&&$!==N&&E.current&&C(S);let i=()=>{E.current&&C(S)};return e&&o?.on(e,i),s&&o?.store.on(s,i),()=>{E.current=!1,o&&e?.split(" ").forEach(e=>o.off(e,i)),s&&o&&s.split(" ").forEach(e=>o.store.off(e,i))}},[o,N]),(0,r.useEffect)(()=>{E.current&&m&&C(x)},[o,f,m]);let T=[R,o,m];if(T.t=R,T.i18n=o,T.ready=m,m||!m&&!g)return T;throw new Promise(e=>{t.lng?p(o,t.lng,y,()=>e()):u(o,y,()=>e())})}}}]);