import{d as T,e as Qe}from"./react-vendor-DgfcBpad.js";const L=i=>typeof i=="string",X=()=>{let i,e;const t=new Promise((s,n)=>{i=s,e=n});return t.resolve=i,t.reject=e,t},ge=i=>i==null?"":String(i),et=(i,e,t)=>{i.forEach(s=>{e[s]&&(t[s]=e[s])})},tt=/###/g,$e=i=>i&&i.includes("###")?i.replace(tt,"."):i,Ee=i=>!i||L(i),te=(i,e,t)=>{const s=L(e)?e.split("."):e;let n=0;for(;n{const{obj:s,k:n}=te(i,e,Object);if(s!==void 0||e.length===1){s[n]=t;return}let r=e[e.length-1],o=e.slice(0,e.length-1),a=te(i,o,Object);for(;a.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=te(i,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${r}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=t},st=(i,e,t,s)=>{const{obj:n,k:r}=te(i,e,Object);n[r]=n[r]||[],n[r].push(t)},le=(i,e)=>{const{obj:t,k:s}=te(i,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},nt=(i,e,t)=>{const s=le(i,t);return s!==void 0?s:le(e,t)},_e=(i,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(Object.prototype.hasOwnProperty.call(i,s)?L(i[s])||i[s]instanceof String||L(e[s])||e[s]instanceof String?t&&(i[s]=e[s]):_e(i[s],e[s],t):i[s]=e[s]);return i},B=i=>i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),it={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},rt=i=>L(i)?i.replace(/[&<>"'\/]/g,e=>it[e]):i;class at{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 s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const ot=[" ",",","?","!",";"],lt=new at(20),ct=(i,e,t)=>{e=e||"",t=t||"";const s=ot.filter(o=>!e.includes(o)&&!t.includes(o));if(s.length===0)return!0;const n=lt.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!n.test(i);if(!r){const o=i.indexOf(t);o>0&&!n.test(i.substring(0,o))&&(r=!0)}return r},be=(i,e,t=".")=>{if(!i)return;if(i[e])return Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0;const s=e.split(t);let n=i;for(let r=0;ri==null?void 0:i.replace(/_/g,"-"),ut={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,s;(s=(t=console==null?void 0:console[i])==null?void 0:t.apply)==null||s.call(t,console,e)}};class ce{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ut,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,n){return n&&!this.debug?null:(e=e.map(r=>L(r)?r.replace(/[\r\n\x00-\x1F\x7F]/g," "):r),L(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ce(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ce(this.logger,e)}}var _=new ce;class fe{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const n=this.observers[s].get(t)||0;this.observers[s].set(t,n+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 s=(...n)=>{t(...n),this.off(e,s)};return this.on(e,s),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([n,r])=>{for(let o=0;o{for(let o=0;o-1&&this.options.ns.splice(t,1)}getResource(e,t,s,n={}){var c,f;const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,o=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.includes(".")?a=e.split("."):(a=[e,t],s&&(Array.isArray(s)?a.push(...s):L(s)&&r?a.push(...s.split(r)):a.push(s)));const l=le(this.data,a);return!l&&!t&&!s&&e.includes(".")&&(e=a[0],t=a[1],s=a.slice(2).join(".")),l||!o||!L(s)?l:be((f=(c=this.data)==null?void 0:c[e])==null?void 0:f[t],s,r)}addResource(e,t,s,n,r={silent:!1}){const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=[e,t];s&&(a=a.concat(o?s.split(o):s)),e.includes(".")&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),Ne(this.data,a,n),r.silent||this.emit("added",e,t,s,n)}addResources(e,t,s,n={silent:!1}){for(const r in s)(L(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});n.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,n,r,o={silent:!1,skipCopy:!1}){let a=[e,t];e.includes(".")&&(a=e.split("."),n=s,s=t,t=a[1]),this.addNamespaces(t);let l=le(this.data,a)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),n?_e(l,s,r):l={...l,...s},Ne(this.data,a,l),o.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return 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(n=>t[n]&&Object.keys(t[n]).length>0)}toJSON(){return this.data}}var Be={processors:{},addPostProcessor(i){this.processors[i.name]=i},handle(i,e,t,s,n){return i.forEach(r=>{var o;e=((o=this.processors[r])==null?void 0:o.process(e,t,s,n))??e}),e}};const ze=Symbol("i18next/PATH_KEY");function ft(){const i=[],e=Object.create(null);let t;return e.get=(s,n)=>{var r;return(r=t==null?void 0:t.revoke)==null||r.call(t),n===ze?i:(i.push(n),t=Proxy.revocable(s,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function G(i,e){const{[ze]:t}=i(ft()),s=(e==null?void 0:e.keySeparator)??".",n=(e==null?void 0:e.nsSeparator)??":",r=(e==null?void 0:e.enableSelector)==="strict";if(t.length>1&&n){const o=e==null?void 0:e.ns,a=r?Array.isArray(o)?o:o?[o]:null:Array.isArray(o)?o:null;if(a&&(r?a:a.length>1?a.slice(1):[]).includes(t[0]))return`${t[0]}${n}${t.slice(1).join(s)}`}return t.join(s)}const me=i=>!L(i)&&typeof i!="boolean"&&typeof i!="number";class ue extends fe{constructor(e,t={}){super(),et(["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 s={...t};if(e==null)return!1;const n=this.resolve(e,s);if((n==null?void 0:n.res)===void 0)return!1;const r=me(n.res);return!(s.returnObjects===!1&&r)}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const n=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const o=s&&e.includes(s),a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ct(e,s,n);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:L(r)?[r]:r};const c=e.split(s);(s!==n||s===n&&this.options.ns.includes(c[0]))&&(r=c.shift()),e=c.join(n)}return{key:e,namespaces:L(r)?[r]:r}}translate(e,t,s){let n=typeof t=="object"?{...t}:t;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";typeof e=="function"&&(e=G(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]),e=e.map(b=>typeof b=="function"?G(b,{...this.options,...n}):String(b));const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],n),c=l[l.length-1];let f=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return d?r?{res:`${c}${f}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${f}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a;const p=this.resolve(e,n);let h=p==null?void 0:p.res;const y=(p==null?void 0:p.usedKey)||a,m=(p==null?void 0:p.exactUsedKey)||a,E=["[object Number]","[object Function]","[object RegExp]"],S=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=n.count!==void 0&&!L(n.count),v=ue.hasDefaultValue(n),N=w?this.pluralResolver.getSuffix(u,n.count,n):"",j=n.ordinal&&w?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",C=w&&!n.ordinal&&n.count===0,O=C&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${N}`]||n[`defaultValue${j}`]||n.defaultValue;let g=h;x&&!h&&v&&(g=O);const F=me(g),I=Object.prototype.toString.apply(g);if(x&&g&&F&&!E.includes(I)&&!(L(S)&&Array.isArray(g))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,g,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(p.res=b,p.usedParams=this.getUsedParamsDetails(n),p):b}if(o){const b=Array.isArray(g),$=b?[]:{},R=b?m:y;for(const k in g)if(Object.prototype.hasOwnProperty.call(g,k)){const P=`${R}${o}${k}`;v&&!h?$[k]=this.translate(P,{...n,defaultValue:me(O)?O[k]:void 0,joinArrays:!1,ns:l}):$[k]=this.translate(P,{...n,joinArrays:!1,ns:l}),$[k]===P&&($[k]=g[k])}h=$}}else if(x&&L(S)&&Array.isArray(h))h=h.join(S),h&&(h=this.extendTranslation(h,e,n,s));else{let b=!1,$=!1;!this.isValidLookup(h)&&v&&(b=!0,h=O),this.isValidLookup(h)||($=!0,h=a);const k=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:h,P=v&&O!==h&&this.options.updateMissing;if($||b||P){if(this.logger.log(P?"updateKey":"missingKey",u,c,w&&!P?`${a}${this.pluralResolver.getSuffix(u,n.count,n)}`:a,P?O:h),o){const V=this.resolve(a,{...n,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 D=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let V=0;V{var q;const J=v&&H!==h?H:k;this.options.missingKeyHandler?this.options.missingKeyHandler(V,c,A,J,P,n):(q=this.backendConnector)!=null&&q.saveMissing&&this.backendConnector.saveMissing(V,c,A,J,P,n),this.emit("missingKey",V,c,A,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?D.forEach(V=>{const A=this.pluralResolver.getSuffixes(V,n);C&&n[`defaultValue${this.options.pluralSeparator}zero`]&&!A.includes(`${this.options.pluralSeparator}zero`)&&A.push(`${this.options.pluralSeparator}zero`),A.forEach(H=>{Y([V],a+H,n[`defaultValue${H}`]||O)})}):Y(D,a,O))}h=this.extendTranslation(h,e,n,p,s),$&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${c}${f}${a}`),($||b)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${a}`:a,b?h:void 0,n))}return r?(p.res=h,p.usedParams=this.getUsedParamsDetails(n),p):h}extendTranslation(e,t,s,n,r){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const f=L(e)&&(((c=s==null?void 0:s.interpolation)==null?void 0:c.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const p=e.match(this.interpolator.nestingRegexp);u=p&&p.length}let d=s.replace&&!L(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,s.lng||this.language||n.usedLng,s),f){const p=e.match(this.interpolator.nestingRegexp),h=p&&p.length;u(r==null?void 0:r[0])===p[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):this.translate(...p,t),s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,a=L(o)?[o]:o;return e!=null&&(a!=null&&a.length)&&s.applyPostProcessor!==!1&&(e=Be.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,n,r,o,a;return L(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?G(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(s))return;const c=this.extractFromKey(l,t),f=c.key;n=f;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=t.count!==void 0&&!L(t.count),p=d&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(L(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(m=>{var E,S;this.isValidLookup(s)||(a=m,!this.checkedLoadedFor[`${y[0]}-${m}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((S=this.utils)!=null&&S.hasLoadedNamespace(a))&&(this.checkedLoadedFor[`${y[0]}-${m}`]=!0,this.logger.warn(`key "${n}" 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(x=>{var N;if(this.isValidLookup(s))return;o=x;const w=[f];if((N=this.i18nFormat)!=null&&N.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,x,m,t);else{let j;d&&(j=this.pluralResolver.getSuffix(x,t.count,t));const C=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&j.startsWith(O)&&w.push(f+j.replace(O,this.options.pluralSeparator)),w.push(f+j),p&&w.push(f+C)),h){const g=`${f}${this.options.contextSeparator||"_"}${t.context}`;w.push(g),d&&(t.ordinal&&j.startsWith(O)&&w.push(g+j.replace(O,this.options.pluralSeparator)),w.push(g+j),p&&w.push(g+C))}}let v;for(;v=w.pop();)this.isValidLookup(s)||(r=v,s=this.getResource(x,m,v,t))}))})}),{res:s,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s,n={}){var r;return(r=this.i18nFormat)!=null&&r.getResource?this.i18nFormat.getResource(e,t,s,n):this.resourceStore.getResource(e,t,s,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!L(e.replace);let n=s?e.replace:e;if(s&&typeof e.count<"u"&&(n={...n,count:e.count}),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!s){n={...n};for(const r of t)delete n[r]}return n}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&s.startsWith(t)&&e[s]!==void 0)return!0;return!1}}class Pe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=ne(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=ne(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(L(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(s=>{if(t)return;const n=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const n=this.getScriptPartFromCode(s);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(s);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(o=>o===r?!0:!o.includes("-")&&!r.includes("-")?!1:!!(o.includes("-")&&!r.includes("-")&&o.slice(0,o.indexOf("-"))===r||o.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)),L(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.options.fallbackLng,n=Array.isArray(s)?s.join("|"):s;n!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=n);const r=t===void 0||t===!1||L(t),o=t===void 0&&typeof this.options.fallbackLng=="function",a=L(e)&&r&&!o;let l=null;if(a){let d;t===void 0?d="undefined":t===!1?d="boolean:false":d=`string:${t}`,l=`${e.length}:${e}|${d}`}if(l!==null){const d=this.resolveHierarchyCache[l];if(d!==void 0)return d.slice()}const c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),f=[],u=d=>{d&&(this.isSupportedCode(d)?f.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return L(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(e))):L(e)&&u(this.formatLanguageCode(e)),c.forEach(d=>{f.includes(d)||u(this.formatLanguageCode(d))}),l!==null?(this.resolveHierarchyCache[l]=f,f.slice()):f}}const ke={zero:0,one:1,two:2,few:3,many:4,other:5},je={select:i=>i===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ht{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=_.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=ne(e==="dev"?"en":e),n=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:n});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(s,{type:n})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),je;if(!e.match(/-|_/))return je;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[r]=o,o}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(n=>`${t}${n}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((n,r)=>ke[n]-ke[r]).map(n=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(e,t,s={}){const n=this.getRule(e,s);return n?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const Te=(i,e,t,s=".",n=!0)=>{let r=nt(i,e,t);return!r&&n&&L(t)&&(r=be(i,t,s),r===void 0&&(r=be(e,t,s))),r},Fe=i=>i.replace(/\$/g,"$$$$");class Ae{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)||(s=>s),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:n,prefix:r,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:E,alwaysFormat:S}=e.interpolation;this.escape=t!==void 0?t:rt,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=r?B(r):o||"{{",this.suffix=a?B(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u?B(u):"-",this.unescapeSuffix=this.unescapePrefix?"":f?B(f):"",this.nestingPrefix=d?B(d):p||B("$t("),this.nestingSuffix=h?B(h):y||B(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=E||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>(t==null?void 0:t.source)===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,n){var p;let r,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(!h.includes(this.formatSeparator)){const S=Te(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,s,{...n,...t,interpolationkey:h}):S}const y=h.split(this.formatSeparator),m=y.shift().trim(),E=y.join(this.formatSeparator).trim();return this.format(Te(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),E,s,{...n,...t,interpolationkey:m})};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=(n==null?void 0:n.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((p=n==null?void 0:n.interpolation)==null?void 0:p.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>h},{regex:this.regexp,safeValue:h=>this.escapeValue?this.escape(h):h}].forEach(h=>{for(a=0;r=h.regex.exec(e);){const y=r[1].trim();if(o=c(y),o===void 0)if(typeof f=="function"){const E=f(e,r,n);o=L(E)?E:""}else if(n&&Object.prototype.hasOwnProperty.call(n,y))o="";else if(u){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else!L(o)&&!this.useRawValueToEscape&&(o=ge(o));const m=h.safeValue(o);if(e=e.replace(r[0],Fe(m)),u?(h.regex.lastIndex+=m.length,h.regex.lastIndex-=r[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,s={}){let n,r,o;const a=(l,c)=>{const f=this.nestingOptionsSeparator;if(!l.includes(f))return l;const u=l.split(new RegExp(`${B(f)}[ ]*{`));let d=`{${u[1]}`;l=u[0],d=this.interpolate(d,o);const p=d.match(/'/g),h=d.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),c&&(o={...c,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${f}${d}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,l};for(;n=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&!L(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const c=/{.*}/s.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(c!==-1&&(l=n[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!L(r))return r;L(r)||(r=ge(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l.length&&(r=l.reduce((f,u)=>this.format(f,u,s.lng,{...s,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],Fe(ge(r))),this.regexp.lastIndex=0}return e}}const dt=i=>{let e=i.toLowerCase().trim();const t={};if(i.includes("(")){const s=i.split("(");e=s[0].toLowerCase().trim();const n=s[1].slice(0,-1);e==="currency"&&!n.includes(":")?t.currency||(t.currency=n.trim()):e==="relativetime"&&!n.includes(":")?t.range||(t.range=n.trim()):n.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=a.trim();t[f]||(t[f]=c),c==="false"&&(t[f]=!1),c==="true"&&(t[f]=!0),isNaN(c)||(t[f]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Ie=i=>{const e={};return(t,s,n)=>{let r=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(r={...r,[n.interpolationkey]:void 0});const o=s+JSON.stringify(r);let a=e[o];return a||(a=i(ne(s),n),e[o]=a),a(t)}},pt=i=>(e,t,s)=>i(ne(t),s)(e);class gt{constructor(e={}){this.logger=_.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?Ie:pt;this.formats={number:s((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:s((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:s((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:s((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:s((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ie(t)}format(e,t,s,n={}){if(!t||e==null)return e;const r=t.split(this.formatSeparator),o=[];for(let l=0;l-1&&!c.includes(")")&&l+1{var d;const{formatName:f,formatOptions:u}=dt(c);if(this.formats[f]){let p=l;try{const h=((d=n==null?void 0:n.formatParams)==null?void 0:d[n.interpolationkey])||{},y=h.locale||h.lng||n.locale||n.lng||s;p=this.formats[f](l,y,{...u,...n,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${f}`);return l},e)}}const mt=(i,e)=>{i.pending[e]!==void 0&&(delete i.pending[e],i.pendingCount--)};class yt extends fe{constructor(e,t,s,n={}){var r,o;super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=n,this.logger=_.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],(o=(r=this.backend)==null?void 0:r.init)==null||o.call(r,s,n.backend,n)}queueLoad(e,t,s,n){const r={},o={},a={},l={};return e.forEach(c=>{let f=!0;t.forEach(u=>{const d=`${c}|${u}`;!s.reload&&this.store.hasResourceBundle(c,u)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,f=!1,o[d]===void 0&&(o[d]=!0),r[d]===void 0&&(r[d]=!0),l[u]===void 0&&(l[u]=!0)))}),f||(a[c]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const n=e.split("|"),r=n[0],o=n[1];t&&this.emit("failedLoading",r,o,t),!t&&s&&this.store.addResourceBundle(r,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach(l=>{st(l.loaded,[r],o),mt(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const f=l.loaded[c];f.length&&f.forEach(u=>{a[c][u]===void 0&&(a[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s,n=0,r=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:n,wait:r,callback:o});return}this.readingCalls++;const a=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&f&&n{this.read(e,t,s,n+1,r*2,o)},r);return}o(c,f)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(f=>a(null,f)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,t,a)}prepareLoading(e,t,s={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();L(e)&&(e=this.languageUtils.toResolveHierarchy(e)),L(t)&&(t=[t]);const r=this.queueLoad(e,t,s,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),n=s[0],r=s[1];this.read(n,r,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${n} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${r} for language ${n}`,a),this.loaded(e,o,a)})}saveMissing(e,t,s,n,r,o={},a=()=>{}){var l,c,f,u,d;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((d=this.backend)!=null&&d.create){const p={...o,isUpdate:r},h=this.backend.create.bind(this.backend);if(h.length<6)try{let y;h.length===5?y=h(e,t,s,n,p):y=h(e,t,s,n),y&&typeof y.then=="function"?y.then(m=>a(null,m)).catch(a):a(null,y)}catch(y){a(y)}else h(e,t,s,n,a,p)}!e||!e[0]||this.store.addResource(e[0],t,s,n)}}}const ye=()=>({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]),L(i[1])&&(e.defaultValue=i[1]),L(i[2])&&(e.tDescription=i[2]),typeof i[2]=="object"||typeof i[3]=="object"){const t=i[3]||i[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ve=i=>(L(i.ns)&&(i.ns=[i.ns]),L(i.fallbackLng)&&(i.fallbackLng=[i.fallbackLng]),L(i.fallbackNS)&&(i.fallbackNS=[i.fallbackNS]),i.supportedLngs&&!i.supportedLngs.includes("cimode")&&(i.supportedLngs=i.supportedLngs.concat(["cimode"])),i),ie=()=>{},xt=i=>{Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(t=>{typeof i[t]=="function"&&(i[t]=i[t].bind(i))})};class se extends fe{constructor(e={},t){if(super(),this.options=Ve(e),this.services={},this.logger=_,this.modules={external:[]},xt(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&&(L(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const s=ye();this.options={...s,...this.options,...Ve(e)},this.options.interpolation={...s.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=s.overloadTranslationOptionHandler);const n=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?_.init(n(this.modules.logger),this.options):_.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=gt;const f=new Pe(this.options);this.store=new Re(this.options.resources,this.options);const u=this.services;u.logger=_,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new ht(f,{prepend:this.options.pluralSeparator}),c&&(u.formatter=n(c),u.formatter.init&&u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new Ae(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new yt(n(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.languageDetector&&(u.languageDetector=n(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=n(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ue(this.services,this.options),this.translator.on("*",(d,...p)=>{this.emit(d,...p)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ie),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const a=X(),l=()=>{const c=(f,u)=>{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),a.resolve(u),t(f,u)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=ie){var r,o;let s=t;const n=L(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if((n==null?void 0:n.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const a=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&(a.includes(u)||a.push(u))})};n?l(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(o=(r=this.options.preload)==null?void 0:r.forEach)==null||o.call(r,c=>l(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(c)})}else s(null)}reloadResources(e,t,s){const n=X();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=ie),this.services.backendConnector.reload(e,t,r=>{n.resolve(),s(r)}),n}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"&&Be.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.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},r=(a,l)=>{l?this.isLanguageChangingTo===e&&(n(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,s.resolve((...c)=>this.t(...c)),t&&t(a,(...c)=>this.t(...c))},o=a=>{var f,u;!e&&!a&&this.services.languageDetector&&(a=[]);const l=L(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(L(a)?[a]:a);c&&(this.language||n(c),this.translator.language||this.translator.changeLanguage(c),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,c)),this.loadResources(c,d=>{r(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),s}getFixedT(e,t,s,n){const r=n==null?void 0:n.scopeNs,o=(a,l,...c)=>{let f;typeof l!="object"?f=this.options.overloadTranslationOptionHandler([a,l].concat(c)):f={...l},f.lng=f.lng||o.lng,f.lngs=f.lngs||o.lngs;const u=f.ns!==void 0&&f.ns!==null;f.ns=f.ns||o.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||s||o.keyPrefix);const d={...this.options,...f};Array.isArray(r)&&!u&&(d.ns=r),typeof f.keyPrefix=="function"&&(f.keyPrefix=G(f.keyPrefix,d));const p=this.options.keySeparator||".";let h;return f.keyPrefix&&Array.isArray(a)?h=a.map(y=>(typeof y=="function"&&(y=G(y,d)),`${f.keyPrefix}${p}${y}`)):(typeof a=="function"&&(a=G(a,d)),h=f.keyPrefix?`${f.keyPrefix}${p}${a}`:a),this.t(h,f)};return L(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=s,o}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 s=t.lng||this.resolvedLanguage||this.languages[0],n=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!n||o(r,e)))}loadNamespaces(e,t){const s=X();return this.options.ns?(L(e)&&(e=[e]),e.forEach(n=>{this.options.ns.includes(n)||this.options.ns.push(n)}),this.loadResources(n=>{s.resolve(),t&&t(n)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=X();L(e)&&(e=[e]);const n=this.options.preload||[],r=e.filter(o=>!n.includes(o)&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=n.concat(r),this.loadResources(o=>{s.resolve(),t&&t(o)}),s):(t&&t(),Promise.resolve())}dir(e){var n,r;if(e||(e=this.resolvedLanguage||(((n=this.languages)==null?void 0:n.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.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"],s=((r=this.services)==null?void 0:r.languageUtils)||new Pe(ye());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(s.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new se(e,t);return s.createInstance=se.createInstance,s}cloneInstance(e={},t=ie){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},r=new se(n);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s){const a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,u)=>(f[u]={...l[c][u]},f),l[c]),l),{});r.store=new Re(a,n),r.services.resourceStore=r.store}if(e.interpolation){const l={...ye().interpolation,...this.options.interpolation,...e.interpolation},c={...n,interpolation:l};r.services.interpolator=new Ae(c)}return r.translator=new ue(r.services,n),r.translator.on("*",(a,...l)=>{r.emit(a,...l)}),r.init(n,t),r.translator.options=n,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=se.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;const St={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,"!doctype":!0,"!DOCTYPE":!0},bt=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function De(i){const e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=i.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(St[t[1]]||i.charAt(i.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){const r=i.indexOf("-->");return{type:"comment",comment:r!==-1?i.slice(4,r):""}}const s=new RegExp(bt);let n=null;for(;n=s.exec(i),n!==null;)if(n[0].trim())if(n[1]){const r=n[1].trim();let o=[r,null];const a=r.indexOf("=");a>-1&&(o=[r.slice(0,a),r.slice(a+1)]),e.attrs[o[0]]=o[1],s.lastIndex--}else n[2]&&(e.attrs[n[2]]=n[3].trim().substring(1,n[3].length-1));return e}const re=/|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Lt=/<\/?([^\s]+?)[/\s>]/,vt=/^\s*$/,Ot=/^(script|style)$/i,Q="\0",wt=Object.create(null);function We(i){i.forEach(function(e){if(e.type==="text"){e.content=e.content.split(Q).join("<");return}if(e.type==="comment"){e.comment=e.comment.split(Q).join("<");return}for(const t in e.attrs){const s=e.attrs[t];typeof s=="string"&&s.indexOf(Q)>-1&&(e.attrs[t]=s.split(Q).join("<"))}e.children.length&&We(e.children)})}function Ct(i,e){const t=e&&e.components||wt,s=e&&e.allowedTags;let n=!1;if(s){const h=typeof s=="function"?s:function(S){return s.indexOf(S)>-1};let y="",m=0;re.lastIndex=0;let E;for(;E=re.exec(i);){const S=E[0];y+=i.slice(m,E.index);const x=S.match(Lt);S.startsWith("",i}}function Et(i){return i.reduce(function(e,t){return e+Je("",t)},"")}var Nt={parse:Ct,stringify:Et};const ae=(i,e,t,s)=>{var r,o,a,l;const n=[t,{code:e,...s||{}}];if((o=(r=i==null?void 0:i.services)==null?void 0:r.logger)!=null&&o.forward)return i.services.logger.forward(n,"warn","react-i18next::",!0);K(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),(l=(a=i==null?void 0:i.services)==null?void 0:a.logger)!=null&&l.warn?i.services.logger.warn(...n):console!=null&&console.warn&&console.warn(...n)},He={},Z=(i,e,t,s)=>{K(t)&&He[t]||(K(t)&&(He[t]=new Date),ae(i,e,t,s))},Ye=(i,e)=>()=>{if(i.isInitialized)e();else{const t=()=>{setTimeout(()=>{i.off("initialized",t)},0),e()};i.on("initialized",t)}},Le=(i,e,t)=>{i.loadNamespaces(e,Ye(i,t))},Ke=(i,e,t,s)=>{if(K(t)&&(t=[t]),i.options.preload&&i.options.preload.indexOf(e)>-1)return Le(i,t,s);t.forEach(n=>{i.options.ns.indexOf(n)<0&&i.options.ns.push(n)}),i.loadLanguages(e,Ye(i,s))},Rt=(i,e,t={})=>!e.languages||!e.languages.length?(Z(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(i,{lng:t.lng,precheck:(s,n)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,i))return!1}}),K=i=>typeof i=="string",W=i=>typeof i=="object"&&i!==null,Pt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,kt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},jt=i=>kt[i],qe=i=>i.replace(Pt,jt);let ve={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:qe,transDefaultProps:void 0};const Tt=(i={})=>{ve={...ve,...i}},we=()=>ve;let Ge;const Ft=i=>{Ge=i},Ce=()=>Ge,oe=(i,e)=>{var s;if(!i)return!1;const t=((s=i.props)==null?void 0:s.children)??i.children;return e?t.length>0:!!t},ee=i=>{var t,s;if(!i)return[];const e=((t=i.props)==null?void 0:t.children)??i.children;return(s=i.props)!=null&&s.i18nIsDynamicList?z(e):e},At=i=>z(i).every(T.isValidElement),z=i=>Array.isArray(i)?i:[i],It=(i,e)=>{const t={...e};return t.props={...e.props,...i.props},t},Vt=i=>{const e={};if(!i)return e;const t=s=>{z(s).forEach(r=>{K(r)||(oe(r)?t(ee(r)):W(r)&&!T.isValidElement(r)&&Object.assign(e,r))})};return t(i),e},Oe=(i,e,t,s)=>{if(!i)return"";let n="";const r=z(i),o=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((a,l)=>{if(K(a)){n+=`${a}`;return}if(T.isValidElement(a)){const{props:c,type:f}=a,u=Object.keys(c).length,d=o.indexOf(f)>-1,p=c.children;if(!p&&d&&!u){n+=`<${f}/>`;return}if(!p&&(!d||u)||c.i18nIsDynamicList){n+=`<${l}>`;return}if(d&&u<=1){const y=K(p)?p:Oe(p,e,t,s);n+=`<${f}>${y}`;return}const h=Oe(p,e,t,s);n+=`<${l}>${h}`;return}if(a===null){ae(t,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:s});return}if(W(a)){const{format:c,...f}=a,u=Object.keys(f);if(u.length===1){const d=c?`${u[0]}, ${c}`:u[0];n+=`{{${d}}}`;return}ae(t,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:s,child:a});return}ae(t,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:s,child:a})}),n},Dt=(i,e,t,s,n,r,o)=>{if(t==="")return[];const a=n.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(a.map(x=>`<${x}`).join("|")).test(t);if(!i&&!e&&!l&&!o)return[t];const c=e??{},f=x=>{z(x).forEach(v=>{K(v)||(oe(v)?f(ee(v)):W(v)&&!T.isValidElement(v)&&Object.assign(c,v))})};f(i);const u=Object.keys(c),d=x=>/^\d+$/.test(x)||a.indexOf(x)>-1||u.indexOf(x)>-1,p=Nt.parse(`<0>${t}`,{allowedTags:d}),h={...c,...r},y=(x,w,v)=>{var C;const N=ee(x),j=E(N,w.children,v);return At(N)&&j.length===0||(C=x.props)!=null&&C.i18nIsDynamicList?N:j},m=(x,w,v,N,j)=>{x.dummy?(x.children=w,v.push(T.cloneElement(x,{key:N},j?void 0:w))):v.push(...T.Children.map([x],C=>{var g;if(C.type===T.Fragment||((g=C.props)==null?void 0:g.i18nIsDynamicList)!==void 0){const F={key:N};return C&&C.props&&Object.keys(C.props).forEach(I=>{I==="children"||I==="i18nIsDynamicList"||(F[I]=C.props[I])}),T.createElement(C.type,F,j?null:w)}const O={key:N};return C&&C.props&&Object.keys(C.props).forEach(F=>{F==="ref"||F==="children"||(O[F]=C.props[F])}),T.cloneElement(C,O,j?null:w)}))},E=(x,w,v)=>{const N=z(x),j=z(w),C={};return j.reduce((O,g,F)=>{var b,$;const I=(($=(b=g.children)==null?void 0:b[0])==null?void 0:$.content)&&s.services.interpolator.interpolate(g.children[0].content,h,s.language);if(g.type==="tag"){let R=N[parseInt(g.name,10)];!R&&e&&(R=e[g.name]),v.length===1&&!R&&(R=v[0][g.name]),R||(R={});const k={...g.attrs};o&&Object.keys(k).forEach(A=>{const H=k[A];K(H)&&(k[A]=qe(H))});const P=Object.keys(k).length!==0?It({props:k},R):R,D=T.isValidElement(P),M=D&&oe(g,!0)&&!g.voidElement,Y=l&&W(P)&&P.dummy&&!D,V=W(e)&&Object.hasOwnProperty.call(e,g.name);if(K(P)){const A=s.services.interpolator.interpolate(P,h,s.language);O.push(A)}else if(oe(P)||M){const A=y(P,g,v);m(P,A,O,F)}else if(Y){const A=E(N,g.children,v);m(P,A,O,F)}else if(Number.isNaN(parseFloat(g.name)))if(V){const A=y(P,g,v);m(P,A,O,F,g.voidElement)}else if(n.transSupportBasicHtmlNodes&&a.indexOf(g.name)>-1)if(g.voidElement)O.push(T.createElement(g.name,{key:`${g.name}-${F}`}));else{const A=C[g.name]||0;C[g.name]=A+1;let H,J=0;for(let de=0;de`);else{const A=E(N,g.children,v);O.push(`<${g.name}>${A}`)}else if(W(P)&&!D){const A=g.children[0]?I:null;A&&O.push(A)}else m(P,I,O,F,g.children.length!==1||!I)}else if(g.type==="text"){const R=n.transWrapTextNodes,k=typeof n.unescape=="function"?n.unescape:we().unescape,P=o?k(s.services.interpolator.interpolate(g.content,h,s.language)):s.services.interpolator.interpolate(g.content,h,s.language);R?O.push(T.createElement(R,{key:`${g.name}-${F}`},P)):O.push(P)}return O},[])},S=E([{dummy:!0,children:i||[]}],p,z(i||[]));return ee(S[0])},Ze=(i,e,t)=>{const s=i.key||e,n=T.cloneElement(i,{key:s});if(!n.props||!n.props.children||t.indexOf(`${e}/>`)<0&&t.indexOf(`${e} />`)<0)return n;function r(){return T.createElement(T.Fragment,null,n)}return T.createElement(r,{key:s})},Ht=(i,e)=>i.map((t,s)=>Ze(t,s,e)),Kt=(i,e)=>{const t={};return Object.keys(i).forEach(s=>{Object.assign(t,{[s]:Ze(i[s],s,e)})}),t},Ut=(i,e,t,s)=>i?Array.isArray(i)?Ht(i,e):W(i)?Kt(i,e):(Z(t,"TRANS_INVALID_COMPONENTS",' "components" prop expects an object or array',{i18nKey:s}),null):null,Mt=i=>!W(i)||Array.isArray(i)?!1:Object.keys(i).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function _t({children:i,count:e,parent:t,i18nKey:s,context:n,tOptions:r={},values:o,defaults:a,components:l,ns:c,i18n:f,t:u,shouldUnescape:d,...p}){var Y,V,A,H,J,q;const h=f||Ce();if(!h)return Z(h,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:s}),i;const y=u||h.t.bind(h)||(he=>he),m={...we(),...(Y=h.options)==null?void 0:Y.react};let E=c||y.ns||((V=h.options)==null?void 0:V.defaultNS);E=K(E)?[E]:E||["translation"];const{transDefaultProps:S}=m,x=S!=null&&S.tOptions?{...S.tOptions,...r}:r,w=d??(S==null?void 0:S.shouldUnescape),v=S!=null&&S.values?{...S.values,...o}:o,N=S!=null&&S.components?{...S.components,...l}:l,j=Oe(i,m,h,s),C=a||(x==null?void 0:x.defaultValue)||j||m.transEmptyNodeValue||(typeof s=="function"?G(s):s),{hashTransKey:O}=m,g=s||(O?O(j||C):j||C);(H=(A=h.options)==null?void 0:A.interpolation)!=null&&H.defaultVariables?o=v&&Object.keys(v).length>0?{...v,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables}:o=v;const F=Vt(i);F&&typeof F.count=="number"&&e===void 0&&(e=F.count);const I=o||e!==void 0&&!((q=(J=h.options)==null?void 0:J.interpolation)!=null&&q.alwaysFormat)||!i?x.interpolation:{interpolation:{...x.interpolation,prefix:"#$?",suffix:"?$#"}},b={...x,context:n||x.context,count:e,...o,...I,defaultValue:C,ns:E};let $=g?y(g,b):C;$===g&&C&&($=C);const R=Ut(N,$,h,s);let k=R||i,P=null;Mt(R)&&(P=R,k=i);const D=Dt(k,P,$,h,m,b,w),M=t??m.defaultTransParent;return M?T.createElement(M,p,D):D}const Qt={type:"3rdParty",init(i){Tt(i.options.react),Ft(i)}},Xe=T.createContext();class Bt{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function es({children:i,count:e,parent:t,i18nKey:s,context:n,tOptions:r={},values:o,defaults:a,components:l,ns:c,i18n:f,t:u,shouldUnescape:d,...p}){var S;const{i18n:h,defaultNS:y}=T.useContext(Xe)||{},m=f||h||Ce(),E=u||(m==null?void 0:m.t.bind(m));return _t({children:i,count:e,parent:t,i18nKey:s,context:n,tOptions:r,values:o,defaults:a,components:l,ns:c||(E==null?void 0:E.ns)||y||((S=m==null?void 0:m.options)==null?void 0:S.defaultNS),i18n:m,t:u,shouldUnescape:d,...p})}var xe={exports:{}},Se={};/** * @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 Ue;function zt(){if(Ue)return Se;Ue=1;var i=Qe();function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var t=typeof Object.is=="function"?Object.is:e,s=i.useState,n=i.useEffect,r=i.useLayoutEffect,o=i.useDebugValue;function a(u,d){var p=d(),h=s({inst:{value:p,getSnapshot:d}}),y=h[0].inst,m=h[1];return r(function(){y.value=p,y.getSnapshot=d,l(y)&&m({inst:y})},[u,p,d]),n(function(){return l(y)&&m({inst:y}),u(function(){l(y)&&m({inst:y})})},[u]),o(p),p}function l(u){var d=u.getSnapshot;u=u.value;try{var p=d();return!t(u,p)}catch{return!0}}function c(u,d){return d()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Se.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,Se}var Me;function Wt(){return Me||(Me=1,xe.exports=zt()),xe.exports}var Jt=Wt();const Yt=(i,e)=>{if(K(e))return e;if(W(e)&&K(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},qt={t:Yt,ready:!1},Gt=()=>()=>{},Zt=(i,e={})=>{var g,F,I;const{i18n:t}=e,{i18n:s,defaultNS:n}=T.useContext(Xe)||{},r=t||s||Ce();r&&!r.reportNamespaces&&(r.reportNamespaces=new Bt),r||Z(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const o=T.useMemo(()=>{var b;return{...we(),...(b=r==null?void 0:r.options)==null?void 0:b.react,...e}},[r,e]),{useSuspense:a,keyPrefix:l}=o,c=i||n||((g=r==null?void 0:r.options)==null?void 0:g.defaultNS),f=K(c)?[c]:c||["translation"],u=T.useMemo(()=>f,f);(I=(F=r==null?void 0:r.reportNamespaces)==null?void 0:F.addUsedNamespaces)==null||I.call(F,u);const d=T.useRef(0),p=T.useCallback(b=>{if(!r)return Gt;const{bindI18n:$,bindI18nStore:R}=o,k=()=>{d.current+=1,b()};return $&&r.on($,k),R&&r.store.on(R,k),()=>{$&&$.split(" ").forEach(P=>r.off(P,k)),R&&R.split(" ").forEach(P=>r.store.off(P,k))}},[r,o]),h=T.useRef(),y=T.useCallback(()=>{if(!r)return qt;const b=!!(r.isInitialized||r.initializedStoreOnce)&&u.every(M=>Rt(M,r,o)),$=e.lng||r.language,R=d.current,k=h.current;if(k&&k.ready===b&&k.lng===$&&k.keyPrefix===l&&k.revision===R)return k;const D={t:r.getFixedT($,o.nsMode==="fallback"?u:u[0],l,{scopeNs:u}),ready:b,lng:$,keyPrefix:l,revision:R};return h.current=D,D},[r,u,l,o,e.lng]),[m,E]=T.useState(0),{t:S,ready:x}=Jt.useSyncExternalStore(p,y,y);T.useEffect(()=>{if(r&&!x&&!a){const b=()=>E($=>$+1);e.lng?Ke(r,e.lng,u,b):Le(r,u,b)}},[r,e.lng,u,x,a,m]);const w=r||{},v=T.useRef(null),N=T.useRef(),j=b=>{var $;return`${b.language}|${b.resolvedLanguage}|${($=b.languages)==null?void 0:$.join(",")}`},C=b=>{const $=Object.getOwnPropertyDescriptors(b);$.__original&&delete $.__original;const R=Object.create(Object.getPrototypeOf(b),$);if(!Object.prototype.hasOwnProperty.call(R,"__original"))try{Object.defineProperty(R,"__original",{value:b,writable:!1,enumerable:!1,configurable:!1})}catch{}return R},O=T.useMemo(()=>{const b=w,$=b&&j(b);let R=b;b&&(v.current&&v.current.__original===b?N.current!==$?(R=C(b),v.current=R,N.current=$):R=v.current:(R=C(b),v.current=R,N.current=$));const k=!x&&!a?(...D)=>(Z(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."),S(...D)):S,P=[k,R,x];return P.t=k,P.i18n=R,P.ready=x,P},[S,w,x,w.resolvedLanguage,w.language,w.languages]);if(r&&a&&!x){let b=!1;try{b=!1}catch{}throw b&&Z(r,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise($=>{const R=()=>$();e.lng?Ke(r,e.lng,u,R):Le(r,u,R)})}return O},ts=({ns:i,children:e,...t})=>{const[s,n,r]=Zt(i,t);return e(s,{i18n:n,lng:n==null?void 0:n.language},r)};export{es as T,ts as a,U as b,Qt as i,Zt as u};