@atmgrupomaggioli/iris-button 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{p as a,g as o,b as t}from"./p-Ca-CmCbL.js";export{s as setNonce}from"./p-Ca-CmCbL.js";var r=()=>{const s=import.meta.url;const o={};if(s!==""){o.resourcesUrl=new URL(".",s).href}return a(o)};r().then((async a=>{await o();return t([["p-54a170a0",[[1,"iris-button",{label:[1],color:[1],icon:[1],disabled:[4],type:[1],loading:[4],size:[1]}]]]],a)}));
1
+ import{p as a,g as o,b as t}from"./p-Ca-CmCbL.js";export{s as setNonce}from"./p-Ca-CmCbL.js";var e=()=>{const s=import.meta.url;const o={};if(s!==""){o.resourcesUrl=new URL(".",s).href}return a(o)};e().then((async a=>{await o();return t([["p-55d7ced4",[[1,"iris-button",{label:[1],color:[1],icon:[1],disabled:[4],type:[1],loading:[4],size:[1]}]]]],a)}));
2
2
  //# sourceMappingURL=iris-button.esm.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as s}from"./p-Ca-CmCbL.js";const i={ERROR_REQUIRED_PROP:"REQUIRED_PROP",check(t){const e=Object.entries(t).filter((([t,e])=>e===undefined)).map((([t])=>t));if(e.length>0){console.error(`${i.ERROR_REQUIRED_PROP}: No se han definido las siguientes propiedades: ${e.join(", ")}`);return false}else{return true}}};const n=t=>typeof t==="string";const r=()=>{let t;let e;const s=new Promise(((s,i)=>{t=s;e=i}));s.resolve=t;s.reject=e;return s};const o=t=>{if(t==null)return"";return""+t};const a=(t,e,s)=>{t.forEach((t=>{if(e[t])s[t]=e[t]}))};const c=/###/g;const u=t=>t&&t.indexOf("###")>-1?t.replace(c,"."):t;const h=t=>!t||n(t);const l=(t,e,s)=>{const i=!n(e)?e:e.split(".");let r=0;while(r<i.length-1){if(h(t))return{};const e=u(i[r]);if(!t[e]&&s)t[e]=new s;if(Object.prototype.hasOwnProperty.call(t,e)){t=t[e]}else{t={}}++r}if(h(t))return{};return{obj:t,k:u(i[r])}};const f=(t,e,s)=>{const{obj:i,k:n}=l(t,e,Object);if(i!==undefined||e.length===1){i[n]=s;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let a=l(t,o,Object);while(a.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);a=l(t,o,Object);if(a?.obj&&typeof a.obj[`${a.k}.${r}`]!=="undefined"){a.obj=undefined}}a.obj[`${a.k}.${r}`]=s};const d=(t,e,s,i)=>{const{obj:n,k:r}=l(t,e,Object);n[r]=n[r]||[];n[r].push(s)};const p=(t,e)=>{const{obj:s,k:i}=l(t,e);if(!s)return undefined;if(!Object.prototype.hasOwnProperty.call(s,i))return undefined;return s[i]};const g=(t,e,s)=>{const i=p(t,s);if(i!==undefined){return i}return p(e,s)};const b=(t,e,s)=>{for(const i in e){if(i!=="__proto__"&&i!=="constructor"){if(i in t){if(n(t[i])||t[i]instanceof String||n(e[i])||e[i]instanceof String){if(s)t[i]=e[i]}else{b(t[i],e[i],s)}}else{t[i]=e[i]}}}return t};const m=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const v=t=>{if(n(t)){return t.replace(/[&<>"'\/]/g,(t=>y[t]))}return t};class ${constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const s=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,s);this.regExpQueue.push(t);return s}}const k=[" ",",","?","!",";"];const x=new $(20);const w=(t,e,s)=>{e=e||"";s=s||"";const i=k.filter((t=>e.indexOf(t)<0&&s.indexOf(t)<0));if(i.length===0)return true;const n=x.getRegExp(`(${i.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(s);if(e>0&&!n.test(t.substring(0,e))){r=true}}return r};const S=(t,e,s=".")=>{if(!t)return undefined;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return undefined;return t[e]}const i=e.split(s);let n=t;for(let t=0;t<i.length;){if(!n||typeof n!=="object"){return undefined}let e;let r="";for(let o=t;o<i.length;++o){if(o!==t){r+=s}r+=i[o];e=n[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<i.length-1){continue}t+=o-t+1;break}}n=e}return n};const N=t=>t?.replace("_","-");const j={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class O{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:";this.logger=t||j;this.options=e;this.debug=e.debug}log(...t){return this.forward(t,"log","",true)}warn(...t){return this.forward(t,"warn","",true)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(t,e,s,i){if(i&&!this.debug)return null;if(n(t[0]))t[0]=`${s}${this.prefix} ${t[0]}`;return this.logger[e](t)}create(t){return new O(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new O(this.logger,t)}}var C=new O;class R{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const s=this.observers[t].get(e)||0;this.observers[t].set(e,s+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t,...e){if(this.observers[t]){const s=Array.from(this.observers[t].entries());s.forEach((([t,s])=>{for(let i=0;i<s;i++){t(...e)}}))}if(this.observers["*"]){const s=Array.from(this.observers["*"].entries());s.forEach((([s,i])=>{for(let n=0;n<i;n++){s.apply(s,[t,...e])}}))}}}class z extends R{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(t,e,s,i={}){const r=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const o=i.ignoreJSONStructure!==undefined?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;if(t.indexOf(".")>-1){a=t.split(".")}else{a=[t,e];if(s){if(Array.isArray(s)){a.push(...s)}else if(n(s)&&r){a.push(...s.split(r))}else{a.push(s)}}}const c=p(this.data,a);if(!c&&!e&&!s&&t.indexOf(".")>-1){t=a[0];e=a[1];s=a.slice(2).join(".")}if(c||!o||!n(s))return c;return S(this.data?.[t]?.[e],s,r)}addResource(t,e,s,i,n={silent:false}){const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;let o=[t,e];if(s)o=o.concat(r?s.split(r):s);if(t.indexOf(".")>-1){o=t.split(".");i=e;e=o[1]}this.addNamespaces(e);f(this.data,o,i);if(!n.silent)this.emit("added",t,e,s,i)}addResources(t,e,s,i={silent:false}){for(const i in s){if(n(s[i])||Array.isArray(s[i]))this.addResource(t,e,i,s[i],{silent:true})}if(!i.silent)this.emit("added",t,e,s)}addResourceBundle(t,e,s,i,n,r={silent:false,skipCopy:false}){let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");i=s;s=e;e=o[1]}this.addNamespaces(e);let a=p(this.data,o)||{};if(!r.skipCopy)s=JSON.parse(JSON.stringify(s));if(i){b(a,s,n)}else{a={...a,...s}}f(this.data,o,a);if(!r.silent)this.emit("added",t,e,s)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const s=e&&Object.keys(e)||[];return!!s.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var L={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,s,i,n){t.forEach((t=>{e=this.processors[t]?.process(e,s,i,n)??e}));return e}};const P={};const B=t=>!n(t)&&typeof t!=="boolean"&&typeof t!=="number";class E extends R{constructor(t,e={}){super();a(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=C.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t,e={interpolation:{}}){const s={...e};if(t==null)return false;const i=this.resolve(t,s);return i?.res!==undefined}extractFromKey(t,e){let s=e.nsSeparator!==undefined?e.nsSeparator:this.options.nsSeparator;if(s===undefined)s=":";const i=e.keySeparator!==undefined?e.keySeparator:this.options.keySeparator;let r=e.ns||this.options.defaultNS||[];const o=s&&t.indexOf(s)>-1;const a=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!w(t,s,i);if(o&&!a){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0){return{key:t,namespaces:n(r)?[r]:r}}const o=t.split(s);if(s!==i||s===i&&this.options.ns.indexOf(o[0])>-1)r=o.shift();t=o.join(i)}return{key:t,namespaces:n(r)?[r]:r}}translate(t,e,s){let i=typeof e==="object"?{...e}:e;if(typeof i!=="object"&&this.options.overloadTranslationOptionHandler){i=this.options.overloadTranslationOptionHandler(arguments)}if(typeof options==="object")i={...i};if(!i)i={};if(t==null)return"";if(!Array.isArray(t))t=[String(t)];const r=i.returnDetails!==undefined?i.returnDetails:this.options.returnDetails;const o=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const{key:a,namespaces:c}=this.extractFromKey(t[t.length-1],i);const u=c[c.length-1];let h=i.nsSeparator!==undefined?i.nsSeparator:this.options.nsSeparator;if(h===undefined)h=":";const l=i.lng||this.language;const f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(f){if(r){return{res:`${u}${h}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(i)}}return`${u}${h}${a}`}if(r){return{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(i)}}return a}const d=this.resolve(t,i);let p=d?.res;const g=d?.usedKey||a;const b=d?.exactUsedKey||a;const m=["[object Number]","[object Function]","[object RegExp]"];const y=i.joinArrays!==undefined?i.joinArrays:this.options.joinArrays;const v=!this.i18nFormat||this.i18nFormat.handleAsObject;const $=i.count!==undefined&&!n(i.count);const k=E.hasDefaultValue(i);const x=$?this.pluralResolver.getSuffix(l,i.count,i):"";const w=i.ordinal&&$?this.pluralResolver.getSuffix(l,i.count,{ordinal:false}):"";const S=$&&!i.ordinal&&i.count===0;const N=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${x}`]||i[`defaultValue${w}`]||i.defaultValue;let j=p;if(v&&!p&&k){j=N}const O=B(j);const C=Object.prototype.toString.apply(j);if(v&&j&&O&&m.indexOf(C)<0&&!(n(y)&&Array.isArray(j))){if(!i.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,j,{...i,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;if(r){d.res=t;d.usedParams=this.getUsedParamsDetails(i);return d}return t}if(o){const t=Array.isArray(j);const e=t?[]:{};const s=t?b:g;for(const t in j){if(Object.prototype.hasOwnProperty.call(j,t)){const n=`${s}${o}${t}`;if(k&&!p){e[t]=this.translate(n,{...i,defaultValue:B(N)?N[t]:undefined,...{joinArrays:false,ns:c}})}else{e[t]=this.translate(n,{...i,...{joinArrays:false,ns:c}})}if(e[t]===n)e[t]=j[t]}}p=e}}else if(v&&n(y)&&Array.isArray(p)){p=p.join(y);if(p)p=this.extendTranslation(p,t,i,s)}else{let e=false;let n=false;if(!this.isValidLookup(p)&&k){e=true;p=N}if(!this.isValidLookup(p)){n=true;p=a}const r=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const c=r&&n?undefined:p;const f=k&&N!==p&&this.options.updateMissing;if(n||e||f){this.logger.log(f?"updateKey":"missingKey",l,u,a,f?N:p);if(o){const t=this.resolve(a,{...i,keySeparator:false});if(t&&t.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 t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let s=0;s<e.length;s++){t.push(e[s])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(i.lng||this.language)}else{t.push(i.lng||this.language)}const s=(t,e,s)=>{const n=k&&s!==p?s:c;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,u,e,n,f,i)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,u,e,n,f,i)}this.emit("missingKey",t,u,e,p)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&$){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,i);if(S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{s([t],a+e,i[`defaultValue${e}`]||N)}))}))}else{s(t,a,N)}}}p=this.extendTranslation(p,t,i,d,s);if(n&&p===a&&this.options.appendNamespaceToMissingKey){p=`${u}${h}${a}`}if((n||e)&&this.options.parseMissingKeyHandler){p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${h}${a}`:a,e?p:undefined,i)}}if(r){d.res=p;d.usedParams=this.getUsedParamsDetails(i);return d}return p}extendTranslation(t,e,s,i,r){if(this.i18nFormat?.parse){t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i})}else if(!s.skipInterpolation){if(s.interpolation)this.interpolator.init({...s,...{interpolation:{...this.options.interpolation,...s.interpolation}}});const o=n(t)&&(s?.interpolation?.skipOnVariables!==undefined?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let c=s.replace&&!n(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables)c={...this.options.interpolation.defaultVariables,...c};t=this.interpolator.interpolate(t,c,s.lng||this.language||i.usedLng,s);if(o){const e=t.match(this.interpolator.nestingRegexp);const i=e&&e.length;if(a<i)s.nest=false}if(!s.lng&&i&&i.res)s.lng=this.language||i.usedLng;if(s.nest!==false)t=this.interpolator.nest(t,((...t)=>{if(r?.[0]===t[0]&&!s.context){this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${e[0]}`);return null}return this.translate(...t,e)}),s);if(s.interpolation)this.interpolator.reset()}const o=s.postProcess||this.options.postProcess;const a=n(o)?[o]:o;if(t!=null&&a?.length&&s.applyPostProcessor!==false){t=L.handle(a,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)}return t}resolve(t,e={}){let s;let i;let r;let o;let a;if(n(t))t=[t];t.forEach((t=>{if(this.isValidLookup(s))return;const c=this.extractFromKey(t,e);const u=c.key;i=u;let h=c.namespaces;if(this.options.fallbackNS)h=h.concat(this.options.fallbackNS);const l=e.count!==undefined&&!n(e.count);const f=l&&!e.ordinal&&e.count===0;const d=e.context!==undefined&&(n(e.context)||typeof e.context==="number")&&e.context!=="";const p=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);h.forEach((t=>{if(this.isValidLookup(s))return;a=t;if(!P[`${p[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)){P[`${p[0]}-${t}`]=true;this.logger.warn(`key "${i}" for languages "${p.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!!!")}p.forEach((i=>{if(this.isValidLookup(s))return;o=i;const n=[u];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(n,u,i,t,e)}else{let t;if(l)t=this.pluralResolver.getSuffix(i,e.count,e);const s=`${this.options.pluralSeparator}zero`;const r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l){n.push(u+t);if(e.ordinal&&t.indexOf(r)===0){n.push(u+t.replace(r,this.options.pluralSeparator))}if(f){n.push(u+s)}}if(d){const i=`${u}${this.options.contextSeparator}${e.context}`;n.push(i);if(l){n.push(i+t);if(e.ordinal&&t.indexOf(r)===0){n.push(i+t.replace(r,this.options.pluralSeparator))}if(f){n.push(i+s)}}}}let a;while(a=n.pop()){if(!this.isValidLookup(s)){r=a;s=this.getResource(i,t,a,e)}}}))}))}));return{res:s,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,s,i={}){if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,s,i);return this.resourceStore.getResource(t,e,s,i)}getUsedParamsDetails(t={}){const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const s=t.replace&&!n(t.replace);let i=s?t.replace:t;if(s&&typeof t.count!=="undefined"){i.count=t.count}if(this.options.interpolation.defaultVariables){i={...this.options.interpolation.defaultVariables,...i}}if(!s){i={...i};for(const t of e){delete i[t]}}return i}static hasDefaultValue(t){const e="defaultValue";for(const s in t){if(Object.prototype.hasOwnProperty.call(t,s)&&e===s.substring(0,e.length)&&undefined!==t[s]){return true}}return false}}class I{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=C.create("languageUtils")}getScriptPartFromCode(t){t=N(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=N(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(n(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}if(e&&this.options.lowerCaseLng){e=e.toLowerCase()}if(e)return e;if(this.options.lowerCaseLng){return t.toLowerCase()}return t}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const s=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(s))e=s}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const s=this.getScriptPartFromCode(t);if(this.isSupportedCode(s))return e=s;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>{if(t===i)return t;if(t.indexOf("-")<0&&i.indexOf("-")<0)return;if(t.indexOf("-")>0&&i.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===i)return t;if(t.indexOf(i)===0&&i.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(t,e){if(!t)return[];if(typeof t==="function")t=t(e);if(n(t))t=[t];if(Array.isArray(t))return t;if(!e)return t.default||[];let s=t[e];if(!s)s=t[this.getScriptPartFromCode(e)];if(!s)s=t[this.formatLanguageCode(e)];if(!s)s=t[this.getLanguagePartFromCode(e)];if(!s)s=t.default;return s||[]}toResolveHierarchy(t,e){const s=this.getFallbackCodes((e===false?[]:e)||this.options.fallbackLng||[],t);const i=[];const r=t=>{if(!t)return;if(this.isSupportedCode(t)){i.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(n(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)){if(this.options.load!=="languageOnly")r(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")r(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")r(this.getLanguagePartFromCode(t))}else if(n(t)){r(this.formatLanguageCode(t))}s.forEach((t=>{if(i.indexOf(t)<0)r(this.formatLanguageCode(t))}));return i}}const A={zero:0,one:1,two:2,few:3,many:4,other:5};const D={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class M{constructor(t,e={}){this.languageUtils=t;this.options=e;this.logger=C.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const s=N(t==="dev"?"en":t);const i=e.ordinal?"ordinal":"cardinal";const n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache){return this.pluralRulesCache[n]}let r;try{r=new Intl.PluralRules(s,{type:i})}catch(s){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return D}if(!t.match(/-|_/))return D;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}this.pluralRulesCache[n]=r;return r}needsPlural(t,e={}){let s=this.getRule(t,e);if(!s)s=this.getRule("dev",e);return s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,s={}){return this.getSuffixes(t,s).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let s=this.getRule(t,e);if(!s)s=this.getRule("dev",e);if(!s)return[];return s.resolvedOptions().pluralCategories.sort(((t,e)=>A[t]-A[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e,s={}){const i=this.getRule(t,s);if(i){return`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,s)}}const F=(t,e,s,i=".",r=true)=>{let o=g(t,e,s);if(!o&&r&&n(s)){o=S(t,s,i);if(o===undefined)o=S(e,s,i)}return o};const T=t=>t.replace(/\$/g,"$$$$");class V{constructor(t={}){this.logger=C.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(t={}){if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:c,unescapeSuffix:u,unescapePrefix:h,nestingPrefix:l,nestingPrefixEscaped:f,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=e!==undefined?e:v;this.escapeValue=s!==undefined?s:true;this.useRawValueToEscape=i!==undefined?i:false;this.prefix=n?m(n):r||"{{";this.suffix=o?m(o):a||"}}";this.formatSeparator=c||",";this.unescapePrefix=u?"":h||"-";this.unescapeSuffix=this.unescapePrefix?"":u||"";this.nestingPrefix=l?m(l):f||m("$t(");this.nestingSuffix=d?m(d):p||m(")");this.nestingOptionsSeparator=g||",";this.maxReplaces=b||1e3;this.alwaysFormat=y!==undefined?y:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return new RegExp(e,"g")};this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`);this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,s,i){let r;let a;let c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const h=t=>{if(t.indexOf(this.formatSeparator)<0){const n=F(e,u,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,undefined,s,{...i,...e,interpolationkey:t}):n}const n=t.split(this.formatSeparator);const r=n.shift().trim();const o=n.join(this.formatSeparator).trim();return this.format(F(e,u,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,s,{...i,...e,interpolationkey:r})};this.resetRegExp();const l=i?.missingInterpolationHandler||this.options.missingInterpolationHandler;const f=i?.interpolation?.skipOnVariables!==undefined?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const d=[{regex:this.regexpUnescape,safeValue:t=>T(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?T(this.escape(t)):T(t)}];d.forEach((e=>{c=0;while(r=e.regex.exec(t)){const s=r[1].trim();a=h(s);if(a===undefined){if(typeof l==="function"){const e=l(t,r,i);a=n(e)?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,s)){a=""}else if(f){a=r[0];continue}else{this.logger.warn(`missed to pass in variable ${s} for interpolating ${t}`);a=""}}else if(!n(a)&&!this.useRawValueToEscape){a=o(a)}const u=e.safeValue(a);t=t.replace(r[0],u);if(f){e.regex.lastIndex+=a.length;e.regex.lastIndex-=r[0].length}else{e.regex.lastIndex=0}c++;if(c>=this.maxReplaces){break}}}));return t}nest(t,e,s={}){let i;let r;let a;const c=(t,e)=>{const s=this.nestingOptionsSeparator;if(t.indexOf(s)<0)return t;const i=t.split(new RegExp(`${s}[ ]*{`));let n=`{${i[1]}`;t=i[0];n=this.interpolate(n,a);const r=n.match(/'/g);const o=n.match(/"/g);if((r?.length??0)%2===0&&!o||o.length%2!==0){n=n.replace(/'/g,'"')}try{a=JSON.parse(n);if(e)a={...e,...a}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${s}${n}`}if(a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1)delete a.defaultValue;return t};while(i=this.nestingRegexp.exec(t)){let u=[];a={...s};a=a.replace&&!n(a.replace)?a.replace:a;a.applyPostProcessor=false;delete a.defaultValue;let h=false;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const t=i[1].split(this.formatSeparator).map((t=>t.trim()));i[1]=t.shift();u=t;h=true}r=e(c.call(this,i[1].trim(),a),a);if(r&&i[0]===t&&!n(r))return r;if(!n(r))r=o(r);if(!r){this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`);r=""}if(h){r=u.reduce(((t,e)=>this.format(t,e,s.lng,{...s,interpolationkey:i[1].trim()})),r.trim())}t=t.replace(i[0],r);this.regexp.lastIndex=0}return t}}const K=t=>{let e=t.toLowerCase().trim();const s={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const n=i[1].substring(0,i[1].length-1);if(e==="currency"&&n.indexOf(":")<0){if(!s.currency)s.currency=n.trim()}else if(e==="relativetime"&&n.indexOf(":")<0){if(!s.range)s.range=n.trim()}else{const t=n.split(";");t.forEach((t=>{if(t){const[e,...i]=t.split(":");const n=i.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!s[r])s[r]=n;if(n==="false")s[r]=false;if(n==="true")s[r]=true;if(!isNaN(n))s[r]=parseInt(n,10)}}))}}return{formatName:e,formatOptions:s}};const _=t=>{const e={};return(s,i,n)=>{let r=n;if(n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]){r={...r,[n.interpolationkey]:undefined}}const o=i+JSON.stringify(r);let a=e[o];if(!a){a=t(N(i),n);e[o]=a}return a(s)}};const U=t=>(e,s,i)=>t(N(s),i)(e);class H{constructor(t={}){this.logger=C.create("formatter");this.options=t;this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const s=e.cacheInBuiltFormats?_:U;this.formats={number:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e});return t=>s.format(t)})),currency:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>s.format(t)})),datetime:s(((t,e)=>{const s=new Intl.DateTimeFormat(t,{...e});return t=>s.format(t)})),relativetime:s(((t,e)=>{const s=new Intl.RelativeTimeFormat(t,{...e});return t=>s.format(t,e.range||"day")})),list:s(((t,e)=>{const s=new Intl.ListFormat(t,{...e});return t=>s.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=_(e)}format(t,e,s,i={}){const n=e.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find((t=>t.indexOf(")")>-1))){const t=n.findIndex((t=>t.indexOf(")")>-1));n[0]=[n[0],...n.splice(1,t)].join(this.formatSeparator)}const r=n.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=K(e);if(this.formats[n]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};const a=o.locale||o.lng||i.locale||i.lng||s;e=this.formats[n](t,a,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${n}`)}return t}),t);return r}}const J=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class Y extends R{constructor(t,e,s,i={}){super();this.backend=t;this.store=e;this.services=s;this.languageUtils=s.languageUtils;this.options=i;this.logger=C.create("backendConnector");this.waitingReads=[];this.maxParallelReads=i.maxParallelReads||10;this.readingCalls=0;this.maxRetries=i.maxRetries>=0?i.maxRetries:5;this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350;this.state={};this.queue=[];this.backend?.init?.(s,i.backend,i)}queueLoad(t,e,s,i){const n={};const r={};const o={};const a={};t.forEach((t=>{let i=true;e.forEach((e=>{const o=`${t}|${e}`;if(!s.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;i=false;if(r[o]===undefined)r[o]=true;if(n[o]===undefined)n[o]=true;if(a[e]===undefined)a[e]=true}}));if(!i)o[t]=true}));if(Object.keys(n).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i})}return{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,s){const i=t.split("|");const n=i[0];const r=i[1];if(e)this.emit("failedLoading",n,r,e);if(!e&&s){this.store.addResourceBundle(n,r,s,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&s)this.state[t]=0;const o={};this.queue.forEach((s=>{d(s.loaded,[n],r);J(s,t);if(e)s.errors.push(e);if(s.pendingCount===0&&!s.done){Object.keys(s.loaded).forEach((t=>{if(!o[t])o[t]={};const e=s.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));s.done=true;if(s.errors.length){s.callback(s.errors)}else{s.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,s,i=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:s,tried:i,wait:n,callback:r});return}this.readingCalls++;const o=(o,a)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&a&&i<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,s,i+1,n*2,r)}),n);return}r(o,a)};const a=this.backend[s].bind(this.backend);if(a.length===2){try{const s=a(t,e);if(s&&typeof s.then==="function"){s.then((t=>o(null,t))).catch(o)}else{o(null,s)}}catch(t){o(t)}return}return a(t,e,o)}prepareLoading(t,e,s={},i){if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return i&&i()}if(n(t))t=this.languageUtils.toResolveHierarchy(t);if(n(e))e=[e];const r=this.queueLoad(t,e,s,i);if(!r.toLoad.length){if(!r.pending.length)i();return null}r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,s){this.prepareLoading(t,e,{},s)}reload(t,e,s){this.prepareLoading(t,e,{reload:true},s)}loadOne(t,e=""){const s=t.split("|");const i=s[0];const n=s[1];this.read(i,n,"read",undefined,undefined,((s,r)=>{if(s)this.logger.warn(`${e}loading namespace ${n} for language ${i} failed`,s);if(!s&&r)this.logger.log(`${e}loaded namespace ${n} for language ${i}`,r);this.loaded(t,s,r)}))}saveMissing(t,e,s,i,n,r={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${s}" as the namespace "${e}" 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===undefined||s===null||s==="")return;if(this.backend?.create){const a={...r,isUpdate:n};const c=this.backend.create.bind(this.backend);if(c.length<6){try{let n;if(c.length===5){n=c(t,e,s,i,a)}else{n=c(t,e,s,i)}if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}}else{c(t,e,s,i,o,a)}}if(!t||!t[0])return;this.store.addResource(t[0],e,s,i)}}const W=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]==="object")e=t[1];if(n(t[1]))e.defaultValue=t[1];if(n(t[2]))e.tDescription=t[2];if(typeof t[2]==="object"||typeof t[3]==="object"){const s=t[3]||t[2];Object.keys(s).forEach((t=>{e[t]=s[t]}))}return e},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true},cacheInBuiltFormats:true});const q=t=>{if(n(t.ns))t.ns=[t.ns];if(n(t.fallbackLng))t.fallbackLng=[t.fallbackLng];if(n(t.fallbackNS))t.fallbackNS=[t.fallbackNS];if(t.supportedLngs?.indexOf?.("cimode")<0){t.supportedLngs=t.supportedLngs.concat(["cimode"])}if(typeof t.initImmediate==="boolean")t.initAsync=t.initImmediate;return t};const G=()=>{};const Q=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class X extends R{constructor(t={},e){super();this.options=q(t);this.services={};this.logger=C;this.modules={external:[]};Q(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(t={},e){this.isInitializing=true;if(typeof t==="function"){e=t;t={}}if(t.defaultNS==null&&t.ns){if(n(t.ns)){t.defaultNS=t.ns}else if(t.ns.indexOf("translation")<0){t.defaultNS=t.ns[0]}}const s=W();this.options={...s,...this.options,...q(t)};this.options.interpolation={...s.interpolation,...this.options.interpolation};if(t.keySeparator!==undefined){this.options.userDefinedKeySeparator=t.keySeparator}if(t.nsSeparator!==undefined){this.options.userDefinedNsSeparator=t.nsSeparator}const i=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){C.init(i(this.modules.logger),this.options)}else{C.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=H}const e=new I(this.options);this.store=new z(this.options.resources,this.options);const n=this.services;n.logger=C;n.resourceStore=this.store;n.languageUtils=e;n.pluralResolver=new M(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});if(t&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)){n.formatter=i(t);n.formatter.init(n,this.options);this.options.interpolation.format=n.formatter.format.bind(n.formatter)}n.interpolator=new V(this.options);n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};n.backendConnector=new Y(i(this.modules.backend),n.resourceStore,n,this.options);n.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)}));if(this.modules.languageDetector){n.languageDetector=i(this.modules.languageDetector);if(n.languageDetector.init)n.languageDetector.init(n,this.options.detection,this.options)}if(this.modules.i18nFormat){n.i18nFormat=i(this.modules.i18nFormat);if(n.i18nFormat.init)n.i18nFormat.init(this)}this.translator=new E(this.services,this.options);this.translator.on("*",((t,...e)=>{this.emit(t,...e)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!e)e=G;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const o=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];o.forEach((t=>{this[t]=(...e)=>this.store[t](...e)}));const a=["addResource","addResources","addResourceBundle","removeResourceBundle"];a.forEach((t=>{this[t]=(...e)=>{this.store[t](...e);return this}}));const c=r();const u=()=>{const t=(t,s)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);c.resolve(s);e(t,s)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){u()}else{setTimeout(u,0)}return c}loadResources(t,e=G){let s=e;const i=n(t)?t:this.language;if(typeof t==="function")s=t;if(!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const s=this.services.languageUtils.toResolveHierarchy(e);s.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!i){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(i)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);s(t)}))}else{s(null)}}reloadResources(t,e,s){const i=r();if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e=undefined}if(!t)t=this.languages;if(!e)e=this.options.ns;if(!s)s=G;this.services.backendConnector.reload(t,e,(t=>{i.resolve();s(t)}));return i}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()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){L.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}if(!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;this.languages.unshift(t)}}changeLanguage(t,e){this.isLanguageChangingTo=t;const s=r();this.emit("languageChanging",t);const i=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const o=(n,r)=>{if(r){if(this.isLanguageChangingTo===t){i(r);this.translator.changeLanguage(r);this.isLanguageChangingTo=undefined;this.emit("languageChanged",r);this.logger.log("languageChanged",r)}}else{this.isLanguageChangingTo=undefined}s.resolve(((...t)=>this.t(...t)));if(e)e(n,((...t)=>this.t(...t)))};const a=e=>{if(!t&&!e&&this.services.languageDetector)e=[];const s=n(e)?e:e&&e[0];const r=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(n(e)?[e]:e);if(r){if(!this.language){i(r)}if(!this.translator.language)this.translator.changeLanguage(r);this.services.languageDetector?.cacheUserLanguage?.(r)}this.loadResources(r,(t=>{o(t,r)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){a(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(a)}else{this.services.languageDetector.detect(a)}}else{a(t)}return s}getFixedT(t,e,s){const i=(t,e,...n)=>{let r;if(typeof e!=="object"){r=this.options.overloadTranslationOptionHandler([t,e].concat(n))}else{r={...e}}r.lng=r.lng||i.lng;r.lngs=r.lngs||i.lngs;r.ns=r.ns||i.ns;if(r.keyPrefix!=="")r.keyPrefix=r.keyPrefix||s||i.keyPrefix;const o=this.options.keySeparator||".";let a;if(r.keyPrefix&&Array.isArray(t)){a=t.map((t=>`${r.keyPrefix}${o}${t}`))}else{a=r.keyPrefix?`${r.keyPrefix}${o}${t}`:t}return this.t(a,r)};if(n(t)){i.lng=t}else{i.lngs=t}i.ns=e;i.keyPrefix=s;return i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const s=e.lng||this.resolvedLanguage||this.languages[0];const i=this.options?this.options.fallbackLng:false;const n=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return true;const r=(t,e)=>{const s=this.services.backendConnector.state[`${t}|${e}`];return s===-1||s===0||s===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(s,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(s,t)&&(!i||r(n,t)))return true;return false}loadNamespaces(t,e){const s=r();if(!this.options.ns){if(e)e();return Promise.resolve()}if(n(t))t=[t];t.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{s.resolve();if(e)e(t)}));return s}loadLanguages(t,e){const s=r();if(n(t))t=[t];const i=this.options.preload||[];const o=t.filter((t=>i.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!o.length){if(e)e();return Promise.resolve()}this.options.preload=i.concat(o);this.loadResources((t=>{s.resolve();if(e)e(t)}));return s}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";const e=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];const s=this.services?.languageUtils||new I(W());return e.indexOf(s.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){return new X(t,e)}cloneInstance(t={},e=G){const s=t.forkResourceStore;if(s)delete t.forkResourceStore;const i={...this.options,...t,...{isClone:true}};const n=new X(i);if(t.debug!==undefined||t.prefix!==undefined){n.logger=n.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{n[t]=this[t]}));n.services={...this.services};n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};if(s){const t=Object.keys(this.store.data).reduce(((t,e)=>{t[e]={...this.store.data[e]};t[e]=Object.keys(t[e]).reduce(((s,i)=>{s[i]={...t[e][i]};return s}),t[e]);return t}),{});n.store=new z(t,i);n.services.resourceStore=n.store}n.translator=new E(n.services,i);n.translator.on("*",((t,...e)=>{n.emit(t,...e)}));n.init(i,e);n.translator.options=i;n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};return n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Z=X.createInstance();Z.createInstance=X.createInstance;const tt="Cerrar";const et="Buscar";const st="Maximizar";const it="No";const nt="Cancelar";const rt="Aceptar";var ot={"Seleccione un valor de la lista":"Seleccione un valor de la lista","Buscando resultados...":"Buscando resultados...",Cerrar:tt,Buscar:et,Maximizar:st,"El campo no puede estar vacío.":"El campo no puede estar vacío.","No se han encontrado resultados":"No se han encontrado resultados","Debes escribir al menos {{count}} caracteres para buscar.":"Debes escribir al menos {{count}} caracteres para buscar.",Sí:"Sí",No:it,Cancelar:nt,Aceptar:rt};const at="Close";const ct="Search";const ut="Maximize";const ht="No";const lt="Cancel";const ft="Accept";var dt={"Seleccione un valor de la lista":"Select a value from the list","Buscando resultados...":"Searching results...",Cerrar:at,Buscar:ct,Maximizar:ut,"El campo no puede estar vacío.":"The field cannot be empty.","No se han encontrado resultados":"No results found","Debes escribir al menos {{count}} caracteres para buscar.":"You must type at least {{count}} characters to search.",Sí:"Yes",No:ht,Cancelar:lt,Aceptar:ft};const pt="Pechar";const gt="Buscar";const bt="Maximizar";const mt="Non";const yt="Cancelar";const vt="Aceptar";var $t={"Seleccione un valor de la lista":"Seleccione un valor da lista","Buscando resultados...":"Buscando resultados...",Cerrar:pt,Buscar:gt,Maximizar:bt,"El campo no puede estar vacío.":"O campo non pode estar baleiro.","No se han encontrado resultados":"Non se atoparon resultados","Debes escribir al menos {{count}} caracteres para buscar.":"Debes escribir polo menos {{count}} caracteres para buscar.",Sí:"Si",No:mt,Cancelar:yt,Aceptar:vt};const kt="Tancar";const xt="Cercar";const wt="Maximitzar";const St="No";const Nt="cancel·lar";const jt="Acceptar";var Ot={"Seleccione un valor de la lista":"Seleccioneu un valor de la llista","Buscando resultados...":"Cercant resultats...",Cerrar:kt,Buscar:xt,Maximizar:wt,"El campo no puede estar vacío.":"El camp no pot estar buit.","No se han encontrado resultados":"No s'han trobat resultats","Debes escribir al menos {{count}} caracteres para buscar.":"Heu d'escriure almenys {{count}} caràcters per buscar.",Sí:"Sí",No:St,Cancelar:Nt,Aceptar:jt};const Ct="Itxi";const Rt="Bilatu";const zt="Handitu";const Lt="Ez";const Pt="Utzi";const Bt="Onartu";var Et={"Seleccione un valor de la lista":"Aukeratu zerrendako balio bat","Buscando resultados...":"Emaitzak bilatzen...",Cerrar:Ct,Buscar:Rt,Maximizar:zt,"El campo no puede estar vacío.":"Eremua ezin da hutsik egon.","No se han encontrado resultados":"Ez da emaitzarik aurkitu","Debes escribir al menos {{count}} caracteres para buscar.":"Gutxienez {{count}} karaktere idatzi behar dituzu bilatzeko.",Sí:"Bai",No:Lt,Cancelar:Pt,Aceptar:Bt};const It="Chiudi";const At="Cerca";const Dt="Ingrandisci";const Mt="No";const Ft="Annulla";const Tt="Accetta";var Vt={"Seleccione un valor de la lista":"Seleziona un valore dalla lista","Buscando resultados...":"Ricerca risultati...",Cerrar:It,Buscar:At,Maximizar:Dt,"El campo no puede estar vacío.":"Il campo non può essere vuoto.","No se han encontrado resultados":"Nessun risultato trovato","Debes escribir al menos {{count}} caracteres para buscar.":"Devi digitare almeno {{count}} caratteri per cercare.",Sí:"Sì",No:Mt,Cancelar:Ft,Aceptar:Tt};const Kt="iris-language";const _t=()=>{const t=localStorage.getItem(Kt);return t||"es"};Z.init({lng:_t(),fallbackLng:"en",resources:{es:{translation:ot},en:{translation:dt},gl:{translation:$t},ca:{translation:Ot},eu:{translation:Et},it:{translation:Vt}}});class Ut{static instance;components=new Set;constructor(){Z.on("languageChanged",(()=>{this.components.forEach((t=>{if(t.forceUpdate){t.forceUpdate()}}))}))}static getInstance(){if(!Ut.instance){Ut.instance=new Ut}return Ut.instance}registerComponent(t){this.components.add(t)}unregisterComponent(t){this.components.delete(t)}}Ut.getInstance();const Ht=t=>window.__IRIS_GLOBAL_CONFIG__?.[t];const Jt="@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes show-loading{0%{opacity:0}100%{opacity:1}}:host{display:inline-block}button{width:100%;font-size:var(--font-size);padding:8px 12px;color:var(--white);background-color:var(--company-primary-dark);-webkit-transition:background-color 0.2s ease;-ms-transition:background-color 0.2s ease;transition:background-color 0.2s ease;border:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:-ms-flexbox;display:-webkit-box;display:flex;align-items:center;justify-content:center;cursor:pointer;gap:0.1rem;font-family:var(--font-primary)}button:hover{background-color:var(--company-primary-focus)}button:focus{outline:2px solid var(--blue_light);outline-offset:1px}button:not([type=icon],[type=fab]) .material-symbols-rounded,button:not([type=icon],[type=fab]) .loading{margin-right:5px}button[type=fab],button[type=icon]{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;height:36px;width:36px;padding:0;display:-ms-flexbox;display:-webkit-box;display:flex;justify-content:center}button iris-icon{display:-ms-flexbox;display:-webkit-box;display:flex}button iris-loading{display:-ms-flexbox;display:-webkit-box;display:flex;height:22px;align-items:center}button[color=primary]{background-color:var(--company-primary-dark)}button[color=primary]:hover{background-color:var(--company-primary-focus)}button[color=primary][type=icon]{background-color:unset;color:var(--company-primary-dark)}button[color=primary][type=icon]:hover{background-color:var(--company-primary-light)}button[color=success]{background-color:var(--company-success-dark)}button[color=success]:hover{background-color:var(--company-success-focus)}button[color=success][type=icon]{background-color:unset;color:var(--company-success-dark)}button[color=success][type=icon]:hover{background-color:var(--company-success-light)}button[color=warning]{background-color:var(--company-warning-dark)}button[color=warning]:hover{background-color:var(--company-warning-focus)}button[color=warning][type=icon]{background-color:unset;color:var(--company-warning-dark)}button[color=warning][type=icon]:hover{background-color:var(--company-warning-light)}button[color=error]{background-color:var(--company-error-dark)}button[color=error]:hover{background-color:var(--company-error-focus)}button[color=error][type=icon]{background-color:unset;color:var(--company-error-dark)}button[color=error][type=icon]:hover{background-color:var(--company-error-light)}button[color=basic]{background-color:var(--company-basic-dark);color:var(--black);background-color:var(--company-basic-light)}button[color=basic]:hover{background-color:var(--company-basic-focus)}button[color=basic][type=icon]{background-color:unset;color:var(--company-basic-dark)}button[color=basic][type=icon]:hover{background-color:var(--company-basic-light)}button:disabled{background-color:var(--company-basic-focus);color:var(--company-basic-light);cursor:not-allowed}button:disabled:hover{background-color:var(--company-basic-focus)}button.small{font-size:calc(var(--font-size) * 0.8)}button.small[type=fab],button.small[type=icon]{height:calc(36px * 0.8);width:calc(36px * 0.8)}button.large{font-size:calc(var(--font-size) * 1.2)}button.large[type=fab],button.large[type=icon]{height:calc(36px * 1.2);width:calc(36px * 1.2)}@media (min-width: 576px){button{width:auto}}";const Yt=class{constructor(s){t(this,s);this.buttonClicked=e(this,"buttonClicked",1);this.buttonFocused=e(this,"buttonFocused",7);this.ready=e(this,"ready",7)}label;color=Ht("IrisButton")?.color||"primary";icon;disabled=Ht("IrisButton")?.disabled||false;type=Ht("IrisButton")?.type||"";loading=Ht("IrisButton")?.loading||false;size=Ht("IrisButton")?.size||"medium";button;buttonClicked;buttonFocused;ready;handleClick=t=>{t.stopPropagation();this.button.disabled=true;setTimeout((()=>{if(!this.loading){this.button.disabled=false}}),1e3);this.buttonClicked.emit(t)};handleFocus=t=>{this.buttonFocused.emit(t)};componentDidLoad(){this.ready.emit()}render(){const t={label:this.label,icon:this.icon};if(!i.check(t))return;return s("button",{class:`${this.size}`,color:this.color,type:this.type,onClick:this.handleClick,disabled:this.disabled||this.loading,onFocus:this.handleFocus,ref:t=>this.button=t,title:this.label},!this.loading?s("iris-icon",{icon:this.icon,size:this.size}):s("div",{class:"loading"},s("iris-loading",{size:"small",color:this.color})),this.type=="icon"||this.type=="fab"?"":this.label)}};Yt.style=Jt;export{Yt as iris_button};
