-
Notifications
You must be signed in to change notification settings - Fork 1
/
bundle.js
1 lines (1 loc) · 43.2 KB
/
bundle.js
1
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=24)}([function(t,e,n){var o=n(13);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){o(t,e,n[e])})}return t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(t){return n(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(e)}t.exports=o},function(t,e,n){var o=n(4),r=n(3);t.exports=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?r(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var o=n(14);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}},function(t,e,n){var o=n(18),r=n(19),i=n(20);t.exports=function(t,e){return o(t)||r(t,e)||i()}},function(t,e,n){t.exports=n(12).default},function(t,e,n){var o=n(15),r=n(16),i=n(17);t.exports=function(t){return o(t)||r(t)||i()}},function(t,e,n){var o=n(21).default;t.exports=o,t.exports.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r={tName:"t",i18nName:"i18n",handleName:"localize",selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!1,parseDefaultValueFromContent:!0};e.default={init:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function i(e,r,i){if(0!==r.length){var a="text";if(0===r.indexOf("[")){var s=r.split("]");r=s[1],a=s[0].substr(1,s[0].length-1)}if(r.indexOf(";")===r.length-1&&(r=r.substr(0,r.length-2)),"html"===a)e.html(t.t(r,c(i,e.html())));else if("text"===a)e.text(t.t(r,c(i,e.text())));else if("prepend"===a)e.prepend(t.t(r,c(i,e.html())));else if("append"===a)e.append(t.t(r,c(i,e.html())));else if(0===a.indexOf("data-")){var u=a.substr("data-".length),l=t.t(r,c(i,e.data(u)));e.data(u,l),e.attr(a,l)}else e.attr(a,t.t(r,c(i,e.attr(a))))}function c(t,e){return n.parseDefaultValueFromContent?o({},t,{defaultValue:e}):t}}function a(t,r){var a=t.attr(n.selectorAttr);if(a||void 0===a||!1===a||(a=t.text()||t.val()),a){var s=t,u=t.data(n.targetAttr);if(u&&(s=t.find(u)||t),r||!0!==n.useOptionsAttr||(r=t.data(n.optionsAttr)),r=r||{},a.indexOf(";")>=0){var l=a.split(";");e.each(l,function(t,e){""!==e&&i(s,e.trim(),r)})}else i(s,a,r);if(!0===n.useOptionsAttr){var c={};delete(c=o({clone:c},r)).lng,t.data(n.optionsAttr,c)}}}n=o({},r,n),e[n.tName]=t.t.bind(t),e[n.i18nName]=t,e.fn[n.handleName]=function(t){return this.each(function(){a(e(this),t),e(this).find("["+n.selectorAttr+"]").each(function(){a(e(this),t)})})}}}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(t){r=!0,i=t}finally{try{o||null==s.return||s.return()}finally{if(r)throw i}}return n}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(22)),a=n(23),s=(o=a)&&o.__esModule?o:{default:o};var u=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init(e,n),this.type="backend"}return r(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=t,this.options=i.defaults(e,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,crossDomain:!1,ajax:s.default})}},{key:"readMulti",value:function(t,e,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(t,e));var r=this.services.interpolator.interpolate(o,{lng:t.join("+"),ns:e.join("+")});this.loadUrl(r,n)}},{key:"read",value:function(t,e,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath([t],[e]));var r=this.services.interpolator.interpolate(o,{lng:t,ns:e});this.loadUrl(r,n)}},{key:"loadUrl",value:function(t,e){var n=this;this.options.ajax(t,this.options,function(o,r){if(r.status>=500&&r.status<600)return e("failed loading "+t,!0);if(r.status>=400&&r.status<500)return e("failed loading "+t,!1);var i=void 0,a=void 0;try{i=n.options.parse(o,t)}catch(e){a="failed parsing "+t+" to json"}if(a)return e(a,!1);e(null,i)})}},{key:"create",value:function(t,e,n,o){var r=this;"string"==typeof t&&(t=[t]);var i={};i[n]=o||"",t.forEach(function(t){var n=r.services.interpolator.interpolate(r.options.addPath,{lng:t,ns:e});r.options.ajax(n,r.options,function(t,e){},i)})}}]),t}();u.type="backend",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaults=function(t){return r.call(i.call(arguments,1),function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])}),t},e.extend=function(t){return r.call(i.call(arguments,1),function(e){if(e)for(var n in e)t[n]=e[n]}),t};var o=[],r=o.forEach,i=o.slice},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t,e){if(e&&"object"===(void 0===e?"undefined":o(e))){var n="",r=encodeURIComponent;for(var i in e)n+="&"+r(i)+"="+r(e[i]);if(!n)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+n.slice(1)}return t}e.default=function(t,e,n,i,a){i&&"object"===(void 0===i?"undefined":o(i))&&(a||(i._t=new Date),i=r("",i).slice(1)),e.queryStringParams&&(t=r(t,e.queryStringParams));try{var s;(s=XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0")).open(i?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,i&&s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var u=e.customHeaders;if(u)for(var l in u)s.setRequestHeader(l,u[l]);s.onreadystatechange=function(){s.readyState>3&&n&&n(s.responseText,s)},s.send(i)}catch(t){console&&console.log(t)}}},function(t,e,n){"use strict";n.r(e);var o=n(9),r=n.n(o),i=n(4),a=n.n(i),s=n(0),u=n.n(s),l=n(1),c=n.n(l),f=n(2),p=n.n(f),h=n(5),g=n.n(h),d=n(6),v=n.n(d),y=n(7),m=n.n(y),b=n(3),x=n.n(b),k=n(10),S=n.n(k),O={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){var n;console&&console[t]&&(n=console)[t].apply(n,S()(e))}},w=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c()(this,t),this.init(e,n)}return p()(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||O,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,o){return o&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,u()({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),j=function(){function t(){c()(this,t),this.observers={}}return p()(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)}),this}},{key:"off",value:function(t,e){var n=this;this.observers[t]&&this.observers[t].forEach(function(){if(e){var o=n.observers[t].indexOf(e);o>-1&&n.observers[t].splice(o,1)}else delete n.observers[t]})}},{key:"emit",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];this.observers[t]&&[].concat(this.observers[t]).forEach(function(t){t.apply(void 0,n)});this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(e){e.apply(e,[t].concat(n))})}}]),t}();function P(){var t,e,n=new Promise(function(n,o){t=n,e=o});return n.resolve=t,n.reject=e,n}function R(t){return null==t?"":""+t}function L(t,e,n){function o(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function r(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(r())return{};var a=o(i.shift());!t[a]&&n&&(t[a]=new n),t=t[a]}return r()?{}:{obj:t,k:o(i.shift())}}function N(t,e,n){var o=L(t,e,Object);o.obj[o.k]=n}function C(t,e){var n=L(t,e),o=n.obj,r=n.k;if(o)return o[r]}function E(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function F(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return A[t]}):t}var M=function(t){function e(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return c()(this,e),n=g()(this,v()(e).call(this)),j.call(x()(x()(n))),n.data=t||{},n.options=o,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return m()(e,t),p()(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,i=[t,e];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(i=t.split(".")),C(this.data,i)}},{key:"addResource",value:function(t,e,n,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[t,e];n&&(a=a.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(o=e,e=(a=t.split("."))[1]),this.addNamespaces(e),N(this.data,a,o),r.silent||this.emit("added",t,e,n,o)}},{key:"addResources",value:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(t,e,r,n[r],{silent:!0});o.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[t,e];t.indexOf(".")>-1&&(o=n,n=e,e=(a=t.split("."))[1]),this.addNamespaces(e);var s=C(this.data,a)||{};o?function t(e,n,o){for(var r in n)r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof n[r]||n[r]instanceof String?o&&(e[r]=n[r]):t(e[r],n[r],o):e[r]=n[r];return e}(s,n,r):s=u()({},s,n),N(this.data,a,s),i.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?u()({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(j),T={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,o,r){var i=this;return t.forEach(function(t){i.processors[t]&&(e=i.processors[t].process(e,n,o,r))}),e}},V=function(t){function e(t){var n,o,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c()(this,e),n=g()(this,v()(e).call(this)),j.call(x()(x()(n))),o=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],r=t,i=x()(x()(n)),o.forEach(function(t){r[t]&&(i[t]=r[t])}),n.options=a,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=w.create("translator"),n}return m()(e,t),p()(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=e.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var o=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,r=e.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var i=t.split(n);(n!==o||n===o&&this.options.ns.indexOf(i[0])>-1)&&(r=i.shift()),t=i.join(o)}return"string"==typeof r&&(r=[r]),{key:t,namespaces:r}}},{key:"translate",value:function(t,e){var n=this;if("object"!==a()(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var o=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,r=this.extractFromKey(t[t.length-1],e),i=r.key,s=r.namespaces,l=s[s.length-1],c=e.lng||this.language,f=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(f){var p=e.nsSeparator||this.options.nsSeparator;return l+p+i}return i}var h=this.resolve(t,e),g=h&&h.res,d=h&&h.usedKey||i,v=h&&h.exactUsedKey||i,y=Object.prototype.toString.apply(g),m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&g&&("string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,g,e):"key '".concat(i," (").concat(this.language,")' returned an object instead of string.");if(o){var x="[object Array]"===y,k=x?[]:{},S=x?v:d;for(var O in g)if(Object.prototype.hasOwnProperty.call(g,O)){var w="".concat(S).concat(o).concat(O);k[O]=this.translate(w,u()({},e,{joinArrays:!1,ns:s})),k[O]===w&&(k[O]=g[O])}g=k}}else if(b&&"string"==typeof m&&"[object Array]"===y)(g=g.join(m))&&(g=this.extendTranslation(g,t,e));else{var j=!1,P=!1;if(!this.isValidLookup(g)&&void 0!==e.defaultValue){if(j=!0,void 0!==e.count){var R=this.pluralResolver.getSuffix(c,e.count);g=e["defaultValue".concat(R)]}g||(g=e.defaultValue)}this.isValidLookup(g)||(P=!0,g=i);var L=e.defaultValue&&e.defaultValue!==g&&this.options.updateMissing;if(P||j||L){this.logger.log(L?"updateKey":"missingKey",c,l,i,L?e.defaultValue:g);var N=[],C=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&C&&C[0])for(var E=0;E<C.length;E++)N.push(C[E]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(e.lng||this.language):N.push(e.lng||this.language);var A=function(t,o){n.options.missingKeyHandler?n.options.missingKeyHandler(t,l,o,L?e.defaultValue:g,L,e):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(t,l,o,L?e.defaultValue:g,L,e),n.emit("missingKey",t,l,o,g)};if(this.options.saveMissing){var F=void 0!==e.count&&"string"!=typeof e.count;this.options.saveMissingPlurals&&F?N.forEach(function(t){n.pluralResolver.getPluralFormsOfKey(t,i).forEach(function(e){return A([t],e)})}):A(N,i)}}g=this.extendTranslation(g,t,e,h),P&&g===i&&this.options.appendNamespaceToMissingKey&&(g="".concat(l,":").concat(i)),P&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(t,e,n,o){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,n,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(u()({},n,{interpolation:u()({},this.options.interpolation,n.interpolation)}));var i=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(i=u()({},this.options.interpolation.defaultVariables,i)),t=this.interpolator.interpolate(t,i,n.lng||this.language,n),!1!==n.nest&&(t=this.interpolator.nest(t,function(){return r.translate.apply(r,arguments)},n)),n.interpolation&&this.interpolator.reset()}var a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=T.handle(s,t,e,n,this)),t}},{key:"resolve",value:function(t){var e,n,o,r,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!a.isValidLookup(e)){var u=a.extractFromKey(t,s),l=u.key;n=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(t){a.isValidLookup(e)||(i=t,h.forEach(function(n){if(!a.isValidLookup(e)){r=n;var i,u,c=l,h=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(h,l,n,t,s);else f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&p&&h.push(c+i),p&&h.push(c+="".concat(a.options.contextSeparator).concat(s.context)),f&&h.push(c+=i);for(;u=h.pop();)a.isValidLookup(e)||(o=u,e=a.getResource(n,t,u,s))}}))})}}),{res:e,usedKey:n,exactUsedKey:o,usedLng:r,usedNS:i}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,o):this.resourceStore.getResource(t,e,n,o)}}]),e}(j);function _(t){return t.charAt(0).toUpperCase()+t.slice(1)}var H=function(){function t(e){c()(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=w.create("languageUtils")}return p()(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=_(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=_(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=_(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,o=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[],i=function(t){t&&(n.isWhitelisted(t)?r.push(t):n.logger.warn("rejecting non-whitelisted language code: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),o.forEach(function(t){r.indexOf(t)<0&&i(n.formatLanguageCode(t))}),r}}]),t}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],D={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1===t?0:2===t?1:(t<0||t>10)&&t%10==0?2:3)}};var I=function(){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c()(this,t),this.languageUtils=e,this.options=o,this.logger=w.create("pluralResolver"),this.rules=(n={},U.forEach(function(t){t.lngs.forEach(function(e){n[e]={numbers:t.nr,plurals:D[t.fc]}})}),n)}return p()(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=this,o=[],r=this.getRule(t);return r?(r.numbers.forEach(function(r){var i=n.getSuffix(t,r);o.push("".concat(e).concat(i))}),o):o}},{key:"getSuffix",value:function(t,e){var n=this,o=this.getRule(t);if(o){var r=o.noAbs?o.plurals(e):o.plurals(Math.abs(e)),i=o.numbers[r];this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),t}(),K=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c()(this,t),this.logger=w.create("interpolator"),this.init(e,!0)}return p()(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(arguments.length>1?arguments[1]:void 0)&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:F,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?E(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?E(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?E(e.nestingPrefix):e.nestingPrefixEscaped||E("$t("),this.nestingSuffix=e.nestingSuffix?E(e.nestingSuffix):e.nestingSuffixEscaped||E(")"),this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,o){var r,i,a,s=this;function u(t){return t.replace(/\$/g,"$$$$")}var l=function(t){if(t.indexOf(s.formatSeparator)<0)return C(e,t);var o=t.split(s.formatSeparator),r=o.shift().trim(),i=o.join(s.formatSeparator).trim();return s.format(C(e,r),i,n)};this.resetRegExp();var c=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;(r=this.regexpUnescape.exec(t))&&(i=l(r[1].trim()),t=t.replace(r[0],i),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;r=this.regexp.exec(t);){if(void 0===(i=l(r[1].trim())))if("function"==typeof c){var f=c(t,r,o);i="string"==typeof f?f:""}else this.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(t)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=R(i));if(i=this.escapeValue?u(this.escape(i)):u(i),t=t.replace(r[0],i),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t}},{key:"nest",value:function(t,e){var n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=u()({},r);function a(t,e){if(t.indexOf(",")<0)return t;var n=t.split(",");t=n.shift();var o=n.join(",");o=(o=this.interpolate(o,i)).replace(/'/g,'"');try{i=JSON.parse(o),e&&(i=u()({},e,i))}catch(e){this.logger.error("failed parsing options string in nesting for key ".concat(t),e)}return t}for(i.applyPostProcessor=!1;n=this.nestingRegexp.exec(t);){if((o=e(a.call(this,n[1].trim(),i),i))&&n[0]===t&&"string"!=typeof o)return o;"string"!=typeof o&&(o=R(o)),o||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),o=""),t=t.replace(n[0],o),this.regexp.lastIndex=0}return t}}]),t}(),q=n(8),B=n.n(q);var z=function(t){function e(t,n,o){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c()(this,e),r=g()(this,v()(e).call(this)),j.call(x()(x()(r))),r.backend=t,r.store=n,r.languageUtils=o.languageUtils,r.options=i,r.logger=w.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(o,i.backend,i),r}return m()(e,t),p()(e,[{key:"queueLoad",value:function(t,e,n,o){var r=this,i=[],a=[],s=[],u=[];return t.forEach(function(t){var o=!0;e.forEach(function(e){var s="".concat(t,"|").concat(e);!n.reload&&r.store.hasResourceBundle(t,e)?r.state[s]=2:r.state[s]<0||(1===r.state[s]?a.indexOf(s)<0&&a.push(s):(r.state[s]=1,o=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(e)<0&&u.push(e)))}),o||s.push(t)}),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:o}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,e,n){var o=t.split("|"),r=B()(o,2),i=r[0],a=r[1];e&&this.emit("failedLoading",i,a,e),n&&this.store.addResourceBundle(i,a,n),this.state[t]=e?-1:2;var s={};this.queue.forEach(function(n){var o,r,u,l,c,f;o=n.loaded,r=a,l=L(o,[i],Object),c=l.obj,f=l.k,c[f]=c[f]||[],u&&(c[f]=c[f].concat(r)),u||c[f].push(r),function(t,e){for(var n=t.indexOf(e);-1!==n;)t.splice(n,1),n=t.indexOf(e)}(n.pending,t),e&&n.errors.push(e),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(t){s[t]||(s[t]=[]),n.loaded[t].length&&n.loaded[t].forEach(function(e){s[t].indexOf(e)<0&&s[t].push(e)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(t){return!t.done})}},{key:"read",value:function(t,e,n){var o=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[n](t,e,function(s,u){s&&u&&r<5?setTimeout(function(){o.read.call(o,t,e,n,r+1,2*i,a)},i):a(s,u)}):a(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,o=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();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,o,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(function(t){n.loadOne(t)})}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=t.split("|"),r=B()(o,2),i=r[0],a=r[1];this.read(i,a,"read",null,null,function(o,r){o&&e.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(i," failed"),o),!o&&r&&e.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(i),r),e.loaded(t,o,r)})}},{key:"saveMissing",value:function(t,e,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,n,o,null,u()({},i,{isUpdate:r})),t&&t[0]&&this.store.addResource(t[0],e,n,o)}}]),e}(j);function J(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function W(){}var X=new(function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(c()(this,e),t=g()(this,v()(e).call(this)),j.call(x()(x()(t))),t.options=J(n),t.services={},t.logger=w,t.modules={external:[]},o&&!t.isInitialized&&!n.isClone){if(!t.options.initImmediate)return t.init(n,o),g()(t,x()(x()(t)));setTimeout(function(){t.init(n,o)},0)}return t}return m()(e,t),p()(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function o(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(n=e,e={}),this.options=u()({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!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,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===a()(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===a()(t[2])||"object"===a()(t[3])){var n=t[3]||t[2];Object.keys(n).forEach(function(t){e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:function(t,e,n){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,J(e)),this.format=this.options.interpolation.format,n||(n=W),!this.options.isClone){this.modules.logger?w.init(o(this.modules.logger),this.options):w.init(null,this.options);var r=new H(this.options);this.store=new M(this.options.resources,this.options);var i=this.services;i.logger=w,i.resourceStore=this.store,i.languageUtils=r,i.pluralResolver=new I(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new K(this.options),i.backendConnector=new z(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];t.emit.apply(t,[e].concat(o))}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new V(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];t.emit.apply(t,[e].concat(o))}),this.modules.external.forEach(function(e){e.init&&e.init(t)})}["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}});var s=P(),l=function(){t.changeLanguage(t.options.lng,function(e,o){t.isInitialized=!0,t.logger.log("initialized",t.options),t.emit("initialized",t.options),s.resolve(o),n(e,o)})};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}},{key:"loadResources",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return e();var n=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(t){n.indexOf(t)<0&&n.push(t)})};if(this.language)o(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return o(t)});this.options.preload&&this.options.preload.forEach(function(t){return o(t)}),this.services.backendConnector.load(n,this.options.ns,e)}else e(null)}},{key:"reloadResources",value:function(t,e,n){var o=P();return t||(t=this.languages),e||(e=this.options.ns),n||(n=W),this.services.backendConnector.reload(t,e,function(t){o.resolve(),n(t)}),o}},{key:"use",value:function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&T.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var n=this,o=P();this.emit("languageChanging",t);var r=function(t){t&&(n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.translator.language||n.translator.changeLanguage(t),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(t)),n.loadResources(function(r){!function(t,r){n.translator.changeLanguage(r),r&&(n.emit("languageChanged",r),n.logger.log("languageChanged",r)),o.resolve(function(){return n.t.apply(n,arguments)}),e&&e(t,function(){return n.t.apply(n,arguments)})}(r,t)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(t):r(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(t,e){var n=this,o=function t(e,o){var r=u()({},o);if("object"!==a()(o)){for(var i=arguments.length,s=new Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];r=n.options.overloadTranslationOptionHandler([e,o].concat(s))}return r.lng=r.lng||t.lng,r.lngs=r.lngs||t.lngs,r.ns=r.ns||t.ns,n.t(e,r)};return"string"==typeof t?o.lng=t:o.lngs=t,o.ns=e,o}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"loadNamespaces",value:function(t,e){var n=this,o=P();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach(function(t){n.options.ns.indexOf(t)<0&&n.options.ns.push(t)}),this.loadResources(function(t){o.resolve(),e&&e(t)}),o):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=P();"string"==typeof t&&(t=[t]);var o=this.options.preload||[],r=t.filter(function(t){return o.indexOf(t)<0});return r.length?(this.options.preload=o.concat(r),this.loadResources(function(t){n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)return"rtl";return["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","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,r=u()({},this.options,n,{isClone:!0}),i=new e(r);return["store","services","language"].forEach(function(e){i[e]=t[e]}),i.translator=new V(i.services,i.options),i.translator.on("*",function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];i.emit.apply(i,[t].concat(n))}),i.init(r,o),i.translator.options=i.options,i}}]),e}(j)),G=X,Q=(X.changeLanguage.bind(X),X.cloneInstance.bind(X),X.createInstance.bind(X),X.dir.bind(X),X.exists.bind(X),X.getFixedT.bind(X),X.init.bind(X),X.loadLanguages.bind(X),X.loadNamespaces.bind(X),X.loadResources.bind(X),X.off.bind(X),X.on.bind(X),X.setDefaultNamespace.bind(X),X.t.bind(X),X.use.bind(X),n(11)),Y=n.n(Q);$(document).ready(function(){r.a.init(G,$,{tName:"t",i18nName:"i18n",handleName:"localize",selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!1,parseDefaultValueFromContent:!0}),G.use(Y.a).init({lng:"en",debug:!0,fallbackLng:"en",backend:{loadPath:"locales/{{lng}}/{{ns}}.json"}},function(t,e){if(t)return console.error(t);$(document).localize()}),$(".langSelector").change(function(){var t=$(this).val();G.init({lng:t},function(t){$(document).localize()})})})}]);