3 lines
77 KiB
JavaScript
3 lines
77 KiB
JavaScript
var Ze=Object.defineProperty;var et=(r,e,t)=>e in r?Ze(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var be=(r,e,t)=>et(r,typeof e!="symbol"?e+"":e,t);import{r as B,d as G,e as tt}from"./react-DXd9vB-a.js";function nt(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const rt=(...r)=>{console!=null&&console.warn&&(V(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),console.warn(...r))},ve={},de=(...r)=>{V(r[0])&&ve[r[0]]||(V(r[0])&&(ve[r[0]]=new Date),rt(...r))},Ve=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},we=(r,e,t)=>{r.loadNamespaces(e,Ve(r,t))},xe=(r,e,t,n)=>{V(t)&&(t=[t]),t.forEach(i=>{r.options.ns.indexOf(i)<0&&r.options.ns.push(i)}),r.loadLanguages(e,Ve(r,n))},it=(r,e,t={})=>!e.languages||!e.languages.length?(de("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(n,i)=>{var s;if(((s=t.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,r))return!1}}),V=r=>typeof r=="string",st=r=>typeof r=="object"&&r!==null,ot=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,at={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ut=r=>at[r],lt=r=>r.replace(ot,ut);let he={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:lt};const ft=(r={})=>{he={...he,...r}},ct=()=>he;let qe;const dt=r=>{qe=r},ht=()=>qe,wn={type:"3rdParty",init(r){ft(r.options.react),dt(r)}},pt=B.createContext();class gt{constructor(){be(this,"getUsedNamespaces",()=>Object.keys(this.usedNamespaces));this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{var n;(n=this.usedNamespaces)[t]??(n[t]=!0)})}}const mt=(r,e)=>{const t=B.useRef();return B.useEffect(()=>{t.current=r},[r,e]),t.current},Ke=(r,e,t,n)=>r.getFixedT(e,t,n),yt=(r,e,t,n)=>B.useCallback(Ke(r,e,t,n),[r,e,t,n]),xn=(r,e={})=>{var P,N,A,R;const{i18n:t}=e,{i18n:n,defaultNS:i}=B.useContext(pt)||{},s=t||n||ht();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new gt),!s){de("You will need to pass in an i18next instance by using initReactI18next");const E=(j,k)=>V(k)?k:st(k)&&V(k.defaultValue)?k.defaultValue:Array.isArray(j)?j[j.length-1]:j,C=[E,{},!1];return C.t=E,C.i18n={},C.ready=!1,C}(P=s.options.react)!=null&&P.wait&&de("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...ct(),...s.options.react,...e},{useSuspense:a,keyPrefix:u}=o;let f=i||((N=s.options)==null?void 0:N.defaultNS);f=V(f)?[f]:f||["translation"],(R=(A=s.reportNamespaces).addUsedNamespaces)==null||R.call(A,f);const d=(s.isInitialized||s.initializedStoreOnce)&&f.every(E=>it(E,s,o)),h=yt(s,e.lng||null,o.nsMode==="fallback"?f:f[0],u),c=()=>h,g=()=>Ke(s,e.lng||null,o.nsMode==="fallback"?f:f[0],u),[m,y]=B.useState(c);let w=f.join();e.lng&&(w=`${e.lng}${w}`);const L=mt(w),O=B.useRef(!0);B.useEffect(()=>{const{bindI18n:E,bindI18nStore:C}=o;O.current=!0,!d&&!a&&(e.lng?xe(s,e.lng,f,()=>{O.current&&y(g)}):we(s,f,()=>{O.current&&y(g)})),d&&L&&L!==w&&O.current&&y(g);const j=()=>{O.current&&y(g)};return E&&(s==null||s.on(E,j)),C&&(s==null||s.store.on(C,j)),()=>{O.current=!1,s&&(E==null||E.split(" ").forEach(k=>s.off(k,j))),C&&s&&C.split(" ").forEach(k=>s.store.off(k,j))}},[s,w]),B.useEffect(()=>{O.current&&d&&y(c)},[s,u,d]);const $=[m,s,d];if($.t=m,$.i18n=s,$.ready=d,d||!d&&!a)return $;throw new Promise(E=>{e.lng?xe(s,e.lng,f,()=>E()):we(s,f,()=>E())})},bt={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console&&console[r]&&console[r].apply(console,e)}};class re{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||bt,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new re(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new re(this.logger,e)}}var I=new re;class ue{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,u]=o;for(let f=0;f<u;f++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,u]=o;for(let f=0;f<u;f++)a.apply(a,[e,...n])})}}function J(){let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t}function Se(r){return r==null?"":""+r}function vt(r,e,t){r.forEach(n=>{e[n]&&(t[n]=e[n])})}const wt=/###/g;function Q(r,e,t){function n(a){return a&&a.indexOf("###")>-1?a.replace(wt,"."):a}function i(){return!r||typeof r=="string"}const s=typeof e!="string"?e:e.split(".");let o=0;for(;o<s.length-1;){if(i())return{};const a=n(s[o]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++o}return i()?{}:{obj:r,k:n(s[o])}}function Oe(r,e,t){const{obj:n,k:i}=Q(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let s=e[e.length-1],o=e.slice(0,e.length-1),a=Q(r,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Q(r,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=t}function xt(r,e,t,n){const{obj:i,k:s}=Q(r,e,Object);i[s]=i[s]||[],i[s].push(t)}function ie(r,e){const{obj:t,k:n}=Q(r,e);if(t)return t[n]}function St(r,e,t){const n=ie(r,t);return n!==void 0?n:ie(e,t)}function _e(r,e,t){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?typeof r[n]=="string"||r[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(r[n]=e[n]):_e(r[n],e[n],t):r[n]=e[n]);return r}function K(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Ot={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Pt(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,e=>Ot[e]):r}class Lt{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const Rt=[" ",",","?","!",";"],Et=new Lt(20);function Ct(r,e,t){e=e||"",t=t||"";const n=Rt.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const i=Et.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(r);if(!s){const o=r.indexOf(t);o>0&&!i.test(r.substring(0,o))&&(s=!0)}return s}function pe(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return r[e];const n=e.split(t);let i=r;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let o,a="";for(let u=s;u<n.length;++u)if(u!==s&&(a+=t),a+=n[u],o=i[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;s+=u-s+1;break}i=o}return i}function se(r){return r&&r.indexOf("_")>0?r.replace("_","-"):r}class Pe extends ue{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&s?a.push(...n.split(s)):a.push(n)));const u=ie(this.data,a);return!u&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),u||!o||typeof n!="string"?u:pe(this.data&&this.data[e]&&this.data[e][t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),Oe(this.data,a,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(typeof n[s]=="string"||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let u=ie(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?_e(u,n,s):u={...u,...n},Oe(this.data,a,u),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var ze={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,t,n,i))}),e}};const Le={};class oe extends ue{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),vt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=I.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ct(e,n,i);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:s};const f=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(f[0])>-1)&&(s=f.shift()),e=f.join(i)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],f=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(d){const P=t.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${P}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${P}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const h=this.resolve(e,t);let c=h&&h.res;const g=h&&h.usedKey||o,m=h&&h.exactUsedKey||o,y=Object.prototype.toString.apply(c),w=["[object Number]","[object Function]","[object RegExp]"],L=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject;if(O&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&w.indexOf(y)<0&&!(typeof L=="string"&&Array.isArray(c))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,c,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=P,h.usedParams=this.getUsedParamsDetails(t),h):P}if(s){const P=Array.isArray(c),N=P?[]:{},A=P?m:g;for(const R in c)if(Object.prototype.hasOwnProperty.call(c,R)){const E=`${A}${s}${R}`;N[R]=this.translate(E,{...t,joinArrays:!1,ns:a}),N[R]===E&&(N[R]=c[R])}c=N}}else if(O&&typeof L=="string"&&Array.isArray(c))c=c.join(L),c&&(c=this.extendTranslation(c,e,t,n));else{let P=!1,N=!1;const A=t.count!==void 0&&typeof t.count!="string",R=oe.hasDefaultValue(t),E=A?this.pluralResolver.getSuffix(f,t.count,t):"",C=t.ordinal&&A?this.pluralResolver.getSuffix(f,t.count,{ordinal:!1}):"",j=A&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),k=j&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${E}`]||t[`defaultValue${C}`]||t.defaultValue;!this.isValidLookup(c)&&R&&(P=!0,c=k),this.isValidLookup(c)||(N=!0,c=o);const le=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:c,U=R&&k!==c&&this.options.updateMissing;if(N||P||U){if(this.logger.log(U?"updateKey":"missingKey",f,u,o,U?k:c),s){const v=this.resolve(o,{...t,keySeparator:!1});v&&v.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 l=[];const p=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&p&&p[0])for(let v=0;v<p.length;v++)l.push(p[v]);else this.options.saveMissingTo==="all"?l=this.languageUtils.toResolveHierarchy(t.lng||this.language):l.push(t.lng||this.language);const b=(v,S,x)=>{const H=R&&x!==c?x:le;this.options.missingKeyHandler?this.options.missingKeyHandler(v,u,S,H,U,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(v,u,S,H,U,t),this.emit("missingKey",v,u,S,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?l.forEach(v=>{const S=this.pluralResolver.getSuffixes(v,t);j&&t[`defaultValue${this.options.pluralSeparator}zero`]&&S.indexOf(`${this.options.pluralSeparator}zero`)<0&&S.push(`${this.options.pluralSeparator}zero`),S.forEach(x=>{b([v],o+x,t[`defaultValue${x}`]||k)})}):b(l,o,k))}c=this.extendTranslation(c,e,t,h,n),N&&c===o&&this.options.appendNamespaceToMissingKey&&(c=`${u}:${o}`),(N||P)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,P?c:void 0):c=this.options.parseMissingKeyHandler(c))}return i?(h.res=c,h.usedParams=this.getUsedParamsDetails(t),h):c}extendTranslation(e,t,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(f){const c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let h=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),f){const c=e.match(this.interpolator.nestingRegexp),g=c&&c.length;d<g&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,g=new Array(c),m=0;m<c;m++)g[m]=arguments[m];return s&&s[0]===g[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):o.translate(...g,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,u=typeof a=="string"?[a]:a;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=ze.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,a;return typeof e=="string"&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const f=this.extractFromKey(u,t),d=f.key;i=d;let h=f.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const c=t.count!==void 0&&typeof t.count!="string",g=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),m=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(w=>{this.isValidLookup(n)||(a=w,!Le[`${y[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Le[`${y[0]}-${w}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(L=>{if(this.isValidLookup(n))return;o=L;const O=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(O,d,L,w,t);else{let P;c&&(P=this.pluralResolver.getSuffix(L,t.count,t));const N=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(O.push(d+P),t.ordinal&&P.indexOf(A)===0&&O.push(d+P.replace(A,this.options.pluralSeparator)),g&&O.push(d+N)),m){const R=`${d}${this.options.contextSeparator}${t.context}`;O.push(R),c&&(O.push(R+P),t.ordinal&&P.indexOf(A)===0&&O.push(R+P.replace(A,this.options.pluralSeparator)),g&&O.push(R+N))}}let $;for(;$=O.pop();)this.isValidLookup(n)||(s=$,n=this.getResource(L,w,$,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}function fe(r){return r.charAt(0).toUpperCase()+r.slice(1)}class Re{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=I.create("languageUtils")}getScriptPartFromCode(e){if(e=se(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=se(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=fe(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=fe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=fe(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):typeof e=="string"&&s(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let Nt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],At={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}};const kt=["v1","v2","v3"],Tt=["v4"],Ee={zero:0,one:1,two:2,few:3,many:4,other:5};function jt(){const r={};return Nt.forEach(e=>{e.lngs.forEach(t=>{r[t]={numbers:e.nr,plurals:At[e.fc]}})}),r}class $t{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=I.create("pluralResolver"),(!this.options.compatibilityJSON||Tt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=jt()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(se(e==="dev"?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,s)=>Ee[i]-Ee[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!kt.includes(this.options.compatibilityJSON)}}function Ce(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=St(r,e,t);return!s&&i&&typeof t=="string"&&(s=pe(r,t,n),s===void 0&&(s=pe(e,t,n))),s}class Dt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=I.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:f,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:c,nestingPrefixEscaped:g,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:w,maxReplaces:L,alwaysFormat:O}=e.interpolation;this.escape=t!==void 0?t:Pt,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?K(s):o||"{{",this.suffix=a?K(a):u||"}}",this.formatSeparator=f||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=c?K(c):g||K("$t("),this.nestingSuffix=m?K(m):y||K(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=L||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t&&t.source===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,i){let s,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(m){return m.replace(/\$/g,"$$$$")}const d=m=>{if(m.indexOf(this.formatSeparator)<0){const O=Ce(t,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,n,{...i,...t,interpolationkey:m}):O}const y=m.split(this.formatSeparator),w=y.shift().trim(),L=y.join(this.formatSeparator).trim();return this.format(Ce(t,u,w,this.options.keySeparator,this.options.ignoreJSONStructure),L,n,{...i,...t,interpolationkey:w})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>f(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?f(this.escape(m)):f(m)}].forEach(m=>{for(a=0;s=m.regex.exec(e);){const y=s[1].trim();if(o=d(y),o===void 0)if(typeof h=="function"){const L=h(e,s,i);o=typeof L=="string"?L:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))o="";else if(c){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=Se(o));const w=m.safeValue(o);if(e=e.replace(s[0],w),c?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function a(u,f){const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp(`${d}[ ]*{`));let c=`{${h[1]}`;u=h[0],c=this.interpolate(c,o);const g=c.match(/'/g),m=c.match(/"/g);(g&&g.length%2===0&&!m||m.length%2!==0)&&(c=c.replace(/'/g,'"'));try{o=JSON.parse(c),f&&(o={...f,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,y),`${u}${d}${c}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u}for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let f=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=d.shift(),u=d,f=!0}if(s=t(a.call(this,i[1].trim(),o),o),s&&i[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=Se(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),f&&(s=u.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}function Ft(r){let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...u]=o.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();t[d]||(t[d]=f),f==="false"&&(t[d]=!1),f==="true"&&(t[d]=!0),isNaN(f)||(t[d]=parseInt(f,10))}})}return{formatName:e,formatOptions:t}}function _(r){const e={};return function(n,i,s){const o=i+JSON.stringify(s);let a=e[o];return a||(a=r(se(i),s),e[o]=a),a(n)}}class It{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=I.create("formatter"),this.options=e,this.formats={number:_((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:_((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:_((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:_((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:_((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((a,u)=>{const{formatName:f,formatOptions:d}=Ft(u);if(this.formats[f]){let h=a;try{const c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=c.locale||c.lng||i.locale||i.lng||n;h=this.formats[f](a,g,{...d,...i,...c})}catch(c){this.logger.warn(c)}return h}else this.logger.warn(`there was no format function for ${f}`);return a},e)}}function Ut(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}class Bt extends ue{constructor(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=I.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&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const s={},o={},a={},u={};return e.forEach(f=>{let d=!0;t.forEach(h=>{const c=`${f}|${h}`;!n.reload&&this.store.hasResourceBundle(f,h)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?o[c]===void 0&&(o[c]=!0):(this.state[c]=1,d=!1,o[c]===void 0&&(o[c]=!0),s[c]===void 0&&(s[c]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(a[f]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const i=e.split("|"),s=i[0],o=i[1];t&&this.emit("failedLoading",s,o,t),n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach(u=>{xt(u.loaded,[s],o),Ut(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{a[f]||(a[f]={});const d=u.loaded[f];d.length&&d.forEach(h=>{a[f][h]===void 0&&(a[f][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(f,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(f&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,s*2,o)},s);return}o(f,d)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const f=u(e,t);f&&typeof f.then=="function"?f.then(d=>a(null,d)).catch(a):a(null,f)}catch(f){a(f)}return}return u(e,t,a)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:s},f=this.backend.create.bind(this.backend);if(f.length<6)try{let d;f.length===5?d=f(e,t,n,i,u):d=f(e,t,n,i),d&&typeof d.then=="function"?d.then(h=>a(null,h)).catch(a):a(null,d)}catch(d){a(d)}else f(e,t,n,i,a,u)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}function Ne(){return{debug:!1,initImmediate:!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:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ae(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function te(){}function Mt(r){Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}class Y extends ue{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ae(e),this.services={},this.logger=I,this.modules={external:[]},Mt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Ne();this.options={...i,...this.options,...Ae(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function s(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?I.init(s(this.modules.logger),this.options):I.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=It);const h=new Re(this.options);this.store=new Pe(this.options.resources,this.options);const c=this.services;c.logger=I,c.resourceStore=this.store,c.languageUtils=h,c.pluralResolver=new $t(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Dt(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Bt(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(g){for(var m=arguments.length,y=new Array(m>1?m-1:0),w=1;w<m;w++)y[w-1]=arguments[w];e.emit(g,...y)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new oe(this.services,this.options),this.translator.on("*",function(g){for(var m=arguments.length,y=new Array(m>1?m-1:0),w=1;w<m;w++)y[w-1]=arguments[w];e.emit(g,...y)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=te),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=J(),f=()=>{const d=(h,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(c),n(h,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:te;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const i=J();return e||(e=this.languages),t||(t=this.options.ns),n||(n=te),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ze.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=J();this.emit("languageChanging",e);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,f)=>{f?(s(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(u,function(){return n.t(...arguments)})},a=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const f=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);f&&(this.language||s(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(f)),this.loadResources(f,d=>{o(d,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,n){var i=this;const s=function(o,a){let u;if(typeof a!="object"){for(var f=arguments.length,d=new Array(f>2?f-2:0),h=2;h<f;h++)d[h-2]=arguments[h];u=i.options.overloadTranslationOptionHandler([o,a].concat(d))}else u={...a};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||s.keyPrefix);const c=i.options.keySeparator||".";let g;return u.keyPrefix&&Array.isArray(o)?g=o.map(m=>`${u.keyPrefix}${c}${m}`):g=u.keyPrefix?`${u.keyPrefix}${c}${o}`:o,i.t(g,u)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const f=this.services.backendConnector.state[`${a}|${u}`];return f===-1||f===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(s,e)))}loadNamespaces(e,t){const n=J();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=J();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],s=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new Re(Ne());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Y(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:te;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new Y(i);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new Pe(this.store.data,i),s.services.resourceStore=s.store),s.translator=new oe(s.services,i),s.translator.on("*",function(a){for(var u=arguments.length,f=new Array(u>1?u-1:0),d=1;d<u;d++)f[d-1]=arguments[d];s.emit(a,...f)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const T=Y.createInstance();T.createInstance=Y.createInstance;T.createInstance;T.dir;T.init;T.loadResources;T.reloadResources;T.use;T.changeLanguage;T.getFixedT;const Sn=T.t;T.exists;T.setDefaultNamespace;T.hasLoadedNamespace;T.loadNamespaces;T.loadLanguages;const{slice:Ht,forEach:Vt}=[];function qt(r){return Vt.call(Ht.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const ke=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Kt=(r,e,t)=>{const n=t||{};n.path=n.path||"/";const i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!ke.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!ke.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},Te={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=Kt(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var _t={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return Te.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&Te.create(t,r,n,i,s)}},zt={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}};let X=null;const je=()=>{if(X!==null)return X;try{X=window!=="undefined"&&window.localStorage!==null;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{X=!1}return X};var Jt={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&je())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&je()&&window.localStorage.setItem(t,r)}};let W=null;const $e=()=>{if(W!==null)return W;try{W=window!=="undefined"&&window.sessionStorage!==null;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{W=!1}return W};var Xt={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&$e())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&$e()&&window.sessionStorage.setItem(t,r)}},Wt={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},Gt={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},Qt={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},Yt={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};function Zt(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}}class en{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=qt(t,this.options||{},Zt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(_t),this.addDetector(zt),this.addDetector(Jt),this.addDetector(Xt),this.addDetector(Wt),this.addDetector(Gt),this.addDetector(Qt),this.addDetector(Yt)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e,t){t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}en.type="languageDetector";function ge(r){"@babel/helpers - typeof";return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(r)}function Je(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":ge(XMLHttpRequest))==="object"}function tn(r){return!!r&&typeof r.then=="function"}function nn(r){return tn(r)?r:Promise.resolve(r)}function rn(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var me={exports:{}},ne={exports:{}},De;function sn(){return De||(De=1,function(r,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof G<"u"&&G,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function f(l){return l&&DataView.prototype.isPrototypeOf(l)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(l){return l&&d.indexOf(Object.prototype.toString.call(l))>-1};function c(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(l)||l==="")throw new TypeError('Invalid character in header field name: "'+l+'"');return l.toLowerCase()}function g(l){return typeof l!="string"&&(l=String(l)),l}function m(l){var p={next:function(){var b=l.shift();return{done:b===void 0,value:b}}};return u.iterable&&(p[Symbol.iterator]=function(){return p}),p}function y(l){this.map={},l instanceof y?l.forEach(function(p,b){this.append(b,p)},this):Array.isArray(l)?l.forEach(function(p){this.append(p[0],p[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(p){this.append(p,l[p])},this)}y.prototype.append=function(l,p){l=c(l),p=g(p);var b=this.map[l];this.map[l]=b?b+", "+p:p},y.prototype.delete=function(l){delete this.map[c(l)]},y.prototype.get=function(l){return l=c(l),this.has(l)?this.map[l]:null},y.prototype.has=function(l){return this.map.hasOwnProperty(c(l))},y.prototype.set=function(l,p){this.map[c(l)]=g(p)},y.prototype.forEach=function(l,p){for(var b in this.map)this.map.hasOwnProperty(b)&&l.call(p,this.map[b],b,this)},y.prototype.keys=function(){var l=[];return this.forEach(function(p,b){l.push(b)}),m(l)},y.prototype.values=function(){var l=[];return this.forEach(function(p){l.push(p)}),m(l)},y.prototype.entries=function(){var l=[];return this.forEach(function(p,b){l.push([b,p])}),m(l)},u.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function w(l){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}function L(l){return new Promise(function(p,b){l.onload=function(){p(l.result)},l.onerror=function(){b(l.error)}})}function O(l){var p=new FileReader,b=L(p);return p.readAsArrayBuffer(l),b}function $(l){var p=new FileReader,b=L(p);return p.readAsText(l),b}function P(l){for(var p=new Uint8Array(l),b=new Array(p.length),v=0;v<p.length;v++)b[v]=String.fromCharCode(p[v]);return b.join("")}function N(l){if(l.slice)return l.slice(0);var p=new Uint8Array(l.byteLength);return p.set(new Uint8Array(l)),p.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(l){this.bodyUsed=this.bodyUsed,this._bodyInit=l,l?typeof l=="string"?this._bodyText=l:u.blob&&Blob.prototype.isPrototypeOf(l)?this._bodyBlob=l:u.formData&&FormData.prototype.isPrototypeOf(l)?this._bodyFormData=l:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)?this._bodyText=l.toString():u.arrayBuffer&&u.blob&&f(l)?(this._bodyArrayBuffer=N(l.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(l)||h(l))?this._bodyArrayBuffer=N(l):this._bodyText=l=Object.prototype.toString.call(l):this._bodyText="",this.headers.get("content-type")||(typeof l=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var l=w(this);if(l)return l;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var l=w(this);return l||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(O)}),this.text=function(){var l=w(this);if(l)return l;if(this._bodyBlob)return $(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(P(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(j)}),this.json=function(){return this.text().then(JSON.parse)},this}var R=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(l){var p=l.toUpperCase();return R.indexOf(p)>-1?p:l}function C(l,p){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');p=p||{};var b=p.body;if(l instanceof C){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,p.headers||(this.headers=new y(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!b&&l._bodyInit!=null&&(b=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=p.credentials||this.credentials||"same-origin",(p.headers||!this.headers)&&(this.headers=new y(p.headers)),this.method=E(p.method||this.method||"GET"),this.mode=p.mode||this.mode||null,this.signal=p.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&b)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(b),(this.method==="GET"||this.method==="HEAD")&&(p.cache==="no-store"||p.cache==="no-cache")){var v=/([?&])_=[^&]*/;if(v.test(this.url))this.url=this.url.replace(v,"$1_="+new Date().getTime());else{var S=/\?/;this.url+=(S.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})};function j(l){var p=new FormData;return l.trim().split("&").forEach(function(b){if(b){var v=b.split("="),S=v.shift().replace(/\+/g," "),x=v.join("=").replace(/\+/g," ");p.append(decodeURIComponent(S),decodeURIComponent(x))}}),p}function k(l){var p=new y,b=l.replace(/\r?\n[\t ]+/g," ");return b.split("\r").map(function(v){return v.indexOf(`
|
|
`)===0?v.substr(1,v.length):v}).forEach(function(v){var S=v.split(":"),x=S.shift().trim();if(x){var H=S.join(":").trim();p.append(x,H)}}),p}A.call(C.prototype);function D(l,p){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');p||(p={}),this.type="default",this.status=p.status===void 0?200:p.status,this.ok=this.status>=200&&this.status<300,this.statusText=p.statusText===void 0?"":""+p.statusText,this.headers=new y(p.headers),this.url=p.url||"",this._initBody(l)}A.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},D.error=function(){var l=new D(null,{status:0,statusText:""});return l.type="error",l};var le=[301,302,303,307,308];D.redirect=function(l,p){if(le.indexOf(p)===-1)throw new RangeError("Invalid status code");return new D(null,{status:p,headers:{location:l}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(p,b){this.message=p,this.name=b;var v=Error(p);this.stack=v.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function U(l,p){return new Promise(function(b,v){var S=new C(l,p);if(S.signal&&S.signal.aborted)return v(new o.DOMException("Aborted","AbortError"));var x=new XMLHttpRequest;function H(){x.abort()}x.onload=function(){var F={status:x.status,statusText:x.statusText,headers:k(x.getAllResponseHeaders()||"")};F.url="responseURL"in x?x.responseURL:F.headers.get("X-Request-URL");var ee="response"in x?x.response:x.responseText;setTimeout(function(){b(new D(ee,F))},0)},x.onerror=function(){setTimeout(function(){v(new TypeError("Network request failed"))},0)},x.ontimeout=function(){setTimeout(function(){v(new TypeError("Network request failed"))},0)},x.onabort=function(){setTimeout(function(){v(new o.DOMException("Aborted","AbortError"))},0)};function Ye(F){try{return F===""&&a.location.href?a.location.href:F}catch{return F}}x.open(S.method,Ye(S.url),!0),S.credentials==="include"?x.withCredentials=!0:S.credentials==="omit"&&(x.withCredentials=!1),"responseType"in x&&(u.blob?x.responseType="blob":u.arrayBuffer&&S.headers.get("Content-Type")&&S.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(x.responseType="arraybuffer")),p&&typeof p.headers=="object"&&!(p.headers instanceof y)?Object.getOwnPropertyNames(p.headers).forEach(function(F){x.setRequestHeader(F,g(p.headers[F]))}):S.headers.forEach(function(F,ee){x.setRequestHeader(ee,F)}),S.signal&&(S.signal.addEventListener("abort",H),x.onreadystatechange=function(){x.readyState===4&&S.signal.removeEventListener("abort",H)}),x.send(typeof S._bodyInit>"u"?null:S._bodyInit)})}return U.polyfill=!0,a.fetch||(a.fetch=U,a.Headers=y,a.Request=C,a.Response=D),o.Headers=y,o.Request=C,o.Response=D,o.fetch=U,o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=t.fetch?t:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e}(ne,ne.exports)),ne.exports}(function(r,e){var t;if(typeof fetch=="function"&&(typeof G<"u"&&G.fetch?t=G.fetch:typeof window<"u"&&window.fetch?t=window.fetch:t=fetch),typeof rn<"u"&&typeof window>"u"){var n=t||sn();n.default&&(n=n.default),e.default=n,r.exports=e.default}})(me,me.exports);var Xe=me.exports;const We=tt(Xe),Fe=nt({__proto__:null,default:We},[Xe]);function Ie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ue(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ie(Object(t),!0).forEach(function(n){on(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function on(r,e,t){return e=an(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function an(r){var e=un(r,"string");return q(e)=="symbol"?e:e+""}function un(r,e){if(q(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function q(r){"@babel/helpers - typeof";return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(r)}var M;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?M=global.fetch:typeof window<"u"&&window.fetch?M=window.fetch:M=fetch);var Z;Je()&&(typeof global<"u"&&global.XMLHttpRequest?Z=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Z=window.XMLHttpRequest));var ae;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?ae=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(ae=window.ActiveXObject));!M&&Fe&&!Z&&!ae&&(M=We||Fe);typeof M!="function"&&(M=void 0);var ye=function(e,t){if(t&&q(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},Be=function(e,t,n,i){var s=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(f){n(null,{status:u.status,data:f})}).catch(n)};if(i){var o=i(e,t);if(o instanceof Promise){o.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(s).catch(n):M(e,t).then(s).catch(n)},Me=!1,ln=function(e,t,n,i){e.queryStringParams&&(t=ye(t,e.queryStringParams));var s=Ue({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=Ue({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},Me?{}:o),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{Be(t,a,i,u)}catch(f){if(!o||Object.keys(o).length===0||!f.message||f.message.indexOf("not implemented")<0)return i(f);try{Object.keys(o).forEach(function(d){delete a[d]}),Be(t,a,i,u),Me=!0}catch(d){i(d)}}},fn=function(e,t,n,i){n&&q(n)==="object"&&(n=ye("",n).slice(1)),e.queryStringParams&&(t=ye(t,e.queryStringParams));try{var s;Z?s=new Z:s=new ae("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(u){console&&console.log(u)}},cn=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},M&&t.indexOf("file:")!==0)return ln(e,t,n,i);if(Je()||typeof ActiveXObject=="function")return fn(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function z(r){"@babel/helpers - typeof";return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(r)}function He(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ce(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?He(Object(t),!0).forEach(function(n){Ge(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function dn(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function hn(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,Qe(n.key),n)}}function pn(r,e,t){return e&&hn(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ge(r,e,t){return e=Qe(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Qe(r){var e=gn(r,"string");return z(e)=="symbol"?e:e+""}function gn(r,e){if(z(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(z(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var mn=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return Ge({},n,i||"")},parseLoadPayload:function(t,n){},request:cn,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},yn=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};dn(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return pn(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=ce(ce(ce({},mn()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);z(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,o){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,i)),u=nn(u),u.then(function(f){if(!f)return o(null,{});var d=a.services.interpolator.interpolate(f,{lng:t.join("+"),ns:i.join("+")});a.loadUrl(d,o,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var o=this,a=typeof i=="string"?[i]:i,u=typeof s=="string"?[s]:s,f=this.options.parseLoadPayload(a,u);this.options.request(this.options,t,f,function(d,h){if(h&&(h.status>=500&&h.status<600||!h.status))return n("failed loading "+t+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return n("failed loading "+t+"; status code: "+h.status,!1);if(!h&&d&&d.message&&d.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+d.message,!0);if(d)return n(d,!1);var c,g;try{typeof h.data=="string"?c=o.options.parse(h.data,i,s):c=h.data}catch{g="failed parsing "+t+" to json"}if(g)return n(g,!1);n(null,c)})}},{key:"create",value:function(t,n,i,s,o){var a=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(n,i,s),f=0,d=[],h=[];t.forEach(function(c){var g=a.options.addPath;typeof a.options.addPath=="function"&&(g=a.options.addPath(c,n));var m=a.services.interpolator.interpolate(g,{lng:c,ns:n});a.options.request(a.options,m,u,function(y,w){f+=1,d.push(y),h.push(w),f===t.length&&typeof o=="function"&&o(d,h)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],f=function(h){var c=s.toResolveHierarchy(h);c.forEach(function(g){u.indexOf(g)<0&&u.push(g)})};f(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return f(d)}),u.forEach(function(d){t.allOptions.ns.forEach(function(h){i.read(d,h,"read",null,null,function(c,g){c&&o.warn("loading namespace ".concat(h," for language ").concat(d," failed"),c),!c&&g&&o.log("loaded namespace ".concat(h," for language ").concat(d),g),i.loaded("".concat(d,"|").concat(h),c,g)})})})}}}])}();yn.type="backend";export{yn as B,en as a,wn as b,T as i,Sn as t,xn as u};
|