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U,EAAGC,GAyBb,OAxBAF,EAAgBG,gBAAgB,CAC5BtH,EACAzC,EACA8B,EACAT,EACAwB,EACAD,EACAI,EACAD,EACA6E,EACAxE,IAEJwG,EAAgBI,UAAS,WACrB,IAAIC,EAAYL,EAAgBzI,UAAUD,IAAI,MAC1CgJ,EAAuBD,EAAU/M,aAAa,KAC9CiN,EAAqBF,EAAU/M,aAAa,YAC5CrD,EAAaiQ,EAAShR,QAAQQ,QAAQO,WAErCA,IACDA,EAAa,CAAC,IAAK,SAEvBA,EAAWuQ,SAAQ,SAAUC,GAAS,OAAOJ,EAAUK,kBAAkBD,EAAOH,EAAsB,IAAM,IAC5GrQ,EAAWuQ,SAAQ,SAAUC,GAAS,OAAOJ,EAAUK,kBAAkBD,EAAQ,UAAWF,EAAoB,WAAa,GACjI,IACOhB,CACX","sources":["webpack://client-app/./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n.js"],"sourcesContent":["import i18next from 'i18next';\nimport { getLogger } from 'aurelia-logging';\nimport { resolver } from 'aurelia-dependency-injection';\nimport { customAttribute, HtmlBehaviorResource, ViewResources } from 'aurelia-templating';\nimport { metadata } from 'aurelia-metadata';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nimport { valueConverter } from 'aurelia-framework';\nimport { BindingSignaler, SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { ValueConverter, bindingBehavior, valueConverter as valueConverter$1 } from 'aurelia-binding';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar I18N_EA_SIGNAL = \"i18n:locale:changed\";\nvar I18N = /** @class */ (function () {\n function I18N(ea, signaler) {\n this.ea = ea;\n this.signaler = signaler;\n this.globalVars = {};\n this.i18next = i18next;\n this.Intl = PLATFORM.global.Intl;\n }\n I18N.inject = function () { return [EventAggregator, BindingSignaler]; };\n I18N.prototype.setup = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var defaultOptions;\n var _this = this;\n return __generator(this, function (_a) {\n defaultOptions = {\n skipTranslationOnMissingKey: false,\n compatibilityJSON: \"v1\",\n lng: \"en\",\n attributes: [\"t\", \"i18n\"],\n fallbackLng: \"en\",\n debug: false\n };\n this.i18nextDeferred = new Promise(function (resolve, reject) {\n _this.i18next.init(options || defaultOptions, function (err) {\n if (err && !Array.isArray(err)) {\n reject(err);\n }\n // make sure attributes is an array in case a string was provided\n if (_this.i18next.options.attributes instanceof String) {\n _this.i18next.options.attributes = [_this.i18next.options.attributes];\n }\n resolve(_this.i18next);\n });\n });\n return [2 /*return*/, this.i18nextDeferred];\n });\n });\n };\n I18N.prototype.i18nextReady = function () {\n return this.i18nextDeferred;\n };\n I18N.prototype.setLocale = function (locale) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var oldLocale = _this.getLocale();\n _this.i18next.changeLanguage(locale, function (err, tr) {\n if (err) {\n reject(err);\n }\n _this.ea.publish(I18N_EA_SIGNAL, { oldValue: oldLocale, newValue: locale });\n _this.signaler.signal(\"aurelia-translation-signal\");\n resolve(tr);\n });\n });\n };\n I18N.prototype.getLocale = function () {\n return this.i18next.language;\n };\n I18N.prototype.nf = function (options, locales) {\n return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});\n };\n I18N.prototype.uf = function (numberLike, locale) {\n var nf = this.nf({}, locale || this.getLocale());\n var comparer = nf.format(10000 / 3);\n var thousandSeparator = comparer[1];\n var decimalSeparator = comparer[5];\n if (thousandSeparator === \".\") {\n thousandSeparator = \"\\\\.\";\n }\n // remove all thousand seperators\n var result = numberLike.replace(new RegExp(thousandSeparator, \"g\"), \"\")\n // remove non-numeric signs except -> , .\n .replace(/[^\\d.,-]/g, \"\")\n // replace original decimalSeparator with english one\n .replace(decimalSeparator, \".\");\n // return real number\n return Number(result);\n };\n I18N.prototype.df = function (options, locales) {\n return new this.Intl.DateTimeFormat(locales || this.getLocale(), options);\n };\n I18N.prototype.tr = function (key, options) {\n var fullOptions = this.globalVars;\n if (options !== undefined) {\n fullOptions = Object.assign(Object.assign({}, this.globalVars), options);\n }\n return this.i18next.t(key, fullOptions);\n };\n I18N.prototype.registerGlobalVariable = function (key, value) {\n this.globalVars[key] = value;\n };\n I18N.prototype.unregisterGlobalVariable = function (key) {\n delete this.globalVars[key];\n };\n /**\n * Scans an element for children that have a translation attribute and\n * updates their innerHTML with the current translation values.\n *\n * If an image is encountered the translated value will be applied to the src attribute.\n *\n * @param el HTMLElement to search within\n */\n I18N.prototype.updateTranslations = function (el) {\n if (!el || !el.querySelectorAll) {\n return;\n }\n var i;\n var l;\n // create a selector from the specified attributes to look for\n // var selector = [].concat(this.i18next.options.attributes);\n var attributes = this.i18next.options.attributes;\n var selector = [].concat(attributes);\n for (i = 0, l = selector.length; i < l; i++) {\n selector[i] = \"[\" + selector[i] + \"]\";\n }\n selector = selector.join(\",\");\n // get the nodes\n var nodes = el.querySelectorAll(selector);\n for (i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n var keys = void 0;\n var params = void 0;\n // test every attribute and get the first one that has a value\n for (var i2 = 0, l2 = attributes.length; i2 < l2; i2++) {\n keys = node.getAttribute(attributes[i2]);\n var pname = attributes[i2] + \"-params\";\n if (pname && node.au && node.au[pname]) {\n params = node.au[pname].viewModel.value;\n }\n if (keys) {\n break;\n }\n }\n // skip if nothing was found\n if (!keys) {\n continue;\n }\n // split the keys into multiple keys separated by a ;\n this.updateValue(node, keys, params);\n }\n };\n I18N.prototype.updateValue = function (node, value, params) {\n if (value === null || value === undefined) {\n value = \"\";\n }\n var keys = value.toString().split(\";\");\n var i = keys.length;\n while (i--) {\n var key = keys[i];\n // remove the optional attribute\n var re = /\\[([a-z\\-, ]*)\\]/ig;\n var m = void 0;\n var attr = \"text\";\n // set default attribute to src if this is an image node\n if (node.nodeName === \"IMG\") {\n attr = \"src\";\n }\n // check if a attribute was specified in the key\n // tslint:disable-next-line:no-conditional-assignment\n while ((m = re.exec(key)) !== null) {\n if (m.index === re.lastIndex) {\n re.lastIndex++;\n }\n if (m) {\n key = key.replace(m[0], \"\");\n attr = m[1];\n }\n }\n var attrs = attr.split(\",\");\n var j = attrs.length;\n while (j--) {\n attr = attrs[j].trim();\n if (!node._textContent) {\n node._textContent = node.textContent;\n }\n if (!node._innerHTML) {\n node._innerHTML = node.innerHTML;\n }\n // convert to camelCase\n // tslint:disable-next-line:only-arrow-functions\n var attrCC = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\n var reservedNames = [\"prepend\", \"append\", \"text\", \"html\"];\n var i18nLogger = getLogger(\"i18n\");\n if (reservedNames.indexOf(attr) > -1 &&\n node.au &&\n node.au.controller &&\n node.au.controller.viewModel &&\n attrCC in node.au.controller.viewModel) {\n i18nLogger.warn(\"Aurelia I18N reserved attribute name\\n\\n [\" + reservedNames.join(\", \") + \"]\\n\\n Your custom element has a bindable named \" + attr + \" which is a reserved word.\\n\\n If you'd like Aurelia I18N to translate your bindable instead, please consider giving it another name.\");\n }\n if (this.i18next.options.skipTranslationOnMissingKey &&\n this.tr(key, params) === key) {\n i18nLogger.warn(\"Couldn't find translation for key: \" + key);\n return;\n }\n // handle various attributes\n // anything other than text,prepend,append or html will be added as an attribute on the element.\n switch (attr) {\n case \"text\":\n var newChild = DOM.createTextNode(this.tr(key, params));\n if (node._newChild && node._newChild.parentNode === node) {\n node.removeChild(node._newChild);\n }\n node._newChild = newChild;\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n node.appendChild(node._newChild);\n break;\n case \"prepend\":\n var prependParser = DOM.createElement(\"div\");\n prependParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._prepended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n for (var pi = prependParser.childNodes.length - 1; pi >= 0; pi--) {\n prependParser.childNodes[pi]._prepended = true;\n if (node.firstChild) {\n node.insertBefore(prependParser.childNodes[pi], node.firstChild);\n }\n else {\n node.appendChild(prependParser.childNodes[pi]);\n }\n }\n break;\n case \"append\":\n var appendParser = DOM.createElement(\"div\");\n appendParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._appended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n while (appendParser.firstChild) {\n appendParser.firstChild._appended = true;\n node.appendChild(appendParser.firstChild);\n }\n break;\n case \"html\":\n node.innerHTML = this.tr(key, params);\n break;\n default: // normal html attribute\n if (node.au &&\n node.au.controller &&\n node.au.controller.viewModel &&\n attrCC in node.au.controller.viewModel) {\n node.au.controller.viewModel[attrCC] = this.tr(key, params);\n }\n else {\n node.setAttribute(attr, this.tr(key, params));\n }\n break;\n }\n }\n }\n };\n return I18N;\n}());\n\nvar TBindingBehavior = /** @class */ (function () {\n function TBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n TBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n TBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the TValueConverter.\n // pass through any args to the binding behavior to the TValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"t\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n TBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n TBindingBehavior = __decorate([\n bindingBehavior(\"t\")\n ], TBindingBehavior);\n return TBindingBehavior;\n}());\n\n// tslint:disable-next-line:only-arrow-functions\nvar isInteger = Number.isInteger || function (value) {\n return typeof value === \"number\" &&\n isFinite(value) &&\n Math.floor(value) === value;\n};\nvar LazyOptional = /** @class */ (function () {\n function LazyOptional(key) {\n this.key = key;\n }\n LazyOptional_1 = LazyOptional;\n LazyOptional.of = function (key) {\n return new LazyOptional_1(key);\n };\n LazyOptional.prototype.get = function (container) {\n var _this = this;\n return function () {\n if (container.hasResolver(_this.key, false)) {\n return container.get(_this.key);\n }\n return null;\n };\n };\n var LazyOptional_1;\n LazyOptional = LazyOptional_1 = __decorate([\n resolver()\n ], LazyOptional);\n return LazyOptional;\n}());\n\nvar TParamsCustomAttribute = /** @class */ (function () {\n function TParamsCustomAttribute(element) {\n this.element = element;\n }\n TParamsCustomAttribute_1 = TParamsCustomAttribute;\n TParamsCustomAttribute.inject = function () {\n return [DOM.Element];\n };\n TParamsCustomAttribute.configureAliases = function (aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TParamsCustomAttribute_1);\n r.aliases = aliases;\n };\n TParamsCustomAttribute.prototype.valueChanged = function () { };\n var TParamsCustomAttribute_1;\n TParamsCustomAttribute = TParamsCustomAttribute_1 = __decorate([\n customAttribute(\"t-params\")\n ], TParamsCustomAttribute);\n return TParamsCustomAttribute;\n}());\n\nvar TCustomAttribute = /** @class */ (function () {\n function TCustomAttribute(element, service, ea, p) {\n this.element = element;\n this.service = service;\n this.ea = ea;\n this.lazyParams = p;\n }\n TCustomAttribute_1 = TCustomAttribute;\n TCustomAttribute.inject = function () {\n return [DOM.Element, I18N, EventAggregator, LazyOptional.of(TParamsCustomAttribute)];\n };\n TCustomAttribute.configureAliases = function (aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TCustomAttribute_1);\n r.aliases = aliases;\n };\n TCustomAttribute.prototype.bind = function () {\n var _this = this;\n this.params = this.lazyParams();\n if (this.params) {\n this.params.valueChanged = function (newParams, oldParams) {\n _this.paramsChanged(_this.value, newParams, oldParams);\n };\n }\n var p = this.params !== null ? this.params.value : undefined;\n this.subscription = this.ea.subscribe(I18N_EA_SIGNAL, function () {\n _this.service.updateValue(_this.element, _this.value, _this.params !== null ? _this.params.value : undefined);\n });\n this.service.updateValue(this.element, this.value, p);\n };\n TCustomAttribute.prototype.paramsChanged = function (newValue, newParams) {\n this.service.updateValue(this.element, newValue, newParams);\n };\n TCustomAttribute.prototype.valueChanged = function (newValue) {\n var p = this.params !== null ? this.params.value : undefined;\n this.service.updateValue(this.element, newValue, p);\n };\n TCustomAttribute.prototype.unbind = function () {\n // If unbind is called before timeout for subscription is triggered, subscription will be undefined\n if (this.subscription) {\n this.subscription.dispose();\n }\n };\n var TCustomAttribute_1;\n TCustomAttribute = TCustomAttribute_1 = __decorate([\n customAttribute(\"t\")\n ], TCustomAttribute);\n return TCustomAttribute;\n}());\n\nvar TValueConverter = /** @class */ (function () {\n function TValueConverter(service) {\n this.service = service;\n }\n TValueConverter.inject = function () { return [I18N]; };\n TValueConverter.prototype.toView = function (value, options) {\n return this.service.tr(value, options);\n };\n TValueConverter = __decorate([\n valueConverter(\"t\")\n ], TValueConverter);\n return TValueConverter;\n}());\n\nvar NfBindingBehavior = /** @class */ (function () {\n function NfBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n NfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n NfBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the NfValueConverter.\n // pass through any args to the binding behavior to the NfValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"nf\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n NfBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n NfBindingBehavior = __decorate([\n bindingBehavior(\"nf\")\n ], NfBindingBehavior);\n return NfBindingBehavior;\n}());\n\nvar NfValueConverter = /** @class */ (function () {\n function NfValueConverter(service) {\n this.service = service;\n }\n NfValueConverter.inject = function () { return [I18N]; };\n NfValueConverter.prototype.toView = function (value, nfOrOptions, locale) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (nfOrOptions && (nfOrOptions instanceof Intl.NumberFormat && typeof nfOrOptions.format === \"function\")) {\n return nfOrOptions.format(value);\n }\n var nf = this.service.nf(nfOrOptions, locale || this.service.getLocale());\n return nf.format(value);\n };\n NfValueConverter = __decorate([\n valueConverter$1(\"nf\")\n ], NfValueConverter);\n return NfValueConverter;\n}());\n\nvar DfBindingBehavior = /** @class */ (function () {\n function DfBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n DfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n DfBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the DfValueConverter.\n // pass through any args to the binding behavior to the DfValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"df\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n DfBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n DfBindingBehavior = __decorate([\n bindingBehavior(\"df\")\n ], DfBindingBehavior);\n return DfBindingBehavior;\n}());\n\nvar DfValueConverter = /** @class */ (function () {\n function DfValueConverter(service) {\n this.service = service;\n }\n DfValueConverter.inject = function () { return [I18N]; };\n DfValueConverter.prototype.toView = function (value, dfOrOptions, locale) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (typeof value === \"string\" && isNaN(value) && !isInteger(value)) {\n value = new Date(value);\n }\n if (dfOrOptions && (dfOrOptions instanceof Intl.DateTimeFormat && typeof dfOrOptions.format === \"function\")) {\n return dfOrOptions.format(value);\n }\n var df = this.service.df(dfOrOptions, locale || this.service.getLocale());\n return df.format(value);\n };\n DfValueConverter = __decorate([\n valueConverter$1(\"df\")\n ], DfValueConverter);\n return DfValueConverter;\n}());\n\nvar RtBindingBehavior = /** @class */ (function () {\n function RtBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n RtBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n RtBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\", \"aurelia-relativetime-signal\");\n // rewrite the expression to use the RtValueConverter.\n // pass through any args to the binding behavior to the RtValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"rt\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n RtBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n RtBindingBehavior = __decorate([\n bindingBehavior(\"rt\")\n ], RtBindingBehavior);\n return RtBindingBehavior;\n}());\n\nvar translations = {\n ar: {\n translation: {\n now: 'الآن',\n second_ago: 'قبل ثانية واحدة',\n second_ago_plural: 'قبل __count__ ثانية',\n second_in: 'خلال ثانية واحدة',\n second_in_plural: 'خلال __count__ ثانية',\n minute_ago: 'قبل دقيقة واحدة',\n minute_ago_plural: 'قبل __count__ دقيقة',\n minute_in: 'خلال دقيقة واحدة',\n minute_in_plural: 'خلال __count__ دقيقة',\n hour_ago: 'قبل ساعة واحدة',\n hour_ago_plural: 'قبل __count__ ساعة',\n hour_in: 'خلال ساعة واحدة',\n hour_in_plural: 'خلال __count__ ساعة',\n day_ago: 'قبل يوم واحد',\n day_ago_plural: 'قبل __count__ يومًا',\n day_in: 'خلال يوم واحد',\n day_in_plural: 'خلال __count__ يومًا',\n month_ago: 'قبل شهر واحد',\n month_ago_plural: 'قبل __count__ شهرًا',\n month_in: 'خلال شهر واحد',\n month_in_plural: 'خلال __count__ شهرًا',\n year_ago: 'قبل سنة واحدة',\n year_ago_plural: 'قبل __count__ سنة',\n year_in: 'خلال سنة واحدة',\n year_in_plural: 'خلال __count__ سنة'\n }\n },\n da: {\n translation: {\n now: 'nu',\n second_ago: 'for __count__ sekund siden',\n second_ago_plural: 'for __count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'for __count__ minut siden',\n minute_ago_plural: 'for __count__ minutter siden',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: 'for __count__ time siden',\n hour_ago_plural: 'for __count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: 'for __count__ dag siden',\n day_ago_plural: 'for __count__ dage siden',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dage',\n month_ago: 'for __count__ måned siden',\n month_ago_plural: 'for __count__ måneder siden',\n month_in: 'om __count__ måned',\n month_in_plural: 'om __count__ måneder',\n year_ago: 'for __count__ år siden',\n year_ago_plural: 'for __count__ år siden',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n de: {\n translation: {\n now: 'jetzt',\n second_ago: 'vor __count__ Sekunde',\n second_ago_plural: 'vor __count__ Sekunden',\n second_in: 'in __count__ Sekunde',\n second_in_plural: 'in __count__ Sekunden',\n minute_ago: 'vor __count__ Minute',\n minute_ago_plural: 'vor __count__ Minuten',\n minute_in: 'in __count__ Minute',\n minute_in_plural: 'in __count__ Minuten',\n hour_ago: 'vor __count__ Stunde',\n hour_ago_plural: 'vor __count__ Stunden',\n hour_in: 'in __count__ Stunde',\n hour_in_plural: 'in __count__ Stunden',\n day_ago: 'vor __count__ Tag',\n day_ago_plural: 'vor __count__ Tagen',\n day_in: 'in __count__ Tag',\n day_in_plural: 'in __count__ Tagen',\n month_ago: 'vor __count__ Monat',\n month_ago_plural: 'vor __count__ Monaten',\n month_in: 'in __count__ Monat',\n month_in_plural: 'in __count__ Monaten',\n year_ago: 'vor __count__ Jahr',\n year_ago_plural: 'vor __count__ Jahren',\n year_in: 'in __count__ Jahr',\n year_in_plural: 'in __count__ Jahren'\n }\n },\n en: {\n translation: {\n now: 'now',\n second_ago: '__count__ second ago',\n second_ago_plural: '__count__ seconds ago',\n second_in: 'in __count__ second',\n second_in_plural: 'in __count__ seconds',\n minute_ago: '__count__ minute ago',\n minute_ago_plural: '__count__ minutes ago',\n minute_in: 'in __count__ minute',\n minute_in_plural: 'in __count__ minutes',\n hour_ago: '__count__ hour ago',\n hour_ago_plural: '__count__ hours ago',\n hour_in: 'in __count__ hour',\n hour_in_plural: 'in __count__ hours',\n day_ago: '__count__ day ago',\n day_ago_plural: '__count__ days ago',\n day_in: 'in __count__ day',\n day_in_plural: 'in __count__ days',\n month_ago: '__count__ month ago',\n month_ago_plural: '__count__ months ago',\n month_in: 'in __count__ month',\n month_in_plural: 'in __count__ months',\n year_ago: '__count__ year ago',\n year_ago_plural: '__count__ years ago',\n year_in: 'in __count__ year',\n year_in_plural: 'in __count__ years'\n }\n },\n es: {\n translation: {\n now: 'ahora',\n second_ago: 'hace __count__ segundo',\n second_ago_plural: 'hace __count__ segundos',\n second_in: 'dentro de __count__ segundo',\n second_in_plural: 'dentro de __count__ segundos',\n minute_ago: 'hace __count__ minuto',\n minute_ago_plural: 'hace __count__ minutos',\n minute_in: 'dentro de __count__ minuto',\n minute_in_plural: 'dentro de __count__ minutos',\n hour_ago: 'hace __count__ hora',\n hour_ago_plural: 'hace __count__ horas',\n hour_in: 'dentro de __count__ hora',\n hour_in_plural: 'dentro de __count__ horas',\n day_ago: 'hace __count__ día',\n day_ago_plural: 'hace __count__ días',\n day_in: 'dentro de __count__ día',\n day_in_plural: 'dentro de __count__ días',\n month_ago: 'hace __count__ mes',\n month_ago_plural: 'hace __count__ meses',\n month_in: 'dentro de __count__ mes',\n month_in_plural: 'dentro de __count__ meses',\n year_ago: 'hace __count__ año',\n year_ago_plural: 'hace __count__ años',\n year_in: 'dentro de __count__ año',\n year_in_plural: 'dentro de __count__ años'\n }\n },\n fi: {\n translation: {\n now: 'nyt',\n second_ago: '__count__ sekunti sitten',\n second_ago_plural: '__count__ sekuntia sitten',\n second_in: '__count__ sekunnin päästä',\n second_in_plural: '__count__ sekunnin päästä',\n minute_ago: '__count__ minuutti sitten',\n minute_ago_plural: '__count__ minuuttia sitten',\n minute_in: '__count__ minuutin päästä',\n minute_in_plural: '__count__ minuutin päästä',\n hour_ago: '__count__ tunti sitten',\n hour_ago_plural: '__count__ tuntia sitten',\n hour_in: '__count__ tunnin päästä',\n hour_in_plural: '__count__ tunnin päästä',\n day_ago: '__count__ päivä sitten',\n day_ago_plural: '__count__ päivää sitten',\n day_in: '__count__ päivän päästä',\n day_in_plural: '__count__ päivän päästä',\n month_ago: '__count__ kuukausi sitten',\n month_ago_plural: '__count__ kuukautta sitten',\n month_in: '__count__ kuukauden päästä',\n month_in_plural: '__count__ kuukauden päästä',\n year_ago: '__count__ vuosi sitten',\n year_ago_plural: '__count__ vuotta sitten',\n year_in: '__count__ vuoden päästä',\n year_in_plural: '__count__ vuoden päästä'\n }\n },\n fr: {\n translation: {\n now: 'maintenant',\n second_ago: 'il y a __count__ seconde',\n second_ago_plural: 'il y a __count__ secondes',\n second_in: 'dans __count__ seconde',\n second_in_plural: 'dans __count__ secondes',\n minute_ago: 'il y a __count__ minute',\n minute_ago_plural: 'il y a __count__ minutes',\n minute_in: 'dans __count__ minute',\n minute_in_plural: 'dans __count__ minutes',\n hour_ago: 'il y a __count__ heure',\n hour_ago_plural: 'il y a __count__ heures',\n hour_in: 'dans __count__ heure',\n hour_in_plural: 'dans __count__ heures',\n day_ago: 'il y a __count__ jour',\n day_ago_plural: 'il y a __count__ jours',\n day_in: 'dans __count__ jour',\n day_in_plural: 'dans __count__ jours',\n month_ago: 'il y a __count__ mois',\n month_ago_plural: 'il y a __count__ mois',\n month_in: 'dans __count__ mois',\n month_in_plural: 'dans __count__ mois',\n year_ago: 'il y a __count__ an',\n year_ago_plural: 'il y a __count__ ans',\n year_in: 'dans __count__ an',\n year_in_plural: 'dans __count__ ans'\n }\n },\n it: {\n translation: {\n now: 'ora',\n second_ago: '__count__ secondo fa',\n second_ago_plural: '__count__ secondi fa',\n second_in: 'tra __count__ secondo',\n second_in_plural: 'tra __count__ secondi',\n minute_ago: '__count__ minuto fa',\n minute_ago_plural: '__count__ minuti fa',\n minute_in: 'tra __count__ minuto',\n minute_in_plural: 'tra __count__ minuti',\n hour_ago: '__count__ ora fa',\n hour_ago_plural: '__count__ ore fa',\n hour_in: 'tra __count__ ora',\n hour_in_plural: 'tra __count__ ore',\n day_ago: '__count__ giorno fa',\n day_ago_plural: '__count__ giorni fa',\n day_in: 'tra __count__ giorno',\n day_in_plural: 'tra __count__ giorni',\n month_ago: '__count__ mese fa',\n month_ago_plural: '__count__ mesi fa',\n month_in: 'tra __count__ mese',\n month_in_plural: 'tra __count__ mesi',\n year_ago: '__count__ anno fa',\n year_ago_plural: '__count__ anni fa',\n year_in: 'tra __count__ anno',\n year_in_plural: 'tra __count__ anni'\n }\n },\n ja: {\n translation: {\n now: '今',\n second_ago: '__count__ 秒前',\n second_ago_plural: '__count__ 秒前',\n second_in: '__count__ 秒後',\n second_in_plural: '__count__ 秒後',\n minute_ago: '__count__ 分前',\n minute_ago_plural: '__count__ 分前',\n minute_in: '__count__ 分後',\n minute_in_plural: '__count__ 分後',\n hour_ago: '__count__ 時間前',\n hour_ago_plural: '__count__ 時間前',\n hour_in: '__count__ 時間後',\n hour_in_plural: '__count__ 時間後',\n day_ago: '__count__ 日前',\n day_ago_plural: '__count__ 日前',\n day_in: '__count__ 日後',\n day_in_plural: '__count__ 日後',\n month_ago: '__count__ か月前',\n month_ago_plural: '__count__ か月前',\n month_in: '__count__ か月後',\n month_in_plural: '__count__ か月後',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年後',\n year_in_plural: '__count__ 年後'\n }\n },\n lt: {\n translation: {\n now: 'dabar',\n second_ago: 'prieš __count__ sekundę',\n second_ago_plural: 'prieš __count__ sekundes',\n second_in: 'po __count__ sekundės',\n second_in_plural: 'po __count__ sekundžių',\n minute_ago: 'prieš __count__ minutę',\n minute_ago_plural: 'prieš __count__ minutes',\n minute_in: 'po __count__ minutės',\n minute_in_plural: 'po __count__ minučių',\n hour_ago: 'prieš __count__ valandą',\n hour_ago_plural: 'prieš __count__ valandas',\n hour_in: 'po __count__ valandos',\n hour_in_plural: 'po __count__ valandų',\n day_ago: 'prieš __count__ dieną',\n day_ago_plural: 'prieš __count__ dienas',\n day_in: 'po __count__ dienos',\n day_in_plural: 'po __count__ dienų',\n month_ago: 'prieš __count__ mėnesį',\n month_ago_plural: 'prieš __count__ mėnesius',\n month_in: 'po __count__ mėnesio',\n month_in_plural: 'po __count__ mėnesių',\n year_ago: 'prieš __count__ metus',\n year_ago_plural: 'prieš __count__ metus',\n year_in: 'po __count__ metų',\n year_in_plural: 'po __count__ metų'\n }\n },\n nl: {\n translation: {\n now: 'nu',\n second_ago: '__count__ seconde geleden',\n second_ago_plural: '__count__ seconden geleden',\n second_in: 'over __count__ seconde',\n second_in_plural: 'over __count__ seconden',\n minute_ago: '__count__ minuut geleden',\n minute_ago_plural: '__count__ minuten geleden',\n minute_in: 'over __count__ minuut',\n minute_in_plural: 'over __count__ minuten',\n hour_ago: '__count__ uur geleden',\n hour_ago_plural: '__count__ uur geleden',\n hour_in: 'over __count__ uur',\n hour_in_plural: 'over __count__ uur',\n day_ago: '__count__ dag geleden',\n day_ago_plural: '__count__ dagen geleden',\n day_in: 'over __count__ dag',\n day_in_plural: 'over __count__ dagen',\n month_ago: '__count__ maand geleden',\n month_ago_plural: '__count__ maanden geleden',\n month_in: 'over __count__ maand',\n month_in_plural: 'over __count__ maanden',\n year_ago: '__count__ jaar geleden',\n year_ago_plural: '__count__ jaar geleden',\n year_in: 'over __count__ jaar',\n year_in_plural: 'over __count__ jaar'\n }\n },\n nn: {\n translation: {\n now: 'no',\n second_ago: 'for __count__ sekund sidan',\n second_ago_plural: 'for __count__ sekund sidan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekund',\n minute_ago: 'for __count__ minutt sidan',\n minute_ago_plural: 'for __count__ minutt sidan',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutt',\n hour_ago: 'for __count__ time sidan',\n hour_ago_plural: 'for __count__ timar sidan',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timar',\n day_ago: 'for __count__ døgn sidan',\n day_ago_plural: 'for __count__ døgn sidan',\n day_in: 'om __count__ døgn',\n day_in_plural: 'om __count__ døgn',\n month_ago: 'for __count__ månad sidan',\n month_ago_plural: 'for __count__ månadar sidan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månadar',\n year_ago: 'for __count__ år sidan',\n year_ago_plural: 'for __count__ år sidan',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n nb: {\n translation: {\n now: 'nå',\n second_ago: 'for __count__ sekund siden',\n second_ago_plural: 'for __count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'for __count__ minutt siden',\n minute_ago_plural: 'for __count__ minutter siden',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: 'for __count__ time siden',\n hour_ago_plural: 'for __count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: 'for __count__ døgn siden',\n day_ago_plural: 'for __count__ døgn siden',\n day_in: 'om __count__ døgn',\n day_in_plural: 'om __count__ døgn',\n month_ago: 'for __count__ måned siden',\n month_ago_plural: 'for __count__ måneder siden',\n month_in: 'om __count__ måned',\n month_in_plural: 'om __count__ måneder',\n year_ago: 'for __count__ år siden',\n year_ago_plural: 'for __count__ år siden',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n pl: {\n translation: {\n now: 'teraz',\n second_ago: '__count__ sekundę temu',\n second_ago_plural: '__count__ sekundy temu',\n second_in: 'za __count__ sekundę',\n second_in_plural: 'za __count__ sekundy',\n minute_ago: '__count__ minutę temu',\n minute_ago_plural: '__count__ minuty temu',\n minute_in: 'za __count__ minutę',\n minute_in_plural: 'za __count__ minuty',\n hour_ago: '__count__ godzinę temu',\n hour_ago_plural: '__count__ godziny temu',\n hour_in: 'za __count__ godzinę',\n hour_in_plural: 'za __count__ godziny',\n day_ago: '__count__ dzień temu',\n day_ago_plural: '__count__ dni temu',\n day_in: 'za __count__ dzień',\n day_in_plural: 'za __count__ dni',\n month_ago: '__count__ miesiąc temu',\n month_ago_plural: '__count__ miesiące temu',\n month_in: 'za __count__ miesiąc',\n month_in_plural: 'za __count__ miesiące',\n year_ago: '__count__ rok temu',\n year_ago_plural: '__count__ lata temu',\n year_in: 'za __count__ rok',\n year_in_plural: 'za __count__ lata'\n }\n },\n pt: {\n translation: {\n now: 'agora',\n second_ago: 'há __count__ segundo',\n second_ago_plural: 'há __count__ segundos',\n second_in: 'em __count__ segundo',\n second_in_plural: 'em __count__ segundos',\n minute_ago: 'há __count__ minuto',\n minute_ago_plural: 'há __count__ minutos',\n minute_in: 'em __count__ minuto',\n minute_in_plural: 'em __count__ minutos',\n hour_ago: 'há __count__ hora',\n hour_ago_plural: 'há __count__ horas',\n hour_in: 'em __count__ hora',\n hour_in_plural: 'em __count__ horas',\n day_ago: 'há __count__ dia',\n day_ago_plural: 'há __count__ dias',\n day_in: 'em __count__ dia',\n day_in_plural: 'em __count__ dias',\n month_ago: 'há __count__ mês',\n month_ago_plural: 'há __count__ meses',\n month_in: 'em __count__ mês',\n month_in_plural: 'em __count__ meses',\n year_ago: 'há __count__ ano',\n year_ago_plural: 'há __count__ anos',\n year_in: 'em __count__ ano',\n year_in_plural: 'em __count__ anos'\n }\n },\n sv: {\n translation: {\n now: 'nu',\n second_ago: 'för __count__ sekund sedan',\n second_ago_plural: 'för __count__ sekunder sedan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'för __count__ minut sedan',\n minute_ago_plural: 'för __count__ minuter sedan',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minuter',\n hour_ago: 'för __count__ timme sedan',\n hour_ago_plural: 'för __count__ timmar sedan',\n hour_in: 'om __count__ timme',\n hour_in_plural: 'om __count__ timmar',\n day_ago: 'för __count__ dag sedan',\n day_ago_plural: 'för __count__ dagar sedan',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dagar',\n month_ago: 'för __count__ månad sedan',\n month_ago_plural: 'för __count__ månader sedan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månader',\n year_ago: 'för __count__ år sedan',\n year_ago_plural: 'för __count__ år sedan',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n th: {\n translation: {\n now: 'ขณะนี้',\n second_ago: '__count__ วินาทีที่ผ่านมา',\n second_ago_plural: '__count__ วินาทีที่ผ่านมา',\n second_in: 'ในอีก __count__ วินาที',\n second_in_plural: 'ในอีก __count__ วินาที',\n minute_ago: '__count__ นาทีที่ผ่านมา',\n minute_ago_plural: '__count__ นาทีที่ผ่านมา',\n minute_in: 'ในอีก __count__ นาที',\n minute_in_plural: 'ในอีก __count__ นาที',\n hour_ago: '__count__ ชั่วโมงที่ผ่านมา',\n hour_ago_plural: '__count__ ชั่วโมงที่ผ่านมา',\n hour_in: 'ในอีก __count__ ชั่วโมง',\n hour_in_plural: 'ในอีก __count__ ชั่วโมง',\n day_ago: '__count__ วันที่ผ่านมา',\n day_ago_plural: '__count__ วันที่ผ่านมา',\n day_in: 'ในอีก __count__ วัน',\n day_in_plural: 'ในอีก __count__ วัน',\n month_ago: '__count__ เดือนที่ผ่านมา',\n month_ago_plural: '__count__ เดือนที่ผ่านมา',\n month_in: 'ในอีก __count__ เดือน',\n month_in_plural: 'ในอีก __count__ เดือน',\n year_ago: '__count__ ปีที่แล้ว',\n year_ago_plural: '__count__ ปีที่แล้ว',\n year_in: 'ในอีก __count__ ปี',\n year_in_plural: 'ในอีก __count__ ปี'\n }\n },\n zh: {\n translation: {\n now: '现在',\n second_ago: '__count__秒钟前',\n second_ago_plural: '__count__秒钟前',\n second_in: '__count__秒钟后',\n second_in_plural: '__count__秒钟后',\n minute_ago: '__count__分钟前',\n minute_ago_plural: '__count__分钟前',\n minute_in: '__count__分钟后',\n minute_in_plural: '__count__分钟后',\n hour_ago: '__count__小时前',\n hour_ago_plural: '__count__小时前',\n hour_in: '__count__小时后',\n hour_in_plural: '__count__小时后',\n day_ago: '__count__天前',\n day_ago_plural: '__count__天前',\n day_in: '__count__天后',\n day_in_plural: '__count__天后',\n month_ago: '__count__个月前',\n month_ago_plural: '__count__个月前',\n month_in: '__count__个月后',\n month_in_plural: '__count__个月后',\n year_ago: '__count__年前',\n year_ago_plural: '__count__年前',\n year_in: '__count__年后',\n year_in_plural: '__count__年后'\n }\n },\n 'zh-HK': {\n translation: {\n now: '現在',\n second_ago: '__count__ 秒前',\n second_ago_plural: '__count__ 秒前',\n second_in: '__count__ 秒後',\n second_in_plural: '__count__ 秒後',\n minute_ago: '__count__ 分鐘前',\n minute_ago_plural: '__count__ 分鐘前',\n minute_in: '__count__ 分鐘後',\n minute_in_plural: '__count__ 分鐘後',\n hour_ago: '__count__ 小時前',\n hour_ago_plural: '__count__ 小時前',\n hour_in: '__count__ 小時後',\n hour_in_plural: '__count__ 小時後',\n day_ago: '__count__ 日前',\n day_ago_plural: '__count__ 日前',\n day_in: '__count__ 日後',\n day_in_plural: '__count__ 日後',\n month_ago: '__count__ 個月前',\n month_ago_plural: '__count__ 個月前',\n month_in: '__count__ 個月後',\n month_in_plural: '__count__ 個月後',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年後',\n year_in_plural: '__count__ 年後'\n },\n },\n 'zh-TW': {\n translation: {\n now: '剛才',\n second_ago: '__count__ 秒鐘前',\n second_ago_plural: '__count__ 秒鐘前',\n second_in: '__count__ 秒內',\n second_in_plural: '__count__ 秒內',\n minute_ago: '__count__ 分鐘前',\n minute_ago_plural: '__count__ 分鐘前',\n minute_in: '__count__ 分鐘內',\n minute_in_plural: '__count__ 分鐘內',\n hour_ago: '__count__ 小時前',\n hour_ago_plural: '__count__ 小時前',\n hour_in: '__count__ 小時內',\n hour_in_plural: '__count__ 小時內',\n day_ago: '__count__ 天前',\n day_ago_plural: '__count__ 天前',\n day_in: '__count__ 天內',\n day_in_plural: '__count__ 天內',\n month_ago: '__count__ 月前',\n month_ago_plural: '__count__ 月前',\n month_in: '__count__ 月內',\n month_in_plural: '__count__ 月內',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年內',\n year_in_plural: '__count__ 年內'\n }\n }\n};\n// tslint:enable\n\nvar RelativeTime = /** @class */ (function () {\n function RelativeTime(service, ea) {\n var _this = this;\n this.service = service;\n this.ea = ea;\n this.service.i18nextReady().then(function () {\n _this.setup();\n });\n this.ea.subscribe(I18N_EA_SIGNAL, function (locales) {\n _this.setup(locales);\n });\n }\n RelativeTime.inject = function () { return [I18N, EventAggregator]; };\n RelativeTime.prototype.setup = function (locales) {\n var trans = translations;\n var fallbackLng = this.service.i18next.fallbackLng;\n var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;\n if (Array.isArray(alternateFb) && alternateFb.length > 0) {\n alternateFb = alternateFb[0];\n }\n var key = ((locales && locales.newValue)\n ? locales.newValue\n : this.service.getLocale()) || alternateFb;\n var index = 0;\n // tslint:disable-next-line:no-conditional-assignment\n if ((index = key.indexOf(\"-\")) >= 0) {\n var baseLocale = key.substring(0, index);\n if (trans[baseLocale]) {\n this.addTranslationResource(baseLocale, trans[baseLocale].translation);\n }\n }\n if (trans[key]) {\n this.addTranslationResource(key, trans[key].translation);\n }\n if (trans[fallbackLng]) {\n this.addTranslationResource(key, trans[fallbackLng].translation);\n }\n };\n RelativeTime.prototype.addTranslationResource = function (key, translation) {\n var options = this.service.i18next.options;\n if (options.interpolation && (options.interpolation.prefix !== \"__\" || options.interpolation.suffix !== \"__\")) {\n // tslint:disable-next-line:forin\n for (var subkey in translation) {\n translation[subkey] = translation[subkey]\n .replace(\"__count__\", (options.interpolation.prefix || \"{{\") + \"count\" + (options.interpolation.suffix || \"}}\"));\n }\n }\n this.service.i18next.addResources(key, options.defaultNS || \"translation\", translation);\n };\n RelativeTime.prototype.getRelativeTime = function (time) {\n var now = new Date();\n var diff = now.getTime() - time.getTime();\n var timeDiff = this.getTimeDiffDescription(diff, \"year\", 31104000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"month\", 2592000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"day\", 86400000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"hour\", 3600000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"minute\", 60000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"second\", 1000);\n if (!timeDiff) {\n timeDiff = this.service.tr(\"now\");\n }\n }\n }\n }\n }\n }\n return timeDiff;\n };\n RelativeTime.prototype.getTimeDiffDescription = function (diff, unit, timeDivisor) {\n var unitAmount = parseInt((diff / timeDivisor).toFixed(0), 10);\n if (unitAmount > 0) {\n return this.service.tr(unit, { count: unitAmount, context: \"ago\" });\n }\n else if (unitAmount < 0) {\n var abs = Math.abs(unitAmount);\n return this.service.tr(unit, { count: abs, context: \"in\" });\n }\n return null;\n };\n return RelativeTime;\n}());\n\nvar RtValueConverter = /** @class */ (function () {\n function RtValueConverter(service) {\n this.service = service;\n }\n RtValueConverter.inject = function () { return [RelativeTime]; };\n RtValueConverter.prototype.toView = function (value) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (typeof value === \"string\" && isNaN(value) && !Number.isInteger(value)) {\n value = new Date(value);\n }\n return this.service.getRelativeTime(value);\n };\n RtValueConverter = __decorate([\n valueConverter$1(\"rt\")\n ], RtValueConverter);\n return RtValueConverter;\n}());\n\nvar Backend = /** @class */ (function () {\n function Backend(services, options) {\n if (options === void 0) { options = {}; }\n this.services = services;\n this.options = options;\n this.type = \"backend\";\n this.init(services, options);\n }\n Backend.with = function (loader) {\n this.loader = loader;\n return this;\n };\n Backend.prototype.init = function (services, options) {\n if (options === void 0) { options = {}; }\n this.services = services;\n this.options = Object.assign({}, {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\",\n addPath: \"locales/add/{{lng}}/{{ns}}\",\n allowMultiLoading: false,\n parse: JSON.parse\n }, options);\n };\n Backend.prototype.readMulti = function (languages, namespaces, callback) {\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === \"function\") {\n loadPath = this.options.loadPath(languages, namespaces);\n }\n var url = this.services\n .interpolator\n .interpolate(loadPath, { lng: languages.join(\"+\"), ns: namespaces.join(\"+\") });\n this.loadUrl(url, callback);\n };\n Backend.prototype.read = function (language, namespace, callback) {\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === \"function\") {\n loadPath = this.options.loadPath([language], [namespace]);\n }\n var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });\n this.loadUrl(url, callback);\n };\n Backend.prototype.loadUrl = function (url, callback) {\n return __awaiter(this, void 0, void 0, function () {\n var response, ret, err, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, Backend.loader.loadText(url)];\n case 1:\n response = _b.sent();\n ret = void 0;\n err = void 0;\n try {\n ret = (response instanceof Object) ? response : this.options.parse(response, url);\n }\n catch (e) {\n err = \"failed parsing \" + url + \" to json\";\n }\n if (err) {\n return [2 /*return*/, callback(err, false)];\n }\n callback(null, ret);\n return [3 /*break*/, 3];\n case 2:\n _a = _b.sent();\n callback(\"failed loading \" + url, false /* no retry */);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n // tslint:disable-next-line:variable-name\n Backend.prototype.create = function (_languages, _namespace, _key, _fallbackValue) {\n // not supported\n };\n Backend.type = \"backend\";\n return Backend;\n}());\n\nfunction configure(frameworkConfig, cb) {\n if (typeof cb !== \"function\") {\n var errorMsg = \"You need to provide a callback method to properly configure the library\";\n throw errorMsg;\n }\n var instance = frameworkConfig.container.get(I18N);\n var ret = cb(instance);\n frameworkConfig.globalResources([\n TValueConverter,\n TBindingBehavior,\n TCustomAttribute,\n TParamsCustomAttribute,\n NfValueConverter,\n NfBindingBehavior,\n DfValueConverter,\n DfBindingBehavior,\n RtValueConverter,\n RtBindingBehavior\n ]);\n frameworkConfig.postTask(function () {\n var resources = frameworkConfig.container.get(ViewResources);\n var htmlBehaviorResource = resources.getAttribute(\"t\");\n var htmlParamsResource = resources.getAttribute(\"t-params\");\n var attributes = instance.i18next.options.attributes;\n // Register default attributes if none provided\n if (!attributes) {\n attributes = [\"t\", \"i18n\"];\n }\n attributes.forEach(function (alias) { return resources.registerAttribute(alias, htmlBehaviorResource, \"t\"); });\n attributes.forEach(function (alias) { return resources.registerAttribute(alias + \"-params\", htmlParamsResource, \"t-params\"); });\n });\n return ret;\n}\n\nexport { configure, DfValueConverter, DfBindingBehavior, NfValueConverter, NfBindingBehavior, RtValueConverter, RtBindingBehavior, TValueConverter, TBindingBehavior, TCustomAttribute, TParamsCustomAttribute, I18N_EA_SIGNAL, I18N, RelativeTime, Backend };\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","this","n","v","op","TypeError","call","pop","push","I18N_EA_SIGNAL","I18N","ea","signaler","globalVars","i18next","Intl","global","inject","EventAggregator","BindingSignaler","prototype","setup","options","defaultOptions","_this","_a","skipTranslationOnMissingKey","compatibilityJSON","lng","attributes","fallbackLng","debug","i18nextDeferred","init","err","Array","isArray","String","i18nextReady","setLocale","locale","oldLocale","getLocale","changeLanguage","tr","publish","oldValue","newValue","signal","language","nf","locales","NumberFormat","uf","numberLike","comparer","format","thousandSeparator","decimalSeparator","replace","RegExp","Number","df","DateTimeFormat","fullOptions","undefined","assign","registerGlobalVariable","unregisterGlobalVariable","updateTranslations","el","querySelectorAll","l","selector","concat","join","nodes","node","keys","params","i2","l2","getAttribute","pname","au","viewModel","updateValue","toString","split","re","m","attr","nodeName","exec","index","lastIndex","attrs","j","trim","_textContent","textContent","_innerHTML","innerHTML","attrCC","toUpperCase","reservedNames","i18nLogger","getLogger","indexOf","controller","warn","newChild","createTextNode","_newChild","parentNode","removeChild","firstChild","appendChild","prependParser","createElement","ni","childNodes","_prepended","pi","insertBefore","appendParser","_appended","setAttribute","TBindingBehavior","signalBindingBehavior","SignalBindingBehavior","bind","binding","source","sourceExpression","rewritten","expression","args","unbind","isInteger","isFinite","Math","floor","LazyOptional","LazyOptional_1","of","get","container","hasResolver","TParamsCustomAttribute","element","TParamsCustomAttribute_1","Element","configureAliases","aliases","getOrCreateOwn","resource","valueChanged","TCustomAttribute","service","p","lazyParams","TCustomAttribute_1","newParams","oldParams","paramsChanged","subscription","subscribe","dispose","TValueConverter","toView","valueConverter","NfBindingBehavior","NfValueConverter","nfOrOptions","DfBindingBehavior","DfValueConverter","dfOrOptions","isNaN","Date","RtBindingBehavior","translations","ar","translation","now","second_ago","second_ago_plural","second_in","second_in_plural","minute_ago","minute_ago_plural","minute_in","minute_in_plural","hour_ago","hour_ago_plural","hour_in","hour_in_plural","day_ago","day_ago_plural","day_in","day_in_plural","month_ago","month_ago_plural","month_in","month_in_plural","year_ago","year_ago_plural","year_in","year_in_plural","da","de","en","es","fi","fr","it","ja","lt","nl","nn","nb","pl","pt","sv","th","zh","RelativeTime","trans","alternateFb","baseLocale","substring","addTranslationResource","interpolation","prefix","suffix","subkey","addResources","defaultNS","getRelativeTime","time","diff","getTime","timeDiff","getTimeDiffDescription","unit","timeDivisor","unitAmount","parseInt","toFixed","count","context","abs","RtValueConverter","Backend","services","type","with","loader","loadPath","addPath","allowMultiLoading","parse","JSON","readMulti","languages","namespaces","callback","url","interpolator","interpolate","ns","loadUrl","read","namespace","response","ret","_b","loadText","create","_languages","_namespace","_key","_fallbackValue","configure","frameworkConfig","cb","instance","globalResources","postTask","resources","htmlBehaviorResource","htmlParamsResource","forEach","alias","registerAttribute"],"sourceRoot":""}