2
- //# sourceMappingURL=p-54a170a0.entry.js.map
1
+ import{r as t,c as e,h as s}from"./p-Ca-CmCbL.js";const i={ERROR_REQUIRED_PROP:"REQUIRED_PROP",check(t){const e=Object.entries(t).filter((([t,e])=>e===undefined)).map((([t])=>t));if(e.length>0){console.error(`${i.ERROR_REQUIRED_PROP}: No se han definido las siguientes propiedades: ${e.join(", ")}`);return false}else{return true}}};const n=t=>typeof t==="string";const r=()=>{let t;let e;const s=new Promise(((s,i)=>{t=s;e=i}));s.resolve=t;s.reject=e;return s};const o=t=>{if(t==null)return"";return""+t};const a=(t,e,s)=>{t.forEach((t=>{if(e[t])s[t]=e[t]}))};const c=/###/g;const u=t=>t&&t.indexOf("###")>-1?t.replace(c,"."):t;const l=t=>!t||n(t);const h=(t,e,s)=>{const i=!n(e)?e:e.split(".");let r=0;while(r<i.length-1){if(l(t))return{};const e=u(i[r]);if(!t[e]&&s)t[e]=new s;if(Object.prototype.hasOwnProperty.call(t,e)){t=t[e]}else{t={}}++r}if(l(t))return{};return{obj:t,k:u(i[r])}};const f=(t,e,s)=>{const{obj:i,k:n}=h(t,e,Object);if(i!==undefined||e.length===1){i[n]=s;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let a=h(t,o,Object);while(a.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);a=h(t,o,Object);if(a?.obj&&typeof a.obj[`${a.k}.${r}`]!=="undefined"){a.obj=undefined}}a.obj[`${a.k}.${r}`]=s};const d=(t,e,s,i)=>{const{obj:n,k:r}=h(t,e,Object);n[r]=n[r]||[];n[r].push(s)};const p=(t,e)=>{const{obj:s,k:i}=h(t,e);if(!s)return undefined;if(!Object.prototype.hasOwnProperty.call(s,i))return undefined;return s[i]};const g=(t,e,s)=>{const i=p(t,s);if(i!==undefined){return i}return p(e,s)};const b=(t,e,s)=>{for(const i in e){if(i!=="__proto__"&&i!=="constructor"){if(i in t){if(n(t[i])||t[i]instanceof String||n(e[i])||e[i]instanceof String){if(s)t[i]=e[i]}else{b(t[i],e[i],s)}}else{t[i]=e[i]}}}return t};const m=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const v=t=>{if(n(t)){return t.replace(/[&<>"'\/]/g,(t=>y[t]))}return t};class ${constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const s=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,s);this.regExpQueue.push(t);return s}}const k=[" ",",","?","!",";"];const x=new $(20);const w=(t,e,s)=>{e=e||"";s=s||"";const i=k.filter((t=>e.indexOf(t)<0&&s.indexOf(t)<0));if(i.length===0)return true;const n=x.getRegExp(`(${i.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(s);if(e>0&&!n.test(t.substring(0,e))){r=true}}return r};const S=(t,e,s=".")=>{if(!t)return undefined;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return undefined;return t[e]}const i=e.split(s);let n=t;for(let t=0;t<i.length;){if(!n||typeof n!=="object"){return undefined}let e;let r="";for(let o=t;o<i.length;++o){if(o!==t){r+=s}r+=i[o];e=n[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<i.length-1){continue}t+=o-t+1;break}}n=e}return n};const N=t=>t?.replace("_","-");const j={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class O{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:";this.logger=t||j;this.options=e;this.debug=e.debug}log(...t){return this.forward(t,"log","",true)}warn(...t){return this.forward(t,"warn","",true)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(t,e,s,i){if(i&&!this.debug)return null;if(n(t[0]))t[0]=`${s}${this.prefix} ${t[0]}`;return this.logger[e](t)}create(t){return new O(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new O(this.logger,t)}}var C=new O;class z{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const s=this.observers[t].get(e)||0;this.observers[t].set(e,s+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t,...e){if(this.observers[t]){const s=Array.from(this.observers[t].entries());s.forEach((([t,s])=>{for(let i=0;i<s;i++){t(...e)}}))}if(this.observers["*"]){const s=Array.from(this.observers["*"].entries());s.forEach((([s,i])=>{for(let n=0;n<i;n++){s.apply(s,[t,...e])}}))}}}class R extends z{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(t,e,s,i={}){const r=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const o=i.ignoreJSONStructure!==undefined?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;if(t.indexOf(".")>-1){a=t.split(".")}else{a=[t,e];if(s){if(Array.isArray(s)){a.push(...s)}else if(n(s)&&r){a.push(...s.split(r))}else{a.push(s)}}}const c=p(this.data,a);if(!c&&!e&&!s&&t.indexOf(".")>-1){t=a[0];e=a[1];s=a.slice(2).join(".")}if(c||!o||!n(s))return c;return S(this.data?.[t]?.[e],s,r)}addResource(t,e,s,i,n={silent:false}){const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;let o=[t,e];if(s)o=o.concat(r?s.split(r):s);if(t.indexOf(".")>-1){o=t.split(".");i=e;e=o[1]}this.addNamespaces(e);f(this.data,o,i);if(!n.silent)this.emit("added",t,e,s,i)}addResources(t,e,s,i={silent:false}){for(const i in s){if(n(s[i])||Array.isArray(s[i]))this.addResource(t,e,i,s[i],{silent:true})}if(!i.silent)this.emit("added",t,e,s)}addResourceBundle(t,e,s,i,n,r={silent:false,skipCopy:false}){let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");i=s;s=e;e=o[1]}this.addNamespaces(e);let a=p(this.data,o)||{};if(!r.skipCopy)s=JSON.parse(JSON.stringify(s));if(i){b(a,s,n)}else{a={...a,...s}}f(this.data,o,a);if(!r.silent)this.emit("added",t,e,s)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const s=e&&Object.keys(e)||[];return!!s.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var E={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,s,i,n){t.forEach((t=>{e=this.processors[t]?.process(e,s,i,n)??e}));return e}};const L={};const P=t=>!n(t)&&typeof t!=="boolean"&&typeof t!=="number";class B extends z{constructor(t,e={}){super();a(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=C.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t,e={interpolation:{}}){const s={...e};if(t==null)return false;const i=this.resolve(t,s);return i?.res!==undefined}extractFromKey(t,e){let s=e.nsSeparator!==undefined?e.nsSeparator:this.options.nsSeparator;if(s===undefined)s=":";const i=e.keySeparator!==undefined?e.keySeparator:this.options.keySeparator;let r=e.ns||this.options.defaultNS||[];const o=s&&t.indexOf(s)>-1;const a=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!w(t,s,i);if(o&&!a){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0){return{key:t,namespaces:n(r)?[r]:r}}const o=t.split(s);if(s!==i||s===i&&this.options.ns.indexOf(o[0])>-1)r=o.shift();t=o.join(i)}return{key:t,namespaces:n(r)?[r]:r}}translate(t,e,s){let i=typeof e==="object"?{...e}:e;if(typeof i!=="object"&&this.options.overloadTranslationOptionHandler){i=this.options.overloadTranslationOptionHandler(arguments)}if(typeof options==="object")i={...i};if(!i)i={};if(t==null)return"";if(!Array.isArray(t))t=[String(t)];const r=i.returnDetails!==undefined?i.returnDetails:this.options.returnDetails;const o=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const{key:a,namespaces:c}=this.extractFromKey(t[t.length-1],i);const u=c[c.length-1];let l=i.nsSeparator!==undefined?i.nsSeparator:this.options.nsSeparator;if(l===undefined)l=":";const h=i.lng||this.language;const f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode"){if(f){if(r){return{res:`${u}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}}return`${u}${l}${a}`}if(r){return{res:a,usedKey:a,exactUsedKey:a,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}}return a}const d=this.resolve(t,i);let p=d?.res;const g=d?.usedKey||a;const b=d?.exactUsedKey||a;const m=["[object Number]","[object Function]","[object RegExp]"];const y=i.joinArrays!==undefined?i.joinArrays:this.options.joinArrays;const v=!this.i18nFormat||this.i18nFormat.handleAsObject;const $=i.count!==undefined&&!n(i.count);const k=B.hasDefaultValue(i);const x=$?this.pluralResolver.getSuffix(h,i.count,i):"";const w=i.ordinal&&$?this.pluralResolver.getSuffix(h,i.count,{ordinal:false}):"";const S=$&&!i.ordinal&&i.count===0;const N=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${x}`]||i[`defaultValue${w}`]||i.defaultValue;let j=p;if(v&&!p&&k){j=N}const O=P(j);const C=Object.prototype.toString.apply(j);if(v&&j&&O&&m.indexOf(C)<0&&!(n(y)&&Array.isArray(j))){if(!i.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,j,{...i,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;if(r){d.res=t;d.usedParams=this.getUsedParamsDetails(i);return d}return t}if(o){const t=Array.isArray(j);const e=t?[]:{};const s=t?b:g;for(const t in j){if(Object.prototype.hasOwnProperty.call(j,t)){const n=`${s}${o}${t}`;if(k&&!p){e[t]=this.translate(n,{...i,defaultValue:P(N)?N[t]:undefined,...{joinArrays:false,ns:c}})}else{e[t]=this.translate(n,{...i,...{joinArrays:false,ns:c}})}if(e[t]===n)e[t]=j[t]}}p=e}}else if(v&&n(y)&&Array.isArray(p)){p=p.join(y);if(p)p=this.extendTranslation(p,t,i,s)}else{let e=false;let n=false;if(!this.isValidLookup(p)&&k){e=true;p=N}if(!this.isValidLookup(p)){n=true;p=a}const r=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const c=r&&n?undefined:p;const f=k&&N!==p&&this.options.updateMissing;if(n||e||f){this.logger.log(f?"updateKey":"missingKey",h,u,a,f?N:p);if(o){const t=this.resolve(a,{...i,keySeparator:false});if(t&&t.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 t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let s=0;s<e.length;s++){t.push(e[s])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(i.lng||this.language)}else{t.push(i.lng||this.language)}const s=(t,e,s)=>{const n=k&&s!==p?s:c;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,u,e,n,f,i)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,u,e,n,f,i)}this.emit("missingKey",t,u,e,p)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&$){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,i);if(S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{s([t],a+e,i[`defaultValue${e}`]||N)}))}))}else{s(t,a,N)}}}p=this.extendTranslation(p,t,i,d,s);if(n&&p===a&&this.options.appendNamespaceToMissingKey){p=`${u}${l}${a}`}if((n||e)&&this.options.parseMissingKeyHandler){p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${l}${a}`:a,e?p:undefined,i)}}if(r){d.res=p;d.usedParams=this.getUsedParamsDetails(i);return d}return p}extendTranslation(t,e,s,i,r){if(this.i18nFormat?.parse){t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i})}else if(!s.skipInterpolation){if(s.interpolation)this.interpolator.init({...s,...{interpolation:{...this.options.interpolation,...s.interpolation}}});const o=n(t)&&(s?.interpolation?.skipOnVariables!==undefined?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let c=s.replace&&!n(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables)c={...this.options.interpolation.defaultVariables,...c};t=this.interpolator.interpolate(t,c,s.lng||this.language||i.usedLng,s);if(o){const e=t.match(this.interpolator.nestingRegexp);const i=e&&e.length;if(a<i)s.nest=false}if(!s.lng&&i&&i.res)s.lng=this.language||i.usedLng;if(s.nest!==false)t=this.interpolator.nest(t,((...t)=>{if(r?.[0]===t[0]&&!s.context){this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${e[0]}`);return null}return this.translate(...t,e)}),s);if(s.interpolation)this.interpolator.reset()}const o=s.postProcess||this.options.postProcess;const a=n(o)?[o]:o;if(t!=null&&a?.length&&s.applyPostProcessor!==false){t=E.handle(a,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)}return t}resolve(t,e={}){let s;let i;let r;let o;let a;if(n(t))t=[t];t.forEach((t=>{if(this.isValidLookup(s))return;const c=this.extractFromKey(t,e);const u=c.key;i=u;let l=c.namespaces;if(this.options.fallbackNS)l=l.concat(this.options.fallbackNS);const h=e.count!==undefined&&!n(e.count);const f=h&&!e.ordinal&&e.count===0;const d=e.context!==undefined&&(n(e.context)||typeof e.context==="number")&&e.context!=="";const p=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);l.forEach((t=>{if(this.isValidLookup(s))return;a=t;if(!L[`${p[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)){L[`${p[0]}-${t}`]=true;this.logger.warn(`key "${i}" for languages "${p.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!!!")}p.forEach((i=>{if(this.isValidLookup(s))return;o=i;const n=[u];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(n,u,i,t,e)}else{let t;if(h)t=this.pluralResolver.getSuffix(i,e.count,e);const s=`${this.options.pluralSeparator}zero`;const r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h){n.push(u+t);if(e.ordinal&&t.indexOf(r)===0){n.push(u+t.replace(r,this.options.pluralSeparator))}if(f){n.push(u+s)}}if(d){const i=`${u}${this.options.contextSeparator}${e.context}`;n.push(i);if(h){n.push(i+t);if(e.ordinal&&t.indexOf(r)===0){n.push(i+t.replace(r,this.options.pluralSeparator))}if(f){n.push(i+s)}}}}let a;while(a=n.pop()){if(!this.isValidLookup(s)){r=a;s=this.getResource(i,t,a,e)}}}))}))}));return{res:s,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,s,i={}){if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,s,i);return this.resourceStore.getResource(t,e,s,i)}getUsedParamsDetails(t={}){const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const s=t.replace&&!n(t.replace);let i=s?t.replace:t;if(s&&typeof t.count!=="undefined"){i.count=t.count}if(this.options.interpolation.defaultVariables){i={...this.options.interpolation.defaultVariables,...i}}if(!s){i={...i};for(const t of e){delete i[t]}}return i}static hasDefaultValue(t){const e="defaultValue";for(const s in t){if(Object.prototype.hasOwnProperty.call(t,s)&&e===s.substring(0,e.length)&&undefined!==t[s]){return true}}return false}}class A{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=C.create("languageUtils")}getScriptPartFromCode(t){t=N(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=N(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(n(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}if(e&&this.options.lowerCaseLng){e=e.toLowerCase()}if(e)return e;if(this.options.lowerCaseLng){return t.toLowerCase()}return t}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const s=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(s))e=s}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const s=this.getScriptPartFromCode(t);if(this.isSupportedCode(s))return e=s;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>{if(t===i)return t;if(t.indexOf("-")<0&&i.indexOf("-")<0)return;if(t.indexOf("-")>0&&i.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===i)return t;if(t.indexOf(i)===0&&i.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(t,e){if(!t)return[];if(typeof t==="function")t=t(e);if(n(t))t=[t];if(Array.isArray(t))return t;if(!e)return t.default||[];let s=t[e];if(!s)s=t[this.getScriptPartFromCode(e)];if(!s)s=t[this.formatLanguageCode(e)];if(!s)s=t[this.getLanguagePartFromCode(e)];if(!s)s=t.default;return s||[]}toResolveHierarchy(t,e){const s=this.getFallbackCodes((e===false?[]:e)||this.options.fallbackLng||[],t);const i=[];const r=t=>{if(!t)return;if(this.isSupportedCode(t)){i.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(n(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)){if(this.options.load!=="languageOnly")r(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")r(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")r(this.getLanguagePartFromCode(t))}else if(n(t)){r(this.formatLanguageCode(t))}s.forEach((t=>{if(i.indexOf(t)<0)r(this.formatLanguageCode(t))}));return i}}const I={zero:0,one:1,two:2,few:3,many:4,other:5};const D={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class M{constructor(t,e={}){this.languageUtils=t;this.options=e;this.logger=C.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const s=N(t==="dev"?"en":t);const i=e.ordinal?"ordinal":"cardinal";const n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache){return this.pluralRulesCache[n]}let r;try{r=new Intl.PluralRules(s,{type:i})}catch(s){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return D}if(!t.match(/-|_/))return D;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}this.pluralRulesCache[n]=r;return r}needsPlural(t,e={}){let s=this.getRule(t,e);if(!s)s=this.getRule("dev",e);return s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,s={}){return this.getSuffixes(t,s).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let s=this.getRule(t,e);if(!s)s=this.getRule("dev",e);if(!s)return[];return s.resolvedOptions().pluralCategories.sort(((t,e)=>I[t]-I[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e,s={}){const i=this.getRule(t,s);if(i){return`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,s)}}const F=(t,e,s,i=".",r=true)=>{let o=g(t,e,s);if(!o&&r&&n(s)){o=S(t,s,i);if(o===undefined)o=S(e,s,i)}return o};const T=t=>t.replace(/\$/g,"$$$$");class V{constructor(t={}){this.logger=C.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(t={}){if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:c,unescapeSuffix:u,unescapePrefix:l,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=e!==undefined?e:v;this.escapeValue=s!==undefined?s:true;this.useRawValueToEscape=i!==undefined?i:false;this.prefix=n?m(n):r||"{{";this.suffix=o?m(o):a||"}}";this.formatSeparator=c||",";this.unescapePrefix=u?"":l||"-";this.unescapeSuffix=this.unescapePrefix?"":u||"";this.nestingPrefix=h?m(h):f||m("$t(");this.nestingSuffix=d?m(d):p||m(")");this.nestingOptionsSeparator=g||",";this.maxReplaces=b||1e3;this.alwaysFormat=y!==undefined?y:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return new RegExp(e,"g")};this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`);this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,s,i){let r;let a;let c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const l=t=>{if(t.indexOf(this.formatSeparator)<0){const n=F(e,u,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,undefined,s,{...i,...e,interpolationkey:t}):n}const n=t.split(this.formatSeparator);const r=n.shift().trim();const o=n.join(this.formatSeparator).trim();return this.format(F(e,u,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,s,{...i,...e,interpolationkey:r})};this.resetRegExp();const h=i?.missingInterpolationHandler||this.options.missingInterpolationHandler;const f=i?.interpolation?.skipOnVariables!==undefined?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const d=[{regex:this.regexpUnescape,safeValue:t=>T(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?T(this.escape(t)):T(t)}];d.forEach((e=>{c=0;while(r=e.regex.exec(t)){const s=r[1].trim();a=l(s);if(a===undefined){if(typeof h==="function"){const e=h(t,r,i);a=n(e)?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,s)){a=""}else if(f){a=r[0];continue}else{this.logger.warn(`missed to pass in variable ${s} for interpolating ${t}`);a=""}}else if(!n(a)&&!this.useRawValueToEscape){a=o(a)}const u=e.safeValue(a);t=t.replace(r[0],u);if(f){e.regex.lastIndex+=a.length;e.regex.lastIndex-=r[0].length}else{e.regex.lastIndex=0}c++;if(c>=this.maxReplaces){break}}}));return t}nest(t,e,s={}){let i;let r;let a;const c=(t,e)=>{const s=this.nestingOptionsSeparator;if(t.indexOf(s)<0)return t;const i=t.split(new RegExp(`${s}[ ]*{`));let n=`{${i[1]}`;t=i[0];n=this.interpolate(n,a);const r=n.match(/'/g);const o=n.match(/"/g);if((r?.length??0)%2===0&&!o||o.length%2!==0){n=n.replace(/'/g,'"')}try{a=JSON.parse(n);if(e)a={...e,...a}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${s}${n}`}if(a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1)delete a.defaultValue;return t};while(i=this.nestingRegexp.exec(t)){let u=[];a={...s};a=a.replace&&!n(a.replace)?a.replace:a;a.applyPostProcessor=false;delete a.defaultValue;let l=false;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const t=i[1].split(this.formatSeparator).map((t=>t.trim()));i[1]=t.shift();u=t;l=true}r=e(c.call(this,i[1].trim(),a),a);if(r&&i[0]===t&&!n(r))return r;if(!n(r))r=o(r);if(!r){this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`);r=""}if(l){r=u.reduce(((t,e)=>this.format(t,e,s.lng,{...s,interpolationkey:i[1].trim()})),r.trim())}t=t.replace(i[0],r);this.regexp.lastIndex=0}return t}}const K=t=>{let e=t.toLowerCase().trim();const s={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const n=i[1].substring(0,i[1].length-1);if(e==="currency"&&n.indexOf(":")<0){if(!s.currency)s.currency=n.trim()}else if(e==="relativetime"&&n.indexOf(":")<0){if(!s.range)s.range=n.trim()}else{const t=n.split(";");t.forEach((t=>{if(t){const[e,...i]=t.split(":");const n=i.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!s[r])s[r]=n;if(n==="false")s[r]=false;if(n==="true")s[r]=true;if(!isNaN(n))s[r]=parseInt(n,10)}}))}}return{formatName:e,formatOptions:s}};const _=t=>{const e={};return(s,i,n)=>{let r=n;if(n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]){r={...r,[n.interpolationkey]:undefined}}const o=i+JSON.stringify(r);let a=e[o];if(!a){a=t(N(i),n);e[o]=a}return a(s)}};const U=t=>(e,s,i)=>t(N(s),i)(e);class H{constructor(t={}){this.logger=C.create("formatter");this.options=t;this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const s=e.cacheInBuiltFormats?_:U;this.formats={number:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e});return t=>s.format(t)})),currency:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>s.format(t)})),datetime:s(((t,e)=>{const s=new Intl.DateTimeFormat(t,{...e});return t=>s.format(t)})),relativetime:s(((t,e)=>{const s=new Intl.RelativeTimeFormat(t,{...e});return t=>s.format(t,e.range||"day")})),list:s(((t,e)=>{const s=new Intl.ListFormat(t,{...e});return t=>s.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=_(e)}format(t,e,s,i={}){const n=e.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find((t=>t.indexOf(")")>-1))){const t=n.findIndex((t=>t.indexOf(")")>-1));n[0]=[n[0],...n.splice(1,t)].join(this.formatSeparator)}const r=n.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=K(e);if(this.formats[n]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};const a=o.locale||o.lng||i.locale||i.lng||s;e=this.formats[n](t,a,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${n}`)}return t}),t);return r}}const J=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class Y extends z{constructor(t,e,s,i={}){super();this.backend=t;this.store=e;this.services=s;this.languageUtils=s.languageUtils;this.options=i;this.logger=C.create("backendConnector");this.waitingReads=[];this.maxParallelReads=i.maxParallelReads||10;this.readingCalls=0;this.maxRetries=i.maxRetries>=0?i.maxRetries:5;this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350;this.state={};this.queue=[];this.backend?.init?.(s,i.backend,i)}queueLoad(t,e,s,i){const n={};const r={};const o={};const a={};t.forEach((t=>{let i=true;e.forEach((e=>{const o=`${t}|${e}`;if(!s.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;i=false;if(r[o]===undefined)r[o]=true;if(n[o]===undefined)n[o]=true;if(a[e]===undefined)a[e]=true}}));if(!i)o[t]=true}));if(Object.keys(n).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i})}return{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,s){const i=t.split("|");const n=i[0];const r=i[1];if(e)this.emit("failedLoading",n,r,e);if(!e&&s){this.store.addResourceBundle(n,r,s,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&s)this.state[t]=0;const o={};this.queue.forEach((s=>{d(s.loaded,[n],r);J(s,t);if(e)s.errors.push(e);if(s.pendingCount===0&&!s.done){Object.keys(s.loaded).forEach((t=>{if(!o[t])o[t]={};const e=s.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));s.done=true;if(s.errors.length){s.callback(s.errors)}else{s.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,s,i=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:s,tried:i,wait:n,callback:r});return}this.readingCalls++;const o=(o,a)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&a&&i<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,s,i+1,n*2,r)}),n);return}r(o,a)};const a=this.backend[s].bind(this.backend);if(a.length===2){try{const s=a(t,e);if(s&&typeof s.then==="function"){s.then((t=>o(null,t))).catch(o)}else{o(null,s)}}catch(t){o(t)}return}return a(t,e,o)}prepareLoading(t,e,s={},i){if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return i&&i()}if(n(t))t=this.languageUtils.toResolveHierarchy(t);if(n(e))e=[e];const r=this.queueLoad(t,e,s,i);if(!r.toLoad.length){if(!r.pending.length)i();return null}r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,s){this.prepareLoading(t,e,{},s)}reload(t,e,s){this.prepareLoading(t,e,{reload:true},s)}loadOne(t,e=""){const s=t.split("|");const i=s[0];const n=s[1];this.read(i,n,"read",undefined,undefined,((s,r)=>{if(s)this.logger.warn(`${e}loading namespace ${n} for language ${i} failed`,s);if(!s&&r)this.logger.log(`${e}loaded namespace ${n} for language ${i}`,r);this.loaded(t,s,r)}))}saveMissing(t,e,s,i,n,r={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${s}" as the namespace "${e}" 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===undefined||s===null||s==="")return;if(this.backend?.create){const a={...r,isUpdate:n};const c=this.backend.create.bind(this.backend);if(c.length<6){try{let n;if(c.length===5){n=c(t,e,s,i,a)}else{n=c(t,e,s,i)}if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}}else{c(t,e,s,i,o,a)}}if(!t||!t[0])return;this.store.addResource(t[0],e,s,i)}}const W=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]==="object")e=t[1];if(n(t[1]))e.defaultValue=t[1];if(n(t[2]))e.tDescription=t[2];if(typeof t[2]==="object"||typeof t[3]==="object"){const s=t[3]||t[2];Object.keys(s).forEach((t=>{e[t]=s[t]}))}return e},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true},cacheInBuiltFormats:true});const q=t=>{if(n(t.ns))t.ns=[t.ns];if(n(t.fallbackLng))t.fallbackLng=[t.fallbackLng];if(n(t.fallbackNS))t.fallbackNS=[t.fallbackNS];if(t.supportedLngs?.indexOf?.("cimode")<0){t.supportedLngs=t.supportedLngs.concat(["cimode"])}if(typeof t.initImmediate==="boolean")t.initAsync=t.initImmediate;return t};const G=()=>{};const Q=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class X extends z{constructor(t={},e){super();this.options=q(t);this.services={};this.logger=C;this.modules={external:[]};Q(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(t={},e){this.isInitializing=true;if(typeof t==="function"){e=t;t={}}if(t.defaultNS==null&&t.ns){if(n(t.ns)){t.defaultNS=t.ns}else if(t.ns.indexOf("translation")<0){t.defaultNS=t.ns[0]}}const s=W();this.options={...s,...this.options,...q(t)};this.options.interpolation={...s.interpolation,...this.options.interpolation};if(t.keySeparator!==undefined){this.options.userDefinedKeySeparator=t.keySeparator}if(t.nsSeparator!==undefined){this.options.userDefinedNsSeparator=t.nsSeparator}const i=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){C.init(i(this.modules.logger),this.options)}else{C.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=H}const e=new A(this.options);this.store=new R(this.options.resources,this.options);const n=this.services;n.logger=C;n.resourceStore=this.store;n.languageUtils=e;n.pluralResolver=new M(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});if(t&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)){n.formatter=i(t);n.formatter.init(n,this.options);this.options.interpolation.format=n.formatter.format.bind(n.formatter)}n.interpolator=new V(this.options);n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};n.backendConnector=new Y(i(this.modules.backend),n.resourceStore,n,this.options);n.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)}));if(this.modules.languageDetector){n.languageDetector=i(this.modules.languageDetector);if(n.languageDetector.init)n.languageDetector.init(n,this.options.detection,this.options)}if(this.modules.i18nFormat){n.i18nFormat=i(this.modules.i18nFormat);if(n.i18nFormat.init)n.i18nFormat.init(this)}this.translator=new B(this.services,this.options);this.translator.on("*",((t,...e)=>{this.emit(t,...e)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!e)e=G;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const o=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];o.forEach((t=>{this[t]=(...e)=>this.store[t](...e)}));const a=["addResource","addResources","addResourceBundle","removeResourceBundle"];a.forEach((t=>{this[t]=(...e)=>{this.store[t](...e);return this}}));const c=r();const u=()=>{const t=(t,s)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);c.resolve(s);e(t,s)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){u()}else{setTimeout(u,0)}return c}loadResources(t,e=G){let s=e;const i=n(t)?t:this.language;if(typeof t==="function")s=t;if(!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const s=this.services.languageUtils.toResolveHierarchy(e);s.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!i){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(i)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);s(t)}))}else{s(null)}}reloadResources(t,e,s){const i=r();if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e=undefined}if(!t)t=this.languages;if(!e)e=this.options.ns;if(!s)s=G;this.services.backendConnector.reload(t,e,(t=>{i.resolve();s(t)}));return i}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()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){E.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}if(!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;this.languages.unshift(t)}}changeLanguage(t,e){this.isLanguageChangingTo=t;const s=r();this.emit("languageChanging",t);const i=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const o=(n,r)=>{if(r){if(this.isLanguageChangingTo===t){i(r);this.translator.changeLanguage(r);this.isLanguageChangingTo=undefined;this.emit("languageChanged",r);this.logger.log("languageChanged",r)}}else{this.isLanguageChangingTo=undefined}s.resolve(((...t)=>this.t(...t)));if(e)e(n,((...t)=>this.t(...t)))};const a=e=>{if(!t&&!e&&this.services.languageDetector)e=[];const s=n(e)?e:e&&e[0];const r=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(n(e)?[e]:e);if(r){if(!this.language){i(r)}if(!this.translator.language)this.translator.changeLanguage(r);this.services.languageDetector?.cacheUserLanguage?.(r)}this.loadResources(r,(t=>{o(t,r)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){a(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(a)}else{this.services.languageDetector.detect(a)}}else{a(t)}return s}getFixedT(t,e,s){const i=(t,e,...n)=>{let r;if(typeof e!=="object"){r=this.options.overloadTranslationOptionHandler([t,e].concat(n))}else{r={...e}}r.lng=r.lng||i.lng;r.lngs=r.lngs||i.lngs;r.ns=r.ns||i.ns;if(r.keyPrefix!=="")r.keyPrefix=r.keyPrefix||s||i.keyPrefix;const o=this.options.keySeparator||".";let a;if(r.keyPrefix&&Array.isArray(t)){a=t.map((t=>`${r.keyPrefix}${o}${t}`))}else{a=r.keyPrefix?`${r.keyPrefix}${o}${t}`:t}return this.t(a,r)};if(n(t)){i.lng=t}else{i.lngs=t}i.ns=e;i.keyPrefix=s;return i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const s=e.lng||this.resolvedLanguage||this.languages[0];const i=this.options?this.options.fallbackLng:false;const n=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return true;const r=(t,e)=>{const s=this.services.backendConnector.state[`${t}|${e}`];return s===-1||s===0||s===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(s,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(s,t)&&(!i||r(n,t)))return true;return false}loadNamespaces(t,e){const s=r();if(!this.options.ns){if(e)e();return Promise.resolve()}if(n(t))t=[t];t.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{s.resolve();if(e)e(t)}));return s}loadLanguages(t,e){const s=r();if(n(t))t=[t];const i=this.options.preload||[];const o=t.filter((t=>i.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!o.length){if(e)e();return Promise.resolve()}this.options.preload=i.concat(o);this.loadResources((t=>{s.resolve();if(e)e(t)}));return s}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";const e=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];const s=this.services?.languageUtils||new A(W());return e.indexOf(s.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){return new X(t,e)}cloneInstance(t={},e=G){const s=t.forkResourceStore;if(s)delete t.forkResourceStore;const i={...this.options,...t,...{isClone:true}};const n=new X(i);if(t.debug!==undefined||t.prefix!==undefined){n.logger=n.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{n[t]=this[t]}));n.services={...this.services};n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};if(s){const t=Object.keys(this.store.data).reduce(((t,e)=>{t[e]={...this.store.data[e]};t[e]=Object.keys(t[e]).reduce(((s,i)=>{s[i]={...t[e][i]};return s}),t[e]);return t}),{});n.store=new R(t,i);n.services.resourceStore=n.store}n.translator=new B(n.services,i);n.translator.on("*",((t,...e)=>{n.emit(t,...e)}));n.init(i,e);n.translator.options=i;n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};return n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Z=X.createInstance();Z.createInstance=X.createInstance;const tt="Cerrar";const et="Buscar";const st="Maximizar";const it="No";const nt="Cancelar";const rt="Aceptar";const ot="Eliminar";var at={"Seleccione un valor de la lista":"Seleccione un valor de la lista","Buscando resultados...":"Buscando resultados...",Cerrar:tt,Buscar:et,Maximizar:st,"El campo no puede estar vacío.":"El campo no puede estar vacío.","No se han encontrado resultados":"No se han encontrado resultados","Debes escribir al menos {{count}} caracteres para buscar.":"Debes escribir al menos {{count}} caracteres para buscar.",Sí:"Sí",No:it,Cancelar:nt,Aceptar:rt,Eliminar:ot};const ct="Close";const ut="Search";const lt="Maximize";const ht="No";const ft="Cancel";const dt="Accept";const pt="Delete";var gt={"Seleccione un valor de la lista":"Select a value from the list","Buscando resultados...":"Searching results...",Cerrar:ct,Buscar:ut,Maximizar:lt,"El campo no puede estar vacío.":"The field cannot be empty.","No se han encontrado resultados":"No results found","Debes escribir al menos {{count}} caracteres para buscar.":"You must type at least {{count}} characters to search.",Sí:"Yes",No:ht,Cancelar:ft,Aceptar:dt,Eliminar:pt};const bt="Pechar";const mt="Buscar";const yt="Maximizar";const vt="Non";const $t="Cancelar";const kt="Aceptar";const xt="Eliminar";var wt={"Seleccione un valor de la lista":"Seleccione un valor da lista","Buscando resultados...":"Buscando resultados...",Cerrar:bt,Buscar:mt,Maximizar:yt,"El campo no puede estar vacío.":"O campo non pode estar baleiro.","No se han encontrado resultados":"Non se atoparon resultados","Debes escribir al menos {{count}} caracteres para buscar.":"Debes escribir polo menos {{count}} caracteres para buscar.",Sí:"Si",No:vt,Cancelar:$t,Aceptar:kt,Eliminar:xt};const St="Tancar";const Nt="Cercar";const jt="Maximitzar";const Ot="No";const Ct="cancel·lar";const zt="Acceptar";const Rt="Eliminar";var Et={"Seleccione un valor de la lista":"Seleccioneu un valor de la llista","Buscando resultados...":"Cercant resultats...",Cerrar:St,Buscar:Nt,Maximizar:jt,"El campo no puede estar vacío.":"El camp no pot estar buit.","No se han encontrado resultados":"No s'han trobat resultats","Debes escribir al menos {{count}} caracteres para buscar.":"Heu d'escriure almenys {{count}} caràcters per buscar.",Sí:"Sí",No:Ot,Cancelar:Ct,Aceptar:zt,Eliminar:Rt};const Lt="Itxi";const Pt="Bilatu";const Bt="Handitu";const At="Ez";const It="Utzi";const Dt="Onartu";const Mt="Ezabatu";var Ft={"Seleccione un valor de la lista":"Aukeratu zerrendako balio bat","Buscando resultados...":"Emaitzak bilatzen...",Cerrar:Lt,Buscar:Pt,Maximizar:Bt,"El campo no puede estar vacío.":"Eremua ezin da hutsik egon.","No se han encontrado resultados":"Ez da emaitzarik aurkitu","Debes escribir al menos {{count}} caracteres para buscar.":"Gutxienez {{count}} karaktere idatzi behar dituzu bilatzeko.",Sí:"Bai",No:At,Cancelar:It,Aceptar:Dt,Eliminar:Mt};const Tt="Chiudi";const Vt="Cerca";const Kt="Ingrandisci";const _t="No";const Ut="Annulla";const Ht="Accetta";const Jt="Elimina";var Yt={"Seleccione un valor de la lista":"Seleziona un valore dalla lista","Buscando resultados...":"Ricerca risultati...",Cerrar:Tt,Buscar:Vt,Maximizar:Kt,"El campo no puede estar vacío.":"Il campo non può essere vuoto.","No se han encontrado resultados":"Nessun risultato trovato","Debes escribir al menos {{count}} caracteres para buscar.":"Devi digitare almeno {{count}} caratteri per cercare.",Sí:"Sì",No:_t,Cancelar:Ut,Aceptar:Ht,Eliminar:Jt};const Wt="iris-language";const qt=()=>localStorage.getItem(Wt);if(!window.i18next){Z.init({lng:qt()??undefined,resources:{es:{translation:at},en:{translation:gt},gl:{translation:wt},ca:{translation:Et},eu:{translation:Ft},it:{translation:Yt}}});window.i18next=Z}const Gt=window.i18next;(()=>{const t=new Set;Gt.on("languageChanged",(()=>{t.forEach((t=>{if(typeof t.forceUpdate==="function"){t.forceUpdate()}}))}));return{registerComponent(e){t.add(e)},unregisterComponent(e){t.delete(e)}}})();const Qt=t=>window.__IRIS_GLOBAL_CONFIG__?.[t];const Xt="@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes show-loading{0%{opacity:0}100%{opacity:1}}:host{display:inline-block}button{width:100%;font-size:var(--font-size);padding:8px 12px;color:var(--white);background-color:var(--company-primary-dark);-webkit-transition:background-color 0.2s ease;-ms-transition:background-color 0.2s ease;transition:background-color 0.2s ease;border:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:-ms-flexbox;display:-webkit-box;display:flex;align-items:center;justify-content:center;cursor:pointer;gap:0.1rem;font-family:var(--font-primary)}button:hover{background-color:var(--company-primary-focus)}button:focus{outline:2px solid var(--blue_light);outline-offset:1px}button:not([type=icon],[type=fab]) .material-symbols-rounded,button:not([type=icon],[type=fab]) .loading{margin-right:5px}button[type=fab],button[type=icon]{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;height:36px;width:36px;padding:0;display:-ms-flexbox;display:-webkit-box;display:flex;justify-content:center}button iris-icon{display:-ms-flexbox;display:-webkit-box;display:flex}button iris-loading{display:-ms-flexbox;display:-webkit-box;display:flex;height:22px;align-items:center}button[color=primary]{background-color:var(--company-primary-dark)}button[color=primary]:hover{background-color:var(--company-primary-focus)}button[color=primary][type=icon]{background-color:unset;color:var(--company-primary-dark)}button[color=primary][type=icon]:hover{background-color:var(--company-primary-light)}button[color=success]{background-color:var(--company-success-dark)}button[color=success]:hover{background-color:var(--company-success-focus)}button[color=success][type=icon]{background-color:unset;color:var(--company-success-dark)}button[color=success][type=icon]:hover{background-color:var(--company-success-light)}button[color=warning]{background-color:var(--company-warning-dark)}button[color=warning]:hover{background-color:var(--company-warning-focus)}button[color=warning][type=icon]{background-color:unset;color:var(--company-warning-dark)}button[color=warning][type=icon]:hover{background-color:var(--company-warning-light)}button[color=error]{background-color:var(--company-error-dark)}button[color=error]:hover{background-color:var(--company-error-focus)}button[color=error][type=icon]{background-color:unset;color:var(--company-error-dark)}button[color=error][type=icon]:hover{background-color:var(--company-error-light)}button[color=basic]{background-color:var(--company-basic-dark);color:var(--black);background-color:var(--company-basic-light)}button[color=basic]:hover{background-color:var(--company-basic-focus)}button[color=basic][type=icon]{background-color:unset;color:var(--company-basic-dark)}button[color=basic][type=icon]:hover{background-color:var(--company-basic-light)}button:disabled{background-color:var(--company-basic-focus);color:var(--company-basic-light);cursor:not-allowed}button:disabled:hover{background-color:var(--company-basic-focus)}button.small{font-size:calc(var(--font-size) * 0.8)}button.small[type=fab],button.small[type=icon]{height:calc(36px * 0.8);width:calc(36px * 0.8)}button.large{font-size:calc(var(--font-size) * 1.2)}button.large[type=fab],button.large[type=icon]{height:calc(36px * 1.2);width:calc(36px * 1.2)}@media (min-width: 576px){button{width:auto}}";const Zt=class{constructor(s){t(this,s);this.buttonClicked=e(this,"buttonClicked",1);this.buttonFocused=e(this,"buttonFocused",7);this.ready=e(this,"ready",7)}label;color=Qt("IrisButton")?.color||"primary";icon;disabled=Qt("IrisButton")?.disabled||false;type=Qt("IrisButton")?.type||"";loading=Qt("IrisButton")?.loading||false;size=Qt("IrisButton")?.size||"medium";button;buttonClicked;buttonFocused;ready;handleClick=t=>{t.stopPropagation();this.button.disabled=true;setTimeout((()=>{if(!this.loading){this.button.disabled=false}}),1e3);this.buttonClicked.emit(t)};handleFocus=t=>{this.buttonFocused.emit(t)};componentDidLoad(){this.ready.emit()}render(){const t={label:this.label,icon:this.icon};if(!i.check(t))return;return s("button",{class:`${this.size}`,color:this.color,type:this.type,onClick:this.handleClick,disabled:this.disabled||this.loading,onFocus:this.handleFocus,ref:t=>this.button=t,title:this.label},!this.loading?s("iris-icon",{icon:this.icon,size:this.size}):s("div",{class:"loading"},s("iris-loading",{size:"small",color:this.color})),this.type=="icon"||this.type=="fab"?"":this.label)}};Zt.style=Xt;export{Zt as iris_button};
2
+ //# sourceMappingURL=p-55d7ced4.entry.js.map