1?p-1:0),E=1;E
{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=vl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const i=Qo(),s=()=>{const u=(l,c)=>{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),i.resolve(c),r(l,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),i}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vl;const r=typeof t=="string"?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=i=>{!i||i==="cimode"||this.services.languageUtils.toResolveHierarchy(i).forEach(s=>{s!=="cimode"&&a.indexOf(s)<0&&a.push(s)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(i=>o(i)),this.options.preload&&this.options.preload.forEach(i=>o(i)),this.services.backendConnector.load(a,this.options.ns,i=>{!i&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(i)})}else n(null)}reloadResources(t,n,r){const a=Qo();return t||(t=this.languages),n||(n=this.options.ns),r||(r=vl),this.services.backendConnector.reload(t,n,o=>{a.resolve(),r(o)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&y0.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function R0(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(UE[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var a=new RegExp($E),o=null;(o=a.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),s=[i,""];i.indexOf("=")>-1&&(s=i.split("=")),t.attrs[s[0]]=s[1],a.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var VE=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,HE=/^\s*$/,WE=Object.create(null);function C0(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var a in n)r.push(a+'="'+n[a]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(C0,"")+""+t.name+">";case"comment":return e+""}}var KE={parse:function(e,t){t||(t={}),t.components||(t.components=WE);var n,r=[],a=[],o=-1,i=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");r.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(VE,function(u,l){if(i){if(u!==""+n.name+">")return;i=!1}var c,h=u.charAt(1)!=="/",p=u.startsWith("");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var a=new RegExp($k),o=null;(o=a.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),s=[i,""];i.indexOf("=")>-1&&(s=i.split("=")),t.attrs[s[0]]=s[1],a.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var Wk=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Hk=/^\s*$/,Vk=Object.create(null);function P0(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var a in n)r.push(a+'="'+n[a]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(P0,"")+""+t.name+">";case"comment":return e+""}}var Kk={parse:function(e,t){t||(t={}),t.components||(t.components=Vk);var n,r=[],a=[],o=-1,i=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");r.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(Wk,function(u,l){if(i){if(u!==""+n.name+">")return;i=!1}var c,h=u.charAt(1)!=="/",p=u.startsWith("