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