locizify 9.0.6 → 9.0.8

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 9.0.8
2
+
3
+ - update i18nextify
4
+
5
+ ### 9.0.7
6
+
7
+ - update i18nextify
8
+
1
9
  ### 9.0.6
2
10
 
3
11
  - update i18nextify
@@ -1190,7 +1190,7 @@
1190
1190
  type
1191
1191
  });
1192
1192
  } catch (err) {
1193
- if (!Intl) {
1193
+ if (typeof Intl === 'undefined') {
1194
1194
  this.logger.error('No Intl support, please use an Intl polyfill!');
1195
1195
  return dummyRule;
1196
1196
  }
@@ -1376,16 +1376,16 @@
1376
1376
  var value;
1377
1377
  var clonedOptions;
1378
1378
  var handleHasOptions = (key, inheritedOptions) => {
1379
- var _matchedSingleQuotes$;
1379
+ var _matchedSingleQuotes$, _matchedDoubleQuotes$;
1380
1380
  var sep = this.nestingOptionsSeparator;
1381
1381
  if (key.indexOf(sep) < 0) return key;
1382
- var c = key.split(new RegExp("".concat(sep, "[ ]*{")));
1382
+ var c = key.split(new RegExp("".concat(regexEscape(sep), "[ ]*{")));
1383
1383
  var optionsString = "{".concat(c[1]);
1384
1384
  key = c[0];
1385
1385
  optionsString = this.interpolate(optionsString, clonedOptions);
1386
1386
  var matchedSingleQuotes = optionsString.match(/'/g);
1387
1387
  var matchedDoubleQuotes = optionsString.match(/"/g);
1388
- if (((_matchedSingleQuotes$ = matchedSingleQuotes === null || matchedSingleQuotes === void 0 ? void 0 : matchedSingleQuotes.length) !== null && _matchedSingleQuotes$ !== void 0 ? _matchedSingleQuotes$ : 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
1388
+ if (((_matchedSingleQuotes$ = matchedSingleQuotes === null || matchedSingleQuotes === void 0 ? void 0 : matchedSingleQuotes.length) !== null && _matchedSingleQuotes$ !== void 0 ? _matchedSingleQuotes$ : 0) % 2 === 0 && !matchedDoubleQuotes || ((_matchedDoubleQuotes$ = matchedDoubleQuotes === null || matchedDoubleQuotes === void 0 ? void 0 : matchedDoubleQuotes.length) !== null && _matchedDoubleQuotes$ !== void 0 ? _matchedDoubleQuotes$ : 0) % 2 !== 0) {
1389
1389
  optionsString = optionsString.replace(/'/g, '"');
1390
1390
  }
1391
1391
  try {
@@ -1858,8 +1858,13 @@
1858
1858
  }
1859
1859
  });
1860
1860
  };
1861
+ var SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';
1862
+ var getSupportNoticeShown = () => typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY];
1863
+ var setSupportNoticeShown = () => {
1864
+ if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;
1865
+ };
1861
1866
  var usesLocize = inst => {
1862
- var _inst$modules, _inst$modules2, _inst$options;
1867
+ var _inst$modules, _inst$modules2, _inst$options, _inst$options2, _inst$options3;
1863
1868
  if ((inst === null || inst === void 0 || (_inst$modules = inst.modules) === null || _inst$modules === void 0 || (_inst$modules = _inst$modules.backend) === null || _inst$modules === void 0 || (_inst$modules = _inst$modules.name) === null || _inst$modules === void 0 ? void 0 : _inst$modules.indexOf('Locize')) > 0) return true;
1864
1869
  if ((inst === null || inst === void 0 || (_inst$modules2 = inst.modules) === null || _inst$modules2 === void 0 || (_inst$modules2 = _inst$modules2.backend) === null || _inst$modules2 === void 0 || (_inst$modules2 = _inst$modules2.constructor) === null || _inst$modules2 === void 0 || (_inst$modules2 = _inst$modules2.name) === null || _inst$modules2 === void 0 ? void 0 : _inst$modules2.indexOf('Locize')) > 0) return true;
1865
1870
  if (inst !== null && inst !== void 0 && (_inst$options = inst.options) !== null && _inst$options !== void 0 && (_inst$options = _inst$options.backend) !== null && _inst$options !== void 0 && _inst$options.backends) {
@@ -1868,6 +1873,10 @@
1868
1873
  return (b === null || b === void 0 || (_b$name = b.name) === null || _b$name === void 0 ? void 0 : _b$name.indexOf('Locize')) > 0 || (b === null || b === void 0 || (_b$constructor = b.constructor) === null || _b$constructor === void 0 || (_b$constructor = _b$constructor.name) === null || _b$constructor === void 0 ? void 0 : _b$constructor.indexOf('Locize')) > 0;
1869
1874
  })) return true;
1870
1875
  }
1876
+ if (inst !== null && inst !== void 0 && (_inst$options2 = inst.options) !== null && _inst$options2 !== void 0 && (_inst$options2 = _inst$options2.backend) !== null && _inst$options2 !== void 0 && _inst$options2.projectId) return true;
1877
+ if (inst !== null && inst !== void 0 && (_inst$options3 = inst.options) !== null && _inst$options3 !== void 0 && (_inst$options3 = _inst$options3.backend) !== null && _inst$options3 !== void 0 && _inst$options3.backendOptions) {
1878
+ if (inst.options.backend.backendOptions.some(b => b === null || b === void 0 ? void 0 : b.projectId)) return true;
1879
+ }
1871
1880
  return false;
1872
1881
  };
1873
1882
  class I18n extends EventEmitter {
@@ -1920,8 +1929,9 @@
1920
1929
  if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
1921
1930
  this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
1922
1931
  }
1923
- if (this.options.showSupportNotice !== false && !usesLocize(this)) {
1924
- if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
1932
+ if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {
1933
+ if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
1934
+ setSupportNoticeShown();
1925
1935
  }
1926
1936
  var createClassOnDemand = ClassOrObject => {
1927
1937
  if (!ClassOrObject) return null;
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).locizify=t()}(this,(function(){"use strict";function e(e,t,n,r,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var u=t.apply(n,r);function a(t){e(u,o,i,a,s,"next",t)}function s(t){e(u,o,i,a,s,"throw",t)}a(void 0)}))}}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e,t){return e(t={exports:{}},t.exports),t.exports}var l=s((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(l);var c=s((function(e){var t=l.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));a(c);var d=s((function(e){var t=l.default;e.exports=function(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports}));a(d);var p=a(s((function(e){e.exports=function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=e=>"string"==typeof e,h=()=>{var e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},g=e=>null==e?"":""+e,v=/###/g,m=e=>e&&e.indexOf("###")>-1?e.replace(v,"."):e,y=e=>!e||f(e),b=(e,t,n)=>{for(var r=f(t)?t.split("."):t,o=0;o<r.length-1;){if(y(e))return{};var i=m(r[o]);!e[i]&&n&&(e[i]=new n),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{},++o}return y(e)?{}:{obj:e,k:m(r[o])}},E=(e,t,n)=>{var{obj:r,k:o}=b(e,t,Object);if(void 0===r&&1!==t.length){for(var i=t[t.length-1],u=t.slice(0,t.length-1),a=b(e,u,Object);void 0===a.obj&&u.length;){var s;i="".concat(u[u.length-1],".").concat(i),u=u.slice(0,u.length-1),null!==(s=a=b(e,u,Object))&&void 0!==s&&s.obj&&void 0!==a.obj["".concat(a.k,".").concat(i)]&&(a.obj=void 0)}a.obj["".concat(a.k,".").concat(i)]=n}else r[o]=n},x=(e,t)=>{var{obj:n,k:r}=b(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A=(e,t,n)=>{var r=x(e,n);return void 0!==r?r:x(t,n)},w=(e,t,n)=>{for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?f(e[r])||e[r]instanceof String||f(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):w(e[r],t[r],n):e[r]=t[r]);return e},C=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},k=e=>f(e)?e.replace(/[&<>"'\/]/g,e=>O[e]):e;var F=[" ",",","?","!",";"],D=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),B=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var r=t.split(n),o=e,i=0;i<r.length;){if(!o||"object"!=typeof o)return;for(var u=void 0,a="",s=i;s<r.length;++s)if(s!==i&&(a+=n),void 0!==(u=o[a+=r[s]])){if(["string","number","boolean"].indexOf(typeof u)>-1&&s<r.length-1)continue;i+=s-i+1;break}o=u}return o}},S=e=>null==e?void 0:e.replace("_","-"),j={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(r=n.apply)||void 0===r||r.call(n,console,t)}};class L{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||j,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(f(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new L(this.logger,o(o({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new L(this.logger,e)}}var P=new L;class N{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{for(var[t,r]=e,o=0;o<r;o++)t(...n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{for(var[r,o]=t,i=0;i<o;i++)r.apply(r,[e,...n])})}}class T extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):f(n)&&u?o.push(...n.split(u)):o.push(n)));var s=x(this.data,o);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!s&&a&&f(n)?B(null===(r=this.data)||void 0===r||null===(r=r[e])||void 0===r?void 0:r[t],n,u):s}addResource(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,u=[e,t];n&&(u=u.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(u=e.split("."))[1]),this.addNamespaces(t),E(this.data,u,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)(f(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=x(this.data,a)||{};u.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?w(s,n,i):s=o(o({},s),n),E(this.data,a,s),u.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var I={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{var i,u;t=null!==(i=null===(u=this.processors[e])||void 0===u?void 0:u.process(t,n,r,o))&&void 0!==i?i:t}),t}},R=Symbol("i18next/PATH_KEY");function M(e,t){var n,{[R]:r}=e(function(){var e,t=[],n=Object.create(null);return n.get=(r,o)=>{var i,u;return null===(i=e)||void 0===i||null===(u=i.revoke)||void 0===u||u.call(i),o===R?t:(t.push(o),(e=Proxy.revocable(r,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}());return r.join(null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".")}var z={},q=e=>!f(e)&&"boolean"!=typeof e&&"number"!=typeof e;class U extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=P.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=o({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var r=q(n.res);return!1!==t.returnObjects||!r}extractFromKey(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,u=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";var r=F.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;var o=D.getRegExp("(".concat(r.map(e=>"?"===e?"\\?":e).join("|"),")")),i=!o.test(e);if(!i){var u=e.indexOf(n);u>0&&!o.test(e.substring(0,u))&&(i=!0)}return i})(e,n,r));if(i&&!u){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:f(o)?[o]:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return{key:e,namespaces:f(o)?[o]:o}}translate(e,t,n){var r="object"==typeof t?o({},t):t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r=o({},r)),r||(r={}),null==e)return"";"function"==typeof e&&(e=M(e,o(o({},this.options),r))),Array.isArray(e)||(e=[String(e)]);var i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,u=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var d=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?i?{res:"".concat(l).concat(c).concat(a),usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:"".concat(l).concat(c).concat(a):i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;var h=this.resolve(e,r),g=null==h?void 0:h.res,v=(null==h?void 0:h.usedKey)||a,m=(null==h?void 0:h.exactUsedKey)||a,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,E=void 0!==r.count&&!f(r.count),x=U.hasDefaultValue(r),A=E?this.pluralResolver.getSuffix(d,r.count,r):"",w=r.ordinal&&E?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",C=E&&!r.ordinal&&0===r.count,O=C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(A)]||r["defaultValue".concat(w)]||r.defaultValue,k=g;b&&!g&&x&&(k=O);var F=q(k),D=Object.prototype.toString.apply(k);if(!(b&&k&&F&&["[object Number]","[object Function]","[object RegExp]"].indexOf(D)<0)||f(y)&&Array.isArray(k))if(b&&f(y)&&Array.isArray(g))(g=g.join(y))&&(g=this.extendTranslation(g,e,r,n));else{var B=!1,S=!1;!this.isValidLookup(g)&&x&&(B=!0,g=O),this.isValidLookup(g)||(S=!0,g=a);var j=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:g,L=x&&O!==g&&this.options.updateMissing;if(S||B||L){if(this.logger.log(L?"updateKey":"missingKey",d,l,a,L?O:g),u){var P=this.resolve(a,o(o({},r),{},{keySeparator:!1}));P&&P.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.")}var N=[],T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&T&&T[0])for(var I=0;I<T.length;I++)N.push(T[I]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(r.lng||this.language):N.push(r.lng||this.language);var R=(e,t,n)=>{var o,i=x&&n!==g?n:j;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,L,r):null!==(o=this.backendConnector)&&void 0!==o&&o.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,L,r),this.emit("missingKey",e,l,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?N.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,r);C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&t.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&t.push("".concat(this.options.pluralSeparator,"zero")),t.forEach(t=>{R([e],a+t,r["defaultValue".concat(t)]||O)})}):R(N,a,O))}g=this.extendTranslation(g,e,r,h,n),S&&g===a&&this.options.appendNamespaceToMissingKey&&(g="".concat(l).concat(c).concat(a)),(S||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l).concat(c).concat(a):a,B?g:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,k,o(o({},r),{},{ns:s})):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=z,h.usedParams=this.getUsedParamsDetails(r),h):z}if(u){var H=Array.isArray(k),_=H?[]:{},V=H?m:v;for(var K in k)if(Object.prototype.hasOwnProperty.call(k,K)){var X="".concat(V).concat(u).concat(K);_[K]=x&&!g?this.translate(X,o(o({},r),{},{defaultValue:q(O)?O[K]:void 0},{joinArrays:!1,ns:s})):this.translate(X,o(o({},r),{joinArrays:!1,ns:s})),_[K]===X&&(_[K]=k[K])}g=_}}return i?(h.res=g,h.usedParams=this.getUsedParamsDetails(r),h):g}extendTranslation(e,t,n,r,i){var u,a=this;if(null!==(u=this.i18nFormat)&&void 0!==u&&u.parse)e=this.i18nFormat.parse(e,o(o({},this.options.interpolation.defaultVariables),n),n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(o(o({},n),{interpolation:o(o({},this.options.interpolation),n.interpolation)}));var l,c=f(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(c){var d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}var p=n.replace&&!f(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p=o(o({},this.options.interpolation.defaultVariables),p)),e=this.interpolator.interpolate(e,p,n.lng||this.language||r.usedLng,n),c){var h=e.match(this.interpolator.nestingRegexp);l<(h&&h.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(null==i?void 0:i[0])!==r[0]||n.context?a.translate(...r,t):(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null)}),n)),n.interpolation&&this.interpolator.reset()}var g=n.postProcess||this.options.postProcess,v=f(g)?[g]:g;return null!=e&&null!=v&&v.length&&!1!==n.applyPostProcessor&&(e=I.handle(v,e,t,this.options&&this.options.postProcessPassResolved?o({i18nResolved:o(o({},r),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){var t,n,r,o,i,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(e)&&(e=[e]),e.forEach(e=>{if(!this.isValidLookup(t)){var a=this.extractFromKey(e,u),s=a.key;n=s;var l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));var c=void 0!==u.count&&!f(u.count),d=c&&!u.ordinal&&0===u.count,p=void 0!==u.context&&(f(u.context)||"number"==typeof u.context)&&""!==u.context,h=u.lngs?u.lngs:this.languageUtils.toResolveHierarchy(u.lng||this.language,u.fallbackLng);l.forEach(e=>{var a,l;this.isValidLookup(t)||(i=e,z["".concat(h[0],"-").concat(e)]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.utils)&&void 0!==l&&l.hasLoadedNamespace(i)||(z["".concat(h[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),h.forEach(n=>{var i;if(!this.isValidLookup(t)){o=n;var a,l=[s];if(null!==(i=this.i18nFormat)&&void 0!==i&&i.addLookupKeys)this.i18nFormat.addLookupKeys(l,s,n,e,u);else{var f;c&&(f=this.pluralResolver.getSuffix(n,u.count,u));var h="".concat(this.options.pluralSeparator,"zero"),g="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(c&&(u.ordinal&&0===f.indexOf(g)&&l.push(s+f.replace(g,this.options.pluralSeparator)),l.push(s+f),d&&l.push(s+h)),p){var v="".concat(s).concat(this.options.contextSeparator||"_").concat(u.context);l.push(v),c&&(u.ordinal&&0===f.indexOf(g)&&l.push(v+f.replace(g,this.options.pluralSeparator)),l.push(v+f),d&&l.push(v+h))}}for(;a=l.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,u))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(r=this.i18nFormat)&&void 0!==r&&r.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!f(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=o(o({},this.options.interpolation.defaultVariables),n)),!t)for(var r of(n=o({},n),["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[r];return n}static hasDefaultValue(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}class H{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P.create("languageUtils")}getScriptPartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(f(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;var r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),f(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){var n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return f(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):f(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}var _={zero:0,one:1,two:2,few:3,many:4,other:5},V={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class K{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=P.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=S("dev"===e?"en":e),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{t=new Intl.PluralRules(r,{type:o})}catch(r){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),V;if(!e.match(/-|_/))return V;var u=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(u,n)}return this.pluralRulesCache[i]=t,t}needsPlural(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(null===(t=r)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>"".concat(t).concat(e))}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>_[e]-_[t]).map(e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e)):[]}getSuffix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(r.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}var X=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=A(e,t,n);return!i&&o&&f(n)&&void 0===(i=B(e,n,r))&&(i=B(t,n,r)),i},W=e=>e.replace(/\$/g,"$$$$");class J{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:u,suffixEscaped:a,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:k,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?C(o):i||"{{",this.suffix=u?C(u):a||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?C(d):p||C("$t("),this.nestingSuffix=f?C(f):h||C(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}interpolate(e,t,n,r){var i,u,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){var i=X(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,o(o(o({},r),t),{},{interpolationkey:e})):i}var u=e.split(this.formatSeparator),a=u.shift().trim(),s=u.join(this.formatSeparator).trim();return this.format(X(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,o(o(o({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=(null==r?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=void 0!==(null==r||null===(i=r.interpolation)||void 0===i?void 0:i.skipOnVariables)?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>W(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?W(this.escape(e)):W(e)}].forEach(t=>{for(s=0;u=t.regex.exec(e);){var n=u[1].trim();if(void 0===(a=c(n)))if("function"==typeof d){var o=d(e,u,r);a=f(o)?o:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(p){a=u[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),a=""}else f(a)||this.useRawValueToEscape||(a=g(a));var i=t.safeValue(a);if(e=e.replace(u[0],i),p?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=u[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var n,r,i,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{var n,r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var u=e.split(new RegExp("".concat(r,"[ ]*{"))),a="{".concat(u[1]);e=u[0];var s=(a=this.interpolate(a,i)).match(/'/g),l=a.match(/"/g);((null!==(n=null==s?void 0:s.length)&&void 0!==n?n:0)%2==0&&!l||l.length%2!=0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i=o(o({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(a)}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};n=this.nestingRegexp.exec(e);){var s=[];(i=(i=o({},u)).replace&&!f(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(r=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!f(r))return r;f(r)||(r=g(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),s.length&&(r=s.reduce((e,t)=>this.format(e,t,u.lng,o(o({},u),{},{interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}var $=e=>{var t={};return(n,r,i)=>{var u=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(u=o(o({},u),{},{[i.interpolationkey]:void 0}));var a=r+JSON.stringify(u),s=t[a];return s||(s=e(S(r),i),t[a]=s),s(n)}},Y=e=>(t,n,r)=>e(S(n),r)(t);class G{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?$:Y;this.formats={number:n((e,t)=>{var n=new Intl.NumberFormat(e,o({},t));return e=>n.format(e)}),currency:n((e,t)=>{var n=new Intl.NumberFormat(e,o(o({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{var n=new Intl.DateTimeFormat(e,o({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{var n=new Intl.RelativeTimeFormat(e,o({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{var n=new Intl.ListFormat(e,o({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=$(t)}format(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){var u=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,u)].join(this.formatSeparator)}return i.reduce((e,t)=>{var{formatName:i,formatOptions:u}=(e=>{var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if("currency"===t&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if("relativetime"===t&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{o.split(";").forEach(e=>{if(e){var[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){var a=e;try{var s,l=(null==r||null===(s=r.formatParams)||void 0===s?void 0:s[r.interpolationkey])||{},c=l.locale||l.lng||r.locale||r.lng||n;a=this.formats[i](e,c,o(o(o({},u),r),l))}catch(e){this.logger.warn(e)}return a}return this.logger.warn("there was no format function for ".concat(i)),e},e)}}class Z extends N{constructor(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=P.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=[],null===(r=this.backend)||void 0===r||null===(o=r.init)||void 0===o||o.call(r,n,i.backend,i)}queueLoad(e,t,n,r){var o={},i={},u={},a={};return e.forEach(e=>{var r=!0;t.forEach(t=>{var u="".concat(e,"|").concat(t);!n.reload&&this.store.hasResourceBundle(e,t)?this.state[u]=2:this.state[u]<0||(1===this.state[u]?void 0===i[u]&&(i[u]=!0):(this.state[u]=1,r=!1,void 0===i[u]&&(i[u]=!0),void 0===o[u]&&(o[u]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(u[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var u={};this.queue.forEach(n=>{((e,t,n,r)=>{var{obj:o,k:i}=b(e,t,Object);o[i]=o[i]||[],o[i].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{u[e]||(u[e]={});var t=n.loaded[e];t.length&&t.forEach(t=>{void 0===u[e][t]&&(u[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});else{this.readingCalls++;var u=(u,a)=>{if(this.readingCalls--,this.waitingReads.length>0){var s=this.waitingReads.shift();this.read(s.lng,s.ns,s.fcName,s.tried,s.wait,s.callback)}u&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(u,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,u);try{var s=a(e,t);s&&"function"==typeof s.then?s.then(e=>u(null,e)).catch(u):u(null,s)}catch(e){u(e)}}}prepareLoading(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();f(e)&&(e=this.languageUtils.toResolveHierarchy(e)),f(t)&&(t=[t]);var o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(o," for language ").concat(r," failed"),n),!n&&i&&this.logger.log("".concat(t,"loaded namespace ").concat(o," for language ").concat(r),i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,i){var u,a,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(u=this.services)||void 0===u||null===(u=u.utils)||void 0===u||!u.hasLoadedNamespace||null!==(a=this.services)&&void 0!==a&&null!==(a=a.utils)&&void 0!==a&&a.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var d=o(o({},l),{},{isUpdate:i}),p=this.backend.create.bind(this.backend);if(p.length<6)try{var f;(f=5===p.length?p(e,t,n,r,d):p(e,t,n,r))&&"function"==typeof f.then?f.then(e=>c(null,e)).catch(c):c(null,f)}catch(e){c(e)}else p(e,t,n,r,c,d)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{var t={};if("object"==typeof e[1]&&(t=e[1]),f(e[1])&&(t.defaultValue=e[1]),f(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){var n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ee=e=>{var t,n;return f(e.ns)&&(e.ns=[e.ns]),f(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),f(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},te=()=>{};class ne extends N{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ee(t),this.services={},this.logger=P,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(f(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r,i,u,a,s=Q();this.options=o(o(o({},s),this.options),ee(t)),this.options.interpolation=o(o({},s.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(r=this)||null===(i=r.modules)||void 0===i||null===(i=i.backend)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.indexOf("Locize"))>0||(null==r||null===(u=r.modules)||void 0===u||null===(u=u.backend)||void 0===u||null===(u=u.constructor)||void 0===u||null===(u=u.name)||void 0===u?void 0:u.indexOf("Locize"))>0||null!=r&&null!==(a=r.options)&&void 0!==a&&null!==(a=a.backend)&&void 0!==a&&a.backends&&r.options.backend.backends.some(e=>{var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0}))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");var l=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var c;this.modules.logger?P.init(l(this.modules.logger),this.options):P.init(null,this.options),c=this.modules.formatter?this.modules.formatter:G;var d=new H(this.options);this.store=new T(this.options.resources,this.options);var p=this.services;p.logger=P,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new K(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!c||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(p.formatter=l(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new J(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Z(l(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(p.languageDetector=l(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=l(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=te),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&"dev"!==g[0]&&(this.options.lng=g[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});var v=h(),m=()=>{var e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),v.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),v}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=f(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var r,o;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var i=[],u=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&i.indexOf(e)<0&&i.push(e)}))};if(n)u(n);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>u(e));null===(r=this.options.preload)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>u(e)),this.services.backendConnector.load(i,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){var r=h();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=te),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&I.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;var r=h();this.emit("languageChanging",e);var o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,u)=>{u?this.isLanguageChangingTo===e&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(i,(function(){return n.t(...arguments)}))},u=t=>{e||t||!this.services.languageDetector||(t=[]);var n,r,u=f(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(f(t)?[t]:t);a&&(this.language||o(a),this.translator.language||this.translator.changeLanguage(a),null===(n=this.services.languageDetector)||void 0===n||null===(r=n.cacheUserLanguage)||void 0===r||r.call(n,a));this.loadResources(a,e=>{i(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e):u(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this,i=function(e,t){var u;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];u=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else u=o({},t);u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,""!==u.keyPrefix&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);var c,d=r.options.keySeparator||".";return u.keyPrefix&&Array.isArray(e)?c=e.map(e=>("function"==typeof e&&(e=M(e,o(o({},r.options),t))),"".concat(u.keyPrefix).concat(d).concat(e))):("function"==typeof e&&(e=M(e,o(o({},r.options),t))),c=u.keyPrefix?"".concat(u.keyPrefix).concat(d).concat(e):e),r.t(c,u)};return f(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=(e,t)=>{var n=this.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||0===n||2===n};if(t.precheck){var u=t.precheck(this,i);if(void 0!==u)return u}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){var n=h();return this.options.ns?(f(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){var n=h();f(e)&&(e=[e]);var r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var r=new Intl.Locale(e);if(r&&r.getTextInfo){var o=r.getTextInfo();if(o&&o.direction)return o.direction}}catch(e){}var i=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new H(Q());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=ne.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=e.forkResourceStore;n&&delete e.forkResourceStore;var r=o(o(o({},this.options),e),{isClone:!0}),i=new ne(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services=o({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){var u=Object.keys(this.store.data).reduce((e,t)=>(e[t]=o({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]=o({},e[t][r]),n),e[t]),e),{});i.store=new T(u,r),i.services.resourceStore=i.store}if(e.interpolation){var a=o(o(o({},Q().interpolation),this.options.interpolation),e.interpolation),s=o(o({},r),{},{interpolation:a});i.services.interpolator=new J(s)}return i.translator=new U(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}var re=ne.createInstance();re.createInstance,re.dir,re.init,re.loadResources,re.reloadResources,re.use,re.changeLanguage,re.getFixedT,re.t,re.exists,re.setDefaultNamespace,re.hasLoadedNamespace,re.loadNamespaces,re.loadLanguages;function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":oe(XMLHttpRequest))}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==le(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ce,de,pe="function"==typeof fetch?fetch:void 0;if("undefined"!=typeof global&&global.fetch?pe=global.fetch:"undefined"!=typeof window&&window.fetch&&(pe=window.fetch),ie()&&("undefined"!=typeof global&&global.XMLHttpRequest?ce=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ce=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?de=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(de=window.ActiveXObject)),"function"!=typeof pe&&(pe=void 0),!pe&&!ce&&!de)try{import("cross-fetch").then((function(e){pe=e.default})).catch((function(){}))}catch(e){}var fe=function(e,t){if(t&&"object"===le(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},he=function(e,t,n,r){var o=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};if(r){var i=r(e,t);if(i instanceof Promise)return void i.then(o).catch(n)}"function"==typeof fetch?fetch(e,t).then(o).catch(n):pe(e,t).then(o).catch(n)},ge=!1,ve=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},pe&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=fe(t,e.queryStringParams));var o=ae({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,u=ae({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},ge?{}:i),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{he(t,u,r,a)}catch(e){if(!i||0===Object.keys(i).length||!e.message||e.message.indexOf("not implemented")<0)return r(e);try{Object.keys(i).forEach((function(e){delete u[e]})),he(t,u,r,a),ge=!0}catch(e){r(e)}}}(e,t,n,r):ie()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===le(n)&&(n=fe("",n).slice(1)),e.queryStringParams&&(t=fe(t,e.queryStringParams));try{var o=ce?new ce:new de("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var u in i)o.setRequestHeader(u,i[u]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function Ae(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){var t=function(e,t){if("object"!=me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==me(t)?t:t+""}var Ce=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return Ae({},t,n||"")},parseLoadPayload:function(e,t){},request:ve,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Oe=function(e,t,n){return t&&xe(e.prototype,t),n&&xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ee(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}),[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=be(be(be({},Ce()),this.options||{}),n),this.allOptions=r,this.services&&this.options.reloadInterval){var o=setInterval((function(){return t.reload()}),this.options.reloadInterval);"object"===me(o)&&"function"==typeof o.unref&&o.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,u=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=function(e){return!!e&&"function"==typeof e.then}(i=a)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var a=u.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});u.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,u="string"==typeof r?[r]:r,a=this.options.parseLoadPayload(i,u);this.options.request(this.options,e,a,(function(i,u){if(u&&(u.status>=500&&u.status<600||!u.status))return t("failed loading "+e+"; status code: "+u.status,!0);if(u&&u.status>=400&&u.status<500)return t("failed loading "+e+"; status code: "+u.status,!1);if(!u&&i&&i.message){var a=i.message.toLowerCase();if(["failed","fetch","network","load"].find((function(e){return a.indexOf(e)>-1})))return t("failed loading "+e+": "+i.message,!0)}if(i)return t(i,!1);var s,l;try{s="string"==typeof u.data?o.options.parse(u.data,n,r):u.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var u=this.options.parsePayload(t,n,r),a=0,s=[],l=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var c=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,c,u,(function(t,n){a+=1,s.push(t),l.push(n),a===e.length&&"function"==typeof o&&o(s,l)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var u=[],a=function(e){r.toResolveHierarchy(e).forEach((function(e){u.indexOf(e)<0&&u.push(e)}))};a(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),u.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}]);Oe.type="backend";var{slice:ke,forEach:Fe}=[];var De=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Be={create(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},r=n,o=encodeURIComponent(t),i="".concat(e,"=").concat(o);if(r.maxAge>0){var u=r.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(u))}if(r.domain){if(!De.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!De.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite){var a="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(a){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r.partitioned&&(i+="; Partitioned"),i}(e,t,o)},read(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}},Se={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Be.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Be.create(n,e,r,o,i)}},je={name:"querystring",lookup(e){var t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){var r,{search:o}=window.location;!window.location.search&&(null===(r=window.location.hash)||void 0===r?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=o.substring(1).split("&"),u=0;u<i.length;u++){var a=i[u].indexOf("=");if(a>0)i[u].substring(0,a)===n&&(t=i[u].substring(a+1))}}return t}},Le={name:"hash",lookup(e){var t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){var{hash:o}=window.location;if(o&&o.length>2){var i=o.substring(1);if(n)for(var u=i.split("&"),a=0;a<u.length;a++){var s=u[a].indexOf("=");if(s>0)u[a].substring(0,s)===n&&(t=u[a].substring(s+1))}if(t)return t;if(!t&&r>-1){var l,c=o.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(c))return;return null===(l=c["number"==typeof r?r:0])||void 0===l?void 0:l.replace("/","")}}}return t}},Pe=null,Ne=()=>{if(null!==Pe)return Pe;try{if(!(Pe="undefined"!=typeof window&&null!==window.localStorage))return!1;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){Pe=!1}return Pe},Te={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&Ne())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:n}=t;n&&Ne()&&window.localStorage.setItem(n,e)}},Ie=null,Re=()=>{if(null!==Ie)return Ie;try{if(!(Ie="undefined"!=typeof window&&null!==window.sessionStorage))return!1;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){Ie=!1}return Ie},Me={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&Re())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:n}=t;n&&Re()&&window.sessionStorage.setItem(n,e)}},ze={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:n,userLanguage:r,language:o}=navigator;if(n)for(var i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},qe={name:"htmlTag",lookup(e){var t,{htmlTag:n}=e,r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Ue={name:"path",lookup(e){var t,{lookupFromPathIndex:n}=e;if("undefined"!=typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(r))return null===(t=r["number"==typeof n?n:0])||void 0===t?void 0:t.replace("/","")}}},He={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:n}=e,r="number"==typeof n?n+1:1,o="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[r]}},_e=!1;try{document.cookie,_e=!0}catch(e){}var Ve=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_e||Ve.splice(1,1);class Ke{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Fe.call(ke.call(arguments,1),t=>{if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:Ve,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Se),this.addDetector(je),this.addDetector(Te),this.addDetector(Me),this.addDetector(ze),this.addDetector(qe),this.addDetector(Ue),this.addDetector(He),this.addDetector(Le)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}Ke.type="languageDetector";var Xe=a(s((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),We=a(s((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}))),Je=s((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));a(Je);var $e=a(s((function(e){var t=l.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Je(e)},e.exports.__esModule=!0,e.exports.default=e.exports}))),Ye=a(s((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}))),Ge=s((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(Ge);var Ze=a(s((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ge(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports})));function Qe(e,t,n){return t=Ye(t),$e(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n))}var et=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xe(this,t),(n=Qe(this,t)).ele=e,n.options=r,n.observer=n.create(),n.internalChange=!0,n}return Ze(t,e),We(t,[{key:"create",value:function(){var e,t=this,n=new MutationObserver((function(n){t.internalChange&&(e&&window.clearTimeout(e),e=setTimeout((function(){t.internalChange&&(t.internalChange=!1)}),200)),t.internalChange||t.emit("changed",n)}));return n.observe(this.ele,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n}},{key:"reset",value:function(){this.internalChange=!0}}])}(function(){return We((function e(){Xe(this,e),this.observers={}}),[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}])}()),tt=[],nt=!1,rt=!1;function ot(){if(!nt){nt=!0;for(var e=0;e<tt.length;e++)tt[e].fn.call(window,tt[e].ctx);tt=[]}}function it(){"complete"===document.readyState&&ot()}function ut(e,t){nt?setTimeout((function(){e(t)}),1):(tt.push({fn:e,ctx:t}),"complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState?setTimeout(ot,1):rt||(document.addEventListener?(document.addEventListener("DOMContentLoaded",ot,!1),window.addEventListener("load",ot,!1)):(document.attachEvent("onreadystatechange",it),window.attachEvent("onload",ot)),rt=!0))}var at=function(e){return e&&"VirtualNode"===e.type&&"2"===e.version};var st=function(e){return e&&"Widget"===e.type};var lt=function(e){return e&&"Thunk"===e.type};var ct=function(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))};var dt=ht,pt={},ft=[];function ht(e,t,n,r,o){this.tagName=e,this.properties=t||pt,this.children=n||ft,this.key=null!=r?String(r):void 0,this.namespace="string"==typeof o?o:null;var i,u=n&&n.length||0,a=0,s=!1,l=!1,c=!1;for(var d in t)if(t.hasOwnProperty(d)){var p=t[d];ct(p)&&p.unhook&&(i||(i={}),i[d]=p)}for(var f=0;f<u;f++){var h=n[f];at(h)?(a+=h.count||0,!s&&h.hasWidgets&&(s=!0),!l&&h.hasThunks&&(l=!0),c||!h.hooks&&!h.descendantHooks||(c=!0)):!s&&st(h)?"function"==typeof h.destroy&&(s=!0):!l&&lt(h)&&(l=!0)}this.count=u+a,this.hasWidgets=s,this.hasThunks=l,this.hooks=i,this.descendantHooks=c}ht.prototype.version="2",ht.prototype.type="VirtualNode";var gt=vt;function vt(e){this.text=String(e)}vt.prototype.version="2",vt.prototype.type="VirtualText";var mt=yt;function yt(e){this.text=String(e)}yt.prototype.type="Widget",yt.prototype.init=function(){return document.createComment(this.text)},yt.prototype.update=function(e,t){this.text!==e.text&&(t.nodeValue=this.text)};var bt=s((function(e){function t(e,o){return 1==e.nodeType?function(e){for(var o=e.tagName,i="http://www.w3.org/1999/xhtml"==e.namespaceURI?null:e.namespaceURI,u=function(e){for(var t={},o=0;o<n.length;o++){var i=n[o];if(e[i])if("style"!=i){if("img"!==e.tagName.toLowerCase()||"href"!==i)if("attributes"!=i)"tabIndex"==i&&-1===e.tabIndex||"contentEditable"==i&&"inherit"===e[i]||"object"!=typeof e[i]&&(t[i]=e[i]);else{for(var u=Array.prototype.slice.call(e[i]),a={},s=0;s<u.length;s++){var l=u[s].name;t[l]||t[r[l]]||(a[l]=e.getAttribute(l))}t[i]=a}}else{var c={};if(void 0!==e.style.length)for(var d=0;d<e.style.length;d++)p=e.style[d],c[p]=e.style.getPropertyValue(p);else for(var p in e.style)e.style[p]&&e.style.hasOwnProperty(p)&&(c[p]=e.style[p]);Object.keys(c).length&&(t[i]=c)}}return t}(e),a=[],s=0;s<e.childNodes.length;s++)a.push(t(e.childNodes[s]));return new dt(o,u,a,null,i)}(e):3==e.nodeType?new gt(e.nodeValue):8==e.nodeType?new mt(e.nodeValue):void 0}
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).locizify=t()}(this,(function(){"use strict";function e(e,t,n,r,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var u=t.apply(n,r);function a(t){e(u,o,i,a,s,"next",t)}function s(t){e(u,o,i,a,s,"throw",t)}a(void 0)}))}}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e,t){return e(t={exports:{}},t.exports),t.exports}var l=s((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(l);var c=s((function(e){var t=l.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));a(c);var d=s((function(e){var t=l.default;e.exports=function(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports}));a(d);var p=a(s((function(e){e.exports=function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=e=>"string"==typeof e,h=()=>{var e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},g=e=>null==e?"":""+e,v=/###/g,m=e=>e&&e.indexOf("###")>-1?e.replace(v,"."):e,y=e=>!e||f(e),b=(e,t,n)=>{for(var r=f(t)?t.split("."):t,o=0;o<r.length-1;){if(y(e))return{};var i=m(r[o]);!e[i]&&n&&(e[i]=new n),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{},++o}return y(e)?{}:{obj:e,k:m(r[o])}},E=(e,t,n)=>{var{obj:r,k:o}=b(e,t,Object);if(void 0===r&&1!==t.length){for(var i=t[t.length-1],u=t.slice(0,t.length-1),a=b(e,u,Object);void 0===a.obj&&u.length;){var s;i="".concat(u[u.length-1],".").concat(i),u=u.slice(0,u.length-1),null!==(s=a=b(e,u,Object))&&void 0!==s&&s.obj&&void 0!==a.obj["".concat(a.k,".").concat(i)]&&(a.obj=void 0)}a.obj["".concat(a.k,".").concat(i)]=n}else r[o]=n},x=(e,t)=>{var{obj:n,k:r}=b(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A=(e,t,n)=>{var r=x(e,n);return void 0!==r?r:x(t,n)},w=(e,t,n)=>{for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?f(e[r])||e[r]instanceof String||f(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):w(e[r],t[r],n):e[r]=t[r]);return e},C=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},k=e=>f(e)?e.replace(/[&<>"'\/]/g,e=>O[e]):e;var F=[" ",",","?","!",";"],D=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),B=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var r=t.split(n),o=e,i=0;i<r.length;){if(!o||"object"!=typeof o)return;for(var u=void 0,a="",s=i;s<r.length;++s)if(s!==i&&(a+=n),void 0!==(u=o[a+=r[s]])){if(["string","number","boolean"].indexOf(typeof u)>-1&&s<r.length-1)continue;i+=s-i+1;break}o=u}return o}},S=e=>null==e?void 0:e.replace("_","-"),j={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(r=n.apply)||void 0===r||r.call(n,console,t)}};class L{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||j,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(f(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new L(this.logger,o(o({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new L(this.logger,e)}}var P=new L;class N{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{for(var[t,r]=e,o=0;o<r;o++)t(...n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{for(var[r,o]=t,i=0;i<o;i++)r.apply(r,[e,...n])})}}class T extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):f(n)&&u?o.push(...n.split(u)):o.push(n)));var s=x(this.data,o);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!s&&a&&f(n)?B(null===(r=this.data)||void 0===r||null===(r=r[e])||void 0===r?void 0:r[t],n,u):s}addResource(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,u=[e,t];n&&(u=u.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(u=e.split("."))[1]),this.addNamespaces(t),E(this.data,u,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)(f(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=x(this.data,a)||{};u.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?w(s,n,i):s=o(o({},s),n),E(this.data,a,s),u.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var I={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{var i,u;t=null!==(i=null===(u=this.processors[e])||void 0===u?void 0:u.process(t,n,r,o))&&void 0!==i?i:t}),t}},R=Symbol("i18next/PATH_KEY");function M(e,t){var n,{[R]:r}=e(function(){var e,t=[],n=Object.create(null);return n.get=(r,o)=>{var i,u;return null===(i=e)||void 0===i||null===(u=i.revoke)||void 0===u||u.call(i),o===R?t:(t.push(o),(e=Proxy.revocable(r,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}());return r.join(null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".")}var z={},q=e=>!f(e)&&"boolean"!=typeof e&&"number"!=typeof e;class U extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=P.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=o({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var r=q(n.res);return!1!==t.returnObjects||!r}extractFromKey(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,u=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";var r=F.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;var o=D.getRegExp("(".concat(r.map(e=>"?"===e?"\\?":e).join("|"),")")),i=!o.test(e);if(!i){var u=e.indexOf(n);u>0&&!o.test(e.substring(0,u))&&(i=!0)}return i})(e,n,r));if(i&&!u){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:f(o)?[o]:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return{key:e,namespaces:f(o)?[o]:o}}translate(e,t,n){var r="object"==typeof t?o({},t):t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r=o({},r)),r||(r={}),null==e)return"";"function"==typeof e&&(e=M(e,o(o({},this.options),r))),Array.isArray(e)||(e=[String(e)]);var i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,u=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var d=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?i?{res:"".concat(l).concat(c).concat(a),usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:"".concat(l).concat(c).concat(a):i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;var h=this.resolve(e,r),g=null==h?void 0:h.res,v=(null==h?void 0:h.usedKey)||a,m=(null==h?void 0:h.exactUsedKey)||a,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,E=void 0!==r.count&&!f(r.count),x=U.hasDefaultValue(r),A=E?this.pluralResolver.getSuffix(d,r.count,r):"",w=r.ordinal&&E?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",C=E&&!r.ordinal&&0===r.count,O=C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(A)]||r["defaultValue".concat(w)]||r.defaultValue,k=g;b&&!g&&x&&(k=O);var F=q(k),D=Object.prototype.toString.apply(k);if(!(b&&k&&F&&["[object Number]","[object Function]","[object RegExp]"].indexOf(D)<0)||f(y)&&Array.isArray(k))if(b&&f(y)&&Array.isArray(g))(g=g.join(y))&&(g=this.extendTranslation(g,e,r,n));else{var B=!1,S=!1;!this.isValidLookup(g)&&x&&(B=!0,g=O),this.isValidLookup(g)||(S=!0,g=a);var j=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:g,L=x&&O!==g&&this.options.updateMissing;if(S||B||L){if(this.logger.log(L?"updateKey":"missingKey",d,l,a,L?O:g),u){var P=this.resolve(a,o(o({},r),{},{keySeparator:!1}));P&&P.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.")}var N=[],T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&T&&T[0])for(var I=0;I<T.length;I++)N.push(T[I]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(r.lng||this.language):N.push(r.lng||this.language);var R=(e,t,n)=>{var o,i=x&&n!==g?n:j;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,L,r):null!==(o=this.backendConnector)&&void 0!==o&&o.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,L,r),this.emit("missingKey",e,l,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?N.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,r);C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&t.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&t.push("".concat(this.options.pluralSeparator,"zero")),t.forEach(t=>{R([e],a+t,r["defaultValue".concat(t)]||O)})}):R(N,a,O))}g=this.extendTranslation(g,e,r,h,n),S&&g===a&&this.options.appendNamespaceToMissingKey&&(g="".concat(l).concat(c).concat(a)),(S||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l).concat(c).concat(a):a,B?g:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,k,o(o({},r),{},{ns:s})):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=z,h.usedParams=this.getUsedParamsDetails(r),h):z}if(u){var H=Array.isArray(k),_=H?[]:{},V=H?m:v;for(var K in k)if(Object.prototype.hasOwnProperty.call(k,K)){var X="".concat(V).concat(u).concat(K);_[K]=x&&!g?this.translate(X,o(o({},r),{},{defaultValue:q(O)?O[K]:void 0},{joinArrays:!1,ns:s})):this.translate(X,o(o({},r),{joinArrays:!1,ns:s})),_[K]===X&&(_[K]=k[K])}g=_}}return i?(h.res=g,h.usedParams=this.getUsedParamsDetails(r),h):g}extendTranslation(e,t,n,r,i){var u,a=this;if(null!==(u=this.i18nFormat)&&void 0!==u&&u.parse)e=this.i18nFormat.parse(e,o(o({},this.options.interpolation.defaultVariables),n),n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(o(o({},n),{interpolation:o(o({},this.options.interpolation),n.interpolation)}));var l,c=f(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(c){var d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}var p=n.replace&&!f(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p=o(o({},this.options.interpolation.defaultVariables),p)),e=this.interpolator.interpolate(e,p,n.lng||this.language||r.usedLng,n),c){var h=e.match(this.interpolator.nestingRegexp);l<(h&&h.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(null==i?void 0:i[0])!==r[0]||n.context?a.translate(...r,t):(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null)}),n)),n.interpolation&&this.interpolator.reset()}var g=n.postProcess||this.options.postProcess,v=f(g)?[g]:g;return null!=e&&null!=v&&v.length&&!1!==n.applyPostProcessor&&(e=I.handle(v,e,t,this.options&&this.options.postProcessPassResolved?o({i18nResolved:o(o({},r),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){var t,n,r,o,i,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(e)&&(e=[e]),e.forEach(e=>{if(!this.isValidLookup(t)){var a=this.extractFromKey(e,u),s=a.key;n=s;var l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));var c=void 0!==u.count&&!f(u.count),d=c&&!u.ordinal&&0===u.count,p=void 0!==u.context&&(f(u.context)||"number"==typeof u.context)&&""!==u.context,h=u.lngs?u.lngs:this.languageUtils.toResolveHierarchy(u.lng||this.language,u.fallbackLng);l.forEach(e=>{var a,l;this.isValidLookup(t)||(i=e,z["".concat(h[0],"-").concat(e)]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.utils)&&void 0!==l&&l.hasLoadedNamespace(i)||(z["".concat(h[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),h.forEach(n=>{var i;if(!this.isValidLookup(t)){o=n;var a,l=[s];if(null!==(i=this.i18nFormat)&&void 0!==i&&i.addLookupKeys)this.i18nFormat.addLookupKeys(l,s,n,e,u);else{var f;c&&(f=this.pluralResolver.getSuffix(n,u.count,u));var h="".concat(this.options.pluralSeparator,"zero"),g="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(c&&(u.ordinal&&0===f.indexOf(g)&&l.push(s+f.replace(g,this.options.pluralSeparator)),l.push(s+f),d&&l.push(s+h)),p){var v="".concat(s).concat(this.options.contextSeparator||"_").concat(u.context);l.push(v),c&&(u.ordinal&&0===f.indexOf(g)&&l.push(v+f.replace(g,this.options.pluralSeparator)),l.push(v+f),d&&l.push(v+h))}}for(;a=l.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,u))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(r=this.i18nFormat)&&void 0!==r&&r.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!f(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=o(o({},this.options.interpolation.defaultVariables),n)),!t)for(var r of(n=o({},n),["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[r];return n}static hasDefaultValue(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}class H{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P.create("languageUtils")}getScriptPartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(f(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;var r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),f(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){var n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return f(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):f(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}var _={zero:0,one:1,two:2,few:3,many:4,other:5},V={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class K{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=P.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=S("dev"===e?"en":e),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{t=new Intl.PluralRules(r,{type:o})}catch(r){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),V;if(!e.match(/-|_/))return V;var u=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(u,n)}return this.pluralRulesCache[i]=t,t}needsPlural(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(null===(t=r)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>"".concat(t).concat(e))}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>_[e]-_[t]).map(e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e)):[]}getSuffix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(r.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}var X=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=A(e,t,n);return!i&&o&&f(n)&&void 0===(i=B(e,n,r))&&(i=B(t,n,r)),i},W=e=>e.replace(/\$/g,"$$$$");class J{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:u,suffixEscaped:a,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:k,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?C(o):i||"{{",this.suffix=u?C(u):a||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?C(d):p||C("$t("),this.nestingSuffix=f?C(f):h||C(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}interpolate(e,t,n,r){var i,u,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){var i=X(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,o(o(o({},r),t),{},{interpolationkey:e})):i}var u=e.split(this.formatSeparator),a=u.shift().trim(),s=u.join(this.formatSeparator).trim();return this.format(X(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,o(o(o({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=(null==r?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=void 0!==(null==r||null===(i=r.interpolation)||void 0===i?void 0:i.skipOnVariables)?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>W(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?W(this.escape(e)):W(e)}].forEach(t=>{for(s=0;u=t.regex.exec(e);){var n=u[1].trim();if(void 0===(a=c(n)))if("function"==typeof d){var o=d(e,u,r);a=f(o)?o:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(p){a=u[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),a=""}else f(a)||this.useRawValueToEscape||(a=g(a));var i=t.safeValue(a);if(e=e.replace(u[0],i),p?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=u[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var n,r,i,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{var n,r,u=this.nestingOptionsSeparator;if(e.indexOf(u)<0)return e;var a=e.split(new RegExp("".concat(C(u),"[ ]*{"))),s="{".concat(a[1]);e=a[0];var l=(s=this.interpolate(s,i)).match(/'/g),c=s.match(/"/g);((null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)%2==0&&!c||(null!==(r=null==c?void 0:c.length)&&void 0!==r?r:0)%2!=0)&&(s=s.replace(/'/g,'"'));try{i=JSON.parse(s),t&&(i=o(o({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(u).concat(s)}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};n=this.nestingRegexp.exec(e);){var s=[];(i=(i=o({},u)).replace&&!f(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(r=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!f(r))return r;f(r)||(r=g(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),s.length&&(r=s.reduce((e,t)=>this.format(e,t,u.lng,o(o({},u),{},{interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}var $=e=>{var t={};return(n,r,i)=>{var u=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(u=o(o({},u),{},{[i.interpolationkey]:void 0}));var a=r+JSON.stringify(u),s=t[a];return s||(s=e(S(r),i),t[a]=s),s(n)}},Y=e=>(t,n,r)=>e(S(n),r)(t);class G{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?$:Y;this.formats={number:n((e,t)=>{var n=new Intl.NumberFormat(e,o({},t));return e=>n.format(e)}),currency:n((e,t)=>{var n=new Intl.NumberFormat(e,o(o({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{var n=new Intl.DateTimeFormat(e,o({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{var n=new Intl.RelativeTimeFormat(e,o({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{var n=new Intl.ListFormat(e,o({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=$(t)}format(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){var u=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,u)].join(this.formatSeparator)}return i.reduce((e,t)=>{var{formatName:i,formatOptions:u}=(e=>{var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if("currency"===t&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if("relativetime"===t&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{o.split(";").forEach(e=>{if(e){var[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){var a=e;try{var s,l=(null==r||null===(s=r.formatParams)||void 0===s?void 0:s[r.interpolationkey])||{},c=l.locale||l.lng||r.locale||r.lng||n;a=this.formats[i](e,c,o(o(o({},u),r),l))}catch(e){this.logger.warn(e)}return a}return this.logger.warn("there was no format function for ".concat(i)),e},e)}}class Z extends N{constructor(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=P.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=[],null===(r=this.backend)||void 0===r||null===(o=r.init)||void 0===o||o.call(r,n,i.backend,i)}queueLoad(e,t,n,r){var o={},i={},u={},a={};return e.forEach(e=>{var r=!0;t.forEach(t=>{var u="".concat(e,"|").concat(t);!n.reload&&this.store.hasResourceBundle(e,t)?this.state[u]=2:this.state[u]<0||(1===this.state[u]?void 0===i[u]&&(i[u]=!0):(this.state[u]=1,r=!1,void 0===i[u]&&(i[u]=!0),void 0===o[u]&&(o[u]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(u[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var u={};this.queue.forEach(n=>{((e,t,n,r)=>{var{obj:o,k:i}=b(e,t,Object);o[i]=o[i]||[],o[i].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{u[e]||(u[e]={});var t=n.loaded[e];t.length&&t.forEach(t=>{void 0===u[e][t]&&(u[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});else{this.readingCalls++;var u=(u,a)=>{if(this.readingCalls--,this.waitingReads.length>0){var s=this.waitingReads.shift();this.read(s.lng,s.ns,s.fcName,s.tried,s.wait,s.callback)}u&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(u,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,u);try{var s=a(e,t);s&&"function"==typeof s.then?s.then(e=>u(null,e)).catch(u):u(null,s)}catch(e){u(e)}}}prepareLoading(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();f(e)&&(e=this.languageUtils.toResolveHierarchy(e)),f(t)&&(t=[t]);var o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(o," for language ").concat(r," failed"),n),!n&&i&&this.logger.log("".concat(t,"loaded namespace ").concat(o," for language ").concat(r),i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,i){var u,a,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(u=this.services)||void 0===u||null===(u=u.utils)||void 0===u||!u.hasLoadedNamespace||null!==(a=this.services)&&void 0!==a&&null!==(a=a.utils)&&void 0!==a&&a.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var d=o(o({},l),{},{isUpdate:i}),p=this.backend.create.bind(this.backend);if(p.length<6)try{var f;(f=5===p.length?p(e,t,n,r,d):p(e,t,n,r))&&"function"==typeof f.then?f.then(e=>c(null,e)).catch(c):c(null,f)}catch(e){c(e)}else p(e,t,n,r,c,d)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{var t={};if("object"==typeof e[1]&&(t=e[1]),f(e[1])&&(t.defaultValue=e[1]),f(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){var n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ee=e=>{var t,n;return f(e.ns)&&(e.ns=[e.ns]),f(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),f(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},te=()=>{};class ne extends N{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ee(t),this.services={},this.logger=P,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(f(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r,i,u,a,s,l,c=Q();this.options=o(o(o({},c),this.options),ee(t)),this.options.interpolation=o(o({},c.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=c.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(r=this)||null===(i=r.modules)||void 0===i||null===(i=i.backend)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.indexOf("Locize"))>0||(null==r||null===(u=r.modules)||void 0===u||null===(u=u.backend)||void 0===u||null===(u=u.constructor)||void 0===u||null===(u=u.name)||void 0===u?void 0:u.indexOf("Locize"))>0||null!=r&&null!==(a=r.options)&&void 0!==a&&null!==(a=a.backend)&&void 0!==a&&a.backends&&r.options.backend.backends.some(e=>{var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0})||null!=r&&null!==(s=r.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=r&&null!==(l=r.options)&&void 0!==l&&null!==(l=l.backend)&&void 0!==l&&l.backendOptions&&r.options.backend.backendOptions.some(e=>null==e?void 0:e.projectId))||"undefined"!=typeof globalThis&&globalThis.__i18next_supportNoticeShown||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis.__i18next_supportNoticeShown=!0));var d=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var p;this.modules.logger?P.init(d(this.modules.logger),this.options):P.init(null,this.options),p=this.modules.formatter?this.modules.formatter:G;var g=new H(this.options);this.store=new T(this.options.resources,this.options);var v=this.services;v.logger=P,v.resourceStore=this.store,v.languageUtils=g,v.pluralResolver=new K(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==c.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!p||this.options.interpolation.format&&this.options.interpolation.format!==c.interpolation.format||(v.formatter=d(p),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new J(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new Z(d(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(v.languageDetector=d(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=d(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=te),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&"dev"!==m[0]&&(this.options.lng=m[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});var y=h(),b=()=>{var e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),y.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?b():setTimeout(b,0),y}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=f(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var r,o;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var i=[],u=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&i.indexOf(e)<0&&i.push(e)}))};if(n)u(n);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>u(e));null===(r=this.options.preload)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>u(e)),this.services.backendConnector.load(i,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){var r=h();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=te),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&I.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;var r=h();this.emit("languageChanging",e);var o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,u)=>{u?this.isLanguageChangingTo===e&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(i,(function(){return n.t(...arguments)}))},u=t=>{e||t||!this.services.languageDetector||(t=[]);var n,r,u=f(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(f(t)?[t]:t);a&&(this.language||o(a),this.translator.language||this.translator.changeLanguage(a),null===(n=this.services.languageDetector)||void 0===n||null===(r=n.cacheUserLanguage)||void 0===r||r.call(n,a));this.loadResources(a,e=>{i(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e):u(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this,i=function(e,t){var u;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];u=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else u=o({},t);u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,""!==u.keyPrefix&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);var c,d=r.options.keySeparator||".";return u.keyPrefix&&Array.isArray(e)?c=e.map(e=>("function"==typeof e&&(e=M(e,o(o({},r.options),t))),"".concat(u.keyPrefix).concat(d).concat(e))):("function"==typeof e&&(e=M(e,o(o({},r.options),t))),c=u.keyPrefix?"".concat(u.keyPrefix).concat(d).concat(e):e),r.t(c,u)};return f(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=(e,t)=>{var n=this.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||0===n||2===n};if(t.precheck){var u=t.precheck(this,i);if(void 0!==u)return u}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){var n=h();return this.options.ns?(f(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){var n=h();f(e)&&(e=[e]);var r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var r=new Intl.Locale(e);if(r&&r.getTextInfo){var o=r.getTextInfo();if(o&&o.direction)return o.direction}}catch(e){}var i=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new H(Q());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=ne.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=e.forkResourceStore;n&&delete e.forkResourceStore;var r=o(o(o({},this.options),e),{isClone:!0}),i=new ne(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services=o({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){var u=Object.keys(this.store.data).reduce((e,t)=>(e[t]=o({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]=o({},e[t][r]),n),e[t]),e),{});i.store=new T(u,r),i.services.resourceStore=i.store}if(e.interpolation){var a=o(o(o({},Q().interpolation),this.options.interpolation),e.interpolation),s=o(o({},r),{},{interpolation:a});i.services.interpolator=new J(s)}return i.translator=new U(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}var re=ne.createInstance();re.createInstance,re.dir,re.init,re.loadResources,re.reloadResources,re.use,re.changeLanguage,re.getFixedT,re.t,re.exists,re.setDefaultNamespace,re.hasLoadedNamespace,re.loadNamespaces,re.loadLanguages;function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":oe(XMLHttpRequest))}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==le(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ce,de,pe="function"==typeof fetch?fetch:void 0;if("undefined"!=typeof global&&global.fetch?pe=global.fetch:"undefined"!=typeof window&&window.fetch&&(pe=window.fetch),ie()&&("undefined"!=typeof global&&global.XMLHttpRequest?ce=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ce=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?de=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(de=window.ActiveXObject)),"function"!=typeof pe&&(pe=void 0),!pe&&!ce&&!de)try{import("cross-fetch").then((function(e){pe=e.default})).catch((function(){}))}catch(e){}var fe=function(e,t){if(t&&"object"===le(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},he=function(e,t,n,r){var o=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};if(r){var i=r(e,t);if(i instanceof Promise)return void i.then(o).catch(n)}"function"==typeof fetch?fetch(e,t).then(o).catch(n):pe(e,t).then(o).catch(n)},ge=!1,ve=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},pe&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=fe(t,e.queryStringParams));var o=ae({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,u=ae({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},ge?{}:i),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{he(t,u,r,a)}catch(e){if(!i||0===Object.keys(i).length||!e.message||e.message.indexOf("not implemented")<0)return r(e);try{Object.keys(i).forEach((function(e){delete u[e]})),he(t,u,r,a),ge=!0}catch(e){r(e)}}}(e,t,n,r):ie()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===le(n)&&(n=fe("",n).slice(1)),e.queryStringParams&&(t=fe(t,e.queryStringParams));try{var o=ce?new ce:new de("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var u in i)o.setRequestHeader(u,i[u]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function Ae(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){var t=function(e,t){if("object"!=me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==me(t)?t:t+""}var Ce=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return Ae({},t,n||"")},parseLoadPayload:function(e,t){},request:ve,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Oe=function(e,t,n){return t&&xe(e.prototype,t),n&&xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ee(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}),[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=be(be(be({},Ce()),this.options||{}),n),this.allOptions=r,this.services&&this.options.reloadInterval){var o=setInterval((function(){return t.reload()}),this.options.reloadInterval);"object"===me(o)&&"function"==typeof o.unref&&o.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,u=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=function(e){return!!e&&"function"==typeof e.then}(i=a)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var a=u.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});u.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,u="string"==typeof r?[r]:r,a=this.options.parseLoadPayload(i,u);this.options.request(this.options,e,a,(function(i,u){if(u&&(u.status>=500&&u.status<600||!u.status))return t("failed loading "+e+"; status code: "+u.status,!0);if(u&&u.status>=400&&u.status<500)return t("failed loading "+e+"; status code: "+u.status,!1);if(!u&&i&&i.message){var a=i.message.toLowerCase();if(["failed","fetch","network","load"].find((function(e){return a.indexOf(e)>-1})))return t("failed loading "+e+": "+i.message,!0)}if(i)return t(i,!1);var s,l;try{s="string"==typeof u.data?o.options.parse(u.data,n,r):u.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var u=this.options.parsePayload(t,n,r),a=0,s=[],l=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var c=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,c,u,(function(t,n){a+=1,s.push(t),l.push(n),a===e.length&&"function"==typeof o&&o(s,l)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var u=[],a=function(e){r.toResolveHierarchy(e).forEach((function(e){u.indexOf(e)<0&&u.push(e)}))};a(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),u.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}]);Oe.type="backend";var{slice:ke,forEach:Fe}=[];var De=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Be={create(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},r=n,o=encodeURIComponent(t),i="".concat(e,"=").concat(o);if(r.maxAge>0){var u=r.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(u))}if(r.domain){if(!De.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!De.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite){var a="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(a){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r.partitioned&&(i+="; Partitioned"),i}(e,t,o)},read(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}},Se={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Be.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Be.create(n,e,r,o,i)}},je={name:"querystring",lookup(e){var t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){var r,{search:o}=window.location;!window.location.search&&(null===(r=window.location.hash)||void 0===r?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=o.substring(1).split("&"),u=0;u<i.length;u++){var a=i[u].indexOf("=");if(a>0)i[u].substring(0,a)===n&&(t=i[u].substring(a+1))}}return t}},Le={name:"hash",lookup(e){var t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){var{hash:o}=window.location;if(o&&o.length>2){var i=o.substring(1);if(n)for(var u=i.split("&"),a=0;a<u.length;a++){var s=u[a].indexOf("=");if(s>0)u[a].substring(0,s)===n&&(t=u[a].substring(s+1))}if(t)return t;if(!t&&r>-1){var l,c=o.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(c))return;return null===(l=c["number"==typeof r?r:0])||void 0===l?void 0:l.replace("/","")}}}return t}},Pe=null,Ne=()=>{if(null!==Pe)return Pe;try{if(!(Pe="undefined"!=typeof window&&null!==window.localStorage))return!1;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){Pe=!1}return Pe},Te={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&Ne())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:n}=t;n&&Ne()&&window.localStorage.setItem(n,e)}},Ie=null,Re=()=>{if(null!==Ie)return Ie;try{if(!(Ie="undefined"!=typeof window&&null!==window.sessionStorage))return!1;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){Ie=!1}return Ie},Me={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&Re())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:n}=t;n&&Re()&&window.sessionStorage.setItem(n,e)}},ze={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:n,userLanguage:r,language:o}=navigator;if(n)for(var i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},qe={name:"htmlTag",lookup(e){var t,{htmlTag:n}=e,r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Ue={name:"path",lookup(e){var t,{lookupFromPathIndex:n}=e;if("undefined"!=typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(r))return null===(t=r["number"==typeof n?n:0])||void 0===t?void 0:t.replace("/","")}}},He={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:n}=e,r="number"==typeof n?n+1:1,o="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[r]}},_e=!1;try{document.cookie,_e=!0}catch(e){}var Ve=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_e||Ve.splice(1,1);class Ke{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Fe.call(ke.call(arguments,1),t=>{if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:Ve,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Se),this.addDetector(je),this.addDetector(Te),this.addDetector(Me),this.addDetector(ze),this.addDetector(qe),this.addDetector(Ue),this.addDetector(He),this.addDetector(Le)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}Ke.type="languageDetector";var Xe=a(s((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),We=a(s((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}))),Je=s((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));a(Je);var $e=a(s((function(e){var t=l.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Je(e)},e.exports.__esModule=!0,e.exports.default=e.exports}))),Ye=a(s((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}))),Ge=s((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(Ge);var Ze=a(s((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ge(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports})));function Qe(e,t,n){return t=Ye(t),$e(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n))}var et=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xe(this,t),(n=Qe(this,t)).ele=e,n.options=r,n.observer=n.create(),n.internalChange=!0,n}return Ze(t,e),We(t,[{key:"create",value:function(){var e,t=this,n=new MutationObserver((function(n){t.internalChange&&(e&&window.clearTimeout(e),e=setTimeout((function(){t.internalChange&&(t.internalChange=!1)}),200)),t.internalChange||t.emit("changed",n)}));return n.observe(this.ele,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n}},{key:"reset",value:function(){this.internalChange=!0}}])}(function(){return We((function e(){Xe(this,e),this.observers={}}),[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}])}()),tt=[],nt=!1,rt=!1;function ot(){if(!nt){nt=!0;for(var e=0;e<tt.length;e++)tt[e].fn.call(window,tt[e].ctx);tt=[]}}function it(){"complete"===document.readyState&&ot()}function ut(e,t){nt?setTimeout((function(){e(t)}),1):(tt.push({fn:e,ctx:t}),"complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState?setTimeout(ot,1):rt||(document.addEventListener?(document.addEventListener("DOMContentLoaded",ot,!1),window.addEventListener("load",ot,!1)):(document.attachEvent("onreadystatechange",it),window.attachEvent("onload",ot)),rt=!0))}var at=function(e){return e&&"VirtualNode"===e.type&&"2"===e.version};var st=function(e){return e&&"Widget"===e.type};var lt=function(e){return e&&"Thunk"===e.type};var ct=function(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))};var dt=ht,pt={},ft=[];function ht(e,t,n,r,o){this.tagName=e,this.properties=t||pt,this.children=n||ft,this.key=null!=r?String(r):void 0,this.namespace="string"==typeof o?o:null;var i,u=n&&n.length||0,a=0,s=!1,l=!1,c=!1;for(var d in t)if(t.hasOwnProperty(d)){var p=t[d];ct(p)&&p.unhook&&(i||(i={}),i[d]=p)}for(var f=0;f<u;f++){var h=n[f];at(h)?(a+=h.count||0,!s&&h.hasWidgets&&(s=!0),!l&&h.hasThunks&&(l=!0),c||!h.hooks&&!h.descendantHooks||(c=!0)):!s&&st(h)?"function"==typeof h.destroy&&(s=!0):!l&&lt(h)&&(l=!0)}this.count=u+a,this.hasWidgets=s,this.hasThunks=l,this.hooks=i,this.descendantHooks=c}ht.prototype.version="2",ht.prototype.type="VirtualNode";var gt=vt;function vt(e){this.text=String(e)}vt.prototype.version="2",vt.prototype.type="VirtualText";var mt=yt;function yt(e){this.text=String(e)}yt.prototype.type="Widget",yt.prototype.init=function(){return document.createComment(this.text)},yt.prototype.update=function(e,t){this.text!==e.text&&(t.nodeValue=this.text)};var bt=s((function(e){function t(e,o){return 1==e.nodeType?function(e){for(var o=e.tagName,i="http://www.w3.org/1999/xhtml"==e.namespaceURI?null:e.namespaceURI,u=function(e){for(var t={},o=0;o<n.length;o++){var i=n[o];if(e[i])if("style"!=i){if("img"!==e.tagName.toLowerCase()||"href"!==i)if("attributes"!=i)"tabIndex"==i&&-1===e.tabIndex||"contentEditable"==i&&"inherit"===e[i]||"object"!=typeof e[i]&&(t[i]=e[i]);else{for(var u=Array.prototype.slice.call(e[i]),a={},s=0;s<u.length;s++){var l=u[s].name;t[l]||t[r[l]]||(a[l]=e.getAttribute(l))}t[i]=a}}else{var c={};if(void 0!==e.style.length)for(var d=0;d<e.style.length;d++)p=e.style[d],c[p]=e.style.getPropertyValue(p);else for(var p in e.style)e.style[p]&&e.style.hasOwnProperty(p)&&(c[p]=e.style[p]);Object.keys(c).length&&(t[i]=c)}}return t}(e),a=[],s=0;s<e.childNodes.length;s++)a.push(t(e.childNodes[s]));return new dt(o,u,a,null,i)}(e):3==e.nodeType?new gt(e.nodeValue):8==e.nodeType?new mt(e.nodeValue):void 0}
2
2
  /*!
3
3
  * vdom-virtualize
4
4
  * Copyright 2014 by Marcel Klehr <mklehr@gmx.net>
package/locizify.js CHANGED
@@ -1190,7 +1190,7 @@
1190
1190
  type
1191
1191
  });
1192
1192
  } catch (err) {
1193
- if (!Intl) {
1193
+ if (typeof Intl === 'undefined') {
1194
1194
  this.logger.error('No Intl support, please use an Intl polyfill!');
1195
1195
  return dummyRule;
1196
1196
  }
@@ -1376,16 +1376,16 @@
1376
1376
  var value;
1377
1377
  var clonedOptions;
1378
1378
  var handleHasOptions = (key, inheritedOptions) => {
1379
- var _matchedSingleQuotes$;
1379
+ var _matchedSingleQuotes$, _matchedDoubleQuotes$;
1380
1380
  var sep = this.nestingOptionsSeparator;
1381
1381
  if (key.indexOf(sep) < 0) return key;
1382
- var c = key.split(new RegExp("".concat(sep, "[ ]*{")));
1382
+ var c = key.split(new RegExp("".concat(regexEscape(sep), "[ ]*{")));
1383
1383
  var optionsString = "{".concat(c[1]);
1384
1384
  key = c[0];
1385
1385
  optionsString = this.interpolate(optionsString, clonedOptions);
1386
1386
  var matchedSingleQuotes = optionsString.match(/'/g);
1387
1387
  var matchedDoubleQuotes = optionsString.match(/"/g);
1388
- if (((_matchedSingleQuotes$ = matchedSingleQuotes === null || matchedSingleQuotes === void 0 ? void 0 : matchedSingleQuotes.length) !== null && _matchedSingleQuotes$ !== void 0 ? _matchedSingleQuotes$ : 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
1388
+ if (((_matchedSingleQuotes$ = matchedSingleQuotes === null || matchedSingleQuotes === void 0 ? void 0 : matchedSingleQuotes.length) !== null && _matchedSingleQuotes$ !== void 0 ? _matchedSingleQuotes$ : 0) % 2 === 0 && !matchedDoubleQuotes || ((_matchedDoubleQuotes$ = matchedDoubleQuotes === null || matchedDoubleQuotes === void 0 ? void 0 : matchedDoubleQuotes.length) !== null && _matchedDoubleQuotes$ !== void 0 ? _matchedDoubleQuotes$ : 0) % 2 !== 0) {
1389
1389
  optionsString = optionsString.replace(/'/g, '"');
1390
1390
  }
1391
1391
  try {
@@ -1858,8 +1858,13 @@
1858
1858
  }
1859
1859
  });
1860
1860
  };
1861
+ var SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';
1862
+ var getSupportNoticeShown = () => typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY];
1863
+ var setSupportNoticeShown = () => {
1864
+ if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;
1865
+ };
1861
1866
  var usesLocize = inst => {
1862
- var _inst$modules, _inst$modules2, _inst$options;
1867
+ var _inst$modules, _inst$modules2, _inst$options, _inst$options2, _inst$options3;
1863
1868
  if ((inst === null || inst === void 0 || (_inst$modules = inst.modules) === null || _inst$modules === void 0 || (_inst$modules = _inst$modules.backend) === null || _inst$modules === void 0 || (_inst$modules = _inst$modules.name) === null || _inst$modules === void 0 ? void 0 : _inst$modules.indexOf('Locize')) > 0) return true;
1864
1869
  if ((inst === null || inst === void 0 || (_inst$modules2 = inst.modules) === null || _inst$modules2 === void 0 || (_inst$modules2 = _inst$modules2.backend) === null || _inst$modules2 === void 0 || (_inst$modules2 = _inst$modules2.constructor) === null || _inst$modules2 === void 0 || (_inst$modules2 = _inst$modules2.name) === null || _inst$modules2 === void 0 ? void 0 : _inst$modules2.indexOf('Locize')) > 0) return true;
1865
1870
  if (inst !== null && inst !== void 0 && (_inst$options = inst.options) !== null && _inst$options !== void 0 && (_inst$options = _inst$options.backend) !== null && _inst$options !== void 0 && _inst$options.backends) {
@@ -1868,6 +1873,10 @@
1868
1873
  return (b === null || b === void 0 || (_b$name = b.name) === null || _b$name === void 0 ? void 0 : _b$name.indexOf('Locize')) > 0 || (b === null || b === void 0 || (_b$constructor = b.constructor) === null || _b$constructor === void 0 || (_b$constructor = _b$constructor.name) === null || _b$constructor === void 0 ? void 0 : _b$constructor.indexOf('Locize')) > 0;
1869
1874
  })) return true;
1870
1875
  }
1876
+ if (inst !== null && inst !== void 0 && (_inst$options2 = inst.options) !== null && _inst$options2 !== void 0 && (_inst$options2 = _inst$options2.backend) !== null && _inst$options2 !== void 0 && _inst$options2.projectId) return true;
1877
+ if (inst !== null && inst !== void 0 && (_inst$options3 = inst.options) !== null && _inst$options3 !== void 0 && (_inst$options3 = _inst$options3.backend) !== null && _inst$options3 !== void 0 && _inst$options3.backendOptions) {
1878
+ if (inst.options.backend.backendOptions.some(b => b === null || b === void 0 ? void 0 : b.projectId)) return true;
1879
+ }
1871
1880
  return false;
1872
1881
  };
1873
1882
  class I18n extends EventEmitter {
@@ -1920,8 +1929,9 @@
1920
1929
  if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
1921
1930
  this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
1922
1931
  }
1923
- if (this.options.showSupportNotice !== false && !usesLocize(this)) {
1924
- if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
1932
+ if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {
1933
+ if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
1934
+ setSupportNoticeShown();
1925
1935
  }
1926
1936
  var createClassOnDemand = ClassOrObject => {
1927
1937
  if (!ClassOrObject) return null;
package/locizify.min.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).locizify=t()}(this,(function(){"use strict";function e(e,t,n,r,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var u=t.apply(n,r);function a(t){e(u,o,i,a,s,"next",t)}function s(t){e(u,o,i,a,s,"throw",t)}a(void 0)}))}}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e,t){return e(t={exports:{}},t.exports),t.exports}var l=s((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(l);var c=s((function(e){var t=l.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));a(c);var d=s((function(e){var t=l.default;e.exports=function(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports}));a(d);var p=a(s((function(e){e.exports=function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=e=>"string"==typeof e,h=()=>{var e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},g=e=>null==e?"":""+e,v=/###/g,m=e=>e&&e.indexOf("###")>-1?e.replace(v,"."):e,y=e=>!e||f(e),b=(e,t,n)=>{for(var r=f(t)?t.split("."):t,o=0;o<r.length-1;){if(y(e))return{};var i=m(r[o]);!e[i]&&n&&(e[i]=new n),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{},++o}return y(e)?{}:{obj:e,k:m(r[o])}},E=(e,t,n)=>{var{obj:r,k:o}=b(e,t,Object);if(void 0===r&&1!==t.length){for(var i=t[t.length-1],u=t.slice(0,t.length-1),a=b(e,u,Object);void 0===a.obj&&u.length;){var s;i="".concat(u[u.length-1],".").concat(i),u=u.slice(0,u.length-1),null!==(s=a=b(e,u,Object))&&void 0!==s&&s.obj&&void 0!==a.obj["".concat(a.k,".").concat(i)]&&(a.obj=void 0)}a.obj["".concat(a.k,".").concat(i)]=n}else r[o]=n},x=(e,t)=>{var{obj:n,k:r}=b(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A=(e,t,n)=>{var r=x(e,n);return void 0!==r?r:x(t,n)},w=(e,t,n)=>{for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?f(e[r])||e[r]instanceof String||f(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):w(e[r],t[r],n):e[r]=t[r]);return e},C=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},k=e=>f(e)?e.replace(/[&<>"'\/]/g,e=>O[e]):e;var F=[" ",",","?","!",";"],D=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),B=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var r=t.split(n),o=e,i=0;i<r.length;){if(!o||"object"!=typeof o)return;for(var u=void 0,a="",s=i;s<r.length;++s)if(s!==i&&(a+=n),void 0!==(u=o[a+=r[s]])){if(["string","number","boolean"].indexOf(typeof u)>-1&&s<r.length-1)continue;i+=s-i+1;break}o=u}return o}},S=e=>null==e?void 0:e.replace("_","-"),j={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(r=n.apply)||void 0===r||r.call(n,console,t)}};class L{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||j,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(f(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new L(this.logger,o(o({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new L(this.logger,e)}}var P=new L;class N{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{for(var[t,r]=e,o=0;o<r;o++)t(...n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{for(var[r,o]=t,i=0;i<o;i++)r.apply(r,[e,...n])})}}class T extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):f(n)&&u?o.push(...n.split(u)):o.push(n)));var s=x(this.data,o);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!s&&a&&f(n)?B(null===(r=this.data)||void 0===r||null===(r=r[e])||void 0===r?void 0:r[t],n,u):s}addResource(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,u=[e,t];n&&(u=u.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(u=e.split("."))[1]),this.addNamespaces(t),E(this.data,u,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)(f(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=x(this.data,a)||{};u.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?w(s,n,i):s=o(o({},s),n),E(this.data,a,s),u.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var I={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{var i,u;t=null!==(i=null===(u=this.processors[e])||void 0===u?void 0:u.process(t,n,r,o))&&void 0!==i?i:t}),t}},R=Symbol("i18next/PATH_KEY");function M(e,t){var n,{[R]:r}=e(function(){var e,t=[],n=Object.create(null);return n.get=(r,o)=>{var i,u;return null===(i=e)||void 0===i||null===(u=i.revoke)||void 0===u||u.call(i),o===R?t:(t.push(o),(e=Proxy.revocable(r,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}());return r.join(null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".")}var z={},q=e=>!f(e)&&"boolean"!=typeof e&&"number"!=typeof e;class U extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=P.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=o({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var r=q(n.res);return!1!==t.returnObjects||!r}extractFromKey(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,u=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";var r=F.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;var o=D.getRegExp("(".concat(r.map(e=>"?"===e?"\\?":e).join("|"),")")),i=!o.test(e);if(!i){var u=e.indexOf(n);u>0&&!o.test(e.substring(0,u))&&(i=!0)}return i})(e,n,r));if(i&&!u){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:f(o)?[o]:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return{key:e,namespaces:f(o)?[o]:o}}translate(e,t,n){var r="object"==typeof t?o({},t):t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r=o({},r)),r||(r={}),null==e)return"";"function"==typeof e&&(e=M(e,o(o({},this.options),r))),Array.isArray(e)||(e=[String(e)]);var i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,u=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var d=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?i?{res:"".concat(l).concat(c).concat(a),usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:"".concat(l).concat(c).concat(a):i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;var h=this.resolve(e,r),g=null==h?void 0:h.res,v=(null==h?void 0:h.usedKey)||a,m=(null==h?void 0:h.exactUsedKey)||a,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,E=void 0!==r.count&&!f(r.count),x=U.hasDefaultValue(r),A=E?this.pluralResolver.getSuffix(d,r.count,r):"",w=r.ordinal&&E?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",C=E&&!r.ordinal&&0===r.count,O=C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(A)]||r["defaultValue".concat(w)]||r.defaultValue,k=g;b&&!g&&x&&(k=O);var F=q(k),D=Object.prototype.toString.apply(k);if(!(b&&k&&F&&["[object Number]","[object Function]","[object RegExp]"].indexOf(D)<0)||f(y)&&Array.isArray(k))if(b&&f(y)&&Array.isArray(g))(g=g.join(y))&&(g=this.extendTranslation(g,e,r,n));else{var B=!1,S=!1;!this.isValidLookup(g)&&x&&(B=!0,g=O),this.isValidLookup(g)||(S=!0,g=a);var j=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:g,L=x&&O!==g&&this.options.updateMissing;if(S||B||L){if(this.logger.log(L?"updateKey":"missingKey",d,l,a,L?O:g),u){var P=this.resolve(a,o(o({},r),{},{keySeparator:!1}));P&&P.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.")}var N=[],T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&T&&T[0])for(var I=0;I<T.length;I++)N.push(T[I]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(r.lng||this.language):N.push(r.lng||this.language);var R=(e,t,n)=>{var o,i=x&&n!==g?n:j;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,L,r):null!==(o=this.backendConnector)&&void 0!==o&&o.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,L,r),this.emit("missingKey",e,l,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?N.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,r);C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&t.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&t.push("".concat(this.options.pluralSeparator,"zero")),t.forEach(t=>{R([e],a+t,r["defaultValue".concat(t)]||O)})}):R(N,a,O))}g=this.extendTranslation(g,e,r,h,n),S&&g===a&&this.options.appendNamespaceToMissingKey&&(g="".concat(l).concat(c).concat(a)),(S||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l).concat(c).concat(a):a,B?g:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,k,o(o({},r),{},{ns:s})):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=z,h.usedParams=this.getUsedParamsDetails(r),h):z}if(u){var H=Array.isArray(k),_=H?[]:{},V=H?m:v;for(var K in k)if(Object.prototype.hasOwnProperty.call(k,K)){var X="".concat(V).concat(u).concat(K);_[K]=x&&!g?this.translate(X,o(o({},r),{},{defaultValue:q(O)?O[K]:void 0},{joinArrays:!1,ns:s})):this.translate(X,o(o({},r),{joinArrays:!1,ns:s})),_[K]===X&&(_[K]=k[K])}g=_}}return i?(h.res=g,h.usedParams=this.getUsedParamsDetails(r),h):g}extendTranslation(e,t,n,r,i){var u,a=this;if(null!==(u=this.i18nFormat)&&void 0!==u&&u.parse)e=this.i18nFormat.parse(e,o(o({},this.options.interpolation.defaultVariables),n),n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(o(o({},n),{interpolation:o(o({},this.options.interpolation),n.interpolation)}));var l,c=f(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(c){var d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}var p=n.replace&&!f(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p=o(o({},this.options.interpolation.defaultVariables),p)),e=this.interpolator.interpolate(e,p,n.lng||this.language||r.usedLng,n),c){var h=e.match(this.interpolator.nestingRegexp);l<(h&&h.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(null==i?void 0:i[0])!==r[0]||n.context?a.translate(...r,t):(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null)}),n)),n.interpolation&&this.interpolator.reset()}var g=n.postProcess||this.options.postProcess,v=f(g)?[g]:g;return null!=e&&null!=v&&v.length&&!1!==n.applyPostProcessor&&(e=I.handle(v,e,t,this.options&&this.options.postProcessPassResolved?o({i18nResolved:o(o({},r),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){var t,n,r,o,i,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(e)&&(e=[e]),e.forEach(e=>{if(!this.isValidLookup(t)){var a=this.extractFromKey(e,u),s=a.key;n=s;var l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));var c=void 0!==u.count&&!f(u.count),d=c&&!u.ordinal&&0===u.count,p=void 0!==u.context&&(f(u.context)||"number"==typeof u.context)&&""!==u.context,h=u.lngs?u.lngs:this.languageUtils.toResolveHierarchy(u.lng||this.language,u.fallbackLng);l.forEach(e=>{var a,l;this.isValidLookup(t)||(i=e,z["".concat(h[0],"-").concat(e)]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.utils)&&void 0!==l&&l.hasLoadedNamespace(i)||(z["".concat(h[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),h.forEach(n=>{var i;if(!this.isValidLookup(t)){o=n;var a,l=[s];if(null!==(i=this.i18nFormat)&&void 0!==i&&i.addLookupKeys)this.i18nFormat.addLookupKeys(l,s,n,e,u);else{var f;c&&(f=this.pluralResolver.getSuffix(n,u.count,u));var h="".concat(this.options.pluralSeparator,"zero"),g="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(c&&(u.ordinal&&0===f.indexOf(g)&&l.push(s+f.replace(g,this.options.pluralSeparator)),l.push(s+f),d&&l.push(s+h)),p){var v="".concat(s).concat(this.options.contextSeparator||"_").concat(u.context);l.push(v),c&&(u.ordinal&&0===f.indexOf(g)&&l.push(v+f.replace(g,this.options.pluralSeparator)),l.push(v+f),d&&l.push(v+h))}}for(;a=l.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,u))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(r=this.i18nFormat)&&void 0!==r&&r.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!f(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=o(o({},this.options.interpolation.defaultVariables),n)),!t)for(var r of(n=o({},n),["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[r];return n}static hasDefaultValue(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}class H{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P.create("languageUtils")}getScriptPartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(f(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;var r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),f(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){var n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return f(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):f(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}var _={zero:0,one:1,two:2,few:3,many:4,other:5},V={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class K{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=P.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=S("dev"===e?"en":e),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{t=new Intl.PluralRules(r,{type:o})}catch(r){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),V;if(!e.match(/-|_/))return V;var u=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(u,n)}return this.pluralRulesCache[i]=t,t}needsPlural(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(null===(t=r)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>"".concat(t).concat(e))}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>_[e]-_[t]).map(e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e)):[]}getSuffix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(r.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}var X=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=A(e,t,n);return!i&&o&&f(n)&&void 0===(i=B(e,n,r))&&(i=B(t,n,r)),i},W=e=>e.replace(/\$/g,"$$$$");class J{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:u,suffixEscaped:a,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:k,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?C(o):i||"{{",this.suffix=u?C(u):a||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?C(d):p||C("$t("),this.nestingSuffix=f?C(f):h||C(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}interpolate(e,t,n,r){var i,u,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){var i=X(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,o(o(o({},r),t),{},{interpolationkey:e})):i}var u=e.split(this.formatSeparator),a=u.shift().trim(),s=u.join(this.formatSeparator).trim();return this.format(X(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,o(o(o({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=(null==r?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=void 0!==(null==r||null===(i=r.interpolation)||void 0===i?void 0:i.skipOnVariables)?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>W(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?W(this.escape(e)):W(e)}].forEach(t=>{for(s=0;u=t.regex.exec(e);){var n=u[1].trim();if(void 0===(a=c(n)))if("function"==typeof d){var o=d(e,u,r);a=f(o)?o:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(p){a=u[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),a=""}else f(a)||this.useRawValueToEscape||(a=g(a));var i=t.safeValue(a);if(e=e.replace(u[0],i),p?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=u[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var n,r,i,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{var n,r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var u=e.split(new RegExp("".concat(r,"[ ]*{"))),a="{".concat(u[1]);e=u[0];var s=(a=this.interpolate(a,i)).match(/'/g),l=a.match(/"/g);((null!==(n=null==s?void 0:s.length)&&void 0!==n?n:0)%2==0&&!l||l.length%2!=0)&&(a=a.replace(/'/g,'"'));try{i=JSON.parse(a),t&&(i=o(o({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(a)}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};n=this.nestingRegexp.exec(e);){var s=[];(i=(i=o({},u)).replace&&!f(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(r=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!f(r))return r;f(r)||(r=g(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),s.length&&(r=s.reduce((e,t)=>this.format(e,t,u.lng,o(o({},u),{},{interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}var $=e=>{var t={};return(n,r,i)=>{var u=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(u=o(o({},u),{},{[i.interpolationkey]:void 0}));var a=r+JSON.stringify(u),s=t[a];return s||(s=e(S(r),i),t[a]=s),s(n)}},Y=e=>(t,n,r)=>e(S(n),r)(t);class G{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?$:Y;this.formats={number:n((e,t)=>{var n=new Intl.NumberFormat(e,o({},t));return e=>n.format(e)}),currency:n((e,t)=>{var n=new Intl.NumberFormat(e,o(o({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{var n=new Intl.DateTimeFormat(e,o({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{var n=new Intl.RelativeTimeFormat(e,o({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{var n=new Intl.ListFormat(e,o({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=$(t)}format(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){var u=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,u)].join(this.formatSeparator)}return i.reduce((e,t)=>{var{formatName:i,formatOptions:u}=(e=>{var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if("currency"===t&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if("relativetime"===t&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{o.split(";").forEach(e=>{if(e){var[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){var a=e;try{var s,l=(null==r||null===(s=r.formatParams)||void 0===s?void 0:s[r.interpolationkey])||{},c=l.locale||l.lng||r.locale||r.lng||n;a=this.formats[i](e,c,o(o(o({},u),r),l))}catch(e){this.logger.warn(e)}return a}return this.logger.warn("there was no format function for ".concat(i)),e},e)}}class Z extends N{constructor(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=P.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=[],null===(r=this.backend)||void 0===r||null===(o=r.init)||void 0===o||o.call(r,n,i.backend,i)}queueLoad(e,t,n,r){var o={},i={},u={},a={};return e.forEach(e=>{var r=!0;t.forEach(t=>{var u="".concat(e,"|").concat(t);!n.reload&&this.store.hasResourceBundle(e,t)?this.state[u]=2:this.state[u]<0||(1===this.state[u]?void 0===i[u]&&(i[u]=!0):(this.state[u]=1,r=!1,void 0===i[u]&&(i[u]=!0),void 0===o[u]&&(o[u]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(u[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var u={};this.queue.forEach(n=>{((e,t,n,r)=>{var{obj:o,k:i}=b(e,t,Object);o[i]=o[i]||[],o[i].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{u[e]||(u[e]={});var t=n.loaded[e];t.length&&t.forEach(t=>{void 0===u[e][t]&&(u[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});else{this.readingCalls++;var u=(u,a)=>{if(this.readingCalls--,this.waitingReads.length>0){var s=this.waitingReads.shift();this.read(s.lng,s.ns,s.fcName,s.tried,s.wait,s.callback)}u&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(u,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,u);try{var s=a(e,t);s&&"function"==typeof s.then?s.then(e=>u(null,e)).catch(u):u(null,s)}catch(e){u(e)}}}prepareLoading(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();f(e)&&(e=this.languageUtils.toResolveHierarchy(e)),f(t)&&(t=[t]);var o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(o," for language ").concat(r," failed"),n),!n&&i&&this.logger.log("".concat(t,"loaded namespace ").concat(o," for language ").concat(r),i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,i){var u,a,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(u=this.services)||void 0===u||null===(u=u.utils)||void 0===u||!u.hasLoadedNamespace||null!==(a=this.services)&&void 0!==a&&null!==(a=a.utils)&&void 0!==a&&a.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var d=o(o({},l),{},{isUpdate:i}),p=this.backend.create.bind(this.backend);if(p.length<6)try{var f;(f=5===p.length?p(e,t,n,r,d):p(e,t,n,r))&&"function"==typeof f.then?f.then(e=>c(null,e)).catch(c):c(null,f)}catch(e){c(e)}else p(e,t,n,r,c,d)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{var t={};if("object"==typeof e[1]&&(t=e[1]),f(e[1])&&(t.defaultValue=e[1]),f(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){var n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ee=e=>{var t,n;return f(e.ns)&&(e.ns=[e.ns]),f(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),f(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},te=()=>{};class ne extends N{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ee(t),this.services={},this.logger=P,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(f(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r,i,u,a,s=Q();this.options=o(o(o({},s),this.options),ee(t)),this.options.interpolation=o(o({},s.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(r=this)||null===(i=r.modules)||void 0===i||null===(i=i.backend)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.indexOf("Locize"))>0||(null==r||null===(u=r.modules)||void 0===u||null===(u=u.backend)||void 0===u||null===(u=u.constructor)||void 0===u||null===(u=u.name)||void 0===u?void 0:u.indexOf("Locize"))>0||null!=r&&null!==(a=r.options)&&void 0!==a&&null!==(a=a.backend)&&void 0!==a&&a.backends&&r.options.backend.backends.some(e=>{var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0}))||"undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");var l=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var c;this.modules.logger?P.init(l(this.modules.logger),this.options):P.init(null,this.options),c=this.modules.formatter?this.modules.formatter:G;var d=new H(this.options);this.store=new T(this.options.resources,this.options);var p=this.services;p.logger=P,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new K(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!c||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(p.formatter=l(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new J(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Z(l(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(p.languageDetector=l(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=l(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=te),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&"dev"!==g[0]&&(this.options.lng=g[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});var v=h(),m=()=>{var e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),v.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),v}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=f(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var r,o;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var i=[],u=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&i.indexOf(e)<0&&i.push(e)}))};if(n)u(n);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>u(e));null===(r=this.options.preload)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>u(e)),this.services.backendConnector.load(i,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){var r=h();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=te),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&I.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;var r=h();this.emit("languageChanging",e);var o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,u)=>{u?this.isLanguageChangingTo===e&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(i,(function(){return n.t(...arguments)}))},u=t=>{e||t||!this.services.languageDetector||(t=[]);var n,r,u=f(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(f(t)?[t]:t);a&&(this.language||o(a),this.translator.language||this.translator.changeLanguage(a),null===(n=this.services.languageDetector)||void 0===n||null===(r=n.cacheUserLanguage)||void 0===r||r.call(n,a));this.loadResources(a,e=>{i(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e):u(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this,i=function(e,t){var u;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];u=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else u=o({},t);u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,""!==u.keyPrefix&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);var c,d=r.options.keySeparator||".";return u.keyPrefix&&Array.isArray(e)?c=e.map(e=>("function"==typeof e&&(e=M(e,o(o({},r.options),t))),"".concat(u.keyPrefix).concat(d).concat(e))):("function"==typeof e&&(e=M(e,o(o({},r.options),t))),c=u.keyPrefix?"".concat(u.keyPrefix).concat(d).concat(e):e),r.t(c,u)};return f(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=(e,t)=>{var n=this.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||0===n||2===n};if(t.precheck){var u=t.precheck(this,i);if(void 0!==u)return u}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){var n=h();return this.options.ns?(f(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){var n=h();f(e)&&(e=[e]);var r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var r=new Intl.Locale(e);if(r&&r.getTextInfo){var o=r.getTextInfo();if(o&&o.direction)return o.direction}}catch(e){}var i=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new H(Q());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=ne.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=e.forkResourceStore;n&&delete e.forkResourceStore;var r=o(o(o({},this.options),e),{isClone:!0}),i=new ne(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services=o({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){var u=Object.keys(this.store.data).reduce((e,t)=>(e[t]=o({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]=o({},e[t][r]),n),e[t]),e),{});i.store=new T(u,r),i.services.resourceStore=i.store}if(e.interpolation){var a=o(o(o({},Q().interpolation),this.options.interpolation),e.interpolation),s=o(o({},r),{},{interpolation:a});i.services.interpolator=new J(s)}return i.translator=new U(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}var re=ne.createInstance();re.createInstance,re.dir,re.init,re.loadResources,re.reloadResources,re.use,re.changeLanguage,re.getFixedT,re.t,re.exists,re.setDefaultNamespace,re.hasLoadedNamespace,re.loadNamespaces,re.loadLanguages;function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":oe(XMLHttpRequest))}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==le(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ce,de,pe="function"==typeof fetch?fetch:void 0;if("undefined"!=typeof global&&global.fetch?pe=global.fetch:"undefined"!=typeof window&&window.fetch&&(pe=window.fetch),ie()&&("undefined"!=typeof global&&global.XMLHttpRequest?ce=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ce=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?de=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(de=window.ActiveXObject)),"function"!=typeof pe&&(pe=void 0),!pe&&!ce&&!de)try{import("cross-fetch").then((function(e){pe=e.default})).catch((function(){}))}catch(e){}var fe=function(e,t){if(t&&"object"===le(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},he=function(e,t,n,r){var o=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};if(r){var i=r(e,t);if(i instanceof Promise)return void i.then(o).catch(n)}"function"==typeof fetch?fetch(e,t).then(o).catch(n):pe(e,t).then(o).catch(n)},ge=!1,ve=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},pe&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=fe(t,e.queryStringParams));var o=ae({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,u=ae({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},ge?{}:i),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{he(t,u,r,a)}catch(e){if(!i||0===Object.keys(i).length||!e.message||e.message.indexOf("not implemented")<0)return r(e);try{Object.keys(i).forEach((function(e){delete u[e]})),he(t,u,r,a),ge=!0}catch(e){r(e)}}}(e,t,n,r):ie()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===le(n)&&(n=fe("",n).slice(1)),e.queryStringParams&&(t=fe(t,e.queryStringParams));try{var o=ce?new ce:new de("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var u in i)o.setRequestHeader(u,i[u]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function Ae(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){var t=function(e,t){if("object"!=me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==me(t)?t:t+""}var Ce=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return Ae({},t,n||"")},parseLoadPayload:function(e,t){},request:ve,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Oe=function(e,t,n){return t&&xe(e.prototype,t),n&&xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ee(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}),[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=be(be(be({},Ce()),this.options||{}),n),this.allOptions=r,this.services&&this.options.reloadInterval){var o=setInterval((function(){return t.reload()}),this.options.reloadInterval);"object"===me(o)&&"function"==typeof o.unref&&o.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,u=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=function(e){return!!e&&"function"==typeof e.then}(i=a)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var a=u.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});u.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,u="string"==typeof r?[r]:r,a=this.options.parseLoadPayload(i,u);this.options.request(this.options,e,a,(function(i,u){if(u&&(u.status>=500&&u.status<600||!u.status))return t("failed loading "+e+"; status code: "+u.status,!0);if(u&&u.status>=400&&u.status<500)return t("failed loading "+e+"; status code: "+u.status,!1);if(!u&&i&&i.message){var a=i.message.toLowerCase();if(["failed","fetch","network","load"].find((function(e){return a.indexOf(e)>-1})))return t("failed loading "+e+": "+i.message,!0)}if(i)return t(i,!1);var s,l;try{s="string"==typeof u.data?o.options.parse(u.data,n,r):u.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var u=this.options.parsePayload(t,n,r),a=0,s=[],l=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var c=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,c,u,(function(t,n){a+=1,s.push(t),l.push(n),a===e.length&&"function"==typeof o&&o(s,l)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var u=[],a=function(e){r.toResolveHierarchy(e).forEach((function(e){u.indexOf(e)<0&&u.push(e)}))};a(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),u.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}]);Oe.type="backend";var{slice:ke,forEach:Fe}=[];var De=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Be={create(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},r=n,o=encodeURIComponent(t),i="".concat(e,"=").concat(o);if(r.maxAge>0){var u=r.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(u))}if(r.domain){if(!De.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!De.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite){var a="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(a){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r.partitioned&&(i+="; Partitioned"),i}(e,t,o)},read(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}},Se={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Be.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Be.create(n,e,r,o,i)}},je={name:"querystring",lookup(e){var t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){var r,{search:o}=window.location;!window.location.search&&(null===(r=window.location.hash)||void 0===r?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=o.substring(1).split("&"),u=0;u<i.length;u++){var a=i[u].indexOf("=");if(a>0)i[u].substring(0,a)===n&&(t=i[u].substring(a+1))}}return t}},Le={name:"hash",lookup(e){var t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){var{hash:o}=window.location;if(o&&o.length>2){var i=o.substring(1);if(n)for(var u=i.split("&"),a=0;a<u.length;a++){var s=u[a].indexOf("=");if(s>0)u[a].substring(0,s)===n&&(t=u[a].substring(s+1))}if(t)return t;if(!t&&r>-1){var l,c=o.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(c))return;return null===(l=c["number"==typeof r?r:0])||void 0===l?void 0:l.replace("/","")}}}return t}},Pe=null,Ne=()=>{if(null!==Pe)return Pe;try{if(!(Pe="undefined"!=typeof window&&null!==window.localStorage))return!1;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){Pe=!1}return Pe},Te={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&Ne())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:n}=t;n&&Ne()&&window.localStorage.setItem(n,e)}},Ie=null,Re=()=>{if(null!==Ie)return Ie;try{if(!(Ie="undefined"!=typeof window&&null!==window.sessionStorage))return!1;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){Ie=!1}return Ie},Me={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&Re())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:n}=t;n&&Re()&&window.sessionStorage.setItem(n,e)}},ze={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:n,userLanguage:r,language:o}=navigator;if(n)for(var i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},qe={name:"htmlTag",lookup(e){var t,{htmlTag:n}=e,r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Ue={name:"path",lookup(e){var t,{lookupFromPathIndex:n}=e;if("undefined"!=typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(r))return null===(t=r["number"==typeof n?n:0])||void 0===t?void 0:t.replace("/","")}}},He={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:n}=e,r="number"==typeof n?n+1:1,o="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[r]}},_e=!1;try{document.cookie,_e=!0}catch(e){}var Ve=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_e||Ve.splice(1,1);class Ke{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Fe.call(ke.call(arguments,1),t=>{if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:Ve,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Se),this.addDetector(je),this.addDetector(Te),this.addDetector(Me),this.addDetector(ze),this.addDetector(qe),this.addDetector(Ue),this.addDetector(He),this.addDetector(Le)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}Ke.type="languageDetector";var Xe=a(s((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),We=a(s((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}))),Je=s((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));a(Je);var $e=a(s((function(e){var t=l.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Je(e)},e.exports.__esModule=!0,e.exports.default=e.exports}))),Ye=a(s((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}))),Ge=s((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(Ge);var Ze=a(s((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ge(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports})));function Qe(e,t,n){return t=Ye(t),$e(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n))}var et=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xe(this,t),(n=Qe(this,t)).ele=e,n.options=r,n.observer=n.create(),n.internalChange=!0,n}return Ze(t,e),We(t,[{key:"create",value:function(){var e,t=this,n=new MutationObserver((function(n){t.internalChange&&(e&&window.clearTimeout(e),e=setTimeout((function(){t.internalChange&&(t.internalChange=!1)}),200)),t.internalChange||t.emit("changed",n)}));return n.observe(this.ele,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n}},{key:"reset",value:function(){this.internalChange=!0}}])}(function(){return We((function e(){Xe(this,e),this.observers={}}),[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}])}()),tt=[],nt=!1,rt=!1;function ot(){if(!nt){nt=!0;for(var e=0;e<tt.length;e++)tt[e].fn.call(window,tt[e].ctx);tt=[]}}function it(){"complete"===document.readyState&&ot()}function ut(e,t){nt?setTimeout((function(){e(t)}),1):(tt.push({fn:e,ctx:t}),"complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState?setTimeout(ot,1):rt||(document.addEventListener?(document.addEventListener("DOMContentLoaded",ot,!1),window.addEventListener("load",ot,!1)):(document.attachEvent("onreadystatechange",it),window.attachEvent("onload",ot)),rt=!0))}var at=function(e){return e&&"VirtualNode"===e.type&&"2"===e.version};var st=function(e){return e&&"Widget"===e.type};var lt=function(e){return e&&"Thunk"===e.type};var ct=function(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))};var dt=ht,pt={},ft=[];function ht(e,t,n,r,o){this.tagName=e,this.properties=t||pt,this.children=n||ft,this.key=null!=r?String(r):void 0,this.namespace="string"==typeof o?o:null;var i,u=n&&n.length||0,a=0,s=!1,l=!1,c=!1;for(var d in t)if(t.hasOwnProperty(d)){var p=t[d];ct(p)&&p.unhook&&(i||(i={}),i[d]=p)}for(var f=0;f<u;f++){var h=n[f];at(h)?(a+=h.count||0,!s&&h.hasWidgets&&(s=!0),!l&&h.hasThunks&&(l=!0),c||!h.hooks&&!h.descendantHooks||(c=!0)):!s&&st(h)?"function"==typeof h.destroy&&(s=!0):!l&&lt(h)&&(l=!0)}this.count=u+a,this.hasWidgets=s,this.hasThunks=l,this.hooks=i,this.descendantHooks=c}ht.prototype.version="2",ht.prototype.type="VirtualNode";var gt=vt;function vt(e){this.text=String(e)}vt.prototype.version="2",vt.prototype.type="VirtualText";var mt=yt;function yt(e){this.text=String(e)}yt.prototype.type="Widget",yt.prototype.init=function(){return document.createComment(this.text)},yt.prototype.update=function(e,t){this.text!==e.text&&(t.nodeValue=this.text)};var bt=s((function(e){function t(e,o){return 1==e.nodeType?function(e){for(var o=e.tagName,i="http://www.w3.org/1999/xhtml"==e.namespaceURI?null:e.namespaceURI,u=function(e){for(var t={},o=0;o<n.length;o++){var i=n[o];if(e[i])if("style"!=i){if("img"!==e.tagName.toLowerCase()||"href"!==i)if("attributes"!=i)"tabIndex"==i&&-1===e.tabIndex||"contentEditable"==i&&"inherit"===e[i]||"object"!=typeof e[i]&&(t[i]=e[i]);else{for(var u=Array.prototype.slice.call(e[i]),a={},s=0;s<u.length;s++){var l=u[s].name;t[l]||t[r[l]]||(a[l]=e.getAttribute(l))}t[i]=a}}else{var c={};if(void 0!==e.style.length)for(var d=0;d<e.style.length;d++)p=e.style[d],c[p]=e.style.getPropertyValue(p);else for(var p in e.style)e.style[p]&&e.style.hasOwnProperty(p)&&(c[p]=e.style[p]);Object.keys(c).length&&(t[i]=c)}}return t}(e),a=[],s=0;s<e.childNodes.length;s++)a.push(t(e.childNodes[s]));return new dt(o,u,a,null,i)}(e):3==e.nodeType?new gt(e.nodeValue):8==e.nodeType?new mt(e.nodeValue):void 0}
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).locizify=t()}(this,(function(){"use strict";function e(e,t,n,r,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var u=t.apply(n,r);function a(t){e(u,o,i,a,s,"next",t)}function s(t){e(u,o,i,a,s,"throw",t)}a(void 0)}))}}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e,t){return e(t={exports:{}},t.exports),t.exports}var l=s((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(l);var c=s((function(e){var t=l.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));a(c);var d=s((function(e){var t=l.default;e.exports=function(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports}));a(d);var p=a(s((function(e){e.exports=function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=e=>"string"==typeof e,h=()=>{var e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},g=e=>null==e?"":""+e,v=/###/g,m=e=>e&&e.indexOf("###")>-1?e.replace(v,"."):e,y=e=>!e||f(e),b=(e,t,n)=>{for(var r=f(t)?t.split("."):t,o=0;o<r.length-1;){if(y(e))return{};var i=m(r[o]);!e[i]&&n&&(e[i]=new n),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{},++o}return y(e)?{}:{obj:e,k:m(r[o])}},E=(e,t,n)=>{var{obj:r,k:o}=b(e,t,Object);if(void 0===r&&1!==t.length){for(var i=t[t.length-1],u=t.slice(0,t.length-1),a=b(e,u,Object);void 0===a.obj&&u.length;){var s;i="".concat(u[u.length-1],".").concat(i),u=u.slice(0,u.length-1),null!==(s=a=b(e,u,Object))&&void 0!==s&&s.obj&&void 0!==a.obj["".concat(a.k,".").concat(i)]&&(a.obj=void 0)}a.obj["".concat(a.k,".").concat(i)]=n}else r[o]=n},x=(e,t)=>{var{obj:n,k:r}=b(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A=(e,t,n)=>{var r=x(e,n);return void 0!==r?r:x(t,n)},w=(e,t,n)=>{for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?f(e[r])||e[r]instanceof String||f(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):w(e[r],t[r],n):e[r]=t[r]);return e},C=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},k=e=>f(e)?e.replace(/[&<>"'\/]/g,e=>O[e]):e;var F=[" ",",","?","!",";"],D=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),B=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var r=t.split(n),o=e,i=0;i<r.length;){if(!o||"object"!=typeof o)return;for(var u=void 0,a="",s=i;s<r.length;++s)if(s!==i&&(a+=n),void 0!==(u=o[a+=r[s]])){if(["string","number","boolean"].indexOf(typeof u)>-1&&s<r.length-1)continue;i+=s-i+1;break}o=u}return o}},S=e=>null==e?void 0:e.replace("_","-"),j={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(r=n.apply)||void 0===r||r.call(n,console,t)}};class L{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||j,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(f(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new L(this.logger,o(o({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new L(this.logger,e)}}var P=new L;class N{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{for(var[t,r]=e,o=0;o<r;o++)t(...n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{for(var[r,o]=t,i=0;i<o;i++)r.apply(r,[e,...n])})}}class T extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):f(n)&&u?o.push(...n.split(u)):o.push(n)));var s=x(this.data,o);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),!s&&a&&f(n)?B(null===(r=this.data)||void 0===r||null===(r=r[e])||void 0===r?void 0:r[t],n,u):s}addResource(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,u=[e,t];n&&(u=u.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(u=e.split("."))[1]),this.addNamespaces(t),E(this.data,u,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)(f(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=x(this.data,a)||{};u.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?w(s,n,i):s=o(o({},s),n),E(this.data,a,s),u.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var I={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{var i,u;t=null!==(i=null===(u=this.processors[e])||void 0===u?void 0:u.process(t,n,r,o))&&void 0!==i?i:t}),t}},R=Symbol("i18next/PATH_KEY");function M(e,t){var n,{[R]:r}=e(function(){var e,t=[],n=Object.create(null);return n.get=(r,o)=>{var i,u;return null===(i=e)||void 0===i||null===(u=i.revoke)||void 0===u||u.call(i),o===R?t:(t.push(o),(e=Proxy.revocable(r,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}());return r.join(null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".")}var z={},q=e=>!f(e)&&"boolean"!=typeof e&&"number"!=typeof e;class U extends N{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=P.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=o({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var r=q(n.res);return!1!==t.returnObjects||!r}extractFromKey(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,u=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";var r=F.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;var o=D.getRegExp("(".concat(r.map(e=>"?"===e?"\\?":e).join("|"),")")),i=!o.test(e);if(!i){var u=e.indexOf(n);u>0&&!o.test(e.substring(0,u))&&(i=!0)}return i})(e,n,r));if(i&&!u){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:f(o)?[o]:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return{key:e,namespaces:f(o)?[o]:o}}translate(e,t,n){var r="object"==typeof t?o({},t):t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r=o({},r)),r||(r={}),null==e)return"";"function"==typeof e&&(e=M(e,o(o({},this.options),r))),Array.isArray(e)||(e=[String(e)]);var i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,u=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var d=r.lng||this.language,p=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?i?{res:"".concat(l).concat(c).concat(a),usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:"".concat(l).concat(c).concat(a):i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;var h=this.resolve(e,r),g=null==h?void 0:h.res,v=(null==h?void 0:h.usedKey)||a,m=(null==h?void 0:h.exactUsedKey)||a,y=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,E=void 0!==r.count&&!f(r.count),x=U.hasDefaultValue(r),A=E?this.pluralResolver.getSuffix(d,r.count,r):"",w=r.ordinal&&E?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",C=E&&!r.ordinal&&0===r.count,O=C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(A)]||r["defaultValue".concat(w)]||r.defaultValue,k=g;b&&!g&&x&&(k=O);var F=q(k),D=Object.prototype.toString.apply(k);if(!(b&&k&&F&&["[object Number]","[object Function]","[object RegExp]"].indexOf(D)<0)||f(y)&&Array.isArray(k))if(b&&f(y)&&Array.isArray(g))(g=g.join(y))&&(g=this.extendTranslation(g,e,r,n));else{var B=!1,S=!1;!this.isValidLookup(g)&&x&&(B=!0,g=O),this.isValidLookup(g)||(S=!0,g=a);var j=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:g,L=x&&O!==g&&this.options.updateMissing;if(S||B||L){if(this.logger.log(L?"updateKey":"missingKey",d,l,a,L?O:g),u){var P=this.resolve(a,o(o({},r),{},{keySeparator:!1}));P&&P.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.")}var N=[],T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&T&&T[0])for(var I=0;I<T.length;I++)N.push(T[I]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(r.lng||this.language):N.push(r.lng||this.language);var R=(e,t,n)=>{var o,i=x&&n!==g?n:j;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,L,r):null!==(o=this.backendConnector)&&void 0!==o&&o.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,L,r),this.emit("missingKey",e,l,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?N.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,r);C&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&t.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&t.push("".concat(this.options.pluralSeparator,"zero")),t.forEach(t=>{R([e],a+t,r["defaultValue".concat(t)]||O)})}):R(N,a,O))}g=this.extendTranslation(g,e,r,h,n),S&&g===a&&this.options.appendNamespaceToMissingKey&&(g="".concat(l).concat(c).concat(a)),(S||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l).concat(c).concat(a):a,B?g:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,k,o(o({},r),{},{ns:s})):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=z,h.usedParams=this.getUsedParamsDetails(r),h):z}if(u){var H=Array.isArray(k),_=H?[]:{},V=H?m:v;for(var K in k)if(Object.prototype.hasOwnProperty.call(k,K)){var X="".concat(V).concat(u).concat(K);_[K]=x&&!g?this.translate(X,o(o({},r),{},{defaultValue:q(O)?O[K]:void 0},{joinArrays:!1,ns:s})):this.translate(X,o(o({},r),{joinArrays:!1,ns:s})),_[K]===X&&(_[K]=k[K])}g=_}}return i?(h.res=g,h.usedParams=this.getUsedParamsDetails(r),h):g}extendTranslation(e,t,n,r,i){var u,a=this;if(null!==(u=this.i18nFormat)&&void 0!==u&&u.parse)e=this.i18nFormat.parse(e,o(o({},this.options.interpolation.defaultVariables),n),n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(o(o({},n),{interpolation:o(o({},this.options.interpolation),n.interpolation)}));var l,c=f(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(c){var d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}var p=n.replace&&!f(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p=o(o({},this.options.interpolation.defaultVariables),p)),e=this.interpolator.interpolate(e,p,n.lng||this.language||r.usedLng,n),c){var h=e.match(this.interpolator.nestingRegexp);l<(h&&h.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(null==i?void 0:i[0])!==r[0]||n.context?a.translate(...r,t):(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null)}),n)),n.interpolation&&this.interpolator.reset()}var g=n.postProcess||this.options.postProcess,v=f(g)?[g]:g;return null!=e&&null!=v&&v.length&&!1!==n.applyPostProcessor&&(e=I.handle(v,e,t,this.options&&this.options.postProcessPassResolved?o({i18nResolved:o(o({},r),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){var t,n,r,o,i,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(e)&&(e=[e]),e.forEach(e=>{if(!this.isValidLookup(t)){var a=this.extractFromKey(e,u),s=a.key;n=s;var l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));var c=void 0!==u.count&&!f(u.count),d=c&&!u.ordinal&&0===u.count,p=void 0!==u.context&&(f(u.context)||"number"==typeof u.context)&&""!==u.context,h=u.lngs?u.lngs:this.languageUtils.toResolveHierarchy(u.lng||this.language,u.fallbackLng);l.forEach(e=>{var a,l;this.isValidLookup(t)||(i=e,z["".concat(h[0],"-").concat(e)]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.utils)&&void 0!==l&&l.hasLoadedNamespace(i)||(z["".concat(h[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),h.forEach(n=>{var i;if(!this.isValidLookup(t)){o=n;var a,l=[s];if(null!==(i=this.i18nFormat)&&void 0!==i&&i.addLookupKeys)this.i18nFormat.addLookupKeys(l,s,n,e,u);else{var f;c&&(f=this.pluralResolver.getSuffix(n,u.count,u));var h="".concat(this.options.pluralSeparator,"zero"),g="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(c&&(u.ordinal&&0===f.indexOf(g)&&l.push(s+f.replace(g,this.options.pluralSeparator)),l.push(s+f),d&&l.push(s+h)),p){var v="".concat(s).concat(this.options.contextSeparator||"_").concat(u.context);l.push(v),c&&(u.ordinal&&0===f.indexOf(g)&&l.push(v+f.replace(g,this.options.pluralSeparator)),l.push(v+f),d&&l.push(v+h))}}for(;a=l.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,u))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(r=this.i18nFormat)&&void 0!==r&&r.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!f(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=o(o({},this.options.interpolation.defaultVariables),n)),!t)for(var r of(n=o({},n),["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[r];return n}static hasDefaultValue(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}class H{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P.create("languageUtils")}getScriptPartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(f(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;var r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),f(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){var n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return f(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):f(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}var _={zero:0,one:1,two:2,few:3,many:4,other:5},V={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class K{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=P.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=S("dev"===e?"en":e),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{t=new Intl.PluralRules(r,{type:o})}catch(r){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),V;if(!e.match(/-|_/))return V;var u=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(u,n)}return this.pluralRulesCache[i]=t,t}needsPlural(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(null===(t=r)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>"".concat(t).concat(e))}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>_[e]-_[t]).map(e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e)):[]}getSuffix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(r.select(t)):(this.logger.warn("no plural rule found for: ".concat(e)),this.getSuffix("dev",t,n))}}var X=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=A(e,t,n);return!i&&o&&f(n)&&void 0===(i=B(e,n,r))&&(i=B(t,n,r)),i},W=e=>e.replace(/\$/g,"$$$$");class J{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:u,suffixEscaped:a,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:k,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?C(o):i||"{{",this.suffix=u?C(u):a||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?C(d):p||C("$t("),this.nestingSuffix=f?C(f):h||C(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\))*?)").concat(this.nestingSuffix))}interpolate(e,t,n,r){var i,u,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){var i=X(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,o(o(o({},r),t),{},{interpolationkey:e})):i}var u=e.split(this.formatSeparator),a=u.shift().trim(),s=u.join(this.formatSeparator).trim();return this.format(X(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,o(o(o({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=(null==r?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=void 0!==(null==r||null===(i=r.interpolation)||void 0===i?void 0:i.skipOnVariables)?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>W(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?W(this.escape(e)):W(e)}].forEach(t=>{for(s=0;u=t.regex.exec(e);){var n=u[1].trim();if(void 0===(a=c(n)))if("function"==typeof d){var o=d(e,u,r);a=f(o)?o:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(p){a=u[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),a=""}else f(a)||this.useRawValueToEscape||(a=g(a));var i=t.safeValue(a);if(e=e.replace(u[0],i),p?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=u[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var n,r,i,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{var n,r,u=this.nestingOptionsSeparator;if(e.indexOf(u)<0)return e;var a=e.split(new RegExp("".concat(C(u),"[ ]*{"))),s="{".concat(a[1]);e=a[0];var l=(s=this.interpolate(s,i)).match(/'/g),c=s.match(/"/g);((null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)%2==0&&!c||(null!==(r=null==c?void 0:c.length)&&void 0!==r?r:0)%2!=0)&&(s=s.replace(/'/g,'"'));try{i=JSON.parse(s),t&&(i=o(o({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(u).concat(s)}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};n=this.nestingRegexp.exec(e);){var s=[];(i=(i=o({},u)).replace&&!f(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(r=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!f(r))return r;f(r)||(r=g(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),s.length&&(r=s.reduce((e,t)=>this.format(e,t,u.lng,o(o({},u),{},{interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}var $=e=>{var t={};return(n,r,i)=>{var u=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(u=o(o({},u),{},{[i.interpolationkey]:void 0}));var a=r+JSON.stringify(u),s=t[a];return s||(s=e(S(r),i),t[a]=s),s(n)}},Y=e=>(t,n,r)=>e(S(n),r)(t);class G{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=P.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?$:Y;this.formats={number:n((e,t)=>{var n=new Intl.NumberFormat(e,o({},t));return e=>n.format(e)}),currency:n((e,t)=>{var n=new Intl.NumberFormat(e,o(o({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{var n=new Intl.DateTimeFormat(e,o({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{var n=new Intl.RelativeTimeFormat(e,o({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{var n=new Intl.ListFormat(e,o({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=$(t)}format(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){var u=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,u)].join(this.formatSeparator)}return i.reduce((e,t)=>{var{formatName:i,formatOptions:u}=(e=>{var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if("currency"===t&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if("relativetime"===t&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{o.split(";").forEach(e=>{if(e){var[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){var a=e;try{var s,l=(null==r||null===(s=r.formatParams)||void 0===s?void 0:s[r.interpolationkey])||{},c=l.locale||l.lng||r.locale||r.lng||n;a=this.formats[i](e,c,o(o(o({},u),r),l))}catch(e){this.logger.warn(e)}return a}return this.logger.warn("there was no format function for ".concat(i)),e},e)}}class Z extends N{constructor(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=P.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=[],null===(r=this.backend)||void 0===r||null===(o=r.init)||void 0===o||o.call(r,n,i.backend,i)}queueLoad(e,t,n,r){var o={},i={},u={},a={};return e.forEach(e=>{var r=!0;t.forEach(t=>{var u="".concat(e,"|").concat(t);!n.reload&&this.store.hasResourceBundle(e,t)?this.state[u]=2:this.state[u]<0||(1===this.state[u]?void 0===i[u]&&(i[u]=!0):(this.state[u]=1,r=!1,void 0===i[u]&&(i[u]=!0),void 0===o[u]&&(o[u]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(u[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var u={};this.queue.forEach(n=>{((e,t,n,r)=>{var{obj:o,k:i}=b(e,t,Object);o[i]=o[i]||[],o[i].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{u[e]||(u[e]={});var t=n.loaded[e];t.length&&t.forEach(t=>{void 0===u[e][t]&&(u[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});else{this.readingCalls++;var u=(u,a)=>{if(this.readingCalls--,this.waitingReads.length>0){var s=this.waitingReads.shift();this.read(s.lng,s.ns,s.fcName,s.tried,s.wait,s.callback)}u&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(u,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,u);try{var s=a(e,t);s&&"function"==typeof s.then?s.then(e=>u(null,e)).catch(u):u(null,s)}catch(e){u(e)}}}prepareLoading(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();f(e)&&(e=this.languageUtils.toResolveHierarchy(e)),f(t)&&(t=[t]);var o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(o," for language ").concat(r," failed"),n),!n&&i&&this.logger.log("".concat(t,"loaded namespace ").concat(o," for language ").concat(r),i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,i){var u,a,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(u=this.services)||void 0===u||null===(u=u.utils)||void 0===u||!u.hasLoadedNamespace||null!==(a=this.services)&&void 0!==a&&null!==(a=a.utils)&&void 0!==a&&a.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var d=o(o({},l),{},{isUpdate:i}),p=this.backend.create.bind(this.backend);if(p.length<6)try{var f;(f=5===p.length?p(e,t,n,r,d):p(e,t,n,r))&&"function"==typeof f.then?f.then(e=>c(null,e)).catch(c):c(null,f)}catch(e){c(e)}else p(e,t,n,r,c,d)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{var t={};if("object"==typeof e[1]&&(t=e[1]),f(e[1])&&(t.defaultValue=e[1]),f(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){var n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ee=e=>{var t,n;return f(e.ns)&&(e.ns=[e.ns]),f(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),f(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},te=()=>{};class ne extends N{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ee(t),this.services={},this.logger=P,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(f(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r,i,u,a,s,l,c=Q();this.options=o(o(o({},c),this.options),ee(t)),this.options.interpolation=o(o({},c.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=c.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(r=this)||null===(i=r.modules)||void 0===i||null===(i=i.backend)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.indexOf("Locize"))>0||(null==r||null===(u=r.modules)||void 0===u||null===(u=u.backend)||void 0===u||null===(u=u.constructor)||void 0===u||null===(u=u.name)||void 0===u?void 0:u.indexOf("Locize"))>0||null!=r&&null!==(a=r.options)&&void 0!==a&&null!==(a=a.backend)&&void 0!==a&&a.backends&&r.options.backend.backends.some(e=>{var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0})||null!=r&&null!==(s=r.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=r&&null!==(l=r.options)&&void 0!==l&&null!==(l=l.backend)&&void 0!==l&&l.backendOptions&&r.options.backend.backendOptions.some(e=>null==e?void 0:e.projectId))||"undefined"!=typeof globalThis&&globalThis.__i18next_supportNoticeShown||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis.__i18next_supportNoticeShown=!0));var d=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var p;this.modules.logger?P.init(d(this.modules.logger),this.options):P.init(null,this.options),p=this.modules.formatter?this.modules.formatter:G;var g=new H(this.options);this.store=new T(this.options.resources,this.options);var v=this.services;v.logger=P,v.resourceStore=this.store,v.languageUtils=g,v.pluralResolver=new K(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==c.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!p||this.options.interpolation.format&&this.options.interpolation.format!==c.interpolation.format||(v.formatter=d(p),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new J(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new Z(d(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(v.languageDetector=d(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=d(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=te),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&"dev"!==m[0]&&(this.options.lng=m[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});var y=h(),b=()=>{var e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),y.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?b():setTimeout(b,0),y}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=f(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var r,o;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var i=[],u=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&i.indexOf(e)<0&&i.push(e)}))};if(n)u(n);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>u(e));null===(r=this.options.preload)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>u(e)),this.services.backendConnector.load(i,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){var r=h();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=te),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&I.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;var r=h();this.emit("languageChanging",e);var o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,u)=>{u?this.isLanguageChangingTo===e&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(i,(function(){return n.t(...arguments)}))},u=t=>{e||t||!this.services.languageDetector||(t=[]);var n,r,u=f(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(f(t)?[t]:t);a&&(this.language||o(a),this.translator.language||this.translator.changeLanguage(a),null===(n=this.services.languageDetector)||void 0===n||null===(r=n.cacheUserLanguage)||void 0===r||r.call(n,a));this.loadResources(a,e=>{i(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e):u(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this,i=function(e,t){var u;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];u=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else u=o({},t);u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,""!==u.keyPrefix&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);var c,d=r.options.keySeparator||".";return u.keyPrefix&&Array.isArray(e)?c=e.map(e=>("function"==typeof e&&(e=M(e,o(o({},r.options),t))),"".concat(u.keyPrefix).concat(d).concat(e))):("function"==typeof e&&(e=M(e,o(o({},r.options),t))),c=u.keyPrefix?"".concat(u.keyPrefix).concat(d).concat(e):e),r.t(c,u)};return f(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var i=(e,t)=>{var n=this.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||0===n||2===n};if(t.precheck){var u=t.precheck(this,i);if(void 0!==u)return u}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){var n=h();return this.options.ns?(f(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){var n=h();f(e)&&(e=[e]);var r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var r=new Intl.Locale(e);if(r&&r.getTextInfo){var o=r.getTextInfo();if(o&&o.direction)return o.direction}}catch(e){}var i=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new H(Q());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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"].indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=ne.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te,n=e.forkResourceStore;n&&delete e.forkResourceStore;var r=o(o(o({},this.options),e),{isClone:!0}),i=new ne(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services=o({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){var u=Object.keys(this.store.data).reduce((e,t)=>(e[t]=o({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]=o({},e[t][r]),n),e[t]),e),{});i.store=new T(u,r),i.services.resourceStore=i.store}if(e.interpolation){var a=o(o(o({},Q().interpolation),this.options.interpolation),e.interpolation),s=o(o({},r),{},{interpolation:a});i.services.interpolator=new J(s)}return i.translator=new U(i.services,r),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)})),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}var re=ne.createInstance();re.createInstance,re.dir,re.init,re.loadResources,re.reloadResources,re.use,re.changeLanguage,re.getFixedT,re.t,re.exists,re.setDefaultNamespace,re.hasLoadedNamespace,re.loadNamespaces,re.loadLanguages;function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":oe(XMLHttpRequest))}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==le(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ce,de,pe="function"==typeof fetch?fetch:void 0;if("undefined"!=typeof global&&global.fetch?pe=global.fetch:"undefined"!=typeof window&&window.fetch&&(pe=window.fetch),ie()&&("undefined"!=typeof global&&global.XMLHttpRequest?ce=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ce=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?de=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(de=window.ActiveXObject)),"function"!=typeof pe&&(pe=void 0),!pe&&!ce&&!de)try{import("cross-fetch").then((function(e){pe=e.default})).catch((function(){}))}catch(e){}var fe=function(e,t){if(t&&"object"===le(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},he=function(e,t,n,r){var o=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};if(r){var i=r(e,t);if(i instanceof Promise)return void i.then(o).catch(n)}"function"==typeof fetch?fetch(e,t).then(o).catch(n):pe(e,t).then(o).catch(n)},ge=!1,ve=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},pe&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=fe(t,e.queryStringParams));var o=ae({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,u=ae({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},ge?{}:i),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{he(t,u,r,a)}catch(e){if(!i||0===Object.keys(i).length||!e.message||e.message.indexOf("not implemented")<0)return r(e);try{Object.keys(i).forEach((function(e){delete u[e]})),he(t,u,r,a),ge=!0}catch(e){r(e)}}}(e,t,n,r):ie()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===le(n)&&(n=fe("",n).slice(1)),e.queryStringParams&&(t=fe(t,e.queryStringParams));try{var o=ce?new ce:new de("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var u in i)o.setRequestHeader(u,i[u]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function Ae(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){var t=function(e,t){if("object"!=me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==me(t)?t:t+""}var Ce=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return Ae({},t,n||"")},parseLoadPayload:function(e,t){},request:ve,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Oe=function(e,t,n){return t&&xe(e.prototype,t),n&&xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ee(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}),[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=be(be(be({},Ce()),this.options||{}),n),this.allOptions=r,this.services&&this.options.reloadInterval){var o=setInterval((function(){return t.reload()}),this.options.reloadInterval);"object"===me(o)&&"function"==typeof o.unref&&o.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,u=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=function(e){return!!e&&"function"==typeof e.then}(i=a)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var a=u.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});u.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,u="string"==typeof r?[r]:r,a=this.options.parseLoadPayload(i,u);this.options.request(this.options,e,a,(function(i,u){if(u&&(u.status>=500&&u.status<600||!u.status))return t("failed loading "+e+"; status code: "+u.status,!0);if(u&&u.status>=400&&u.status<500)return t("failed loading "+e+"; status code: "+u.status,!1);if(!u&&i&&i.message){var a=i.message.toLowerCase();if(["failed","fetch","network","load"].find((function(e){return a.indexOf(e)>-1})))return t("failed loading "+e+": "+i.message,!0)}if(i)return t(i,!1);var s,l;try{s="string"==typeof u.data?o.options.parse(u.data,n,r):u.data}catch(t){l="failed parsing "+e+" to json"}if(l)return t(l,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var u=this.options.parsePayload(t,n,r),a=0,s=[],l=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var c=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,c,u,(function(t,n){a+=1,s.push(t),l.push(n),a===e.length&&"function"==typeof o&&o(s,l)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var u=[],a=function(e){r.toResolveHierarchy(e).forEach((function(e){u.indexOf(e)<0&&u.push(e)}))};a(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),u.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}]);Oe.type="backend";var{slice:ke,forEach:Fe}=[];var De=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Be={create(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},r=n,o=encodeURIComponent(t),i="".concat(e,"=").concat(o);if(r.maxAge>0){var u=r.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(u))}if(r.domain){if(!De.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(r.domain)}if(r.path){if(!De.test(r.path))throw new TypeError("option path is invalid");i+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite){var a="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(a){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r.partitioned&&(i+="; Partitioned"),i}(e,t,o)},read(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}},Se={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Be.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Be.create(n,e,r,o,i)}},je={name:"querystring",lookup(e){var t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){var r,{search:o}=window.location;!window.location.search&&(null===(r=window.location.hash)||void 0===r?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=o.substring(1).split("&"),u=0;u<i.length;u++){var a=i[u].indexOf("=");if(a>0)i[u].substring(0,a)===n&&(t=i[u].substring(a+1))}}return t}},Le={name:"hash",lookup(e){var t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){var{hash:o}=window.location;if(o&&o.length>2){var i=o.substring(1);if(n)for(var u=i.split("&"),a=0;a<u.length;a++){var s=u[a].indexOf("=");if(s>0)u[a].substring(0,s)===n&&(t=u[a].substring(s+1))}if(t)return t;if(!t&&r>-1){var l,c=o.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(c))return;return null===(l=c["number"==typeof r?r:0])||void 0===l?void 0:l.replace("/","")}}}return t}},Pe=null,Ne=()=>{if(null!==Pe)return Pe;try{if(!(Pe="undefined"!=typeof window&&null!==window.localStorage))return!1;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){Pe=!1}return Pe},Te={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&Ne())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:n}=t;n&&Ne()&&window.localStorage.setItem(n,e)}},Ie=null,Re=()=>{if(null!==Ie)return Ie;try{if(!(Ie="undefined"!=typeof window&&null!==window.sessionStorage))return!1;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){Ie=!1}return Ie},Me={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&Re())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:n}=t;n&&Re()&&window.sessionStorage.setItem(n,e)}},ze={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:n,userLanguage:r,language:o}=navigator;if(n)for(var i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},qe={name:"htmlTag",lookup(e){var t,{htmlTag:n}=e,r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Ue={name:"path",lookup(e){var t,{lookupFromPathIndex:n}=e;if("undefined"!=typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(r))return null===(t=r["number"==typeof n?n:0])||void 0===t?void 0:t.replace("/","")}}},He={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:n}=e,r="number"==typeof n?n+1:1,o="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[r]}},_e=!1;try{document.cookie,_e=!0}catch(e){}var Ve=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_e||Ve.splice(1,1);class Ke{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Fe.call(ke.call(arguments,1),t=>{if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:Ve,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Se),this.addDetector(je),this.addDetector(Te),this.addDetector(Me),this.addDetector(ze),this.addDetector(qe),this.addDetector(Ue),this.addDetector(He),this.addDetector(Le)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}Ke.type="languageDetector";var Xe=a(s((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),We=a(s((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}))),Je=s((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}));a(Je);var $e=a(s((function(e){var t=l.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Je(e)},e.exports.__esModule=!0,e.exports.default=e.exports}))),Ye=a(s((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}))),Ge=s((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));a(Ge);var Ze=a(s((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ge(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports})));function Qe(e,t,n){return t=Ye(t),$e(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,n||[],Ye(e).constructor):t.apply(e,n))}var et=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xe(this,t),(n=Qe(this,t)).ele=e,n.options=r,n.observer=n.create(),n.internalChange=!0,n}return Ze(t,e),We(t,[{key:"create",value:function(){var e,t=this,n=new MutationObserver((function(n){t.internalChange&&(e&&window.clearTimeout(e),e=setTimeout((function(){t.internalChange&&(t.internalChange=!1)}),200)),t.internalChange||t.emit("changed",n)}));return n.observe(this.ele,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n}},{key:"reset",value:function(){this.internalChange=!0}}])}(function(){return We((function e(){Xe(this,e),this.observers={}}),[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}])}()),tt=[],nt=!1,rt=!1;function ot(){if(!nt){nt=!0;for(var e=0;e<tt.length;e++)tt[e].fn.call(window,tt[e].ctx);tt=[]}}function it(){"complete"===document.readyState&&ot()}function ut(e,t){nt?setTimeout((function(){e(t)}),1):(tt.push({fn:e,ctx:t}),"complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState?setTimeout(ot,1):rt||(document.addEventListener?(document.addEventListener("DOMContentLoaded",ot,!1),window.addEventListener("load",ot,!1)):(document.attachEvent("onreadystatechange",it),window.attachEvent("onload",ot)),rt=!0))}var at=function(e){return e&&"VirtualNode"===e.type&&"2"===e.version};var st=function(e){return e&&"Widget"===e.type};var lt=function(e){return e&&"Thunk"===e.type};var ct=function(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))};var dt=ht,pt={},ft=[];function ht(e,t,n,r,o){this.tagName=e,this.properties=t||pt,this.children=n||ft,this.key=null!=r?String(r):void 0,this.namespace="string"==typeof o?o:null;var i,u=n&&n.length||0,a=0,s=!1,l=!1,c=!1;for(var d in t)if(t.hasOwnProperty(d)){var p=t[d];ct(p)&&p.unhook&&(i||(i={}),i[d]=p)}for(var f=0;f<u;f++){var h=n[f];at(h)?(a+=h.count||0,!s&&h.hasWidgets&&(s=!0),!l&&h.hasThunks&&(l=!0),c||!h.hooks&&!h.descendantHooks||(c=!0)):!s&&st(h)?"function"==typeof h.destroy&&(s=!0):!l&&lt(h)&&(l=!0)}this.count=u+a,this.hasWidgets=s,this.hasThunks=l,this.hooks=i,this.descendantHooks=c}ht.prototype.version="2",ht.prototype.type="VirtualNode";var gt=vt;function vt(e){this.text=String(e)}vt.prototype.version="2",vt.prototype.type="VirtualText";var mt=yt;function yt(e){this.text=String(e)}yt.prototype.type="Widget",yt.prototype.init=function(){return document.createComment(this.text)},yt.prototype.update=function(e,t){this.text!==e.text&&(t.nodeValue=this.text)};var bt=s((function(e){function t(e,o){return 1==e.nodeType?function(e){for(var o=e.tagName,i="http://www.w3.org/1999/xhtml"==e.namespaceURI?null:e.namespaceURI,u=function(e){for(var t={},o=0;o<n.length;o++){var i=n[o];if(e[i])if("style"!=i){if("img"!==e.tagName.toLowerCase()||"href"!==i)if("attributes"!=i)"tabIndex"==i&&-1===e.tabIndex||"contentEditable"==i&&"inherit"===e[i]||"object"!=typeof e[i]&&(t[i]=e[i]);else{for(var u=Array.prototype.slice.call(e[i]),a={},s=0;s<u.length;s++){var l=u[s].name;t[l]||t[r[l]]||(a[l]=e.getAttribute(l))}t[i]=a}}else{var c={};if(void 0!==e.style.length)for(var d=0;d<e.style.length;d++)p=e.style[d],c[p]=e.style.getPropertyValue(p);else for(var p in e.style)e.style[p]&&e.style.hasOwnProperty(p)&&(c[p]=e.style[p]);Object.keys(c).length&&(t[i]=c)}}return t}(e),a=[],s=0;s<e.childNodes.length;s++)a.push(t(e.childNodes[s]));return new dt(o,u,a,null,i)}(e):3==e.nodeType?new gt(e.nodeValue):8==e.nodeType?new mt(e.nodeValue):void 0}
2
2
  /*!
3
3
  * vdom-virtualize
4
4
  * Copyright 2014 by Marcel Klehr <mklehr@gmx.net>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locizify",
3
- "version": "9.0.6",
3
+ "version": "9.0.8",
4
4
  "description": "main script for using locize service in frontend",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "i18next-locize-backend": "9.0.1",
24
- "i18nextify": "4.0.4",
24
+ "i18nextify": "4.0.6",
25
25
  "locize": "4.0.16"
26
26
  },
27
27
  "devDependencies": {